/* ═══════════════════════════════════════════════════════════════
   E-Survey Admin — Design System v2
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Brand */
    --primary:          #4F63F5;
    --primary-hover:    #3B4FE0;
    --primary-light:    #EEF0FF;
    --primary-soft:     rgba(79,99,245,.08);

    /* Surfaces */
    --bg:               #F3F4F8;
    --card:             #FFFFFF;
    --sidebar-bg:       #FFFFFF;

    /* Topbar — white (modern SaaS aesthetic) */
    --topbar-bg:        #FFFFFF;
    --topbar-border:    #E9EBF0;

    /* Sidebar */
    --sidebar-border:   #E9EBF0;
    --sidebar-section:  #9AA2B2;
    --sidebar-link:     #3B4460;
    --sidebar-active-bg:   #EEF0FF;
    --sidebar-active-text: #4F63F5;

    /* Text */
    --ink:              #111827;
    --muted:            #667085;
    --line:             #E9EBF0;

    /* Semantic */
    --success:          #12B76A;
    --success-bg:       #ECFDF5;
    --danger:           #F04438;
    --danger-bg:        #FEF3F2;
    --warning:          #F79009;
    --warning-bg:       #FFFAEB;
    --info:             #4F63F5;
    --info-bg:          #EEF0FF;

    /* Shape */
    --radius-xs:        4px;
    --radius-sm:        8px;
    --radius-md:        12px;
    --radius-lg:        16px;
    --radius-xl:        24px;

    /* Shadow */
    --shadow-card:      0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04);
    --shadow-hover:     0 4px 20px rgba(16,24,40,.10);
    --shadow-modal:     0 24px 56px rgba(16,24,40,.18);

    /* Type */
    --font:             'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

    /* Layout */
    --sidebar-width:    256px;
    --topbar-height:    60px;
}

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; scroll-behavior: smooth; }
body.admin-body {
    margin: 0;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
canvas { max-width: 100%; display: block; }
.grid > * { min-width: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

/* ── Admin Shell ────────────────────────────────────────────────── */
.admin-shell { min-height: 100vh; }

/* ══════════════════════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════════════════════ */
.admin-sidebar {
    --bs-offcanvas-bg: #fff;
    width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid var(--sidebar-border);
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #dde0ea transparent;
    transition: transform .24s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
}
.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-track { background: transparent; }
.admin-sidebar::-webkit-scrollbar-thumb { background: #dde0ea; border-radius: 10px; }

/* Brand */
.sidebar-brand {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}
.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
}
.brand-mark:hover { color: var(--ink); }
.brand-icon {
    width: 36px; height: 36px;
    display: inline-flex;
    align-items: center; justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, #4F63F5 0%, #7C8CF8 100%);
    color: #fff; font-size: 17px;
    box-shadow: 0 3px 10px rgba(79,99,245,.3);
    flex-shrink: 0;
}
.brand-mark strong { display: block; font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
.brand-mark small  { display: block; font-size: 11px; color: var(--muted); margin-top: 0; font-weight: 500; }

/* Academic card */
.academic-card {
    margin: 12px 12px 4px;
    padding: 10px 13px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    border: 1px solid rgba(79,99,245,.12);
    flex-shrink: 0;
}
.academic-card span   { display: block; color: var(--muted); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.academic-card strong { color: var(--primary); font-size: 13px; font-weight: 600; }

/* Sidebar nav */
.sidebar-nav { padding: 6px 10px 24px; flex: 1; }

.nav-section {
    color: var(--sidebar-section);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    margin: 18px 8px 5px;
}
.nav-section:first-child { margin-top: 6px; }

.sidebar-nav a {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--sidebar-link);
    text-decoration: none;
    border-radius: var(--radius-sm);
    padding: 0 10px;
    margin-bottom: 1px;
    font-weight: 500;
    font-size: 13.5px;
    transition: background .15s, color .15s;
    position: relative;
}
.sidebar-nav a i { width: 18px; font-size: 15px; color: #9AA2B2; transition: color .15s; flex-shrink: 0; }
.sidebar-nav a:hover { background: #F5F6FA; color: var(--ink); }
.sidebar-nav a:hover i { color: var(--ink); }
.sidebar-nav a.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    font-weight: 600;
}
.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    left: 0; top: 6px; bottom: 6px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--primary);
}
.sidebar-nav a.active i { color: var(--sidebar-active-text); }

/* ══════════════════════════════════════════════════════════════════
   MAIN AREA
══════════════════════════════════════════════════════════════════ */
.admin-main {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    transition: margin-left .24s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
}

/* ══════════════════════════════════════════════════════════════════
   TOPBAR — white, clean
══════════════════════════════════════════════════════════════════ */
.admin-topbar {
    height: var(--topbar-height);
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 24px;
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--topbar-border);
}

.admin-topbar h1 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--ink);
    letter-spacing: -.1px;
}

