/* ============================================================
   ENCANTO BOTANICAL CASA / VENCANTO LEARNING PLATFORM
   COMPLETE DESIGN SYSTEM & CSS ARCHITECTURE
   ============================================================ */

/* 1. Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Merienda:wght@400;700;900&family=Nunito:wght@400;500;600;700;800&family=DM+Sans:wght@400;500;600;700&display=swap');

/* 2. Design Tokens & Root Variables */
:root {
  /* Primary Accents */
  --pink:        #E84A8A;
  --purple:      #7B4FA3;
  --yellow:      #F6C445;

  /* Secondary Accents */
  --jungle:      #3F8F5B;
  --leaf:        #79B84A;
  --sky:         #55B8D9;
  --orange:      #E9823A;
  --coral:       #E85D5A;
  --terracotta:  #B85C45;

  /* Backgrounds & Surfaces (Light Mode) */
  --cream:       #FFF1D0;
  --surface:     #FFF9EA;
  --surface-2:   #FFFFFF;
  --bg-main:     var(--cream);
  --bg-surface:  var(--surface);
  --bg-surface-2:var(--surface-2);
  --sidebar-bg:  #FEF5DC;

  /* Typography Colors */
  --heading:     #3B2445;
  --body:        #55445A;
  --muted:       #806F82;
  --subtle:      #AA9BAA;
  --text-heading:var(--heading);
  --text-body:   var(--body);
  --text-muted:  var(--muted);

  /* Borders & Shadows */
  --border:      #E8D6BD;
  --shadow-sm:   0 1px 4px rgba(59,36,69,.07);
  --shadow-md:   0 4px 16px rgba(59,36,69,.10);
  --shadow-lg:   0 8px 32px rgba(59,36,69,.13);
  --shadow-glow-pink:   0 0 24px rgba(232,74,138,.18);
  --shadow-glow-purple: 0 0 24px rgba(123,79,163,.18);

  /* Layout Constants */
  --sidebar-w:   260px;
  --topbar-h:    64px;

  /* Border Radii */
  --r-sm: 8px;  
  --r-md: 14px;  
  --r-lg: 20px;  
  --r-xl: 28px;  
  --r-full: 9999px;

  /* Font Families */
  --font-display: 'Merienda', cursive;   /* For Main Titles, Hero, Headers */
  --font-body:    'Nunito', sans-serif;   /* For General UI, Questions, Options */
  --font-data:    'DM Sans', sans-serif;  /* For Badges, Numbers, Stats, Timers */

  /* Gradients */
  --grad-vencanto: linear-gradient(90deg, #E84A8A 0%, #7B4FA3 50%, #F6C445 100%);
  --grad-sunset:   linear-gradient(135deg, #E84A8A 0%, #7B4FA3 100%);
  --grad-botanical:linear-gradient(135deg, #3F8F5B 0%, #79B84A 100%);
  --grad-gold:     linear-gradient(135deg, #F6C445 0%, #E9823A 100%);
}

/* Dark Mode Overrides (Triggered via body.dark or body[data-theme="dark"]) */
body.dark,
body[data-theme="dark"] {
  --bg-main:      #17151C;
  --bg-surface:   #211D27;
  --bg-surface-2: #29232F;
  --sidebar-bg:   #1D1923;
  --text-heading: #FFF4D8;
  --text-body:    #E9DDE8;
  --text-muted:   #BFAFC0;
  --border:       #3A3040;
  --shadow-sm:    0 1px 4px rgba(0,0,0,.35);
  --shadow-md:    0 4px 16px rgba(0,0,0,.45);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.55);
}

/* Base & Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--text-body);
  background-color: var(--bg-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ambient Sparkle Field */
.sparkle-field {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(232, 74, 138, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(123, 79, 163, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(246, 196, 69, 0.05) 0%, transparent 40%);
}

/* Typography */
h1, h2, h3, .font-display { font-family: var(--font-display); color: var(--text-heading); line-height: 1.25; }
h4, h5, h6 { font-family: var(--font-body); font-weight: 700; color: var(--text-heading); }
p { margin-bottom: 0.75rem; }
a { color: var(--purple); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--pink); }
button { cursor: pointer; border: none; outline: none; font-family: var(--font-body); transition: all 0.2s ease; }

/* App Shell */
.app-layout { display: flex; min-height: 100vh; position: relative; z-index: 1; }
.sidebar { width: var(--sidebar-w); height: 100vh; position: fixed; top: 0; left: 0; background-color: var(--sidebar-bg); border-right: 1.5px solid var(--border); display: flex; flex-direction: column; z-index: 50; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease; overflow-y: auto; }
.sidebar-header { padding: 24px 20px 16px; display: flex; align-items: center; justify-content: space-between; }
.logo-box { display: flex; align-items: center; gap: 12px; }
.logo-icon-wrap { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--grad-sunset); display: flex; align-items: center; justify-content: center; color: #FFF; box-shadow: var(--shadow-glow-pink); }
.logo-icon-wrap i, .logo-icon-wrap svg { width: 24px; height: 24px; }
.logo-text { display: flex; flex-direction: column; }
.logo-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--text-heading); letter-spacing: -0.01em; }
.logo-subtitle { font-family: var(--font-data); font-size: 0.72rem; font-weight: 700; color: var(--pink); text-transform: uppercase; letter-spacing: 0.08em; }
.mobile-close-sidebar { display: none; background: none; color: var(--text-muted); padding: 6px; border-radius: var(--r-sm); }

.sidebar-user-progress { padding: 12px 20px; margin: 0 12px 16px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); }
.progress-label-sm { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-data); font-size: 0.75rem; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
.progress-bar-bg { width: 100%; height: 8px; background: rgba(123, 79, 163, 0.12); border-radius: var(--r-full); overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--grad-vencanto); border-radius: var(--r-full); transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1); }

