/* ==========================================================================
   PMK Group — Employee Onboarding
   Brand system, application shell, forms, console and print styles.
   ========================================================================== */

:root {
    --navy-950: #071c3d;
    --navy-900: #0a2650;
    --navy-800: #103566;
    --brand-blue: #0b4dbb;
    --brand-purple: #7b1c96;
    --brand-pink: #e0126a;
    --brand-orange: #ff9500;
    --gold: #ffb703;
    --gold-soft: #fff4d1;

    --ink: #12213a;
    --ink-soft: #34445f;
    --muted: #6b7a93;
    --muted-2: #8d9ab0;
    --line: #e2e8f2;
    --line-strong: #cfd8e6;
    --bg: #f4f6fb;
    --bg-accent: #eef2f9;
    --surface: #ffffff;
    --surface-2: #f9fbfe;

    --success: #12805c;
    --success-bg: #e6f7f0;
    --danger: #c0284c;
    --danger-bg: #fdecf0;
    --warning: #9a6400;
    --warning-bg: #fff6e0;
    --info: #1a5fb4;
    --info-bg: #eaf3ff;

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --shadow-xs: 0 1px 2px rgba(10, 38, 80, .06);
    --shadow-sm: 0 2px 8px rgba(10, 38, 80, .06), 0 1px 2px rgba(10, 38, 80, .04);
    --shadow-md: 0 10px 30px rgba(10, 38, 80, .08), 0 2px 6px rgba(10, 38, 80, .04);
    --shadow-lg: 0 24px 60px rgba(7, 28, 61, .14), 0 6px 16px rgba(7, 28, 61, .06);
    --grad: linear-gradient(118deg, var(--brand-blue) 0%, var(--brand-purple) 34%, var(--brand-pink) 68%, var(--brand-orange) 100%);
    --grad-soft: linear-gradient(118deg, rgba(11, 77, 187, .09), rgba(123, 28, 150, .09) 40%, rgba(224, 18, 106, .09) 70%, rgba(255, 149, 0, .12));
    --header-h: 72px;
    --sidebar-w: 292px;
    --font: "Inter", "Segoe UI", "Helvetica Neue", Arial, system-ui, -apple-system, sans-serif;
    --mono: "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.shell-auth {
    background: var(--navy-950);
}

body.shell-print {
    background: #e9edf4;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--brand-blue);
    text-decoration: none;
}

