/* ==========================================================================
   Modern Design System - Salary & Career Tools (Vietnamese Optimized)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Brand Colors */
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --primary-light: #e0f2fe;
    --accent: #0ea5e9;
    
    /* Semantic Colors */
    --success: #10b981;
    --success-hover: #059669;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    
    /* Neutrals */
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-sub: #94a3b8;
    
    /* Shadows & Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.05);
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================== DARK MODE ===================== */
[data-theme="dark"] {
    --primary: #38bdf8;
    --primary-hover: #7dd3fc;
    --primary-light: rgba(56, 189, 248, 0.15);
    --accent: #0ea5e9;

    --success: #34d399;
    --success-hover: #6ee7b7;
    --success-light: rgba(52, 211, 153, 0.15);
    --warning: #fbbf24;
    --danger: #f87171;
    --danger-light: rgba(248, 113, 113, 0.15);

    --bg-page: #0f172a;
    --bg-card: #1e293b;
    --border: #334155;
    --border-hover: #475569;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-sub: #64748b;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.35), 0 2px 4px -2px rgb(0 0 0 / 0.25);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.5), 0 8px 10px -6px rgb(0 0 0 / 0.35);
}

[data-theme="dark"] .top-nav {
    background: rgba(15, 23, 42, 0.95);
    border-bottom-color: var(--border);
}

[data-theme="dark"] input,
[data-theme="dark"] select {
    background: #0f172a !important;
    color: var(--text-main) !important;
    border-color: var(--border) !important;
}

[data-theme="dark"] input::placeholder {
    color: var(--text-muted);
}

[data-theme="dark"] .input-with-affix input:focus,
[data-theme="dark"] .stepper-input:focus-within {
    border-color: var(--primary) !important;
    background: #1e293b !important;
}

[data-theme="dark"] .footer-wrap {
    background: #0f172a;
    border-top-color: var(--border);
}

[data-theme="dark"] .kpi-card {
    background: #1e293b;
    border-color: var(--border);
}

[data-theme="dark"] .quiz-card,
[data-theme="dark"] .calc-card,
[data-theme="dark"] .knowledge-section {
    background: var(--bg-card);
    border-color: var(--border);
}

[data-theme="dark"] .bracket-table th {
    background: #0f172a;
    color: var(--text-main);
}

[data-theme="dark"] .breakdown-table tr {
    border-bottom-color: var(--border);
}

[data-theme="dark"] .chip-btn {
    background: #0f172a;
    border-color: var(--border);
    color: var(--text-muted);
}

[data-theme="dark"] .chip-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

[data-theme="dark"] .tool-feature-card {
    background: var(--bg-card);
    border-color: var(--border);
}

[data-theme="dark"] .tool-feature-card:hover {
    border-color: var(--primary);
}

[data-theme="dark"] .nav-links a {
    color: var(--text-muted);
}

[data-theme="dark"] .nav-links a:hover,
[data-theme="dark"] .nav-links a.active {
    background: var(--primary-light);
    color: var(--primary);
}

[data-theme="dark"] .chart-card-wrapper {
    background: #0f172a;
    border-color: var(--border);
}

[data-theme="dark"] .mode-switch-wrapper {
    background: #0f172a;
    border-color: var(--border);
}

[data-theme="dark"] .mode-btn.active {
    background: var(--bg-card);
    color: var(--primary);
}

[data-theme="dark"] .faq-item {
    background: #0f172a;
    border-color: var(--border);
}

[data-theme="dark"] .stepper-btn:hover {
    background: var(--border);
}

[data-theme="dark"] .brand-logo { color: var(--text-main); }