.eyebrow {
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 500;
    margin-bottom: 1px;
}
.eyebrow a { color: var(--muted); }
.eyebrow a:hover { color: var(--primary); }
.eyebrow .sep { margin: 0 5px; color: #C8CCd8; }

.topbar-actions { display: flex; align-items: center; gap: 6px; }

.icon-btn, .topbar-icon {
    width: 36px; height: 36px;
    display: inline-flex;
    align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    font-size: 16px;
    cursor: pointer;
    transition: all .15s;
    position: relative;
    text-decoration: none;
}
.icon-btn:hover, .topbar-icon:hover {
    background: var(--bg);
    color: var(--ink);
    border-color: #D1D5E0;
}

.topbar-icon .dot {
    position: absolute;
    top: 7px; right: 7px;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--danger);
    border: 1.5px solid #fff;
}

.search-pill {
    min-width: 200px; height: 36px;
    display: inline-flex;
    align-items: center; gap: 8px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--muted); font-size: 13px;
    cursor: default;
    transition: border-color .15s;
}
.search-pill:hover { border-color: #C8CCd8; }

.profile-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: transparent;
    padding: 4px 10px 4px 4px;
    cursor: pointer;
    transition: all .15s;
}
.profile-button:hover { background: var(--bg); border-color: #D1D5E0; }

.avatar {
    width: 30px; height: 30px;
    display: inline-flex;
    align-items: center; justify-content: center;
    border-radius: 7px;
    background: linear-gradient(135deg, #4F63F5, #7C8CF8);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.profile-copy { text-align: left; line-height: 1.25; }
.profile-copy strong { display: block; font-size: 13px; font-weight: 600; color: var(--ink); }
.profile-copy small  { display: block; color: var(--muted); font-size: 11px; }

/* ── Content ────────────────────────────────────────────────────── */
.admin-content { padding: 28px; flex: 1; }

/* ══════════════════════════════════════════════════════════════════
   WELCOME BANNER
══════════════════════════════════════════════════════════════════ */
.welcome-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    padding: 28px 32px;
    border-radius: var(--radius-lg);
    color: #fff;
    background: linear-gradient(135deg, #4F63F5 0%, #7B86F4 60%, #9DA8FB 100%);
    box-shadow: 0 8px 28px rgba(79,99,245,.22);
    position: relative;
    overflow: hidden;
}
.welcome-banner::before {
    content: '';
    position: absolute;
    right: -50px; top: -50px;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,.07);
    pointer-events: none;
}
.welcome-banner::after {
    content: '';
    position: absolute;
    right: 80px; bottom: -70px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
    pointer-events: none;
}
.welcome-banner .badge {
    background: rgba(255,255,255,.18);
    color: #fff;
    border: none;
    margin-bottom: 10px;
    backdrop-filter: blur(8px);
}
.welcome-banner .badge::before { display: none; }
.welcome-banner h1 { margin: 0 0 6px; font-size: 23px; font-weight: 700; letter-spacing: -.3px; }
.welcome-banner p  { margin: 0; color: rgba(255,255,255,.8); font-size: 13.5px; }
.welcome-art {
    width: 68px; height: 68px;
    display: flex;
    align-items: center; justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.2);
    backdrop-filter: blur(10px);
    z-index: 1;
    flex-shrink: 0;
}
.welcome-art i { font-size: 32px; }

/* ── Grid ───────────────────────────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.grid.two   { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four  { grid-template-columns: repeat(4, 1fr); }

/* ══════════════════════════════════════════════════════════════════
   PANEL / CARD
══════════════════════════════════════════════════════════════════ */
.panel, .card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 22px;
}
.panel h2 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--ink);
    letter-spacing: -.1px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.panel > h2:not(:first-child) {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.panel + .panel,
section.panel + section.panel,
.panel + section.panel,
section.panel + .panel { margin-top: 18px; }

/* ── Chart containers ── */
.chart-wrap { position: relative; height: 300px; width: 100%; }
.chart-wrap.chart-sm    { height: 260px; }
.chart-wrap.chart-center { height: 300px; }

/* ── Panel table variant ── */
.panel-table h2 {
    margin-bottom: 0;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}
.panel-table .dt-filter-bar {
    padding: 12px 22px;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    background: #FAFBFD;
}
.panel-table .dt-filter-bar label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 120px;
}
.panel-table .dt-filter-bar select,
.panel-table .dt-filter-bar input {
    width: 100%;
    padding: 6px 10px;
    font-size: 13px;
    height: 34px;
    margin-top: 0;
}
.panel-table .table-wrap { margin: 0 -22px; }
.panel-table table th:first-child,
.panel-table table td:first-child { padding-left: 22px; }
.panel-table table th:last-child,
.panel-table table td:last-child  { padding-right: 22px; }