a:hover {
    color: var(--brand-purple);
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

h1, h2, h3, h4 {
    margin: 0;
    line-height: 1.22;
    letter-spacing: -.015em;
    color: var(--ink);
}

h1 { font-size: clamp(1.65rem, 2.4vw, 2.15rem); font-weight: 750; }
h2 { font-size: 1.22rem; font-weight: 720; }
h3 { font-size: 1.02rem; font-weight: 700; }
p { margin: 0; }

small { font-size: .8rem; }
code {
    font-family: var(--mono);
    font-size: .84em;
    background: var(--bg-accent);
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: .1em .4em;
}

::selection {
    background: rgba(224, 18, 106, .16);
}

:focus-visible {
    outline: 3px solid rgba(11, 77, 187, .28);
    outline-offset: 2px;
}

.icon {
    flex: 0 0 auto;
}

.muted-note {
    color: var(--muted);
    font-size: .82rem;
}

.dot-sep {
    color: var(--muted-2);
    padding: 0 .15rem;
}

.grad-text {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* --------------------------------------------------------------------------
   Buttons, pills, tags
   -------------------------------------------------------------------------- */

.btn {
    --btn-bg: var(--surface);
    --btn-fg: var(--ink);
    --btn-border: var(--line-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 42px;
    padding: .58rem 1.15rem;
    border: 1px solid var(--btn-border);
    border-radius: 10px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-weight: 650;
    font-size: .9rem;
    line-height: 1.2;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
    white-space: nowrap;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    color: var(--btn-fg);
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-primary {
    --btn-bg: var(--navy-950);
    --btn-fg: #fff;
    --btn-border: transparent;
    background-image: linear-gradient(118deg, #08234a, #0f3a73 55%, #0a2650);
    box-shadow: 0 6px 18px rgba(7, 28, 61, .22);
}

.btn-primary:hover {
    box-shadow: 0 10px 26px rgba(7, 28, 61, .28);
    color: #fff;
}

.btn-ghost {
    --btn-bg: #fff;
    --btn-fg: var(--ink-soft);
    --btn-border: var(--line-strong);
}

.btn-ghost:hover {
    --btn-border: #a9b8ce;
    --btn-fg: var(--ink);
}

.btn-danger {
    --btn-bg: #fff;
    --btn-fg: var(--danger);
    --btn-border: #f0bcc9;
}

.btn-danger:hover {
    --btn-bg: var(--danger);
    --btn-fg: #fff;
    --btn-border: var(--danger);
}

.btn-sm { min-height: 36px; padding: .42rem .85rem; font-size: .84rem; border-radius: 9px; }
.btn-xs { min-height: 30px; padding: .3rem .65rem; font-size: .78rem; border-radius: 8px; gap: .35rem; }
.btn-lg { min-height: 50px; padding: .78rem 1.4rem; font-size: .97rem; border-radius: 12px; }
.btn-block { width: 100%; }

.btn:disabled,
.btn[disabled] {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
}

.icon-btn:hover {
    background: var(--bg-accent);
    color: var(--ink);
}

.link-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--brand-blue);
    font-weight: 600;
    font-size: .82rem;
    cursor: pointer;
}

.link-btn:hover { color: var(--brand-purple); }
.link-btn:disabled { color: var(--muted-2); cursor: not-allowed; }

.link-muted {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 600;
}

.link-muted:hover { color: var(--brand-blue); }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-bottom: .5rem;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 650;
}

.back-link:hover { color: var(--brand-blue); }

.pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .26rem .68rem;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .02em;
    border: 1px solid transparent;
    white-space: nowrap;
}

.pill-success { background: var(--success-bg); color: var(--success); border-color: #bfe7d8; }
.pill-info { background: var(--info-bg); color: var(--info); border-color: #c9defa; }
.pill-danger { background: var(--danger-bg); color: var(--danger); border-color: #f5c4d0; }
.pill-muted { background: #eef1f6; color: var(--muted); border-color: #dde3ec; }
.pill-warning { background: var(--warning-bg); color: var(--warning); border-color: #f2ddac; }

.tag {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .18rem .55rem;
    border-radius: 6px;
    font-size: .68rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .06em;
    border: 1px solid var(--line);
    color: var(--muted);
    background: var(--surface-2);
    white-space: nowrap;
}

.tag-soft { background: #f1f4f9; border-color: #e4e9f1; color: var(--muted); }
.tag-required { background: var(--gold-soft); border-color: #f4dda0; color: #8a5c00; }
.tag-success { background: var(--success-bg); border-color: #bfe7d8; color: var(--success); }

/* --------------------------------------------------------------------------
   Flash messages, toasts, modals
   -------------------------------------------------------------------------- */

.flash-stack {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(400px, calc(100vw - 32px));
    pointer-events: none;
}

.flash {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .8rem .9rem;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    pointer-events: auto;
    animation: flashIn .28s ease;
    font-size: .86rem;
}

.flash-icon { display: flex; margin-top: .1rem; }
.flash-text { flex: 1; }
.flash-close {
    border: 0;
    background: none;
    color: var(--muted);
    cursor: pointer;
    padding: .1rem;
    line-height: 0;
}
.flash-info { border-left: 4px solid var(--info); }
.flash-info .flash-icon { color: var(--info); }
.flash-success { border-left: 4px solid var(--success); }
.flash-success .flash-icon { color: var(--success); }
.flash-warning { border-left: 4px solid var(--brand-orange); }
.flash-warning .flash-icon { color: #b26a00; }
.flash-danger { border-left: 4px solid var(--danger); }
.flash-danger .flash-icon { color: var(--danger); }

@keyframes flashIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
}

.toast-root {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    z-index: 1300;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: min(460px, calc(100vw - 32px));
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .7rem 1rem;
    border-radius: 10px;
    background: var(--navy-950);
    color: #fff;
    font-size: .85rem;
    font-weight: 550;
    box-shadow: var(--shadow-lg);
    animation: toastIn .22s ease;
    max-width: 100%;
}

.toast.is-error { background: #8f1f38; }
.toast.is-success { background: #0d6a4c; }
.toast.is-warning { background: #8a5c00; }
.toast.is-hiding { opacity: 0; transform: translateY(6px); transition: .2s ease; }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to { opacity: 1; transform: none; }
}

.modal-root:empty { display: none; }

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(7, 28, 61, .48);
    backdrop-filter: blur(3px);
}

.modal {
    width: min(480px, 100%);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: modalIn .2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to { opacity: 1; transform: none; }
}

.modal-head { padding: 1.2rem 1.3rem .4rem; }
.modal-head h3 { font-size: 1.08rem; }
.modal-body { padding: .3rem 1.3rem 1rem; color: var(--muted); font-size: .9rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; padding: 1rem 1.3rem; background: var(--surface-2); border-top: 1px solid var(--line); }

/* --------------------------------------------------------------------------
   App shell — header, nav, sidebar
   -------------------------------------------------------------------------- */

.app-header {
    position: sticky;
    top: 0;
    z-index: 900;
    height: var(--header-h);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    max-width: 1680px;
    height: 100%;
    margin: 0 auto;
    padding: 0 26px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.mobile-menu-btn { display: none; }

.brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: var(--ink);
    flex: 0 0 auto;
}

.brand:hover { color: var(--ink); }

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.12;
}

.brand-text strong {
    font-size: .84rem;
    letter-spacing: .14em;
    font-weight: 800;
}

.brand-text small {
    color: var(--muted);
    font-size: .7rem;
    letter-spacing: .02em;
}

.brand-text-light strong { color: #fff; }
.brand-text-light small { color: rgba(255, 255, 255, .62); }

.pmk-logo { display: block; border-radius: 12px; }

.main-nav {
    display: flex;
    align-items: center;
    gap: .2rem;
    margin-left: .4rem;
    flex: 1;
}

.main-nav a {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    padding: .5rem .72rem;
    border-radius: 9px;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 650;
    transition: background .15s ease, color .15s ease;
}

.main-nav a:hover { background: var(--bg-accent); color: var(--ink); }
.main-nav a.active { background: var(--bg-accent); color: var(--brand-blue); }
.nav-sep { width: 1px; height: 22px; background: var(--line); margin: 0 .4rem; }

.header-right { margin-left: auto; }

.user-menu { position: relative; }

.user-btn {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .32rem .5rem .32rem .36rem;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    color: var(--ink);
}

.user-btn:hover { background: var(--bg-accent); }
.user-btn > .icon { color: var(--muted); }

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--grad);
    color: #fff;
    font-weight: 750;
    font-size: .8rem;
    letter-spacing: .02em;
    flex: 0 0 auto;
    box-shadow: 0 3px 10px rgba(11, 77, 187, .2);
}

.avatar-lg { width: 46px; height: 46px; font-size: .92rem; }
.avatar-xl { width: 58px; height: 58px; font-size: 1.1rem; }

.user-meta {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.18;
}

.user-meta strong { font-size: .82rem; font-weight: 700; }
.user-meta small { color: var(--muted); font-size: .7rem; }

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 270px;
    padding: .5rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    z-index: 950;
}

.user-dropdown[hidden] { display: none; }

.user-dropdown-head {
    display: flex;
    gap: .65rem;
    align-items: center;
    padding: .6rem .55rem .75rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: .35rem;
}

.user-dropdown-head strong { display: block; font-size: .84rem; }
.user-dropdown-head small { color: var(--muted); font-size: .74rem; }

.user-dropdown a,
.user-dropdown button {
    display: flex;
    align-items: center;
    gap: .55rem;
    width: 100%;
    padding: .55rem .6rem;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--ink-soft);
    font-size: .84rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.user-dropdown a:hover,
.user-dropdown button:hover { background: var(--bg-accent); color: var(--ink); }
.dropdown-logout { margin: 0; border-top: 1px solid var(--line); padding-top: .35rem; }
.dropdown-logout button { color: var(--danger); }
.dropdown-logout button:hover { background: var(--danger-bg); color: var(--danger); }

.app-layout {
    display: flex;
    align-items: flex-start;
    max-width: 1680px;
    margin: 0 auto;
}

.app-sidebar {
    position: sticky;
    top: var(--header-h);
    flex: 0 0 var(--sidebar-w);
    width: var(--sidebar-w);
    height: calc(100vh - var(--header-h));
    padding: 24px 18px 28px 26px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.sidebar-inner { display: flex; flex-direction: column; gap: 20px; }

.progress-card {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .95rem;
    border-radius: var(--radius);
    background: linear-gradient(150deg, #fff, #f6f9ff);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
}

.progress-ring {
    --p: 0;
    position: relative;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: conic-gradient(var(--brand-pink) calc(var(--p) * 1%), #e9edf5 0);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    transition: background .4s ease;
}

.progress-ring::before {
    content: "";
    position: absolute;
    inset: 6px;
    background: #fff;
    border-radius: 50%;
}

.progress-ring span {
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 1px;
}

.progress-ring strong { font-size: .98rem; font-weight: 800; color: var(--navy-950); }
.progress-ring small { font-size: .58rem; color: var(--muted); font-weight: 700; }

.progress-copy { display: flex; flex-direction: column; line-height: 1.25; }
.progress-copy strong { font-size: .82rem; }
.progress-copy span { font-size: .73rem; color: var(--muted); }
.progress-copy b { color: var(--ink); }

.section-nav { display: flex; flex-direction: column; gap: 2px; }

.section-link {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .48rem .55rem;
    border-radius: 9px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 600;
    border-left: 2px solid transparent;
}

.section-link:hover { background: #fff; color: var(--ink); }

.section-link.active {
    background: #fff;
    color: var(--ink);
    border-left-color: var(--brand-pink);
    box-shadow: var(--shadow-xs);
}

.sec-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    border-radius: 6px;
    background: var(--bg-accent);
    color: var(--muted);
    font-size: .68rem;
    font-weight: 800;
    flex: 0 0 auto;
}

.section-link.active .sec-letter,
.section-link.is-complete .sec-letter {
    background: var(--navy-950);
    color: #fff;
}

.sec-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sec-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: var(--success);
    flex: 0 0 auto;
}

.dot-neutral,
.dot-empty {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: block;
}

.dot-neutral { background: var(--line-strong); }
.dot-empty { background: #d4dbe7; box-shadow: inset 0 0 0 1px #c4ccda; }
.sec-status.complete { background: var(--success-bg); }

.sidebar-help {
    display: flex;
    gap: .6rem;
    padding: .9rem;
    border-radius: var(--radius);
    background: var(--navy-950);
    color: rgba(255, 255, 255, .82);
    box-shadow: var(--shadow-sm);
}

.sidebar-help-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .1);
    color: var(--gold);
    flex: 0 0 auto;
}

.sidebar-help strong { display: block; color: #fff; font-size: .8rem; }
.sidebar-help p { font-size: .74rem; line-height: 1.45; margin: .15rem 0 .35rem; }
.sidebar-help a { color: var(--gold); font-size: .74rem; font-weight: 650; word-break: break-all; }

.sidebar-overlay { display: none; }

.app-main {
    flex: 1;
    min-width: 0;
    padding: 30px 34px 70px;
}

.app-main-wide { max-width: 1320px; }

/* --------------------------------------------------------------------------
   Page headings, alerts, cards
   -------------------------------------------------------------------------- */

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.2rem;
    margin-bottom: 22px;
}

.page-head-copy { min-width: 0; }
.page-head-copy h1 { margin-top: .2rem; }
.page-sub { color: var(--muted); font-size: .88rem; margin-top: .35rem; }
.page-head-side { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; justify-content: flex-end; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--brand-purple);
}

.eyebrow-center { justify-content: center; }

.eyebrow-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand-pink);
    box-shadow: 0 0 0 3px rgba(224, 18, 106, .13);
}

.official-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .6rem;
    border-radius: 6px;
    background: var(--navy-950);
    color: var(--gold);
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .12em;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: #fff;
    margin-bottom: 18px;
    font-size: .88rem;
    box-shadow: var(--shadow-xs);
}

.alert > .icon { margin-top: .1rem; }
.alert > div { flex: 1; min-width: 0; }
.alert strong { display: block; font-size: .9rem; }
.alert p { color: var(--muted); margin-top: .2rem; }
.alert .btn { flex: 0 0 auto; }
.alert-badge {
    align-self: center;
    padding: .25rem .6rem;
    border-radius: 6px;
    background: rgba(192, 40, 76, .1);
    color: var(--danger);
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
}

.alert-success { border-color: #bfe7d8; background: linear-gradient(120deg, #fff, var(--success-bg)); }
.alert-success > .icon { color: var(--success); }
.alert-info { border-color: #c9defa; background: linear-gradient(120deg, #fff, var(--info-bg)); }
.alert-info > .icon { color: var(--info); }
.alert-danger { border-color: #f5c4d0; background: linear-gradient(120deg, #fff, var(--danger-bg)); }
.alert-danger > .icon { color: var(--danger); }
.alert-soft { border-color: var(--line); background: linear-gradient(120deg, #fff, #f7f9fe); }
.alert-soft > .icon { color: var(--brand-blue); }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   Form toolbar
   -------------------------------------------------------------------------- */

.form-toolbar {
    position: sticky;
    top: calc(var(--header-h) + 10px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .6rem .7rem .6rem 1rem;
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
}

.toolbar-status { display: flex; align-items: center; gap: .8rem; min-width: 0; }

.save-state {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    font-size: .78rem;
    font-weight: 650;
    color: var(--muted);
}

.save-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(18, 128, 92, .12);
}

.save-state[data-state="saving"] .save-dot { background: var(--brand-orange); box-shadow: 0 0 0 3px rgba(255, 149, 0, .16); animation: pulse 1s infinite; }
.save-state[data-state="error"] .save-dot { background: var(--danger); box-shadow: 0 0 0 3px rgba(192, 40, 76, .14); }
.save-state[data-state="dirty"] .save-dot { background: var(--info); box-shadow: 0 0 0 3px rgba(26, 95, 180, .13); }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}

.toolbar-autosave { color: var(--muted-2); font-size: .72rem; border-left: 1px solid var(--line); padding-left: .8rem; }
.toolbar-actions { display: flex; align-items: center; gap: .45rem; }
.mobile-section-jump { display: none; }

/* --------------------------------------------------------------------------
   Form sections, fields
   -------------------------------------------------------------------------- */

.form-section { margin-bottom: 20px; overflow: hidden; scroll-margin-top: calc(var(--header-h) + 84px); }

.section-head {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1.05rem 1.35rem;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(120deg, #fff, #f8fafe 72%, #f4f8ff);
}

.section-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--navy-950);
    color: var(--gold);
    font-size: 1rem;
    font-weight: 800;
    flex: 0 0 auto;
    box-shadow: 0 4px 12px rgba(7, 28, 61, .18);
}

.section-title { flex: 1; min-width: 0; }
.section-title h2 { font-size: 1.04rem; }
.section-title p { color: var(--muted); font-size: .79rem; margin-top: .1rem; }

.section-state {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .24rem .6rem;
    border-radius: 999px;
    background: #f1f4f9;
    color: var(--muted);
    font-size: .71rem;
    font-weight: 750;
    white-space: nowrap;
}

.section-state.complete { background: var(--success-bg); color: var(--success); }
.section-state.neutral { background: #f1f4f9; color: var(--muted-2); }

.section-body { padding: 1.25rem 1.35rem 1.4rem; }

.field-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem 1.1rem;
}

.field { min-width: 0; }
.field-full { grid-column: 1 / -1; }

.field > label,
.label-row > label {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-bottom: .34rem;
    font-size: .78rem;
    font-weight: 700;
    color: var(--ink-soft);
}

.req { color: var(--brand-pink); font-weight: 800; }
.optional { color: var(--muted-2); font-size: .67rem; font-weight: 600; text-transform: lowercase; }

.input-group {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
    overflow: hidden;
}

.input-group:focus-within {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(11, 77, 187, .12);
}

.input-group input,
.input-group textarea,
.input-group select {
    flex: 1;
    min-width: 0;
    width: 100%;
    padding: .62rem .78rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: .88rem;
    outline: none;
}

.field > .input-group > input,
.field > input,
.field > select,
.field > textarea {
    width: 100%;
    padding: .62rem .78rem;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #fff;
    font-size: .88rem;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.field > input:focus,
.field > select:focus,
.field > textarea:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(11, 77, 187, .12);
}

.field textarea { resize: vertical; min-height: 82px; line-height: 1.5; }

.input-group textarea { resize: vertical; min-height: 82px; }

.input-prefix,
.input-suffix {
    display: inline-flex;
    align-items: center;
    padding: 0 .7rem;
    background: var(--surface-2);
    color: var(--muted);
    font-size: .82rem;
    font-weight: 650;
    border-right: 1px solid var(--line);
    white-space: nowrap;
}

.input-suffix { border-right: 0; border-left: 1px solid var(--line); }

.input-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.input-action:hover { color: var(--ink); background: var(--surface-2); }

.select-wrap { position: relative; width: 100%; }

.select-wrap select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: .62rem 2.2rem .62rem .78rem;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #fff;
    font-size: .88rem;
    cursor: pointer;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.select-wrap select:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(11, 77, 187, .12);
}

.select-chevron {
    position: absolute;
    right: .7rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.select-sm select { padding: .35rem 1.9rem .35rem .55rem; font-size: .79rem; border-radius: 7px; }
.select-sm .select-chevron { right: .5rem; }

.field-hint { margin-top: .3rem; color: var(--muted); font-size: .73rem; }
.field-error { margin-top: .3rem; color: var(--danger); font-size: .75rem; font-weight: 600; }
.field-error[hidden] { display: none; }

.field.has-error > .input-group,
.field.has-error > input,
.field.has-error > select,
.field.has-error > textarea {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(192, 40, 76, .1);
}

.label-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }

.text-upper { text-transform: uppercase; letter-spacing: .03em; }

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

/* Photo */

.photo-card {
    display: flex;
    gap: 1.15rem;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1.25rem;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: linear-gradient(120deg, #fbfcff, #f6f9ff);
}

.photo-preview {
    position: relative;
    width: 104px;
    height: 130px;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.photo-preview img { width: 100%; height: 100%; object-fit: cover; }

.photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    color: var(--muted-2);
    font-size: .68rem;
}

.photo-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: .15rem;
    background: rgba(7, 28, 61, .78);
    color: #fff;
    font-size: .58rem;
    text-align: center;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.photo-body { flex: 1; min-width: 0; }
.photo-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.photo-head h3 { font-size: .95rem; }
.photo-body p { color: var(--muted); font-size: .8rem; margin-top: .2rem; }
.photo-actions { display: flex; align-items: center; gap: .8rem; margin-top: .6rem; flex-wrap: wrap; }

/* Education */

.edu-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }

.edu-card {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.edu-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-bottom: .75rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--line);
}

.edu-card-head h3 { font-size: .85rem; }
.edu-card .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem .8rem; }

/* --------------------------------------------------------------------------
   Tables and checklists
   -------------------------------------------------------------------------- */

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
    min-width: 560px;
}

.data-table thead th {
    padding: .6rem .85rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
}

.data-table tbody td {
    padding: .7rem .85rem;
    border-bottom: 1px solid #eef1f7;
    vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfcff; }

.col-yn { width: 120px; text-align: center; }
.col-yn .select-wrap { max-width: 120px; margin: 0 auto; }
.data-table .col-yn .select-wrap select { text-align: center; }
.col-actions { width: 110px; text-align: right; }

.doc-name { font-weight: 650; color: var(--ink); font-size: .84rem; }
.doc-hint { color: var(--muted); font-size: .72rem; }

/* Section I — document file upload */
.col-doc-file { width: 220px; }

.doc-file {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .12rem;
}

.doc-file-link {
    display: inline-flex;
    align-items: center;
    gap: .32rem;
    max-width: 210px;
    color: var(--brand-blue);
    font-size: .78rem;
    font-weight: 650;
    text-decoration: none;
}

.doc-file-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doc-file-link:hover { text-decoration: underline; }
.doc-file-meta { color: var(--muted); font-size: .68rem; }

.doc-file-remove {
    display: inline-flex;
    align-items: center;
    gap: .22rem;
    width: max-content;
    margin-top: .1rem;
    padding: 0;
    border: 0;
    background: none;
    color: #b42318;
    font-size: .68rem;
    font-weight: 650;
    cursor: pointer;
}

.doc-file-remove:hover { text-decoration: underline; }
.doc-file-remove:disabled { opacity: .5; cursor: default; }

.doc-upload {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .2rem;
}

.doc-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: .32rem;
    padding: .32rem .6rem;
    border: 1px dashed var(--line-strong);
    border-radius: 7px;
    background: #fff;
    color: var(--ink);
    font-size: .74rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.doc-upload-btn:hover {
    border-color: var(--brand-blue);
    background: #f6f9ff;
    color: var(--brand-blue);
}

.doc-upload-hint { color: var(--muted); font-size: .64rem; }
.doc-upload-status { color: var(--muted); font-size: .68rem; font-weight: 650; }
.doc-upload-status.is-error { color: #b42318; }

@media (max-width: 720px) {
    .col-doc-file { width: 170px; }
    .doc-file-link { max-width: 160px; }
}

.hr-tag {
    display: inline-block;
    margin-left: .25rem;
    padding: .08rem .3rem;
    border-radius: 4px;
    background: var(--gold-soft);
    color: #8a5c00;
    font-size: .56rem;
    font-weight: 800;
    letter-spacing: .05em;
    vertical-align: middle;
}

.yn {
    display: inline-flex;
    align-items: center;
    gap: .22rem;
    padding: .16rem .48rem;
    border-radius: 6px;
    font-size: .72rem;
    font-weight: 700;
}

.yn-yes { background: var(--success-bg); color: var(--success); }
.yn-no { background: #f2f4f8; color: var(--muted); }
.hr-pending { color: var(--muted-2); font-size: .72rem; font-weight: 650; }

.table-note {
    display: flex;
    align-items: flex-start;
    gap: .4rem;
    margin-top: .6rem;
    color: var(--muted);
    font-size: .74rem;
}

.table-input {
    width: 100%;
    padding: .42rem .55rem;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    font-size: .79rem;
    outline: none;
}

.table-input:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(11, 77, 187, .1); }

/* --------------------------------------------------------------------------
   Declaration, signature, HR use
   -------------------------------------------------------------------------- */

.declaration-box {
    display: flex;
    gap: .8rem;
    padding: 1rem 1.1rem;
    margin-bottom: 1.15rem;
    border-radius: var(--radius);
    background: linear-gradient(120deg, #fbfcff, #f4f8ff);
    border: 1px solid var(--line);
}

.declaration-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--navy-950);
    color: var(--gold);
    flex: 0 0 auto;
}

.declaration-box h3 { font-size: .88rem; margin-bottom: .15rem; }
.declaration-box p { color: var(--muted); font-size: .81rem; line-height: 1.55; }

.declaration-agree { margin-top: 1rem; }

.checkline {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    font-size: .82rem;
    color: var(--ink-soft);
    cursor: pointer;
}

.checkline input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 19px;
    height: 19px;
    margin: .1rem 0 0;
    border: 1.5px solid var(--line-strong);
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    flex: 0 0 auto;
    position: relative;
    transition: background .15s ease, border-color .15s ease;
}

.checkline input[type="checkbox"]:checked {
    background: var(--navy-950);
    border-color: var(--navy-950);
}

.checkline input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkline.has-error { color: var(--danger); }
.checkline.has-error input[type="checkbox"] { border-color: var(--danger); }

.signature-card {
    margin-top: 1.1rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.signature-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.signature-head h3 { font-size: .88rem; }
.signature-head p { color: var(--muted); font-size: .76rem; margin-top: .1rem; }

.signature-current {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: .7rem;
    padding: .6rem .8rem;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
}

.signature-current img { max-height: 62px; width: auto; }

.signature-pad-wrap {
    position: relative;
    margin-top: .7rem;
    border: 1.5px dashed var(--line-strong);
    border-radius: 10px;
    background:
        linear-gradient(180deg, transparent calc(100% - 1px), #eef2f8 0) 0 74%/100% 100% no-repeat,
        #fff;
    overflow: hidden;
    touch-action: none;
}

.signature-pad-wrap.is-hidden { display: none; }
.signature-pad-wrap canvas { display: block; width: 100%; height: 150px; touch-action: none; cursor: crosshair; }

.signature-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--muted-2);
    font-size: .85rem;
    font-style: italic;
    pointer-events: none;
}

.signature-pad-wrap.has-ink .signature-placeholder { display: none; }

.signature-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    margin-top: .55rem;
}

.signature-date { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .75rem; }

.hr-use-box {
    margin-top: 1.1rem;
    border: 1px solid #e7dcc1;
    border-radius: var(--radius);
    background: #fffdf7;
    overflow: hidden;
}

.hr-use-head {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem .8rem;
    background: var(--gold-soft);
    color: #7a5200;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hr-use-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.hr-use-grid > div {
    padding: .65rem .8rem;
    border-top: 1px solid #f0e8d6;
}

.hr-use-grid > div + div { border-left: 1px solid #f0e8d6; }
.hr-use-grid span { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; color: #9a7c3d; font-weight: 700; }
.hr-use-grid strong { display: block; font-size: .82rem; color: var(--ink); margin-top: .1rem; }

/* Form end */

.form-end {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.35rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: linear-gradient(120deg, #fff, #f6f9ff);
    box-shadow: var(--shadow-sm);
}

.form-end-copy strong { display: block; font-size: .95rem; }
.form-end-copy p { color: var(--muted); font-size: .8rem; margin-top: .15rem; }
.form-end-actions { display: flex; gap: .6rem; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Submissions
   -------------------------------------------------------------------------- */

.submission-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, .85fr);
    gap: 1.1rem;
    align-items: start;
}

.submission-card { padding: 1.25rem 1.35rem; }

.submission-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .8rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.submission-ref .ref-label {
    display: block;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}

.submission-ref strong { display: block; font-size: 1.2rem; margin-top: .1rem; letter-spacing: -.01em; }

.submission-progress { display: flex; align-items: center; gap: .8rem; margin: 1rem 0; }
.submission-progress > span { font-size: .74rem; font-weight: 700; color: var(--muted); white-space: nowrap; }

.progress-track {
    flex: 1;
    height: 7px;
    border-radius: 999px;
    background: #e9edf5;
    overflow: hidden;
}

.progress-track > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--grad);
    transition: width .5s ease;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .85rem 1rem;
    margin: 0;
}

.detail-grid dt,
.mini-details dt {
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
}

.detail-grid dd,
.mini-details dd {
    margin: .1rem 0 0;
    font-size: .86rem;
    font-weight: 600;
    color: var(--ink);
    word-break: break-word;
}

.mini-details { margin: .8rem 0 0; display: grid; gap: .5rem; }
.mini-details > div { display: flex; justify-content: space-between; gap: .8rem; padding-bottom: .45rem; border-bottom: 1px dashed #eef1f7; }
.mini-details > div:last-child { border-bottom: 0; padding-bottom: 0; }
.mini-details dt { margin-top: .1rem; }
.mini-details dd { text-align: right; }

.inline-note {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    margin-top: 1rem;
    padding: .8rem .9rem;
    border-radius: 10px;
    border: 1px solid var(--line);
    font-size: .82rem;
}

.inline-note strong { display: block; font-size: .84rem; }
.inline-note p { color: var(--muted); margin-top: .1rem; }
.inline-note-danger { background: var(--danger-bg); border-color: #f5c4d0; }
.inline-note-danger > .icon { color: var(--danger); }
.inline-note-success { background: var(--success-bg); border-color: #bfe7d8; }
.inline-note-success > .icon { color: var(--success); }
.inline-note-warning { background: var(--warning-bg); border-color: #f2ddac; }
.inline-note-warning > .icon { color: var(--warning); }

.submission-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.15rem; }

.submission-side { display: flex; flex-direction: column; gap: 1rem; }
.timeline-card, .profile-card { padding: 1.15rem 1.2rem; }
.timeline-card h3, .profile-card h3 { font-size: .9rem; margin-bottom: .8rem; }

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }

.timeline li {
    position: relative;
    display: flex;
    gap: .7rem;
    padding-bottom: 1.05rem;
}

.timeline li:last-child { padding-bottom: 0; }

.timeline li::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 26px;
    bottom: 0;
    width: 1px;
    background: var(--line);
}

.timeline li:last-child::before { display: none; }

.timeline-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #eef1f6;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 800;
    flex: 0 0 auto;
    z-index: 1;
}

.timeline li.done .timeline-dot { background: var(--success); color: #fff; }
.timeline li.current .timeline-dot { background: var(--info); color: #fff; box-shadow: 0 0 0 4px rgba(26, 95, 180, .12); }
.timeline li.rejected .timeline-dot { background: var(--danger); color: #fff; }

.timeline strong { display: block; font-size: .82rem; }
.timeline small { color: var(--muted); font-size: .73rem; }

.profile-row { display: flex; align-items: center; gap: .7rem; }
.profile-row strong { display: block; font-size: .86rem; }
.profile-row small { color: var(--muted); font-size: .74rem; }
.profile-badges { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .8rem; }

/* --------------------------------------------------------------------------
   HR console
   -------------------------------------------------------------------------- */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .85rem;
    margin-bottom: 1.2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .95rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow-xs);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--line-strong);
    color: var(--ink);
}

.stat-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--bg-accent);
    color: var(--muted);
    flex: 0 0 auto;
}

