/* ============================================================
   BSchoolBuzz v2 - Professional Stylesheet
   Icons: Lucide (via CDN unpkg)
   Fonts: Poppins + Inter via Google Fonts
   ============================================================ */

:root {
    --deep-blue: #0B2A5B;
    --blue-dark: #071E42;
    --blue-medium: #143D7A;
    --blue-light: #1A4F9C;
    --blue-pale: #E8EDF5;
    --yellow: #FFC72C;
    --yellow-hover: #FFD54F;
    --yellow-dark: #E5A800;
    --white: #FFFFFF;
    --off-white: #F7F8FC;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --green: #10B981;
    --green-light: #D1FAE5;
    --green-dark: #059669;
    --red: #EF4444;
    --red-light: #FEE2E2;
    --purple: #7C3AED;
    --purple-light: #EDE9FE;
    --orange: #F59E0B;
    --orange-light: #FEF3C7;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --shadow-xs: 0 1px 2px rgba(11,42,91,0.04);
    --shadow-sm: 0 1px 3px rgba(11,42,91,0.06), 0 1px 2px rgba(11,42,91,0.04);
    --shadow-md: 0 4px 12px rgba(11,42,91,0.08);
    --shadow-lg: 0 10px 30px rgba(11,42,91,0.1);
    --shadow-xl: 0 20px 50px rgba(11,42,91,0.14);
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --transition: all 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-body); color: var(--gray-800); background: var(--off-white); line-height: 1.6; font-size: 14px; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.25; color: var(--deep-blue); }
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; }
button { cursor: pointer; font-family: var(--font-body); border: none; }
input,textarea,select { font-family: var(--font-body); }
ul,ol { list-style: none; }

/* Utilities */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }

/* ─── Buttons ─── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 22px; border-radius: var(--radius-sm); font-weight: 600;
    font-size: 13px; letter-spacing: 0.01em; border: none; transition: var(--transition); white-space: nowrap;
}
.btn i { width: 16px; height: 16px; }
.btn-primary { background: var(--yellow); color: var(--deep-blue); }
.btn-primary:hover { background: var(--yellow-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,199,44,0.35); }
.btn-secondary { background: var(--deep-blue); color: var(--white); }
.btn-secondary:hover { background: var(--blue-medium); }
.btn-outline { background: transparent; color: var(--deep-blue); border: 1.5px solid var(--gray-300); }
.btn-outline:hover { border-color: var(--deep-blue); background: var(--blue-pale); }
.btn-ghost { background: transparent; color: var(--gray-600); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-success { background: var(--green); color: var(--white); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 14px 32px; font-size: 15px; }
.btn-block { display: flex; width: 100%; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }

/* ─── Cards ─── */
.card { background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-xs); border: 1px solid var(--gray-200); transition: var(--transition); }
.card:hover { box-shadow: var(--shadow-sm); }
.card-body { padding: 20px; }
.card-header { padding: 14px 20px; border-bottom: 1px solid var(--gray-100); font-weight: 600; font-size: 13px; color: var(--deep-blue); display: flex; align-items: center; gap: 8px; }
.card-header i { width: 18px; height: 18px; color: var(--gray-500); }

