@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

/* ===========================
   DESIGN TOKENS
=========================== */
:root {
  --primary: #1E6FD9;
  --primary-dark: #1558B0;
  --primary-light: #EBF3FF;
  --secondary: #00BFA6;
  --secondary-dark: #009E88;
  --secondary-light: #E0FAF7;
  --accent: #FF6B35;
  --dark: #0A1628;
  --dark-2: #1A2740;
  --dark-3: #243450;
  --gray-1: #F8FAFC;
  --gray-2: #EEF2F7;
  --gray-3: #D1DCF0;
  --gray-4: #8FA3C0;
  --gray-5: #4D6080;
  --text: #1A2740;
  --text-muted: #5A7090;
  --white: #FFFFFF;
  --success: #22C55E;
  --warning: #F59E0B;
  --danger: #EF4444;

  --font: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --shadow-sm: 0 2px 8px rgba(10,22,40,0.08);
  --shadow: 0 4px 20px rgba(10,22,40,0.12);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 📱 Mobile-First Reset & Core */
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: 'Pretendard', sans-serif; background: #F8FAFC; color: var(--dark); line-height: 1.5; overflow-x: hidden; }

/* 📱 Mobile Dashboard Layout */
.dashboard-layout { display: flex; flex-direction: column; min-height: 100vh; height: 100vh; }

.sidebar { width: 280px; height: 100%; background: var(--dark); color: white; display: flex; flex-direction: column; transition: transform 0.3s ease; position: fixed; left: 0; top: 0; z-index: 1000; }
.main-content { flex: 1; display: flex; flex-direction: column; background: white; margin-left: 280px; transition: margin 0.3s ease; position: relative; }

/* Bottom Nav (Mobile Only) */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: 64px; background: white; display: none; justify-content: space-around; align-items: center; border-top: 1px solid var(--gray-2); z-index: 900; box-shadow: 0 -4px 12px rgba(0,0,0,0.05); }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-muted); text-decoration: none; font-size: 0.7rem; font-weight: 700; width: 20%; }
.nav-item.active { color: var(--primary); }
.nav-icon { font-size: 1.4rem; }

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .main-content { margin-left: 0; }
  .bottom-nav { display: flex; }
  .calendar-toolbar { padding: 12px 16px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .calendar-nav { width: 100%; justify-content: space-between; }
  .calendar-title { font-size: 1.2rem; }
  
  .cal-cell { height: 85px !important; padding: 4px !important; }
  .cal-date { font-size: 0.8rem; }
  .event-badge { font-size: 0.65rem !important; padding: 2px 4px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block !important; }
  .event-area { display: flex; flex-direction: column; gap: 2px; }
  
  .panel-body { padding: 20px 16px; }
  .alba-panel { width: 100% !important; border-radius: 24px 24px 0 0; height: 85vh !important; top: auto; bottom: 0; transform: translateY(100%); }
  body.panel-open .alba-panel { transform: translateY(0); }
}

@media (max-width: 480px) {
  .cal-cell { height: 75px !important; }
  .cal-day-header { font-size: 0.7rem; padding: 8px 0; }
  .holiday-name { display: none; }
  .calendar-title { font-size: 1.1rem; }
}

/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===========================
   TYPOGRAPHY
=========================== */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.text-6xl { font-size: 3.75rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-white { color: var(--white); }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }

/* ===========================
   LAYOUT
=========================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-sm {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 80px 0; }
.section-sm { padding: 60px 0; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ===========================
   BUTTONS
=========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(30,111,217,0.35);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30,111,217,0.45);
}
.btn-secondary {
  background: var(--secondary);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(0,191,166,0.35);
}
.btn-secondary:hover {
  background: var(--secondary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,191,166,0.45);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}
.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.6);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.15);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover {
  background: var(--gray-2);
  color: var(--text);
}
.btn-lg {
  padding: 18px 36px;
  font-size: 1.125rem;
  border-radius: var(--radius-lg);
}
.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
}
.btn-block { width: 100%; }
.btn-icon { padding: 12px; width: 44px; height: 44px; }

/* ===========================
   CARDS
=========================== */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-2);
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.card-sm { padding: 20px; border-radius: var(--radius); }

