/* ═══════════════════════════════════════════════════════════════
   BaiboonHub v8.0 — Wallet Dashboard Redesign
   Mint-green palette, rounded cards, solid buttons,
   widget-grid dashboard, credit-card school info,
   progress bars, notification bell, greeting topbar
   ═══════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ─── */
:root {
    /* Brand */
    --c-brand: #2BB673;
    --c-brand-dark: #219653;
    --c-accent: #4FD1C5;
    --c-gradient: linear-gradient(135deg, #2BB673, #38C9A0);

    /* Surface — Light */
    --c-bg: #F0F7F4;
    --c-surface: #FFFFFF;
    --c-surface-hover: #F6FBF8;
    --c-surface-dim: #EBF5F0;
    --c-input-bg: #F0F7F4;

    /* Text — Light */
    --c-text-1: #1A1D2E;
    --c-text-2: #6B7A8D;
    --c-text-3: #A0AABF;

    /* Borders — Light */
    --c-border: #E2EDE7;
    --c-border-light: #EBF5F0;

    /* Elevation — Light (three levels) */
    --shadow-xs: 0 1px 2px rgba(0,0,0,.03);
    --shadow-sm: 0 2px 8px rgba(0,0,0,.04);
    --shadow-md: 0 4px 24px rgba(26,29,46,.06);
    --shadow-lg: 0 8px 40px rgba(26,29,46,.08);
    --shadow-xl: 0 20px 60px rgba(26,29,46,.12);

    /* Radii */
    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 22px;
    --r-xl: 28px;
    --r-pill: 999px;

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

    /* Typography */
    --fs-xs: 0.6875rem;  /* 11px */
    --fs-sm: 0.8125rem;  /* 13px */
    --fs-base: 0.875rem; /* 14px */
    --fs-md: 1rem;       /* 16px */
    --fs-lg: 1.125rem;   /* 18px */
    --fs-xl: 1.5rem;     /* 24px */
    --fs-2xl: 2rem;      /* 32px */
    --fs-3xl: 2.5rem;    /* 40px */
}

/* ─── Dark Theme Overrides ─── */
.dark {
    --c-bg: #1A1D2E;
    --c-surface: #252836;
    --c-surface-hover: #2D3143;
    --c-surface-dim: #1A1D2E;
    --c-input-bg: #1E2133;

    --c-text-1: #FFFFFF;
    --c-text-2: #9CA3B8;
    --c-text-3: #5C6478;

    --c-border: rgba(255,255,255,.08);
    --c-border-light: rgba(255,255,255,.04);

    --shadow-xs: none;
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: 0 8px 40px rgba(0,0,0,.20);
    --shadow-xl: 0 20px 60px rgba(0,0,0,.30);
}

/* ═══════════════════════════════════════════
   Base
   ═══════════════════════════════════════════ */
* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
html.dark body { background: var(--c-bg); color: var(--c-text-1); }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-text-3); }

/* ═══════════════════════════════════════════
   Sidebar Navigation
   ═══════════════════════════════════════════ */
.nav-item {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: 11px 16px;
    border-radius: var(--r-md);
    color: var(--c-text-2);
    font-size: var(--fs-base);
    font-weight: 500;
    transition: all .2s ease;
    cursor: pointer;
    text-decoration: none;
    margin-bottom: 4px;
    position: relative;
}
.nav-item:hover {
    color: var(--c-text-1);
    background: var(--c-surface-dim);
}
.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: .6;
    transition: opacity .2s;
}
.nav-item:hover svg { opacity: .85; }

/* Active nav — solid branded background */
.nav-item.active {
    background: var(--c-brand);
    color: #FFFFFF;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(43,182,115,.25);
}
.nav-item.active svg { opacity: 1; }
.dark .nav-item.active {
    box-shadow: 0 4px 16px rgba(43,182,115,.15);
}

.nav-group-label {
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--c-text-3);
    padding: var(--sp-6) var(--sp-4) var(--sp-2);
}

/* ═══════════════════════════════════════════
   Stat Cards — Big numbers, gradient icon bg
   ═══════════════════════════════════════════ */