.stat-copy { display: flex; flex-direction: column; line-height: 1.1; }
.stat-copy strong { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.stat-copy span { font-size: .72rem; color: var(--muted); font-weight: 600; }

.stat-brand .stat-icon { background: var(--navy-950); color: var(--gold); }
.stat-info .stat-icon { background: var(--info-bg); color: var(--info); }
.stat-success .stat-icon { background: var(--success-bg); color: var(--success); }
.stat-danger .stat-icon { background: var(--danger-bg); color: var(--danger); }
.stat-muted .stat-icon { background: #f1f4f9; color: var(--muted); }

.admin-card { overflow: hidden; }
.admin-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.05rem 1.2rem;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(120deg, #fff, #f9fbfe);
    flex-wrap: wrap;
}

.admin-card-head h2 { font-size: 1rem; }
.admin-card-head p { color: var(--muted); font-size: .76rem; margin-top: .1rem; }

.filter-bar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

.search-input {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: 0 .7rem;
    min-width: 290px;
    height: 38px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    background: #fff;
    color: var(--muted);
}

.search-input input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    font-size: .83rem;
    color: var(--ink);
}

.select-filter { width: 180px; }
.select-filter select { height: 38px; padding-top: .4rem; padding-bottom: .4rem; font-size: .82rem; border-radius: 9px; }

.admin-table { min-width: 760px; }
.user-cell { display: flex; align-items: center; gap: .6rem; }
.user-cell strong { display: block; font-size: .84rem; }
.user-cell small { color: var(--muted); font-size: .72rem; }
.ref-cell strong { display: block; font-size: .8rem; font-family: var(--mono); letter-spacing: -.02em; }
.ref-cell small { color: var(--muted); font-size: .7rem; }
.role-cell span { display: block; font-size: .83rem; font-weight: 600; }
.role-cell small { color: var(--muted); font-size: .71rem; }
.date-cell { font-size: .82rem; font-weight: 600; }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    padding: 3.4rem 1.5rem;
    text-align: center;
}

