/* ============================================================
   Sevagram AdminX — design system (mirrors Sevagram portal tokens)
   ============================================================ */

:root {
    --bg-white:#FFFFFF; --bg-light:#FAFAF7; --bg-mid:#F1EFE8;
    --bg-dark:#0F1411; --bg-dark-2:#15201A;
    --border-light:#ECEAE0; --border-mid:#C9CCC4;
    --text-main:#0F1411; --text-body:#3B3F38; --text-muted:#6B6F66; --text-white:#FFFFFF;
    --highlight-yellow:#FFF6DF;
    --accent-yellow:#feac00; --accent-yellow-dk:#d99500;
    --accent-green:#006338; --accent-green-2:#1E7F52; --accent-green-dk:#004a2a;
    --accent-green-tint:#E6F0EB;
    --accent-blue:#1E40AF; --accent-blue-tint:#E7EBFB;       /* AdminX accent (writes only) */
    --status-error:#B6241B; --status-error-tint:#FCEAE8;
    --status-warn:#A66700; --status-warn-tint:#FFF1D6;
    --radius-md:10px; --radius-lg:14px;
    --shadow-sm:0 1px 2px rgba(15,20,17,.04),0 1px 1px rgba(15,20,17,.03);
    --shadow-md:0 4px 12px rgba(15,20,17,.06),0 2px 4px rgba(15,20,17,.04);
    --shadow-lg:0 12px 32px rgba(15,20,17,.08),0 4px 12px rgba(15,20,17,.05);
    --shadow-green:0 8px 24px rgba(0,99,56,.18);
    --sidebar-w: 248px;
}

:root[data-theme="dark"] {
    --bg-white:#131a28; --bg-light:#0a0e16; --bg-mid:#1a2233;
    --bg-dark:#05070c; --bg-dark-2:#0a0e16;
    --border-light:#232b3d; --border-mid:#2e3750;
    --text-main:#e5e9f0; --text-body:#c3cad8; --text-muted:#8b96a8; --text-white:#ffffff;
    --highlight-yellow:#3a2f10;
    --accent-yellow:#feac00; --accent-yellow-dk:#d99500;
    --accent-green:#1E7F52; --accent-green-2:#28a06a; --accent-green-dk:#166b45;
    --accent-green-tint:rgba(30,127,82,.18);
    --accent-blue:#5b8def; --accent-blue-tint:rgba(91,141,239,.15);
    --status-error:#ff6b6b; --status-error-tint:rgba(255,107,107,.14);
    --status-warn:#f5a623; --status-warn-tint:rgba(245,166,35,.14);
    --shadow-sm:0 1px 2px rgba(0,0,0,.3),0 1px 1px rgba(0,0,0,.2);
    --shadow-md:0 4px 12px rgba(0,0,0,.35),0 2px 4px rgba(0,0,0,.25);
    --shadow-lg:0 12px 32px rgba(0,0,0,.45),0 4px 12px rgba(0,0,0,.3);
    --shadow-green:0 8px 24px rgba(30,127,82,.3);
}

*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }
body {
    font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,system-ui,sans-serif;
    font-size:15px; color:var(--text-body); background:var(--bg-light); line-height:1.6;
    min-height:100vh;
}
a { color:inherit; text-decoration:none; }
a:hover { text-decoration:underline; }
button { font-family:inherit; }
h1,h2,h3 { color:var(--text-main); letter-spacing:-0.02em; }
code { font-family:'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size:.85em; background:var(--bg-mid); padding:1px 6px; border-radius:4px; }

/* =====================================================
   Layout: top nav + main
   ===================================================== */
.portal-layout { display:flex; flex-direction:column; min-height:100vh; }
.portal-main   { padding:32px 40px 64px; min-width:0; width: 100%; }

/* =====================================================
   Top Navigation
   ===================================================== */
.portal-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
}
.portal-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 40px;
    border-bottom: 1px solid var(--border-light);
}
.portal-brand { display:flex; align-items:center; gap:8px; }
.portal-brand-name { font-size:1.1rem; font-weight:800; color:var(--text-main); letter-spacing:.02em; display:flex; align-items:center; gap:8px; }
.portal-brand-name .sub { font-size:.7rem; font-weight:600; color:var(--text-muted); letter-spacing:.05em; text-transform:uppercase; }
.portal-brand:hover { text-decoration:none; }

.portal-header-user { display: flex; align-items: center; gap: 24px; }
.portal-role {
    display: flex; align-items: center; gap: 8px;
}
.portal-role-label {
    font-size:.66rem; font-weight:600; letter-spacing:.12em; text-transform:uppercase;
    color:var(--text-muted);
}
.portal-role-name {
    font-size:.82rem; font-weight:600; color:var(--text-main);
    padding: 4px 10px; border: 1px solid var(--border-light); border-radius: 4px;
}

.portal-user {
    display:flex; align-items:center; gap:12px;
    border-left: 1px solid var(--border-light);
    padding-left: 24px;
}
.portal-user-name { font-size:.86rem; font-weight:600; color:var(--text-main); }
.portal-user-logout {
    display:flex; align-items:center; justify-content:center;
    color:var(--text-muted); transition: color .15s;
}
.portal-user-logout:hover { color:var(--status-error); text-decoration:none; }
.portal-user-logout svg { width:18px; height:18px; }

.portal-nav-hz {
    display: flex;
    padding: 0 30px;
    background: var(--bg-light);
}
.nav-dropdown { position: relative; }
.nav-dropdown-btn {
    background: none; border: none; padding: 14px 16px;
    font-size: .88rem; font-weight: 600; color: var(--text-body);
    cursor: pointer; display: flex; align-items: center; gap: 6px;
    border-bottom: 2px solid transparent;
}
.nav-dropdown-btn:hover { color: var(--text-main); }
.nav-dropdown.active .nav-dropdown-btn {
    color: var(--text-main); border-bottom-color: var(--accent-green);
}
.nav-dropdown-btn .caret { font-size: .6rem; color: var(--text-muted); }

.nav-dropdown-menu {
    position: absolute; top: 100%; left: 0; z-index: 100;
    min-width: 220px; background: var(--bg-white);
    border: 1px solid var(--border-light); border-radius: 0 0 8px 8px;
    box-shadow: var(--shadow-md); padding: 8px 0;
    display: none; flex-direction: column;
}
.nav-dropdown:hover .nav-dropdown-menu { display: flex; }

.portal-nav-link {
    display:flex; align-items:center; gap:11px;
    padding:9px 16px; font-size:.86rem; color:var(--text-body); font-weight:500;
    transition: background .15s, color .15s;
}
.portal-nav-link:hover { background: var(--bg-light); color:var(--text-main); text-decoration:none; }
.portal-nav-link.active {
    background: var(--accent-green-tint);
    color:var(--accent-green); font-weight:600;
}
.portal-nav-icon { width:18px; height:18px; flex-shrink:0; display:flex; align-items:center; justify-content:center; color: var(--text-muted); }
.portal-nav-link.active .portal-nav-icon { color: var(--accent-green); }
.portal-nav-icon svg { width:18px; height:18px; }