.stat-card {
    background: var(--c-surface);
    border-radius: var(--r-xl);
    padding: var(--sp-5) var(--sp-6);
    box-shadow: var(--shadow-md);
    transition: all .3s cubic-bezier(.4,0,.2,1);
    position: relative;
    overflow: hidden;
    border: none;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.dark .stat-card {
    border: 1px solid var(--c-border);
}
.dark .stat-card:hover {
    background: var(--c-surface-hover);
}

/* Colored top border accent — hidden for clean wallet look */
.stat-card-emerald::before,
.stat-card-amber::before,
.stat-card-blue::before,
.stat-card-red::before,
.stat-card-purple::before {
    display: none;
}

.stat-label {
    display: block;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--c-text-3);
    margin-bottom: var(--sp-2);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.stat-value {
    display: block;
    font-size: var(--fs-2xl);
    font-weight: 800;
    line-height: 1;
    color: var(--c-text-1);
    letter-spacing: -.03em;
}

.stat-card-emerald .stat-value { color: #2BB673; }
.stat-card-amber .stat-value   { color: #D97706; }
.stat-card-blue .stat-value    { color: #3B82F6; }
.stat-card-red .stat-value     { color: #EF4444; }
.stat-card-purple .stat-value  { color: #7C3AED; }
.dark .stat-card-emerald .stat-value { color: #4FD1C5; }
.dark .stat-card-amber .stat-value   { color: #FBBF24; }
.dark .stat-card-blue .stat-value    { color: #60A5FA; }
.dark .stat-card-red .stat-value     { color: #F87171; }
.dark .stat-card-purple .stat-value  { color: #A78BFA; }

.stat-sub {
    display: block;
    font-size: var(--fs-xs);
    color: var(--c-text-3);
    margin-top: var(--sp-2);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-icon svg { width: 24px; height: 24px; }

/* ═══════════════════════════════════════════
   Hub Card — Primary content container
   ═══════════════════════════════════════════ */
.hub-card {
    background: var(--c-surface);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: none;
}
.dark .hub-card {
    border: 1px solid var(--c-border);
}

.hub-card-header {
    padding: var(--sp-5) var(--sp-6);
    border-bottom: 1px solid var(--c-border-light);
    font-weight: 700;
    font-size: var(--fs-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    color: var(--c-text-1);
}

.hub-card-body { padding: var(--sp-6); }

/* ═══════════════════════════════════════════
   Data Card — List items / clickable cards
   ═══════════════════════════════════════════ */
.data-card {
    background: var(--c-surface);
    border-radius: var(--r-xl);
    padding: var(--sp-5) var(--sp-6);
    box-shadow: var(--shadow-sm);
    transition: all .3s cubic-bezier(.4,0,.2,1);
    border: none;
}
.data-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.dark .data-card {
    border: 1px solid var(--c-border);
}
.dark .data-card:hover {
    background: var(--c-surface-hover);
}

/* ═══════════════════════════════════════════
   Badges — Pill shape, soft fill
   ═══════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--r-pill);
    font-size: var(--fs-xs);
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: .01em;
}
.badge-emerald { background: rgba(43,182,115,.1); color: #2BB673; }
.badge-amber   { background: rgba(245,158,11,.1); color: #D97706; }
.badge-red     { background: rgba(239,68,68,.1);  color: #DC2626; }
.badge-blue    { background: rgba(59,130,246,.1);  color: #2563EB; }
.badge-gray    { background: rgba(107,114,128,.08); color: #6B7280; }
.badge-purple  { background: rgba(139,92,246,.1);  color: #7C3AED; }
.dark .badge-emerald { background: rgba(79,209,197,.12); color: #4FD1C5; }
.dark .badge-amber   { background: rgba(251,191,36,.12); color: #FBBF24; }
.dark .badge-red     { background: rgba(248,113,113,.12); color: #FCA5A5; }
.dark .badge-blue    { background: rgba(96,165,250,.12);  color: #93C5FD; }
.dark .badge-gray    { background: rgba(255,255,255,.06); color: var(--c-text-2); }
.dark .badge-purple  { background: rgba(167,139,250,.12); color: #C4B5FD; }

/* ═══════════════════════════════════════════
   Buttons — Gradient primary, clean secondary
   ═══════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: 9px 20px;
    border-radius: var(--r-sm);
    font-size: var(--fs-base);
    font-weight: 600;
    transition: all .25s cubic-bezier(.4,0,.2,1);
    cursor: pointer;
    border: none;
    outline: none;
    white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 2px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
    background: var(--c-brand);
    color: white;
    box-shadow: 0 4px 14px rgba(43,182,115,.2);
}
.btn-primary:hover:not(:disabled) {
    background: var(--c-brand-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(43,182,115,.3);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-secondary {
    background: var(--c-surface);
    color: var(--c-text-2);
    border: 1px solid var(--c-border);
}
.btn-secondary:hover:not(:disabled) {
    border-color: var(--c-brand);
    color: var(--c-brand);
    background: rgba(43,182,115,.04);
}
.dark .btn-secondary {
    background: var(--c-surface);
    color: var(--c-text-2);
    border-color: var(--c-border);
}

.btn-danger {
    background: linear-gradient(135deg, #EF4444, #F87171);
    color: white;
    box-shadow: 0 4px 14px rgba(239,68,68,.2);
}
.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239,68,68,.3);
}

.btn-ghost { background: transparent; color: var(--c-text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--c-surface-dim); color: var(--c-text-1); }

.btn-sm { padding: 5px 12px; font-size: var(--fs-sm); border-radius: 8px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-lg { padding: 12px 24px; font-size: var(--fs-md); }

/* ═══════════════════════════════════════════
   Form Inputs
   ═══════════════════════════════════════════ */
.form-label {
    display: block;
    font-size: var(--fs-base);
    font-weight: 600;
    color: var(--c-text-1);
    margin-bottom: var(--sp-2);
}

.form-input {
    width: 100%;
    padding: 13px 18px;
    border: 1.5px solid var(--c-border);
    border-radius: var(--r-md);
    font-size: var(--fs-base);
    background: var(--c-input-bg);
    color: var(--c-text-1);
    transition: all .2s ease;
}
.form-input:focus {
    outline: none;
    border-color: var(--c-brand);
    box-shadow: 0 0 0 4px rgba(43,182,115,.08);
    background: var(--c-surface);
}
.form-input::placeholder { color: var(--c-text-3); }

.form-select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    font-size: var(--fs-base);
    background: var(--c-input-bg);
    color: var(--c-text-1);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7A8D' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px;
    transition: all .2s ease;
}
.form-select:focus {
    outline: none;
    border-color: var(--c-brand);
    box-shadow: 0 0 0 4px rgba(43,182,115,.1);
}

.form-group { margin-bottom: var(--sp-5); }
.form-group:last-child { margin-bottom: 0; }
.form-hint { font-size: var(--fs-xs); color: var(--c-text-3); margin-top: 6px; }
.form-error { font-size: var(--fs-xs); color: #EF4444; margin-top: 6px; }

/* ═══════════════════════════════════════════
   Tables — Clean, spacious rows
   ═══════════════════════════════════════════ */
.hub-table {
    width: 100%;
    font-size: var(--fs-base);
    text-align: left;
    border-collapse: collapse;
    color: var(--c-text-2);
}

.hub-table thead {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--c-text-3);
}

.hub-table thead th {
    padding: var(--sp-3) var(--sp-5);
    font-weight: 700;
    white-space: nowrap;
    border-bottom: 1px solid var(--c-border);
}

.hub-table tbody td {
    padding: var(--sp-4) var(--sp-5);
    border-bottom: 1px solid var(--c-border-light);
    vertical-align: middle;
}

.hub-table tbody tr {
    transition: background .15s;
}
.hub-table tbody tr:hover { background: var(--c-surface-dim); }
.hub-table tbody tr:last-child td { border-bottom: none; }

.hub-table th.text-heading,
.hub-table td.text-heading {
    color: var(--c-text-1);
    font-weight: 600;
}

/* ═══════════════════════════════════════════
   Tabs — Pill active, underline default
   ═══════════════════════════════════════════ */
.tab-item {
    padding: 8px 20px;
    font-size: var(--fs-base);
    font-weight: 500;
    color: var(--c-text-3);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all .2s ease;
    white-space: nowrap;
}
.tab-item:hover { color: var(--c-text-1); background: var(--c-surface-dim); }
.tab-item.active {
    color: white;
    background: var(--c-gradient);
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(43,182,115,.2);
}

/* ═══════════════════════════════════════════
   Filter Chips
   ═══════════════════════════════════════════ */
.qf-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: var(--r-pill);
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-text-2);
}
.qf-chip:hover { border-color: var(--c-brand); color: var(--c-brand); }
.qf-chip-active {
    background: var(--c-gradient) !important;
    color: white !important;
    border-color: transparent !important;
    box-shadow: 0 2px 8px rgba(43,182,115,.2);
}

/* ═══════════════════════════════════════════
   Filter Bar
   ═══════════════════════════════════════════ */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-4) var(--sp-5);
    background: var(--c-surface);
    border-radius: var(--r-xl);
    margin-bottom: var(--sp-5);
    box-shadow: var(--shadow-sm);
}
.dark .filter-bar { border: 1px solid var(--c-border); }

/* ═══════════════════════════════════════════
   Modal — Frosted glass + scale animation
   ═══════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(26,29,46,.50);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-5);
    animation: modalFadeIn .2s ease;
}
.modal-content {
    background: var(--c-surface);
    border-radius: var(--r-xl);
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideUp .3s cubic-bezier(.4,0,.2,1);
}
.dark .modal-content { border: 1px solid var(--c-border); }

@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══════════════════════════════════════════
   Toast
   ═══════════════════════════════════════════ */
.toast {
    padding: 12px 20px;
    border-radius: var(--r-md);
    font-size: var(--fs-base);
    font-weight: 600;
    animation: toastIn .35s cubic-bezier(.4,0,.2,1);
    max-width: 360px;
    box-shadow: var(--shadow-lg);
}
.toast-success { background: var(--c-brand); color: white; }
.toast-error   { background: #EF4444; color: white; }
.toast-warning { background: #F59E0B; color: #1A1D2E; }
@keyframes toastIn {
    from { opacity: 0; transform: translateY(16px) scale(.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══════════════════════════════════════════
   Empty State
   ═══════════════════════════════════════════ */
.empty-state { text-align: center; padding: var(--sp-12) var(--sp-8); }
.empty-state svg { width: 48px; height: 48px; margin: 0 auto 16px; color: var(--c-text-3); opacity: .4; }
.empty-state .empty-title {
    font-size: var(--fs-md);
    font-weight: 700;
    color: var(--c-text-1);
    margin-bottom: var(--sp-2);
}
.empty-state .empty-desc {
    font-size: var(--fs-base);
    color: var(--c-text-2);
    margin-bottom: var(--sp-6);
}

/* ═══════════════════════════════════════════
   Section Header
   ═══════════════════════════════════════════ */
.section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--sp-4);
    margin-bottom: var(--sp-8);
}
.section-title {
    font-size: var(--fs-xl);
    font-weight: 800;
    color: var(--c-text-1);
    line-height: 1.2;
    letter-spacing: -.02em;
}
.section-desc {
    font-size: var(--fs-base);
    color: var(--c-text-2);
    margin-top: 4px;
}

/* ═══════════════════════════════════════════
   Progress Bar
   ═══════════════════════════════════════════ */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--c-border);
    border-radius: var(--r-pill);
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    border-radius: var(--r-pill);
    transition: width .5s cubic-bezier(.4,0,.2,1);
    background: var(--c-gradient);
}

/* ═══════════════════════════════════════════
   Pagination
   ═══════════════════════════════════════════ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: var(--sp-5) 0;
}
.pagination .page-btn {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
    font-size: var(--fs-base);
    font-weight: 600;
    color: var(--c-text-2);
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    cursor: pointer;
    transition: all .2s;
}
.pagination .page-btn:hover { border-color: var(--c-brand); color: var(--c-brand); }
.pagination .page-btn.active {
    background: var(--c-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(43,182,115,.2);
}

/* ═══════════════════════════════════════════
   Avatar
   ═══════════════════════════════════════════ */
.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-pill);
    font-weight: 700;
    flex-shrink: 0;
    background: var(--c-gradient);
    color: white;
}
.avatar-sm { width: 32px; height: 32px; font-size: var(--fs-xs); }
.avatar-md { width: 40px; height: 40px; font-size: var(--fs-base); }
.avatar-lg { width: 48px; height: 48px; font-size: var(--fs-md); }

/* ═══════════════════════════════════════════
   Status Dot
   ═══════════════════════════════════════════ */
.status-dot { width: 8px; height: 8px; border-radius: var(--r-pill); display: inline-block; flex-shrink: 0; }
.status-dot-green { background: var(--c-brand); box-shadow: 0 0 8px rgba(43,182,115,.4); }
.status-dot-amber { background: #F59E0B; box-shadow: 0 0 8px rgba(245,158,11,.4); }
.status-dot-red   { background: #EF4444; box-shadow: 0 0 8px rgba(239,68,68,.4); }
.status-dot-gray  { background: var(--c-text-3); }

/* ═══════════════════════════════════════════
   Metric Colors
   ═══════════════════════════════════════════ */
.metric-emerald { color: #2BB673; }
.metric-amber   { color: #D97706; }
.metric-blue    { color: #3B82F6; }
.metric-red     { color: #EF4444; }
.metric-purple  { color: #7C3AED; }
.dark .metric-emerald { color: #4FD1C5; }
.dark .metric-amber   { color: #FBBF24; }
.dark .metric-blue    { color: #60A5FA; }
.dark .metric-red     { color: #F87171; }
.dark .metric-purple  { color: #A78BFA; }

/* ═══════════════════════════════════════════
   Utility
   ═══════════════════════════════════════════ */
.gradient-text {
    background: var(--c-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ═══════════════════════════════════════════
   v7.0 — Ambient Gradient Background
   ═══════════════════════════════════════════ */
#app::before {
    content: '';
    position: fixed;
    top: -40%;
    right: -20%;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(43,182,115,.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
#app::after {
    content: '';
    position: fixed;
    bottom: -30%;
    left: -15%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(56,201,160,.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.dark #app::before {
    background: radial-gradient(circle, rgba(43,182,115,.05) 0%, transparent 70%);
}
.dark #app::after {
    background: radial-gradient(circle, rgba(56,201,160,.03) 0%, transparent 70%);
}

/* ═══════════════════════════════════════════
   v7.0 — Dashboard Mixed-Size Grid
   ═══════════════════════════════════════════ */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}
.dash-grid .col-3 { grid-column: span 3; }
.dash-grid .col-4 { grid-column: span 4; }
.dash-grid .col-5 { grid-column: span 5; }
.dash-grid .col-6 { grid-column: span 6; }
.dash-grid .col-7 { grid-column: span 7; }
.dash-grid .col-8 { grid-column: span 8; }
.dash-grid .col-12 { grid-column: span 12; }

@media (max-width: 1024px) {
    .dash-grid .col-3 { grid-column: span 6; }
    .dash-grid .col-4 { grid-column: span 6; }
    .dash-grid .col-5 { grid-column: span 12; }
    .dash-grid .col-6 { grid-column: span 12; }
    .dash-grid .col-7 { grid-column: span 12; }
    .dash-grid .col-8 { grid-column: span 12; }
}
@media (max-width: 640px) {
    .dash-grid { gap: 16px; }
    .dash-grid .col-3 { grid-column: span 6; }
}

/* ═══════════════════════════════════════════
   v7.0 — Chart Card
   ═══════════════════════════════════════════ */
.v7-chart-card {
    background: var(--c-surface);
    border-radius: var(--r-xl);
    padding: var(--sp-6);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}
.dark .v7-chart-card {
    border: 1px solid var(--c-border);
}
.v7-chart-card .chart-title {
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--c-text-1);
    margin-bottom: var(--sp-4);
}
.v7-chart-card .chart-container {
    position: relative;
    width: 100%;
}

/* ═══════════════════════════════════════════
   v7.0 — Activity Timeline
   ═══════════════════════════════════════════ */
.activity-timeline {
    background: var(--c-surface);
    border-radius: var(--r-xl);
    padding: var(--sp-6);
    box-shadow: var(--shadow-md);
    height: 100%;
}
.dark .activity-timeline {
    border: 1px solid var(--c-border);
}
.activity-timeline .timeline-title {
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--c-text-1);
    margin-bottom: var(--sp-5);
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}
.timeline-list {
    position: relative;
}
.timeline-item {
    display: flex;
    gap: var(--sp-3);
    padding-bottom: var(--sp-5);
    position: relative;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 32px;
    bottom: 0;
    width: 2px;
    background: var(--c-border);
}
.timeline-item:last-child::before { display: none; }

.timeline-dot {
    width: 32px;
    height: 32px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.timeline-dot svg { width: 16px; height: 16px; }
.timeline-dot-emerald { background: rgba(43,182,115,.1); color: #2BB673; }
.timeline-dot-blue { background: rgba(59,130,246,.1); color: #3B82F6; }
.timeline-dot-red { background: rgba(239,68,68,.1); color: #EF4444; }
.timeline-dot-amber { background: rgba(245,158,11,.1); color: #F59E0B; }
.dark .timeline-dot-emerald { background: rgba(79,209,197,.12); color: #4FD1C5; }
.dark .timeline-dot-blue { background: rgba(96,165,250,.12); color: #60A5FA; }
.dark .timeline-dot-red { background: rgba(248,113,113,.12); color: #FCA5A5; }
.dark .timeline-dot-amber { background: rgba(251,191,36,.12); color: #FBBF24; }

.timeline-content {
    flex: 1;
    min-width: 0;
}
.timeline-action {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--c-text-1);
    line-height: 1.4;
}
.timeline-user {
    font-size: var(--fs-xs);
    color: var(--c-text-3);
    margin-top: 2px;
}
.timeline-time {
    font-size: var(--fs-xs);
    color: var(--c-text-3);
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 2px;
}

/* ═══════════════════════════════════════════
   v7.0 — Collapsible Sidebar Nav Groups
   ═══════════════════════════════════════════ */
.nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-6) var(--sp-4) var(--sp-2);
    cursor: pointer;
    user-select: none;
}
.nav-group-toggle:hover .nav-group-label { color: var(--c-text-2); }
.nav-group-toggle .nav-chevron {
    width: 16px;
    height: 16px;
    color: var(--c-text-3);
    transition: transform .2s ease;
    flex-shrink: 0;
}
.nav-group-toggle.collapsed .nav-chevron {
    transform: rotate(-90deg);
}
.nav-group-items {
    overflow: hidden;
    transition: max-height .25s ease, opacity .2s ease;
    max-height: 500px;
    opacity: 1;
}
.nav-group-items.collapsed {
    max-height: 0;
    opacity: 0;
}

/* ═══════════════════════════════════════════
   v7.0 — Topbar Search
   ═══════════════════════════════════════════ */
.search-topbar {
    background: var(--c-surface-dim);
    border: 1px solid var(--c-border-light);
    border-radius: var(--r-pill);
    padding: 8px 16px 8px 36px;
    font-size: var(--fs-sm);
    color: var(--c-text-1);
    width: 280px;
    max-width: 100%;
    transition: all .25s ease;
    outline: none;
}
.search-topbar:focus {
    border-color: var(--c-brand);
    box-shadow: 0 0 0 3px rgba(43,182,115,.1);
    width: 340px;
    background: var(--c-surface);
}
.search-topbar::placeholder { color: var(--c-text-3); }
.dark .search-topbar {
    background: rgba(255,255,255,.04);
    border-color: rgba(255,255,255,.06);
}
.dark .search-topbar:focus {
    background: rgba(255,255,255,.06);
    border-color: var(--c-brand);
}

/* ═══════════════════════════════════════════
   v7.0 — Login Split Layout
   ═══════════════════════════════════════════ */
.login-split {
    display: flex;
    min-height: 100vh;
}
.login-brand {
    flex: 1;
    background: linear-gradient(135deg, #1A1D2E 0%, #252836 40%, #2D3143 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-12);
    position: relative;
    overflow: hidden;
}
.login-brand::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(43,182,115,.15) 0%, transparent 70%);
    pointer-events: none;
}
.login-brand::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(79,209,197,.1) 0%, transparent 70%);
    pointer-events: none;
}
.login-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-8);
    background: var(--c-bg);
}
.dark .login-form-side {
    background: var(--c-bg);
}
@media (max-width: 768px) {
    .login-split { flex-direction: column; }
    .login-brand { min-height: 200px; flex: none; padding: var(--sp-8); }
    .login-form-side { flex: 1; }
}

/* ═══════════════════════════════════════════
   v7.0 — Dashboard Welcome Banner
   ═══════════════════════════════════════════ */
.dash-welcome {
    background: var(--c-surface);
    border-radius: var(--r-xl);
    padding: var(--sp-8) var(--sp-8);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    margin-bottom: 32px;
}
.dark .dash-welcome {
    border: 1px solid var(--c-border);
}
.dash-welcome::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: linear-gradient(135deg, rgba(43,182,115,.06) 0%, rgba(79,209,197,.04) 100%);
    border-radius: 0 var(--r-xl) var(--r-xl) 0;
    pointer-events: none;
}

/* ═══════════════════════════════════════════
   Responsive — Mobile
   ═══════════════════════════════════════════ */
@media (max-width: 640px) {
    .stat-card { padding: var(--sp-5); }
    .stat-value { font-size: var(--fs-xl); }
    .stat-icon { width: 44px; height: 44px; }
    .stat-icon svg { width: 20px; height: 20px; }
    .hub-card-body { padding: var(--sp-4); }
    .hub-card-header { padding: var(--sp-4); }
    .section-title { font-size: var(--fs-lg); }
    .hub-table thead th,
    .hub-table tbody td { padding: var(--sp-3); }
    .data-card { padding: var(--sp-4); }
}

/* ═══════════════════════════════════════════
   Responsive — Desktop Compact
   Tighten spacing, reduce border-radius,
   smaller stat cards for information density
   ═══════════════════════════════════════════ */
@media (min-width: 1024px) {
    :root {
        --r-xl: 16px;
        --r-lg: 14px;
    }
    .stat-card {
        padding: var(--sp-3) var(--sp-4);
    }
    .stat-value { font-size: var(--fs-xl); }
    .stat-icon { width: 44px; height: 44px; }
    .stat-icon svg { width: 20px; height: 20px; }
    .data-card {
        padding: var(--sp-3) var(--sp-4);
    }
    .data-card:hover {
        transform: translateY(-1px);
    }
    .filter-bar {
        padding: var(--sp-3) var(--sp-4);
    }
    .section-header {
        margin-bottom: var(--sp-6);
    }
}

/* ─── Compact list: tight round selector / notification items ─── */
.compact-list {
    background: var(--c-surface);
    border-radius: var(--r-md);
    padding: var(--sp-3) var(--sp-4);
    border: 1px solid var(--c-border-light);
    transition: background .15s;
    cursor: pointer;
}
.compact-list:hover {
    background: var(--c-surface-dim);
}
.dark .compact-list {
    border-color: var(--c-border);
}
.dark .compact-list:hover {
    background: var(--c-surface-hover);
}

/* ─── Hub table compact variant: denser padding ─── */
.hub-table-compact thead th {
    padding: var(--sp-2) var(--sp-3);
    font-size: 10px;
}
.hub-table-compact tbody td {
    padding: var(--sp-2) var(--sp-3);
    font-size: var(--fs-sm);
}

/* ─── BaiboonModal size variants ─── */
.bm-card.bm-md { max-width: 560px; }
.bm-card.bm-lg { max-width: 720px; text-align: left; }
.bm-card.bm-xl { max-width: 960px; text-align: left; }

/* ═══════════════════════════════════════════
   Print
   ═══════════════════════════════════════════ */
@media print {
    #sidebar, header, #sidebar-overlay { display: none !important; }
    .lg\:pl-64 { padding-left: 0 !important; }
    .stat-card, .hub-card, .data-card { box-shadow: none !important; border: 1px solid #e5e7eb !important; }
}

/* ═══════════════════════════════════════════
   Wizard Stepper (Round Control)
   ═══════════════════════════════════════════ */
.wizard-stepper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: var(--sp-4) var(--sp-2);
    overflow-x: auto;
    gap: 2px;
    -webkit-overflow-scrolling: touch;
}
.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 72px;
    cursor: pointer;
    position: relative;
    flex: 1;
}
.wizard-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-sm);
    font-weight: 700;
    border: 2px solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-text-3);
    transition: all .25s ease;
    flex-shrink: 0;
    z-index: 1;
}
.wizard-step-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--c-text-3);
    text-align: center;
    line-height: 1.2;
    transition: color .2s;
    max-width: 80px;
}
.wizard-step:hover .wizard-step-circle {
    border-color: var(--c-brand);
    color: var(--c-brand);
}
.wizard-step:hover .wizard-step-label { color: var(--c-text-2); }

.wizard-step.active .wizard-step-circle {
    background: var(--c-brand);
    border-color: var(--c-brand);
    color: white;
    box-shadow: 0 4px 14px rgba(43,182,115,.3);
}
.wizard-step.active .wizard-step-label {
    color: var(--c-brand);
    font-weight: 700;
}

.wizard-step.completed .wizard-step-circle {
    background: rgba(43,182,115,.1);
    border-color: var(--c-brand);
    color: var(--c-brand);
}
.wizard-step.completed .wizard-step-label { color: var(--c-text-2); }

/* Connector line between steps */
.wizard-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    left: calc(50% + 22px);
    width: calc(100% - 44px);
    height: 2px;
    background: var(--c-border);
    z-index: 0;
}
.wizard-step.completed:not(:last-child)::after {
    background: var(--c-brand);
}

.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--sp-5) 0;
    margin-top: var(--sp-4);
    border-top: 1px solid var(--c-border-light);
}

@media (max-width: 768px) {
    .wizard-stepper { gap: 0; padding: var(--sp-3) 0; }
    .wizard-step { min-width: 56px; }
    .wizard-step-circle { width: 30px; height: 30px; font-size: 11px; }
    .wizard-step-label { font-size: 9px; max-width: 60px; }
    .wizard-step:not(:last-child)::after { top: 15px; left: calc(50% + 18px); width: calc(100% - 36px); }
}

/* ═══════════════════════════════════════════
   Eval Form Progress (sticky header)
   ═══════════════════════════════════════════ */
.eval-progress-sticky {
    position: sticky;
    top: 72px;
    z-index: 20;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border-light);
    padding: var(--sp-3) var(--sp-4);
    box-shadow: var(--shadow-sm);
    transition: opacity .2s, transform .2s;
    border-radius: 0 0 var(--r-md) var(--r-md);
}
.eval-progress-dots {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
}
.eval-progress-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: all .15s;
    border: 1.5px solid var(--c-border);
    background: var(--c-surface);
}
.eval-progress-dot.answered {
    background: var(--c-brand);
    border-color: var(--c-brand);
}
.eval-progress-dot:hover {
    transform: scale(1.3);
    border-color: var(--c-brand);
}

/* ═══════════════════════════════════════════
   Grade Review — Fullscreen + Print
   ═══════════════════════════════════════════ */
.grade-review-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--c-bg);
    overflow-y: auto;
    padding: var(--sp-6);
}
.dark .grade-review-fullscreen { background: var(--c-bg); }

.grade-review-fullscreen .review-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-3) var(--sp-5);
    background: var(--c-surface);
    border-radius: var(--r-lg);
    margin-bottom: var(--sp-5);
    box-shadow: var(--shadow-sm);
}
.dark .grade-review-fullscreen .review-toolbar { border: 1px solid var(--c-border); }

.grade-edit-yellow { background: rgba(245,158,11,.1) !important; }
.grade-edit-green  { background: rgba(43,182,115,.1) !important; }
.grade-edit-orange { background: rgba(249,115,22,.1) !important; }

/* Jump to top button */
.jump-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--c-brand);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(43,182,115,.3);
    cursor: pointer;
    z-index: 50;
    transition: all .25s;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}
.jump-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.jump-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(43,182,115,.4);
}