.nav-menu { flex: 1; padding: 0 12px 20px; display: flex; flex-direction: column; gap: 4px; }
.nav-section-label { font-family: var(--font-data); font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); padding: 16px 12px 6px; }
.nav-item { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: var(--r-md); font-family: var(--font-body); font-weight: 600; font-size: 0.92rem; color: var(--text-body); position: relative; transition: all 0.2s ease; }
.nav-item i, .nav-item svg { width: 20px; height: 20px; color: var(--text-muted); transition: color 0.2s ease, transform 0.2s ease; }
.nav-item:hover { background: var(--bg-surface); color: var(--purple); transform: translateX(4px); }
.nav-item:hover i, .nav-item:hover svg { color: var(--purple); }
.nav-item.active { background: var(--bg-surface-2); color: var(--purple); font-weight: 700; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.nav-item.active i, .nav-item.active svg { color: var(--pink); transform: scale(1.1); }
.nav-badge-pill { margin-left: auto; font-family: var(--font-data); font-size: 0.72rem; font-weight: 800; padding: 2px 8px; border-radius: var(--r-full); background: var(--pink); color: #FFF; }

.main-wrapper { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.topbar { height: var(--topbar-h); position: sticky; top: 0; background: rgba(255, 249, 234, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1.5px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 32px; z-index: 40; }
body.dark .topbar, body[data-theme="dark"] .topbar { background: rgba(33, 29, 39, 0.85); }
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.mobile-menu-btn { display: none; background: var(--bg-surface); border: 1px solid var(--border); padding: 8px; border-radius: var(--r-sm); color: var(--text-heading); }
.topbar-search-btn { display: flex; align-items: center; gap: 10px; background: var(--bg-surface); border: 1.5px solid var(--border); padding: 8px 16px; border-radius: var(--r-full); color: var(--text-muted); font-family: var(--font-body); font-size: 0.88rem; transition: all 0.2s ease; }
.topbar-search-btn:hover { background: var(--bg-surface-2); border-color: var(--purple); color: var(--text-heading); box-shadow: var(--shadow-sm); }
.topbar-search-btn kbd { font-family: var(--font-data); font-size: 0.72rem; background: var(--border); color: var(--text-heading); padding: 2px 6px; border-radius: 4px; }
.theme-toggle-btn { display: flex; align-items: center; gap: 8px; background: var(--bg-surface); border: 1.5px solid var(--border); padding: 8px 16px; border-radius: var(--r-full); font-family: var(--font-data); font-weight: 700; font-size: 0.85rem; color: var(--text-heading); }
.theme-toggle-btn:hover { background: var(--bg-surface-2); border-color: var(--yellow); color: var(--purple); box-shadow: var(--shadow-sm); }
.content-area { flex: 1; padding: 32px; max-width: 1200px; width: 100%; margin: 0 auto; }
.view-panel { display: none; animation: fadeIn 0.3s ease-out; }
.view-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Cards */
.card { background-color: var(--bg-surface); border: 1.5px solid var(--border); border-radius: var(--r-xl); padding: 28px; position: relative; overflow: hidden; box-shadow: var(--shadow-sm); transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.card:hover { box-shadow: var(--shadow-md); border-color: rgba(123, 79, 163, 0.3); }
.card::before, .hero-card::before, .cbt-setup-card::before, .cbt-active-container::before, .cbt-result-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--grad-vencanto); z-index: 2; }
.hero-card { background: var(--bg-surface-2); border: 1.5px solid var(--border); border-radius: var(--r-xl); padding: 36px 32px; margin-bottom: 32px; position: relative; overflow: hidden; box-shadow: var(--shadow-md); }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-data); font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--pink); background: rgba(232, 74, 138, 0.1); padding: 4px 14px; border-radius: var(--r-full); margin-bottom: 14px; }
.hero-title { font-size: 2.2rem; font-weight: 900; color: var(--text-heading); margin-bottom: 10px; }
.hero-subtitle { font-size: 1.05rem; color: var(--text-muted); max-width: 680px; }

/* Dashboard Stats Grid */
.dashboard-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat-card { display: flex; align-items: center; gap: 18px; padding: 22px 24px; }
.stat-icon-wrap { width: 52px; height: 52px; border-radius: var(--r-lg); display: flex; align-items: center; justify-content: center; color: #FFF; }
.stat-icon-purple { background: var(--grad-sunset); box-shadow: var(--shadow-glow-purple); }
.stat-icon-green { background: var(--grad-botanical); }
.stat-icon-gold { background: var(--grad-gold); }
.stat-info { display: flex; flex-direction: column; }
.stat-val { font-family: var(--font-data); font-size: 1.8rem; font-weight: 800; color: var(--text-heading); line-height: 1.1; }
.stat-label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }

/* Dashboard Sections Grid */
.dashboard-sections-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-top: 20px; }
.sec-card { background: var(--bg-surface-2); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 22px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; transition: all 0.2s ease; position: relative; overflow: hidden; }
.sec-card:hover { border-color: var(--purple); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.sec-code { font-family: var(--font-data); font-size: 0.72rem; font-weight: 800; color: var(--pink); text-transform: uppercase; margin-bottom: 6px; display: inline-block; }
.sec-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--text-heading); margin-bottom: 8px; }
.sec-desc { font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 16px; }
.sec-footer { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-data); font-size: 0.78rem; font-weight: 700; color: var(--purple); border-top: 1px dashed var(--border); padding-top: 12px; }