/* =====================================================
   Page header / stat tiles / cards
   ===================================================== */
.portal-pagehead { display:flex; justify-content:space-between; align-items:flex-end; gap:24px; margin-bottom:28px; flex-wrap:wrap; }
.portal-pagehead h1 { font-size:1.7rem; font-weight:800; margin-bottom:4px; }
.portal-pagehead .sub { font-size:.92rem; color:var(--text-muted); }
.portal-pagehead .actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }

.stat-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap:16px; margin-bottom:28px; }
.stat-tile {
    background:var(--bg-white); border:1px solid var(--border-light);
    border-radius:var(--radius-lg); padding:18px 20px;
    box-shadow:var(--shadow-sm);
    transition: border-color .15s, transform .15s, box-shadow .15s;
    display:block;
}
.stat-tile:hover { border-color:var(--accent-green); transform:translateY(-1px); box-shadow:var(--shadow-md); text-decoration:none; }
.stat-tile .lbl { font-size:.66rem; font-weight:700; text-transform:uppercase; letter-spacing:.12em; color:var(--text-muted); margin-bottom:6px; }
.stat-tile .val { font-size:1.7rem; font-weight:800; color:var(--text-main); letter-spacing:-0.02em; line-height:1.1; }
.stat-tile .meta { font-size:.78rem; color:var(--text-muted); margin-top:4px; }
.stat-tile .icon {
    float:right; width:36px; height:36px; border-radius:9px;
    background:var(--accent-green-tint); color:var(--accent-green);
    display:flex; align-items:center; justify-content:center;
}
.stat-tile .icon svg { width:18px; height:18px; }

.portal-card {
    background:var(--bg-white); border:1px solid var(--border-light);
    border-radius:var(--radius-lg); padding:24px;
    box-shadow:var(--shadow-sm); margin-bottom:20px;
}
.portal-card-head { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; margin-bottom:18px; flex-wrap:wrap; }
.portal-card-title { font-size:1.05rem; font-weight:700; color:var(--text-main); }
.portal-card-sub { font-size:.84rem; color:var(--text-muted); margin-top:2px; }

/* =====================================================
   Buttons
   ===================================================== */