.empty-icon {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: var(--bg-accent);
    color: var(--muted-2);
    margin-bottom: .4rem;
}

.empty-state h3 { font-size: .98rem; }
.empty-state p { color: var(--muted); font-size: .84rem; max-width: 380px; }
.empty-state .btn { margin-top: .7rem; }

.admin-foot-note {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    margin-top: 1rem;
    color: var(--muted);
    font-size: .76rem;
}

/* --------------------------------------------------------------------------
   Review console
   -------------------------------------------------------------------------- */

.review-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.2rem;
    align-items: start;
}

.review-main { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.review-side { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: calc(var(--header-h) + 16px); }

.review-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1.15rem;
    flex-wrap: wrap;
}

.review-toolbar strong { display: block; font-size: .88rem; }
.review-toolbar-copy span { color: var(--muted); font-size: .75rem; }
.review-toolbar-stats { display: flex; gap: 1rem; flex-wrap: wrap; }
.mini-stat { font-size: .72rem; color: var(--muted); }
.mini-stat b { display: block; font-size: 1rem; color: var(--ink); font-weight: 800; }

.review-section .section-body { padding-top: 1rem; }

.readonly-photo-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.1rem; }

.readonly-photo {
    width: 92px;
    height: 115px;
    border-radius: 9px;
    border: 1px solid var(--line);
    overflow: hidden;
    display: grid;
    place-items: center;
    background: var(--surface-2);
    flex: 0 0 auto;
}

