/* ============================================================
   HomeoPrep Design System
   Earthy · Warm · Calm · Focused
   ============================================================ */

/* ------- Google Fonts Fallback ------- */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* ------- CSS Custom Properties ------- */
:root {
  /* Colors */
  --bg:          #FAF7F2;
  --bg-2:        #F3EDE3;
  --surface:     #EDE5D8;
  --surface-2:   #E2D8C8;
  --border:      #D4C8B4;
  --border-2:    #C4B89E;

  --primary:     #C4714F;
  --primary-h:   #B05F3D;
  --primary-l:   #D9876A;
  --primary-bg:  #FAF0EB;

  --secondary:   #6B8F71;
  --secondary-h: #557A5B;
  --secondary-bg:#EDF3EE;

  --accent:      #8B6F47;
  --amber:       #D4A035;
  --amber-bg:    #FDF3DC;
  --error:       #B94040;
  --error-bg:    #FDF0F0;
  --success:     #4A7C59;
  --success-bg:  #EDF5EF;

  --text:        #2C1810;
  --text-2:      #5A3D2B;
  --text-3:      #8B6F5A;
  --text-inv:    #FAF7F2;

  /* Typography */
  --font-serif:  'Lora', Georgia, serif;
  --font-sans:   'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Sizes */
  --sidebar-w:   260px;
  --admin-bar-h: 48px;
  --mobile-header-h: 60px;

  /* Spacing */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* Radius */
  --r-sm:  6px;
  --r-md:  12px;
  --r-lg:  18px;
  --r-xl:  24px;
  --r-full:9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(44,24,16,.08), 0 1px 2px rgba(44,24,16,.04);
  --shadow-md:  0 4px 12px rgba(44,24,16,.10), 0 2px 4px rgba(44,24,16,.06);
  --shadow-lg:  0 10px 30px rgba(44,24,16,.13), 0 4px 10px rgba(44,24,16,.08);
  --shadow-xl:  0 20px 50px rgba(44,24,16,.16);

  /* Transitions */
  --ease:       cubic-bezier(.25,.8,.25,1);
  --t-fast:     150ms;
  --t-normal:   250ms;
  --t-slow:     400ms;
}

/* ------- Reset & Base ------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
img { max-width: 100%; display: block; }
input, textarea, select { font-family: inherit; }
ul, ol { list-style: none; }

/* ------- Typography ------- */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; line-height: 1.3; color: var(--text); }
h4, h5, h6 { font-family: var(--font-sans); font-weight: 600; line-height: 1.4; color: var(--text); }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
h4 { font-size: 1.05rem; }
p  { color: var(--text-2); line-height: 1.7; }
small { font-size: .8rem; color: var(--text-3); }
strong { font-weight: 600; color: var(--text); }

/* ------- Utility Classes ------- */
.hidden      { display: none !important; }
.flex        { display: flex; }
.flex-col    { display: flex; flex-direction: column; }
.items-center{ align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2       { gap: var(--sp-2); }
.gap-4       { gap: var(--sp-4); }
.gap-6       { gap: var(--sp-6); }
.w-full      { width: 100%; }
.text-center { text-align: center; }
.mt-4        { margin-top: var(--sp-4); }
.mb-4        { margin-bottom: var(--sp-4); }
.p-4         { padding: var(--sp-4); }
.rounded     { border-radius: var(--r-md); }
.truncate    { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------- Loading Overlay ------- */
.loading-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity var(--t-slow) var(--ease);
}
.loading-overlay.fade-out { opacity: 0; pointer-events: none; }
.loading-spinner { text-align: center; }
.spinner-ring {
  width: 56px; height: 56px; border-radius: 50%;
  border: 3px solid var(--surface-2);
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
  margin: 0 auto var(--sp-4);
}
.loading-text {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--primary);
  letter-spacing: .05em;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------- Admin Bar ------- */
.admin-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--admin-bar-h);
  background: linear-gradient(135deg, #2C1810 0%, #5A2E1A 100%);
  color: var(--text-inv);
  box-shadow: var(--shadow-md);
}
.admin-bar-inner {
  display: flex; align-items: center; gap: var(--sp-4);
  height: 100%; padding: 0 var(--sp-6);
  max-width: 100%; overflow-x: auto;
}
.admin-badge {
  font-size: .75rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--primary); color: white;
  padding: 3px 10px; border-radius: var(--r-full);
  white-space: nowrap; flex-shrink: 0;
}
.admin-nav { display: flex; gap: var(--sp-1); flex: 1; }
.admin-nav-btn {
  color: rgba(255,255,255,.75); font-size: .8rem; font-weight: 500;
  padding: 5px 12px; border-radius: var(--r-sm);
  transition: background var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}