/* Smooth transition for all elements */
body, .top-nav, .calc-card, .results-dashboard, .kpi-card,
.tool-feature-card, .knowledge-section, input, select, button,
.footer-wrap, .quiz-card, .faq-item {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.2s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: 'Be Vietnam Pro', 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

input, button, select, textarea, optgroup, option {
    font-family: 'Be Vietnam Pro', 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif !important;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.top-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-main);
    letter-spacing: normal;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 1.15rem;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

.brand-text {
    white-space: nowrap;
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.brand-text span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-links a:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-links a.active {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-badge-pill {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
}

/* ==========================================================================
   Main Wrapper
   ========================================================================== */
.main-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* ==========================================================================
   Hero Header
   ========================================================================== */
.hero-banner {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #0369a1 100%);
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    color: white;
    overflow: hidden;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-xl);
}

.hero-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-badge-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 1rem;
    letter-spacing: normal;
    color: #ffffff;
}

.hero-title span {
    background: linear-gradient(to right, #38bdf8, #86efac);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.05rem;
    color: #cbd5e1;
    max-width: 720px;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.hero-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.stat-pill {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.stat-pill-icon {
    font-size: 1.5rem;
}

.stat-pill-label {
    font-size: 0.78rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
}

.stat-pill-val {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
}

/* ==========================================================================
   Calculator Card Section
   ========================================================================== */
.calc-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 2.25rem;
    margin-bottom: 2.5rem;
    scroll-margin-top: 90px;
}

.calc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.calc-header-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
}

/* Mode Switcher Buttons */
.mode-switch-wrapper {
    display: flex;
    background: #f1f5f9;
    padding: 0.3rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
}

.mode-btn {
    border: none;
    background: transparent;
    padding: 0.55rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}

.mode-btn.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Inputs Form Grid */
.calc-form-grid {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 1.5rem;
    align-items: flex-end;
}

@media (max-width: 900px) {
    .calc-form-grid {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-label-hint {
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.input-with-affix {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-affix input {
    width: 100%;
    height: 48px;
    padding: 0.65rem 3.5rem 0.65rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    background: #f8fafc;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    transition: var(--transition);
    outline: none;
}

.input-with-affix input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
}

.input-affix {
    position: absolute;
    right: 1.15rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    pointer-events: none;
}

/* Stepper input */
.stepper-input {
    display: flex;
    align-items: center;
    height: 48px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: #f8fafc;
    overflow: hidden;
    transition: var(--transition);
}

.stepper-input:focus-within {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
}

.stepper-btn {
    background: transparent;
    border: none;
    width: 44px;
    height: 44px;
    font-size: 1.15rem;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stepper-btn:hover {
    background: var(--border);
    color: var(--text-main);
}

.stepper-input input {
    flex: 1;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    outline: none;
    padding: 0;
}

/* Form Select Dropdown */
.calc-select {
    width: 100%;
    height: 48px;
    padding: 0 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--transition);
    cursor: pointer;
}

.calc-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
}

/* Quick chips */
.quick-salary-chips {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.35rem;
    margin-top: 0.5rem;
}

@media (max-width: 640px) {
    .quick-salary-chips {
        grid-template-columns: repeat(3, 1fr);
    }
}

.chip-btn {
    border: 1px solid var(--border);
    background: #f8fafc;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.2rem;
    text-align: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.chip-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

/* CTA Calculate Button */
.btn-calc-primary {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    border: none;
    padding: 0.85rem 2rem;
    font-size: 1.02rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
    height: 48px;
    letter-spacing: normal;
}

.btn-calc-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.45);
    background: linear-gradient(135deg, #0369a1, #0284c7);
}

/* ==========================================================================
   Results Dashboard
   ========================================================================== */
.results-dashboard {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 2px solid #bae6fd;
    padding: 2.25rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.35s ease-out;
    scroll-margin-top: 90px;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.results-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.results-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.action-tools {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-action-tool {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.15rem;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--text-main);
}

.btn-action-tool:hover {
    background: #f8fafc;
    border-color: var(--border-hover);
}

.btn-action-tool.btn-pdf {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.btn-action-tool.btn-pdf:hover {
    background: #fecaca;
}

.btn-action-tool.btn-img {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #7dd3fc;
}

.btn-action-tool.btn-img:hover {
    background: #bae6fd;
}

/* KPI Cards Grid */
.kpi-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.kpi-card.highlight {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

.kpi-card.highlight .kpi-label {
    color: #d1fae5;
}

.kpi-card.highlight .kpi-val {
    color: #ffffff;
}

.kpi-card.highlight .kpi-sub {
    color: #a7f3d0;
}

.kpi-label {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.kpi-val {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 0.3rem;
}

.kpi-sub {
    font-size: 0.8rem;
    color: var(--text-sub);
    font-weight: 600;
}

/* Detailed Split Layout (Table + Chart) */
.results-split-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    align-items: center;
}

@media (max-width: 900px) {
    .results-split-layout {
        grid-template-columns: 1fr;
    }
}

.breakdown-table {
    width: 100%;
    border-collapse: collapse;
}

.breakdown-table tr {
    border-bottom: 1px solid #f1f5f9;
}

.breakdown-table tr:last-child {
    border-bottom: none;
}

.breakdown-table td {
    padding: 0.85rem 0.5rem;
    font-size: 0.95rem;
}

.breakdown-table td.col-name {
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breakdown-table td.col-val {
    text-align: right;
    font-weight: 700;
    color: var(--text-main);
}

.breakdown-table tr.row-total {
    background: #f0fdf4;
    border-radius: var(--radius-sm);
}

.breakdown-table tr.row-total td {
    padding: 1rem 0.75rem;
    color: #15803d;
    font-size: 1.1rem;
    font-weight: 800;
}

.color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.chart-card-wrapper {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1rem;
}

/* ==========================================================================
   Internal Tools Ecosystem Grid
   ========================================================================== */
.ecosystem-section {
    margin-bottom: 3.5rem;
}

.section-head {
    text-align: center;
    margin-bottom: 2rem;
}

.section-tag {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.35rem 1rem;
    border-radius: var(--radius-full);
    margin-bottom: 0.65rem;
    letter-spacing: 0.02em;
}

.section-title {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: normal;
    line-height: 1.35;
}

.section-subtitle {
    font-size: 0.98rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

.tools-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.tool-feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.tool-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.tool-card-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.tool-card-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.4rem;
}

.tool-card-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.tool-card-footer {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary);
}

/* ==========================================================================
   FAQ & Knowledge Accordion
   ========================================================================== */
.knowledge-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 3.5rem;
}

.faq-group-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 1.5rem 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #f8fafc;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--border-hover);
}

.faq-item summary {
    padding: 1.15rem 1.25rem;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.35rem;
    color: var(--primary);
    font-weight: 800;
    transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-content {
    padding: 0 1.25rem 1.25rem;
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.65;
    border-top: 1px dashed var(--border);
    padding-top: 1rem;
}

.bracket-table-wrap {
    overflow-x: auto;
    margin: 1rem 0;
}

.bracket-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: var(--radius-sm);
    overflow: hidden;
    font-size: 0.88rem;
}

.bracket-table th, .bracket-table td {
    padding: 0.65rem 1rem;
    border: 1px solid var(--border);
    text-align: left;
}

.bracket-table th {
    background: #f1f5f9;
    font-weight: 700;
    color: var(--text-main);
}

/* Callout Note */
.callout-box {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 1rem 1.25rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 1rem 0;
    font-size: 0.92rem;
    color: #92400e;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer-wrap {
    border-top: 1px solid var(--border);
    background: #ffffff;
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
}

.footer-nav a:hover {
    color: var(--primary);
}

/* ==========================================================================
   Quiz & Assessment Components (MBTI, MI, Skills)
   ========================================================================== */
.quiz-header {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.quiz-progress-wrap {
    flex: 1;
    min-width: 200px;
}

.quiz-progress-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    display: flex;
    justify-content: space-between;
}

.progress-bar-track {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0284c7, #10b981);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: var(--radius-full);
}

.quiz-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.quiz-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.quiz-question-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1.25rem;
    display: flex;
    gap: 0.6rem;
}

.quiz-q-num {
    color: var(--primary);
    font-weight: 800;
}

.quiz-options-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quiz-option-label {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.15rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: #f8fafc;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    transition: var(--transition);
    user-select: none;
}

.quiz-option-label:hover {
    background: #ffffff;
    border-color: var(--primary);
    color: var(--primary);
}

.quiz-option-label input[type="radio"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #94a3b8;
    border-radius: 50%;
    outline: none;
    transition: var(--transition);
    flex-shrink: 0;
}

.quiz-option-label input[type="radio"]:checked {
    border-color: var(--primary);
    background: radial-gradient(circle, var(--primary) 40%, transparent 45%);
}

.quiz-option-label:has(input[type="radio"]:checked) {
    background: #e0f2fe;
    border-color: var(--primary);
    color: #0369a1;
}

/* Result Presentation Cards */
.personality-banner {
    background: linear-gradient(135deg, #1e293b, #0369a1);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.personality-code {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    background: linear-gradient(to right, #38bdf8, #86efac);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.personality-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.personality-tagline {
    font-size: 1.05rem;
    color: #cbd5e1;
    max-width: 680px;
    margin: 0 auto;
}

.traits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.trait-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.trait-head {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Search and Filters Bar */
.search-filter-box {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    background: #ffffff;
    border: 1px solid var(--border);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.search-input-wrap {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-input-wrap input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    outline: none;
}

.search-input-wrap input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.category-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.cat-chip {
    border: 1px solid var(--border);
    background: #f8fafc;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.cat-chip.active, .cat-chip:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Question Accordion & STAR Method Box */
.question-item-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    transition: var(--transition);
}

.question-item-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.star-box {
    background: #f0fdf4;
    border-left: 4px solid var(--success);
    padding: 1rem 1.25rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-top: 1rem;
    font-size: 0.92rem;
    color: #166534;
}

.tag-badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    background: #e2e8f0;
    color: #475569;
}

.tag-badge.blue { background: #e0f2fe; color: #0369a1; }
.tag-badge.green { background: #dcfce7; color: #15803d; }
.tag-badge.purple { background: #f3e8ff; color: #7e22ce; }
.tag-badge.amber { background: #fef3c7; color: #b45309; }

/* ===================== DARK MODE TOGGLE BUTTON ===================== */
.dark-toggle-btn {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}
.dark-toggle-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

/* ===================== HISTORY DRAWER ===================== */
.history-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    animation: fadeInOverlay 0.25s ease;
}
.history-overlay.open { display: block; }

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

.history-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100%;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 32px rgba(0,0,0,0.15);
}
.history-drawer.open { right: 0; }

.history-drawer-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-main);
    background: var(--bg-card);
}

.drawer-close-btn {
    background: transparent;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.drawer-close-btn:hover { background: var(--danger-light); color: var(--danger); }

.history-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

.history-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem 1rem;
    font-size: 0.95rem;
}

.history-item {
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}
.history-item:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.history-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}
.history-item-date {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}
.history-item-mode {
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
}
.history-item-salary {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
}
.history-item-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* ===================== COMPARE PANEL ===================== */
.compare-section {
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    animation: slideUp 0.3s ease;
}

.compare-section.active {
    border-style: solid;
    border-color: var(--primary);
}

.compare-trigger-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .compare-grid { grid-template-columns: 1fr; }
}

.compare-col {
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}
.compare-col.scenario-a { border-top: 3px solid var(--primary); }
.compare-col.scenario-b { border-top: 3px solid var(--success); }

.compare-col-title {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.compare-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}
.compare-row:last-child { border-bottom: none; }
.compare-row-label { color: var(--text-muted); font-weight: 600; }
.compare-row-val { font-weight: 700; color: var(--text-main); }

.compare-net-highlight {
    background: var(--success-light);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    text-align: center;
    margin-top: 0.75rem;
}
.compare-net-label { font-size: 0.78rem; font-weight: 700; color: var(--success-hover); }
.compare-net-value { font-size: 1.35rem; font-weight: 900; color: var(--success); }

.compare-diff-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 700;
}
.compare-diff-badge.positive { background: #dcfce7; color: #15803d; }
.compare-diff-badge.negative { background: #fee2e2; color: #b91c1c; }
.compare-diff-badge.neutral  { background: #f1f5f9; color: #475569; }

/* ===================== CHATBOT ===================== */
.chatbot-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #0284c7, #10b981);
    color: white;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(2, 132, 199, 0.5);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.chatbot-fab:hover {
    transform: scale(1.12);
    box-shadow: 0 8px 28px rgba(2, 132, 199, 0.55);
}
.chatbot-fab .fab-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.chatbot-panel {
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    width: 360px;
    max-height: 520px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 900;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.8) translateY(30px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.chatbot-panel.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}

@media (max-width: 480px) {
    .chatbot-panel {
        right: 0.5rem;
        left: 0.5rem;
        width: auto;
        bottom: 5rem;
    }
}

.chatbot-header {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: white;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chatbot-header-info { display: flex; align-items: center; gap: 0.65rem; }
.chatbot-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}
.chatbot-name { font-weight: 800; font-size: 0.95rem; }
.chatbot-status { font-size: 0.75rem; opacity: 0.8; display: flex; align-items: center; gap: 0.3rem; }
.chatbot-status-dot {
    width: 7px; height: 7px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.chatbot-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 320px;
}

.chat-msg {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    animation: msgIn 0.25s ease;
}
@keyframes msgIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.chat-msg.user { flex-direction: row-reverse; }

.chat-bubble {
    max-width: 80%;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    line-height: 1.5;
}
.chat-msg.bot .chat-bubble {
    background: var(--bg-page);
    border: 1px solid var(--border);
    color: var(--text-main);
    border-bottom-left-radius: 4px;
}
.chat-msg.user .chat-bubble {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-avatar-mini {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.chat-msg.bot .chat-avatar-mini { background: var(--primary-light); }
.chat-msg.user .chat-avatar-mini { background: #e0f2fe; }

.chat-quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.25rem 0;
}
.chat-quick-chip {
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid var(--border);
    background: var(--bg-page);
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}
.chat-quick-chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

.chatbot-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
    background: var(--bg-card);
}
.chatbot-footer input {
    flex: 1;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    outline: none;
    background: var(--bg-page);
    color: var(--text-main);
}
.chatbot-footer input:focus { border-color: var(--primary); background: var(--bg-card); }
.chat-send-btn {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.chat-send-btn:hover { transform: scale(1.1); }

/* ===================== SHARE MODAL ===================== */
.share-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.share-modal-overlay.open { display: flex; }

.share-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 360px;
    box-shadow: var(--shadow-xl);
    animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalPop {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}
.share-modal-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.share-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}
.share-option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-page);
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
    font-weight: 700;
}
.share-option-btn:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.share-option-icon { font-size: 1.6rem; }
.share-modal-close {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
}
.share-modal-close:hover { background: var(--danger-light); color: var(--danger); border-color: #fca5a5; }

/* ===================== TOAST NOTIFICATION ===================== */
.toast-container {
    position: fixed;
    top: 5.5rem;
    right: 1.5rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.25rem;
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    max-width: 300px;
    animation: toastIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(30px); }
}

/* ===================== HISTORY BUTTON in NAV ===================== */
.nav-history-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 0.5rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.nav-history-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-light);
}
.history-count-badge {
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-full);
    min-width: 18px;
    text-align: center;
    display: none;
}
.history-count-badge.visible { display: inline-block; }

/* ===================== CURRENCY SWITCHER (VND / USD) ===================== */
.currency-toggle-group {
    display: inline-flex;
    background: #e2e8f0;
    padding: 0.2rem;
    border-radius: var(--radius-sm);
    gap: 0.15rem;
}
[data-theme="dark"] .currency-toggle-group {
    background: #0f172a;
}
.currency-btn {
    border: none;
    background: transparent;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}
.currency-btn.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.exchange-rate-box {
    margin-top: 0.65rem;
    padding: 0.75rem 1rem;
    background: var(--primary-light);
    border: 1px dashed var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
}
.exchange-rate-input-group {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.exchange-rate-input-group input {
    width: 110px !important;
    padding: 0.35rem 0.5rem !important;
    font-size: 0.85rem !important;
    text-align: right;
    border-radius: var(--radius-sm);
}

/* ===================== EMPLOYER VS EMPLOYEE PERSPECTIVE TABS ===================== */
.perspective-toggle-wrapper {
    display: flex;
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    gap: 0.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border);
}
[data-theme="dark"] .perspective-toggle-wrapper {
    background: #0f172a;
}
.perspective-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.6rem 1rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}
.perspective-btn.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
[data-theme="dark"] .perspective-btn.active {
    background: #1e293b;
    color: var(--primary);
}

/* ===================== DONATION & SUPPORT CREATOR ===================== */
.nav-donate-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
    padding: 0.42rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.nav-donate-btn:hover {
    background: #fde68a;
    color: #92400e;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.2);
}
[data-theme="dark"] .nav-donate-btn {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}
[data-theme="dark"] .nav-donate-btn:hover {
    background: rgba(245, 158, 11, 0.25);
}

.support-coffee-card {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .support-coffee-card {
    background: linear-gradient(135deg, #1c1917 0%, #292524 100%);
    border-color: rgba(245, 158, 11, 0.3);
}
.support-coffee-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.support-coffee-emoji {
    font-size: 2.2rem;
    flex-shrink: 0;
}
.support-coffee-heading {
    font-weight: 700;
    color: #92400e;
    font-size: 1.02rem;
    margin-bottom: 0.2rem;
}
[data-theme="dark"] .support-coffee-heading {
    color: #fbbf24;
}
.support-coffee-text {
    font-size: 0.88rem;
    color: #78350f;
}
[data-theme="dark"] .support-coffee-text {
    color: #d1d5db;
}
.btn-support-coffee {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
    flex-shrink: 0;
}
.btn-support-coffee:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
}

.donate-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeInOverlay 0.2s ease;
}
.donate-modal-overlay.active {
    display: flex;
}
.donate-modal-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    overflow: hidden;
    animation: zoomInModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.donate-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-page);
}
.donate-modal-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.donate-modal-title h3 {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}
.donate-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
}
.donate-modal-body {
    padding: 1.25rem 1.5rem;
    text-align: center;
}
.donate-msg {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 1rem;
}
.donate-qr-wrapper {
    background: white;
    padding: 0.85rem;
    border-radius: var(--radius-md);
    display: inline-block;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}