.readonly-photo img { width: 100%; height: 100%; object-fit: cover; }
.readonly-photo-copy strong { display: block; font-size: .95rem; }
.readonly-photo-copy small { display: block; color: var(--muted); font-size: .78rem; margin-top: .1rem; }
.readonly-photo-copy .muted-note { display: block; margin-top: .35rem; }

.readonly-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .8rem 1.1rem;
}

.readonly-item { min-width: 0; border-bottom: 1px dashed #edf0f6; padding-bottom: .5rem; }
.readonly-item-full { grid-column: 1 / -1; }
.readonly-label {
    display: block;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .12rem;
}

.readonly-value { display: block; font-size: .86rem; font-weight: 600; color: var(--ink); word-break: break-word; }
.readonly-value.is-empty { color: var(--muted-2); font-weight: 500; }

.readonly-edu .edu-card { background: #fbfcff; }
.readonly-edu .readonly-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.readonly-declaration { margin-top: 1rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1rem; align-items: start; }
.readonly-sign-block { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.readonly-sign { margin-top: .45rem; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.readonly-sign img { max-height: 74px; width: auto; }
.readonly-sign-block .muted-note { display: block; margin-top: .4rem; }

.review-card { overflow: hidden; }
.review-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.05rem 1.2rem;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(120deg, #fff, #f9fbfe);
}

.review-card-head h2 { font-size: 1rem; margin-top: .15rem; }
.review-card-head p { color: var(--muted); font-size: .78rem; margin-top: .15rem; }
.review-card .table-wrap { margin: 1rem 1.2rem; width: auto; }
.review-card .field-grid { padding: 1.1rem 1.2rem 0; }

.review-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .6rem;
    flex-wrap: wrap;
    padding: 1rem 1.2rem;
    margin-top: 1rem;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
}

.review-meta { display: flex; align-items: center; gap: .35rem; padding: 0 1.2rem 1rem; color: var(--muted); font-size: .74rem; }

.review-side-card { padding: 1.1rem 1.15rem; }
.review-side-card h3 { font-size: .87rem; margin-bottom: .7rem; }

.review-applicant { display: flex; align-items: center; gap: .7rem; }
.review-applicant strong { display: block; font-size: .9rem; }
.review-applicant small { color: var(--muted); font-size: .74rem; }

.status-summary { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.status-summary p { color: var(--muted); font-size: .76rem; }

.check-summary { list-style: none; margin: .9rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.check-summary li { display: flex; align-items: center; gap: .55rem; font-size: .78rem; color: var(--muted); }
.check-summary li b { margin-left: auto; color: var(--ink); font-size: .76rem; }
.check-summary li.done .timeline-dot { background: var(--success); color: #fff; }
.check-summary .timeline-dot { width: 21px; height: 21px; font-size: .62rem; }

.side-link-list { display: flex; flex-direction: column; gap: .15rem; }
.side-link-list a {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .4rem;
    border-radius: 7px;
    color: var(--ink-soft);
    font-size: .81rem;
    font-weight: 600;
}
.side-link-list a:hover { background: var(--bg-accent); color: var(--ink); }

/* --------------------------------------------------------------------------
   Settings
   -------------------------------------------------------------------------- */

.settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 1.2rem;
    align-items: start;
}

.settings-main { display: flex; flex-direction: column; gap: 1.1rem; }
.settings-side { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: calc(var(--header-h) + 16px); }

.settings-card { padding: 1.25rem 1.35rem; }

.settings-card-head {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin-bottom: 1rem;
    padding-bottom: .9rem;
    border-bottom: 1px solid var(--line);
}

.settings-card-head-spaced { margin-top: 1.5rem; }
.settings-card-head h2 { font-size: .98rem; }
.settings-card-head p { color: var(--muted); font-size: .77rem; margin-top: .1rem; }
.settings-card-head .pill { margin-left: auto; flex: 0 0 auto; }

.settings-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--navy-950);
    color: var(--gold);
    flex: 0 0 auto;
}

.settings-actions { display: flex; justify-content: flex-end; padding-top: 1.1rem; margin-top: 1.2rem; border-top: 1px solid var(--line); }

.test-email-row { display: flex; align-items: flex-end; gap: .8rem; flex-wrap: wrap; }
.test-email-row .field { flex: 1; min-width: 240px; }

.settings-side-card { padding: 1.1rem 1.15rem; }
.settings-side-card h3 { font-size: .87rem; margin-bottom: .75rem; }
.settings-side-card .muted-note { display: block; margin-top: .7rem; line-height: 1.5; }

.smtp-status { display: flex; gap: .65rem; padding: .75rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); }
.smtp-status strong { display: block; font-size: .82rem; }
.smtp-status p { color: var(--muted); font-size: .74rem; margin-top: .1rem; }
.smtp-status-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: #eef1f6; color: var(--muted); flex: 0 0 auto; }
.smtp-status.is-ready { background: var(--success-bg); border-color: #bfe7d8; }
.smtp-status.is-ready .smtp-status-icon { background: #fff; color: var(--success); }
.smtp-status.is-off { background: var(--warning-bg); border-color: #f2ddac; }
.smtp-status.is-off .smtp-status-icon { background: #fff; color: var(--warning); }

.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.check-list li { display: flex; align-items: flex-start; gap: .45rem; font-size: .77rem; color: var(--muted); }
.check-list li .icon { color: var(--success); margin-top: .12rem; }

/* --------------------------------------------------------------------------
   Auth screens
   -------------------------------------------------------------------------- */

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    min-height: 100vh;
    background: #fff;
}

.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 52px;
    background:
        radial-gradient(120% 100% at 0% 0%, rgba(11, 77, 187, .55), transparent 55%),
        radial-gradient(90% 80% at 100% 100%, rgba(224, 18, 106, .3), transparent 52%),
        linear-gradient(145deg, #061832, #071c3d 46%, #0a2650);
    color: #fff;
    overflow: hidden;
}

.auth-brand-top { display: flex; align-items: center; gap: .75rem; position: relative; z-index: 2; }

.auth-brand-copy { position: relative; z-index: 2; max-width: 560px; padding: 40px 0; }
.auth-brand-copy h1 { color: #fff; font-size: clamp(2.1rem, 3.4vw, 3.1rem); line-height: 1.12; letter-spacing: -.03em; margin: .9rem 0 .8rem; }
.auth-brand-copy > p { color: rgba(255, 255, 255, .72); font-size: 1rem; max-width: 460px; }

.auth-brand .eyebrow { color: var(--gold); }

.auth-points { list-style: none; margin: 2rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.auth-points li { display: flex; gap: .8rem; align-items: flex-start; }
.ap-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    color: var(--gold);
    flex: 0 0 auto;
}
.auth-points strong { display: block; font-size: .86rem; color: #fff; }
.auth-points small { color: rgba(255, 255, 255, .6); font-size: .78rem; }

.auth-brand-foot {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: .3rem;
    flex-wrap: wrap;
    color: rgba(255, 255, 255, .5);
    font-size: .76rem;
}

.auth-brand-foot a { color: rgba(255, 255, 255, .72); }
.auth-brand-foot a:hover { color: var(--gold); }

.auth-watermark {
    position: absolute;
    right: -40px;
    bottom: -90px;
    font-size: 340px;
    font-weight: 900;
    letter-spacing: -.08em;
    color: rgba(255, 255, 255, .035);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.auth-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
}

.auth-glow-1 { width: 340px; height: 340px; top: -110px; left: -90px; background: rgba(11, 77, 187, .5); }
.auth-glow-2 { width: 300px; height: 300px; bottom: -80px; right: -60px; background: rgba(224, 18, 106, .32); }

.auth-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    padding: 38px 32px;
    background:
        radial-gradient(80% 60% at 100% 0%, rgba(11, 77, 187, .05), transparent 60%),
        #fbfcff;
}

.auth-mobile-brand { display: none; }

.auth-card {
    width: min(470px, 100%);
    padding: 1.7rem 1.7rem 1.5rem;
    border-radius: var(--radius-xl);
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
}

.auth-card-narrow { width: min(430px, 100%); }

.auth-card-head { margin-bottom: 1.2rem; }
.auth-card-head h2 { font-size: 1.42rem; margin-top: .55rem; }
.auth-card-head p { color: var(--muted); font-size: .86rem; margin-top: .35rem; }
.auth-card-head-center { text-align: center; display: flex; flex-direction: column; align-items: center; }

.auth-card-icon {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: var(--navy-950);
    color: var(--gold);
    margin-bottom: .3rem;
}

.auth-card-icon-lg { width: 56px; height: 56px; border-radius: 16px; }

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .25rem;
    padding: .25rem;
    margin-bottom: 1.2rem;
    border-radius: 11px;
    background: var(--bg-accent);
}

.auth-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .5rem;
    border-radius: 8px;
    color: var(--muted);
    font-size: .83rem;
    font-weight: 700;
}

.auth-tab:hover { color: var(--ink); }
.auth-tab.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-xs); }

.auth-form { display: flex; flex-direction: column; gap: .85rem; }
.auth-form .field > .input-group input { padding: .62rem .78rem; }
.auth-note { display: flex; align-items: center; gap: .35rem; justify-content: center; color: var(--muted); font-size: .73rem; text-align: center; }

.auth-divider { display: flex; align-items: center; gap: .7rem; color: var(--muted-2); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.auth-divider::before,
.auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.auth-legal { color: var(--muted); font-size: .74rem; text-align: center; }
.auth-legal a { font-weight: 650; }

.auth-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    min-height: 100vh;
    padding: 36px 22px;
    background:
        radial-gradient(70% 50% at 50% 0%, rgba(11, 77, 187, .22), transparent 60%),
        radial-gradient(60% 50% at 100% 100%, rgba(224, 18, 106, .16), transparent 60%),
        var(--navy-950);
}

.auth-center-brand { display: flex; align-items: center; gap: .7rem; }
.auth-center-brand .brand-text strong { color: #fff; }
.auth-center-brand .brand-text small { color: rgba(255, 255, 255, .55); }

.auth-center .auth-card { box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.auth-back { text-align: center; margin-top: 1rem; }
.auth-back a { display: inline-flex; align-items: center; gap: .3rem; }

.error-card { text-align: center; }
.error-code {
    font-size: 3.4rem;
    font-weight: 900;
    letter-spacing: -.05em;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}
.error-card h2 { margin: .5rem 0 .4rem; }
.error-card p { color: var(--muted); font-size: .88rem; margin-bottom: 1.2rem; }

/* OTP */

.dev-otp {
    margin-bottom: 1rem;
    padding: .85rem .95rem;
    border-radius: 11px;
    border: 1px dashed #e0b85a;
    background: var(--warning-bg);
}

.dev-otp-head { display: flex; align-items: center; gap: .4rem; color: #7a5200; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.dev-otp p { color: #7a5b22; font-size: .76rem; margin-top: .3rem; }
.dev-otp-code { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .55rem; padding: .45rem .6rem; border-radius: 8px; background: #fff; border: 1px solid #f0d9a3; }
.dev-otp-code span { font-family: var(--mono); font-size: 1.35rem; font-weight: 800; letter-spacing: .35em; color: var(--ink); }

.otp-form { display: flex; flex-direction: column; gap: .9rem; }
.otp-inputs { display: flex; gap: .45rem; justify-content: center; }
.otp-digit {
    width: 48px;
    height: 56px;
    padding: 0;
    border: 1.5px solid var(--line-strong);
    border-radius: 11px;
    background: #fff;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 750;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.otp-digit:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(11, 77, 187, .12); }
.otp-digit.is-filled { border-color: var(--navy-950); background: #f7faff; }
.otp-error { text-align: center; }

.otp-resend { display: flex; align-items: center; justify-content: center; gap: .4rem; flex-wrap: wrap; margin-top: 1rem; }
.otp-security { display: flex; align-items: flex-start; gap: .5rem; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .73rem; }
.otp-security .icon { color: var(--brand-blue); margin-top: .1rem; }

/* Installer */

.install-center { align-items: stretch; }
.install-center > * { width: min(860px, 100%); margin: 0 auto; }
.install-center .auth-center-brand { display: flex; justify-content: center; }
.install-card { padding: 1.8rem 2rem 2rem; }
.install-head { text-align: center; margin-bottom: 1.5rem; }
.install-head h1 { font-size: 1.55rem; margin-top: .55rem; }
.install-head p { color: var(--muted); font-size: .87rem; max-width: 560px; margin: .35rem auto 0; }

.install-form { display: flex; flex-direction: column; gap: 1.2rem; }
.install-section { padding: 1.15rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.install-section-head { display: flex; gap: .75rem; margin-bottom: .95rem; }
.install-section-head h3 { font-size: .93rem; }
.install-section-head p { color: var(--muted); font-size: .76rem; margin-top: .1rem; }

.install-step {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--navy-950);
    color: var(--gold);
    font-size: .78rem;
    font-weight: 800;
    flex: 0 0 auto;
}

.install-step-optional { background: var(--gold-soft); color: #8a5c00; }
.optional-chip { display: inline-block; margin-left: .3rem; padding: .1rem .4rem; border-radius: 5px; background: #eef1f6; color: var(--muted); font-size: .6rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.install-note { display: flex; gap: .5rem; margin-top: .9rem; padding: .7rem .8rem; border-radius: 8px; background: var(--info-bg); color: var(--info); font-size: .76rem; }
.install-note .icon { margin-top: .08rem; }
.install-foot { color: var(--muted); font-size: .72rem; text-align: center; line-height: 1.6; }

/* --------------------------------------------------------------------------
   Print layout
   -------------------------------------------------------------------------- */

.print-page {
    padding: 24px 16px 48px;
}

.print-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: min(210mm, 100%);
    margin: 0 auto 16px;
    padding: .6rem .75rem .6rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow-md);
}

.print-toolbar-copy strong { display: block; font-size: .84rem; font-family: var(--mono); }
.print-toolbar-copy span { color: var(--muted); font-size: .74rem; }
.print-toolbar-actions { display: flex; gap: .45rem; }

.print-sheet {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    padding: 12mm 13mm 14mm;
    background: #fff;
    color: #0b1a2e;
    box-shadow: 0 20px 60px rgba(7, 28, 61, .18);
    font-size: 9.4pt;
    line-height: 1.38;
}

.p-head {
    display: grid;
    grid-template-columns: 1fr auto 28mm;
    align-items: center;
    gap: 6mm;
    padding-bottom: 3mm;
    border-bottom: 2px solid var(--navy-950);
}

.p-brand { display: flex; align-items: center; gap: 3mm; }
.p-brand strong { display: block; font-size: 10.5pt; letter-spacing: .04em; color: var(--navy-950); }
.p-brand span { display: block; font-size: 7.4pt; color: #5c6b82; letter-spacing: .03em; text-transform: uppercase; }

.p-title { text-align: center; }
.p-title h1 { font-size: 14.5pt; letter-spacing: .03em; color: var(--navy-950); text-transform: uppercase; }
.p-title p { font-size: 7.4pt; color: #5c6b82; margin-top: 1mm; letter-spacing: .06em; text-transform: uppercase; }

.p-photo {
    width: 28mm;
    height: 34mm;
    border: 1px solid #b9c3d3;
    border-radius: 1.5mm;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: #f6f8fc;
    color: #93a0b4;
    font-size: 7pt;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.p-photo img { width: 100%; height: 100%; object-fit: cover; }

.p-meta-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 2.5mm 0 0;
    border: 1px solid #ccd5e2;
    border-radius: 1.5mm;
    overflow: hidden;
}

.p-meta-bar > div { padding: 1.6mm 2.5mm; border-right: 1px solid #dde4ee; }
.p-meta-bar > div:last-child { border-right: 0; }
.p-meta-bar span { display: block; font-size: 6.5pt; text-transform: uppercase; letter-spacing: .06em; color: #6b7a93; font-weight: 700; }
.p-meta-bar strong { display: block; font-size: 8.6pt; color: #0b1a2e; }

.p-section { margin-top: 3.4mm; break-inside: avoid; }
.p-section h2 {
    display: flex;
    align-items: center;
    gap: 2mm;
    margin: 0 0 1.8mm;
    padding: 1.2mm 2.4mm;
    background: linear-gradient(90deg, #eef3fb, #f8fafd);
    border-left: 2.6mm solid var(--navy-950);
    border-radius: .8mm;
    font-size: 9.6pt;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--navy-950);
}

.p-section h2 span {
    display: inline-grid;
    place-items: center;
    min-width: 5.5mm;
    height: 5.5mm;
    padding: 0 1mm;
    border-radius: .8mm;
    background: var(--navy-950);
    color: var(--gold);
    font-size: 7.4pt;
    letter-spacing: 0;
}

.p-grid { display: grid; gap: 1.6mm 3mm; }
.p-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.p-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p-span-all { grid-column: 1 / -1; }

.p-field { min-width: 0; padding-bottom: 1.1mm; border-bottom: .3mm dotted #c8d1de; }
.p-label { display: block; font-size: 6.4pt; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #6b7a93; }
.p-value { display: block; font-size: 8.7pt; font-weight: 600; color: #0b1a2e; word-break: break-word; white-space: pre-wrap; }
.p-value.p-empty { color: #a8b3c4; font-weight: 400; }

.p-table { width: 100%; border-collapse: collapse; font-size: 7.9pt; }
.p-table th {
    padding: 1.3mm 1.8mm;
    background: #eef3fb;
    border: .3mm solid #ccd5e2;
    text-align: left;
    font-size: 6.6pt;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #52637d;
}

.p-table td { padding: 1.3mm 1.8mm; border: .3mm solid #d8e0eb; vertical-align: top; }
.p-table tbody tr:nth-child(even) td { background: #fbfcfe; }
.p-hint { display: block; color: #7b8aa0; font-size: 6.4pt; }
.p-center { text-align: center; }
.p-table-check td { vertical-align: middle; }

.p-check {
    display: inline-block;
    width: 3.2mm;
    height: 3.2mm;
    border: .35mm solid #7b8aa0;
    border-radius: .5mm;
    vertical-align: -0.6mm;
    margin-right: 1.2mm;
    position: relative;
    background: #fff;
}

.p-check.is-checked { background: var(--navy-950); border-color: var(--navy-950); }
.p-check.is-checked::after {
    content: "";
    position: absolute;
    left: 1mm;
    top: .25mm;
    width: .9mm;
    height: 1.7mm;
    border: solid #fff;
    border-width: 0 .45mm .45mm 0;
    transform: rotate(45deg);
}

.p-yn { font-size: 7.6pt; color: #3c4d66; }
.p-pending { font-size: 7.2pt; color: #9aa6b8; font-style: italic; }

.p-declaration-text { font-size: 8.4pt; line-height: 1.55; color: #2b3a52; margin-bottom: 2.5mm; }

.p-sign-row { display: grid; grid-template-columns: 1.6fr 1fr; gap: 6mm; align-items: end; }
.p-sign-box { min-height: 16mm; padding-top: 1.5mm; border-top: .3mm solid #c8d1de; }
.p-sign-box .p-label { margin-bottom: .8mm; }
.p-sign-img { max-height: 13mm; width: auto; }
.p-sign-line { display: block; height: 11mm; }
.p-sign-box small { display: block; font-size: 6.6pt; color: #7b8aa0; margin-top: 1mm; }

.p-hr { border: .35mm solid #e2cf9f; border-radius: 1.2mm; padding: 2mm 2.5mm 1mm; background: #fffdf7; }
.p-hr h2 { background: #fdf4dd; border-left-color: #b8860b; color: #6d4c00; }
.p-hr h2 span { background: #b8860b; color: #fff; }

.p-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4mm;
    margin-top: 4mm;
    padding-top: 2mm;
    border-top: .3mm solid #ccd5e2;
    font-size: 6.8pt;
    color: #7b8aa0;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1280px) {
    .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .app-main { padding: 26px 24px 60px; }
    .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .edu-groups { grid-template-columns: 1fr; }
}

@media (max-width: 1120px) {
    .app-sidebar { display: none; }
    .review-layout,
    .settings-layout { grid-template-columns: 1fr; }
    .review-side,
    .settings-side { position: static; }
    .submission-layout { grid-template-columns: 1fr; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-mobile-brand {
        display: flex;
        align-items: center;
        gap: .7rem;
    }
    .auth-main { min-height: 100vh; padding: 32px 20px; }
    .readonly-declaration { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .mobile-menu-btn { display: inline-flex; }
    .main-nav { display: none; }
    .user-meta { display: none; }
    .user-btn > .icon { display: none; }
    .header-inner { padding: 0 16px; gap: 12px; }

    .app-sidebar {
        display: block;
        position: fixed;
        top: var(--header-h);
        left: 0;
        bottom: 0;
        height: auto;
        z-index: 880;
        background: var(--bg);
        border-right: 1px solid var(--line);
        padding: 18px 16px 30px;
        transform: translateX(-102%);
        transition: transform .25s ease;
        box-shadow: var(--shadow-lg);
    }

    body.sidebar-open .app-sidebar { transform: none; }
    .sidebar-overlay { display: block; position: fixed; inset: var(--header-h) 0 0 0; background: rgba(7, 28, 61, .42); z-index: 870; opacity: 0; pointer-events: none; transition: opacity .22s ease; }
    body.sidebar-open .sidebar-overlay { opacity: 1; pointer-events: auto; }
    .sidebar-overlay[hidden] { display: none; }

    .app-main { padding: 20px 16px 60px; }
    .form-toolbar { flex-wrap: wrap; }
    .toolbar-status { flex: 1 1 100%; }
    .toolbar-actions { width: 100%; justify-content: flex-end; }
    .mobile-section-jump { display: inline-flex; align-items: center; gap: .4rem; margin-right: auto; font-size: .72rem; color: var(--muted); }
    .mobile-section-jump select { padding: .32rem .5rem; border: 1px solid var(--line-strong); border-radius: 7px; font-size: .76rem; background: #fff; }

    .readonly-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hr-use-grid { grid-template-columns: 1fr; }
    .hr-use-grid > div + div { border-left: 0; }
    .photo-card { flex-direction: column; align-items: flex-start; }
    .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-head { flex-direction: column; }
    .page-head-side { justify-content: flex-start; }
    .search-input { min-width: 200px; }
}

@media (max-width: 720px) {
    :root { --header-h: 64px; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .field-grid,
    .readonly-grid,
    .readonly-edu .readonly-grid,
    .grid-2,
    .detail-grid,
    .edu-card .field-grid { grid-template-columns: 1fr; }
    .section-head { padding: .9rem 1rem; }
    .section-body { padding: 1rem; }
    .form-section { border-radius: var(--radius); }
    .form-end { flex-direction: column; align-items: stretch; }
    .form-end-actions { justify-content: stretch; }
    .form-end-actions .btn { flex: 1; }
    .review-actions { justify-content: stretch; }
    .review-actions .btn { flex: 1 1 100%; }
    .review-card .table-wrap { margin: .8rem; }
    .review-card .field-grid { padding: 1rem .9rem 0; }
    .settings-card { padding: 1.1rem; }
    .auth-card { padding: 1.35rem 1.2rem; border-radius: var(--radius-lg); }
    .otp-inputs { gap: .32rem; }
    .otp-digit { width: 42px; height: 50px; font-size: 1.15rem; }
    .flash-stack { top: 10px; right: 10px; }
    .admin-card-head { padding: .9rem; }
    .filter-bar { width: 100%; }
    .search-input { min-width: 0; flex: 1 1 100%; }
    .select-filter { width: 100%; }
    .detail-grid { grid-template-columns: 1fr 1fr; }
    .readonly-photo { width: 78px; height: 98px; }
}

@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .otp-digit { width: 38px; height: 46px; }
    .brand-text small { display: none; }
    .auth-main { padding: 22px 14px; }
    .auth-center { padding: 24px 14px; }
    .dev-otp-code span { letter-spacing: .22em; font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

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

    html,
    body {
        background: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 9pt;
    }

    .no-print,
    .flash-stack,
    .app-header,
    .app-sidebar,
    .sidebar-overlay,
    .toast-root,
    .modal-root {
        display: none !important;
    }

    .print-page { padding: 0 !important; }
    .print-sheet {
        width: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        background: #fff !important;
    }

    .p-section { break-inside: avoid; page-break-inside: avoid; }
    .p-table { break-inside: auto; }
    .p-table tr { break-inside: avoid; page-break-inside: avoid; }
    .p-hr { break-inside: avoid; page-break-inside: avoid; }
    .p-foot { break-inside: avoid; page-break-inside: avoid; }

    .print-sheet,
    .print-sheet * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