/* ══════════════════════════════════════════════════════════════════
   DATATABLES OVERRIDES
══════════════════════════════════════════════════════════════════ */
.dataTables_wrapper { font-family: var(--font); font-size: 14px; }
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter { margin-bottom: 0; }
.dataTables_wrapper .dataTables_length select {
    min-width: auto; width: auto; display: inline-block;
    height: 32px; padding: 3px 8px; font-size: 13px;
}
.dataTables_wrapper .dataTables_filter input {
    min-width: 180px; height: 32px; padding: 4px 10px; font-size: 13px;
    border-radius: var(--radius-sm); border: 1px solid var(--line);
}
.dataTables_wrapper .dataTables_filter input:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,99,245,.1);
}
.dataTables_wrapper .dt-toolbar {
    padding: 10px 22px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    background: #FAFBFD;
}
.dataTables_wrapper .dt-footer {
    padding: 8px 22px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    background: #FAFBFD;
}
.dataTables_wrapper .dataTables_info { font-size: 11px; color: var(--muted); }
.dataTables_wrapper .dataTables_paginate { line-height: 1; }
.dataTables_wrapper .dataTables_paginate .pagination { margin: 0; gap: 2px; }
.dataTables_wrapper .dataTables_paginate .page-item .page-link {
    font-size: 11px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    padding: 3px 7px !important;
    min-width: 24px !important;
    height: 24px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    border: 1px solid var(--line) !important;
    background: #fff !important;
    color: var(--muted) !important;
    transition: all .14s !important;
    box-shadow: none !important;
}
.dataTables_wrapper .dataTables_paginate .page-item .page-link:hover {
    background: var(--primary-light) !important;
    border-color: rgba(79,99,245,.2) !important;
    color: var(--primary) !important;
}
.dataTables_wrapper .dataTables_paginate .page-item.active .page-link,
.dataTables_wrapper .dataTables_paginate .page-item.active .page-link:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}
.dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link,
.dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link:hover {
    opacity: .4 !important;
    cursor: default !important;
    background: #fff !important;
    color: var(--muted) !important;
}
.dataTables_wrapper .dataTables_processing {
    background: rgba(255,255,255,.92);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--shadow-card);
}
div.dataTables_wrapper div.dataTables_length label,
div.dataTables_wrapper div.dataTables_filter label {
    color: var(--muted); font-weight: 500; font-size: 13px;
}