/* Report tabs */
.report-tab {
    color: var(--c-text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
}
.report-tab:hover {
    color: var(--c-text);
    background: var(--c-surface);
}
.report-tab.active {
    color: var(--c-brand);
    background: var(--c-surface);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}
.dark .report-tab.active {
    background: var(--c-dark-surface);
    color: var(--c-brand);
}

@media print {
    .grade-review-fullscreen .review-toolbar { display: none !important; }
    .grade-review-fullscreen { position: static; padding: 0; }
    .grade-review-fullscreen table { font-size: 10px; }
    .jump-to-top { display: none !important; }
    .eval-progress-sticky { display: none !important; }
    .report-tab:not(.active) { display: none !important; }
}

/* ═══════════════════════════════════════════
   BaiboonModal — Custom dialog overlay
   ═══════════════════════════════════════════ */
.bm-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26,29,46,.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.bm-overlay.bm-show {
    opacity: 1;
    pointer-events: auto;
}

.bm-card {
    background: var(--c-surface);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-xl);
    padding: 28px 28px 24px;
    width: 90%;
    max-width: 420px;
    text-align: center;
    transform: scale(.92) translateY(12px);
    transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.bm-overlay.bm-show .bm-card {
    transform: scale(1) translateY(0);
}

.dark .bm-card {
    border: 1px solid var(--c-border);
}

.bm-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    margin: 0 auto 14px;
}
.bm-icon-info { background: rgba(43,182,115,.10); }
.bm-icon-confirm { background: rgba(43,182,115,.10); }
.bm-icon-danger { background: rgba(239,68,68,.10); }
.bm-icon-prompt { background: rgba(59,130,246,.10); }

