/* =============================================================
   RAISE — Shared Design System
   style.css  |  Pure CSS — no Tailwind dependency
   ============================================================= */

/* ─────────────────────────────────────────────────────────────
   1. DESIGN TOKENS  (CSS Custom Properties)
───────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    /* ── Green Theme Scale ── */
    --theme-50:  #f0fdf4;
    --theme-100: #dcfce7;
    --theme-200: #bbf7d0;
    --theme-300: #86efac;
    --theme-400: #4ade80;
    --theme-500: #22c55e;
    --theme-600: #16a34a;
    --theme-700: #15803d;
    --theme-800: #166534;
    --theme-900: #14532d;

    /* ── Slate / Neutral Scale ── */
    --slate-50:  #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    /* ── Orange Accent ── */
    --orange-50:  #fff7ed;
    --orange-100: #ffedd5;
    --orange-500: #f97316;
    --orange-600: #ea580c;
    --orange-warn: #F57F17;   /* muted orange from GLM theme */

    /* ── Blue Accent ── */
    --blue-50:  #eff6ff;
    --blue-100: #dbeafe;
    --blue-600: #2563eb;

    /* ── Red Accent ── */
    --red-50:  #fef2f2;
    --red-100: #fee2e2;
    --red-600: #dc2626;
    --red-critical: #C62828;  /* muted red from GLM theme */

    /* ── Semantic Aliases (map to green theme) ── */
    --primary-dark:  #1A4D2E;
    --primary-main:  #2D6A4F;
    --primary-light: #52B788;
    --primary-pale:  #E8F5E9;

    /* ── Surface / Layout ── */
    --bg-body:    #F6F7F4;
    --bg-sidebar: #EBF2EB;
    --bg-surface: #FFFFFF;

    /* ── Borders ── */
    --border-subtle: #E2E6E3;
    --border-strong: #D0D6D0;
    --border-light:  var(--slate-100);

    /* ── Text ── */
    --text-main:      #1F2937;
    --text-secondary: #6B7280;
    --text-muted:     #9CA3AF;

    /* ── Accent Semantic ── */
    --accent-critical: var(--red-critical);
    --accent-warning:  var(--orange-warn);
    --accent-success:  var(--primary-main);

    /* ── Shadows ── */
    --shadow-card:  0 4px 24px rgba(26, 77, 46, 0.04);
    --shadow-float: 0 12px 32px rgba(26, 77, 46, 0.08);
    --shadow-sm:    0 2px 10px -3px rgba(6, 81, 237, 0.05);

    /* ── Border Radius Scale ── */
    --radius-3xl: 24px;
    --radius-xl:  20px;
    --radius-lg:  16px;
    --radius-md:  12px;
    --radius-sm:  8px;
    --radius-xs:  4px;
    --radius-pill: 999px;

    /* ── Transitions ── */
    --transition-speed: 0.3s;
    --transition-fast:  0.15s;
}


/* ─────────────────────────────────────────────────────────────
   2. RESET & BASE
───────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    height: 100vh;
    display: flex;
    overflow: hidden;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

input,
select,
textarea {
    font-family: inherit;
}

select {
    background-repeat: no-repeat;
}


/* ─────────────────────────────────────────────────────────────
   3. SIDEBAR
───────────────────────────────────────────────────────────── */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    padding: 32px 20px;
    border-right: 1px solid transparent;
    flex-shrink: 0;
    transition: width var(--transition-speed) ease;
}

.sidebar.sidebar-collapsed {
    width: 72px;
    padding: 32px 12px;
}

.sidebar.sidebar-collapsed .logo,
.sidebar.sidebar-collapsed .sidebar-search {
    display: none !important;
}

.sidebar.sidebar-collapsed .nav-item span,
.sidebar.sidebar-collapsed .sidebar-card {
    display: none;
}

.sidebar.sidebar-collapsed .nav-item {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.sidebar.sidebar-collapsed .sidebar-header {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.sidebar.sidebar-collapsed .nav-section-title {
    visibility: hidden;
}

/* ── Mobile Sidebar & Hamburger Elements (Desktop Hidden) ── */
.mob-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.mob-overlay.open {
    display: block;
    opacity: 1;
}

.mob-hamburger,
.mob-topbar-logo,
.mob-sidebar-close {
    display: none;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 48px;
    padding-left: 12px;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 24px;
    color: var(--primary-main);
    flex-shrink: 0;
}

/* ── Navigation List ── */
.nav-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-main);
    letter-spacing: 0.08em;
    padding: 24px 16px 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: var(--primary-light);
    opacity: 0.3;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    scrollbar-color: transparent transparent;
    transition: scrollbar-color 0.2s ease;
}
.nav-list:hover {
    scrollbar-color: var(--slate-400) rgba(0,0,0,0.02);
}

/* Hide scrollbar by default, show on hover */
@supports not (scrollbar-color: auto) {
    .nav-list::-webkit-scrollbar {
        width: 6px;
        background-color: transparent;
    }
    .nav-list::-webkit-scrollbar-track {
        background-color: transparent;
    }
    .nav-list::-webkit-scrollbar-thumb {
        background-color: transparent;
        border-radius: var(--radius-pill);
    }
    .nav-list:hover::-webkit-scrollbar-thumb {
        background-color: var(--slate-400);
    }
    .nav-list:hover::-webkit-scrollbar-track {
        background-color: rgba(0,0,0,0.02);
    }
}

/* Accordion Styles */
.accordion-toggle {
    cursor: pointer;
    transition: color var(--transition-fast) ease;
}
.accordion-toggle:hover {
    color: var(--primary-dark);
}
.accordion-icon {
    font-size: 14px;
    transition: transform var(--transition-speed) ease;
}
.accordion-toggle.collapsed .accordion-icon {
    transform: rotate(-90deg);
}
.nav-group-container {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows var(--transition-speed) ease-in-out, opacity var(--transition-speed) ease-in-out, margin var(--transition-speed) ease-in-out;
    opacity: 1;
}
.nav-group-container.collapsed {
    grid-template-rows: 0fr;
    opacity: 0;
    pointer-events: none;
}
.nav-group-inner {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-pill);
    font-weight: 500;
    transition: all var(--transition-speed) ease;
    position: relative;
    white-space: nowrap;
    gap: 12px;
}

.nav-item i {
    font-size: 20px;
    color: var(--primary-main);
    flex-shrink: 0;
}

.nav-item:hover {
    background-color: rgba(45, 106, 79, 0.08);
    color: var(--primary-dark);
}

.nav-item.active {
    background-color: var(--primary-main);
    color: #fff;
    box-shadow: 0 4px 12px rgba(45, 106, 79, 0.2);
}

.nav-item.active i {
    color: #fff;
}

/* ── Sidebar Info Card ── */
.sidebar-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-card);
    text-align: center;
    margin-top: auto;
    border: 1px solid var(--border-subtle);
}

.sidebar-card h4 {
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.sidebar-card p {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 16px;
    line-height: 1.4;
}

.btn-sm {
    background-color: var(--primary-dark);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    width: auto;
    transition: background var(--transition-speed);
}

.btn-sm:hover {
    background-color: var(--primary-main);
}

.btn-status-start { background-color: var(--primary-main) !important; color: white !important; }
.btn-status-start:hover { background-color: var(--primary-dark) !important; }

.btn-status-continue { background-color: var(--orange-warn) !important; color: white !important; }
.btn-status-continue:hover { background-color: var(--orange-600) !important; }

.btn-status-review { background-color: var(--theme-600) !important; color: white !important; }
.btn-status-review:hover { background-color: var(--theme-700) !important; }

.btn-status-reevaluate { background-color: var(--red-600) !important; color: white !important; }
.btn-status-reevaluate:hover { background-color: #b91c1c !important; }


/* ─────────────────────────────────────────────────────────────
   4. MAIN CONTENT AREA
───────────────────────────────────────────────────────────── */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 0;
}


/* ─────────────────────────────────────────────────────────────
   5. TOP BAR
───────────────────────────────────────────────────────────── */
.top-bar {
    height: 96px;
    padding: 16px 40px 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(246, 247, 244, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 500;
    margin-bottom: 20px;
}

.search-container {
    position: relative;
    width: 400px;
}

.search-container i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
}

.search-input {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 12px 16px 12px 44px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    color: var(--text-main);
    outline: none;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.search-input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.15);
}