/* ══════════════════════════════════════════════════════════════════
   METRIC CARDS
══════════════════════════════════════════════════════════════════ */
.metric {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 22px;
}
.metric-icon {
    width: 48px; height: 48px; min-width: 48px;
    display: flex;
    align-items: center; justify-content: center;
    border-radius: 12px;
    font-size: 20px;
}
.metric-icon.orange { background: linear-gradient(135deg, #FFF4E8, #FEEBC8); color: #D97706; }
.metric-icon.blue   { background: linear-gradient(135deg, #EEF0FF, #DDE3FE); color: var(--primary); }
.metric-icon.green  { background: linear-gradient(135deg, #ECFDF5, #D1FAE5); color: #059669; }
.metric-icon.purple { background: linear-gradient(135deg, #F5F3FF, #EDE9FE); color: #7C3AED; }
.metric-body strong {
    display: block;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--ink);
    letter-spacing: -.5px;
}
.metric-body span {
    display: block;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 500;
    margin-top: 4px;
}

/* ══════════════════════════════════════════════════════════════════
   PAGE HEADER
══════════════════════════════════════════════════════════════════ */
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}
.page-head h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    line-height: 1.25;
    letter-spacing: -.2px;
}
.page-head p  { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }

/* ══════════════════════════════════════════════════════════════════
   TABLES
══════════════════════════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
th {
    background: #F8F9FC;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
}
th, td {
    border-bottom: 1px solid var(--line);
    padding: 11px 16px;
    vertical-align: middle;
    text-align: left;
}
th:first-child { border-radius: 0; }
th:last-child  { border-radius: 0; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #F8FAFD; }

/* ══════════════════════════════════════════════════════════════════
   BADGE
══════════════════════════════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: var(--radius-xs);
    padding: 3px 8px;
    font-weight: 600;
    font-size: 11.5px;
    background: var(--info-bg);
    color: var(--info);
    white-space: nowrap;
    letter-spacing: .1px;
}
.badge::before {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}
.badge.warn    { background: var(--warning-bg); color: #B45309; }
.badge.danger  { background: var(--danger-bg);  color: #C0392B; }
.badge.success { background: var(--success-bg); color: #027A48; }
.badge.neutral { background: #F2F4F7; color: var(--muted); }
.badge.info    { background: #EEF0FF; color: #3B4FE0; }

/* ══════════════════════════════════════════════════════════════════
   FORMS
══════════════════════════════════════════════════════════════════ */
form.stack { display: grid; gap: 16px; }

label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--ink);
}
/* Inputs/selects/textareas inside labels always go on their own line */
label > input,
label > select,
label > textarea {
    display: block;
    margin-top: 5px;
}

input, select, textarea {
    width: 100%;
    border: 1px solid #D0D5E1;
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 9px 13px;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #A8B0C0; }
input:focus, select:focus, textarea:focus {
    outline: 0;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,99,245,.12);
}
textarea { min-height: 96px; resize: vertical; }

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    padding: 4px 0;
    cursor: pointer;
}
.checkbox-row input[type="checkbox"] {
    width: 16px; height: 16px; min-width: 16px;
    accent-color: var(--primary);
    cursor: pointer; margin: 0; padding: 0;
}
input[type="color"] { padding: 4px 6px; height: 42px; cursor: pointer; }
input[type="file"] { padding: 8px 12px; background: #F8FAFC; cursor: pointer; font-size: 13px; }

/* ══════════════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════════════ */
.button,
.admin-content button:not(.btn),
.auth-card button:not(.btn) {
    min-height: 38px;
    display: inline-flex;
    align-items: center; justify-content: center;
    gap: 6px;
    border: 1px solid #D0D5E1;
    border-radius: var(--radius-sm);
    padding: 7px 16px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
    letter-spacing: .1px;
}
.button:hover { background: #F5F6FA; border-color: #C0C6D4; color: var(--ink); }

.button.primary,
.admin-content button.primary,
.auth-card button.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 1px 4px rgba(79,99,245,.25);
}
.button.primary:hover,
.admin-content button.primary:hover,
.auth-card button.primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
    box-shadow: 0 2px 8px rgba(79,99,245,.35);
}

.button.danger,
.admin-content button.danger {
    background: var(--danger); border-color: var(--danger); color: #fff;
    box-shadow: 0 1px 4px rgba(240,68,56,.2);
}
.button.danger:hover,
.admin-content button.danger:hover {
    background: #D63629; border-color: #D63629; color: #fff;
}

.button.sm { min-height: 30px; padding: 4px 12px; font-size: 12.5px; }

/* ══════════════════════════════════════════════════════════════════
   QUICK LINKS
══════════════════════════════════════════════════════════════════ */
.quick-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.quick-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 13.5px;
    transition: all .18s;
}
.quick-links a:hover {
    border-color: rgba(79,99,245,.25);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    color: var(--ink);
}
.quick-links a i {
    width: 40px; height: 40px;
    display: inline-flex;
    align-items: center; justify-content: center;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 17px;
    flex-shrink: 0;
}

/* ── Metric card hover ── */
.card.metric {
    transition: transform .18s ease, box-shadow .18s ease;
    cursor: default;
}
.card.metric:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* ── Quick-link hover ── (already has transform) but let's tighten */
.quick-links a:hover { transform: translateY(-2px); }

/* ── Utilities ──────────────────────────────────────────────────── */
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.muted   { color: var(--muted); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.mt-4  { margin-top: 20px; }
.mb-4  { margin-bottom: 20px; }
.mb-0  { margin-bottom: 0; }
.gap-sm { gap: 8px; }

/* ── Question block ─────────────────────────────────────────────── */
.question {
    border-top: 1px solid var(--line);
    margin-top: 18px;
    padding-top: 18px;
}
.question:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.question-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.question-header h3 { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.question-num {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 22px; height: 22px;
    border-radius: 6px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Info DL ── */
.info-dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
    margin: 0; padding: 0; list-style: none;
}
.info-dl dt {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--muted);
    margin-bottom: 3px;
}
.info-dl dd { font-size: 14px; font-weight: 500; color: var(--ink); margin: 0; }

/* ── Score chip ── */
.score-chip {
    display: inline-flex;
    align-items: center; justify-content: center;
    min-width: 60px; height: 32px;
    border-radius: var(--radius-xs);
    font-size: 14px;
    font-weight: 800;
    padding: 0 12px;
}
.score-chip.high { background: var(--success-bg); color: #027A48; }
.score-chip.mid  { background: var(--warning-bg); color: #B45309; }
.score-chip.low  { background: var(--danger-bg);  color: #C0392B; }

/* ── Report items ── */
.report-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.report-item:first-child { padding-top: 0; }
.report-item:last-child  { border-bottom: 0; padding-bottom: 0; }
.report-item h3 { font-size: 13.5px; font-weight: 600; margin: 0 0 4px; color: var(--ink); }

/* ── Verification log ── */
.log-item { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.log-item:first-child { padding-top: 0; }
.log-item:last-child  { border-bottom: 0; padding-bottom: 0; }
.log-dot {
    width: 30px; height: 30px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0; margin-top: 2px;
}
.log-dot.verified { background: var(--success-bg); color: var(--success); }
.log-dot.rejected { background: var(--danger-bg);  color: var(--danger); }
.log-dot.default  { background: var(--primary-light); color: var(--primary); }
.log-body p { margin: 0 0 2px; font-size: 13.5px; font-weight: 500; color: var(--ink); }
.log-body small { font-size: 12px; color: var(--muted); }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-state i { font-size: 36px; display: block; margin-bottom: 12px; opacity: .3; }
.empty-state p { margin: 0; font-size: 13.5px; }

/* ── Notices ── */
.notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 13.5px;
    line-height: 1.5;
    border: 1px solid;
}
.notice::before {
    font-family: 'bootstrap-icons';
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 2px;
}
.notice.success { border-color: #A9F0C0; background: #F0FDF6; color: #15803D; }
.notice.success::before { content: '\F26A'; color: var(--success); }
.notice.error   { border-color: #FEB4AE; background: #FFF1F0; color: #B91C1C; }
.notice.error::before { content: '\F33A'; color: var(--danger); }
.notice-list { list-style: none; padding: 0; margin: 4px 0 0; }
.notice-list li + li { margin-top: 4px; }

/* ── Logo preview ── */
.logo-preview {
    display: inline-flex;
    align-items: center; justify-content: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #F8FAFC;
    min-height: 76px;
    margin-top: 4px;
}
.logo-preview img { max-height: 52px; max-width: 200px; object-fit: contain; }
.logo-preview.empty { color: var(--muted); font-size: 13px; }

/* ── Headings ── */
h2 { font-size: 15px; font-weight: 700; margin-bottom: 14px; letter-spacing: -.1px; }
h3 { font-size: 13.5px; font-weight: 700; margin-bottom: 8px; }
p  { margin: 0 0 8px; }
p:last-child { margin-bottom: 0; }

/* ══════════════════════════════════════════════════════════════════
   TABLE ACTION ICONS
══════════════════════════════════════════════════════════════════ */
.tbl-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
}
.tbl-icon-btn {
    width: 30px; height: 30px;
    display: inline-flex;
    align-items: center; justify-content: center;
    border-radius: var(--radius-xs);
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
    transition: all .14s;
    padding: 0; flex-shrink: 0;
}
.tbl-icon-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: rgba(79,99,245,.2);
}
.tbl-icon-btn.danger:hover {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(240,68,56,.2);
}

/* ══════════════════════════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════════════════════════ */
.admin-modal {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    font-family: var(--font);
    font-size: 14px;
}
.admin-modal .modal-header {
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--line);
}
.admin-modal .modal-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -.1px;
}
.admin-modal .modal-body { padding: 18px 22px; }
.admin-modal .modal-footer {
    padding: 10px 22px 18px;
    border-top: 1px solid var(--line);
    gap: 8px;
}
.admin-modal label { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.admin-modal input, .admin-modal select, .admin-modal textarea { font-size: 13.5px; }
.grid-col-2 { grid-column: span 2; }

/* ══════════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════════ */
.admin-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--muted);
    background: var(--card);
}
.admin-footer a { color: var(--muted); }
.admin-footer a:hover { color: var(--primary); }

/* ══════════════════════════════════════════════════════════════════
   AUTH PAGES
══════════════════════════════════════════════════════════════════ */
body.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: var(--bg);
    font-family: var(--font);
}
.auth-shell {
    width: min(960px, calc(100% - 32px));
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-modal);
}
.auth-visual {
    min-height: 540px;
    display: flex;
    justify-content: flex-end;
    flex-direction: column;
    padding: 40px;
    color: #fff;
    background: linear-gradient(135deg, #4F63F5 0%, #7B86F4 100%);
    position: relative;
    overflow: hidden;
}
.auth-visual::before {
    content: '';
    position: absolute;
    right: -60px; top: -60px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: rgba(255,255,255,.07);
    pointer-events: none;
}
.auth-visual h1  { margin: 22px 0 10px; font-size: 30px; font-weight: 800; position: relative; z-index: 1; letter-spacing: -.4px; }
.auth-visual p   { max-width: 400px; color: rgba(255,255,255,.8); margin: 0; position: relative; z-index: 1; font-size: 14px; }
.auth-card {
    padding: 48px 44px;
    display: flex;
    justify-content: center;
    flex-direction: column;
}
.auth-card h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; letter-spacing: -.2px; }

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════════ */