.bm-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--c-text-1);
    margin-bottom: 8px;
}

.bm-body {
    font-size: var(--fs-base);
    color: var(--c-text-2);
    line-height: 1.6;
    margin-bottom: 18px;
    white-space: pre-line;
}

.bm-input-wrap {
    margin-bottom: 18px;
}
.bm-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--c-border);
    border-radius: var(--r-sm);
    background: var(--c-input-bg);
    color: var(--c-text-1);
    font-size: var(--fs-base);
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
}
.bm-input:focus {
    border-color: var(--c-brand);
    box-shadow: 0 0 0 3px rgba(43,182,115,.12);
}

.bm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.bm-btn {
    padding: 9px 22px;
    border-radius: var(--r-sm);
    font-size: var(--fs-base);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all .2s;
    min-width: 90px;
}
.bm-btn:focus-visible {
    outline: 2px solid var(--c-brand);
    outline-offset: 2px;
}

.bm-btn-primary {
    background: var(--c-brand);
    color: white;
}
.bm-btn-primary:hover { background: var(--c-brand-dark); }

.bm-btn-danger {
    background: #EF4444;
    color: white;
}
.bm-btn-danger:hover { background: #DC2626; }

.bm-btn-secondary {
    background: var(--c-surface-dim);
    color: var(--c-text-2);
    border: 1px solid var(--c-border);
}
.bm-btn-secondary:hover {
    background: var(--c-surface-hover);
    color: var(--c-text-1);
}

/* ═══════════════════════════════════════════════════════════════
   Curriculum Manager — 4-column cascading layout
   ═══════════════════════════════════════════════════════════════ */

.curriculum-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    margin-bottom: var(--sp-4);
    padding: var(--sp-2) var(--sp-4);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
}
.dark .curriculum-breadcrumb { background: #252836; border-color: rgba(255,255,255,.06); }

.curriculum-breadcrumb-item {
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--c-text-2);
    padding: 4px 8px;
    border-radius: var(--r-sm);
    transition: all .15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    background: none;
    border: none;
    cursor: pointer;
}
.curriculum-breadcrumb-item:hover { color: var(--c-text-1); background: var(--c-surface-dim); }
.dark .curriculum-breadcrumb-item:hover { color: #fff; background: rgba(255,255,255,.05); }
.curriculum-breadcrumb-item--active { color: var(--c-brand); font-weight: 600; }

.curriculum-manager {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-4);
    align-items: start;
}