.user-area {
    display: flex;
    align-items: center;
    gap: 24px;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition-speed);
    position: relative;
}

.icon-btn:hover {
    color: var(--primary-main);
}

.notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background-color: var(--accent-critical);
    border-radius: 50%;
    border: 2px solid var(--bg-body);
}

.profile-section {
    position: relative;
    padding-left: 24px;
    border-left: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    z-index: 501;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 8px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s;
    color: var(--text-main);
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

.profile-trigger:hover,
.profile-section.active .profile-trigger {
    background: var(--bg-surface);
    border-color: var(--border-subtle);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.profile-trigger:focus-visible {
    outline: 2px solid var(--theme-500, #22c55e);
    outline-offset: 2px;
}

.profile-trigger .icon {
    font-size: 24px;
    color: var(--primary-main);
}

.profile-trigger .name {
    font-size: 14px;
    font-weight: 600;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-trigger .chevron {
    font-size: 12px;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.profile-section.active .chevron,
.profile-trigger[aria-expanded="true"] .chevron {
    transform: rotate(180deg);
}

.profile-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    width: 220px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
    z-index: 1000;
    padding: 8px 0;
    pointer-events: none;
}

.profile-section.active .profile-menu,
.profile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.profile-menu-item i {
    font-size: 18px;
    width: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-menu-item:hover {
    background: var(--slate-50);
}

.profile-menu-item.danger {
    color: var(--accent-critical);
}

.profile-menu-item.danger:hover {
    background: var(--red-50);
}

.profile-menu-item.disabled {
    color: var(--text-muted);
    cursor: default;
    justify-content: space-between;
}

.profile-menu-item.disabled:hover {
    background: transparent;
}

.coming-soon-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--radius-pill);
    background: var(--slate-100);
    color: var(--slate-500);
}


/* ─────────────────────────────────────────────────────────────
   6. DASHBOARD CONTAINER & LAYOUT
───────────────────────────────────────────────────────────── */
.dashboard-container {
    padding: 0 40px 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    line-height: 1.25;
}

/* Used by simpler pages (assign_officers, coe_report, past_exam_sessions) */
.dashboard-header {
    margin-bottom: 24px;
}

.dashboard-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.dashboard-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.list-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

.card-link {
    font-size: 12px;
    color: var(--primary-main);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.card-link:hover {
    color: var(--primary-dark);
}


/* ─────────────────────────────────────────────────────────────
   7. CARDS
───────────────────────────────────────────────────────────── */
/* Generic white card */
.card {
    background: var(--bg-surface);
    border-radius: var(--radius-3xl);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

/* Hero / Welcome card variant */
.hero-card {
    background: var(--bg-surface);
    border-radius: var(--radius-3xl);
    padding: 32px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
}

.hero-text h1 {
    font-size: 28px;
    color: var(--text-main);
    margin-bottom: 8px;
    font-weight: 700;
}

.hero-text p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 24px;
    font-weight: 500;
}

.hero-visual {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Chips inside hero */
.chips-container {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.chip {
    background-color: var(--bg-sidebar);
    color: var(--primary-dark);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chip i {
    color: var(--primary-light);
}

.chip-warning {
    background-color: var(--orange-50);
    color: var(--orange-warn);
}

.chip-warning i {
    color: var(--orange-warn);
}

/* Content card (used in bottom grid) */
.content-card {
    background: var(--bg-surface);
    border-radius: var(--radius-3xl);
    padding: 24px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
}

/* Workflow section card */
.workflow-section {
    background: var(--bg-surface);
    padding: 32px;
    border-radius: var(--radius-3xl);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-subtle);
}


/* ─────────────────────────────────────────────────────────────
   8. METRIC / KPI CARDS
───────────────────────────────────────────────────────────── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.kpi-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.metric-card,
.kpi-card {
    background: var(--bg-surface);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed), border-color var(--transition-speed);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.kpi-card {
    height: 160px;
}

.metric-card:hover,
.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-float);
    border-color: var(--primary-light);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.kpi-icon,
.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-color: var(--bg-sidebar);
    color: var(--primary-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* The metric-icon variant (used in coe_dashboard grid) */
.metric-icon {
    background-color: var(--theme-50);
    color: var(--theme-700, var(--primary-main));
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.kpi-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.metric-value {
    font-size: 30px;
    font-weight: 700;
    color: var(--slate-800, var(--text-main));
    margin-bottom: 4px;
}

.kpi-label,
.metric-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.metric-label {
    font-size: 12px;
}

.kpi-chart {
    height: 40px;
    width: 100%;
    margin-top: auto;
}


/* ─────────────────────────────────────────────────────────────
   9. BADGES
───────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-xs);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Green / success / low */
.badge-theme {
    background-color: var(--theme-50);
    color: var(--theme-700, var(--primary-main));
}

/* Orange / warning / medium */
.badge-orange {
    background-color: var(--orange-50);
    color: var(--orange-600);
}

/* Blue / info */
.badge-blue {
    background-color: var(--blue-50);
    color: var(--blue-600);
}

/* Program badges used for cycling colors */
.prog-badge-1 { background-color: var(--slate-50); border: 1px solid var(--border-light); color: var(--slate-700); }
.prog-badge-2 { background-color: var(--slate-100); border: 1px solid var(--border-subtle); color: var(--slate-800); }
.prog-badge-3 { background-color: var(--slate-200); border: 1px solid var(--border-strong); color: var(--slate-900); }
.prog-badge-4 { background-color: var(--theme-50); border: 1px solid var(--theme-200); color: var(--theme-800); }
.prog-badge-5 { background-color: var(--orange-50); border: 1px solid var(--orange-100); color: var(--orange-600); }

/* Red / critical */
.badge-red {
    background-color: var(--red-50);
    color: var(--red-600);
}

/* Slate / neutral */
.badge-slate {
    background-color: var(--slate-100);
    color: var(--slate-600);
}

/* Pill-shaped badge (used in hero chips area / nav) */
.badge-pill {
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

/* Alert boxes */
.alert-error {
    color: var(--red-600);
    background-color: var(--red-50);
    border: 1px solid var(--red-100);
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-size: 14px;
}


/* ─────────────────────────────────────────────────────────────
   10. BUTTONS
───────────────────────────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    background-color: var(--primary-main);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-speed), transform var(--transition-fast);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled,
.btn-primary.btn-disabled {
    background-color: var(--border-strong);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

/* Commanding executive button for Controller of Examinations (COE) - themed bordered design */
.btn-coe {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    background-color: var(--primary-pale);
    color: var(--primary-dark);
    border: 2px solid var(--primary-main);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(45, 106, 79, 0.12);
    transition: background-color var(--transition-speed), color var(--transition-speed), border-color var(--transition-speed), transform var(--transition-fast), box-shadow var(--transition-speed);
}

.btn-coe:hover {
    background-color: var(--primary-main);
    color: #ffffff;
    border-color: var(--primary-main);
    box-shadow: 0 4px 12px rgba(45, 106, 79, 0.25);
}

.btn-coe:active {
    transform: scale(0.98);
}

.btn-coe:disabled,
.btn-coe.btn-disabled {
    background-color: var(--border-strong);
    color: var(--text-muted);
    border-color: var(--border-strong);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    background-color: transparent;
    color: var(--primary-main);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.btn-ghost:hover {
    background-color: var(--primary-pale);
    color: var(--primary-dark);
}

.faculty-select-btn {
    min-width: 110px;
    transition: background-color var(--transition-speed), color var(--transition-speed), transform var(--transition-fast);
}

.faculty-select-btn.is-selected {
    min-width: 56px;
    padding-left: 0;
    padding-right: 0;
}

.faculty-select-btn .ph {
    font-size: 16px;
    line-height: 1;
}

.faculty-select-btn .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Text-only action link inside tables */
.btn-link {
    background: none;
    border: none;
    color: var(--primary-main);
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    transition: color var(--transition-fast);
}

.btn-link:hover {
    color: var(--primary-dark);
}

/* Table Action Buttons */
.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-action,
.btn-edit,
.btn-delete,
.btn-reset-pwd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: var(--radius-sm, 6px);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast, 0.15s ease);
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    color: var(--text-main);
    line-height: 1.2;
    white-space: nowrap;
}

.btn-action:hover,
.btn-edit:hover {
    background-color: var(--theme-50);
    border-color: var(--primary-light);
    color: var(--primary-main);
}

.btn-reset-pwd {
    background-color: var(--bg-surface);
    border-color: var(--border-subtle);
    color: var(--primary-main);
}

.btn-reset-pwd:hover {
    background-color: var(--primary-main);
    border-color: var(--primary-main);
    color: #ffffff;
}

.btn-delete {
    background-color: var(--bg-surface);
    border-color: var(--border-subtle);
    color: var(--red-600);
}

.btn-delete:hover {
    background-color: var(--red-600);
    border-color: var(--red-600);
    color: #ffffff;
}

.file-upload-control {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.file-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.file-upload-trigger {
    text-decoration: none;
}

.file-upload-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}


/* ─────────────────────────────────────────────────────────────
   10b. TABS
───────────────────────────────────────────────────────────── */
.tabs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: color var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

.tab-btn:hover {
    color: var(--text-main);
    background-color: var(--primary-pale);
}

.tab-btn.active {
    color: var(--primary-main);
    font-weight: 600;
    border-bottom-color: var(--primary-main);
    background-color: transparent;
}

.tab-btn:focus-visible {
    outline: 2px solid var(--primary-main);
    outline-offset: -2px;
}

.tab-btn .badge {
    font-size: 11px;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    line-height: 1.2;
}

/* ── Segmented Pill Dock Tabs (matching mark_approval) ── */
.approval-tabs,
.segmented-tabs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--slate-100, #f1f5f9);
    padding: 6px;
    border-radius: var(--radius-lg, 12px);
    border: 1px solid var(--border-subtle, #e2e8f0);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

.approval-tabs::-webkit-scrollbar,
.segmented-tabs::-webkit-scrollbar {
    display: none;
}

.tab-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md, 8px);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--slate-600, #475569);
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    user-select: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-link i {
    font-size: 18px;
    color: var(--slate-500, #64748b);
    transition: color 0.2s ease, transform 0.2s ease;
}

.tab-link:hover {
    color: var(--slate-900, #0f172a);
    background: rgba(255, 255, 255, 0.75);
}

.tab-link:hover i {
    color: var(--primary-main);
    transform: scale(1.08);
}

.tab-link.active {
    background: #ffffff;
    color: var(--primary-main, #2D6A4F);
    font-weight: 700;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 6px -1px rgba(0, 0, 0, 0.04);
}

.tab-link.active i {
    color: var(--primary-main, #2D6A4F);
}

/* Tab Count Badges */
.tab-pill-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    background: var(--slate-200, #e2e8f0);
    color: var(--slate-700, #334155);
    line-height: 1;
    min-width: 20px;
    transition: all 0.2s ease;
}

.tab-link.active .tab-pill-badge {
    background: var(--theme-100, #dcfce7);
    color: var(--theme-800, #166534);
    border: 1px solid var(--theme-200, #bbf7d0);
}


/* ─────────────────────────────────────────────────────────────
   11. TABLE
───────────────────────────────────────────────────────────── */
.table-base {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table-base thead tr {
    border-bottom: 1px solid var(--slate-200);
    color: var(--slate-500, var(--text-secondary));
    font-size: 13px;
    font-weight: 600;
}

.table-base th {
    padding: 16px 12px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
}

.table-base tbody tr {
    border-bottom: 1px solid var(--slate-100, var(--border-light));
    transition: background-color var(--transition-fast);
}

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

.table-base tbody tr:hover {
    background-color: var(--slate-50, #f8fafc);
}

.table-base td {
    padding: 16px 12px;
    color: var(--text-main);
    font-size: 14px;
}

.table-base td.text-muted {
    color: var(--slate-500);
}

.table-scroll-container {
    max-height: 400px;
    overflow-y: auto;
    border-bottom: 1px solid var(--slate-200);
    /* Make the header sticky */
    position: relative;
}
.table-scroll-container thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    /* ensure header background doesn't show rows scrolling underneath */
    background-color: var(--slate-50); 
}

.scroll-trigger {
    text-align: center;
    padding: 15px;
    color: var(--slate-500);
    font-size: 14px;
}


/* ─────────────────────────────────────────────────────────────
   12. FORM INPUTS & SELECTS — Unified Design System
───────────────────────────────────────────────────────────── */

/* ── Shared foundation: text inputs, textareas ── */
.input-base,
input.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    background: var(--bg-surface);
    color-scheme: light;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

/* Ensure WebKit date picker calendar icon is clearly visible and clickable */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(30%) sepia(80%) saturate(400%) hue-rotate(105deg);
    opacity: 0.85;
    padding: 2px 4px;
    border-radius: 4px;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* ── Date Input Container & Flatpickr Integration ── */
.date-input-wrap {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.date-input-wrap .input-base,
.date-input-wrap input {
    padding-right: 40px !important;
    cursor: pointer !important;
}

.date-input-wrap .date-picker-icon-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--primary-main);
    font-size: 18px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.date-input-wrap .date-picker-icon-btn:hover {
    color: var(--primary-dark);
    transform: translateY(-50%) scale(1.1);
}

/* ── RAISE Theme for Flatpickr Date Picker ── */
.flatpickr-calendar {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    border: 1px solid var(--border-subtle, #E2E6E3) !important;
    border-radius: var(--radius-md, 8px) !important;
    box-shadow: 0 14px 36px -4px rgba(26, 77, 46, 0.16), 0 4px 14px -2px rgba(0, 0, 0, 0.06) !important;
    background: var(--bg-surface, #ffffff) !important;
    z-index: 999999 !important;
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after {
    border-bottom-color: var(--bg-surface, #ffffff) !important;
}

.flatpickr-calendar.arrowBottom:before,
.flatpickr-calendar.arrowBottom:after {
    border-top-color: var(--bg-surface, #ffffff) !important;
}

.flatpickr-months {
    background: var(--bg-surface, #ffffff) !important;
    border-bottom: 1px solid var(--border-subtle, #E2E6E3) !important;
    padding: 6px 0 !important;
    border-top-left-radius: var(--radius-md, 8px) !important;
    border-top-right-radius: var(--radius-md, 8px) !important;
    align-items: center !important;
}

.flatpickr-current-month {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--text-main, #1F2937) !important;
    padding-top: 2px !important;
}

.flatpickr-current-month .cur-month {
    font-weight: 700 !important;
    color: var(--text-main, #1F2937) !important;
}

.flatpickr-current-month input.cur-year {
    font-weight: 700 !important;
    color: var(--text-main, #1F2937) !important;
}

.flatpickr-prev-month,
.flatpickr-next-month {
    color: var(--primary-main, #2D6A4F) !important;
    fill: var(--primary-main, #2D6A4F) !important;
    padding: 6px 10px !important;
    border-radius: 4px !important;
    transition: background 0.15s ease !important;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
    background: var(--primary-pale, #E8F5E9) !important;
}

.flatpickr-prev-month:hover svg,
.flatpickr-next-month:hover svg {
    fill: var(--primary-dark, #1A4D2E) !important;
}

.flatpickr-weekdays {
    background: var(--bg-surface, #ffffff) !important;
    border-bottom: 1px solid var(--border-subtle, #E2E6E3) !important;
    padding: 4px 0 !important;
}

span.flatpickr-weekday {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: var(--text-muted, #9CA3AF) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.flatpickr-day {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--text-main, #1F2937) !important;
    border-radius: 6px !important;
    height: 34px !important;
    line-height: 34px !important;
    transition: background 0.15s ease, color 0.15s ease !important;
}

.flatpickr-day:hover {
    background: var(--primary-pale, #E8F5E9) !important;
    border-color: transparent !important;
    color: var(--primary-main, #2D6A4F) !important;
}

.flatpickr-day.today {
    border-color: var(--primary-main, #2D6A4F) !important;
    color: var(--primary-main, #2D6A4F) !important;
    font-weight: 700 !important;
}

.flatpickr-day.today:hover {
    background: var(--primary-pale, #E8F5E9) !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: var(--primary-main, #2D6A4F) !important;
    border-color: var(--primary-main, #2D6A4F) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: var(--text-muted, #9CA3AF) !important;
    opacity: 0.35 !important;
    cursor: not-allowed !important;
    background: transparent !important;
    border-color: transparent !important;
}

/* Green Phosphor calendar icon on flatpickr date inputs */
input.flatpickr-input,
.input-base.flatpickr-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 256 256' fill='%232D6A4F'%3E%3Cpath d='M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,48v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80H48V48ZM208,208H48V96H208V208Z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px 16px !important;
    padding-right: 36px !important;
    cursor: pointer !important;
}

.input-base::placeholder,
input.form-control::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.input-base:focus,
input.form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.15);
}

.input-base:disabled,
input.form-control:disabled {
    background: var(--bg-sidebar);
    color: var(--text-muted);
    cursor: not-allowed;
    border-style: dashed;
}

/* Mark entry input in evaluation / grading tables */
.mark-input {
    width: 120px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    padding: 6px 12px;
}

.mark-input::-webkit-outer-spin-button,
.mark-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.mark-input {
    appearance: textfield;
    -moz-appearance: textfield;
}

/* ── Dropdown / Select — native fallback (before JS, or if JS fails) ── */
/* .select-base  : canonical class for all selects
   .form-control : legacy alias
   .form-select  : select variant */
.select-base,
select.form-control,
select.form-select,
.form-select {
    padding: 10px 38px 10px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    background-color: var(--bg-surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232D6A4F' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    cursor: pointer;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

/* Full-width in form contexts */
.form-group > .select-base,
.form-step > .select-base,
.form-group > select.form-control,
.form-step > select.form-control,
.form-group > select.form-select,
.form-step > select.form-select,
.form-group > .form-select,
.form-step > .form-select {
    width: 100%;
}

.select-base:focus,
select.form-control:focus,
select.form-select:focus,
.form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.15);
}

.select-base:hover:not(:disabled),
select.form-control:hover:not(:disabled),
select.form-select:hover:not(:disabled),
.form-select:hover:not(:disabled) {
    border-color: var(--primary-light);
}

.select-base:disabled,
select.form-control:disabled,
select.form-select:disabled,
.form-select:disabled {
    background-color: var(--bg-sidebar);
    color: var(--text-muted);
    cursor: not-allowed;
    border-style: dashed;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    opacity: 0.75;
}


/* ─────────────────────────────────────────────────────────────
   12b. DVSelect — Custom Styled Dropdown Component
   The JS in main.js replaces .select-base elements with this
   component. The native <select> stays hidden for form submit.
───────────────────────────────────────────────────────────── */

/* Wrapper: inline-block so width = content by default.
   Full-width overrides applied per form context below. */
.dv-select-wrapper {
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

/* Full-width in block form contexts */
.form-group > .dv-select-wrapper,
.form-step > .dv-select-wrapper,
[style*="grid-column"] > .dv-select-wrapper {
    display: block;
    width: 100%;
}

/* The visible trigger button */
.dv-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 120px;
    width: 100%;           /* fills wrapper */
    padding: 10px 12px 10px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    text-align: left;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
    white-space: nowrap;
}

.dv-trigger:hover:not([disabled]) {
    border-color: var(--primary-light);
    background: var(--theme-50);
}

.dv-trigger:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.15);
}

.dv-trigger.is-open {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.15);
}

/* Trigger text label */
.dv-value-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dv-value-label.is-placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

/* Animated chevron */
.dv-arrow {
    flex-shrink: 0;
    font-size: 13px;
    color: var(--primary-main);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
}

.dv-trigger.is-open .dv-arrow {
    transform: rotate(180deg);
}

/* Disabled state */
.dv-select-wrapper.is-disabled .dv-trigger {
    background: var(--bg-sidebar);
    color: var(--text-muted);
    border-style: dashed;
    cursor: not-allowed;
    opacity: 0.7;
}

.dv-select-wrapper.is-disabled .dv-arrow {
    color: var(--text-muted);
}


/* ── Dropdown Panel ── */
.dv-panel {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    min-width: 100%;          /* at least as wide as the trigger */
    max-width: max(100%, 320px);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    box-shadow:
        0 10px 28px -4px rgba(26, 77, 46, 0.12),
        0 4px 10px -2px rgba(0, 0, 0, 0.07);
    z-index: 1000;
    overflow: hidden;

    /* Slide-in animation */
    opacity: 0;
    transform: translateY(-5px) scale(0.99);
    pointer-events: none;
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.dv-panel.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Options list */
.dv-options {
    list-style: none;
    margin: 0;
    padding: 5px 0;
    max-height: 248px;
    overflow-y: auto;
    scrollbar-color: var(--border-subtle) transparent;
}
.dv-options:hover {
    scrollbar-color: var(--primary-light) transparent;
}

/* Custom slim scrollbar */
@supports not (scrollbar-color: auto) {
    .dv-options::-webkit-scrollbar { width: 4px; }
    .dv-options::-webkit-scrollbar-track { background: transparent; }
    .dv-options::-webkit-scrollbar-thumb {
        background: var(--border-subtle);
        border-radius: 4px;
    }
    .dv-options::-webkit-scrollbar-thumb:hover {
        background: var(--primary-light);
    }
}


/* ── Individual Option Item ── */
.dv-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 14px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    user-select: none;
    border-left: 2px solid transparent;
    transition:
        background var(--transition-fast),
        color var(--transition-fast),
        border-color var(--transition-fast);
}

.dv-option:hover:not(.is-placeholder):not(.is-disabled) {
    background: var(--primary-pale);
    color: var(--primary-dark);
    border-left-color: var(--primary-light);
}

/* Selected state */
.dv-option.is-selected {
    background: var(--theme-100);
    color: var(--primary-main);
    font-weight: 600;
    border-left-color: var(--primary-main);
}

.dv-option.is-selected:hover {
    background: var(--theme-100);
    color: var(--primary-dark);
}

/* Checkmark on selected item */
.dv-check {
    flex-shrink: 0;
    font-size: 13px;
    color: var(--primary-main);
}

/* Placeholder option ("Select X..." first item) */
.dv-option.is-placeholder {
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 400;
    font-style: italic;
    cursor: default;
    padding: 8px 14px 10px;
    border-bottom: 1px solid var(--border-subtle);
    border-left-color: transparent !important;
    background: transparent !important;
}

/* Disabled option */
.dv-option.is-disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    pointer-events: none;
}


/* ── Filter-row layout (search + select side by side) ── */
.filter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-row .input-base,
.filter-row .select-base,
.filter-row .dv-select-wrapper,
.filter-row .ts-wrapper,
.filters .select-base,
.filters .dv-select-wrapper,
.filters .ts-wrapper,
.filters-container .select-base,
.filters-container .dv-select-wrapper,
.filters-container .ts-wrapper,
#qp-filters .select-base,
#qp-filters .dv-select-wrapper,
#qp-filters .ts-wrapper,
.filter-item .ts-wrapper,
.filter-item select,
.filter-item .dv-select-wrapper {
    flex: 1 1 250px;
    min-width: 220px;
    max-width: 450px;
}

.filter-row {
    flex-wrap: wrap;
}


/* ─────────────────────────────────────────────────────────────
   13. PROGRESS BAR (horizontal)
───────────────────────────────────────────────────────────── */
.progress-bar-bg {
    height: 6px;
    background-color: var(--border-subtle);
    border-radius: 10px;
    width: 100%;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--primary-light);
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* Thinner variant used in coe_dashboard programme rows */
.progress-bar-bg.thin {
    height: 6px;
}

.progress-bar-fill.theme {
    background-color: var(--theme-500, var(--primary-light));
}

.progress-container {
    width: 100px;
    margin-right: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


/* ─────────────────────────────────────────────────────────────
   14. CIRCULAR CHART (SVG)
───────────────────────────────────────────────────────────── */
.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 80%;
    max-height: 250px;
}

.circle-bg {
    fill: none;
    stroke: var(--slate-200, #e2e8f0);
    stroke-width: 3.8;
}

.circle {
    fill: none;
    stroke-width: 3.8;
    stroke-linecap: round;
    animation: circular-progress 1s ease-out forwards;
}

@keyframes circular-progress {
    0% { stroke-dasharray: 0 100; }
}

.percentage {
    fill: var(--text-main);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.5em;
    text-anchor: middle;
}

.percentage-label {
    fill: var(--text-secondary);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.2em;
    text-anchor: middle;
}

/* SVG ring style (GLM variant) */
.progress-ring {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

/* ─────────────────────────────────────────────────────────────
   NOTIFICATIONS DROPDOWN
───────────────────────────────────────────────────────────── */

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    width: 320px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.notification-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
}

.dropdown-header .mark-all-read {
    background: none;
    border: none;
    color: var(--primary-main);
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
}

.dropdown-header .mark-all-read:hover {
    text-decoration: underline;
}

.notification-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
}

.notification-list li {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    transition: background 0.15s ease;
    cursor: pointer;
}

.notification-list li:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.notification-list li.is-unread {
    background-color: rgba(45, 106, 79, 0.04);
}

.notification-list li.is-unread:hover {
    background-color: rgba(45, 106, 79, 0.08);
}

.notification-list li.is-read {
    background-color: transparent;
    opacity: 0.72;
}

.notification-list li.is-read:hover {
    background-color: rgba(0, 0, 0, 0.02);
    opacity: 0.95;
}

.notification-list li:last-child {
    border-bottom: none;
}

.notification-list .notif-title {
    font-size: 13px;
    color: var(--text-main);
    margin-bottom: 4px;
    font-weight: 500;
}

.notification-list li.is-expanded {
    background-color: rgba(0, 0, 0, 0.04);
}

.notification-list li.is-expanded .notif-title-text {
    white-space: normal !important;
    overflow: visible !important;
}

.notification-list li.is-expanded .notif-message {
    display: block !important;
}

.notification-list .notif-time {
    font-size: 11px;
    color: var(--text-muted);
}

.notification-list .notif-check-btn {
    background: none;
    border: none;
    padding: 4px 6px;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.notification-list .notif-check-btn:hover {
    color: var(--primary-main);
    background-color: rgba(45, 106, 79, 0.1);
}

.no-notifications {
    padding: 24px !important;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    cursor: default !important;
}

.no-notifications:hover {
    background: none !important;
}


.progress-ring__circle {
    transition: stroke-dashoffset 1s ease-in-out;
    transform-origin: 50% 50%;
}

.progress-text {
    position: absolute;
    text-align: center;
}

.progress-text span {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-dark);
}

.progress-text small {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* ─────────────────────────────────────────────────────────────
   15. ACTIVITY TIMELINE
───────────────────────────────────────────────────────────── */
.timeline {
    position: relative;
    padding-left: 16px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 0;
    width: 2px;
    background-color: var(--border-subtle);
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding-left: 16px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -19px;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary-light);
    border: 2px solid white;
}

.timeline-text {
    font-size: 13px;
    color: var(--text-main);
    font-weight: 600;
    line-height: 1.4;
}

.timeline-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Alternative border-left timeline (coe_dashboard style) */
.activity-timeline {
    position: relative;
    border-left: 2px solid var(--slate-100);
    margin-left: 8px;
    padding-left: 16px;
}

.activity-timeline .activity-item {
    position: relative;
    margin-bottom: 20px;
}

.activity-timeline .activity-dot {
    position: absolute;
    left: -25px;
    top: 4px;
    width: 12px;
    height: 12px;
    background-color: var(--theme-500, var(--primary-light));
    border-radius: 50%;
    border: 2px solid var(--bg-surface);
}

.activity-timeline .activity-dot.muted {
    background-color: var(--slate-300);
}

.activity-timeline .activity-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.activity-timeline .activity-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.quick-link-item {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 6px 10px;
    margin: -6px -10px;
    border-radius: var(--radius-md);
    transition: background var(--transition-speed) ease;
}

.quick-link-item:hover {
    background-color: var(--theme-50, #f0fdf4);
}

.quick-link-item:hover .activity-title {
    color: var(--primary-main);
}


/* ─────────────────────────────────────────────────────────────
   16. WORKFLOW TRACKER
───────────────────────────────────────────────────────────── */
.workflow-tracker {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 0 20px;
}

.workflow-line {
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 2px;
    background-color: var(--border-subtle);
    z-index: 1;
}

.workflow-progress {
    position: absolute;
    top: 20px;
    left: 40px;
    height: 2px;
    background-color: var(--primary-main);
    z-index: 2;
    width: 65%;
}

.step {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100px;
    text-align: center;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-surface);
    border: 2px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    transition: all var(--transition-speed);
}

.step.completed .step-circle {
    background-color: var(--primary-main);
    border-color: var(--primary-main);
    color: white;
}

.step.active .step-circle {
    border-color: var(--primary-main);
    color: var(--primary-main);
    box-shadow: 0 0 0 4px rgba(45, 106, 79, 0.1);
}

.step-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.step.active .step-label {
    color: var(--primary-main);
    font-weight: 700;
}


/* ─────────────────────────────────────────────────────────────
   17. SUBJECT / PROGRAMME ROWS
───────────────────────────────────────────────────────────── */
.subject-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    margin-bottom: 12px;
    transition: background var(--transition-speed);
    gap: 12px;
}

.subject-item:hover {
    background-color: var(--slate-50, #f8fafc);
    border-color: var(--border-subtle);
}

.subject-info {
    flex: 1;
}

.subject-code {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    display: block;
    margin-bottom: 4px;
}

.subject-name {
    font-size: 13px;
    color: var(--text-secondary);
}

.subject-stats {
    display: flex;
    gap: 16px;
    margin-right: 24px;
}

.stat-box {
    text-align: center;
}

.stat-box .num {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.stat-box .lbl {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.status-badge {
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background-color: rgba(45, 106, 79, 0.1);
    color: var(--primary-main);
}


/* ─────────────────────────────────────────────────────────────
   18. PENDING ACTIONS
───────────────────────────────────────────────────────────── */
.action-item {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.action-item:last-child {
    border-bottom: none;
}

.action-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.action-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.priority-chip {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.prio-critical {
    background-color: rgba(198, 40, 40, 0.1);
    color: var(--accent-critical);
}

.prio-medium {
    background-color: rgba(245, 127, 23, 0.1);
    color: var(--accent-warning);
}

.prio-low {
    background-color: rgba(45, 106, 79, 0.1);
    color: var(--primary-main);
}

.action-meta {
    font-size: 12px;
    color: var(--text-secondary);
}


/* ─────────────────────────────────────────────────────────────
   19. CHART CONTAINERS
───────────────────────────────────────────────────────────── */
.chart-container {
    height: 200px;
    width: 100%;
    margin-bottom: 16px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: auto;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-square {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}


/* ─────────────────────────────────────────────────────────────
   20. BOTTOM GRID LAYOUT
───────────────────────────────────────────────────────────── */
.bottom-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 24px;
}

/* Responsive 3-column grid for report cards */
.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}


/* ─────────────────────────────────────────────────────────────
   21. LOGIN PAGE  (standalone, no sidebar)
───────────────────────────────────────────────────────────── */
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    height: auto;
    overflow: auto;
    background-color: var(--slate-50, #f8fafc);
}

.login-card {
    background: white;
    width: 100%;
    max-width: 440px;
    padding: 48px;
    border-radius: var(--radius-3xl);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    text-align: center;
}

.login-card .logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--slate-900);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
    padding-left: 0;
}

.login-card .logo i {
    color: var(--primary-main);
    font-size: 32px;
}

.login-card h2 {
    font-size: 28px;
    color: var(--slate-900);
    margin-bottom: 8px;
    font-weight: 700;
}

.login-card .subtitle {
    color: var(--slate-500);
    margin-bottom: 32px;
    font-size: 15px;
}

.form-group {
    text-align: left;
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: 8px;
}

.form-group input[type="email"],
.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--slate-900);
    transition: all 0.2s ease;
    outline: none;
    font-family: inherit;
}

.form-group input:focus {
    border-color: var(--primary-main);
    box-shadow: 0 0 0 4px rgba(45, 106, 79, 0.1);
}

.login-card .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border-radius: var(--radius-md);
}

.auth-note {
    margin-top: 24px;
    font-size: 13px;
    color: var(--slate-400);
    background: var(--slate-100);
    padding: 12px;
    border-radius: var(--radius-sm);
}


/* ─────────────────────────────────────────────────────────────
   22. RESPONSIVE HELPERS
───────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .bottom-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }

    .dashboard-container {
        padding: 0 24px 40px;
    }

    .top-bar {
        padding: 0 24px;
    }

    .search-container {
        width: 280px;
    }

    .dashboard-main-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .kpi-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    body {
        overflow: hidden;
        height: 100vh;
        height: 100dvh;
    }

    body.mob-sidebar-active {
        overflow: hidden;
    }

    /* Off-canvas mobile sidebar */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        height: 100dvh !important;
        width: 280px !important;
        max-width: 85vw !important;
        z-index: 1050 !important;
        background-color: var(--bg-sidebar);
        flex-direction: column !important;
        padding: 24px 16px !important;
        transform: translateX(-100%);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-right: 1px solid var(--border-subtle);
        border-bottom: none !important;
        box-shadow: none;
    }

    .sidebar.mob-open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
    }

    /* Guard against desktop collapsed rules bleeding into mobile */
    .sidebar.sidebar-collapsed {
        width: 280px !important;
        padding: 24px 16px !important;
    }
    .sidebar.sidebar-collapsed .logo,
    .sidebar.sidebar-collapsed .sidebar-search,
    .sidebar.sidebar-collapsed .nav-item span,
    .sidebar.sidebar-collapsed .sidebar-card {
        display: flex !important;
    }
    .sidebar.sidebar-collapsed .nav-section-title {
        visibility: visible !important;
    }

    .sidebar .sidebar-header {
        margin-bottom: 24px !important;
    }

    .sidebar .nav-list {
        flex-direction: column;
        width: 100%;
        overflow-x: visible;
        overflow-y: auto;
    }

    .sidebar .sidebar-card {
        display: block;
    }

    #sidebar-toggle {
        display: none !important;
    }

    .mob-sidebar-close {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--text-secondary);
        font-size: 22px;
        padding: 4px;
        border-radius: var(--radius-sm);
        transition: color var(--transition-speed);
    }
    .mob-sidebar-close:hover {
        color: var(--text-main);
    }

    /* Mobile Topbar & Hamburger */
    .top-bar {
        height: auto;
        min-height: 56px;
        padding: 10px 16px;
        margin-bottom: 12px;
    }

    .mob-hamburger {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--primary-main);
        font-size: 24px;
        padding: 4px;
        border-radius: var(--radius-sm);
    }

    .mob-topbar-logo {
        display: inline-flex !important;
    }

    .user-area {
        gap: 10px;
    }

    /* ── Session Switcher: compact icon-only pill on mobile ── */
    .session-switcher {
        position: static;
    }

    .session-switcher > button {
        min-width: unset !important;
        padding: 7px 10px !important;
        gap: 6px !important;
        border-radius: 10px !important;
    }

    /* Hide the text columns inside the session button; keep icon + caret */
    .session-switcher > button > div:first-child > div:last-child {
        display: none !important;
    }

    /* Keep the icon column */
    .session-switcher > button > div:first-child {
        gap: 0 !important;
    }

    /* Keep the caret */
    .session-caret-bg {
        width: 18px !important;
        height: 18px !important;
    }

    /* Session dropdown: full width from edge of screen */
    #topbar-session-dropdown {
        position: fixed !important;
        left: 12px !important;
        right: 12px !important;
        top: 68px !important;
        margin-top: 0 !important;
        min-width: unset !important;
        width: auto !important;
        z-index: 1100 !important;
    }

    /* ── Notification Dropdown: clamp to viewport ── */
    .notification-dropdown {
        position: fixed !important;
        right: 12px !important;
        left: 12px !important;
        top: 68px !important;
        width: auto !important;
        margin-top: 0 !important;
        z-index: 1100 !important;
        max-height: 70vh;
        overflow-y: auto;
    }

    /* ── Profile: icon-only on mobile ── */
    .profile-section {
        padding-left: 10px;
        border-left: 1px solid var(--border-subtle);
    }

    .profile-trigger {
        padding: 6px 8px !important;
        gap: 0 !important;
    }

    .profile-trigger .name,
    .profile-trigger .chevron {
        display: none !important;
    }

    .profile-trigger .icon {
        font-size: 26px;
    }

    /* Profile menu: also clamped */
    .profile-menu {
        position: fixed !important;
        right: 12px !important;
        left: 12px !important;
        top: 68px !important;
        width: auto !important;
        z-index: 1100 !important;
    }

    .main-wrapper {
        height: 100vh;
        height: 100dvh;
        width: 100%;
    }

    .main-content {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0;
    }

    .dashboard-container {
        padding: 0 16px 32px;
        gap: 20px;
    }

    .hero-title {
        font-size: 22px;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .kpi-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .metric-card,
    .kpi-card {
        padding: 16px 14px;
    }

    .content-card {
        padding: 18px 16px;
    }

    .subject-item {
        padding: 10px 12px;
    }

    .bottom-grid {
        grid-template-columns: 1fr;
    }

    .hero-card {
        flex-direction: column;
        gap: 16px;
        padding: 20px 16px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 20px;
    }

    .chips-container {
        gap: 8px;
    }

    .chip {
        padding: 6px 12px;
        font-size: 12px;
    }

    .subject-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .subject-stats {
        margin-right: 0;
        width: 100%;
    }
}

@media (max-width: 360px) {
    .kpi-grid,
    .kpi-grid-4 {
        grid-template-columns: 1fr;
    }
}


/* ── 22. CUSTOM JS ALERTS ── */
.alert-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.custom-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    transform: translateX(120%);
    opacity: 0;
    animation: slideInAlert 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    min-width: 280px;
    max-width: 400px;
}

.custom-alert.fade-out {
    animation: fadeOutAlert 0.3s ease forwards;
}

.custom-alert.success {
    background-color: var(--theme-50);
    color: var(--theme-700);
    border: 1px solid var(--theme-300);
}

.custom-alert.error {
    background-color: var(--red-50);
    color: var(--red-600);
    border: 1px solid #fca5a5;
}

.custom-alert.warning {
    background-color: var(--orange-50);
    color: var(--orange-600);
    border: 1px solid #fdba74;
}

.custom-alert.info {
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.custom-alert i {
    font-size: 20px;
}

@keyframes slideInAlert {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOutAlert {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* ─────────────────────────────────────────────────────────────
   23. DANGER / DELETE ACTIONS
───────────────────────────────────────────────────────────── */

/* Small outlined ghost-danger button — used in table action cells */
.btn-delete {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    background-color: var(--red-50);
    color: var(--red-600) !important;
    border: 1px solid rgba(220, 38, 38, 0.35);
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    letter-spacing: 0.02em;
    line-height: 1;
    text-decoration: none;
    transition: background-color var(--transition-fast), color var(--transition-fast),
                border-color var(--transition-fast), transform var(--transition-fast);
}
.btn-delete i { font-size: 13px; }
.btn-delete:hover {
    background-color: var(--red-600);
    color: #ffffff !important;
    border-color: var(--red-600);
}
.btn-delete:active  { transform: scale(0.95); }
.btn-delete:disabled { opacity: 0.5; cursor: not-allowed; }


/* Flex wrapper for table action cells — replaces the old | separator */
.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

/* Solid red button — mirrors .btn-primary but in red */
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    background-color: var(--red-600);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    transition: background-color var(--transition-speed), transform var(--transition-fast);
}
.btn-danger:hover    { background-color: var(--accent-critical); }
.btn-danger:active   { transform: scale(0.97); }
.btn-danger:disabled { opacity: 0.6; cursor: not-allowed; }

/* Warning / Orange Button */
.btn-warning {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--orange-warn);
    color: white;
    border: 1px solid var(--orange-warn);
    border-radius: var(--radius-md);
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    transition: background-color var(--transition-speed), transform var(--transition-fast);
}
.btn-warning:hover    { background-color: var(--orange-600); border-color: var(--orange-600); color: white; }
.btn-warning:active   { transform: scale(0.97); }
.btn-warning:disabled { opacity: 0.6; cursor: not-allowed; }


/* ─────────────────────────────────────────────────────────────
   24. CONFIRM DELETE MODAL
   Reusable overlay + card for destructive-action confirmation.
   Toggle visibility with the .is-open class via JS.
───────────────────────────────────────────────────────────── */

.confirm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.confirm-overlay.is-open { display: flex; }

.confirm-card {
    background: var(--bg-surface);
    border-radius: var(--radius-3xl);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-float);
    width: 440px;
    max-width: 95vw;
    padding: 28px 28px 24px;
    animation: confirmCardIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─────────────────────────────────────────────────────────────
   25. GENERAL MODAL
   For larger forms or detail views.
───────────────────────────────────────────────────────────── */

.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.modal-backdrop.is-open { display: flex; }

.modal-card {
    background: var(--bg-surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-float);
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: confirmCardIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes confirmCardIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)     scale(1);    }
}

/* Red circular icon badge */
.confirm-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--red-50);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.confirm-icon-wrap i {
    font-size: 24px;
    color: var(--red-600);
}

.confirm-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 8px;
}

.confirm-message {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 24px;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.confirm-actions .btn-danger {
    background-color: var(--red-600);
    color: #ffffff;
    border: none;
}

.confirm-actions .btn-danger:hover {
    background-color: var(--accent-critical);
}


/* ─────────────────────────────────────────────────────────────
   25. TOAST NOTIFICATION BANNER
   Slides up from the bottom-right corner.
   Toggle .is-visible to show; set .toast-success / .toast-error
   for colour variant.
───────────────────────────────────────────────────────────── */

.toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    min-width: 260px;
    max-width: 380px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    background: var(--bg-surface, #ffffff);
    background-color: var(--bg-surface, #ffffff);
    isolation: isolate;
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    box-shadow: var(--shadow-float);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.toast-success {
    color: var(--primary-main);
    border-left: 4px solid var(--primary-main);
}
.toast-error {
    color: var(--red-600);
    border-left: 4px solid var(--red-600);
}
.toast i { font-size: 18px; flex-shrink: 0; }

/* ── Custom Tooltip ── */
.tooltip-container {
    position: relative;
}

.custom-tooltip {
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%) translateX(8px);
    background-color: var(--bg-surface, #ffffff);
    color: var(--text-main, #1F2937);
    padding: 6px 12px;
    border-radius: var(--radius-sm, 4px);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    box-shadow: var(--shadow-card, 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06));
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 9999;
    pointer-events: none;
}

.tooltip-container:hover .custom-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(12px);
}


/* ─────────────────────────────────────────────────────────────
   26. BUNDLE CREATION PANEL  (assign_first_eval page)
───────────────────────────────────────────────────────────── */

/* Info notice when no bundles exist yet */
.bundle-no-data {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--orange-50);
    border: 1px solid var(--orange-100);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--orange-600);
    margin-top: 8px;
}

/* Orange notice box wrapping the creation controls */
.bundle-unassigned-notice {
    background: var(--orange-50);
    border: 1px solid #fed7aa;
    border-radius: var(--radius-md);
    padding: 16px;
}

/* Selectable radio card for bundle size options */
.bundle-size-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.bundle-size-option:has(input:checked) {
    border-color: var(--primary-main);
    background: var(--primary-pale);
}

.bundle-size-option input[type="radio"] {
    margin-top: 3px;
    accent-color: var(--primary-main);
    flex-shrink: 0;
}

.bundle-size-option-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bundle-size-option-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-main);
}

.bundle-size-option-meta {
    font-size: 12px;
    color: var(--text-secondary);
}


/* ─────────────────────────────────────────────────────────────
   27. ASSIGNMENT FORM STEPS  (assign_first_eval / assign_chief_eval)
───────────────────────────────────────────────────────────── */

.form-step {
    margin-bottom: 20px;
    transition: opacity var(--transition-speed) ease;
}

.form-step.active {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-main);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Evaluator search result dropdown */
.evaluator-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-float);
    max-height: 240px;
    overflow-y: auto;
    margin-top: 4px;
}

.eval-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.eval-result-row:last-child { border-bottom: none; }

.eval-result-row:hover { background: var(--primary-pale); }

.eval-result-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
}

.eval-result-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* Chairperson search result dropdown */
.chair-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 60;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-float);
    max-height: 220px;
    overflow-y: auto;
    margin-top: 4px;
}

.chair-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.chair-result-row:last-child { border-bottom: none; }
.chair-result-row:hover { background: var(--primary-pale); }
.chair-result-name { font-weight: 600; font-size: 14px; color: var(--text-main); }
.chair-result-dept { font-size: 12px; color: var(--text-muted); }

/* ─────────────────────────────────────────────────────────────
   30. TOM SELECT OVERRIDES (To match RAISE theme)
───────────────────────────────────────────────────────────── */
.ts-control {
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-md) !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    color: var(--text-main) !important;
    background-color: var(--bg-surface) !important;
    box-shadow: none !important;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed) !important;
}

.ts-control.focus {
    border-color: var(--primary-light) !important;
    box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.15) !important;
}

.ts-dropdown {
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-float) !important;
    font-size: 14px !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    margin-top: 4px !important;
}

.ts-dropdown .option {
    padding: 10px 14px !important;
    color: var(--text-main) !important;
    transition: background var(--transition-fast) !important;
}

.ts-dropdown .option.active,
.ts-dropdown .option:hover {
    background-color: var(--primary-pale) !important;
    color: var(--primary-main) !important;
    font-weight: 600 !important;
}

.ts-wrapper.single .ts-control:after {
    border-color: var(--text-secondary) transparent transparent transparent !important;
}

/* Default TomSelect behavior preserved to avoid layout bugs */

/* ── QP Filter Tom Select overrides (compact style) ── */
#qp-filters .ts-wrapper {
    min-height: 32px !important;
}

#qp-filters .ts-control {
    padding: 4px 10px !important;
    font-size: 13px !important;
    min-height: 32px !important;
    line-height: 22px !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-md) !important;
    background-color: var(--bg-surface) !important;
    box-shadow: none !important;
}

#qp-filters .ts-control > .item {
    font-size: 13px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    border: none !important;
    color: var(--text-main) !important;
    box-shadow: none !important;
    display: inline-block !important;
}

#qp-filters .ts-control > input {
    font-size: 13px !important;
}

#qp-filters .ts-dropdown {
    font-size: 13px !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-float) !important;
}

#qp-filters .ts-dropdown .option {
    padding: 6px 10px !important;
    font-size: 13px !important;
}