/* Desktop sidebar collapse */
@media (min-width: 992px) {
    .admin-shell.sidebar-collapsed .admin-sidebar { transform: translateX(-100%); }
    .admin-shell.sidebar-collapsed .admin-main    { margin-left: 0; }
    .admin-shell.sidebar-collapsed #sidebarToggleBtn {
        background: var(--primary-light);
        color: var(--primary);
        border-color: rgba(79,99,245,.2);
    }
}

/* Tablet */
@media (max-width: 991.98px) {
    .admin-main     { margin-left: 0; }
    .admin-topbar   { padding: 0 16px; gap: 10px; }
    .admin-content  { padding: 20px; }
    .admin-footer   { padding: 12px 20px; flex-direction: column; align-items: flex-start; gap: 3px; }
}
@media (min-width: 768px) and (max-width: 991.98px) {
    .grid.four  { grid-template-columns: repeat(2, 1fr); }
    .grid.three { grid-template-columns: repeat(2, 1fr); }
    .quick-links { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 767.98px) {
    .grid.two,
    .grid.three,
    .grid.four     { grid-template-columns: 1fr; }
    .info-dl       { grid-template-columns: 1fr; }
    .page-head     { flex-direction: column; align-items: flex-start; gap: 10px; }
    .page-head .actions { width: 100%; }
    .topbar-actions { gap: 4px; }
    .admin-topbar h1 { font-size: 15px; }
    .welcome-banner { flex-direction: column; align-items: flex-start; padding: 20px 22px; }
    .welcome-banner h1 { font-size: 20px; }
    .welcome-art   { display: none; }
    .quick-links   { grid-template-columns: 1fr 1fr; }
    .auth-shell    { grid-template-columns: 1fr; }
    .auth-visual   { min-height: 160px; padding: 24px; }
    .auth-card     { padding: 28px 22px; }
    .grid.four .metric { padding: 14px; }
    .metric-body strong { font-size: 22px; }
    .panel, .card  { padding: 16px; }
    .panel-table .table-wrap { margin: 0 -16px; }
    .panel-table table th:first-child,
    .panel-table table td:first-child { padding-left: 16px; }
    .panel-table table th:last-child,
    .panel-table table td:last-child  { padding-right: 16px; }
    .eyebrow { display: none; }
}
@media (max-width: 767.98px) {
    .grid.four { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (max-width: 767.98px) {
    .chart-wrap        { height: 230px; }
    .chart-wrap.chart-sm { height: 210px; }
}
@media (max-width: 767.98px) {
    .panel-table .dt-filter-bar { padding: 10px 16px; }
    .panel-table .dt-filter-bar label { min-width: 100px; }
    .dataTables_wrapper .dt-toolbar,
    .dataTables_wrapper .dt-footer { padding: 8px 16px; }
}

/* Small mobile */
@media (max-width: 575.98px) {
    .quick-links   { grid-template-columns: 1fr 1fr; }
    .admin-content { padding: 12px; }
    .panel, .card  { padding: 14px; }
    .panel-table .table-wrap { margin: 0 -14px; }
    .panel-table table th:first-child,
    .panel-table table td:first-child { padding-left: 14px; }
    .panel-table table th:last-child,
    .panel-table table td:last-child  { padding-right: 14px; }
    .search-pill   { display: none !important; }
    .admin-topbar  { padding: 0 12px; }
    .page-head .actions { flex-wrap: wrap; }
    .auth-visual   { display: none; }
    .auth-shell    { max-width: 420px; }
    .auth-card     { padding: 26px 18px; }
}