.admin-nav-btn:hover, .admin-nav-btn.active {
  background: rgba(255,255,255,.12); color: white;
}
.admin-toggle-btn {
  margin-left: auto; color: rgba(255,255,255,.6); font-size: .75rem;
  padding: 4px 10px; border-radius: var(--r-sm); border: 1px solid rgba(255,255,255,.2);
  white-space: nowrap; flex-shrink: 0;
  transition: all var(--t-fast);
}
.admin-toggle-btn:hover { background: rgba(255,255,255,.1); color: white; }
body.admin-active { --admin-offset: var(--admin-bar-h); }
body.admin-active .sidebar { top: var(--admin-bar-h); }
body.admin-active .main-content { margin-top: var(--admin-bar-h); }
body.admin-active .mobile-header { top: var(--admin-bar-h); }

/* ------- Sidebar ------- */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 100;
  transition: transform var(--t-normal) var(--ease);
  overflow-y: auto;
  box-shadow: var(--shadow-md);
}
.sidebar-brand {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  border-bottom: 1px solid var(--border);
}
.brand-icon {
  width: 42px; height: 42px; border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--primary) 0%, #A05A38 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 3px 10px rgba(196,113,79,.3);
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-serif); font-weight: 700;
  font-size: 1.05rem; color: var(--text); display: block;
}
.brand-sub {
  font-size: .7rem; color: var(--text-3); display: block;
  letter-spacing: .03em;
}
.sidebar-user {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary) 0%, #4A6B50 100%);
  color: white; font-weight: 700; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-name { font-weight: 600; font-size: .9rem; display: block; color: var(--text); }
.user-role  { font-size: .72rem; color: var(--text-3); display: block; text-transform: capitalize; }
.sidebar-nav {
  flex: 1; padding: var(--sp-3) var(--sp-3);
  display: flex; flex-direction: column; gap: var(--sp-1);
}
.nav-item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md);
  font-size: .88rem; font-weight: 500; color: var(--text-2);
  transition: all var(--t-fast) var(--ease);
  position: relative;
}
.nav-item:hover {
  background: var(--bg-2); color: var(--text);
}
.nav-item.active {
  background: var(--primary-bg); color: var(--primary);
  font-weight: 600;
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%; border-radius: 0 2px 2px 0;
  background: var(--primary);
}
.nav-icon  { font-size: 1.1rem; width: 22px; text-align: center; flex-shrink: 0; }
.sidebar-streak {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-5);
  background: var(--amber-bg);
  border-top: 1px solid var(--border);
  font-size: .85rem;
}
.streak-fire   { font-size: 1.2rem; }
.streak-count  { font-weight: 700; color: var(--amber); font-size: 1.1rem; }
.streak-label  { color: var(--text-3); font-size: .8rem; }
.sidebar-admin-toggle {
  margin: var(--sp-3) var(--sp-5) var(--sp-4);
  padding: var(--sp-2) var(--sp-4);
  background: var(--text); color: var(--text-inv);
  border-radius: var(--r-md); font-size: .8rem; font-weight: 600;
  transition: background var(--t-fast);
}
.sidebar-admin-toggle:hover { background: var(--primary); }

/* ------- Mobile Header ------- */
.mobile-header {
  display: none; /* Hidden on desktop */
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--mobile-header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  align-items: center; justify-content: space-between;
  padding: 0 var(--sp-4);
  box-shadow: var(--shadow-sm);
}
.mobile-menu-btn {
  font-size: 1.3rem; padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  color: var(--text); transition: background var(--t-fast);
}
.mobile-menu-btn:hover { background: var(--bg-2); }
.mobile-brand {
  font-family: var(--font-serif); font-weight: 700;
  font-size: 1.1rem; color: var(--primary);
}
.mobile-streak {
  font-size: .85rem; font-weight: 600; color: var(--amber);
  background: var(--amber-bg); padding: 4px 10px; border-radius: var(--r-full);
}

/* ------- Sidebar Overlay (Mobile) ------- */
.sidebar-overlay {
  position: fixed; inset: 0; z-index: 99;
  background: rgba(44,24,16,.4);
  backdrop-filter: blur(2px);
}

/* ------- Main Content ------- */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  transition: margin var(--t-normal) var(--ease);
}
.page-container {
  padding: var(--sp-8) var(--sp-8) var(--sp-12);
  max-width: 1200px;
}

/* ------- Page Header ------- */
.page-header {
  margin-bottom: var(--sp-8);
}
.page-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--text);
  margin-bottom: var(--sp-1);
}
.page-subtitle { color: var(--text-3); font-size: .9rem; }
.page-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }

/* ------- Cards ------- */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t-fast), transform var(--t-fast);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-sm { padding: var(--sp-4); border-radius: var(--r-md); }
.card-surface { background: var(--surface); border-color: var(--border); }