/* ─── Forms ─── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 12px; color: var(--gray-600); text-transform: uppercase; letter-spacing: 0.04em; }
.form-control {
    width: 100%; padding: 10px 14px; border: 1.5px solid var(--gray-300); border-radius: var(--radius-sm);
    font-size: 14px; background: var(--white); transition: var(--transition); color: var(--gray-800);
}
.form-control:focus { outline: none; border-color: var(--deep-blue); box-shadow: 0 0 0 3px rgba(11,42,91,0.08); }
.form-control::placeholder { color: var(--gray-400); }
.form-hint { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
.form-error { font-size: 11px; color: var(--red); margin-top: 4px; }

/* ─── Badges ─── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 50px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.badge-free { background: var(--green-light); color: var(--green-dark); }
.badge-premium { background: var(--yellow); color: var(--deep-blue); }
.badge-easy { background: #D1FAE5; color: #059669; }
.badge-medium { background: #FEF3C7; color: #D97706; }
.badge-hard { background: #FEE2E2; color: #DC2626; }
.badge-mixed { background: var(--blue-pale); color: var(--deep-blue); }
.badge-cat { background: var(--deep-blue); color: var(--yellow); }
.badge-xat { background: #7C3AED; color: var(--white); }
.badge-nmat { background: #059669; color: var(--white); }
.badge-snap { background: #DC2626; color: var(--white); }
.badge-locked { background: var(--gray-200); color: var(--gray-500); }
.badge-live { background: var(--green); color: var(--white); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.7;} }

/* ─── Tables ─── */
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.data-table thead { background: var(--gray-50); }
.data-table th { padding: 11px 16px; text-align: left; font-size: 11px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--gray-200); }
.data-table td { padding: 12px 16px; font-size: 13px; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); }
.data-table tbody tr:hover { background: var(--gray-50); }
.data-table .text-right { text-align: right; }

/* ─── Navigation ─── */
.navbar {
    background: var(--deep-blue); padding: 0 24px; height: 60px;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 1000; box-shadow: 0 1px 8px rgba(0,0,0,0.2);
}
.navbar-brand { display: flex; align-items: center; gap: 8px; color: var(--white); font-family: var(--font-heading); font-weight: 800; font-size: 18px; }
.navbar-brand .logo-mark { width: 32px; height: 32px; background: var(--yellow); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 900; color: var(--deep-blue); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: rgba(255,255,255,0.7); font-weight: 500; font-size: 13px; }
.nav-links a:hover, .nav-links a.active { color: var(--yellow); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 22px; padding: 4px; }

/* ─── Hero ─── */
.hero { background: linear-gradient(140deg, var(--deep-blue) 0%, var(--blue-dark) 60%, #040D1A 100%); padding: 80px 0 60px; position: relative; overflow: hidden; color: var(--white); }
.hero::after { content:''; position:absolute; top:-40%; right:-15%; width:60%; height:180%; background:radial-gradient(ellipse,rgba(255,199,44,0.05) 0%,transparent 60%); pointer-events:none; }
.hero-content { position: relative; z-index: 2; max-width: 640px; }
.hero-label { color: var(--yellow); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.hero h1 { font-size: 42px; color: var(--white); margin-bottom: 16px; line-height: 1.15; }
.hero h1 span { color: var(--yellow); }
.hero p { font-size: 16px; color: rgba(255,255,255,0.65); margin-bottom: 32px; line-height: 1.7; }

/* ─── Stats ─── */
.stats-bar { background:var(--white); border-radius:var(--radius-lg); padding:28px 40px; display:grid; grid-template-columns:repeat(3,1fr); gap:20px; margin-top:-40px; position:relative; z-index:10; box-shadow:var(--shadow-lg); border:1px solid var(--gray-100); }
.stat-item { text-align: center; }
.stat-number { font-family: var(--font-heading); font-size: 32px; font-weight: 800; color: var(--deep-blue); line-height: 1; }
.stat-label { font-size: 12px; color: var(--gray-500); margin-top: 4px; font-weight: 500; }

/* ─── Section Title ─── */
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 28px; margin-bottom: 8px; }
.section-title p { font-size: 14px; color: var(--gray-500); max-width: 480px; margin: 0 auto; }

/* ─── Feature Cards ─── */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.feature-card { background: var(--white); border-radius: var(--radius-md); padding: 24px 20px; border: 1px solid var(--gray-200); transition: var(--transition); }
.feature-card:hover { border-color: var(--yellow); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-icon { width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--blue-pale); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; color: var(--deep-blue); }
.feature-card h4 { font-size: 14px; margin-bottom: 6px; }
.feature-card p { font-size: 12px; color: var(--gray-500); line-height: 1.5; }

/* ─── Mock Cards ─── */
.mock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.mock-card { background: var(--white); border-radius: var(--radius-md); border: 1px solid var(--gray-200); overflow: hidden; transition: var(--transition); }
.mock-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.mock-card-top { background: linear-gradient(135deg, var(--deep-blue), var(--blue-medium)); padding: 16px 20px; color: var(--white); }
.mock-card-top h3 { color: var(--white); font-size: 16px; margin-bottom: 2px; }
.mock-card-body { padding: 16px 20px; }
.mock-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.mock-meta-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gray-600); }
.mock-meta-item i { width: 14px; height: 14px; color: var(--gray-400); }
.mock-card-footer { padding: 12px 20px; border-top: 1px solid var(--gray-100); display: flex; justify-content: space-between; align-items: center; }
.mock-card.locked { opacity: 0.6; pointer-events: none; }
.mock-card.locked .mock-card-top { background: var(--gray-600); }