/* ─────────────────────────────────────────────────────────────
   23. ACCESSIBILITY PANEL
   Slide-in drawer triggered from the profile menu.
───────────────────────────────────────────────────────────── */

.a11y-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.a11y-overlay.open {
    opacity: 1;
    visibility: visible;
}

.a11y-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 360px;
    background: var(--bg-surface);
    border-left: 1px solid var(--border-subtle);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.a11y-panel.open {
    transform: translateX(0);
}

.a11y-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.a11y-panel-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.a11y-panel-header h2 i {
    font-size: 20px;
    color: var(--primary-main);
}

.a11y-panel-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: background 0.2s, color 0.2s;
    line-height: 1;
}

.a11y-panel-close:hover {
    background: var(--slate-100);
    color: var(--text-main);
}

.a11y-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0 24px;
}

.a11y-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 20px 24px 8px;
}

.a11y-section-title:first-child {
    padding-top: 16px;
}

.a11y-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 24px;
    transition: background 0.15s;
}

.a11y-toggle-row:hover {
    background: var(--slate-50);
}

.a11y-toggle-label {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.a11y-toggle-label strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.a11y-toggle-label span {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Toggle switch component */
.a11y-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.a11y-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.a11y-switch-track {
    position: absolute;
    inset: 0;
    background: var(--border-strong);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: background 0.2s;
}

.a11y-switch-track::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.a11y-switch input:checked + .a11y-switch-track {
    background: var(--primary-main);
}

.a11y-switch input:checked + .a11y-switch-track::after {
    transform: translateX(20px);
}

.a11y-switch input:focus-visible + .a11y-switch-track {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

.a11y-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 8px 24px;
}

.a11y-reset-btn {
    display: block;
    width: calc(100% - 48px);
    margin: 20px 24px 0;
    padding: 10px;
    background: none;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    font-family: inherit;
}

.a11y-reset-btn:hover {
    background: var(--slate-100);
    color: var(--text-main);
    border-color: var(--border-strong);
}

/* Mark Template Builder overrides */
.builder-container { background: var(--bg-sidebar); border-radius: 8px; border: 1px solid var(--border-subtle); padding: 24px; }
.node-card { border: 1px solid var(--border-subtle); border-radius: 6px; padding: 12px; margin-bottom: 12px; background: var(--bg-body); }
.node-header { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.node-children { margin-left: 24px; padding-left: 12px; border-left: 2px solid var(--border-subtle); }

.or-badge { background: #fef3c7; color: #b45309; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; margin-right: 8px; border: 1px solid #fde68a; }

.or-group-box {
    border-left: 4px solid var(--orange-500, #f97316);
    border-top: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    border-radius: 6px;
    background: var(--bg-surface);
    padding: 16px;
    margin-bottom: 24px;
}
.or-group-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--orange-600, #ea580c);
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 12px;
}

/* Session Dropdown Item Hover */
.session-item-btn:hover {
    background-color: var(--theme-50) !important;
}

/* Session Switcher Backgrounds */
.session-caret-bg,
.session-header-bg {
    background-color: var(--theme-50);
}


/* =============================================================
   EVALUATION TIMELINE (COE Dashboard)
   ============================================================= */
.eval-timeline-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 32px 48px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}
.eval-timeline-header {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 60px;
}
.eval-timeline-wrapper {
    position: relative;
    min-width: 600px;
    padding-bottom: 60px;
    display: flex;
    align-items: center;
}
.eval-timeline-line {
    position: absolute;
    top: 0;
    left: 10px;
    right: 10px;
    height: 6px;
    background: var(--slate-200);
    border-radius: 3px;
    z-index: 1;
}
.eval-timeline-nodes {
    display: flex;
    justify-content: space-between;
    position: relative;
    width: 100%;
    z-index: 2;
}
.eval-timeline-node {
    position: relative;
    width: 12px;
    height: 12px;
    background: var(--node-color, var(--primary-main));
    border-radius: 50%;
    transform: translateY(-3px);
}
.eval-timeline-content {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    text-align: center;
}
.eval-timeline-node.up .eval-timeline-content {
    bottom: 100%;
    margin-bottom: 24px;
}
.eval-timeline-node.up::before {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    width: 2px;
    height: 28px;
    background: var(--node-color, var(--primary-main));
    transform: translateX(-50%);
    z-index: -1;
}
.eval-timeline-node.down .eval-timeline-content {
    top: 100%;
    margin-top: 24px;
}
.eval-timeline-node.down::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    width: 2px;
    height: 28px;
    background: var(--node-color, var(--primary-main));
    transform: translateX(-50%);
    z-index: -1;
}
.eval-timeline-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}
.eval-timeline-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--slate-500);
}