.donate-qr-img {
    max-width: 230px;
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
}
.donate-info-box {
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    text-align: left;
    font-size: 0.88rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.donate-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}
.donate-info-label {
    color: var(--text-muted);
    font-size: 0.82rem;
}
.donate-info-val {
    color: var(--text-main);
    font-weight: 600;
}
.donate-stk-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.donate-stk-val {
    font-family: monospace;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.5px;
}
.btn-copy-stk {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-copy-stk:hover {
    background: var(--primary);
    color: white;
}
.donate-badge-note {
    margin-top: 0.85rem;
    font-size: 0.76rem;
    color: var(--text-muted);
    background: rgba(14, 165, 233, 0.08);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.6rem;
}
.donate-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    background: var(--bg-page);
}
.btn-donate-done {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.65rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-donate-done:hover {
    background: var(--primary-hover);
}

@media (max-width: 640px) {
    .support-coffee-card {
        flex-direction: column;
        text-align: center;
        align-items: stretch;
    }
    .support-coffee-left {
        flex-direction: column;
    }
    .btn-support-coffee {
        justify-content: center;
    }
}

/* ===================== LAW VERSION SWITCHER (Option 1) ===================== */
.law-version-bar {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.65rem 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
[data-theme="dark"] .law-version-bar {
    background: #0f172a;
}
.law-version-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.law-version-toggles {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.law-version-btn {
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 600;
    padding: 0.42rem 0.95rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.law-version-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
}
.law-version-btn.active {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
    font-weight: 700;
}
[data-theme="dark"] .law-version-btn.active {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #0f172a;
    border-color: #38bdf8;
}