/* ============================================================
   EXAM INTERFACE
   ============================================================ */
.exam-header { background:var(--deep-blue); color:var(--white); height:52px; display:flex; align-items:center; justify-content:space-between; padding:0 16px; position:fixed; top:0; left:0; right:0; z-index:100; box-shadow:0 2px 6px rgba(0,0,0,0.3); }
.exam-header .brand { font-family:var(--font-heading); font-weight:700; font-size:14px; display:flex; align-items:center; gap:8px; }
.exam-header .brand .mark { background:var(--yellow); color:var(--deep-blue); padding:2px 7px; border-radius:3px; font-size:11px; font-weight:900; }
.exam-header .title { font-size: 13px; font-weight: 600; letter-spacing: 0.01em; }
.exam-header .user-info { font-size: 12px; opacity: 0.8; display: flex; align-items: center; gap: 12px; }

.section-bar { background:var(--blue-dark); color:var(--white); height:40px; display:flex; align-items:center; justify-content:space-between; padding:0 16px; position:fixed; top:52px; left:0; right:0; z-index:99; font-size:13px; border-bottom:2px solid var(--yellow); }
.section-tabs { display: flex; gap: 1px; }
.section-tab { padding:6px 16px; font-size:12px; font-weight:600; border-radius:3px 3px 0 0; cursor:pointer; background:rgba(255,255,255,0.06); color:rgba(255,255,255,0.5); border:none; transition:var(--transition); }
.section-tab.active { background:var(--yellow); color:var(--deep-blue); }
.section-tab.locked { opacity:0.35; cursor:not-allowed; }
.section-tab.done { background:rgba(16,185,129,0.15); color:#6EE7B7; }

.timer-block { display:flex; align-items:center; gap:6px; }
.timer-block .timer-label { font-size:12px; color:rgba(255,255,255,0.6); }
.timer-value { font-family:'Courier New',monospace; font-size:18px; font-weight:700; color:var(--yellow); letter-spacing:1px; }
.timer-value.critical { color:var(--red); animation: blink 1s infinite; }
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0.4;} }

.exam-body { display:flex; margin-top:92px; height:calc(100vh - 92px); overflow:hidden; }
.question-panel { flex:1; display:flex; flex-direction:column; background:var(--white); }
.question-area { flex:1; padding:24px 28px; overflow-y:auto; }
.q-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.q-number { font-size:13px; font-weight:700; color:var(--deep-blue); display:flex; align-items:center; gap:8px; }
.q-type-badge { background:var(--blue-pale); color:var(--deep-blue); padding:2px 8px; border-radius:3px; font-size:10px; font-weight:700; text-transform:uppercase; }
.q-text { font-size:14px; line-height:1.8; color:var(--gray-800); margin-bottom:20px; }
.passage-box { background:var(--gray-50); border:1px solid var(--gray-200); border-radius:var(--radius-sm); padding:16px 18px; margin-bottom:20px; max-height:260px; overflow-y:auto; font-size:13px; line-height:1.8; color:var(--gray-600); }