/* ------- Buttons ------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-md);
  font-size: .9rem; font-weight: 600;
  transition: all var(--t-fast) var(--ease);
  cursor: pointer; border: none;
  letter-spacing: .01em;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary); color: white;
  box-shadow: 0 2px 8px rgba(196,113,79,.35);
}
.btn-primary:hover {
  background: var(--primary-h);
  box-shadow: 0 4px 14px rgba(196,113,79,.45);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: var(--secondary); color: white;
  box-shadow: 0 2px 8px rgba(107,143,113,.3);
}
.btn-secondary:hover { background: var(--secondary-h); transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-bg); }
.btn-ghost {
  background: transparent; color: var(--text-2);
}
.btn-ghost:hover { background: var(--bg-2); color: var(--text); }
.btn-danger { background: var(--error); color: white; }
.btn-danger:hover { background: #9E3030; }
.btn-sm { padding: var(--sp-2) var(--sp-4); font-size: .82rem; }
.btn-lg { padding: var(--sp-4) var(--sp-8); font-size: 1rem; }
.btn-xl { padding: var(--sp-5) var(--sp-10); font-size: 1.05rem; }
.btn-icon { padding: var(--sp-2); border-radius: var(--r-md); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ------- Form Elements ------- */
.form-group { display: flex; flex-direction: column; gap: var(--sp-2); }
.form-label {
  font-weight: 600; font-size: .85rem; color: var(--text-2);
  letter-spacing: .02em;
}
.form-input, .form-select, .form-textarea {
  padding: var(--sp-3) var(--sp-4);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: .9rem; font-family: var(--font-sans);
  background: white; color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none; width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(196,113,79,.12);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: .78rem; color: var(--text-3); }
.form-error { font-size: .78rem; color: var(--error); font-weight: 500; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }

/* ------- Badges / Tags ------- */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: var(--r-full);
  font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase;
}
.badge-primary  { background: var(--primary-bg);  color: var(--primary); }
.badge-success  { background: var(--success-bg);  color: var(--success); }
.badge-warning  { background: var(--amber-bg);    color: var(--amber); }
.badge-error    { background: var(--error-bg);    color: var(--error); }
.badge-neutral  { background: var(--surface-2);   color: var(--text-3); }
.badge-secondary{ background: var(--secondary-bg);color: var(--secondary); }

/* ------- Progress Bar ------- */
.progress-bar { height: 8px; background: var(--surface-2); border-radius: var(--r-full); overflow: hidden; }
.progress-fill {
  height: 100%; border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-l) 100%);
  transition: width var(--t-slow) var(--ease);
}
.progress-fill.green  { background: linear-gradient(90deg, var(--secondary) 0%, #8FC496 100%); }
.progress-fill.amber  { background: linear-gradient(90deg, var(--amber) 0%, #E8B84A 100%); }
.progress-bar-lg { height: 12px; }

/* ------- Toast Notifications ------- */
.toast-container {
  position: fixed; bottom: var(--sp-6); right: var(--sp-6);
  display: flex; flex-direction: column; gap: var(--sp-3);
  z-index: 9000; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--text); color: white;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  font-size: .88rem; font-weight: 500;
  min-width: 280px; max-width: 380px;
  pointer-events: auto;
  animation: toast-in var(--t-normal) var(--ease);
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--error); }
.toast.warning { background: var(--amber); }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px) scale(.96); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* ------- Grid Layouts ------- */
.grid-2  { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-5); }
.grid-3  { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
.grid-4  { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-4); }

/* ------- Subject Chips ------- */
.subject-chip {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: 5px 12px; border-radius: var(--r-full);
  font-size: .8rem; font-weight: 600;
  cursor: pointer; transition: all var(--t-fast);
  border: 1.5px solid transparent;
}
.subject-chip.active { border-color: var(--primary); background: var(--primary-bg); color: var(--primary); }

/* ------- Question Card ------- */
.question-card {
  background: white; border: 1.5px solid var(--border);
  border-radius: var(--r-xl); padding: var(--sp-8);
  box-shadow: var(--shadow-md);
}
.question-meta {
  display: flex; align-items: center; gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}