/* ─────────────────────────────────────────────────────────────
   DASHBOARD COMPONENTS (from qp_select overrides)
───────────────────────────────────────────────────────────── */

/* ── Page wrapper ── */
.approval-dash {
  padding: 2rem 2rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Header ── */
.dash-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.dash-header-text h1 {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 .3rem;
}

.dash-header-text p {
  font-size: .875rem;
  color: var(--text-secondary);
  margin: 0;
}

.dash-count-badge {
  background: var(--bg-sidebar);
  color: var(--primary-main);
  font-size: .78rem;
  font-weight: 700;
  padding: .35rem .8rem;
  border-radius: 999px;
  border: 1.5px solid var(--border-subtle);
  letter-spacing: .02em;
  white-space: nowrap;
}

/* ── Filters ── */
.filters-container {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.filters-container .search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
  max-width: 380px;
}

.filters-container .search-box i.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 18px;
  pointer-events: none;
}

.filters-container .search-box .input-base,
.filters-container .search-box input.form-control {
  padding-left: 42px;
  padding-right: 36px;
  height: 42px;
  box-sizing: border-box;
}

.filters-container .clear-search-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.15s, background-color 0.15s;
}

.filters-container .clear-search-btn:hover {
  color: var(--text-main);
  background-color: var(--slate-100);
}

.filters-container select.form-control,
.filters-container .select-base {
  height: 42px;
  box-sizing: border-box;
}

/* ── Layout Helpers ── */
.badge-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* ── Progress Bar Variants ── */
.progress-bar-fill.first  { background: var(--primary-light); }
.progress-bar-fill.chief  { background: #8b5cf6; }
.progress-bar-fill.expert { background: var(--orange-600); }
.progress-bar-fill.slate  { background: var(--slate-300); }

/* ── Empty state ── */
.empty-dash {
  text-align: center;
  padding: 4.5rem 2rem;
  background: var(--bg-surface);
  border-radius: 16px;
  border: 2px dashed var(--border-subtle);
}

.empty-dash i {
  font-size: 3rem;
  color: var(--slate-300);
  display: block;
  margin-bottom: 1rem;
}

.empty-dash h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 .4rem;
}

.empty-dash p {
  font-size: .875rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Buttons ── */
.btn-open {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--primary-main);
  color: white;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.2s, transform 0.1s;
}
.btn-open:hover {
  background-color: var(--primary-dark);
}
.btn-open:active {
  transform: scale(0.97);
}