.options-list { display:flex; flex-direction:column; gap:8px; }
.option-row { display:flex; align-items:flex-start; gap:10px; padding:12px 14px; border:1.5px solid var(--gray-200); border-radius:var(--radius-sm); cursor:pointer; transition:var(--transition); font-size:13px; line-height:1.6; }
.option-row:hover { border-color:var(--blue-medium); background:rgba(11,42,91,0.015); }
.option-row.selected { border-color:var(--deep-blue); background:rgba(11,42,91,0.04); }
.option-circle { width:26px; height:26px; min-width:26px; border-radius:50%; border:2px solid var(--gray-300); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:11px; color:var(--gray-400); transition:var(--transition); }
.option-row.selected .option-circle { background:var(--deep-blue); border-color:var(--deep-blue); color:var(--white); }

.tita-field { width:220px; padding:12px 16px; border:2px solid var(--gray-300); border-radius:var(--radius-sm); font-size:16px; font-family:'Courier New',monospace; font-weight:600; text-align:center; letter-spacing:2px; }
.tita-field:focus { border-color:var(--deep-blue); box-shadow:0 0 0 3px rgba(11,42,91,0.08); outline:none; }

/* Action Bar */
.action-bar { display:flex; align-items:center; justify-content:space-between; padding:10px 20px; background:var(--gray-50); border-top:1px solid var(--gray-200); flex-shrink:0; }
.action-bar .group { display:flex; gap:6px; }
.act-btn { padding:8px 16px; border-radius:var(--radius-xs); font-size:12px; font-weight:600; border:1.5px solid var(--gray-300); background:var(--white); color:var(--gray-600); transition:var(--transition); display:flex; align-items:center; gap:5px; }
.act-btn i { width:14px; height:14px; }
.act-btn:hover { border-color:var(--deep-blue); color:var(--deep-blue); }
.act-btn.primary { background:var(--deep-blue); color:var(--white); border-color:var(--deep-blue); }
.act-btn.primary:hover { background:var(--blue-medium); }
.act-btn.mark-btn { background:var(--purple); color:var(--white); border-color:var(--purple); }
.act-btn.submit-btn { background:var(--red); color:var(--white); border-color:var(--red); }
.act-btn.calc-btn { background:var(--gray-100); color:var(--gray-700); border-color:var(--gray-300); }

/* Palette */
.palette-panel { width:260px; min-width:260px; background:var(--gray-50); border-left:1px solid var(--gray-200); display:flex; flex-direction:column; overflow-y:auto; }
.palette-title { padding:12px 14px; font-weight:700; font-size:12px; color:var(--deep-blue); border-bottom:1px solid var(--gray-200); text-transform:uppercase; letter-spacing:0.05em; }
.palette-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:5px; padding:14px; }
.p-item { width:36px; height:36px; border-radius:5px; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; cursor:pointer; border:1.5px solid var(--gray-300); background:var(--white); color:var(--gray-500); transition:var(--transition); }
.p-item:hover { border-color:var(--deep-blue); }
.p-item.current { box-shadow:0 0 0 2px var(--yellow); }
.p-item.not-visited { background:var(--gray-200); color:var(--gray-500); border-color:var(--gray-300); }
.p-item.visited { background:var(--red); color:var(--white); border-color:var(--red); }
.p-item.answered { background:var(--green); color:var(--white); border-color:var(--green); }
.p-item.marked { background:var(--purple); color:var(--white); border-color:var(--purple); }
.p-item.answered-marked { background:linear-gradient(135deg,var(--green) 50%,var(--purple) 50%); color:var(--white); border:none; }

.palette-legend { padding:10px 14px; border-top:1px solid var(--gray-200); display:flex; flex-wrap:wrap; gap:8px; }
.legend-item { display:flex; align-items:center; gap:5px; font-size:10px; color:var(--gray-600); }
.legend-dot { width:12px; height:12px; border-radius:3px; }