.question-number {
  font-size: .8rem; color: var(--text-3); font-weight: 600;
  background: var(--surface); padding: 4px 10px; border-radius: var(--r-full);
}
.question-subject { }
.question-year {
  font-size: .78rem; color: var(--text-3);
  background: var(--amber-bg); padding: 3px 8px; border-radius: var(--r-full);
}
.question-text {
  font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.75;
  color: var(--text); margin-bottom: var(--sp-6);
}
.question-image {
  margin-bottom: var(--sp-5); border-radius: var(--r-md);
  max-height: 300px; object-fit: contain;
}
.options-grid {
  display: flex; flex-direction: column; gap: var(--sp-3);
}
.option-btn {
  display: flex; align-items: flex-start; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: white; color: var(--text);
  text-align: left; font-size: .92rem; line-height: 1.5;
  transition: all var(--t-fast) var(--ease);
  cursor: pointer;
}
.option-btn:hover:not(:disabled) {
  border-color: var(--primary-l); background: var(--primary-bg);
  transform: translateX(3px);
}
.option-btn.selected  { border-color: var(--primary);  background: var(--primary-bg);  color: var(--primary); }
.option-btn.correct   { border-color: var(--success);  background: var(--success-bg);  color: var(--success); }
.option-btn.wrong     { border-color: var(--error);    background: var(--error-bg);    color: var(--error); }
.option-btn.reveal    { border-color: var(--success);  background: var(--success-bg);  color: var(--success); }
.option-letter {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface); color: var(--text-2);
  font-weight: 700; font-size: .8rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t-fast);
}
.option-btn.selected .option-letter { background: var(--primary); color: white; }
.option-btn.correct  .option-letter { background: var(--success); color: white; }
.option-btn.wrong    .option-letter { background: var(--error);   color: white; }
.option-btn.reveal   .option-letter { background: var(--success); color: white; }
.option-text { flex: 1; }
.explanation-box {
  margin-top: var(--sp-6);
  padding: var(--sp-5); border-radius: var(--r-md);
  border-left: 4px solid var(--secondary);
  background: var(--secondary-bg);
  animation: fade-up .2s var(--ease);
}
.explanation-box h5 {
  font-weight: 700; color: var(--secondary); margin-bottom: var(--sp-2);
  font-size: .85rem; text-transform: uppercase; letter-spacing: .05em;
}
.explanation-box p { color: var(--text-2); font-size: .9rem; line-height: 1.7; }
.ai-disclaimer {
  font-size: .75rem; color: var(--text-3); margin-top: var(--sp-3);
  font-style: italic;
}
.question-actions {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: var(--sp-6); padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
  flex-wrap: wrap; gap: var(--sp-3);
}
.score-indicator {
  display: flex; align-items: center; gap: var(--sp-2);
  font-size: .85rem; font-weight: 600;
}
.score-indicator.correct { color: var(--success); }
.score-indicator.wrong   { color: var(--error); }

/* ------- Timer ------- */
.timer-display {
  font-family: var(--font-serif); font-size: 2.5rem; font-weight: 700;
  color: var(--text); letter-spacing: .05em;
  transition: color var(--t-fast);
}
.timer-display.warning { color: var(--amber); }
.timer-display.danger  { color: var(--error); animation: pulse-color 1s ease infinite; }
@keyframes pulse-color { 0%,100% { opacity: 1; } 50% { opacity: .6; } }

/* ------- Mock Test Header ------- */
.test-header {
  position: sticky; top: 0; z-index: 50;
  background: white; border-bottom: 1px solid var(--border);
  padding: var(--sp-4) var(--sp-8);
  display: flex; align-items: center; gap: var(--sp-6);
  box-shadow: var(--shadow-sm);
}
.test-progress-mini {
  flex: 1;
  display: flex; flex-direction: column; gap: var(--sp-1);
}
.test-progress-label { font-size: .75rem; color: var(--text-3); font-weight: 500; }

/* ------- Score Circle ------- */
.score-ring { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring-text {
  position: absolute; text-align: center;
  font-family: var(--font-serif);
}
.score-ring-number { font-size: 1.8rem; font-weight: 700; color: var(--text); display: block; }
.score-ring-label  { font-size: .7rem; color: var(--text-3); display: block; }

/* ------- Dashboard Widgets ------- */
.countdown-card {
  background: linear-gradient(135deg, #2C1810 0%, #4A2510 50%, #6B3520 100%);
  border-radius: var(--r-xl); padding: var(--sp-8);
  color: white; position: relative; overflow: hidden;
}
.countdown-card::before {
  content: '⚕'; position: absolute; right: var(--sp-6); top: 50%;
  transform: translateY(-50%); font-size: 5rem; opacity: .08;
  line-height: 1;
}
.countdown-label { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; opacity: .7; margin-bottom: var(--sp-2); }
.countdown-days  { font-family: var(--font-serif); font-size: clamp(3rem,8vw,5rem); font-weight: 700; line-height: 1; }
.countdown-sub   { font-size: .9rem; opacity: .7; margin-top: var(--sp-2); }
.countdown-progress {
  margin-top: var(--sp-5); height: 4px; background: rgba(255,255,255,.15);
  border-radius: var(--r-full); overflow: hidden;
}
.countdown-progress-fill {
  height: 100%; background: var(--primary-l); border-radius: var(--r-full);
  transition: width 1s var(--ease);
}
.stat-card { }
.stat-number { font-family: var(--font-serif); font-size: 2rem; font-weight: 700; color: var(--text); }
.stat-change { font-size: .78rem; font-weight: 600; }
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--error); }
.stat-label { font-size: .82rem; color: var(--text-3); margin-top: var(--sp-1); }

