/* =========================================================
   DGIT(HRD) Preference Portal
   DGIT(HRD) | CBDT | Ministry of Finance, Govt. of India
   ========================================================= */

@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/DMSans-Normal-300-400-600-700-LatinExt.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/DMSans-Normal-300-400-600-700-Latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'DM Sans';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/DMSans-Italic-400-LatinExt.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'DM Sans';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/DMSans-Italic-400-Latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Rajdhani';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/Rajdhani-600-Devanagari.woff2') format('woff2');
    unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}
@font-face {
    font-family: 'Rajdhani';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/Rajdhani-600-LatinExt.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Rajdhani';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/Rajdhani-600-Latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Rajdhani';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/Rajdhani-700-Devanagari.woff2') format('woff2');
    unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}
@font-face {
    font-family: 'Rajdhani';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/Rajdhani-700-LatinExt.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Rajdhani';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/Rajdhani-700-Latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    color-scheme: light;
    --navy:    #003366;
    --navy-dk: #001f44;
    --navy-lt: #0a4a8c;
    --saffron: #FF6600;
    --saffron-dk: #cc5200;
    --green:   #138808;
    --green-lt:#e8f6e8;
    --ash:     #f0f4f9;
    --line:    #d0dae9;
    --ink:     #1a2740;
    --muted:   #5c708a;
    --white:   #ffffff;
    --red:     #c0392b;
    --amber:   #e67e22;
    --shadow:  0 1px 3px rgba(15,23,42,.08);
    --shadow-lg: 0 12px 32px rgba(15,23,42,.18);
    --radius:  6px;
    --radius-lg: 8px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: hidden; }

body {
    font-family: 'DM Sans', sans-serif;
    color: var(--ink);
    background: #f6f8fb;
    min-height: 100vh;
    font-size: 14.5px;
    line-height: 1.5;
}

input,
select,
textarea,
button {
    color-scheme: light;
}

body *,
body *::before,
body *::after {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

:where(
    .card,
    .table-card,
    .inline-panel,
    .portal-modal,
    .portal-modal-body,
    .portal-modal-actions,
    .drawer-panel,
    .candidate-upload-card,
    .report-filter-card,
    .assignment-form-card,
    .assignment-candidate-card,
    .preference-resend-card,
    .candidate-list-card,
    .dashboard-panel,
    .portal-header,
    .cand-info,
    .summary-chip,
    .search-row,
    .candidate-filter-grid,
    .report-filter-grid,
    .pagination,
    .table-pagination,
    .actions,
    .action-row,
    .cpms-pagination,
    .cpms-page-controls,
    .cpms-page-size,
    .card-header,
    .card-title,
    .section-header,
    .section-title,
    .page-header,
    .page-title,
    .profile-menu,
    .profile-button,
    .profile-copy,
    .topbar-text
) {
    min-width: 0;
}

:where(
    .card,
    .table-card,
    .inline-panel,
    .portal-modal,
    .drawer-panel,
    .candidate-upload-card,
    .report-filter-card,
    .assignment-form-card,
    .assignment-candidate-card,
    .preference-resend-card,
    .candidate-list-card,
    .dashboard-panel,
    .portal-header,
    .cand-info,
    .summary-chip,
    .search-row,
    .candidate-filter-grid,
    .report-filter-grid,
    .portal-modal-body,
    .portal-modal-actions,
    .pagination,
    .table-pagination,
    .actions,
    .action-row,
    .cpms-pagination,
    .cpms-page-controls,
    .cpms-page-size
) {
    overflow-wrap: anywhere;
    word-break: break-word;
}

img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
}

button,
input,
select,
textarea {
    min-width: 0;
    max-width: 100%;
}

pre,
code,
kbd,
samp {
    overflow-wrap: normal;
    word-break: normal;
}

a { color: var(--navy-lt); text-decoration: none; }
a:hover { color: var(--saffron); text-decoration: underline; }

/* ── HEADER STRIP ───────────────────────────────────── */
.gov-strip {
    background: var(--navy-dk);
    color: rgba(255,255,255,.75);
    font-size: 11.5px;
    letter-spacing: .4px;
    padding: 3px 18px;
    display: flex;
    gap: 12px;
    align-items: center;
}
.gov-strip span { opacity: .55; }

/* ── TOP HEADER ─────────────────────────────────────── */
.topbar {
    background: #082f5f;
    color: #fff;
    padding: 0 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    position: relative;
    box-shadow: 0 1px 3px rgba(15,23,42,.18);
}
.topbar::after {
    content:'';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--green) 33.3%, var(--white) 33.3% 66.6%, var(--saffron) 66.6%);
}
.topbar-emblem {
    width: 44px; height: 44px;
    background: rgba(255,255,255,.12);
    border: 2px solid rgba(255,255,255,.25);
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-size: 23px;
    flex-shrink: 0;
}
.topbar-emblem .icon { width: 22px; height: 22px; }
.topbar-emblem img,
.brand-mark img,
.auth-logo img,
.login-emblem img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.topbar-text { flex: 1; }
.topbar-text .org { font-family: 'Rajdhani', sans-serif; font-size: 15px; font-weight: 700; letter-spacing: .3px; line-height: 1.2; }
.topbar-text .sub { font-size: 11.5px; opacity: .7; letter-spacing: .2px; }
.topbar-badge {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    display: none;
}
@media(min-width:640px){ .topbar-badge { display: block; } }

/* ── SHELL ──────────────────────────────────────────── */
.shell { width: min(768px, calc(100% - 20px)); margin: 14px auto; }
.shell.shell--wide { width: min(900px, calc(100% - 20px)); }
.narrow { width: min(560px, calc(100% - 20px)); margin: 16px auto; }

[data-page-loader-scope] {
    position: relative;
}

.page-loader-overlay {
    position: absolute;
    inset: 0;
    z-index: 900;
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    background: rgba(255, 255, 255, 0.64);
    backdrop-filter: blur(2px);
    cursor: wait;
}

[data-page-loader-scope].is-page-loading .page-loader-overlay {
    display: flex;
}

[data-page-loader-scope].is-full-page-loading > .page-loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 1300;
    min-height: 0;
}

.page-loader-card {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 13px;
    border: 1px solid rgba(0, 51, 102, 0.12);
    border-radius: 999px;
    background: #fff;
    color: #0f172a;
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    animation: page-loader-pop .16s ease-out;
}

.page-loader-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #cbd5e1;
    border-top-color: #003366;
    border-radius: 50%;
    animation: page-loader-spin 0.7s linear infinite;
}

@keyframes page-loader-spin {
    to { transform: rotate(360deg); }
}