.palette-summary { padding:12px 14px; border-top:1px solid var(--gray-200); }
.summary-row { display:flex; justify-content:space-between; font-size:12px; color:var(--gray-600); padding:3px 0; }
.summary-row strong { color:var(--gray-800); }

/* ─── Calculator ─── */
.calc-overlay { display:none; position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.4); z-index:500; align-items:center; justify-content:center; }
.calc-overlay.open { display:flex; }
.calc-box { background:var(--white); border-radius:var(--radius-lg); box-shadow:var(--shadow-xl); width:320px; overflow:hidden; }
.calc-head { background:var(--deep-blue); color:var(--white); padding:10px 14px; display:flex; justify-content:space-between; align-items:center; font-weight:600; font-size:13px; }
.calc-head button { background:none; border:none; color:var(--white); font-size:18px; cursor:pointer; }
.calc-screen { background:var(--gray-50); padding:14px 16px; text-align:right; font-family:'Courier New',monospace; font-size:26px; font-weight:700; color:var(--deep-blue); border-bottom:1px solid var(--gray-200); min-height:52px; word-break:break-all; }
.calc-keys { display:grid; grid-template-columns:repeat(5,1fr); gap:1px; background:var(--gray-200); }
.calc-key { padding:14px; font-size:14px; font-weight:600; border:none; background:var(--white); color:var(--gray-700); cursor:pointer; transition:var(--transition); }
.calc-key:hover { background:var(--gray-100); }
.calc-key.op { background:var(--gray-50); color:var(--deep-blue); font-weight:700; }
.calc-key.op:hover { background:var(--gray-200); }
.calc-key.eq { background:var(--deep-blue); color:var(--white); }
.calc-key.eq:hover { background:var(--blue-medium); }
.calc-key.clr { background:var(--red); color:var(--white); }
.calc-key.clr:hover { background:#DC2626; }
.calc-key.mem { background:var(--blue-pale); color:var(--deep-blue); font-size:11px; }
.calc-key.mem:hover { background:var(--gray-200); }

/* ============================================================
   DASHBOARD
   ============================================================ */
.dash-layout { display:flex; min-height:calc(100vh - 60px); }
.sidebar { width:240px; min-width:240px; background:var(--deep-blue); padding:20px 0; color:var(--white); overflow-y:auto; }
.sidebar-profile { padding:0 20px 20px; text-align:center; border-bottom:1px solid rgba(255,255,255,0.08); margin-bottom:8px; }
.sidebar-avatar { width:48px; height:48px; border-radius:50%; background:var(--yellow); color:var(--deep-blue); display:flex; align-items:center; justify-content:center; font-size:18px; font-weight:800; margin:0 auto 8px; }
.sidebar-name { font-weight:600; font-size:14px; }
.sidebar-sub { font-size:11px; color:rgba(255,255,255,0.45); }

.side-nav li a { display:flex; align-items:center; gap:10px; padding:10px 20px; color:rgba(255,255,255,0.6); font-size:13px; font-weight:500; transition:var(--transition); border-left:3px solid transparent; }
.side-nav li a:hover, .side-nav li a.active { color:var(--white); background:rgba(255,255,255,0.06); border-left-color:var(--yellow); }
.side-nav li a i { width:18px; height:18px; }
.side-nav .nav-divider { height:1px; background:rgba(255,255,255,0.06); margin:8px 20px; }

.dash-main { flex:1; padding:28px 32px; overflow-y:auto; }
.greeting h2 { font-size:24px; margin-bottom:2px; }
.greeting h2 span { color:var(--yellow-dark); }
.greeting p { color:var(--gray-500); font-size:13px; }

/* Widget Cards */
.widget-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:16px; }
.widget { background:var(--white); border-radius:var(--radius-md); padding:20px; box-shadow:var(--shadow-xs); border:1px solid var(--gray-200); }
.widget-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.widget-icon { width:36px; height:36px; border-radius:var(--radius-sm); display:flex; align-items:center; justify-content:center; }
.widget-icon.blue { background:var(--blue-pale); color:var(--deep-blue); }
.widget-icon.green { background:var(--green-light); color:var(--green-dark); }
.widget-icon.yellow { background:var(--orange-light); color:var(--orange); }
.widget-icon.purple { background:var(--purple-light); color:var(--purple); }
.widget-value { font-family:var(--font-heading); font-size:28px; font-weight:800; color:var(--deep-blue); line-height:1; }
.widget-label { font-size:12px; color:var(--gray-500); margin-top:4px; }
.widget-change { font-size:11px; font-weight:600; margin-top:6px; display:flex; align-items:center; gap:3px; }
.widget-change.up { color:var(--green); }
.widget-change.down { color:var(--red); }