/* ------- Flashcard ------- */
.flashcard-scene {
  perspective: 1000px;
  width: 100%; max-width: 600px; margin: 0 auto;
  height: 340px; cursor: pointer;
}
.flashcard-inner {
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .6s var(--ease);
  position: relative;
}
.flashcard-scene.flipped .flashcard-inner { transform: rotateY(180deg); }
.flashcard-face {
  position: absolute; inset: 0;
  border-radius: var(--r-xl);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--sp-8);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.flashcard-front {
  background: white;
  border: 1.5px solid var(--border);
}
.flashcard-back {
  background: linear-gradient(135deg, var(--primary-bg) 0%, #FDE8DF 100%);
  border: 1.5px solid var(--primary-l);
  transform: rotateY(180deg);
}
.flashcard-face-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-3);
  position: absolute; top: var(--sp-4);
}
.flashcard-text {
  font-family: var(--font-serif); font-size: 1.15rem;
  line-height: 1.7; color: var(--text);
}
.flashcard-subject { position: absolute; bottom: var(--sp-4); }
.sr-buttons {
  display: flex; gap: var(--sp-3); justify-content: center;
  margin-top: var(--sp-5);
}
.sr-btn {
  padding: var(--sp-3) var(--sp-5); border-radius: var(--r-md);
  font-size: .85rem; font-weight: 600;
  border: 1.5px solid; transition: all var(--t-fast);
}
.sr-btn.again  { color: var(--error);    border-color: var(--error);    }
.sr-btn.hard   { color: var(--amber);   border-color: var(--amber);    }
.sr-btn.good   { color: var(--secondary);border-color: var(--secondary);}
.sr-btn.easy   { color: var(--success); border-color: var(--success);  }
.sr-btn:hover  { color: white; }
.sr-btn.again:hover  { background: var(--error); }
.sr-btn.hard:hover   { background: var(--amber); }
.sr-btn.good:hover   { background: var(--secondary); }
.sr-btn.easy:hover   { background: var(--success); }

/* ------- Achievements ------- */
.achievement-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: var(--sp-4); }
.achievement-card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-5);
  text-align: center;
  transition: all var(--t-fast);
}
.achievement-card.earned {
  border-color: var(--amber); background: var(--amber-bg);
  box-shadow: 0 0 0 2px rgba(212,160,53,.15);
}
.achievement-card:not(.earned) { filter: grayscale(1); opacity: .6; }
.achievement-icon { font-size: 2.5rem; display: block; margin-bottom: var(--sp-3); }
.achievement-name { font-weight: 700; font-size: .85rem; color: var(--text); margin-bottom: var(--sp-1); }
.achievement-desc { font-size: .75rem; color: var(--text-3); line-height: 1.4; }

/* ------- Analytics Charts ------- */
.chart-wrapper { position: relative; padding: var(--sp-4); background: white; border-radius: var(--r-lg); }
.chart-label   { font-weight: 600; font-size: .9rem; margin-bottom: var(--sp-3); }
.weak-topic-item {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-3); border-radius: var(--r-md);
  border: 1px solid var(--border); background: white;
  transition: all var(--t-fast);
}
.weak-topic-item:hover { border-color: var(--primary-l); }
.weak-topic-name  { flex: 1; font-weight: 500; font-size: .9rem; }
.weak-topic-pct   { font-weight: 700; font-size: .9rem; }
.weak-topic-pct.bad    { color: var(--error); }
.weak-topic-pct.medium { color: var(--amber); }
.weak-topic-pct.good   { color: var(--success); }

/* ------- Study Heatmap ------- */
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(36px,1fr));
  gap: var(--sp-1);
}
.heatmap-cell {
  aspect-ratio: 1; border-radius: var(--r-sm);
  cursor: pointer; transition: all var(--t-fast);
  position: relative;
}
.heatmap-cell[data-level="0"] { background: var(--surface-2); }
.heatmap-cell[data-level="1"] { background: rgba(212,160,53,.4); }
.heatmap-cell[data-level="2"] { background: rgba(107,143,113,.5); }
.heatmap-cell[data-level="3"] { background: var(--secondary); }
.heatmap-cell:hover { transform: scale(1.15); box-shadow: var(--shadow-md); }