.curriculum-column {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 280px);
}
.dark .curriculum-column { background: #252836; border-color: rgba(255,255,255,.06); }

.curriculum-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--c-border);
    flex-shrink: 0;
}
.dark .curriculum-column-header { border-color: rgba(255,255,255,.06); }

.curriculum-add-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
    color: var(--c-brand);
    background: none;
    border: 1px solid var(--c-brand);
    cursor: pointer;
    transition: all .15s;
}
.curriculum-add-btn:hover { background: var(--c-brand); color: #fff; }

.curriculum-list {
    overflow-y: auto;
    flex: 1;
    padding: var(--sp-1) 0;
}

.curriculum-empty {
    padding: var(--sp-10) var(--sp-4);
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.curriculum-item {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-3);
    margin: 2px var(--sp-2);
    border-radius: var(--r-sm);
    transition: all .15s;
    position: relative;
}
.curriculum-item:hover {
    background: var(--c-surface-dim);
}
.dark .curriculum-item:hover { background: rgba(255,255,255,.04); }

.curriculum-item--selected {
    background: rgba(43,182,115,.08) !important;
    border-left: 3px solid var(--c-brand);
    padding-left: calc(var(--sp-3) - 3px);
}
.dark .curriculum-item--selected { background: rgba(43,182,115,.12) !important; }

.curriculum-item--ghost { opacity: .4; background: var(--c-surface-dim); }
.curriculum-item--chosen { box-shadow: var(--shadow-md); }
.curriculum-item--drag { opacity: .8; }

.curriculum-item-drag {
    cursor: grab;
    flex-shrink: 0;
    padding: 2px;
    opacity: .4;
    transition: opacity .15s;
}
.curriculum-item:hover .curriculum-item-drag { opacity: 1; }

.curriculum-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.curriculum-item-label {
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--c-text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dark .curriculum-item-label { color: #fff; }

.curriculum-item-subtitle {
    font-size: var(--fs-xs);
    color: var(--c-text-3);
}

.curriculum-item-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity .15s;
    flex-shrink: 0;
}
.curriculum-item:hover .curriculum-item-actions { opacity: 1; }

.curriculum-action-btn {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: var(--c-text-3);
    background: none;
    border: none;
    cursor: pointer;
    transition: all .15s;
}
.curriculum-action-btn:hover { color: var(--c-text-1); background: var(--c-surface-dim); }
.dark .curriculum-action-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.curriculum-action-btn--danger:hover { color: #EF4444 !important; background: rgba(239,68,68,.08) !important; }

.curriculum-edit-input {
    flex: 1;
    font-size: var(--fs-sm);
    padding: 4px 8px;
    border: 1px solid var(--c-brand);
    border-radius: 6px;
    background: var(--c-surface);
    color: var(--c-text-1);
    outline: none;
}
.dark .curriculum-edit-input { background: #1E2133; color: #fff; border-color: var(--c-brand); }

/* ─── Responsive: tablet 2 cols ─── */
@media (max-width: 1023px) and (min-width: 640px) {
    .curriculum-manager { grid-template-columns: repeat(2, 1fr); }
    .curriculum-column { max-height: 50vh; }
}

/* ─── Responsive: mobile 1 col with active column only ─── */
@media (max-width: 639px) {
    .curriculum-manager { grid-template-columns: 1fr; }
    .curriculum-column { display: none; max-height: 60vh; }
    .curriculum-column--active { display: flex; }
    .curriculum-item-actions { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════
   Cart FAB — Floating Action Button
   ═══════════════════════════════════════════════════════════════ */

.cart-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--sp-3);
    transition: opacity .2s, transform .2s;
}
.cart-fab--hidden { opacity: 0; pointer-events: none; transform: translateY(20px); }

.cart-fab-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--c-gradient);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(43,182,115,.35);
    position: relative;
    transition: transform .15s, box-shadow .15s;
}
.cart-fab-btn:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(43,182,115,.45); }
.cart-fab-btn--active { transform: scale(1.08); }

.cart-fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border-radius: 999px;
    background: #EF4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}
.dark .cart-fab-badge { border-color: #1A1D2E; }

.cart-fab-panel {
    width: 300px;
    max-height: 400px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.dark .cart-fab-panel { background: #252836; border-color: rgba(255,255,255,.06); }

.cart-fab-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--c-border);
    color: var(--c-text-1);
}
.dark .cart-fab-panel-header { border-color: rgba(255,255,255,.06); color: #fff; }

.cart-fab-list {
    overflow-y: auto;
    flex: 1;
    padding: var(--sp-2) var(--sp-3);
}

.cart-fab-item {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-1);
    border-radius: 6px;
    transition: background .15s;
}
.cart-fab-item:hover { background: var(--c-surface-dim); }
.dark .cart-fab-item:hover { background: rgba(255,255,255,.04); }

.cart-fab-panel-footer {
    padding: var(--sp-3) var(--sp-4);
    border-top: 1px solid var(--c-border);
}
.dark .cart-fab-panel-footer { border-color: rgba(255,255,255,.06); }

@media (max-width: 639px) {
    .cart-fab { bottom: 16px; right: 16px; }
    .cart-fab-panel { width: calc(100vw - 32px); max-width: 300px; }
}

/* Desktop compact — tighter curriculum columns */
@media (min-width: 1024px) {
    .curriculum-column { max-height: calc(100vh - 240px); }
    .curriculum-item { padding: 6px 10px; margin: 1px 6px; }
    .curriculum-item-label { font-size: 12px; }
}