/* Skill Bars */
.skill-block { margin-bottom:14px; }
.skill-top { display:flex; justify-content:space-between; font-size:12px; font-weight:600; color:var(--gray-700); margin-bottom:5px; }
.skill-bar { height:8px; background:var(--gray-200); border-radius:4px; overflow:hidden; }
.skill-fill { height:100%; border-radius:4px; transition:width 0.8s ease; }

/* Insight Cards */
.insight { background:var(--gray-50); border-radius:var(--radius-sm); padding:14px 16px; border-left:3px solid var(--deep-blue); margin-bottom:10px; display:flex; gap:10px; align-items:flex-start; }
.insight.warning { border-left-color:var(--orange); }
.insight.success { border-left-color:var(--green); }
.insight.danger { border-left-color:var(--red); }
.insight-icon { width:32px; height:32px; min-width:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; }
.insight-icon.blue { background:var(--blue-pale); color:var(--deep-blue); }
.insight-icon.yellow { background:var(--orange-light); color:var(--orange); }
.insight-icon.green { background:var(--green-light); color:var(--green); }
.insight-icon.red { background:var(--red-light); color:var(--red); }
.insight-label { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.04em; color:var(--gray-500); margin-bottom:2px; }
.insight-text { font-size:13px; color:var(--gray-700); line-height:1.5; }

/* Progress Card */
.progress-ring { width:100px; height:100px; margin:0 auto; }

/* ─── Analysis Page ─── */
.analysis-hero { background:linear-gradient(135deg,var(--deep-blue),var(--blue-dark)); padding:36px 0; color:var(--white); }
.result-big { text-align:center; }
.result-big .score { font-family:var(--font-heading); font-size:48px; font-weight:900; color:var(--yellow); line-height:1; }
.result-big .max { font-size:18px; color:rgba(255,255,255,0.35); }
.result-big .pct { font-size:16px; color:var(--white); margin-top:6px; }
.result-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:12px; }
.result-cell { text-align:center; padding:16px 12px; background:rgba(255,255,255,0.06); border-radius:var(--radius-sm); }
.result-cell .val { font-family:var(--font-heading); font-size:24px; font-weight:800; color:var(--yellow); }
.result-cell .lbl { font-size:11px; color:rgba(255,255,255,0.5); margin-top:2px; text-transform:uppercase; letter-spacing:0.03em; }

.chart-card { background:var(--white); border-radius:var(--radius-md); padding:20px; box-shadow:var(--shadow-xs); border:1px solid var(--gray-200); }
.chart-card h3 { font-size:15px; margin-bottom:16px; padding-bottom:10px; border-bottom:1px solid var(--gray-100); display:flex; align-items:center; gap:8px; }
.chart-card h3 i { width:18px; height:18px; color:var(--gray-400); }