/* ------- Login Page ------- */
.login-wrapper {
  min-height: 100vh; display: flex;
  background: var(--bg);
}
.login-left {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: var(--sp-12) var(--sp-8);
}
.login-right {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: var(--sp-12) var(--sp-8);
  background: linear-gradient(135deg, #2C1810 0%, #5A2E1A 50%, #8B5A3C 100%);
  position: relative; overflow: hidden;
}
.login-right::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.login-brand {
  text-align: center; margin-bottom: var(--sp-10);
}
.login-brand-icon {
  width: 72px; height: 72px; border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--primary) 0%, #A05A38 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; margin: 0 auto var(--sp-4);
  box-shadow: 0 8px 24px rgba(196,113,79,.35);
}
.login-brand h1 {
  font-family: var(--font-serif); font-size: 2rem; color: var(--text);
}
.login-brand p { color: var(--text-3); margin-top: var(--sp-1); }
.login-card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: var(--sp-8);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 420px;
}
.login-card h2 { margin-bottom: var(--sp-6); }
.login-form { display: flex; flex-direction: column; gap: var(--sp-4); }
.login-right-content { position: relative; z-index: 1; color: white; max-width: 420px; text-align: center; }
.login-right-title {
  font-family: var(--font-serif); font-size: 2.2rem; font-weight: 700;
  margin-bottom: var(--sp-5); line-height: 1.3;
}
.login-features { display: flex; flex-direction: column; gap: var(--sp-4); text-align: left; }
.login-feature {
  display: flex; align-items: flex-start; gap: var(--sp-4);
  padding: var(--sp-4); border-radius: var(--r-md);
  background: rgba(255,255,255,.08); backdrop-filter: blur(4px);
}
.login-feature-icon { font-size: 1.4rem; }
.login-feature h4  { font-weight: 600; margin-bottom: 2px; }
.login-feature p   { font-size: .82rem; opacity: .7; color: rgba(255,255,255,.8); }

/* ------- Animations ------- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scale-in {
  from { opacity: 0; transform: scale(.95); }
  to   { opacity: 1; transform: scale(1); }
}
.animate-fade-up { animation: fade-up .35s var(--ease) forwards; }
.animate-scale-in { animation: scale-in .3s var(--ease) forwards; }
.delay-1 { animation-delay: .05s; opacity: 0; }
.delay-2 { animation-delay: .10s; opacity: 0; }
.delay-3 { animation-delay: .15s; opacity: 0; }
.delay-4 { animation-delay: .20s; opacity: 0; }

/* ------- Divider ------- */
.divider { height: 1px; background: var(--border); margin: var(--sp-6) 0; }
.divider-text {
  display: flex; align-items: center; gap: var(--sp-4);
  color: var(--text-3); font-size: .82rem;
  margin: var(--sp-5) 0;
}
.divider-text::before, .divider-text::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ------- Tabs ------- */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: var(--sp-6); }
.tab {
  padding: var(--sp-3) var(--sp-5);
  font-weight: 600; font-size: .88rem; color: var(--text-3);
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  cursor: pointer; transition: all var(--t-fast);
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ------- Table ------- */
.table-wrapper { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--surface); }
th {
  padding: var(--sp-3) var(--sp-4);
  text-align: left; font-size: .8rem; font-weight: 700;
  color: var(--text-3); letter-spacing: .05em; text-transform: uppercase;
}
td {
  padding: var(--sp-3) var(--sp-4);
  font-size: .88rem; color: var(--text-2);
  border-top: 1px solid var(--border);
}
tr:hover td { background: var(--bg-2); }

/* ------- Modal ------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(44,24,16,.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-4);
  animation: fade-in .2s var(--ease);
}
.modal {
  background: white; border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  width: 100%; max-width: 560px; max-height: 90vh;
  overflow-y: auto;
  animation: scale-in .25s var(--ease);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-6); border-bottom: 1px solid var(--border);
}
.modal-body { padding: var(--sp-6); }
.modal-footer {
  padding: var(--sp-5) var(--sp-6);
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: var(--sp-3);
}

/* ------- Scrollbar ------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ------- Embedded Question Images ------- */
.question-img-embed {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: var(--r-md);
  margin: var(--sp-3) 0;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: block;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.question-img-embed:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

/* ------- Responsive ------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .mobile-header {
    display: flex;
  }
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
    padding-top: var(--mobile-header-h);
  }
  .page-container { padding: var(--sp-5); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .login-right { display: none; }
  .login-left { padding: var(--sp-8) var(--sp-5); }
  .test-header { padding: var(--sp-3) var(--sp-5); flex-wrap: wrap; }
  .question-card { padding: var(--sp-5); }
  .flashcard-scene { height: 260px; }
  .timer-display { font-size: 1.8rem; }
  .countdown-days { font-size: 3rem; }
  .countdown-card { padding: var(--sp-6); }
}

@media (max-width: 480px) {
  .btn { padding: var(--sp-2) var(--sp-4); font-size: .85rem; }
  .question-text { font-size: .95rem; }
  .option-btn { font-size: .85rem; }
  .sr-buttons { flex-wrap: wrap; }
}

/* ------- Planner ------- */
.planner-week { display: grid; grid-template-columns: repeat(7,1fr); gap: var(--sp-2); }
.planner-day {
  background: white; border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--sp-3);
  text-align: center; font-size: .8rem; cursor: pointer;
  transition: all var(--t-fast);
}
.planner-day.today { border-color: var(--primary); background: var(--primary-bg); }
.planner-day.done  { border-color: var(--success); background: var(--success-bg); }
.planner-day-num   { font-weight: 700; font-size: 1rem; margin-bottom: 2px; color: var(--text); }
.planner-day-label { color: var(--text-3); font-size: .7rem; }