@keyframes page-loader-pop {
    from {
        opacity: 0;
        transform: translateY(4px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media print {
    .page-loader-overlay {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .page-loader-overlay {
        min-height: 140px;
    }
    .page-loader-card {
        gap: 8px;
        padding: 9px 12px;
        font-size: 13px;
    }
    .page-loader-spinner {
        width: 15px;
        height: 15px;
    }
}
.breadcrumb-bar {
    background: #fff;
    border-bottom: 1px solid #d0dae9;
    padding: 4px 18px;
    font-size: 12px;
    color: #5c708a;
    display: flex;
    gap: 6px;
    align-items: center;
}
.app-footer {
    background: var(--navy-dk);
    color: rgba(255,255,255,.55);
    text-align: center;
    padding: 8px 16px;
    font-size: 11.5px;
    line-height: 1.35;
    margin-top: 12px;
}
.app-footer span { color: rgba(255,255,255,.8); }

/* ── ALERTS ─────────────────────────────────────────── */
.alert {
    padding: 13px 18px;
    border-radius: var(--radius);
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 500;
    font-size: 14px;
    border-left: 4px solid;
}
.alert::before { font-size: 16px; flex-shrink: 0; }
.alert.ok  { background: #e9fff3; border-color: var(--green); color: #0a4d1e; }
.alert.ok::before  { content: '✓'; }
.alert.err { background: #fff2f0; border-color: var(--red); color: #7c1c14; }
.alert.err::before { content: '⚠'; }
.alert.warn{ background: #fff8ec; border-color: var(--amber); color: #7a4400; }
.alert.warn::before{ content: '!'; }

.portal-toast-stack {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1400;
    width: auto;
    max-width: min(520px, calc(100vw - 48px));
    display: grid;
    gap: 10px;
    justify-items: end;
    pointer-events: none;
}
.portal-toast,
.auth-toast {
    min-width: 180px;
    width: fit-content;
    max-width: 100%;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    box-shadow: 0 14px 34px rgba(0,20,48,.18);
    pointer-events: auto;
}
.portal-toast > span,
.auth-toast > span {
    display: grid;
    gap: 2px;
    line-height: 1.35;
}
.portal-toast.ok,
.auth-toast.ok { background: #28a745; }
.portal-toast.err,
.auth-toast.err { background: #b42318; }
.portal-toast.warn,
.auth-toast.warn { background: linear-gradient(180deg, #e08a1f, #c96f12); }
.portal-toast button,
.auth-toast button {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: rgba(255,255,255,.82);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
.portal-toast button:hover,
.auth-toast button:hover {
    background: rgba(255,255,255,.14);
    color: #fff;
}

/* ── CARDS ──────────────────────────────────────────── */
.card {
    background: linear-gradient(180deg, #fff, #fcfdff);
    border: 1px solid rgba(208,218,233,.95);
    border-radius: 10px;
    padding: 13px 15px;
    box-shadow: 0 8px 24px rgba(15,23,42,.06);
    margin-bottom: 12px;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(208,218,233,.85);
    gap: 10px;
    flex-wrap: wrap;
}
.card-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}
/* .card-title::before {
    content: '';
    display: inline-block;
    width: 3px; height: 16px;
    background: var(--saffron);
    border-radius: 2px;
} */
.table-card {
    padding: 0;
    overflow: hidden;
}
.table-card .card-header {
    margin: 0;
    min-height: 58px;
    padding: 10px 18px;
    border-bottom: 0;
    background: linear-gradient(135deg, #38406d, #2d355d);
    color: #fff;
}
.table-card .card-title {
    color: #fff;
    font-size: 16px;
}
.table-card .card-title::before {
    display: none;
}
.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}
.regions-search-toolbar {
    flex-wrap: nowrap;
}
.regions-search-toolbar input {
    flex: 0 0 260px;
    min-width: 0;
}
.regions-search-toolbar .btn-icon {
    flex: 0 0 36px;
}
.table-toolbar input,
.table-toolbar select {
    padding-top: 7px;
    padding-bottom: 7px;
    border-color: #d4d9e4;
    background: #fff;
}
.table-toolbar .btn-icon {
    width: 36px;
    height: 36px;
    border-color: #d7dcef;
    background: #fff;
    color: var(--navy);
}
.table-toolbar .btn-icon:hover {
    border-color: #fff;
    background: #eef5ff;
    color: var(--navy);
}
.table-toolbar .btn-primary {
    min-height: 36px;
    background: #001f44;
    border-color: #001f44;
    color: #fff;
    font-size: 13.5px;
    padding: 7px 13px;
}
.table-toolbar .btn-primary:hover {
    background: #003366;
    border-color: #003366;
    color: #fff;
}
.search-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #fff, #fafcff);
}
.search-row input,
.search-row select {
    min-height: 36px;
    padding-top: 7px;
    padding-bottom: 7px;
}
.search-row .btn {
    min-height: 36px;
    padding: 7px 0px;
}
.search-row .btn-primary {
    background: #001f44;
    border-color: #001f44;
    color: #fff;
}
.search-row .btn-primary:hover {
    background: #003366;
    border-color: #003366;
}
.candidate-filter-grid {
    display: grid;
    gap: 12px;
    padding: 16px 18px 14px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #fff, #fafcff);
}
.candidate-filter-row {
    display: grid;
    gap: 12px;
    align-items: end;
}
.candidate-filter-row-top {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.candidate-filter-row-bottom {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: stretch;
}
.candidate-filter-grid .field {
    margin-bottom: 0;
}
.candidate-filter-grid .field label {
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 700;
    color: var(--navy);
}
.candidate-search-box {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.candidate-search-box input {
    flex: 1 1 auto;
    min-height: 36px;
    padding-top: 7px;
    padding-bottom: 7px;
}
.candidate-search-box .btn {
    min-height: 36px;
    padding: 7px 13px;
    white-space: nowrap;
}
.candidate-search-box .btn {
    justify-content: center;
}
.candidate-filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    grid-column: 3 / span 2;
}
.candidate-filter-row-bottom .candidate-filter-actions {
    align-self: end;
    min-height: 100%;
    padding-top: 23px;
    padding-bottom: 0;
}
.candidate-list-card {
    padding: 0;
    overflow: hidden;
}
.candidate-list-card .candidate-filter-grid {
    border-bottom: 1px solid var(--line);
}
.candidate-list-card .candidate-list-table-wrap {
    margin-top: 0;
}
.candidate-list-card .candidate-list-table {
    min-width: 1550px;
}
.candidate-list-card .pagination {
    padding: 12px 18px 16px;
}
.preference-search-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}
.summary-chip {
    display: grid;
    gap: 4px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: linear-gradient(180deg, #fff, #fbfcff);
    box-shadow: 0 8px 24px rgba(15,23,42,.05);
}
.summary-chip span {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .4px;
}
.summary-chip strong {
    font-size: 15px;
    color: var(--navy);
}
.action-row {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-wrap: nowrap;
}
.action-row .btn {
    min-height: 32px;
    padding: 0 10px;
}
.action-row .btn.btn-sm {
    min-height: 32px;
}
.portal-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 650;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(9, 20, 35, .52);
}
.portal-modal-overlay.is-open {
    display: flex;
}
.portal-modal {
    width: min(760px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
    background: linear-gradient(180deg, #fff, #fbfcff);
    border: 1px solid #c5d0e0;
    border-radius: 12px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
}
.preference-search-overlay {
    align-items: flex-start;
    padding-top: 18px;
}
.preference-search-modal {
    width: min(1280px, calc(100vw - 36px));
    max-height: calc(100vh - 36px);
}
.preference-search-modal .portal-modal-body {
    padding: 18px;
}
.preference-search-modal .inline-panel {
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15,23,42,.05);
}
.preference-search-modal .search-row {
    background: linear-gradient(180deg, #f8fbff, #f3f7fc);
    border-top: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px 16px;
}
.portal-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #082f5f, #0a4a8c);
    color: #fff;
}
.portal-modal-head h3 {
    margin: 0;
    color: #fff;
    font-size: 17px;
}
.portal-modal-head p {
    margin: 2px 0 0;
    color: rgba(255, 255, 255, .82);
    font-size: 12px;
}
.portal-modal-body {
    padding: 18px 16px 16px;
}
.portal-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr))  !important;
    gap: 14px 12px;
}
.portal-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 16px 18px;
}
.readonly-field input,
.readonly-field select,
.readonly-field textarea {
    background: #f4f6f9;
    color: var(--ink);
    opacity: 1;
    font-weight: 600;
}
.inline-panel {
    margin-top: 14px;
}
.inline-panel .card-header {
    padding-top: 12px;
    padding-bottom: 12px;
}
.inline-panel .search-row {
    border-top: 1px solid var(--line);
}
.inline-panel .table-wrap {
    margin-top: 0;
}
.preference-resend-card .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #fff, #fafdff);
}
.preference-resend-card .section-title {
    display: inline-flex;
    align-items: center;
    gap: 0;
}
.preference-resend-card .resend-search-row {
    align-items: end;
    padding: 12px 16px;
    gap: 10px;
}
.preference-resend-card .resend-search-fields {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto auto;
    gap: 10px 12px;
    flex: 1 1 420px;
    max-width: none;
    align-items: end;
}
.preference-resend-card .resend-search-fields .field {
    width: 100%;
    margin-bottom: 0;
    min-width: 0;
}
.preference-resend-card .resend-search-fields .field label {
    font-size: 12px;
    margin-bottom: 4px;
    color: var(--navy);
    font-weight: 700;
}
.preference-resend-card .resend-search-fields input {
    min-height: 36px;
    padding-top: 7px;
    padding-bottom: 7px;
}
.preference-resend-card .resend-search-fields input,
.preference-resend-card .resend-search-fields select {
    width: 100%;
}
.preference-resend-card .resend-search-fields .btn {
    flex: 0 0 auto;
    justify-self: start;
    white-space: nowrap;
}
.preference-resend-card .preference-resend-table {
    min-width: 820px;
}
.preference-resend-card .search-row {
    background: linear-gradient(180deg, #f8fbff, #f3f7fc);
    border-top: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px 16px;
}
.preference-resend-card .table-wrap {
    margin-top: 0;
}
.preference-resend-card .table-pagination {
    padding: 14px 18px 18px;
}
.drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 660;
    display: none;
    background: rgba(9, 20, 35, .42);
}
.drawer-overlay.is-open {
    display: block;
}
.drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(520px, 100%);
    height: 100%;
    background: #fff;
    box-shadow: -18px 0 60px rgba(0, 0, 0, .18);
    transform: translateX(100%);
    transition: transform .2s ease;
    display: flex;
    flex-direction: column;
}
.drawer-overlay.is-open .drawer-panel {
    transform: translateX(0);
}
.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 18px;
    background: var(--navy);
    color: #fff;
}
.drawer-head h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
}
.drawer-head p {
    margin: 2px 0 0;
    color: rgba(255, 255, 255, .82);
    font-size: 12.5px;
}
.drawer-body {
    padding: 18px;
    overflow: auto;
    flex: 1;
}
.drawer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 0;
}
.import-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.report-filter-card {
    margin-bottom: 16px;
}

.report-main {
    min-width: 0;
}
.report-mode-rail {
    display: flex;
    gap: 8px;
    padding: 16px 0px;
   
}
.report-action{
    display: flex;
    justify-content: flex-end;
}
.card-header.report_cards_header {
    align-items: center;
}
.report-mode-btn {
    display: flex;
    align-items: center;
    justify-content: stretch;
    gap: 4px;
    min-height: 34px;
    padding: 8px 6px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    color: var(--navy);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(24, 39, 75, .05);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}
.grid.two.candidate_items {
    grid-template-columns: repeat(3, 1fr);
}
.report-mode-btn svg {
    width: 18px;
    height: 18px;
}
.report-mode-btn span {
    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
}
.report-mode-btn:hover,
.report-mode-btn.active {
    border-color: var(--navy-lt);
    box-shadow: 0 5px 16px rgba(24, 39, 75, .11);
    transform: translateY(-1px);
}
.report-mode-btn.active {
    background: #f8fbff;
}
.report-tabs-card {
    padding: 0;
    margin-bottom: 16px;
    overflow: hidden;
}
.report-tabs {
    padding: 0 16px;
    border-top: 0;
    border-bottom: 1px solid var(--line);
}
.report-tabs a {
    min-height: 48px;
    padding: 0 18px;
}
.report-filter-card .card-header > div {
    display: grid;
    gap: 3px;
}
.report-filter-grid {
    display: grid;
    gap: 12px;
    padding: 16px 18px 14px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #fff, #fafcff);
}
.report-filter-row {
    display: grid;
    gap: 12px;
    align-items: end;
}
.report-filter-row-top {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.report-filter-row-bottom {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: start;
}
.report-filter-spacer {
    min-height: 1px;
}
.report-menu {
    display: flex;
    justify-content: space-between;
}
.report-filter-grid .field {
    margin-bottom: 0;
}
.report-filter-grid .field label {
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 700;
    color: var(--navy);
}
.report-primary-filter select {
    border-color: var(--line);
    background: #fff;
    font-weight: 400;
}
.report-primary-filter select:focus {
    border-color: var(--line) !important;
    box-shadow: none !important;
    outline: none !important;
    background: #fff !important;
}
.report-primary-filter select[multiple] {
    min-height: 144px;
    padding-top: 8px;
    padding-bottom: 8px;
}
.required-mark {
    color: var(--red);
}
.report-filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    grid-column: 4 / span 1;
}
.report-filter-actions-top {
    align-self: end;
    min-height: 100%;
    padding-top: 21px;
    padding-bottom: 0;
}
.report-filter-row-bottom .report-filter-actions {
    align-self: end;
    min-height: 100%;
    padding-bottom: 0;
}
.report-table-card .card-header > div {
    display: grid;
    gap: 3px;
}
.report-result-note {
    color: rgba(255, 255, 255, .82);
}
.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.report-summary-card {
    display: grid;
    gap: 4px;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-left: 4px solid #aeb8c8;
    border-radius: 8px;
    background: #fff;
    color: var(--navy);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(24, 39, 75, .05);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.report-summary-card:hover,
.report-summary-card.active {
    border-color: var(--navy-lt);
    border-left-color: var(--saffron);
    box-shadow: 0 5px 16px rgba(24, 39, 75, .11);
    transform: translateY(-1px);
}
.report-summary-card span {
    font-size: 13px;
    font-weight: 700;
}
.report-summary-card strong {
    font-family: 'DM Sans', sans-serif;
    font-size: 25px;
    line-height: 1.1;
}
.report-summary-card small {
    color: var(--muted);
}
.report-matrix-wrap {
    max-height: 62vh;
}
.report-matrix-table {
    width: max-content;
    min-width: 100%;
}
.report-matrix-table th,
.report-matrix-table td {
    white-space: nowrap;
}
.report-matrix-table th {
    position: sticky;
    top: 0;
    z-index: 2;
}
.report-matrix-table .preference-rank {
    min-width: 86px;
    text-align: center;
    font-weight: 700;
}
.candidate-name-cell {
    font-weight: 700;
    color: var(--navy);
}
.text-wrap-cell,
.candidate-name-cell,
.exam-label-cell,
.region-name-cell,
.jurisdiction-cell,
.report-region-cell {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.report-matrix-table .candidate-name-cell,
.report-matrix-table .report-region-cell {
    white-space: normal;
}
.report-empty {
    padding: 28px !important;
    text-align: center;
    color: var(--muted);
}

@media (max-width: 1280px) {
    .report-filter-grid {
        gap: 10px;
    }
    .report-summary-grid {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }
    .portal-modal-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .report-shell {
        grid-template-columns: 1fr;
    }
    .report-mode-rail {
        position: static;
        flex-direction: row;
        width: 100%;
    }
    .report-mode-btn {
        flex: 1 1 0;
        min-height: 62px;
    }
    .report-filter-row {
        grid-template-columns: 1fr;
    }
    .report-tabs {
        padding: 0 8px;
        overflow-x: auto;
    }
    .report-tabs a {
        white-space: nowrap;
    }
    .report-summary-grid {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }
    .report-filter-actions {
        grid-column: auto;
        justify-content: stretch;
    }
    .report-filter-actions .btn {
        flex: 1 1 auto;
    }
    .search-row {
        flex-direction: column;
        align-items: stretch;
    }
    .search-row > * {
        width: 100%;
    }
    .report-filter-actions-top,
    .report-filter-row-bottom .report-filter-actions {
        padding-top: 0;
    }
    .candidate-filter-grid {
        grid-template-columns: 1fr;
    }
    .candidate-search-box {
        flex-direction: column;
        align-items: stretch;
    }
    .candidate-search-box .btn {
        width: 100%;
    }
    .candidate-filter-row-bottom .candidate-filter-actions {
        padding-top: 0;
    }
    .import-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .drawer-panel {
        width: min(100%, 100%);
    }
}
@media (max-width: 480px) {
    .report-summary-grid {
        grid-template-columns: 1fr;
    }
}
.tab-strip {
    display: flex;
    gap: 6px;
    padding: 12px 16px 0;
    border-top: 1px solid #eef0f4;
    background: #fff;
}
.tab-strip a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-bottom-color: #c6cfdd;
    border-radius: 6px 6px 0 0;
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
    background: #f7f9fc;
}
.tab-strip a.active {
    color: #fff;
    border-color: var(--navy);
    background: var(--navy);
}

/* ── LOGIN BOX (used by admin OTP / forgot-password) ── */
.login-wrap { display: grid; min-height: 100vh; place-items: center; background: var(--ash); padding: 24px; }
.login-box { width: min(500px, 100%); background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.login-head {
    background: #082f5f;
    color: #fff; padding: 28px 28px 24px; text-align: center; position: relative; overflow: hidden;
}
.login-head::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--green) 33.3%, #fff 33.3% 66.6%, var(--saffron) 66.6%);
}
.login-emblem {
    width: 52px; height: 52px;
    background: rgba(255,255,255,.15);
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 8px;
    display: grid; place-items: center;
    font-size: 24px; margin: 0 auto 12px;
}
.login-emblem .icon { width: 24px; height: 24px; }
.login-head h1 { font-family: 'Rajdhani', sans-serif; font-size: 22px; font-weight: 700; margin: 0 0 6px; color: #fff; }
.login-head p { font-size: 13px; opacity: .75; margin: 0; }
.login-body { padding: 32px; }
.login-body h2 {
    font-family: 'Rajdhani', sans-serif; font-size: 19px; font-weight: 700;
    color: var(--navy); margin: 0 0 22px; display: flex; align-items: center; gap: 8px;
}

/* ── FORMS ──────────────────────────────────────────── */
label { display: block; font-weight: 600; font-size: 13px; color: var(--navy); margin: 0 0 5px; letter-spacing: .2px; }
.field { margin-bottom: 14px; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=tel], input[type=date],
input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=button]):not([type=file]):not([type=hidden]),
select, textarea {
    width: 100%;
    border: 1.5px solid #cfd8e6;
    border-radius: 8px;
    padding: 9px 11px;
    font-family: inherit;
    font-size: 14px;
    color: var(--ink);
    background: linear-gradient(180deg, #fff, #fcfdff);
    transition: border-color .18s, box-shadow .18s, background .18s;
    outline: none;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--navy-lt);
    box-shadow: 0 0 0 3px rgba(10,74,140,.11);
    background: #fff;
}
select { cursor: pointer; }
select.pref-select {
    color: var(--ink);
    font-weight: 600;
    border-color: #c6d1df;
    background: #fff;
}
select.pref-select.pref-select--empty {
    color: #44576a;
    background: #fbfcfe;
}
select.pref-select.pref-select--filled {
    color: var(--navy);
    background: #f8fbff;
    border-color: #8fb0cf;
    box-shadow: 0 0 0 3px rgba(10, 74, 140, .08);
}
select.pref-select:focus {
    border-color: var(--navy-lt);
    box-shadow: 0 0 0 3px rgba(10,74,140,.12);
}
select.pref-select option[value=""] {
    color: var(--muted);
}
select.pref-select option:not(:disabled) {
    color: #27364a;
    font-weight: 600;
}
select.pref-select option:disabled {
    color: #94a3b8;
    font-style: normal;
    font-weight: 500;
}

input.is-invalid,
select.is-invalid,
textarea.is-invalid,
.region-order-input.is-invalid {
    border-color: var(--red) !important;
    background: #fff !important;
    box-shadow: 0 0 0 2px rgba(192, 57, 43, .08) !important;
}

input.is-invalid:focus,
select.is-invalid:focus,
textarea.is-invalid:focus,
.region-order-input.is-invalid:focus {
    border-color: var(--red) !important;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, .14) !important;
}

.field-error {
    color: var(--red);
}

@supports selector(.field:has(.field-error)) {
    .field:has(.field-error) :is(input:not([type="hidden"]), select, textarea) {
        border-color: var(--red) !important;
        background: #fff !important;
        box-shadow: 0 0 0 2px rgba(192, 57, 43, .08) !important;
    }

    .field:has(.field-error) :is(input:not([type="hidden"]), select, textarea):focus {
        border-color: var(--red) !important;
        box-shadow: 0 0 0 3px rgba(192, 57, 43, .14) !important;
    }
}

.password-field {
    position: relative;
}
.password-field input {
    padding-right: 42px;
}
.password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #6b7280;
    box-shadow: none;
}
.password-toggle:hover {
    background: transparent;
    color: var(--navy);
}
.password-toggle:disabled,
.password-toggle:disabled:hover {
    background: transparent;
    color: #9aa4b2;
    cursor: not-allowed;
    opacity: .7;
}
.password-toggle .icon {
    width: 14px;
    height: 14px;
}
textarea { min-height: 96px; resize: vertical; }
.region-equal-control {
    min-height: 48px;
    height: 48px;
    max-height: 48px;
}
textarea.region-equal-control {
    resize: none;
    overflow-y: auto;
    padding-top: 11px;
    padding-bottom: 11px;
}
.radio-row, .check-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.radio-row label, .check-row label { margin: 0; font-weight: 500; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.radio-row input[type=radio], .check-row input[type=checkbox], td input[type=checkbox] { width: auto; accent-color: var(--navy); }



/* ── CAPTCHA ─────────────────────────────────────────── */
.captcha {
    display: flex; gap: 12px; align-items: center;
    padding: 12px 16px;
    border: 1.5px dashed var(--line);
    border-radius: 8px;
    background: #fff;
    margin-bottom: 6px;
}
.captcha-image {
    flex: 1;
    width: 100%;
    max-width: 100%;
    height: 40px;
    object-fit: contain;
    display: block;
    border-radius: 6px;
    user-select: none;
    background: linear-gradient(180deg, #f7fbff 0%, #edf4fb 100%);
    box-shadow: inset 0 0 0 1px rgba(32, 66, 106, .08);
}

/* ── BUTTONS ────────────────────────────────────────── */
.btn, button.btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 12px; border-radius: 8px;
    font-family: inherit; font-size: 14px; font-weight: 600;
    cursor: pointer; border: 1.5px solid var(--line);
    background: #fff; color: var(--ink);
    text-decoration: none; transition: background .18s, border-color .18s, color .18s, box-shadow .18s, transform .18s;
    letter-spacing: .2px; white-space: nowrap;
}
table .btn{
    min-height: 32px !important;
}
.btn:hover { border-color: var(--navy-lt); background: #f5f8fd; text-decoration: none; color: var(--navy); transform: translateY(-1px); box-shadow: 0 6px 14px rgba(15,23,42,.07); }
.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(10,74,140,.14);
}
.btn-primary { background: linear-gradient(180deg, #003366, #002954); color: #fff; border-color: #003366; box-shadow: 0 6px 14px rgba(0,51,102,.12); }
.btn-primary:hover { background: linear-gradient(180deg, #0a4a8c, #003366); border-color: #0a4a8c; color: #fff; }
.btn-orange { background: linear-gradient(180deg, #ff7a1a, #ff6600); color: #fff; border-color: #ff6600; box-shadow: 0 6px 14px rgba(255,102,0,.14); }
.btn-orange:hover { background: linear-gradient(180deg, #e35c00, #cc5200); border-color: #cc5200; color: #fff; }
.btn-green { background: linear-gradient(180deg, #18930a, #138808); color: #fff; border-color: #138808; box-shadow: 0 6px 14px rgba(19,136,8,.12); }
.btn-green:hover { background: linear-gradient(180deg, #148209, #0d6906); color: #fff; }
.btn-danger { border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-lg { padding: 10px 22px; font-size: 14.5px; }
.icon {
    width: 1.1em;
    height: 1.1em;
    flex: 0 0 auto;
}
.btn .icon {
    width: 17px;
    height: 17px;
}
.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
    gap: 0;
}
.btn-icon.btn-sm {
    width: 32px;
    height: 32px;
    padding: 0;
}
.btn-icon .icon {
    width: 17px;
    height: 17px;
}
.action-group {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-wrap: nowrap;
}
.btn-action {
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    justify-content: center;
    gap: 0;
    font-size: 12.5px;
    line-height: 1;
    background: #fff;
    border-color: #cfd6e3;
    color: #15385f;
}
.btn-action .icon {
    width: 16px;
    height: 16px;
}
.btn-action span {
    display: none;
}
.btn-action:hover {
    background: #eef5ff;
    border-color: #b9c7db;
    color: var(--navy);
}
.btn-action.btn-primary {
    background: #fff;
    border-color: #cfd6e3;
    color: #15385f;
}
.btn-action-danger {
    border-color: #cfd6e3;
    color: #15385f;
    background: #fff;
}
.btn-action-danger:hover {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}
.btn-action-success {
    border-color: #cfd6e3;
    color: #15385f;
    background: #fff;
}
.btn-action-success:hover {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}
.btn-action-muted {
    opacity: .65;
    cursor: not-allowed;
}
.btn-resend {
    min-height: 34px;
    width: auto;
    padding: 5px 12px;
    border-color: #d96a2c;
    color: #9a4a17;
    background: #fff;
    white-space: nowrap;
    gap: 6px;
}
.btn-resend .icon {
    width: 15px;
    height: 15px;
}
.btn-resend:hover {
    background: #fff8ec;
    border-color: var(--saffron);
    color: var(--saffron-dk);
}
.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;
}

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

/* ── STATS ──────────────────────────────────────────── */
.stat {
    min-height: 112px;
    background: #fff;
    border: 1px solid #cfd8e3;
    border-top: 4px solid var(--navy);
    border-radius: 6px;
    padding: 15px 16px 14px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
    position: relative;
    overflow: hidden;
    transition: .3s all linear;
}
.stat:hover{
    box-shadow: 1px 5px 16px 4px #ddd;
    transform: translate(0px, -6px);
}
.status_pending{
    border-top-color: #f59e0b;
}
.status_pending .icons{
    background: #f59e0b !important;
}
.status_submit {
    border-top-color: #14b8a6;
}
.status_submit .icons {
    background: #14b8a6 !important;
}
.status_progress {
    border-top-color: #3b82f6;
}
.status_progress .icons {
    background: #3b82f6 !important;
}
.status_active {
    border-top-color: #22c55e;
}
.status_active .icons {
    background: #22c55e !important;
}
.status_link {
    border-top-color: var(--navy);
}
.status_link .icons {
    background: var(--navy) !important;
}
/* .stat:nth-child(2) { border-top-color: var(--saffron); }
.stat:nth-child(3) { border-top-color: var(--green); }
.stat:nth-child(4) { border-top-color: var(--amber); }
.stat:nth-child(5) { border-top-color: #0b76b7; }
.stat:nth-child(6) { border-top-color: #7c3aed; }
.stat:nth-child(7) { border-top-color: #475569; }
.stat:nth-child(8) { border-top-color: #0f766e; } */
.stat span { min-height: 34px; font-size: 12px; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: 0; display: block; }
.stat strong { font-family: 'DM Sans', sans-serif; font-size: 32px; font-weight: 800; color: var(--navy); display: block; line-height: 1; }
.stat small { font-size: 12px; color: var(--muted); margin-top: 4px; display: block; }

/* ── TABLES ─────────────────────────────────────────── */
.table-wrap {
    overflow-x: auto;
    border: 1px solid #d8dee8;
    border-radius: 0 0 10px 10px;
    background: #fff;
}
.table-card .table-wrap {
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-top: 1px solid #d6dbe3;
    margin: 0 16px 0 16px;
    border-radius: 0 0 10px 10px;
}
.table-card > form {
    padding: 10px 16px 16px;
}
.table-card > form .table-wrap {
    margin-left: -16px;
    margin-right: -16px;
}
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 13px;
    table-layout: fixed;
}
thead th {
    background: linear-gradient(180deg, #eef2f7, #e4e9f1);
    color: #243449;
    padding: 9px 10px;
    text-align: left;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    border: 1px solid #d0d7e2;
}
.sort-link {
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}
.sort-link:hover {
    color: var(--navy);
    text-decoration: none;
}
.sort-link span {
    font-size: 11px;
    line-height: 1;
}
thead th:first-child { border-radius: 0; }
thead th:last-child  { border-radius: 0; }
tbody tr {
    border-bottom: 1px solid #d6dbe3;
    transition: background .12s, transform .12s;
}
tbody tr:nth-child(even) { background: #f5f7fa; }
tbody tr:hover { background: #eef4ff; }
tbody tr:last-child { border-bottom: none; }
td {
    padding: 9px 10px;
    vertical-align: middle;
    color: var(--ink);
    border: 1px solid #d6dbe3;
    line-height: 1.35;
    word-break: break-word;
}
td select { padding: 7px 10px; font-size: 13px; }
.table-wrap table th:last-child,
.table-wrap table td:last-child {
    white-space: nowrap;
}
.table-wrap td .actions {
    flex-wrap: nowrap;
    gap: 6px;
}
.candidate-list-card .action-row,
.preference-resend-card .action-row,
.table-card .action-row {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    width: max-content;
    max-width: 100%;
    flex-wrap: nowrap;
}
.candidate-list-card .action-row form,
.preference-resend-card .action-row form,
.table-card .action-row form {
    display: inline-flex !important;
    align-items: center;
    width: auto;
    max-width: 100%;
}
.candidate-list-card .action-row .btn,
.preference-resend-card .action-row .btn,
.table-card .action-row .btn {
    display: inline-flex;
    width: auto;
    min-width: 0;
    flex: 0 0 auto;
    justify-content: center;
    white-space: nowrap;
    line-height: 1.15;
    text-align: center;
}
.candidate-list-card .table-wrap table td:last-child,
.preference-resend-card .table-wrap table td:last-child,
.table-card .table-wrap table td:last-child {
    white-space: normal;
}
.table-card .action-row .btn-resend,
.table-card .action-row .btn-action {
    width: auto;
}
.table-wrap td form {
    margin: 0;
}
.table-card .preference-window-table {
    min-width: 1080px;
    table-layout: auto;
}
.table-card .preference-window-table thead th {
    white-space: normal;
    line-height: 1.35;
    vertical-align: middle;
}
.table-card .preference-window-table th:nth-child(1),
.table-card .preference-window-table td:nth-child(1) {
    min-width: 72px;
}
.table-card .preference-window-table th:nth-child(2),
.table-card .preference-window-table td:nth-child(2) {
    min-width: 120px;
}
.table-card .preference-window-table th:nth-child(3),
.table-card .preference-window-table td:nth-child(3) {
    min-width: 170px;
}
.table-card .preference-window-table th:nth-child(4),
.table-card .preference-window-table td:nth-child(4),
.table-card .preference-window-table th:nth-child(5),
.table-card .preference-window-table td:nth-child(5) {
    min-width: 160px;
}
.table-card .preference-window-table th:nth-child(6),
.table-card .preference-window-table td:nth-child(6) {
    min-width: 110px;
}
.table-card .preference-window-table th:nth-child(7),
.table-card .preference-window-table td:nth-child(7) {
    min-width: 220px;
}
.status-switch {
    width: 44px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 3px;
    border: 0;
    border-radius: 999px;
    background: #a8b3c5;
    cursor: pointer;
    transition: background .15s;
}
.status-switch span {
    width: 18px;
    height: 18px;
    display: block;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15,23,42,.2);
    transition: transform .15s;
}
.status-switch.active {
    background: #001f44;
}
.status-switch.active span {
    transform: translateX(20px);
}
.status-switch:hover {
    background: #8797ac;
}
.status-switch.active:hover {
    background: #0069a9;
}

/* ── BADGES ─────────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    border-radius: 999px; padding: 3px 9px;
    font-size: 11.5px; font-weight: 700; letter-spacing: .3px;
}
.badge.ok    { background: var(--green-lt); color: var(--green); }
.badge.warn  { background: #fff8ec; color: #7a4400; }
.badge.info  { background: #e8f1ff; color: #1a4a9b; }
.badge.err   { background: #fff2f0; color: var(--red); }
.badge.muted { background: #f0f2f5; color: var(--muted); }

/* ── NOTICE BOX ─────────────────────────────────────── */
.notice {
    background: #fff9ed; border: 1px solid #f0d8b8;
    border-left: 3px solid var(--amber); border-radius: var(--radius);
    padding: 11px 13px; font-size: 13.5px; color: #5c3900;
}

/* OTP */
.otp-input {
    font-weight: 600;
}
.otp-cells {
    display: grid;
    grid-template-columns: repeat(6, minmax(34px, 1fr));
    gap: 7px;
}
input.otp-cell,
.auth-form input.otp-cell {
    height: 42px;
    padding: 0;
    text-align: center;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0;
    font-family: 'DM Sans', sans-serif;
}

/* ── REGION LIST ────────────────────────────────────── */
.region-list { max-height: 380px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.region-row { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); padding: 10px 14px; }
.region-row:last-child { border-bottom: none; }
.rank { background: var(--navy); color: #fff; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-weight: 800; font-size: 13px; }
.readonly-region-list {
    max-height: 340px;
    background: #f8fafd;
}
.readonly-region-list .region-row {
    min-height: 48px;
    background: #f8fafd;
}
.readonly-region-list .region-row:hover {
    background: #f1f6fd;
}
.region-sequence-picker {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    background: #fff;
}
.region-picker-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}
.region-sequence-list {
    max-height: 380px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}
.region-sequence-list:empty {
    display: none;
}
.region-sequence-row {
    min-height: 46px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 42px;
    gap: 10px;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
}
.region-sequence-row:last-child {
    border-bottom: 0;
}
.region-sequence-row:nth-child(even) {
    background: #f5f7fa;
}
.region-name {
    min-width: 0;
    font-weight: 600;
}
/* .preference-form-card {
    max-width: 1050px;
} */
.form-section {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}
.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}
.form-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}
.post-option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}
.post-option {
    min-height: 42px;
    margin: 0;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-size: 14px;
    cursor: pointer;
}
.post-option input {
    width: auto;
    accent-color: var(--navy);
    height: auto;
}
.post-option input:focus,
.post-option input:hover,
table input{
    border: none;
    outline: none;
    box-shadow: none !important;
}
.assignment-mode-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.assignment-mode-option {
    min-height: 38px;
    margin: 0;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font-weight: 700;
    cursor: pointer;
}
.assignment-mode-option input {
    width: auto;
    accent-color: var(--navy);
}
.assignment-mode-option:has(input:checked) {
    border-color: var(--navy);
    background: #eef5ff;
    color: var(--navy);
}
.post-option:hover {
    border-color: var(--navy-lt);
    background: #f8fafd;
}
.post-unavailable-note {
    display: none;
    margin-left: auto;
    color: var(--red);
    font-size: 11px;
    font-weight: 700;
}
.post-option-unavailable {
    border-color: #ead4d4;
    background: #faf6f6;
    color: var(--muted);
    cursor: not-allowed;
}
.post-option-unavailable:hover {
    border-color: #ead4d4;
    background: #faf6f6;
}
.post-option-unavailable .post-unavailable-note {
    display: inline;
}
.post-option-unavailable input {
    cursor: not-allowed;
}
.assignment-form-card {
    margin-bottom: 16px;
    padding: 0;
    overflow: hidden;
}
.assignment-form-card .card-header {
    margin: 0;
    padding: 13px 18px;
}
.assignment-fixed-form {
    display: grid;
    grid-template-columns: minmax(260px, 1.3fr) 180px;
    gap: 14px;
    padding: 16px 18px;
}
.assignment-fixed-form .field {
    margin: 0;
}
.assignment-fixed-form input:disabled {
    background: #f4f6f9;
    color: var(--ink);
    opacity: 1;
    font-weight: 600;
}
.assignment-candidate-card .card-header > div {
    display: grid;
    gap: 3px;
}
.assignment-result-note {
    color: rgba(255, 255, 255, .82);
}
.assignment-check-column {
    width: 64px;
    text-align: center;
}
.assignment-check-column input,
.assignment-candidate-card td input[type="checkbox"] {
    width: auto;
    accent-color: var(--navy);
}
.assignment-row-assigned td {
    background: #f8fbff;
}
.assignment-roll {
    font-family: monospace;
    font-weight: 700;
}
.assignment-submit-bar {
    width: 100%;
    box-sizing: border-box;
    min-height: 64px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding: 12px 18px 0;
    margin-top: 8px;
    clear: both;
}
.assignment-submit-bar span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.preference-status-filter {
    min-width: 165px;
}
@media (max-width: 900px) {
    .assignment-fixed-form {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 600px) {
    .assignment-submit-bar {
        align-items: stretch;
        flex-direction: column;
    }
    .assignment-submit-bar .btn {
        justify-content: center;
    }
}
.region-order-wrap {
    max-height: 470px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}
.region-order-table {
    min-width: 620px;
}
.region-order-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}
.region-order-table td {
    padding: 10px 16px;
}
.region-order-table tbody tr:hover {
    background: #f8fafd;
}
.region-order-input {
    width: 76px !important;
    min-width: 76px;
    padding: 8px 10px !important;
    text-align: center;
    font-weight: 700;
}
.region-order-input.is-invalid {
    border-color: var(--red) !important;
    background: #fff2f0 !important;
}

/* ── ACTIONS ROW ─────────────────────────────────────── */
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ── TERMS ───────────────────────────────────────────── */
.terms-list { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 22px; line-height: 1.65; counter-reset: terms; list-style: none; background: #fafcff; }
.terms-list li { padding: 6px 0; border-bottom: 1px dashed #d5e0ef; font-size: 13.5px; color: var(--ink); display: flex; gap: 12px; }
.terms-list li:last-child { border-bottom: none; }
.terms-list li::before { counter-increment: terms; content: counter(terms); background: var(--navy); color: #fff; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; margin-top: 4px; }
.terms-accept-bar { background: var(--green-lt); border: 1.5px solid var(--green); border-radius: var(--radius); padding: 12px 14px; display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 13.5px; color: #0a4d1e; }

/* ── PRINT FORM ──────────────────────────────────────── */
.success-strip { background: var(--green); color: #fff; padding: 12px 20px; font-size: 16px; text-align: center; font-weight: 700; border-radius: var(--radius) var(--radius) 0 0; display: flex; align-items: center; justify-content: center; gap: 10px; }
.print-form { background: #fff; border: 2px solid var(--navy); border-radius: var(--radius); padding: 24px; }
.dept-head { background: linear-gradient(90deg, var(--navy-dk), var(--navy-lt)); color: #fff; padding: 16px 22px; border-radius: var(--radius) var(--radius) 0 0; font-weight: 700; font-family: 'Rajdhani', sans-serif; font-size: 17px; letter-spacing: .3px; }
.form-title { background:var(--navy-dk); color: #fff; text-align: center; padding: 10px; font-weight: 800; letter-spacing: .5px; font-family: 'Rajdhani', sans-serif; font-size: 16px; }
.photo-box { width: 150px; height: 170px; border: 2px solid var(--ink); display: grid; place-items: end center; padding-bottom: 8px; margin: 0 auto; background: #f9f9f9; color: var(--muted); font-size: 12px; }

.preference-sheet {
    border: 1px solid #c8d2df;
    border-radius: 8px;
    padding: 20px 20px 18px;
    background: #fff;
    color: #1c2636;
    font-family: Calibri, Arial, sans-serif;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}
.preference-sheet-heading-block {
    text-align: center;
    margin-bottom: 10px;
}
.preference-sheet-title {
    font-size: 14.5px;
    line-height: 1.35;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--navy);
    letter-spacing: .15px;
}
.preference-sheet-date {
    border: 1px solid #cfd7e3;
    background: linear-gradient(180deg, #fbfdff 0%, #eef4ff 100%);
    color: #06294f;
    font-size: 12.5px;
    font-weight: 800;
    text-align: center;
    padding: 8px 12px;
    margin-bottom: 12px;
    letter-spacing: .15px;
}
.preference-sheet-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px;
    gap: 14px;
    align-items: start;
}
.preference-sheet-meta-left {
    min-width: 0;
}
.preference-sheet-meta-left .preference-sheet-table + .preference-sheet-table {
    margin-top: 10px;
}
.preference-photo-box {
    width: 170px;
    height: 170px;
    border: 1.5px solid #333c49;
    background: #fbfcfe;
    display: grid;
    place-items: stretch;
    text-align: center;
    padding: 0;
    color: var(--muted);
    margin: 0;
    overflow: hidden;
}
.preference-sheet-photo-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.preference-photo-box .photo-box-copy {
    display: grid;
    place-items: center;
    height: 100%;
    padding: 12px;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 700;
}
.preference-sheet-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.preference-sheet-table th,
.preference-sheet-table td {
    border: 1px solid #cfd7e3;
    padding: 7px 9px;
    vertical-align: top;
    word-break: break-word;
}
.preference-sheet-table th {
    background: #002e5e;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
}
.preference-sheet-table td {
    font-size: 12.5px;
    color: #1c2636;
}
.preference-sheet-table--details td,
.preference-sheet-table--rank td {
    font-weight: 700;
}
.preference-sheet-section-title {
    margin: 14px 0 10px;
    text-align: center;
    color: var(--navy);
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: .15px;
}
.preference-sheet-table--preferences {
    font-size: 12px;
}
.preference-sheet-table--preferences th {
    text-align: center;
}
.preference-sheet-table--preferences .preference-serial {
    text-align: center;
    font-weight: 700;
    color: #445268;
}
.preference-sheet-table--preferences .preference-region {
    font-weight: 700;
}
.preference-sheet-table--preferences .preference-jurisdiction {
    font-weight: 400;
}
.preference-sheet-table--preferences .preference-value {
    text-align: center;
    font-weight: 700;
}
.preference-sheet-declaration {
    margin-top: 12px;
    border: 1px solid #cfd7e3;
    background: #f8fbff;
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.55;
}
.preference-sheet-table--footer {
    margin-top: 12px;
    font-size: 12px;
}
.preference-sheet-table--footer th {
    background: #f5f8fc;
    color: var(--navy);
    font-weight: 700;
}
.preference-sheet-table--footer td {
    background: #fff;
}
.preference-sheet-table--footer .footer-line,
.preference-sheet-table--footer .footer-address,
.preference-sheet-table--footer .footer-mobile,
.preference-sheet-table--footer .footer-note {
    min-height: 34px;
}
.preference-sheet-table--footer .footer-line {
    background: #fff;
}
.preference-sheet-table--footer .footer-signature-cell {
    padding: 5px 8px;
}
.preference-sheet-table--footer .footer-address {
    white-space: pre-line;
    font-weight: 700;
}
.preference-sheet-table--footer .footer-mobile {
    font-weight: 700;
}
.preference-sheet-signature-image {
    display: block;
    max-width: 100%;
    max-height: 26px;
    margin: 0 auto;
    object-fit: contain;
}
.preference-sheet-table--footer .footer-note {
    background: #fff;
}
.preference-sheet-table--footer .footer-thumb-box {
    height: 64px;
    background: #fff;
    vertical-align: middle;
}
.preference-sheet-submitted-date {
    margin-top: 10px;
    text-align: right;
    font-weight: 700;
    color: var(--navy);
    font-size: 12.5px;
    letter-spacing: .1px;
}

/* ── PAGE HEADER ─────────────────────────────────────── */
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.page-title h1 { font-family: 'DM Sans', sans-serif; font-size: 20px; line-height: 1.2; font-weight: 700; color: var(--ink); margin: 0; }
.page-title p { display: none; }

/* ── PAGINATION ──────────────────────────────────────── */
.pagination,
.table-pagination {
    margin-top: 12px;
}
.table-card .pagination,
.table-card .table-pagination {
    margin: 0;
    padding: 12px 16px 14px;
    background: linear-gradient(180deg, #fff, #fbfcff);
    border-top: 1px solid #e1e7f0;
}
.pagination svg,
.table-pagination svg { width: 16px; height: 16px; max-width: 16px; max-height: 16px; }
.cpms-pagination {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 0;
}
.cpms-page-size,
.cpms-page-summary {
    color: var(--ink);
    font-size: 13.5px;
}
.cpms-page-size {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.cpms-page-size label {
    margin: 0;
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 500;
}
.cpms-page-size select {
    width: 76px !important;
    flex: 0 0 76px;
    min-height: 34px;
    padding: 6px 28px 6px 10px;
    border-radius: 8px;
    font-size: 13.5px;
    background: #fff;
}
.cpms-page-size strong,
.cpms-page-summary strong {
    color: var(--ink);
    font-weight: 700;
}
.cpms-page-controls {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.cpms-page {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}
.cpms-page:hover {
    background: var(--ash);
    color: var(--navy);
    text-decoration: none;
}
.cpms-page.disabled {
    color: #b9c0ca;
    background: #fff;
    cursor: not-allowed;
    opacity: 1;
}
@media (max-width: 700px) {
    .table-card .table-pagination {
        padding: 12px;
    }
    .cpms-pagination {
        justify-content: space-between;
        gap: 12px;
    }
    .cpms-page-size,
    .cpms-page-controls {
        width: 100%;
        justify-content: space-between;
    }
}

/* ── MISC ────────────────────────────────────────────── */
.muted { color: var(--muted); }
.text-sm { font-size: 13px; }
.text-center { text-align: center; }
h1, h2, h3, h4 { color: var(--ink); }
h1 { font-family: 'Rajdhani', sans-serif; font-size: 28px; font-weight: 700; margin-bottom: 12px; }
h2 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
hr { border: none; border-top: 1px solid var(--line); margin: 20px 0; }
.divider { border-top: 2px dashed var(--line); margin: 20px 0; }

/* ── CANDIDATE INFO STRIP ───────────────────────────── */
.cand-info { background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; box-shadow: var(--shadow); }
.cand-info-item { min-width: 0; border-right: 1px solid var(--line); padding-right: 12px; }
.cand-info-item:last-child { border-right: 0; }
.cand-info-item span { font-size: 11px; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 4px; }
.cand-info-item strong { font-size: 14px; font-weight: 700; color: var(--ink); display: block; overflow-wrap: anywhere; word-break: break-word; white-space: normal; }

/* ── SECTION HEADING ────────────────────────────────── */
.sec-heading { font-family: 'Rajdhani', sans-serif; font-size: 17px; font-weight: 700; color: var(--navy); display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sec-heading::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.dashboard-panel {
    border-top-width: 4px;
    border-top-style: solid;
}
.dashboard-panel-submissions {
    border-top-color: #14b8a6;
}
.dashboard-panel-windows {
    border-top-color: #0b76b7;
}
.dashboard-panel .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #fff, #fafdff);
}
form.form_card_2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.actions.regient_field_button {
    justify-content: flex-end;
}
.dashboard-panel .section-title {
    margin-bottom: 0;
}
.section-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--navy);
}
.dashboard-panel .table-wrap {
    padding-top: 0;
}

/* ── PORTAL HEADER (candidate) ──────────────────────── */
.portal-header { background: #fff; color: var(--ink); padding: 14px 16px; border: 1px solid rgba(208,218,233,.95); border-left: 4px solid var(--navy); border-radius: 10px; margin-bottom: 14px; display: flex; align-items: center; gap: 12px; position: relative; overflow: hidden; box-shadow: 0 8px 24px rgba(15,23,42,.06); }
.portal-header::before { content: none; }
.portal-header-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: linear-gradient(180deg, #eef4ff, #e6eefb); color: var(--navy); opacity: 1; font-size: 18px; flex: 0 0 auto; }
.portal-header-icon .icon { width: 18px; height: 18px; }
.portal-header h1 { margin: 0 0 2px; font-size: 17px; color: var(--ink); }
.portal-header p  { margin: 0; color: var(--muted); font-size: 12.5px; }

/* ── STEPS (OTP) ────────────────────────────────────── */
.steps { display: flex; gap: 0; margin-bottom: 28px; overflow: hidden; border-radius: 8px; border: 1px solid var(--line); }
.step { flex: 1; padding: 11px 8px; text-align: center; font-size: 12px; font-weight: 600; background: var(--ash); color: var(--muted); border-right: 1px solid var(--line); }
.step:last-child { border-right: none; }
.step.active { background: var(--navy); color: #fff; }
.step.done { background: var(--green-lt); color: var(--green); }

/* ═══════════════════════════════════════════════════════
   ADMIN LAYOUT — clean single-pass implementation
   ═══════════════════════════════════════════════════════ */

:root {
    --sb-width: 248px;
    --sb-collapsed: 60px;
    --hdr-height: 64px;
}

.admin-body {
    background: #f4f7fb;
    color: #263246;
}

/* Fixed top bar */
.admin-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--hdr-height);
    z-index: 100;
    display: flex;
    align-items: center;
    background:
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,249,253,.95)),
        linear-gradient(90deg, rgba(255,204,102,.08), transparent 30%, rgba(17,26,72,.04));
    border-bottom: 1px solid rgba(17,26,72,.08);
    box-shadow: 0 1px 10px rgba(15,23,42,.08);
    padding: 3px 14px;
    gap: 8px;
    overflow: visible;
    backdrop-filter: blur(10px);
}

/* Hamburger button */
.menu-button {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: rgba(12,18,52,.03);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 3px; cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.menu-button:hover {
    background: rgba(17,26,72,.06);
    border-color: rgba(17,26,72,.08);
    box-shadow: 0 8px 18px rgba(17,26,72,.08);
    transform: translateY(-1px);
}
.menu-button:focus-visible {
    outline: none;
    border-color: rgba(255,204,102,.45);
    box-shadow: 0 0 0 3px rgba(255,204,102,.16);
}
.menu-button span { width: 16px; height: 2px; background: #24304a; border-radius: 2px; display: block; }

.admin-topbar .menu-button {
    margin-right: 2px;
}

/* Spacer pushes profile to right */
.topbar-spacer { flex: 1; }

/* Profile area */
.profile-menu { position: relative; margin-right: 6px; z-index: 1200; }
.profile-button {
    border: 1px solid transparent;
    background: rgba(12,18,52,.03);
    display: flex;
    align-items: center;
    gap: 7px;
    color: #344154;
    cursor: pointer;
    padding: 4px 7px 4px 4px;
    border-radius: 999px;
    transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.profile-button:hover {
    background: rgba(17,26,72,.05);
    border-color: rgba(17,26,72,.08);
    box-shadow: 0 8px 18px rgba(17,26,72,.08);
    transform: translateY(-1px);
}
.profile-button:focus-visible {
    outline: none;
    border-color: rgba(255,204,102,.38);
    box-shadow: 0 0 0 3px rgba(255,204,102,.16);
}
.profile-avatar {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(180deg, #f5f7fb, #e7edf7);
    color: #344154;
    border: 1px solid #d8e0eb;
    font-weight: 800;
    font-size: 13px;
}
.profile-avatar .icon { width: 16px; height: 16px; }
.profile-copy strong { display: block; font-size: 12px; line-height: 1.1; white-space: nowrap; }
.profile-copy small  { display: block; font-size: 9.5px; color: #657188; margin-top: 0; line-height: 1.05; }
.profile-dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 204px; display: none; padding: 6px; background: rgba(255,255,255,.98); border: 1px solid #dfe5ef; border-radius: 10px; box-shadow: 0 16px 34px rgba(28,39,60,.14); z-index: 1201; backdrop-filter: blur(10px); }
.profile-menu.open .profile-dropdown { display: block; }
.dropdown-item { width: 100%; min-height: 38px; padding: 8px 12px; border: 0; border-radius: 8px; display: flex; align-items: center; gap: 9px; color: #4f5b70; background: transparent; font: inherit; text-align: left; cursor: pointer; font-size: 13.5px; }
.dropdown-item .icon { width: 16px; height: 16px; }
.dropdown-item:hover { background: #f2f5fa; color: #263246; text-decoration: none; }
.dropdown-item.muted { cursor: default; color: #6b778c; font-size: 13px; }

/* Fixed sidebar */
.admin-sidebar {
    position: fixed;
    top: var(--hdr-height);
    left: 0;
    bottom: 0;
    width: var(--sb-width);
    z-index: 90;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,.08), transparent 38%),
        linear-gradient(180deg, #0f1840 0%, #111a48 42%, #0b1234 100%);
    overflow-y: auto;
    overflow-x: hidden;
    transition: width .2s, transform .2s, background .2s, box-shadow .2s;
    box-shadow: 8px 0 28px rgba(10,16,44,.2);
    border-right: 1px solid rgba(255,255,255,.07);
    backdrop-filter: blur(10px);
}

.admin-sidebar::before {
    content: '';
    position: sticky;
    top: 0;
    display: block;
    height: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,0));
    pointer-events: none;
}

.sidebar-nav {
    padding: 9px 7px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sidebar-nav a {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 8px 10px;
    color: rgba(255,255,255,.82);
    border-radius: 11px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.2;
    letter-spacing: .1px;
    white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s, box-shadow .15s, transform .15s;
    text-decoration: none;
}
.sidebar-nav a:hover {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.08);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
    transform: translateX(1px);
    text-decoration: none;
}
.sidebar-nav a:focus-visible,
.sidebar-nav-parent:focus-visible {
    outline: none;
    border-color: rgba(255,255,255,.18);
    box-shadow:
        0 0 0 2px rgba(255,204,102,.16),
        inset 0 1px 0 rgba(255,255,255,.05);
}
.sidebar-nav a.active {
    background: linear-gradient(135deg, rgba(255,255,255,.2), rgba(255,255,255,.09));
    color: #fff;
    border-color: rgba(255,255,255,.16);
    box-shadow:
        inset 3px 0 0 rgba(255,204,102,.95),
        0 10px 20px rgba(4,10,30,.18),
        inset 0 1px 0 rgba(255,255,255,.12);
}

.nav-mark {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    display: grid; place-items: center;
    border-radius: 8px;
    background: rgba(255,255,255,.09);
    font-weight: 700; font-size: 13px;
}
.nav-mark .icon {
    width: 16px;
    height: 16px;
}
.sidebar-nav a.active .nav-mark {
    background: rgba(255,255,255,.96);
    color: #10193f;
    box-shadow: 0 8px 16px rgba(255,255,255,.16);
}
.sidebar-nav-group {
    display: grid;
    gap: 4px;
}
.sidebar-nav-parent {
    width: 100%;
    border: 0;
    background: transparent;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 11px;
    color: rgba(255, 255, 255, .88);
    font-weight: 700;
    font-size: 13px;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background .15s, color .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.sidebar-nav-parent:hover {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.08);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
    transform: translateX(1px);
}
.nav-caret {
    font-size: 11px;
    line-height: 1;
    opacity: .8;
    transform: translateY(1px);
    transition: transform .15s ease, opacity .15s ease;
}
.sidebar-nav-group.open .nav-caret {
    transform: rotate(180deg) translateY(-1px);
    opacity: 1;
}
.sidebar-nav-group.active .sidebar-nav-parent {
    background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.09));
    color: #fff;
    border-color: rgba(255,255,255,.14);
    box-shadow:
        inset 3px 0 0 rgba(255,204,102,.85),
        0 10px 22px rgba(4,10,30,.12);
}
.sidebar-subnav {
    display: grid;
    gap: 4px;
    margin: -1px 0 5px 34px;
    padding: 0;
    min-width: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .2s ease, opacity .18s ease, margin-top .2s ease;
}
.sidebar-nav-group.open .sidebar-subnav {
    max-height: 160px;
    opacity: 1;
}
.sidebar-subnav a {
    min-height: 32px;
    justify-content: flex-start;
    padding: 6px 9px;
    gap: 0;
    font-size: 12px;
    border-left: 2px solid rgba(255, 255, 255, .22);
    border-radius: 0 9px 9px 0;
    white-space: normal;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.sidebar-subnav a span {
    display: block;
    min-width: 0;
    width: 100%;
}
.sidebar-subnav a.active {
    border-left-color: var(--saffron);
    background: rgba(255, 255, 255, .17);
}
.sidebar-subnav a.active,
.sidebar-subnav a:hover {
    background: rgba(255,255,255,.11);
    color: #fff;
}

/* Main content area */
.admin-shell { display: block; }

.admin-main {
    margin-left: var(--sb-width);
    padding-top: var(--hdr-height);
    min-height: 100vh;
    min-width: 0;
    transition: margin-left .2s;
}

.admin-content {
    padding: 16px 18px 28px;
    min-width: 0;
    max-width: 100%;
}

.admin-content[data-page-loader-scope] > .page-loader-overlay {
    position: fixed;
    top: var(--hdr-height);
    right: 0;
    bottom: 0;
    left: var(--sb-width);
    z-index: 1100;
    min-height: 0;
}

/* Dashboard stats — always 4 columns on desktop */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.cycle-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}
.cycle-summary div {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafd;
}
.cycle-summary span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}
.cycle-summary strong {
    color: var(--ink);
    font-size: 15px;
}

.import-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.import-summary div {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}
.import-summary span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.import-summary strong {
    color: var(--navy);
    font-size: 24px;
}
.import-issues {
    border-left: 4px solid var(--amber);
}

.candidate-upload-grid  {
    margin-top: 20PX;
}

.candidate-upload-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 12px;
}
.candidate-upload-rail {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 12px;
}
.candidate-template-btn {
    min-height: 34px;
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}
.candidate-template-btn:hover {
    background: var(--navy-lt);
    border-color: var(--navy-lt);
    color: #fff;
}
/* .candidate-data-page {
    margin-left: -16px;
    margin-right: -16px;
} */
.candidate-upload-card {
    min-height: 118px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 14px 16px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
}
.candidate-upload-dashed {
    border-style: dashed;
    border-width: 2px;
}
.candidate-upload-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: var(--navy);
    background: #eef5ff;
    border-radius: 6px;
}
.candidate-upload-icon.download {
    color: var(--saffron);
    background: #fff7ec;
}
.candidate-upload-card h2 {
    margin: 0;
    color: var(--navy);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    white-space: normal;
}
.candidate-upload-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.35;
    max-width: none;
}
.candidate-upload-file {
    width: 100%;
}
.candidate-upload-controls {
    display: grid;
    grid-template-columns: minmax(120px, 150px) minmax(160px, 1fr);
    gap: 8px;
    grid-column: 2 / span 2;
    grid-row: 3;
    align-items: center;
}
.candidate-upload-controls select {
    min-height: 34px;
    padding-top: 7px;
    padding-bottom: 7px;
    font-size: 13px;
}
.candidate-upload-card input[type=file] {
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 10px 12px;
    background: #f8fafd;
    border: 1px solid var(--line);
    border-radius: 5px;
    font-size: 13px;
}
.candidate-upload-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}
.candidate-upload-card .btn {
    min-height: 34px;
    width: fit-content;
    padding: 7px 14px;
    font-size: 13.5px;
    white-space: nowrap;
}
.candidate-upload-card small {
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.4;
    max-width: 480px;
}

/* Collapsed sidebar state */
/* body.sidebar-collapsed .sidebar-brand {
    width: var(--sb-collapsed);
    flex-basis: var(--sb-collapsed);
    justify-content: center;
    padding: 0;
} */
/* body.sidebar-collapsed .sidebar-brand strong,
body.sidebar-collapsed .sidebar-brand span { display: none; } */
body.sidebar-collapsed .admin-sidebar { width: var(--sb-collapsed); }
body.sidebar-collapsed .sidebar-nav { padding: 8px 4px; gap: 3px; }
body.sidebar-collapsed .sidebar-nav a {
    justify-content: center;
    min-height: 38px;
    padding: 0;
    margin: 0;
    border-radius: 11px;
}
body.sidebar-collapsed .sidebar-nav a span:not(.nav-mark) { display: none; }
body.sidebar-collapsed .sidebar-nav-parent {
    justify-content: center;
    min-height: 38px;
    padding: 0;
    margin: 0;
    border-radius: 11px;
}
body.sidebar-collapsed .sidebar-nav-parent span:not(.nav-mark),
body.sidebar-collapsed .sidebar-subnav,
body.sidebar-collapsed .nav-caret {
    display: none;
}
body.sidebar-collapsed .sidebar-nav a.active,
body.sidebar-collapsed .sidebar-nav-parent:hover,
body.sidebar-collapsed .sidebar-nav-parent:focus-visible,
body.sidebar-collapsed .sidebar-nav-group.active .sidebar-nav-parent {
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.06),
        inset 3px 0 0 rgba(255,204,102,.95);
}
body.sidebar-collapsed .sidebar-nav a.active .nav-mark,
body.sidebar-collapsed .sidebar-nav-parent:hover .nav-mark,
body.sidebar-collapsed .sidebar-nav-parent:focus-visible .nav-mark,
body.sidebar-collapsed .sidebar-nav-group.active .sidebar-nav-parent .nav-mark {
    width: 28px;
    height: 28px;
}
body.sidebar-collapsed .admin-main { margin-left: var(--sb-collapsed); }
body.sidebar-collapsed .admin-content[data-page-loader-scope] > .page-loader-overlay {
    left: var(--sb-collapsed);
}

/* Mobile — sidebar hidden off-screen by default */
@media (max-width: 991px) {
    .sidebar-brand { width: auto; flex: 0 0 auto; }
    .admin-sidebar { width: min(248px, 86vw); }
    .admin-sidebar { transform: translateX(-100%); }
    body.sidebar-open .admin-sidebar { transform: translateX(0); }
    .admin-main { margin-left: 0 !important; }
    body.sidebar-collapsed .admin-main { margin-left: 0 !important; }
    .admin-content[data-page-loader-scope] > .page-loader-overlay {
        left: 0;
    }
    body.sidebar-collapsed .sidebar-brand { width: auto; flex: 0 0 auto; justify-content: flex-start; padding: 0 16px; }
    body.sidebar-collapsed .sidebar-brand strong,
    body.sidebar-collapsed .sidebar-brand span { display: block; }
    .admin-content { padding: 20px 16px 36px; }
    .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
    .candidate-data-page { margin-left: 0; margin-right: 0; }
    .candidate-upload-grid { grid-template-columns: 1fr; }
    .candidate-upload-card { width: 100%; }
    .candidate-upload-controls { grid-template-columns: 1fr; }
    .candidate-upload-card input[type=file] { min-width: 0; max-width: 100%; }
    .candidate-upload-actions { justify-content: flex-start; }
}

.admin-content[data-page-loader-scope].is-full-page-loading > .page-loader-overlay {
    inset: 0;
    z-index: 1300;
}

@media (max-width: 600px) {
    .dashboard-stats { grid-template-columns: 1fr 1fr; }
    .profile-copy { display: none; }
}

.grid.three {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.masked-contact-box {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.masked-contact-box > div {
    border: 1px solid var(--line);
    background: #f8fbff;
    border-radius: var(--radius);
    padding: 10px 12px;
}
.masked-contact-box span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 2px;
}
.masked-contact-box strong {
    color: var(--navy);
    word-break: break-word;
}

.otp-method-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.otp-method-grid label,
.candidate-login-instructions {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}
.otp-method-grid label {
    padding: 10px 12px;
}
.candidate-login-instructions {
    padding: 14px 16px;
    margin-bottom: 14px;
}
.candidate-login-instructions h2 {
    color: var(--navy);
    font-size: 16px;
    margin-bottom: 8px;
}
.candidate-login-instructions ul {
    padding-left: 18px;
    color: var(--ink);
    font-size: 13.5px;
}
.candidate-login-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    width: 100%;
}
.candidate-login-actions .btn {
    flex: 0 0 auto;
}

.dashboard-empty-state {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
}
.dashboard-empty-state h2 {
    color: var(--navy);
    font-size: 22px;
    margin: 8px 0;
}
.dashboard-empty-state p {
    color: var(--muted);
    margin-bottom: 16px;
}
.empty-illustration {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: #e8f1ff;
    color: var(--navy);
}
.dashboard-kpi-grid,
.dashboard-stats-empty {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.dashboard-empty-actions,
.quick-action-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.quick-action-grid {
    justify-content: flex-start;
}
.submission-summary-bars {
    display: grid;
    gap: 14px;
}
.summary-row > div:first-child {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}
.progress-track {
    height: 9px;
    border-radius: 999px;
    background: #e8eef7;
    overflow: hidden;
}
.progress-track span {
    display: block;
    height: 100%;
    background: var(--navy-lt);
}
.activity-list {
    display: grid;
    gap: 9px;
    list-style: none;
}
.activity-list li {
    border-left: 3px solid var(--saffron);
    background: #f8fbff;
    padding: 8px 10px;
}

.candidate-upload-workflow {
    display: grid;
    gap: 18px;
}
.upload-control-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
    justify-content: stretch;
}
.upload-control-panel .field {
    margin-bottom: 0;
}
.multi-select-dropdown {
    position: relative;
    width: 100%;
}
.multi-select-dropdown summary {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}
.multi-select-summary-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.multi-select-clear {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
}
.multi-select-clear:hover {
    background: rgba(0,0,0,.06);
    color: var(--red);
}
.multi-select-dropdown summary span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}
.multi-select-dropdown summary::-webkit-details-marker {
    display: none;
}
.multi-select-dropdown[open] summary {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(0,51,102,.08);
}
.multi-select-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 220px;
    overflow: auto;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    box-shadow: var(--shadow);
}
.multi-select-menu .post-option {
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 5px;
    margin-bottom: 4px;
}
.preference-submit-actions {
    margin-top: 14px;
    /* padding-top: 14px; */
    /* border-top: 1px solid var(--line); */
    justify-content: flex-end;
}
.upload-rule-panel {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid #d8e7f7;
    border-radius: 6px;
    background: #f5f9ff;
    color: var(--muted);
    font-size: 13px;
}
.upload-rule-panel strong {
    color: var(--navy);
}
.upload-step {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
}
.upload-step-number {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
}
.upload-step-body h2 {
    color: var(--navy);
    font-size: 17px;
    margin-bottom: 10px;
}
.post-option-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.candidate-file-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    gap: 10px;
    align-items: center;
}
.upload-result-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.upload-result-card {
    margin-bottom: 16px;
}
.upload-context {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 5px;
    color: #d9d9d9;
    font-size: 12.5px;
}
.upload-context strong {
    color: var(--ink);
}
.upload-reasons-title {
    margin: 16px 0 8px;
}
.upload-failed-banner {
    display: grid;
    gap: 4px;
    margin-top: 12px;
    padding: 12px 14px;
    border-left: 4px solid var(--red);
    border-radius: 6px;
    background: #fff1f1;
    color: #7a1515;
}
.upload-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
.upload-error-row-table td:last-child {
    min-width: 280px;
}
.upload-preview-note {
    color: var(--muted);
    font-size: 13px;
    margin-top: 8px;
}
.candidate-filter-form {
    flex-wrap: wrap;
}

.declaration-box {
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fbff;
    padding: 12px 14px;
}
.declaration-box p {
    margin-bottom: 10px;
    color: var(--ink);
}
.declaration-box label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--navy);
}
.declaration-box input {
    width: auto;
    accent-color: var(--green);
}
.declaration-box input:focus{
    box-shadow: none;
}

@media (max-width: 900px) {
    .grid.three,
    .dashboard-kpi-grid,
    .dashboard-stats-empty,
    .upload-control-panel,
    .post-option-grid.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .candidate-file-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .grid.three,
    .masked-contact-box,
    .otp-method-grid,
    .dashboard-kpi-grid,
    .dashboard-stats-empty,
    .upload-control-panel,
    .post-option-grid.compact {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════
   AUTH PAGES (login, OTP, reset-password)
   ═══════════════════════════════════════════════════════ */



.auth-topbar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 66px;
    min-height: 66px;
    max-height: 66px;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 18px;
    background: #fff;
    border-bottom: 1px solid #d9dde5;
    box-shadow: 0 1px 8px rgba(15,23,42,.08);
    overflow: hidden;
}
.auth-topbar-logo {
    width: 48px !important;
    height: 32px !important;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    overflow: hidden;
}
.auth-topbar-logo img {
    display: block;
    width: 48px !important;
    height: 32px !important;
    max-width: 48px !important;
    max-height: 32px !important;
    object-fit: contain;
}
.auth-topbar-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
}
.auth-topbar-copy strong {
    color: var(--ink);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.15;
}
.auth-topbar-copy span {
    color: #111827;
    font-size: 11px;
    line-height: 1.25;
}

.candicate_header {
    background: linear-gradient(180deg, #fff, #f8fbff);
    border-bottom-color: rgba(17,26,72,.08);
}
.candicate_header .left_side {
    display: flex;
    align-items: center;
    gap: 6px;
}
.candicate_header .topbar-badge{
    border: 1px solid rgba(17,26,72,.1);
    padding: 6px 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f7f9fc, #edf2f8);
    color: var(--ink);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .2px;
}

.auth-shell {
    padding: .75rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    gap: 8px;
    height: 100%;
    min-height: calc(100vh - 96px);
}

.auth-toast-stack {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    width: min(520px, calc(100vw - 48px));
    display: grid;
    gap: 10px;
}

.auth-toast {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px;
    border-radius: 7px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    box-shadow: 0 14px 34px rgba(0,20,48,.2);
}

.auth-toast > span {
    display: grid;
    gap: 3px;
}

.auth-toast.ok { background: #198754; }
.auth-toast.err { background: #b42318; }

.auth-toast button {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: rgba(255,255,255,.82);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.auth-toast button:hover {
    background: rgba(255,255,255,.12);
    color: #fff;
}

/* Auth card: 2-column split */
.auth-card {
    width: min(680px, calc(100vw - 32px));
    display: grid;
    grid-template-columns: 240px 1fr;
    background: #fff;
    border: 1px solid #d8e0ec;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    max-height: calc(100vh - 96px);
    max-height: calc(100dvh - 96px);
}

/* Left blue banner */
.auth-banner {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    color: #fff;
    background: #082f5f;
    align-items: center;
    text-align: center;
}
.auth-logo {
    width: 78px; height: 58px;
    display: grid; place-items: center;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.55);
    background: #e9f6fb;
    padding: 4px;
    font-size: 22px; font-weight: 800;
}
.auth-logo .icon { width: 22px; height: 22px; }
.auth-banner strong { display: block; font-size: 16px; line-height: 1.2; }
.auth-banner span   { display: block; margin-top: 4px; color: rgba(255,255,255,.75); font-size: 12px; line-height: 1.4; }

/* Right column wrapper (fixes 3-child grid bug) */
.auth-form-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 0;
}

/* Right form area */
.auth-form {
    padding: 12px 22px;
    min-width: 0;
    position: relative;
    display: inline-block;
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 108px);
    overflow: auto;
}
.auth-form-brand {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 8px;
}
.auth-form-brand img {
    width: 96px;
    max-height: 62px;
    object-fit: contain;
    border: 1px solid #d8e0ec;
    border-radius: 6px;
    background: #eef7fb;
    padding: 4px;
}
.auth-form h2 { margin: 0 0 9px; color: #062f61; font-size: 18px; font-weight: 700; }
.auth-form .field { margin-bottom: 5px; }
.auth-form label { margin-bottom: 4px; font-size: 12.5px; }
.auth-form input, .auth-form select { padding: 7px 11px; border-radius: 6px; font-size: 13.5px; }
.auth-form input.otp-input { text-align: left; font-size: 14px; font-weight: 600; letter-spacing: 0; }
.auth-form .captcha { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.auth-form .captcha { min-height: 44px; padding: 5px 8px; margin-bottom: 3px; }
.auth-form .captcha-code { font-size: 18px; line-height: 1.1; letter-spacing: 5px; }
.auth-form .captcha .btn-sm { min-height: 34px; padding: 6px 12px; align-self: center; }
.auth-form .btn-lg { padding: 9px 24px; font-size: 14.5px; }
.auth-form p { margin-top: 8px !important; }

.candidate-auth-card {
    width: min(680px, calc(100vw - 32px));
    grid-template-columns: 240px minmax(0, 1fr);
    max-height: none;
    overflow: visible;
}
.candidate-login-form {
     height: auto;
     max-height: none;
     overflow: visible;
}
.candidate-login-form h2 {
    margin-bottom: 8px;
}
.candidate-login-notice {
    margin-bottom: 6px;
    padding: 7px 10px;
    font-size: 12.5px;
    line-height: 1.35;
}
.candidate-login-form form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: start;
}
.candidate-login-form .field {
    margin-bottom: 0;
}
.candidate-login-form label {
    margin-bottom: 3px;
}
.candidate-login-form input,
.candidate-login-form select {
    padding: 6px 10px;
    font-size: 13px;
}
.candidate-login-form .captcha {
    min-height: 36px;
    padding: 4px 7px;
}
.candidate-login-form .captcha-image {
    height: 34px;
}
.candidate-login-form .captcha .btn-sm {
    min-height: 30px;
    padding: 5px 10px;
}
.candidate-login-form .btn-lg {
    padding: 8px 18px;
    justify-content: center;
}
.candidate-captcha-field {
    grid-column: auto;
}
.candidate-captcha-field .captcha {
    grid-template-columns: 1fr auto;
}
.candidate-login-submit {
    grid-column: auto;
}
.candidate-login-help {
    grid-column: auto;
}

/* Inline auth alerts stay inside the form; session messages use toasts. */
.auth-page .alert {
    width: 100%;
    margin: 0 0 12px;
    padding: 10px 12px;
    font-size: 12.5px;
}

.candidate-terms-modal {
    position: fixed;
    inset: 0;
    z-index: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(9, 20, 35, .58);
}
.candidate-terms-panel {
    width: min(720px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    background: #fff;
    border: 1px solid #b8c7dc;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}
.candidate-terms-head {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 18px 22px;
    color: #fff;
    background: var(--navy);
}
.candidate-terms-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
}
.candidate-terms-head h2 {
    margin: 0;
    color: #fff;
}
.candidate-terms-head p {
    margin: 0;
    color: rgba(255, 255, 255, .82);
}
.candidate-terms-body {
    padding: 20px 24px 8px;
}
.candidate-terms-body .terms-list {
    margin: 0;
}
.candidate-terms-help {
    display: inline-flex;
    margin-top: 12px;
    font-weight: 700;
    color: var(--saffron);
    width: 100%;
    align-items: center;
    justify-content: end;
}
.candidate-terms-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 24px 22px;
    border-top: 1px solid var(--line);
    background: #f7faff;
}
.candidate-terms-action .terms-accept-bar {
    margin: 0;
    flex: 1;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    padding: 0;
}
.candidate-terms-action input[type="checkbox"] {
    width: auto;
    accent-color: var(--green);
    transform: scale(1.18);
}
.candidate-terms-action input[type="checkbox"]:focus{
    box-shadow: none;
}

/* Mobile: stack vertically */
@media (max-width: 700px) {
    .auth-page { height: auto; overflow-y: auto; }
    .auth-topbar {
        position: static;
        height: auto;
        min-height: auto;
        max-height: none;
        padding: 7px 12px;
        gap: 8px;
        overflow: visible;
    }
    .auth-topbar-logo {
        width: 44px !important;
        height: 30px !important;
        flex-basis: 44px;
    }
    .auth-topbar-logo img {
        width: 44px !important;
        height: 30px !important;
        max-width: 44px !important;
        max-height: 30px !important;
    }
    .auth-topbar-copy strong {
        font-size: 13px;
    }
    .auth-topbar-copy span {
        font-size: 10px;
    }
    .auth-toast-stack,
    .portal-toast-stack { top: 14px; right: 12px; max-width: calc(100vw - 24px); }
    .auth-shell { height: auto; min-height: calc(100vh - 56px); min-height: calc(100dvh - 56px); padding: 12px 10px 16px; align-items: center; overflow: visible; }
    .auth-card { grid-template-columns: 1fr; width: 100%; max-height: none; }
    .auth-banner { padding: 18px 16px; }
    .auth-form-col { padding: 6px 0 10px; }
    .auth-form { padding: 14px 16px 16px; }
    .candidate-terms-action { flex-direction: column; align-items: stretch; }
    .candidate-terms-action .btn { width: 100%; justify-content: center; }
}

@media (max-width: 991px) {
    .admin-topbar {
        padding: 3px 10px;
        gap: 7px;
    }
    .menu-button {
        width: 32px;
        height: 32px;
    }
    .auth-topbar-logo {
        width: 44px !important;
        height: 30px !important;
        flex-basis: 44px;
    }
    .auth-topbar-logo img {
        width: 44px !important;
        height: 30px !important;
        max-width: 44px !important;
        max-height: 30px !important;
    }
    .auth-topbar-copy strong {
        font-size: 13px;
    }
    .auth-topbar-copy span {
        font-size: 10px;
    }
    .profile-button {
        padding: 3px 6px 3px 3px;
    }
    .profile-copy strong {
        font-size: 11.5px;
    }
    .profile-copy small {
        font-size: 9px;
    }
    .candicate_header .topbar-badge{
        padding: 5px 9px;
        font-size: 10px;
    }
}

/* ── PRINT ───────────────────────────────────────────── */
/* @media print {
    body { background: #fff; }
    .gov-strip, .topbar, .nav, .no-print, .admin-topbar, .admin-sidebar,
    .success-strip, .btn, .actions { display: none !important; }
    .shell, .admin-content { width: 100%; margin: 0; padding: 0; }
    .admin-main { margin-left: 0 !important; padding-top: 0 !important; }
    .card { box-shadow: none; border: none; padding: 0; }
    .print-form { border: 2px solid #111; }
    h1,h2,h3,h4,h5,h6,p,li,ol,ul{
        margin: 0;
    }
} */

/* ── RESPONSIVE MISC ────────────────────────────────── */
@media (max-width: 768px) {
    .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; }
    .card { padding: 13px 14px; }
    .login-body { padding: 20px; }
    .cand-info { grid-template-columns: 1fr 1fr; }
}

.profile-copy {
    text-align: left;
}

.dashboard_icon{
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dashboard_icon .icons {
    width: 36px;
    height: 36px;
    background: #111744;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 20px;
    color: #fff;
    position: absolute;
    bottom: 71px;
    right: 10px;
}

.multi-select-dropdown summary,
select,
input,
.btn, button.btn,
.table-toolbar input,
.table-toolbar select
{
    min-height: 36px;
    max-height: 36px;
}

input[type="checkbox"],
input[type="radio"] {
    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 16px;
    max-height: 16px;
    padding: 0;
    flex: 0 0 auto;
    box-shadow: none;
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
    box-shadow: none;
}


.custom-select {
  padding: 8px 40px 8px 12px; /* space for icon */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23333' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0px center !important;
  background-size: 28px !important;
}
.btn-primary { background: linear-gradient(180deg, #003366, #002954); color: #fff; border-color: #003366; box-shadow: 0 6px 14px rgba(0,51,102,.12); }

.no-print.actions{
    justify-content: end;
}

.candicate_header{
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.candicate_header .left_side {
    display: flex;
    align-items: center;
    gap: 10px;
}
.profile_page{
    padding: 0;
}
.profile_page .card-header{
    margin: 0;
}
.profile_page .profile_table{
    padding: 10px;
}
.profile_page .profile_table table{
    border: 1px solid #ededed;
    border-collapse: collapse;
}
.profile_page .profile_table table th{
    padding: 8px 10px;
}

.custome_file_uploader{
    display: grid;
    gap: 10px;
    width: 100%;
}
.custome_file_uploader .candidate-upload-file {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.custome_file_uploader input{
    padding: 5px 8px 5px 8px !important;
    flex: 1 1 auto;
    min-width: 0;
}
.custome_file_uploader .candidate-upload-actions {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    flex-wrap: wrap;
}
.candidate-file-clear {
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid #d7dce6;
    border-radius: 6px;
    background: #fff;
    color: var(--red);
    flex: 0 0 auto;
}
.candidate-file-clear:hover {
    background: #fff2f0;
    border-color: #f2c7c2;
    color: var(--red);
}
.candidate-file-clear .icon {
    width: 12px;
    height: 12px;
}

@media (max-width: 900px) {
    .preference-sheet-meta {
        grid-template-columns: 1fr;
    }

    .preference-photo-box {
        width: 100%;
        max-width: 210px;
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    .preference-sheet {
        padding: 16px 14px 14px;
    }
}

@media print {
    @page {
        size: A4;
        margin: 10mm;
    }

    html,
    body {
        background: #fff !important;
        color: #000 !important;
    }

    *,
    *::before,
    *::after {
        box-sizing: border-box !important;
    }

    .card,
    .table-card,
    .inline-panel,
    .portal-modal,
    .drawer-panel,
    .candidate-upload-card,
    .report-filter-card,
    .preference-search-modal,
    .candidate-list-card,
    .preference-resend-card,
    .upload-rule-panel,
    .cand-info,
    .portal-header,
    .summary-chip,
    .search-row,
    .candidate-filter-grid,
    .report-filter-grid,
    .portal-modal-body,
    .portal-modal-actions,
    .table-wrap,
    .pagination,
    .table-pagination {
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
        min-width: 0 !important;
    }

    .card,
    .table-card,
    .inline-panel,
    .portal-modal,
    .drawer-panel,
    .candidate-upload-card,
    .report-filter-card,
    .assignment-form-card,
    .assignment-candidate-card,
    .preference-resend-card,
    .candidate-list-card,
    .dashboard-panel,
    .portal-header,
    .cand-info,
    .summary-chip,
    .search-row,
    .candidate-filter-grid,
    .report-filter-grid,
    .portal-modal-body,
    .portal-modal-actions,
    .pagination,
    .table-pagination {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .gov-strip,
    .auth-topbar,
    .breadcrumb-bar,
    .app-footer,
    .topbar-badge,
    .no-print,
    .actions,
    .btn,
    .portal-header,
    .cand-info,
    .notice,
    .success-strip,
    .admin-topbar,
    .admin-sidebar {
        display: none !important;
    }

    main.shell,
    main.narrow,
    main.auth-shell,
    .shell,
    .narrow,
    .auth-shell {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .card {
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
    }

    .print-form,
    .preference-sheet {
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    .preference-sheet-meta {
        grid-template-columns: minmax(0, 1fr) 42mm;
        gap: 8mm;
    }

    .table-wrap {
        overflow: visible !important;
    }

    .table-wrap table,
    .report-matrix-table {
        width: 100% !important;
    }

    .table-wrap table th,
    .table-wrap table td,
    .report-matrix-table th,
    .report-matrix-table td {
        white-space: normal !important;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .btn,
    .badge,
    .nav-mark,
    .summary-chip strong,
    .summary-chip span,
    .action-row,
    .table-wrap td .actions {
        white-space: normal !important;
    }

    .preference-photo-box {
        width: 42mm;
        height: 48mm;
        padding: 5mm;
    }

    .preference-sheet-title {
        font-size: 12.5pt;
    }

    .preference-sheet-date,
    .preference-sheet-section-title,
    .preference-sheet-declaration,
    .preference-sheet-table {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .preference-sheet-table th,
    .preference-sheet-table td {
        font-size: 8.5pt;
        padding: 3mm 2.5mm;
    }

    .preference-sheet-date {
        font-size: 9pt;
        padding: 2.5mm 3mm;
        background: #f4f8ff;
        color: #06294f;
        font-weight: 800;
    }

    .preference-sheet-section-title {
        font-size: 9.5pt;
        margin: 4mm 0 3mm;
    }

    .preference-sheet-declaration {
        font-size: 8.5pt;
        padding: 3mm 3.5mm;
        line-height: 1.45;
    }

    .preference-sheet-table--footer {
        font-size: 8pt;
    }

    .preference-sheet-table--preferences .preference-region,
    .preference-sheet-table--preferences .preference-jurisdiction,
    .preference-sheet-table--preferences .preference-value,
    .preference-sheet-table--details td,
    .preference-sheet-table--rank td,
    .preference-sheet-table--footer td {
        font-weight: 700;
    }

    .preference-sheet-submitted-date {
        margin-top: 2.5mm;
        font-size: 8.5pt;
    }
}