.share-card { background:linear-gradient(135deg,var(--deep-blue),#0A1F3F); border-radius:var(--radius-lg); padding:36px; color:var(--white); text-align:center; }
.share-card h4 { color:var(--yellow); font-size:12px; text-transform:uppercase; letter-spacing:0.08em; margin-bottom:12px; }
.share-card .big { font-size:44px; font-weight:900; }
.share-card .sub { font-size:16px; color:var(--yellow); margin-top:6px; }
.share-buttons { display:flex; gap:10px; justify-content:center; margin-top:20px; }

/* ─── Modal ─── */
.modal-bg { display:none; position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.5); z-index:1000; align-items:center; justify-content:center; }
.modal-bg.open { display:flex; }
.modal { background:var(--white); border-radius:var(--radius-lg); box-shadow:var(--shadow-xl); width:90%; max-width:540px; overflow:hidden; max-height:85vh; display:flex; flex-direction:column; }
.modal-head { padding:16px 20px; border-bottom:1px solid var(--gray-200); display:flex; justify-content:space-between; align-items:center; }
.modal-head h3 { font-size:16px; }
.modal-close { background:none; border:none; font-size:20px; color:var(--gray-400); cursor:pointer; padding:4px; }
.modal-body { padding:20px; overflow-y:auto; flex:1; }
.modal-foot { padding:14px 20px; border-top:1px solid var(--gray-200); display:flex; justify-content:flex-end; gap:10px; }

/* Tab Warning */
.tab-warn { display:none; position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.85); z-index:9999; align-items:center; justify-content:center; }
.tab-warn.show { display:flex; }
.warn-box { background:var(--white); border-radius:var(--radius-lg); padding:36px; text-align:center; max-width:400px; }

/* ─── Responsive ─── */
@media(max-width:1024px){
    .palette-panel{width:220px;min-width:220px;}
    .sidebar{width:200px;min-width:200px;}
}
@media(max-width:768px){
    .hero h1{font-size:28px;} .hero{padding:50px 0 40px;}
    .stats-bar{grid-template-columns:1fr;padding:20px;margin-top:-24px;}
    .feature-grid{grid-template-columns:1fr 1fr;}
    .mock-grid{grid-template-columns:1fr;}
    .grid-2,.grid-3,.grid-4{grid-template-columns:1fr;}
    .nav-links{display:none;} .nav-toggle{display:block;}
    .palette-panel{display:none;position:fixed;top:92px;right:0;bottom:0;z-index:50;width:260px;box-shadow:var(--shadow-xl);}
    .palette-panel.mobile-show{display:flex;}
    .dash-layout{flex-direction:column;}
    .sidebar{width:100%;min-width:100%;padding:10px 0;}
    .side-nav{display:flex;overflow-x:auto;padding:0 10px;}
    .side-nav li a{padding:8px 12px;border-left:none;border-bottom:2px solid transparent;white-space:nowrap;font-size:11px;}
    .side-nav li a.active{border-bottom-color:var(--yellow);border-left-color:transparent;}
    .side-nav .nav-divider{display:none;}
    .dash-main{padding:20px 16px;}
    .widget-grid{grid-template-columns:1fr 1fr;}
}
@media(max-width:480px){
    .hero h1{font-size:24px;}
    .feature-grid{grid-template-columns:1fr;}
    .widget-grid{grid-template-columns:1fr;}
}

::-webkit-scrollbar{width:5px;} ::-webkit-scrollbar-track{background:var(--gray-100);} ::-webkit-scrollbar-thumb{background:var(--gray-300);border-radius:3px;}
.toast-area{position:fixed;top:70px;right:16px;z-index:9000;display:flex;flex-direction:column;gap:6px;}
.toast{padding:12px 18px;border-radius:var(--radius-sm);font-size:13px;font-weight:500;color:var(--white);box-shadow:var(--shadow-lg);animation:slideIn 0.3s ease;max-width:340px;}
.toast.ok{background:var(--green);} .toast.err{background:var(--red);} .toast.info{background:var(--orange);}
@keyframes slideIn{from{transform:translateX(100%);opacity:0;}to{transform:translateX(0);opacity:1;}}