/* ------- Admin Specific ------- */
.admin-section { border: 2px dashed rgba(196,113,79,.3); border-radius: var(--r-md); padding: var(--sp-4); position: relative; }
.admin-section::before {
  content: 'Admin Only'; position: absolute; top: -10px; left: var(--sp-4);
  background: var(--primary); color: white; font-size: .65rem; font-weight: 700;
  padding: 2px 8px; border-radius: var(--r-full); letter-spacing: .05em;
}
.question-review-badge {
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  padding: 2px 8px; border-radius: var(--r-full);
  background: var(--amber-bg); color: var(--amber);
  border: 1px solid var(--amber);
}

/* ------- Empty State ------- */
.empty-state {
  text-align: center; padding: var(--sp-16) var(--sp-8);
  color: var(--text-3);
}
.empty-state-icon { font-size: 3rem; margin-bottom: var(--sp-4); display: block; }
.empty-state h3   { color: var(--text-2); margin-bottom: var(--sp-2); }

/* ------- Notification prompt ------- */
.notif-prompt {
  position: fixed; bottom: var(--sp-6); left: 50%; transform: translateX(-50%);
  background: white; border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: var(--sp-5) var(--sp-6);
  box-shadow: var(--shadow-xl); z-index: 5000;
  max-width: 400px; width: calc(100% - var(--sp-8));
  animation: fade-up .3s var(--ease);
  display: flex; align-items: center; gap: var(--sp-4);
}
.notif-prompt-icon { font-size: 2rem; flex-shrink: 0; }
.notif-prompt p    { font-size: .88rem; color: var(--text-2); flex: 1; }
.notif-prompt-actions { display: flex; flex-direction: column; gap: var(--sp-2); flex-shrink: 0; }

/* ------- Filter Bar ------- */
.filter-bar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  flex-wrap: wrap; margin-bottom: var(--sp-6);
  padding: var(--sp-3) var(--sp-5);
  background: white; border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.filter-bar .form-select {
  height: 38px; padding: 0 32px 0 14px;
  font-size: .85rem; border-radius: var(--r-md);
  box-sizing: border-box; line-height: 38px;
}
.filter-bar .btn {
  height: 38px; display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box; padding: 0 var(--sp-4); font-size: .85rem;
}
.filter-label { font-weight: 600; font-size: .82rem; color: var(--text-3); white-space: nowrap; }
.filter-checkbox-pill {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  height: 38px; padding: 0 var(--sp-4);
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-md); font-size: .85rem; font-weight: 500;
  cursor: pointer; user-select: none; box-sizing: border-box;
}

/* ------- Upload Zone ------- */
.upload-zone {
  border: 2px dashed var(--border-2); border-radius: var(--r-lg);
  padding: var(--sp-12) var(--sp-8); text-align: center;
  cursor: pointer; transition: all var(--t-fast);
  background: white;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary); background: var(--primary-bg);
}
.upload-icon  { font-size: 3rem; display: block; margin-bottom: var(--sp-4); }
.upload-text  { font-weight: 600; color: var(--text-2); margin-bottom: var(--sp-2); }
.upload-hint  { font-size: .82rem; color: var(--text-3); }

/* ------- Question Number Grid (Mock Test) ------- */
.qnum-grid {
  display: grid; grid-template-columns: repeat(10,1fr); gap: var(--sp-1);
}
.qnum-btn {
  aspect-ratio: 1; border-radius: var(--r-sm);
  font-size: .75rem; font-weight: 600;
  border: 1px solid var(--border); background: white;
  color: var(--text-3); cursor: pointer;
  transition: all var(--t-fast);
}
.qnum-btn.answered   { background: var(--secondary-bg); color: var(--secondary); border-color: var(--secondary); }
.qnum-btn.skipped    { background: var(--amber-bg); color: var(--amber); border-color: var(--amber); }
.qnum-btn.current    { background: var(--primary); color: white; border-color: var(--primary); }
.qnum-btn.flagged    { background: var(--error-bg); color: var(--error); border-color: var(--error); }