/* Badges & Buttons */
.badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-data); font-weight: 800; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 4px 12px; border-radius: var(--r-full); }
.badge-purple { background: rgba(123, 79, 163, 0.12); color: var(--purple); }
.badge-pink { background: rgba(232, 74, 138, 0.12); color: var(--pink); }
.badge-green, .badge-jungle { background: #EAF5E8; color: var(--jungle); }
.badge-amber, .badge-doubtful { background: #FEF3C7; color: #92400E; border: 1px solid #F59E0B; }
.badge-coral { background: #FEE2E2; color: var(--coral); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-data); font-weight: 700; font-size: 0.92rem; padding: 10px 20px; border-radius: var(--r-full); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.btn-primary { background: var(--grad-sunset); color: #FFF; box-shadow: var(--shadow-glow-pink); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(232, 74, 138, 0.3); color: #FFF; }
.btn-outline { background: var(--bg-surface); border: 1.5px solid var(--border); color: var(--text-heading); }
.btn-outline:hover { background: var(--bg-surface-2); border-color: var(--purple); color: var(--purple); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-xs { padding: 4px 10px; font-size: 0.75rem; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }

.radio-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-tab { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-surface); border: 1.5px solid var(--border); padding: 8px 16px; border-radius: var(--r-full); font-family: var(--font-data); font-weight: 700; font-size: 0.85rem; color: var(--text-body); transition: all 0.2s ease; }
.radio-tab:hover { border-color: var(--purple); background: var(--bg-surface-2); color: var(--purple); }
.radio-tab.active { background: var(--purple); border-color: var(--purple); color: #FFF; box-shadow: var(--shadow-glow-purple); }

/* Topic Picker Grid */
.cbt-topic-picker-box { background: var(--bg-surface-2); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 20px; }
.cbt-topic-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cbt-group-label { font-family: var(--font-data); font-size: 0.85rem; font-weight: 800; text-transform: uppercase; color: var(--text-heading); display: flex; align-items: center; gap: 6px; }
.cbt-topic-search-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; background: var(--bg-surface); border: 1.5px solid var(--border); padding: 8px 14px; border-radius: var(--r-full); }
.cbt-topic-search-wrap input { flex: 1; background: transparent; border: none; outline: none; font-family: var(--font-body); font-size: 0.9rem; color: var(--text-heading); }
.cbt-topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; max-height: 380px; overflow-y: auto; padding-right: 6px; }
.cbt-topic-card, .topic-select-card { display: flex; align-items: center; gap: 12px; background: var(--bg-surface); border: 1.5px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; cursor: pointer; transition: all 0.2s ease; user-select: none; }
.cbt-topic-card:hover, .topic-select-card:hover { border-color: var(--purple); background: var(--bg-surface-2); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.cbt-topic-card.active, .topic-select-card.active { border-color: var(--purple); background: rgba(123, 79, 163, 0.08); box-shadow: 0 0 0 1px var(--purple); }
.cbt-topic-check-square, .topic-checkbox-box { width: 22px; height: 22px; min-width: 22px; border-radius: var(--r-sm); border: 2px solid var(--border); background: var(--bg-surface-2); display: flex; align-items: center; justify-content: center; font-family: var(--font-data); font-weight: 800; font-size: 0.85rem; color: #FFF; transition: all 0.2s ease; }
.cbt-topic-card.active .cbt-topic-check-square, .topic-select-card.active .topic-checkbox-box { background: var(--purple); border-color: var(--purple); }
.cbt-topic-card-body { flex: 1; min-width: 0; }
.cbt-topic-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.cbt-topic-code-tag { font-family: var(--font-data); font-size: 0.68rem; font-weight: 800; color: var(--pink); text-transform: uppercase; }
.cbt-topic-count-pill { font-family: var(--font-data); font-size: 0.68rem; font-weight: 700; color: var(--text-muted); }
.cbt-topic-title-text { display: block; font-size: 0.88rem; font-weight: 700; color: var(--text-heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Stimulus Passage Box */
.tka-stimulus-box, .cbt-stimulus-box { background: var(--bg-surface); border: 1.5px solid var(--border); border-left: 5px solid var(--purple); border-radius: var(--r-lg); padding: 20px 24px; margin-bottom: 20px; }
.stimulus-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.stimulus-label-badge { display: flex; align-items: center; gap: 8px; font-family: var(--font-data); font-weight: 800; font-size: 0.85rem; color: var(--purple); }
.stimulus-font-scaler { display: flex; align-items: center; gap: 4px; }
.font-scaler-btn { background: var(--bg-surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 2px 8px; font-family: var(--font-data); font-weight: 700; font-size: 0.75rem; color: var(--text-heading); }
.font-scaler-btn:hover { background: var(--purple); color: #FFF; border-color: var(--purple); }
.cbt-stimulus-content { font-size: 0.95rem; line-height: 1.8; color: var(--text-body); text-align: justify; }
.stimulus-paragraph-tag, .passage-para-tag { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-data); font-size: 0.72rem; font-weight: 800; color: var(--pink); background: rgba(232, 74, 138, 0.1); padding: 2px 8px; border-radius: var(--r-sm); margin-right: 6px; }

/* CBT Exam Runner */
.cbt-header-bar { display: flex; justify-content: space-between; align-items: center; background: var(--bg-surface-2); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 14px 20px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.cbt-timer-box { display: flex; align-items: center; gap: 8px; font-family: var(--font-data); font-weight: 800; font-size: 1.1rem; color: var(--purple); background: rgba(123, 79, 163, 0.1); padding: 6px 16px; border-radius: var(--r-full); }
.cbt-timer-box.warning { color: var(--coral); background: rgba(232, 93, 90, 0.15); animation: pulse 1s infinite alternate; }
.cbt-question-card { background: var(--bg-surface-2); border: 1.5px solid var(--border); border-radius: var(--r-xl); padding: 32px; margin-bottom: 20px; box-shadow: var(--shadow-sm); position: relative; }
.cbt-q-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.cbt-q-num-tag { font-family: var(--font-data); font-weight: 800; font-size: 0.85rem; color: var(--pink); text-transform: uppercase; }
.cbt-question-text { font-size: 1.12rem; font-weight: 700; color: var(--text-heading); line-height: 1.6; margin-bottom: 24px; }

.cbt-options-list { display: flex; flex-direction: column; gap: 12px; }
.cbt-opt-btn { display: flex; align-items: flex-start; gap: 14px; background: var(--bg-surface); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 14px 18px; text-align: left; font-size: 0.95rem; color: var(--text-body); transition: all 0.2s ease; width: 100%; }
.cbt-opt-btn:hover { border-color: var(--purple); background: var(--bg-surface-2); transform: translateX(4px); }
.cbt-opt-btn.selected { background: rgba(123, 79, 163, 0.1); border-color: var(--purple); box-shadow: 0 0 0 1px var(--purple); }
.cbt-opt-badge { width: 32px; height: 32px; min-width: 32px; border-radius: var(--r-full); border: 2px solid var(--border); background: var(--bg-surface-2); display: flex; align-items: center; justify-content: center; font-family: var(--font-data); font-weight: 800; font-size: 0.85rem; color: var(--text-heading); transition: all 0.2s ease; }
.cbt-opt-btn.selected .cbt-opt-badge { background: var(--purple); border-color: var(--purple); color: #FFF; }
.cbt-opt-text { flex: 1; padding-top: 4px; line-height: 1.5; }

/* Matrix Table */
.statement-matrix-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1.5px solid var(--border); border-radius: var(--r-lg); overflow: hidden; margin-top: 14px; }
.statement-matrix-table th { background: rgba(123, 79, 163, 0.08); font-family: var(--font-data); font-size: 0.82rem; font-weight: 800; text-transform: uppercase; color: var(--purple); padding: 12px 16px; border-bottom: 1.5px solid var(--border); }
.statement-matrix-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 0.92rem; color: var(--text-body); }
.statement-matrix-table tr:last-child td { border-bottom: none; }
.matrix-toggle-group { display: flex; gap: 6px; justify-content: center; }
.matrix-btn { padding: 6px 12px; border-radius: var(--r-md); font-family: var(--font-data); font-weight: 800; font-size: 0.75rem; background: var(--bg-surface); border: 1.5px solid var(--border); color: var(--text-muted); }
.matrix-btn.btn-true:hover, .matrix-btn.btn-true.active { background: var(--jungle); border-color: var(--jungle); color: #FFF; }
.matrix-btn.btn-false:hover, .matrix-btn.btn-false.active { background: var(--coral); border-color: var(--coral); color: #FFF; }

/* CBT Footer */
.cbt-footer-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; }
.cbt-flag-btn.flagged { background: #FEF3C7; border-color: #F59E0B; color: #92400E; }

/* Modal Palette */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(33, 29, 39, 0.6); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-card { background: var(--bg-surface-2); border: 1.5px solid var(--border); border-radius: var(--r-xl); padding: 28px; max-width: 600px; width: 90%; box-shadow: var(--shadow-lg); }
.palette-circle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 10px; max-height: 360px; overflow-y: auto; padding: 12px 0; }
.palette-num-btn { width: 42px; height: 42px; border-radius: var(--r-full); border: 1.5px solid var(--border); background: var(--bg-surface); font-family: var(--font-data); font-weight: 800; font-size: 0.85rem; color: var(--text-heading); display: flex; align-items: center; justify-content: center; position: relative; }
.palette-num-btn.answered { background: var(--purple); border-color: var(--purple); color: #FFF; }
.palette-num-btn.flagged::after { content: '•'; position: absolute; top: 0px; right: 4px; color: #F59E0B; font-size: 1.4rem; }
.palette-num-btn.current { box-shadow: 0 0 0 3px var(--pink); }

/* Result & Review */
.cbt-result-card { background: var(--bg-surface-2); border: 1.5px solid var(--border); border-radius: var(--r-xl); padding: 36px 32px; text-align: center; margin-bottom: 32px; }
.result-score-circle { width: 140px; height: 140px; border-radius: var(--r-full); background: var(--bg-surface); border: 6px solid var(--purple); display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto 20px; box-shadow: var(--shadow-glow-purple); }
.score-num { font-family: var(--font-data); font-size: 2.4rem; font-weight: 900; color: var(--purple); line-height: 1; }
.score-max { font-family: var(--font-data); font-size: 0.85rem; font-weight: 700; color: var(--text-muted); }
.result-stats-row { display: flex; justify-content: center; gap: 24px; margin: 24px 0; flex-wrap: wrap; }
.stat-item-box { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 20px; min-width: 120px; }
.stat-item-num { font-family: var(--font-data); font-size: 1.3rem; font-weight: 800; color: var(--text-heading); }
.stat-item-label { font-size: 0.78rem; color: var(--text-muted); }

.cbt-pembahasan-card { background: var(--bg-surface-2); border: 1.5px solid var(--border); border-left: 5px solid var(--border); border-radius: var(--r-lg); padding: 24px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.cbt-pembahasan-card.correct { border-left-color: var(--jungle); }
.cbt-pembahasan-card.wrong { border-left-color: var(--coral); }
.cbt-pembahasan-card.blank { border-left-color: #9CA3AF; }
.cbt-pem-opt { padding: 8px 12px; border-radius: var(--r-sm); margin-bottom: 6px; font-size: 0.9rem; }
.cbt-pem-opt.correct-key { background: #EAF5E8; color: var(--jungle); font-weight: 700; border: 1px solid rgba(63, 143, 91, 0.3); }
.cbt-pem-opt.user-pick { background: #FEE2E2; color: var(--coral); font-weight: 700; border: 1px solid rgba(232, 93, 90, 0.3); }
.pembahasan-box, .quiz-explanation { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px 20px; margin-top: 14px; font-size: 0.92rem; color: var(--text-body); }

/* Flashcard */
.flashcard-wrapper { perspective: 1000px; max-width: 680px; margin: 0 auto 24px; }
.flashcard-inner { width: 100%; min-height: 280px; position: relative; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer; }
.flashcard-inner.flipped { transform: rotateY(180deg); }
.flashcard-face { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: var(--r-xl); padding: 36px 32px; display: flex; flex-direction: column; justify-content: space-between; background: var(--bg-surface-2); border: 2px solid var(--border); box-shadow: var(--shadow-md); }
.flashcard-back { transform: rotateY(180deg); background: var(--bg-surface); }
.fc-card-content { font-size: 1.15rem; font-weight: 600; color: var(--text-heading); text-align: center; margin: auto 0; }

/* Accordion Materi */
.accordion-sec { margin-bottom: 24px; }
.sec-acc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1.5px solid var(--border); }
.acc-section-code { font-family: var(--font-data); font-size: 0.75rem; font-weight: 800; color: var(--pink); text-transform: uppercase; }
.sec-acc-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--text-heading); }
.materi-items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.materi-card-item { background: var(--bg-surface-2); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; cursor: pointer; transition: all 0.2s ease; display: flex; flex-direction: column; justify-content: space-between; min-height: 120px; }
.materi-card-item:hover { border-color: var(--purple); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.materi-badge-code { font-family: var(--font-data); font-size: 0.7rem; font-weight: 800; color: var(--purple); }
.materi-item-title { font-size: 0.98rem; font-weight: 700; color: var(--text-heading); margin: 8px 0 12px; }
.materi-item-footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; font-weight: 700; color: var(--text-muted); }
.materi-card-item.completed .status-indicator { color: var(--jungle); font-weight: 800; }

/* Toast & Helpers */
.toast-container { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--bg-surface-2); border: 1.5px solid var(--border); border-left: 4px solid var(--purple); padding: 12px 18px; border-radius: var(--r-md); box-shadow: var(--shadow-lg); font-size: 0.9rem; color: var(--text-heading); animation: slideIn 0.3s ease; }
.toast-warning { border-left-color: var(--coral); }
@keyframes slideIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.hidden { display: none !important; }

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .mobile-close-sidebar { display: block; }
  .main-wrapper { margin-left: 0; }
  .mobile-menu-btn { display: block; }
  .content-area { padding: 20px 16px; }
  .cbt-topic-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   ADDITIONAL COMPONENT STYLES (PROGRESS, QUICK REVIEW, MISTAKE BANK, SEARCH)
   ============================================================ */

/* Progress Section Cards */
.sp-card { background: var(--bg-surface-2); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 22px; margin-bottom: 16px; transition: all 0.2s ease; }
.sp-card:hover { border-color: var(--purple); box-shadow: var(--shadow-sm); }
.sp-card.done { border-color: var(--jungle); }
.sp-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sp-title-wrap { display: flex; flex-direction: column; gap: 2px; }
.sp-title { font-family: var(--font-display); font-size: 1.15rem; color: var(--text-heading); }
.sp-stats-badge { display: flex; align-items: center; gap: 8px; }
.sp-count-pill { font-family: var(--font-data); font-size: 0.75rem; font-weight: 700; color: var(--text-muted); background: var(--bg-surface); border: 1px solid var(--border); padding: 2px 8px; border-radius: var(--r-full); }
.sp-pct-badge { font-family: var(--font-data); font-size: 0.78rem; font-weight: 800; color: var(--purple); background: rgba(123, 79, 163, 0.12); padding: 2px 10px; border-radius: var(--r-full); }
.sp-pct-badge.complete { color: var(--jungle); background: #EAF5E8; }
.sp-progress-bar { width: 100%; height: 8px; background: rgba(123, 79, 163, 0.1); border-radius: var(--r-full); overflow: hidden; margin-bottom: 14px; }
.sp-progress-fill { height: 100%; background: var(--grad-vencanto); border-radius: var(--r-full); transition: width 0.4s ease; }
.sp-topic-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-topic-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-surface); border: 1px solid var(--border); padding: 4px 10px; border-radius: var(--r-full); font-size: 0.8rem; font-weight: 600; color: var(--text-body); cursor: pointer; transition: all 0.2s ease; }
.sp-topic-chip:hover { border-color: var(--purple); color: var(--purple); transform: translateY(-1px); }
.sp-topic-chip.completed { background: #EAF5E8; border-color: rgba(63, 143, 91, 0.4); color: var(--jungle); font-weight: 700; }
.sp-topic-check { font-family: var(--font-data); font-weight: 800; font-size: 0.75rem; }

/* Quick Review Cards */
.qr-card { background: var(--bg-surface-2); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 20px; transition: all 0.2s ease; position: relative; overflow: hidden; }
.qr-card:hover { border-color: var(--purple); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.qr-cat { font-family: var(--font-data); font-size: 0.7rem; font-weight: 800; color: var(--pink); text-transform: uppercase; margin-bottom: 6px; display: inline-block; }
.qr-title { font-family: var(--font-display); font-size: 1.08rem; color: var(--text-heading); margin-bottom: 6px; }
.qr-desc { font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; }

/* Mistake Bank Cards */
.mistake-card { background: var(--bg-surface-2); border: 1.5px solid var(--border); border-left: 5px solid var(--coral); border-radius: var(--r-lg); padding: 24px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.mistake-card.learning { border-left-color: var(--yellow); }
.mistake-card.mastered { border-left-color: var(--jungle); }
.mistake-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.mst-tag { font-family: var(--font-data); font-size: 0.72rem; font-weight: 800; padding: 3px 10px; border-radius: var(--r-full); text-transform: uppercase; }
.mst-badge-unread { background: #FEE2E2; color: var(--coral); }
.mst-badge-learning { background: #FEF3C7; color: #92400E; }
.mst-badge-mastered { background: #EAF5E8; color: var(--jungle); }
.mistake-question-text { font-size: 1.05rem; font-weight: 700; color: var(--text-heading); margin-bottom: 14px; line-height: 1.5; }
.mistake-compare-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-bottom: 14px; }
.mst-opt { padding: 10px 14px; border-radius: var(--r-md); font-size: 0.88rem; line-height: 1.4; }
.mst-opt.user-wrong { background: #FEE2E2; border: 1px solid rgba(232, 93, 90, 0.3); color: var(--coral); }
.mst-opt.correct-key { background: #EAF5E8; border: 1px solid rgba(63, 143, 91, 0.3); color: var(--jungle); }
.mistake-card-actions { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; border-top: 1px dashed var(--border); flex-wrap: wrap; gap: 8px; }

/* Search Results */
.search-result-item { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 16px; cursor: pointer; transition: all 0.2s ease; }
.search-result-item:hover { border-color: var(--purple); background: var(--bg-surface-2); transform: translateX(3px); }
.search-result-item h4 { font-size: 0.95rem; color: var(--text-heading); margin: 2px 0 4px; }
.search-result-item p { font-size: 0.82rem; color: var(--text-muted); margin: 0; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Sub-Topics & Goals in Detail */
.goals-box { background: rgba(63, 143, 91, 0.08); border-left: 4px solid var(--jungle); padding: 16px 20px; border-radius: var(--r-md); margin-bottom: 16px; }
.goals-list { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-top: 8px; font-size: 0.92rem; }
.goals-list li { display: flex; align-items: flex-start; gap: 8px; }
.goal-bullet { color: var(--jungle); font-weight: 800; }
.keywords-box { background: rgba(123, 79, 163, 0.08); border-left: 4px solid var(--purple); padding: 16px 20px; border-radius: var(--r-md); margin-bottom: 16px; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip-keyword { background: var(--bg-surface-2); border: 1px solid var(--border); color: var(--purple); font-size: 0.8rem; font-weight: 700; padding: 3px 10px; border-radius: var(--r-full); }
.subtopics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 14px; margin-bottom: 20px; }
.subtopic-card { background: var(--bg-surface-2); border: 1.5px solid var(--border); border-radius: var(--r-md); padding: 16px; }
.subtopic-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.subtopic-num { font-family: var(--font-data); font-size: 0.72rem; font-weight: 800; color: var(--pink); background: rgba(232, 74, 138, 0.1); padding: 2px 6px; border-radius: 4px; }
.subtopic-title { font-size: 0.95rem; font-weight: 700; color: var(--text-heading); }
.subtopic-text { font-size: 0.88rem; color: var(--text-body); line-height: 1.5; }
.jebakan-box { background: #FEF3C7; border-left: 4px solid #F59E0B; padding: 16px 20px; border-radius: var(--r-md); margin-bottom: 16px; color: #92400E; }
.jebakan-box h4 { color: #92400E; margin-bottom: 6px; }
.tka-focus-box { background: rgba(232, 74, 138, 0.08); border-left: 4px solid var(--pink); padding: 16px 20px; border-radius: var(--r-md); margin-bottom: 16px; }
.tka-focus-box h4 { color: var(--pink); margin-bottom: 6px; }
.quick-check-card { background: var(--bg-surface-2); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 24px; margin-top: 24px; }
.qc-header-wrap { margin-bottom: 16px; }
.qc-main-title { font-family: var(--font-display); font-size: 1.2rem; color: var(--text-heading); margin: 4px 0; }
.qc-item { padding: 16px 0; border-bottom: 1px dashed var(--border); }
.qc-item:last-child { border-bottom: none; }
.qc-question { font-weight: 700; font-size: 0.98rem; color: var(--text-heading); margin-bottom: 12px; }
.qc-options { display: flex; flex-direction: column; gap: 8px; }
.qc-opt-btn { display: flex; align-items: center; gap: 10px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 14px; text-align: left; font-size: 0.9rem; color: var(--text-body); transition: all 0.2s ease; }
.qc-opt-btn:hover:not(:disabled) { border-color: var(--purple); background: var(--bg-surface-2); }
.qc-opt-btn.correct { background: #EAF5E8; border-color: var(--jungle); color: var(--jungle); font-weight: 700; }
.qc-opt-btn.wrong { background: #FEE2E2; border-color: var(--coral); color: var(--coral); }
.qc-opt-badge { width: 24px; height: 24px; min-width: 24px; border-radius: var(--r-full); background: var(--bg-surface-2); border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; font-family: var(--font-data); font-weight: 800; font-size: 0.75rem; }
.qc-explanation { background: var(--bg-surface); border-left: 3px solid var(--jungle); border-radius: var(--r-sm); padding: 10px 14px; margin-top: 10px; font-size: 0.85rem; color: var(--text-body); }
.detail-hero-bar { margin-bottom: 8px; }
.detail-section-tag { font-family: var(--font-data); font-size: 0.75rem; font-weight: 800; color: var(--pink); text-transform: uppercase; }
.detail-title { font-size: 1.8rem; margin-bottom: 16px; }
.detail-overview { display: flex; gap: 14px; align-items: flex-start; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px 20px; margin-bottom: 20px; font-size: 0.95rem; }
.overview-icon { color: var(--purple); width: 28px; height: 28px; min-width: 28px; }
.materi-meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-bottom: 20px; }

/* ============================================================
   VENCANTO CANDLE LOGO & VECTOR ICON STYLES
   ============================================================ */
.sidebar-vencanto-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(232, 74, 138, 0.28));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sidebar-vencanto-logo:hover {
  transform: scale(1.1) rotate(4deg);
}

.topbar-vencanto-logo-wrap {
  display: flex;
  align-items: center;
  margin-left: 8px;
  padding: 3px 6px;
  background: rgba(255, 241, 208, 0.5);
  border: 1px solid rgba(232, 214, 189, 0.6);
  border-radius: var(--r-full);
  backdrop-filter: blur(8px);
}
body.dark .topbar-vencanto-logo-wrap {
  background: rgba(33, 29, 39, 0.6);
  border-color: rgba(58, 48, 64, 0.6);
}

.topbar-vencanto-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(246, 196, 69, 0.35));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.topbar-vencanto-logo:hover {
  transform: scale(1.12);
}

/* Vector Icon Display Guarantees */
.nav-item svg, .btn svg, .badge svg, .stat-icon-wrap svg, .hero-eyebrow svg, .cbt-group-label svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.nav-item svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}
.nav-item:hover svg {
  transform: scale(1.1);
}

/* Sidebar Overlay for Mobile Drawer */
.sidebar-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(23, 21, 28, 0.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 45; display: none; }
.sidebar-overlay.active { display: block !important; }

/* Guaranteed View Display Rules */
.view-panel { display: none; }
.view-panel.active { display: block !important; }

/* ============================================================
   DARK THEME SYSTEM ARCHITECTURE
   ============================================================ */
body.dark, body[data-theme="dark"], html.dark, html[data-theme="dark"] {
  background-color: #17151C !important;
  color: #E9DDE8 !important;
  --bg-main:      #17151C;
  --bg-surface:   #211D27;
  --bg-surface-2: #29232F;
  --sidebar-bg:   #1D1923;
  --text-heading: #FFF4D8;
  --text-body:    #E9DDE8;
  --text-muted:   #BFAFC0;
  --border:       #3A3040;
  --shadow-sm:    0 1px 4px rgba(0,0,0,.35);
  --shadow-md:    0 4px 16px rgba(0,0,0,.45);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.55);
}

body.dark .sidebar, body[data-theme="dark"] .sidebar {
  background-color: #1D1923 !important;
  border-right: 1.5px solid #3A3040 !important;
}

body.dark .topbar, body[data-theme="dark"] .topbar {
  background: rgba(29, 25, 35, 0.9) !important;
  border-bottom: 1.5px solid #3A3040 !important;
}

body.dark .card, body.dark .hero-card, body.dark .sec-card, body.dark .cbt-topic-picker-box, body.dark .cbt-question-card, body.dark .cbt-result-card, body.dark .modal-card, body.dark .qr-card, body.dark .sp-card, body.dark .mistake-card, body.dark .stat-card {
  background-color: #211D27 !important;
  border-color: #3A3040 !important;
  color: #E9DDE8 !important;
}

body.dark .cbt-topic-card, body.dark .topic-select-card, body.dark .cbt-opt-btn, body.dark .qc-opt-btn, body.dark .search-result-item, body.dark .detail-overview, body.dark .subtopic-card {
  background-color: #29232F !important;
  border-color: #3A3040 !important;
  color: #E9DDE8 !important;
}

body.dark .nav-item {
  color: #BFAFC0 !important;
}
body.dark .nav-item:hover, body.dark .nav-item.active {
  background-color: #29232F !important;
  color: #FFF4D8 !important;
  border-color: #7B4FA3 !important;
}

body.dark .theme-toggle-btn, body.dark .topbar-search-btn, body.dark .font-scaler-btn, body.dark .radio-tab, body.dark .btn-outline, body.dark .cbt-topic-search-wrap, body.dark .sidebar-user-progress {
  background-color: #29232F !important;
  border-color: #3A3040 !important;
  color: #FFF4D8 !important;
}

body.dark h1, body.dark h2, body.dark h3, body.dark h4, body.dark h5, body.dark h6, body.dark .stat-val, body.dark .hero-title, body.dark .detail-title {
  color: #FFF4D8 !important;
}

body.dark .tka-stimulus-box, body.dark .cbt-stimulus-box, body.dark .pembahasan-box, body.dark .quiz-explanation, body.dark .cbt-header-bar {
  background-color: #25202D !important;
  border-color: #3A3040 !important;
  border-left-color: #7B4FA3 !important;
  color: #E9DDE8 !important;
}

/* ============================================================
   CONTOH SOAL: STRUCTURED 2-COLUMN CASING STYLES
   ============================================================ */
.contoh-soal-list-wrap { display: flex; flex-direction: column; gap: 24px; }
.contoh-soal-card { background: var(--bg-surface-2); border: 1.5px solid var(--border); border-radius: var(--r-xl); padding: 26px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.contoh-soal-card:hover { box-shadow: var(--shadow-md); border-color: rgba(123, 79, 163, 0.4); }
.cs-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1.5px solid var(--border); }
.cs-badge-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cs-topic-badge { font-family: var(--font-data); font-size: 0.78rem; font-weight: 700; color: var(--purple); background: rgba(123, 79, 163, 0.1); padding: 3px 10px; border-radius: var(--r-full); }

/* 2-Column Grid for Questions and Answers */
.cs-two-columns { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; margin-bottom: 18px; }
@media (max-width: 860px) { .cs-two-columns { grid-template-columns: 1fr; } }

/* Column 1: Question Box */
.cs-col-question { background: var(--bg-surface); border: 1.5px solid var(--border); border-left: 5px solid var(--purple); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.cs-col-label { display: flex; align-items: center; gap: 8px; font-family: var(--font-data); font-size: 0.76rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--purple); }
.cs-col-answers .cs-col-label { color: var(--pink); }
.cs-stimulus-box { background: rgba(123, 79, 163, 0.06); border: 1px dashed var(--border); border-radius: var(--r-md); padding: 14px; font-size: 0.9rem; line-height: 1.6; color: var(--text-body); }
.cs-question-text { font-size: 1.02rem; font-weight: 700; color: var(--text-heading); line-height: 1.6; }

/* Column 2: Answers Box */
.cs-col-answers { background: var(--bg-surface); border: 1.5px solid var(--border); border-left: 5px solid var(--pink); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.cs-options-grid { display: flex; flex-direction: column; gap: 10px; }
.cs-opt-card { display: flex; align-items: flex-start; gap: 12px; background: var(--bg-surface-2); border: 1.5px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; transition: all 0.2s ease; }
.cs-opt-card.key-answer { background: #EAF5E8; border: 2px solid #3F8F5B; box-shadow: 0 2px 10px rgba(63, 143, 91, 0.18); }
body.dark .cs-opt-card.key-answer { background: #182B1E !important; border-color: #3F8F5B !important; }
.cs-opt-badge { width: 28px; height: 28px; min-width: 28px; border-radius: var(--r-full); border: 1.5px solid var(--border); background: var(--bg-surface); display: flex; align-items: center; justify-content: center; font-family: var(--font-data); font-weight: 800; font-size: 0.8rem; color: var(--text-heading); }
.cs-opt-badge.key { background: #3F8F5B; border-color: #3F8F5B; color: #FFF; }
.cs-opt-content { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.cs-opt-text { font-size: 0.9rem; color: var(--text-body); line-height: 1.45; }
.cs-opt-card.key-answer .cs-opt-text { color: #1E5128; font-weight: 700; }
body.dark .cs-opt-card.key-answer .cs-opt-text { color: #85E39C !important; }
.cs-key-pill { display: inline-flex; align-items: center; gap: 5px; width: fit-content; background: #3F8F5B; color: #FFF; font-family: var(--font-data); font-size: 0.72rem; font-weight: 800; padding: 2px 10px; border-radius: var(--r-full); margin-top: 2px; }

/* Pembahasan Box in Contoh Soal */
.cs-pembahasan-wrap { margin-top: 10px; }
.cs-toggle-pem-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--bg-surface); border: 1.5px solid var(--border); border-radius: var(--r-full); padding: 8px 18px; font-family: var(--font-data); font-weight: 700; font-size: 0.85rem; color: var(--purple); cursor: pointer; transition: all 0.2s ease; }
.cs-toggle-pem-btn:hover { background: var(--purple); color: #FFF; border-color: var(--purple); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.cs-pembahasan-box { margin-top: 14px; background: var(--bg-surface); border: 1.5px solid var(--border); border-left: 5px solid var(--purple); border-radius: var(--r-md); padding: 18px 22px; animation: slideIn 0.3s ease; }
.pembahasan-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pembahasan-header h4 { font-size: 0.95rem; color: var(--purple); margin: 0; }
.pembahasan-content { font-size: 0.92rem; line-height: 1.6; color: var(--text-body); }

/* ============================================================
   CBT PALETTE COLOR SYSTEM & LEGEND
   ============================================================ */
.cbt-palette-legend-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 16px; margin-bottom: 18px; }
.cbt-leg-item { display: flex; align-items: center; gap: 8px; font-family: var(--font-data); font-size: 0.78rem; font-weight: 700; color: var(--text-body); }
.cbt-leg-circle { width: 16px; height: 16px; border-radius: var(--r-full); border: 1.5px solid var(--border); flex-shrink: 0; }
.cbt-leg-circle.leg-current { background: var(--pink); border-color: var(--pink); box-shadow: 0 0 0 2px rgba(232, 74, 138, 0.4); }
.cbt-leg-circle.leg-answered { background: #3F8F5B; border-color: #3F8F5B; }
.cbt-leg-circle.leg-flagged { background: #F6C445; border-color: #D97706; }
.cbt-leg-circle.leg-unanswered { background: var(--bg-surface-2); border-color: var(--border); }

/* CBT Palette Item Statuses */
.palette-circle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 10px; max-height: 380px; overflow-y: auto; padding: 10px 4px; }
.cbt-palette-item { width: 46px; height: 46px; border-radius: var(--r-full); border: 1.5px solid var(--border); background: var(--bg-surface-2); font-family: var(--font-data); font-weight: 800; font-size: 0.9rem; color: var(--text-heading); display: flex; align-items: center; justify-content: center; position: relative; cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); user-select: none; }
.cbt-palette-item:hover { transform: translateY(-2px) scale(1.05); box-shadow: var(--shadow-sm); border-color: var(--purple); }

/* 1. SEDANG DIKERJAKAN (ACTIVE/CURRENT) - Glowing Pink Accent */
.cbt-palette-item.current { background: var(--pink) !important; color: #FFF !important; border: 2.5px solid #FFF !important; outline: 3px solid var(--pink) !important; box-shadow: 0 0 16px rgba(232, 74, 138, 0.55), 0 4px 10px rgba(232, 74, 138, 0.35) !important; transform: scale(1.1); font-weight: 900; z-index: 3; }

/* 2. SUDAH DIKERJAKAN (ANSWERED) - Botanical Emerald Green */
.cbt-palette-item.answered { background: #3F8F5B !important; color: #FFF !important; border-color: #3F8F5B !important; box-shadow: 0 2px 8px rgba(63, 143, 91, 0.3) !important; font-weight: 800; }

/* 3. RAGU-RAGU (FLAGGED) - Warm Amber / Gold */
.cbt-palette-item.flagged { background: #F6C445 !important; color: #78350F !important; border: 2px solid #D97706 !important; font-weight: 800; box-shadow: 0 2px 8px rgba(246, 196, 69, 0.4) !important; }

/* 4. SUDAH DIKERJAKAN TAPI MASIH RAGU (FLAGGED + ANSWERED) */
.cbt-palette-item.flagged-answered { background: #F6C445 !important; color: #78350F !important; border: 2.5px dashed #3F8F5B !important; font-weight: 800; box-shadow: 0 0 0 2px rgba(63, 143, 91, 0.4) !important; }

/* 5. BELUM DIKERJAKAN (UNANSWERED) - Soft Neutral Surface */
.cbt-palette-item.unanswered { background: var(--bg-surface) !important; color: var(--text-heading) !important; border: 1.5px solid var(--border) !important; }

/* Star Flag on Palette */
.palette-flag-star { position: absolute; top: -3px; right: -1px; color: #D97706; font-size: 0.85rem; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3)); }

/* REFINED CBT PALETTE CSS SPECIFICITY */
.cbt-palette-item.unanswered { background: var(--bg-surface) !important; color: var(--text-heading) !important; border: 1.5px solid var(--border) !important; }
.cbt-palette-item.answered { background: #3F8F5B !important; color: #FFFFFF !important; border: 2px solid #3F8F5B !important; box-shadow: 0 2px 8px rgba(63, 143, 91, 0.3) !important; font-weight: 800 !important; }
.cbt-palette-item.flagged { background: #F6C445 !important; color: #78350F !important; border: 2px solid #D97706 !important; font-weight: 800 !important; box-shadow: 0 2px 8px rgba(246, 196, 69, 0.4) !important; }
.cbt-palette-item.flagged-answered { background: #F6C445 !important; color: #78350F !important; border: 2.5px dashed #3F8F5B !important; font-weight: 800 !important; box-shadow: 0 0 0 2px rgba(63, 143, 91, 0.4) !important; }
.cbt-palette-item.current { background: #E84A8A !important; color: #FFFFFF !important; border: 2.5px solid #FFFFFF !important; outline: 3px solid #E84A8A !important; box-shadow: 0 0 16px rgba(232, 74, 138, 0.6), 0 4px 10px rgba(232, 74, 138, 0.4) !important; transform: scale(1.12) !important; font-weight: 900 !important; z-index: 5 !important; }