/* ===========================
   BADGES
=========================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-secondary { background: var(--secondary-light); color: var(--secondary-dark); }
.badge-success { background: #DCFCE7; color: #16A34A; }
.badge-warning { background: #FEF9C3; color: #B45309; }
.badge-danger { background: #FEE2E2; color: #DC2626; }
.badge-gray { background: var(--gray-2); color: var(--gray-5); }

/* ===========================
   NAVBAR
=========================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-2);
  transition: var(--transition);
}
.navbar.scrolled {
  box-shadow: var(--shadow);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.navbar-logo .logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}
.navbar-logo .logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dark);
  white-space: nowrap;
}
.navbar-logo .logo-text span { color: var(--primary); }
.navbar-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar-menu a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}
.navbar-menu a:hover {
  color: var(--primary);
  background: var(--primary-light);
}
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
  border-radius: 2px;
}

/* ===========================
   FORMS
=========================== */
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.form-label .required { color: var(--danger); margin-left: 4px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--gray-3);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: var(--transition);
  outline: none;
  appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,111,217,0.12);
}
.form-input.error { border-color: var(--danger); }
.form-input::placeholder { color: var(--gray-4); }
.form-textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235A7090' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}
.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
}
.form-error {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 6px;
  display: none;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.form-divider::before, .form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-3);
}
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ===========================
   SECTION HEADERS
=========================== */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--dark);
  margin-bottom: 16px;
}
.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 600px;
}
.section-header { text-align: center; margin-bottom: 60px; }
.section-header .section-label { margin-bottom: 16px; }

/* ===========================
   TABS
=========================== */
.tabs {
  display: flex;
  background: var(--gray-2);
  border-radius: var(--radius);
  padding: 4px;
  gap: 4px;
}
.tab-btn {
  flex: 1;
  padding: 10px 20px;
  border: none;
  background: transparent;
  border-radius: calc(var(--radius) - 4px);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.tab-btn.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===========================
   AVATAR
=========================== */
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.avatar-primary { background: var(--primary-light); color: var(--primary); }
.avatar-secondary { background: var(--secondary-light); color: var(--secondary-dark); }
.avatar-lg { width: 60px; height: 60px; font-size: 1.25rem; }

/* ===========================
   STATS
=========================== */
.stat-card {
  text-align: center;
  padding: 32px 24px;
}
.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ===========================
   TAGS
=========================== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--gray-2);
  color: var(--gray-5);
  gap: 4px;
}
.tag-primary { background: var(--primary-light); color: var(--primary); }
.tag-secondary { background: var(--secondary-light); color: var(--secondary-dark); }

/* ===========================
   ALERT
=========================== */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  border-left: 4px solid;
  margin-bottom: 20px;
}
.alert-info { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); }
.alert-success { background: #DCFCE7; border-color: var(--success); color: #166534; }
.alert-warning { background: #FEF9C3; border-color: var(--warning); color: #92400E; }
.alert-danger { background: #FEE2E2; border-color: var(--danger); color: #991B1B; }

/* ===========================
   SIDEBAR LAYOUT
=========================== */
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--dark);
  padding: 24px 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 260px;
  overflow-y: auto;
  z-index: 900;
}
.sidebar-logo {
  padding: 12px 24px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 16px;
}
.sidebar-logo .logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--white);
}
.sidebar-logo .logo-text span { color: var(--secondary); }
.sidebar-logo .logo-sub {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin-top: 2px;
}
.sidebar-section-label {
  padding: 8px 24px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-top: 16px;
}
.sidebar-menu { padding: 0 12px; }
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  margin-bottom: 4px;
  text-decoration: none;
}
.sidebar-item:hover {
  background: rgba(255,255,255,0.08);
  color: var(--white);
}
.sidebar-item.active {
  background: var(--primary);
  color: var(--white);
}
.sidebar-item .icon { font-size: 1.1rem; width: 20px; text-align: center; }
.sidebar-item .badge-count {
  margin-left: auto;
  background: var(--secondary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
}
.main-content {
  margin-left: 260px;
  padding-top: 68px;
  min-height: 100vh;
  background: var(--gray-1);
}

/* ===========================
   FOOTER
=========================== */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.6);
  padding: 60px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 32px;
}
.footer-brand .logo-text {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}
.footer-brand .logo-text span { color: var(--secondary); }
.footer-brand p { font-size: 0.875rem; line-height: 1.7; max-width: 300px; }
.footer-col h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  transition: var(--transition);
}
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

/* ===========================
   ANIMATIONS
=========================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.animate-fadeInUp { animation: fadeInUp 0.6s ease forwards; }
.animate-fadeIn { animation: fadeIn 0.6s ease forwards; }
.animate-float { animation: float 3s ease-in-out infinite; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ===========================
   UTILITIES
=========================== */
.mt-auto { margin-top: auto; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
}
@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .navbar-menu { display: none; }
  .hamburger { display: flex; }
  .section { padding: 60px 0; }
  .section-title { font-size: 1.75rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .btn-lg { padding: 14px 24px; font-size: 1rem; }
}