/* ------- AI Bot Sidebot Component ------- */
.ai-bot-trigger {
  position: fixed; bottom: var(--sp-6); right: var(--sp-6); z-index: 600;
  background: linear-gradient(135deg, var(--primary) 0%, #A05A38 100%);
  color: white; border-radius: var(--r-full);
  padding: var(--sp-3) var(--sp-5); display: flex; align-items: center; gap: var(--sp-2);
  box-shadow: 0 6px 20px rgba(196,113,79,.4);
  font-weight: 700; font-size: .9rem; cursor: pointer;
  transition: all var(--t-fast);
}
.ai-bot-trigger:hover { transform: scale(1.05); box-shadow: 0 8px 24px rgba(196,113,79,.5); }
.ai-bot-icon { font-size: 1.2rem; }

.ai-drawer-overlay {
  position: fixed; inset: 0; z-index: 700;
  background: rgba(44,24,16,.3); backdrop-filter: blur(2px);
}
.ai-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 750;
  width: 400px; max-width: 90vw; background: white;
  box-shadow: var(--shadow-xl); border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  animation: slide-left .3s var(--ease);
}
@keyframes slide-left { from { transform: translateX(100%); } to { transform: translateX(0); } }

.ai-drawer-header {
  padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg);
}
.ai-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary-bg); border: 1px solid var(--primary-border);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.ai-context-pill {
  font-size: .75rem; font-weight: 600; color: var(--text-3);
  padding: var(--sp-2) var(--sp-5); background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ai-chat-messages {
  flex: 1; overflow-y: auto; padding: var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-4);
  background: var(--bg);
}
.ai-message {
  max-width: 85%; padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-lg); font-size: .88rem; line-height: 1.5;
}
.ai-message.bot {
  background: white; border: 1px solid var(--border);
  color: var(--text); border-top-left-radius: 2px;
  align-self: flex-start; box-shadow: var(--shadow-sm);
}
.ai-message.user {
  background: var(--primary); color: white;
  border-top-right-radius: 2px; align-self: flex-end;
}
.ai-message.error {
  background: var(--error-bg); color: var(--error); border-color: var(--error);
}
.ai-chat-input-area {
  padding: var(--sp-4); border-top: 1px solid var(--border);
  background: white;
}
.qnum-btn.current    { background: var(--primary); color: white; border-color: var(--primary); }
.qnum-btn.flagged    { background: var(--error-bg); color: var(--error); border-color: var(--error); }

/* ------- Mobile Bottom Navigation Bar ------- */
.mobile-bottom-bar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 500;
  height: 62px; background: rgba(250, 247, 242, 0.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(44, 24, 16, 0.06);
  align-items: center; justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1; height: 100%; color: var(--text-3); text-decoration: none;
  font-size: 0.72rem; font-weight: 600; gap: 2px;
  transition: all var(--t-fast);
}

.mobile-nav-icon {
  font-size: 1.25rem; transition: transform var(--t-fast);
}

.mobile-nav-item.active {
  color: var(--primary); font-weight: 700;
}

.mobile-nav-item.active .mobile-nav-icon {
  transform: translateY(-2px) scale(1.1);
}

@media (max-width: 768px) {
  .mobile-bottom-bar {
    display: flex;
  }
  #main-content {
    padding-bottom: 80px !important;
  }
  .ai-bot-trigger {
    bottom: 74px !important;
    right: 16px !important;
    padding: var(--sp-2) var(--sp-4) !important;
    font-size: .82rem !important;
  }
  .page-header {
    margin-bottom: var(--sp-4) !important;
  }
  .card {
    padding: var(--sp-4) !important;
  }
}

/* ------- Bulk Action Bar & Pagination ------- */
.bulk-actions-bar {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 650;
  background: var(--text); color: white; border-radius: var(--r-full);
  padding: var(--sp-3) var(--sp-6); display: flex; align-items: center; gap: var(--sp-4);
  box-shadow: 0 10px 30px rgba(44, 24, 16, 0.4);
  animation: slide-up .25s var(--ease);
}
@keyframes slide-up { from { transform: translate(-50%, 100%); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

.pagination-bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5); background: white; border: 1px solid var(--border);
  border-radius: var(--r-md); margin-top: var(--sp-4);
}

.pagination-controls {
  display: flex; align-items: center; gap: var(--sp-1);
}

.page-num-btn {
  min-width: 32px; height: 32px; padding: 0 6px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font-size: .82rem; font-weight: 600; cursor: pointer; transition: all var(--t-fast);
}

.page-num-btn.active {
  background: var(--primary); color: white; border-color: var(--primary);
}

.page-num-btn:hover:not(.active) {
  background: var(--surface);
}