.btn { font-family:inherit; font-size:.88rem; font-weight:600; padding:9px 16px; border-radius:9px; cursor:pointer; border:1px solid transparent; display:inline-flex; align-items:center; gap:8px; text-decoration:none; line-height:1; transition: background .15s, transform .12s, border-color .15s; }
.btn:hover { text-decoration:none; }
.btn-primary { background:var(--accent-green); color:var(--text-white); border-color:var(--accent-green); box-shadow:var(--shadow-green); }
.btn-primary:hover { background:var(--accent-green-dk); transform:translateY(-1px); }
.btn-ghost { background:var(--bg-white); color:var(--text-main); border-color:var(--border-light); }
.btn-ghost:hover { background:var(--bg-light); border-color:var(--text-main); }
.btn-danger { background:var(--status-error); color:var(--text-white); border-color:var(--status-error); }
.btn-danger:hover { background:#8d1c14; }
.btn-yellow { background:var(--accent-yellow); color:var(--bg-dark); border-color:var(--accent-yellow); }
.btn-yellow:hover { background:var(--accent-yellow-dk); }
.btn-sm { padding:5px 12px; font-size:.78rem; }

/* =====================================================
   Tables
   ===================================================== */
.data-table-wrap { background:var(--bg-white); border:1px solid var(--border-light); border-radius:var(--radius-lg); overflow-x:auto; overflow-y:visible; box-shadow:var(--shadow-sm); max-width:100%; }
/* Force any long content in table cells to wrap, except elements explicitly opt-in via .nowrap */
.data-table td { word-break:break-word; overflow-wrap:anywhere; }
.data-table td code { white-space:normal; word-break:break-all; }
/* Truncate-with-tooltip cell — pair with a child span/code that holds the text */
.data-table td.cell-payload { max-width:340px; }
.data-table td.cell-payload > code,
.data-table td.cell-payload > .truncate {
    display:block; max-width:100%;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
    font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:.72rem;
}
.data-table td.cell-payload:hover > code,
.data-table td.cell-payload:hover > .truncate { white-space:normal; word-break:break-all; }
.data-table { width:100%; border-collapse:collapse; font-size:.86rem; }
.data-table thead th {
    background:var(--bg-light); color:var(--text-muted); font-weight:600;
    font-size:.7rem; text-transform:uppercase; letter-spacing:.08em;
    padding:11px 14px; text-align:left; border-bottom:1px solid var(--border-light);
}
.data-table tbody td { padding:12px 14px; border-bottom:1px solid var(--border-light); vertical-align:top; color:var(--text-body); }
.data-table tbody tr:last-child td { border-bottom:0; }
.data-table tbody tr:hover td { background:var(--bg-light); }
.data-table td a { color:var(--accent-green); font-weight:600; }
.data-table td a:hover { text-decoration:underline; }
.data-table td small { color:var(--text-muted); font-size:.78rem; }
.data-table .muted { color:var(--text-muted); padding:24px; text-align:center; }

/* =====================================================
   Key-value table (detail pages)
   ===================================================== */
.kv { width:100%; max-width:860px; border-collapse:collapse; }
.kv th, .kv td { padding:11px 14px; border-bottom:1px solid var(--border-light); vertical-align:top; font-size:.88rem; }
.kv th { text-align:left; color:var(--text-muted); font-weight:500; width:200px; background:var(--bg-light); }
.kv tr:last-child th, .kv tr:last-child td { border-bottom:0; }

/* =====================================================
   Tabs
   ===================================================== */
.tabs { display:flex; gap:2px; border-bottom:1px solid var(--border-light); margin:20px 0; flex-wrap:wrap; }
.tabs a {
    padding:11px 18px; color:var(--text-muted); font-size:.86rem; font-weight:600;
    border-bottom:2px solid transparent; margin-bottom:-1px;
    transition: color .15s, border-color .15s;
}
.tabs a:hover { color:var(--accent-green); text-decoration:none; }
.tabs a.active { color:var(--accent-green); border-bottom-color:var(--accent-green); }

/* =====================================================
   Badges + status pills
   ===================================================== */
.badge, .status {
    display:inline-block; padding:3px 10px; border-radius:999px;
    font-size:.72rem; font-weight:600; letter-spacing:.02em; line-height:1.4;
    background:var(--bg-mid); color:var(--text-body); text-transform:capitalize;
    white-space:nowrap;
}
/* Wide enums (e.g. skill_training_in_progress) — shrink without wrapping */
.data-table .status, .data-table .badge { font-size:.68rem; padding:2px 8px; }
.tabs + .portal-card .status, .tabs + .portal-card .badge { font-size:.72rem; }
.status-active, .status-verified, .badge-verified, .status-hired { background:var(--accent-green-tint); color:var(--accent-green); }
.status-blocked, .status-rejected, .badge-rejected { background:var(--status-error-tint); color:var(--status-error); }
.status-inactive, .status-pending, .badge-pending { background:var(--status-warn-tint); color:var(--status-warn); }
.status-pre-flight, .status-applied, .status-screening { background:var(--accent-blue-tint); color:var(--accent-blue); }
.status-shortlisted { background:var(--highlight-yellow); color:#7B5800; }
.status-assigned, .status-completed { background:var(--accent-green-tint); color:var(--accent-green); }

/* =====================================================
   Search form / inline form
   ===================================================== */
.search-form { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.search-form input, .search-form select {
    padding:8px 12px; border:1px solid var(--border-light); border-radius:8px;
    font-size:.86rem; background:var(--bg-white); font-family:inherit;
}
.search-form input:focus, .search-form select:focus { outline:none; border-color:var(--accent-green); box-shadow:0 0 0 3px rgba(0,99,56,.10); }
.search-form button { padding:8px 16px; }

.inline-form { display:inline-flex; gap:10px; align-items:center; flex-wrap:wrap; }
.inline-form label { font-size:.84rem; color:var(--text-body); display:inline-flex; gap:8px; align-items:center; }
.inline-form input, .inline-form select {
    padding:7px 11px; border:1px solid var(--border-light); border-radius:7px;
    font-size:.84rem; background:var(--bg-white); font-family:inherit;
}

/* =====================================================
   Forms (full grid layout for approval form, etc.)
   ===================================================== */
.form-grid { display:flex; flex-direction:column; gap:20px; max-width:920px; }
.form-grid fieldset { background:var(--bg-white); border:1px solid var(--border-light); border-radius:var(--radius-lg); padding:20px 24px; box-shadow:var(--shadow-sm); }
.form-grid fieldset.ro { background:var(--bg-light); border-style:dashed; }
.form-grid legend { font-weight:700; padding:0 8px; color:var(--text-main); font-size:.95rem; }
.form-grid .row { display:grid; grid-template-columns:220px 1fr; gap:16px; align-items:center; padding:10px 0; border-bottom:1px solid var(--border-light); }
.form-grid .row:last-child { border-bottom:0; }
.form-grid label { font-size:.86rem; color:var(--text-body); font-weight:500; }
.form-grid input[type=text],
.form-grid input[type=number],
.form-grid input[type=email],
.form-grid textarea,
.form-grid select {
    width:100%; padding:9px 12px; border:1px solid var(--border-light); border-radius:8px;
    font-size:.88rem; background:var(--bg-white); font-family:inherit;
}
.form-grid textarea { resize:vertical; min-height:80px; }
.form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus {
    outline:none; border-color:var(--accent-green); box-shadow:0 0 0 3px rgba(0,99,56,.10);
}

.chips { display:flex; flex-wrap:wrap; gap:6px; }
.chip {
    display:inline-flex; align-items:center; gap:6px;
    padding:5px 12px; border:1px solid var(--border-light); border-radius:999px;
    font-size:.78rem; cursor:pointer; background:var(--bg-white);
    transition:background .15s, border-color .15s, color .15s;
}
.chip:hover { border-color:var(--accent-green); }
.chip input { margin:0; accent-color:var(--accent-green); }
.chip:has(input:checked) { background:var(--accent-green-tint); border-color:var(--accent-green); color:var(--accent-green); font-weight:600; }

.form-actions { display:flex; gap:12px; align-items:center; padding-top:8px; }
.cta-bar { margin-top:14px; }
.link-back { font-size:.86rem; color:var(--text-muted); }
.link-back:hover { color:var(--accent-green); text-decoration:none; }

/* messages */
.msg { font-size:.84rem; }
.msg.ok { color:var(--accent-green); }
.msg.err { color:var(--status-error); }

/* score pill (applications) */
.score-good { color:var(--accent-green); font-weight:700; }
.score-low  { color:var(--status-error); font-weight:700; }

/* chat thread (support disputes, review doubts) */
.thread { display:flex; flex-direction:column; gap:10px; }
.msg-row { display:flex; }
.msg-row-right { justify-content:flex-end; }
.msg-bubble { max-width:75%; padding:12px 14px; border-radius:14px; font-size:.88rem; line-height:1.5; }
.msg-bubble .msg-meta { font-size:.7rem; color:var(--text-muted); margin-bottom:4px; text-transform:capitalize; }
.msg-fw     { background:var(--bg-mid); color:var(--text-main); border-bottom-left-radius:4px; }
.msg-admin  { background:var(--accent-green); color:#fff; border-bottom-right-radius:4px; }
.msg-admin .msg-meta { color:rgba(255,255,255,.7); }
.msg-system { background:var(--accent-blue-tint); color:var(--accent-blue); border-bottom-left-radius:4px; }

/* detail-page layout primitives */
.detail-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(320px, 1fr)); gap:16px; }
.detail-card {
    background:var(--bg-white); border:1px solid var(--border-light);
    border-radius:var(--radius-lg); padding:18px 20px; box-shadow:var(--shadow-sm);
}
.detail-card h3 {
    font-size:.78rem; font-weight:700; text-transform:uppercase; letter-spacing:.1em;
    color:var(--text-muted); margin-bottom:14px;
    display:flex; align-items:center; gap:8px;
}
.detail-card h3 .ico {
    width:22px; height:22px; border-radius:6px;
    background:var(--accent-green-tint); color:var(--accent-green);
    display:inline-flex; align-items:center; justify-content:center;
}
.detail-card h3 .ico svg { width:13px; height:13px; }
.detail-card .spec { display:flex; flex-direction:column; gap:9px; }
.detail-card .spec-row {
    display:grid; grid-template-columns:130px 1fr; gap:12px; align-items:baseline;
    font-size:.88rem;
}
.detail-card .spec-row dt { color:var(--text-muted); font-weight:500; font-size:.82rem; }
.detail-card .spec-row dd { color:var(--text-main); margin:0; word-break:break-word; }
.detail-card .spec-row dd.empty { color:var(--text-muted); }
.detail-card .spec-block { font-size:.88rem; color:var(--text-main); line-height:1.6; }
.detail-card .spec-block .muted { color:var(--text-muted); }
.detail-card .chips-wrap { display:flex; flex-wrap:wrap; gap:6px; }

/* hero block for entity detail pages */
.entity-hero {
    display:flex; align-items:center; gap:16px;
    background:var(--bg-white); border:1px solid var(--border-light);
    border-radius:var(--radius-lg); padding:20px 22px; box-shadow:var(--shadow-sm);
    margin-bottom:16px;
}
.entity-hero-avatar {
    flex:0 0 64px; width:64px; height:64px; border-radius:50%;
    background:var(--accent-green); color:#fff;
    display:flex; align-items:center; justify-content:center;
    font-weight:700; font-size:1.3rem; letter-spacing:.04em;
}
.entity-hero-info { flex:1; min-width:0; }
.entity-hero-name { font-size:1.3rem; font-weight:800; color:var(--text-main); letter-spacing:-0.01em; }
.entity-hero-meta { display:flex; flex-wrap:wrap; gap:6px 14px; margin-top:6px; font-size:.86rem; color:var(--text-muted); align-items:center; }
.entity-hero-meta .status, .entity-hero-meta .badge { vertical-align:middle; }

/* slim KPI strip used inside detail pages */
.kpi-strip { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:12px; margin:0 0 16px; }
.kpi-strip .kpi {
    background:var(--bg-white); border:1px solid var(--border-light);
    border-radius:var(--radius-lg); padding:13px 16px; box-shadow:var(--shadow-sm);
}
.kpi-strip .kpi .lbl { font-size:.66rem; font-weight:700; text-transform:uppercase; letter-spacing:.12em; color:var(--text-muted); }
.kpi-strip .kpi .val { font-size:1.35rem; font-weight:800; color:var(--text-main); margin-top:3px; line-height:1.1; }
.kpi-strip .kpi .meta { font-size:.74rem; color:var(--text-muted); margin-top:2px; }

/* attachment preview grid (review detail) */
.attachment-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)); gap:14px; margin-top:8px; }
.attachment-card { background:var(--bg-white); border:1px solid var(--border-light); border-radius:10px; overflow:hidden; display:flex; flex-direction:column; transition:border-color .15s; }
.attachment-card:hover { border-color:var(--accent-green); }
.attachment-card.exif-mismatch { border-color:var(--status-error); box-shadow:0 0 0 1px var(--status-error-tint); }
.attachment-thumb-btn { background:none; border:0; padding:0; cursor:pointer; width:100%; aspect-ratio: 4 / 3; overflow:hidden; }
.attachment-thumb-btn img { width:100%; height:100%; object-fit:cover; transition:transform .15s; }
.attachment-thumb-btn:hover img { transform:scale(1.03); }
.attachment-thumb { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; aspect-ratio: 4 / 3; background:var(--bg-light); padding:14px; }
.attachment-thumb svg { width:36px; height:36px; color:var(--text-muted); }
.attachment-thumb span { font-size:.78rem; color:var(--text-body); word-break:break-all; text-align:center; }
.attachment-audio audio { width:100%; }
.attachment-doc { text-decoration:none; }
.attachment-doc:hover svg { color:var(--accent-green); }
.attachment-meta { padding:10px 12px; border-top:1px solid var(--border-light); display:flex; flex-direction:column; gap:4px; font-size:.78rem; }
.attachment-meta-row { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.attachment-meta-row .badge { font-size:.66rem; }
.attachment-q { font-size:.7rem; background:var(--bg-mid); padding:1px 6px; border-radius:4px; }

.attachment-map { height:280px; width:100%; margin-top:14px; border-radius:10px; overflow:hidden; border:1px solid var(--border-light); }

/* Lightbox singleton */
#attachmentLightbox { position:fixed; inset:0; z-index:1000; background:rgba(15,20,17,.88); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; padding:24px; }
#attachmentLightbox[hidden] { display:none; }
#attachmentLightbox img { max-width:96vw; max-height:80vh; object-fit:contain; box-shadow:0 30px 80px rgba(0,0,0,.5); }
#attachmentLightbox .lb-close { position:absolute; top:16px; right:20px; background:transparent; border:0; color:#fff; font-size:2rem; cursor:pointer; line-height:1; }
#attachmentLightbox #lbCaption { color:#cbd5e1; font-size:.86rem; }

/* master data — 2-pane layout */
.master-shell { display:grid; grid-template-columns: 240px 1fr; gap:20px; align-items:flex-start; }
.master-sidebar {
    background:var(--bg-white); border:1px solid var(--border-light); border-radius:var(--radius-lg);
    padding:14px 12px; position:sticky; top:24px;
    max-height:calc(100vh - 64px); overflow-y:auto;
}
.master-group { margin-bottom:14px; }
.master-group:last-child { margin-bottom:0; }
.master-group-label {
    font-size:.64rem; font-weight:700; text-transform:uppercase; letter-spacing:.12em;
    color:var(--text-muted); padding:0 10px 6px;
}
.master-item {
    display:block; padding:7px 10px; font-size:.86rem;
    color:var(--text-body); border-radius:6px; text-decoration:none;
    margin-bottom:1px;
}
.master-item:hover { background:var(--bg-light); color:var(--accent-green); text-decoration:none; }
.master-item.active { background:var(--accent-green-tint); color:var(--accent-green); font-weight:600; }
.master-content { min-width:0; }
.master-meta { font-size:.78rem; color:var(--text-muted); }
#masterSearchInput { min-width:260px; padding:8px 12px; border:1px solid var(--border-light); border-radius:8px; font-size:.86rem; background:var(--bg-white); font-family:inherit; }
#masterSearchInput:focus { outline:none; border-color:var(--accent-green); box-shadow:0 0 0 3px rgba(0,99,56,.10); }

@media (max-width: 800px) {
    .master-shell { grid-template-columns: 1fr; }
    .master-sidebar { position:relative; top:auto; max-height:none; }
}

/* row-actions dropdown (list views) */
.row-actions { position:relative; display:inline-block; }
.row-actions-btn {
    font-family:inherit; font-size:.78rem; font-weight:600;
    padding:5px 10px; border-radius:6px;
    background:var(--bg-white); color:var(--text-main); border:1px solid var(--border-light);
    cursor:pointer; display:inline-flex; align-items:center; gap:5px;
    transition: background .12s, border-color .12s;
}
.row-actions-btn:hover { background:var(--bg-light); border-color:var(--text-muted); }
.row-actions-btn.is-open { background:var(--bg-light); border-color:var(--accent-green); }
.row-actions-btn .caret { font-size:.6rem; color:var(--text-muted); }
.row-actions-menu {
    /* Fixed-positioned by JS — top/left computed from the button's viewport rect.
       Using `fixed` (not `absolute`) keeps it above any overflow:hidden ancestors
       (data-table-wrap, portal-card, etc.) without DOM-portal gymnastics. */
    position:fixed; z-index:9999;
    min-width:180px; background:var(--bg-white);
    border:1px solid var(--border-light); border-radius:8px;
    box-shadow:var(--shadow-md); padding:5px; display:none;
}
.row-actions-menu.open { display:block; }
.row-actions-menu button, .row-actions-menu a {
    display:block; width:100%; text-align:left;
    padding:7px 10px; font-size:.82rem; color:var(--text-main);
    cursor:pointer; border-radius:5px; text-decoration:none;
    background:none; border:none; font-family:inherit;
}
.row-actions-menu button:hover, .row-actions-menu a:hover { background:var(--bg-light); text-decoration:none; }
.row-actions-menu .danger { color:var(--status-error); }
.row-actions-menu .danger:hover { background:var(--status-error-tint); }
.row-actions-menu .success { color:var(--accent-green); }
.row-actions-menu .success:hover { background:var(--accent-green-tint); }
.row-actions-menu .ra-divider { height:1px; background:var(--border-light); margin:4px 2px; }
.row-actions-menu .ra-disabled { color:var(--text-muted); cursor:not-allowed; opacity:.6; }
.row-actions-menu .ra-disabled:hover { background:transparent; }

/* candidate suggestion cards (job detail) */
.cand-list { display:flex; flex-direction:column; gap:10px; margin-top:8px; }
.cand-card {
    display:grid; grid-template-columns:48px 1fr auto; gap:14px;
    background:var(--bg-white); border:1px solid var(--border-light); border-radius:12px;
    padding:14px 16px; align-items:center;
    transition: border-color .15s, box-shadow .15s;
}
.cand-card:hover { border-color:var(--accent-green); box-shadow:var(--shadow-sm); }
.cand-strong { border-left:4px solid var(--accent-green); }
.cand-fair   { border-left:4px solid var(--accent-yellow); }
.cand-weak   { border-left:4px solid var(--border-mid); opacity:.78; }

.cand-avatar {
    width:48px; height:48px; border-radius:50%;
    background:var(--accent-green); color:#fff;
    display:flex; align-items:center; justify-content:center;
    font-weight:700; font-size:.92rem; letter-spacing:.04em;
}
.cand-meta { min-width:0; }
.cand-name { display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:.96rem; font-weight:600; color:var(--text-main); }
.cand-name a { color:var(--text-main); }
.cand-name a:hover { color:var(--accent-green); text-decoration:none; }
.cand-sub { color:var(--text-muted); font-size:.82rem; margin-top:3px; }
.cand-skills { display:flex; flex-wrap:wrap; gap:5px; margin-top:8px; }
.sk-chip { font-size:.7rem; padding:2px 8px; border-radius:8px; font-weight:600; letter-spacing:.02em; border:1px solid transparent; }
.sk-verified { background:var(--accent-green); color:#fff; }
.sk-matched  { background:var(--accent-green-tint); color:var(--accent-green); border-color:var(--accent-green); }
.sk-missing  { background:var(--bg-mid); color:var(--text-muted); border-style:dashed; }
.cand-stats { display:flex; gap:14px; margin-top:8px; font-size:.78rem; color:var(--text-muted); }
.cand-stats span { white-space:nowrap; }

.cand-action { display:flex; flex-direction:column; align-items:flex-end; gap:8px; min-width:170px; }
.cand-score { text-align:center; padding:8px 12px; background:var(--bg-light); border-radius:10px; min-width:90px; }
.cand-score-num { font-size:1.5rem; font-weight:800; color:var(--text-main); line-height:1; }
.cand-strong .cand-score-num { color:var(--accent-green); }
.cand-weak .cand-score-num { color:var(--text-muted); }
.cand-score-label { font-size:.66rem; text-transform:uppercase; letter-spacing:.08em; color:var(--text-muted); margin-top:2px; font-weight:700; }
.cand-buttons { display:flex; flex-direction:column; gap:4px; align-items:stretch; width:100%; }
.cand-buttons .btn { justify-content:center; }
.cand-breakdown { font-size:.7rem; color:var(--text-muted); margin-top:2px; }
.cand-breakdown summary { cursor:pointer; padding:2px 4px; }
.cand-breakdown summary:hover { color:var(--accent-green); }
.cand-breakdown > div { display:flex; flex-direction:column; gap:2px; padding:6px 8px 0; }
.cand-breakdown strong { color:var(--text-main); }

@media (max-width: 800px) {
    .cand-card { grid-template-columns:48px 1fr; }
    .cand-action { grid-column:1 / -1; flex-direction:row; flex-wrap:wrap; min-width:0; align-items:center; }
    .cand-buttons { flex-direction:row; width:auto; }
}

/* funnel (training analytics) */
.funnel { display:flex; flex-direction:column; gap:8px; margin-top:8px; }
.funnel-row { display:grid; grid-template-columns: 200px 1fr 60px 100px; align-items:center; gap:12px; }
.funnel-label { font-size:.88rem; color:var(--text-body); font-weight:500; text-transform:capitalize; }
.funnel-bar-wrap { background:var(--bg-mid); border-radius:6px; height:28px; overflow:hidden; position:relative; }
.funnel-bar { background:linear-gradient(90deg, var(--accent-green) 0%, var(--accent-green-2) 100%); height:100%; display:flex; align-items:center; justify-content:flex-end; padding:0 10px; min-width:36px; transition: width .25s ease; }
.funnel-bar-good { background:linear-gradient(90deg, var(--accent-green) 0%, var(--accent-green-2) 100%); }
.funnel-bar-warn { background:linear-gradient(90deg, var(--status-error) 0%, var(--accent-yellow-dk) 100%); }
.funnel-count { color:#fff; font-size:.78rem; font-weight:700; }
.funnel-pct { font-size:.86rem; font-weight:700; color:var(--text-main); text-align:right; }
.funnel-current { color:var(--text-muted); text-align:right; }

/* json viewer */
.json-block {
    background:var(--bg-dark); color:#E2E8F0; padding:18px 20px;
    border-radius:var(--radius-md); overflow:auto; font-size:.78rem;
    max-height:520px; font-family:'JetBrains Mono', ui-monospace, monospace; line-height:1.55;
}

/* muted utility */
.muted { color:var(--text-muted); }

/* =====================================================
   Auth (login page) — dark "blueprint" landing
   ===================================================== */
.auth-page {
    min-height:100vh; display:flex; flex-direction:column;
    background:#0a0e16; color:#fff; position:relative; overflow-x:hidden;
}
/* Faint grid, fading out toward the edges */
.auth-page::before {
    content:""; position:fixed; inset:0; z-index:0; pointer-events:none;
    background-image:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size:44px 44px;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 40%, transparent 100%);
}
/* Slow-breathing ambient glow */
.auth-page::after {
    content:""; position:fixed; z-index:0; pointer-events:none;
    top:-260px; left:50%; transform:translateX(-50%);
    width:1100px; height:640px;
    background:radial-gradient(closest-side, rgba(0,140,90,.28), transparent 70%);
    animation: authGlowPulse 10s ease-in-out infinite;
}
@keyframes authGlowPulse { 0%,100% { opacity:.65; } 50% { opacity:1; } }

.auth-topbar, .auth-shell { position:relative; z-index:1; }

.auth-topbar {
    min-height:64px; padding:0 40px;
    display:flex; align-items:center; justify-content:space-between; gap:16px;
}
.auth-brand { display:flex; align-items:center; gap:10px; }
.auth-brand-box {
    width:30px; height:30px; border-radius:7px; background:var(--accent-green);
    border:1px solid rgba(255,255,255,.14);
    display:flex; align-items:center; justify-content:center;
    font-size:.74rem; font-weight:800; color:#fff;
}
.auth-brand-name { font-size:1.02rem; font-weight:700; color:#fff; }
.auth-topbar-link { color:#5c6577 !important; }

.auth-shell { display:grid; grid-template-columns:1.1fr .9fr; flex:1; align-items:center; gap:40px; padding:0 64px 56px; }
.auth-left { padding:24px 0; }

@keyframes authFadeUp { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:translateY(0); } }

.auth-eyebrow {
    display:inline-flex; align-items:center; gap:6px;
    font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.16em;
    color:#7d8ba0; margin-bottom:20px;
    font-family:'SF Mono','Menlo','Consolas',monospace;
    animation: authFadeUp .6s ease-out .1s both;
}
.auth-headline {
    font-size:3rem; font-weight:800; line-height:1.08; letter-spacing:-0.03em; margin-bottom:20px; color:#fff;
    animation: authFadeUp .6s ease-out .2s both;
}
.auth-headline .accent { color:#5c6577; }
.auth-sub {
    font-size:1rem; color:#9aa4b5; max-width:480px; line-height:1.65;
    animation: authFadeUp .6s ease-out .3s both;
}
.auth-bullets { margin-top:32px; display:flex; flex-wrap:wrap; gap:10px 28px; animation: authFadeUp .6s ease-out .4s both; }
.auth-bullet {
    display:inline-flex; align-items:center; gap:8px; font-size:.82rem; color:#b6bfcc;
    font-family:'SF Mono','Menlo','Consolas',monospace;
}
.auth-bullet .tick { color:var(--accent-green-2); font-size:.85rem; }

.auth-foot {
    margin-top:52px; display:flex; justify-content:space-between; gap:24px;
    padding-top:22px; border-top:1px solid rgba(255,255,255,.08);
    font-size:.7rem; color:#4a5468; text-transform:uppercase; letter-spacing:.08em; line-height:1.7;
    animation: authFadeUp .6s ease-out .5s both;
}
.auth-foot strong { display:block; color:#8b96a8; font-weight:700; }
.auth-foot .r { text-align:right; }

/* -------- Right panel: login card -------- */
.auth-right { display:flex; align-items:center; justify-content:center; }
.auth-card {
    width:100%; max-width:400px; background:#0f1522; border:1px solid rgba(255,255,255,.09);
    border-radius:16px; padding:32px; box-shadow:0 24px 60px rgba(0,0,0,.45);
    animation: authCardIn .6s cubic-bezier(.16,1,.3,1) .2s both;
}
@keyframes authCardIn { from { opacity:0; transform:translateY(14px) scale(.98); } to { opacity:1; transform:translateY(0) scale(1); } }

.auth-card-label {
    display:flex; justify-content:space-between; align-items:center;
    font-size:.68rem; font-weight:700; text-transform:uppercase; letter-spacing:.12em; color:#4a5468;
    font-family:'SF Mono','Menlo','Consolas',monospace; margin-bottom:20px;
}
.auth-card h1 { font-size:1.5rem; font-weight:800; margin-bottom:6px; letter-spacing:-0.02em; color:#fff; }
.auth-card .auth-card-sub { font-size:.88rem; color:#8b96a8; margin-bottom:26px; }
.auth-card label { display:block; font-size:.76rem; font-weight:600; color:#b6bfcc; margin:14px 0 6px; }
.auth-card input {
    width:100%; padding:11px 14px; border:1px solid rgba(255,255,255,.12); border-radius:9px;
    font-family:inherit; font-size:.92rem; background:rgba(255,255,255,.03); color:#fff;
    transition: border-color .15s, box-shadow .15s;
}
.auth-card input::placeholder { color:#4a5468; }
.auth-card input:focus { outline:none; border-color:var(--accent-green-2); box-shadow:0 0 0 3px rgba(0,99,56,.28); }
.auth-card button {
    width:100%; margin-top:22px; padding:12px;
    background:var(--accent-green); color:#fff; border:0; border-radius:9px;
    font-family:inherit; font-size:.95rem; font-weight:600; cursor:pointer;
    box-shadow:0 8px 20px rgba(0,99,56,.35); transition: background .15s, transform .12s;
}
.auth-card button:hover { background:var(--accent-green-2); transform:translateY(-1px); }
.auth-card .msg { margin-top:14px; font-size:.85rem; }
.auth-card .msg.err { color:#ff6b6b; }

.auth-role-divider {
    display:flex; align-items:center; gap:12px; margin:26px 0 16px;
    font-size:.64rem; font-weight:700; text-transform:uppercase; letter-spacing:.14em; color:#4a5468;
}
.auth-role-divider::before, .auth-role-divider::after { content:""; flex:1; height:1px; background:rgba(255,255,255,.08); }
.auth-roles { display:flex; flex-direction:column; gap:9px; }
.auth-role { display:flex; align-items:baseline; gap:10px; font-size:.81rem; }
.auth-role .dot { width:7px; height:7px; border-radius:50%; flex-shrink:0; align-self:center; }
.auth-role b { color:#e2e6ee; font-weight:700; }
.auth-role span { color:#7d8ba0; }

@media (prefers-reduced-motion: reduce) {
    .auth-page::after,
    .auth-eyebrow, .auth-headline, .auth-sub, .auth-bullets, .auth-foot, .auth-card {
        animation:none !important; opacity:1 !important; transform:none !important;
    }
}

/* =====================================================
   Mobile
   ===================================================== */
@media (max-width: 960px) {
    .portal-header-top { padding: 12px 18px; flex-wrap: wrap; gap: 12px; }
    .portal-header-user { gap: 14px; }
    .portal-nav-hz { padding: 0 10px; flex-wrap: wrap; }
    .nav-dropdown-btn { padding: 10px 12px; font-size: .8rem; }
    .portal-main { padding:20px 18px 56px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .auth-shell { grid-template-columns:1fr; padding:0 32px 40px; gap:36px; }
    .auth-left { padding:12px 0; }
    .auth-headline { font-size:2.1rem; }
    .form-grid .row { grid-template-columns:1fr; }
}
@media (max-width: 640px) {
    .auth-topbar { padding:12px 18px; }
    .auth-topbar-link { display:none; }
    .auth-shell { padding:0 18px 32px; }
    .auth-headline { font-size:1.8rem; }
    .auth-foot { flex-direction:column; gap:6px; }
    .auth-foot .r { text-align:left; }
}
@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
}

/* ─────────────── Sprint 10 — Pager + empty state ─────────────── */
.pager{display:flex;align-items:center;gap:16px;padding:14px 4px;flex-wrap:wrap;font-size:13px;color:var(--text-muted)}
.pager-info{flex:1;min-width:180px}
.pager-controls{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.pg-btn,.pg-num{display:inline-block;padding:5px 10px;border:1px solid var(--border-light);border-radius:6px;text-decoration:none;color:var(--text-main);background:#fff;font-size:13px;line-height:1}
.pg-num{min-width:30px;text-align:center}
.pg-btn:hover,.pg-num:hover{background:#f4f6f8;border-color:#bcc4cc}
.pg-btn.disabled{color:#bbb;background:#fafafa;cursor:not-allowed}
.pg-num.current{background:var(--accent-green);color:#fff;border-color:var(--accent-green);font-weight:600}
.pg-gap{padding:0 4px;color:#aaa}
.pager-perpage select{padding:5px 8px;border:1px solid var(--border-light);border-radius:6px;font-size:13px;background:#fff}

.empty-state{padding:42px 24px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:10px}
.empty-icon{font-size:42px;line-height:1;opacity:.4}
.empty-title{font-size:15px;font-weight:600;color:var(--text-main)}
.empty-body{font-size:13px;color:var(--text-muted);max-width:420px;line-height:1.5}
.empty-state .btn{margin-top:8px}
.empty-cell{background:#fafbfc}

.pagehead-actions{display:flex;gap:8px;align-items:center}
.btn-export{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:1px solid var(--border-light);border-radius:6px;background:#fff;color:var(--text-main);text-decoration:none;font-size:13px}
.btn-export:hover{background:#f4f6f8}

/* ─────────────── Review/detail — high-throughput triage layout ─────────────── */
.review-toolbar{
    position:sticky; top:0; z-index:30;
    background:#fff; border:1px solid var(--border-light); border-radius:10px;
    padding:10px 14px; margin-bottom:16px;
    display:flex; align-items:center; gap:12px; flex-wrap:wrap;
    box-shadow:0 1px 3px rgba(0,0,0,.04);
}
.review-toolbar .rt-position{font-size:.82rem; color:var(--text-muted)}
.review-toolbar .rt-position b{color:var(--text); font-weight:700}
.review-toolbar .rt-nav{display:flex; gap:6px; align-items:center}
.review-toolbar .rt-nav a, .review-toolbar .rt-nav .disabled{
    display:inline-flex; align-items:center; gap:4px;
    padding:6px 10px; border-radius:6px; border:1px solid var(--border-light);
    text-decoration:none; color:var(--text); background:#fff; font-size:.82rem; font-weight:600;
}
.review-toolbar .rt-nav a:hover{background:var(--bg-light)}
.review-toolbar .rt-nav .disabled{color:#bbb; background:#fafafa; cursor:not-allowed}
.review-toolbar .rt-spacer{flex:1}
.review-toolbar .rt-quick{display:flex; gap:6px}
.review-toolbar .kbd{
    display:inline-block; padding:1px 5px; border-radius:4px; background:#f1f3f5;
    border:1px solid #dee2e6; font-family:ui-monospace, SFMono-Regular, monospace;
    font-size:.7rem; color:#495057; line-height:1.4;
}

.review-grid{display:grid; grid-template-columns: minmax(0, 1.6fr) 380px; gap:18px; align-items:flex-start}
.review-grid > .rg-right{position:sticky; top:64px}
@media(max-width: 1180px){
    .review-grid{grid-template-columns: 1fr}
    .review-grid > .rg-right{position:static}
}

/* HFC summary chip (compact, fits in sticky panel) */
.hfc-summary{display:flex; align-items:center; gap:14px; padding:12px 14px; border-radius:8px; background:var(--bg-light); margin-bottom:10px}
.hfc-summary .hfc-score{font-size:1.8rem; font-weight:800; line-height:1}
.hfc-summary .hfc-score small{font-size:.85rem; color:var(--text-muted); font-weight:500}
.hfc-summary .hfc-meta{flex:1; font-size:.78rem; color:var(--text-muted)}
.hfc-summary .hfc-meta b{display:block; color:var(--text); font-size:.86rem; font-weight:700; margin-bottom:2px}
.hfc-rules{font-size:.78rem; max-height:180px; overflow:auto; border:1px solid var(--border-light); border-radius:6px; margin-top:8px}
.hfc-rules .hfc-row{display:flex; gap:8px; padding:6px 10px; border-bottom:1px solid var(--border-light); align-items:center}
.hfc-rules .hfc-row:last-child{border-bottom:0}
.hfc-rules .hfc-row .mark{width:14px; flex-shrink:0; text-align:center; font-weight:700}
.hfc-rules .hfc-row .lbl{flex:1; text-transform:capitalize}
.hfc-rules .hfc-row.fail{background:#fff5f5}

/* Action tabs */
.action-tabs{display:flex; gap:2px; border-bottom:1px solid var(--border-light); margin-bottom:10px}
.action-tabs button{
    flex:1; padding:8px 10px; border:0; background:transparent; cursor:pointer;
    font-size:.82rem; font-weight:600; color:var(--text-muted);
    border-bottom:2px solid transparent;
}
.action-tabs button.active{color:var(--text); border-bottom-color:var(--accent-green)}
.action-tabs button[data-tab="reject"].active{border-bottom-color:var(--status-error, #c0392b)}
.action-tabs button[data-tab="correct"].active{border-bottom-color:var(--accent-yellow-dk, #b88600)}
.action-pane{display:none; flex-direction:column; gap:8px}
.action-pane.active{display:flex}
.action-pane textarea, .action-pane input[type=text]{
    width:100%; padding:8px 10px; border:1px solid var(--border-light); border-radius:6px;
    font-family:inherit; font-size:.86rem; box-sizing:border-box;
}

/* Section nav (jump list) */
.section-nav{display:flex; gap:6px; flex-wrap:wrap; padding:10px 14px; background:var(--bg-light); border-radius:8px; margin-bottom:12px}
.section-nav a{
    display:inline-flex; align-items:center; gap:4px;
    padding:4px 9px; border-radius:14px; background:#fff; border:1px solid var(--border-light);
    text-decoration:none; color:var(--text); font-size:.76rem;
}
.section-nav a .pill-count{font-size:.68rem; color:var(--text-muted)}
.section-nav a.has-issue{border-color:#f5b7b1; background:#fff5f5; color:#922b21}
.section-nav a.has-issue .pill-count{color:#c0392b; font-weight:700}

/* Survey sections */
.survey-section{border:1px solid var(--border-light); border-radius:10px; margin-bottom:12px; background:#fff; overflow:hidden}
.survey-section > summary{
    list-style:none; cursor:pointer;
    padding:12px 14px; display:flex; align-items:center; gap:10px;
    background:var(--bg-light); font-weight:600; font-size:.92rem;
}
.survey-section > summary::-webkit-details-marker{display:none}
.survey-section > summary::before{content:"▸"; color:var(--text-muted); font-size:.8rem; transition:transform .15s}
.survey-section[open] > summary::before{transform:rotate(90deg)}
.survey-section[open] > summary{background:#eef3f0}
.survey-section .sec-pill{display:inline-block; padding:1px 8px; border-radius:10px; font-size:.7rem; font-weight:600; background:#fff; color:var(--text-muted); border:1px solid var(--border-light)}
.survey-section .sec-pill.warn{background:#fff5f5; color:#c0392b; border-color:#f5b7b1}
.survey-section .sec-body{padding:0}

/* Q&A list inside a section */
.qa-list{display:flex; flex-direction:column}
.qa-row{display:grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap:14px; padding:10px 16px; border-top:1px solid var(--border-light); align-items:start}
.qa-row:first-child{border-top:0}
.qa-row.flagged{background:#ffffff}
.qa-row .qa-q{font-size:.86rem; color:var(--text)}
.qa-row .qa-q .qa-meta{font-size:.7rem; color:var(--text-muted); margin-top:3px; font-family:ui-monospace, monospace}
.qa-row .qa-a{font-size:.88rem; color:var(--text); word-break:break-word}
.qa-row .qa-a .missing{display:inline-block; padding:1px 7px; border-radius:10px; background:#fdecea; color:#c0392b; font-size:.72rem; font-weight:600}
.qa-row .qa-a .req-tag{margin-left:6px; font-size:.65rem; color:#c0392b; font-weight:600}

.review-mode-toggle{display:inline-flex; gap:2px; border:1px solid var(--border-light); border-radius:6px; overflow:hidden; margin-left:auto}
.review-mode-toggle button{padding:5px 10px; border:0; background:#fff; cursor:pointer; font-size:.76rem; color:var(--text-muted)}
.review-mode-toggle button.active{background:var(--accent-green); color:#fff}

/* Keyboard shortcuts cheat sheet */
.kbd-sheet{position:fixed; bottom:18px; right:18px; background:#fff; border:1px solid var(--border-light); border-radius:10px; padding:12px 14px; box-shadow:0 6px 20px rgba(0,0,0,.12); font-size:.78rem; z-index:200; min-width:240px}
.kbd-sheet h4{margin:0 0 8px; font-size:.86rem}
.kbd-sheet table{width:100%}
.kbd-sheet td{padding:3px 0; vertical-align:middle}
.kbd-sheet td.k{text-align:right; padding-right:8px; width:80px}

/* ─────────────── Notification bell + inbox (Sprint 10 D) ─────────────── */
.notif-bell{position:fixed; top:18px; right:18px; z-index:90}
.notif-bell-btn{
    width:38px; height:38px; border-radius:50%; border:1px solid var(--border-light);
    background:#fff; cursor:pointer; display:flex; align-items:center; justify-content:center;
    box-shadow:var(--shadow-sm); color:var(--text); position:relative;
}
.notif-bell-btn:hover{background:var(--bg-light)}
.notif-bell-btn svg{width:18px; height:18px}
.notif-badge{
    position:absolute; top:-3px; right:-3px; min-width:18px; height:18px; padding:0 5px;
    background:var(--status-error, #c0392b); color:#fff; border-radius:9px;
    font-size:.66rem; font-weight:700; line-height:18px; text-align:center;
    border:2px solid #fff;
}
.notif-panel{
    position:absolute; top:46px; right:0; width:360px; max-width:calc(100vw - 36px);
    background:#fff; border:1px solid var(--border-light); border-radius:12px;
    box-shadow:0 12px 32px rgba(0,0,0,.12);
    max-height:520px; display:flex; flex-direction:column; overflow:hidden;
}
.notif-panel[hidden], .notif-badge[hidden], #notifMarkAll[hidden]{display:none !important}
.notif-panel-head{display:flex; justify-content:space-between; align-items:center; padding:10px 14px; border-bottom:1px solid var(--border-light); background:var(--bg-light)}
.notif-panel-head strong{font-size:.92rem}
.notif-panel-link{font-size:.78rem; color:var(--accent-green); font-weight:600}
.notif-panel-list{flex:1; overflow-y:auto; min-height:60px}
.notif-loading, .notif-empty{padding:24px 14px; text-align:center; color:var(--text-muted); font-size:.86rem}
.notif-empty.err{color:var(--status-error)}
.notif-item{display:flex; gap:8px; padding:10px 14px; border-bottom:1px solid var(--border-light); align-items:flex-start}
.notif-item:last-child{border-bottom:0}
.notif-item:hover{background:var(--bg-light)}
.notif-item.unread{background:#f7fbf9}
.notif-item.unread:hover{background:#eff7f3}
.notif-item .dot-unread{width:8px; height:8px; border-radius:50%; background:var(--accent-green); margin-top:6px; flex-shrink:0}
.notif-item .dot-spacer{width:8px; height:8px; flex-shrink:0; margin-top:6px}
.notif-item-body{flex:1; min-width:0}
.notif-item-title{font-size:.84rem; font-weight:600; color:var(--text); margin-bottom:2px; line-height:1.35}
.notif-item-title a{color:inherit}
.notif-item-title a:hover{color:var(--accent-green)}
.notif-item-sub{font-size:.76rem; color:var(--text-muted); margin-bottom:3px; line-height:1.4}
.notif-item-meta{font-size:.7rem; color:var(--text-muted)}
.notif-sev{display:inline-block; padding:0 5px; border-radius:3px; font-size:.66rem; font-weight:700; text-transform:uppercase}
.sev-info{background:#eef3fc; color:#1d4ed8}
.sev-warning{background:#fff3d6; color:#a66700}
.sev-critical{background:#fdecea; color:#c0392b}
.notif-panel-foot{padding:8px 14px; border-top:1px solid var(--border-light); text-align:right}
.btn-link{background:none; border:0; color:var(--accent-green); font-weight:600; font-size:.78rem; cursor:pointer}
.btn-link:hover{text-decoration:underline}

/* Inbox table tweaks */
.notif-row .dot-unread{display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--accent-green)}
.notif-row.notif-read .notif-item-title{font-weight:500}
.notif-row .notif-link{color:var(--text); text-decoration:none}
.notif-row .notif-link:hover{color:var(--accent-green)}

/* ─────────────── Question-level feedback (Review Detail) ─────────────── */
.qa-row{ position:relative; }
.qa-feedback{ margin-top:8px; padding:0 4px; display:flex; flex-direction:column; gap:4px; }
.qf-item{ background:rgba(182,121,30,.06); border-left:2.5px solid var(--accent-yellow); padding:6px 10px; border-radius:0 6px 6px 0; }
.qf-item small{ display:block; font-size:.82rem; color:var(--text-main); line-height:1.4; }
.qf-meta{ font-size:.68rem; color:var(--text-muted); margin-top:2px; font-weight:600; text-transform:uppercase; letter-spacing:.02em; }
.btn-add-qf{ 
    position:absolute; top:12px; right:12px; 
    background:#fff; border:1px solid var(--border-mid); color:var(--text-muted); 
    width:26px; height:26px; border-radius:6px; cursor:pointer; 
    display:flex; align-items:center; justify-content:center; font-size:.85rem;
    transition:all .15s; opacity:0;
}
.btn-add-qf:hover{ border-color:var(--accent-yellow); color:var(--accent-yellow-dk); background:var(--highlight-yellow); transform:scale(1.05); }
.qa-row:hover .btn-add-qf{ opacity:1; }

.qf-form{ margin-top:8px; display:flex; flex-direction:column; gap:6px; background:var(--bg-light); padding:10px; border-radius:8px; border:1px solid var(--border-mid); }
.qf-input{ width:100%; min-height:60px; padding:8px 10px; border:1px solid var(--border-mid); border-radius:6px; font-family:inherit; font-size:.84rem; resize:vertical; }
.qf-input:focus{ outline:none; border-color:var(--accent-yellow); box-shadow:0 0 0 3px rgba(254,172,0,.12); }
.qf-actions{ display:flex; gap:6px; justify-content:flex-end; }
