:root {
    --bg: #f6f6f6;
    --content-bg: #fafafa;
    --fg: #1a1a1a;
    --muted: #595959;
    --line: #e2e2e2;

    --header-green: #233f2b;
    --header-green-dark: #234a32;
    --header-bar-black: #111418;
    --header-text: #ffffff;
    --header-muted: #ffffff;
    --primary: #0a2d5e;
    --primary-hover: #0d3a78;
    --link: #1d4ed8;
    --err-bg: #fef2f2;
    --err-border: #fecaca;
    --radius: 6px;

    --font: system-ui, -apple-system, Seravek, 'Gill Sans Nova', Ubuntu, Calibri, 'DejaVu Sans', source-sans-pro, sans-serif, "Segoe UI", Roboto;
    --fs-body: 15px;
    --fs-ui: var(--fs-body);
    --fs-label: var(--fs-body);
    --fs-heading: 1.75rem;

    --app-header-h: 104px;
}

* {
    box-sizing: border-box;
}

.topLoadBar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 10000;
    overflow: hidden;
    background: rgba(10,45,94,0.12);
}

    .topLoadBar.show {
        display: block;
    }

    .topLoadBar::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 40%;
        background: var(--primary);
        animation: topLoadBarSlide 1.1s ease-in-out infinite;
    }

@keyframes topLoadBarSlide {
    0% { left: -40%; }
    100% { left: 100%; }
}

.loadToast {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

    .loadToast.show {
        display: flex;
        pointer-events: auto;
        cursor: progress;
        background: rgba(255,255,255,.5);
    }

    .loadToast .loadToastCard {
        background: #fff;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: 0 8px 24px rgba(0,0,0,.18);
        padding: 14px 22px;
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: var(--fs-body);
        font-weight: 600;
        color: var(--primary);
    }

    .loadToast .loadToastSpin {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
        border: 2.5px solid #d1d5db;
        border-top-color: var(--primary);
        border-radius: 50%;
        animation: loadToastSpin .7s linear infinite;
    }

@keyframes loadToastSpin {
    to { transform: rotate(360deg); }
}

html, body {
    height: auto;
    min-height: 100%;
    margin: 0;
}

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--fg);
    line-height: 1.55;
    font-size: var(--fs-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.previewOpen,
body.modalOpen,
html:has(body.previewOpen),
html:has(body.modalOpen) {
    height: 100%;
    overflow: hidden;
}

.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;
}

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

a {
    color: var(--link);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.btn,
.brand,
.skipLink,
.subBarItem,
.snLink,
.siteCard {
    text-decoration: none;
}

.linkBtn {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.crumbLink {
    color: var(--muted);
    font-weight: 400;
    font-size: 1rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.crumbLink:hover {
    color: var(--link);
    text-decoration: underline;
}

.appHeader {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--header-green);
}

.topBar {
    background: var(--header-green);
    color: var(--header-text);
    padding: 12px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    min-height: 64px;
}

.topBarBrand {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .topBar .brand {
        color: var(--header-text);
    }

        .topBar .brand:hover {
            text-decoration: none;
        }

.brandTitle {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

    .brandTitle .brandKicker {
        font-size: 28px;
        opacity: .9;
        font-weight: 550 !important;
    }

    .brandTitle .brandMain {
        font-size: 28px;
        font-weight: 700;
        letter-spacing: -0.01em;
    }

.welcome {
    color: var(--header-muted);
    font-size: var(--fs-body);
}

.topBarRight {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.topBarRight .subBarItem {
    font-size: var(--fs-body);
    padding: 0;
    border-bottom: none;
}

.topBarSep {
    flex: 0 0 1px;
    width: 1px;
    height: 18px;
    background: rgba(255,255,255,.35);
}

.topBarSubRow {
    display: none;
}

@media (max-width: 860px) {
    .brandTitle .brandKicker {
        font-size: var(--fs-body);
        line-height: 1.25;
        overflow-wrap: break-word;
    }
}

.topBar .navToggle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,.35);
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    display: none;
}

    .topBar .navToggle:focus {
        outline: 2px solid #fff;
    }

.subBar {
    background: var(--header-bar-black);
    color: #fff;
    padding: 0 28px;
    display: flex;
    align-items: stretch;
    gap: 4px;
    flex-wrap: wrap;
    height:40px;
}

.subBarItem {
    color: #fff;
    padding: 12px 18px;
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: var(--fs-body);
    font-weight: 500;
    border-bottom: 2px solid transparent;
}

    .subBarItem:hover {
        background: #1c2026;
        text-decoration: none;
    }

    .subBarItem.active {
        color: #1c2026;
        background: #ffffff;
    }

    .subBarItem.subBarItemEnd {
        margin-left: auto;
    }

.shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    flex: 1;
    min-height: 0;
    background: linear-gradient(to right, #f3f5f4 0 299px, var(--line) 299px 300px, var(--content-bg) 300px);
}

.sideNav {
    background: #f3f5f4;
    border-right: 1px solid var(--line);
    padding: 28px 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 0;
    align-self: start;
    position: sticky;
    top: var(--app-header-h, 104px);
    max-height: calc(100vh - var(--app-header-h, 104px));
    overflow-y: auto;
}

.snCardMobile {
    display: none;
}

.sideNavMobileOnly {
    display: none;
}

.shell:has(.sideNavMobileOnly) {
    grid-template-columns: minmax(0, 1fr);
    background: var(--content-bg);
}

.snCard {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.snCardHd {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    background: var(--header-green);
    color: #fff;
    font-size: var(--fs-body);
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,.12);
    list-style: none;
}

    .snCardHd::before {
        content: '';
        position: absolute;
        left: 5px;
        top: 50%;
        width: 8px;
        height: 1px;
        background: #d9ddd9;
        display: none;
    }

.snCardHd svg { flex-shrink: 0; }

.snDetails > summary { cursor: pointer; list-style: none; }
.snDetails > summary::-webkit-details-marker { display: none; }
.snDetails > summary::marker { content: ""; }

.snChev {
    margin-left: auto;
    font-size: 20px;
    opacity: 1;
    display: inline-block;
    transition: transform 0.15s;
}

.snDetails:not([open]) .snChev { transform: rotate(-90deg); }

.snCardBody {
    display: flex;
    flex-direction: column;
    background: #fff;
    position: relative;
    padding: 6px 0 6px 26px;
}

.snCardBody::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: #c7cec8;
}

.snLink {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px 8px 10px;
    font-size: var(--fs-body);
    color: var(--primary);
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.1s;
    border-left: 3px solid transparent;
}

.snLink::before {
    content: '';
    position: absolute;
    left: -11px;
    top: 50%;
    width: 8px;
    height: 2px;
    background: #c7cec8;
}

.snLink + .snLink {
    border-top: 0.5px solid var(--line);
}

.snLink:hover {
    background: #f0f5f2;
    text-decoration: none;
}

.snLink.active {
    background: #f0f5f2;
    font-weight: 600;
    color: var(--header-green);
    border-left-color: var(--header-green);
}

.snLink svg { flex-shrink: 0; color: var(--muted); }
.snLink .snExternal { margin-left: auto; }

button.snLink {
    width: 100%;
    background: none;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.snLink + button.snLink {
    border-top: 0.5px solid var(--line);
}

.quickPopupText {
    margin: 0;
    font-size: var(--fs-body);
    color: var(--fg);
    line-height: 1.5;
}

    .quickPopupText p { margin: 0 0 8px; }
    .quickPopupText p:last-child { margin-bottom: 0; }

.content {
    padding: 12px 24px 20px;
    width: 100%;
    max-width: 1200px;
    background: var(--content-bg);
    min-height: 0;
    display: flex;
    flex-direction: column;
    transition: padding-right 0.18s ease;
}

@media (min-width: 1400px) {
    body:has(.hw-panel:not([hidden])) .content,
    body.hw-open .content {
        padding-right: 356px;
    }
}

.wrap {
    flex: 1;
    background: var(--content-bg);
    padding: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.content-login {
    align-items: center;
}

.content-login > .formCenter {
    margin-top: auto;
    margin-bottom: auto;
}

@media (max-width: 720px) {
    .content-login > .formCenter { margin-top: 0; }
}

.formCenter {
    max-width: 480px;
    margin: 0 auto;
}

.backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.28);
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}

h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 10px;
}

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.btnRow {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

    .btnRow > .btn, .btnRow > form {
        flex: 0 0 auto;
    }

.hint {
    color: var(--muted);
    font-size: var(--fs-body);
    margin: 0 0 16px;
}
.stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: visible !important;
}

label {
    display: block;
    flex-direction: column;
    gap: 6px;
    font-size: var(--fs-body);
    color: var(--muted);
    font-weight: 500 !important;
}

input[type="text"], input[type="email"], input[type="password"],
input[type="search"], input[type="number"], input[type="date"], input:not([type]), select, textarea {
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font: inherit;
    font-size: var(--fs-body);
    background: #fff;
    color: var(--fg);
    width: 100%;
    min-width: 0;
    max-width: 100%;
    display: inline-block;
}

input[type="text"], input[type="email"], input[type="password"],
input[type="search"], input[type="number"], input[type="date"], input:not([type]), select {
    height: 40px;
    line-height: 24px;
}

@media (pointer: coarse) {
    input[type="text"], input[type="email"], input[type="password"],
    input[type="search"], input[type="number"], input[type="date"], input:not([type]), select, textarea {
        font-size: var(--fs-body);
    }
}

small {
    font-size: var(--fs-body);
}

input[readonly], input[disabled] {
    background: #f3f4f6;
    color: #4b5563;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(10,45,94,.2);
    border-color: var(--primary);
}

.btn {
    display: inline-flex;
    align-items:center;
    justify-content: center;
    gap:8px;
    padding: 7px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--primary);
    background: var(--primary);
    color: #fff;
    font-size: var(--fs-body);
    font-weight: 575 !important;
    line-height: 1.2;
    min-height: 38px;
    cursor: pointer;
    text-decoration: none;
    touch-action: manipulation;
    text-align:center;
}

    .btn:hover {
        background: var(--primary-hover);
        border-color: var(--primary-hover);
        text-decoration: none;
    }

    .btn.ghost {
        background: transparent;
        color: var(--primary);
    }

        .btn.ghost:hover {
            background: rgba(10,45,94,.06);
        }

    .btn.block {
        width: 100%;
    }

    .btn.btn-confirm {
        background: #2c4a72;
        border-color: #2c4a72;
        color: #fff;
    }

        .btn.btn-confirm:hover {
            background: #223a5c;
            border-color: #223a5c;
        }

    .modal .btn:focus {
        outline: 2px solid #fff;
        outline-offset: -4px;
        box-shadow: 0 0 0 3px rgba(10,45,94,.5);
    }

    .modal .btn.btn-confirm:focus {
        background: #1d3556;
        border-color: #1d3556;
    }

.linkBtn {
    background: none;
    border: 0;
    color: var(--link);
    cursor: pointer;
    padding: 0;
    font: inherit;
}

.right {
    text-align: right;
    white-space: nowrap;
}

.tableScroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
    scrollbar-width: thin;
    scrollbar-color: #b8c0cc #f3f4f6;
}

    .tableScroll::-webkit-scrollbar {
        height: 10px;
    }

    .tableScroll::-webkit-scrollbar-track {
        background: #f3f4f6;
        border-radius: 999px;
    }

    .tableScroll::-webkit-scrollbar-thumb {
        background: #b8c0cc;
        border-radius: 999px;
        border: 2px solid #f3f4f6;
    }

        .tableScroll::-webkit-scrollbar-thumb:hover {
            background: #98a2b3;
        }

.tbl {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

    .tbl th, .tbl td {
        padding: 10px 12px;
        text-align: left;
        border-bottom: 1px solid var(--line);
        font-size: var(--fs-body);
    }

    .tbl th {
        font-size: var(--fs-body);
        color: var(--muted);
        font-weight: 700;
        background: #ececec;
        text-transform: none;
        letter-spacing: 0;
    }

    .tbl tr:last-child td {
        border-bottom: none;
    }

.docStatusBadge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: var(--fs-body);
    font-weight: 600;
    white-space: nowrap;
}

    .docStatusBadge.completed {
        background: #d1fae5;
        color: #064e3b;
        border: 1px solid #6ee7b7;
    }

    .docStatusBadge.inprogress {
        background: #fef3c7;
        color: #78350f;
        border: 1px solid #fcd34d;
    }

    .docStatusBadge.notstarted {
        background: #f3f4f6;
        color: #4b5563;
        border: 1px solid #d1d5db;
        font-weight: 400;
    }

.muted {
    color: var(--muted);
    font-size: var(--fs-body);
}

.req {
    color: #c00;
    font-weight: bold;
    margin-left: 2px;
}

.req-legend {
    font-size: var(--fs-body);
    color: var(--muted);
    margin-bottom: 4px;
}

.field-error {
    display: block;
    font-size: var(--fs-body);
    color: #c00;
    margin-top: 2px;
    min-height: 0;
}

.field-group {
    display: flex;
    flex-direction: column;
}

    .field-group label {
        margin-bottom: 6px;
    }

.banner {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: var(--fs-body);
}

    .banner-icon {
        flex-shrink: 0;
        margin-top: 2px;
    }

    .banner-content {
        flex: 1;
        min-width: 0;
    }

    .banner-close {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 22px;
        margin: -2px -4px 0 0;
        padding: 0;
        background: transparent;
        border: none;
        border-radius: 4px;
        color: inherit;
        opacity: .6;
        cursor: pointer;
    }

        .banner-close:hover {
            opacity: 1;
            background: rgba(0, 0, 0, .06);
        }

    .banner.success {
        background: #ecfdf5;
        border: 1px solid #a7f3d0;
    }

    .banner.error {
        background: var(--err-bg);
        border: 1px solid var(--err-border);
    }

        .banner.error .banner-content p {
            margin: 8px 0 0;
            color: var(--muted);
        }

    .banner.info {
        background: #eff6ff;
        border: 1px solid #93c5fd;
        color: #1e3a5f;
    }

    .banner.warning {
        background: #fff3cd;
        border: 1px solid #ffc107;
        color: #7a5900;
    }

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
}

.modal {
    width: min(720px, 100%);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
}

.modalBackdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    z-index: 50;
}

@media (min-width: 861px) {
    .modalBackdrop.quickPopup {
        --menu-edge: calc(var(--left-gap, 0px) + 300px + 22px);
    }

    .modalBackdrop.quickPopup > .modal {
        --popup-w: min(560px, 100vw - 44px);
        margin-left: clamp(0px, calc(2 * var(--menu-edge) - 100vw + var(--popup-w)), calc(100vw - 44px - var(--popup-w)));
    }

    .modalBackdrop.quickPopup > .applauseModal {
        --popup-w: min(980px, 100vw - 44px);
    }
}

.formGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.regionField,
.facilityField {
    min-width: 260px;
}

.formGrid > .regionField,
.formGrid > .facilityField,
.formGrid > *:has(select[id$="Region"]),
.formGrid > *:has(select[id$="Facility"]) {
    grid-column: span 2;
}

.selEcho {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

    .selEcho[hidden] {
        display: none;
    }

@media (max-width: 700px) {
    .regionField,
    .facilityField {
        min-width: 0;
    }

    .formGrid > .regionField,
    .formGrid > .facilityField,
    .formGrid > *:has(select[id$="Region"]),
    .formGrid > *:has(select[id$="Facility"]) {
        grid-column: auto;
    }
}

.formGrid.emailSsnRow {
    grid-template-columns: minmax(0, 1fr) 140px;
}

    .formGrid label > input,
    .formGrid label > select,
    .formGrid label > textarea {
        margin-top: 6px;
    }

label:has(select[name="FacilityId"]) { grid-column: span 2; }
select[name="FacilityId"] { width: 100%; }

.folderGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}

@media (max-width: 1024px) {
    .shell {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .content {
        padding: 24px 22px 20px;
    }
}

@media (max-width: 860px) {
    .topBar .navToggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .topBar {
        padding: 12px 16px;
    }

    .subBar {
        display: none;
    }

    .snCardMobile {
        display: block;
    }

    .sideNavMobileOnly {
        display: flex;
    }

    .shell,
    .shell:has(.sideNavMobileOnly) {
        grid-template-columns: 1fr;
        height: auto;
        min-height:0;
    }

    .sideNav {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(280px, 86vw);
        transform: translateX(-110%);
        transition: transform 160ms ease-out;
        z-index: 40;
        height: 100%;
        max-height: none;
        overflow-y: auto;
    }

    body.navOpen .sideNav {
        transform: translateX(0);
    }

    body.navOpen .backdrop {
        display: block;
        z-index: 35;
    }

    .content {
        padding: 20px 14px 20px;
        overflow: visible;
        height: auto;
    }

    .wrap {
        padding: 0;
    }

    .topBarRight {
        flex-wrap: nowrap;
        flex-shrink: 1;
        gap: 10px;
    }

    .topBarSep,
    .topBarRight .welcome,
    .topBarRight .topVersion {
        display: none;
    }

    .topBarSubRow {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 2px 16px 8px;
        font-size: var(--fs-body);
        color: rgba(255,255,255,.85);
        background: var(--header-green);
    }

    .topBarSubVersion {
        flex: none;
        white-space: nowrap;
    }

    .topBarRight .subBarItem.subBarItemEnd {
        margin-left: 0;
    }

    .topBarRight .subBarItem[href] {
        font-size: var(--fs-body);
        padding: 4px 6px;
        border: none;
    }

    .topBar {
        row-gap: 0;
    }

    .sideNav {
        overflow: hidden;
    }

    body.navOpen .sideNav {
        overflow-y: auto;
    }

    .tbl {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .tableScroll {
        overflow: visible !important;
    }
}

@media (max-width: 600px) {
    .formGrid {
        grid-template-columns: 1fr;
    }

        .formGrid > * {
            grid-column: 1 / -1 !important;
        }

    .field-group {
        width: 100% !important;
        max-width: 100% !important;
        flex-shrink: 1 !important;
    }

    .stack > div[style*="display:flex"],
    .formGrid div[style*="display:flex"] {
        flex-wrap: wrap;
    }

    .field-group input,
    .field-group select,
    .field-group textarea {
        width: 100%;
    }

    .form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .btnRow {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .btnRow > .btn, .btnRow > form, .btnRow > form > .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

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

.previewModalBackdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,.45);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.previewModal {
    width: min(1100px, 95vw);
    height: min(85vh, 900px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0,0,0,.25);
}

.previewHeader {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #ececec;
    border-bottom: 1px solid var(--line);
}

.previewTitle {
    flex: 1;
    font-weight: 600;
    font-size: var(--fs-body);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.previewTimer {
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: var(--fs-body);
    color: var(--muted);
    min-width: 48px;
    text-align: right;
}

.previewFrame {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: none;
    flex: 1;
}

body.previewOpen {
    overflow: hidden;
}

.btn {
    min-height: 38px;
    min-width: 38px;
}

.topBar .navToggle {
    min-height: 44px;
    min-width: 44px;
}

input[type="checkbox"] {
    min-width: 24px;
    min-height: 24px;
    cursor: pointer;
}

@media (max-width: 480px) {
    .topBar {
        padding: 10px 12px;
        gap: 8px;
        min-height: auto;
    }

    .topBarSubRow {
        padding-left: 12px;
        padding-right: 12px;
    }

    .brandTitle .brandKicker {
        font-size: var(--fs-body);
    }

    .brandTitle .brandMain {
        font-size: 20px;
    }

    .content {
        padding: 16px 12px 24px;
    }

    h1 {
        font-size: 1.35rem;
    }

    .modal {
        padding: 12px;
    }

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

    .btnRow {
        flex-direction: column;
        align-items: stretch;
    }

        .btnRow > .btn,
        .btnRow > form,
        .btnRow > form > .btn {
            width: 100%;
            text-align: center;
            justify-content: center;
        }

    .folderGrid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        max-height: 240px;
    }
}

@media (max-width: 700px) {
    .previewModalBackdrop {
        padding: 0;
        align-items: flex-end;
    }

    .previewModal {
        width: 100vw;
        height: 92dvh;
        border-radius: var(--radius) var(--radius) 0 0;
    }
}

@media (max-width: 600px) {
    .modal {
        width: 100%;
        margin: 0 8px;
    }

    .welcome {
        flex: 1 1 100%;
        margin-right: 0;
    }
}

@media (max-width: 860px) {
    body {
        overflow-x: hidden;
    }

    .shell {
        background: var(--content-bg);
    }
}

:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

.subBarItem:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -3px;
}

.topBar .navToggle:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.skipLink {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #fff;
    color: var(--fg);
    padding: 12px 18px;
    border: 3px solid var(--primary);
    border-radius: var(--radius);
    z-index: 9999;
    font-weight: 600;
    font-size: var(--fs-body);
}

    .skipLink:focus {
        left: 8px;
        top: 8px;
    }

.hw-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.45);
    color: #fff;
    font-size: var(--fs-body);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
    transition: background 0.15s;
}

    .hw-btn:hover {
        background: rgba(255,255,255,.32);
    }

    .hw-btn:focus-visible {
        outline: 2px solid rgba(255,255,255,.8);
        outline-offset: 2px;
    }

.hw-panel {
    position: fixed;
    top: 136px;
    right: 28px;
    bottom: auto;
    z-index: 199;
    width: 320px;
    max-height: calc(100dvh - 160px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: hw-slidein 0.18s ease;
}

    .hw-panel[hidden] {
        display: none;
    }

@keyframes hw-slidein {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hw-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--primary);
    color: #fff;
    flex-shrink: 0;
}

.hw-title {
    font-weight: 600;
    font-size: var(--fs-body);
}

.hw-close {
    background: none;
    border: none;
    color: #fff;
    font-size: var(--fs-body);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: var(--radius);
    line-height: 1;
    opacity: 0.8;
}

    .hw-close:hover {
        opacity: 1;
        background: rgba(255,255,255,.15);
    }

.hw-body {
    overflow-y: auto;
    padding: 12px;
    flex: 1;
    scrollbar-width: thin;
}

.hw-topic {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 8px;
    background: #fafafa;
    overflow: hidden;
}

    .hw-topic[open] {
        background: #fff;
    }

.hw-q {
    padding: 10px 14px;
    cursor: pointer;
    font-size: var(--fs-body);
    font-weight: 500;
    color: var(--fg);
    list-style: none;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .hw-q::-webkit-details-marker {
        display: none;
    }

    .hw-q::before {
        content: '›';
        font-size: var(--fs-body);
        color: var(--primary);
        transition: transform 0.15s;
        display: inline-block;
        flex-shrink: 0;
    }

.hw-topic[open] > .hw-q::before {
    transform: rotate(90deg);
}

.hw-q:hover {
    background: #f0f4f2;
}

.hw-a {
    padding: 8px 14px 12px 36px;
    font-size: var(--fs-body);
    color: var(--muted);
    line-height: 1.55;
    border-top: 1px solid var(--line);
}

.hw-empty {
    font-size: var(--fs-body);
    color: var(--muted);
    padding: 8px 4px;
    margin: 0;
}

@media (max-width: 1399px) {
    body:has(.hw-panel:not([hidden]))::before,
    body.hw-open::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.4);
        z-index: 198;
    }

    .hw-panel {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 75dvh;
        border: 0;
        border-top: 1px solid var(--line);
        border-radius: 14px 14px 0 0;
        box-shadow: 0 -8px 32px rgba(0,0,0,.25);
        animation: hw-sheetup 0.2s ease;
    }

        .hw-panel::before {
            content: '';
            display: block;
            width: 36px;
            height: 4px;
            border-radius: 2px;
            background: rgba(0,0,0,.25);
            margin: 8px auto 6px;
            flex-shrink: 0;
        }
}

@keyframes hw-sheetup {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@media (forced-colors: active) {
    .btn {
        border: 2px solid ButtonText;
    }
}

.auth-wide-card {
    display: flex;
    border-radius: 14px;
    overflow: hidden;
    border: 0.5px solid #dde3eb;
    background: #fff;
    min-height: 380px;
}

.auth-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

@media (max-width: 720px) {
    .auth-wide-card { flex-direction: column; min-height: 0; }
    .auth-form-panel { padding: 24px 20px; }
}

.acct-layout {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 860px;
}

.form-card {
    padding: 0;
    overflow: hidden;
    height: fit-content;
}

.form-card-hd {
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
}

.form-card-title {
    font-size: var(--fs-body);
    font-weight: 600;
    color: var(--fg);
}

.form-card-sub {
    font-size: var(--fs-body);
    color: var(--muted);
}

.form-card-body {
    padding: 18px 20px 20px;
}

.form-footer {
    border-top: 1px solid var(--line);
    padding-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.si-card {
    background: #fff;
    border: 0.5px solid #dde3eb;
    border-radius: 14px;
    overflow: hidden;
}

.si-title {
    font-size: 1.25rem;
    font-weight: 700;
    padding: 22px 28px 18px;
    color: var(--fg);
    position: relative;
}
.si-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 2%;
    right: 2%;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, #9ca3af 15%, #9ca3af 85%, transparent 100%);
}

.si-body { display: flex; }

.si-col {
    padding: 24px 20px 32px;
    flex: 0 0 55%;
    min-width: 0;
}

.si-sep {
    width: 3px;
    flex-shrink: 0;
    margin: 0 6px;
    background: linear-gradient(to bottom, transparent 0%, #9ca3af 30%, #9ca3af 70%, transparent 100%);
}

.si-col-right {
    flex: 1;
    padding: 24px 28px 32px;
}

.si-col-hd {
    font-size: var(--fs-body);
    font-weight: 700;
    color: var(--fg);
    margin: 0 0 18px;
}

.si-col-right p {
    font-size: var(--fs-body);
    color: var(--muted);
    line-height: 1.55;
    margin: 0 0 16px;
}

.si-contact {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.si-contact-hd {
    display: block;
    font-size: var(--fs-body);
    font-weight: 700;
    color: var(--fg);
    margin: 0 0 10px;
}

.si-col-right p.si-contact-note {
    margin: 10px 0 0;
    font-size: var(--fs-body);
}

.si-fieldHelpRow {
    margin-top: 4px;
    text-align: right;
}

.si-fieldHelp {
    font-size: var(--fs-body);
    white-space: nowrap;
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (max-width: 600px) {
    .si-col-right .btn {
        display: flex;
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .btnRow > a {
        text-align: center;
    }
}

@media (max-width: 620px) {
    .si-body { flex-direction: column; }
    .si-sep { width: auto; height: 3px; margin: 6px 0; background: linear-gradient(to right, transparent 0%, #9ca3af 30%, #9ca3af 70%, transparent 100%); }
    .si-col-right { flex: none; }
}

.fp-card {
    background: #fff;
    border: 0.5px solid #dde3eb;
    border-radius: 14px;
}

.fp-form-card { padding: 32px 32px 28px; }

.fp-icon {
    width: 48px;
    height: 48px;
    background: rgba(10,45,94,0.07);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.fp-heading {
    font-size: 1.25rem;
    margin: 0 0 6px;
}

.fp-intro {
    font-size: var(--fs-body);
    color: var(--muted);
    margin: 0 0 20px;
    line-height: 1.55;
}

.fp-back { margin: 4px 0 0; }

.cp-form-hd {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 12px;
}

.cp-form-body { padding: 18px 20px 20px; }

.cp-hd-icon {
    width: 36px;
    height: 36px;
    background: rgba(10,45,94,0.07);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

@media (min-width: 1100px) {
    :root { --left-gap: 200px; }

    .topBar { padding-left: calc(var(--left-gap) + 28px); }
    .subBar { padding-left: var(--left-gap); }
    .shell { margin-left: var(--left-gap); }
}

@media (pointer: coarse) {
    .btn,
    .snLink,
    .subBarItem {
        min-height: 44px;
    }

    .btn {
        padding-top: 10px;
        padding-bottom: 10px;
    }
}

@media (pointer: coarse) {
    input[type="checkbox"]:not([hidden]) {
        min-width: 24px;
        min-height: 24px;
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 860px) {
.tbl.asCards,
    .tbl.asCards thead,
    .tbl.asCards tbody,
    .tbl.asCards tr,
    .tbl.asCards td,
    .tbl.asCards th {
        display: block;
        width: 100%;
        white-space: normal;
    }

        .tbl.asCards thead {
            display: none;
        }

        .tbl.asCards tr {
            background: #fff;
            border: 1px solid var(--line);
            border-radius: var(--radius);
            margin-bottom: 10px;
            padding: 10px 12px;
            box-shadow: 0 1px 2px rgba(0,0,0,.04);
        }

        .tbl.asCards td {
            padding: 6px 0;
            border: none;
            display: grid;
            grid-template-columns: 42% 1fr;
            gap: 8px;
            align-items: start;
            font-size: var(--fs-body);
            overflow-wrap: anywhere;
        }

            .tbl.asCards td::before {
                content: attr(data-label);
                color: var(--muted);
                font-size: var(--fs-body);
                font-weight: 600;
                letter-spacing: .02em;
            }

            .tbl.asCards td[data-label=""]::before,
            .tbl.asCards td.cardCheck::before {
                content: none;
            }

            .tbl.asCards td.cardCheck {
                display: flex;
                justify-content: flex-end;
                padding-bottom: 8px;
                border-bottom: 1px dashed var(--line);
                margin-bottom: 6px;
            }

            .tbl.asCards tr {
                position: relative;
            }

            .tbl.asCards td.cardIcon {
                position: absolute;
                top: 12px;
                right: 12px;
                width: auto;
                padding: 0;
                display: block;
                line-height: 0;
            }

            .tbl.asCards td.cardIcon + td {
                padding-right: 28px;
            }

    .tableScroll:has(.tbl.asCards),
    .employeeResults:has(.tbl.asCards) {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .employeeResults:has(.tbl.asCards) .tbl {
        width: 100%;
        min-width: 0;
    }
}

@media (max-height: 600px) {
    .appHeader {
        position: static;
    }

    .previewModalBackdrop {
        padding: 8px;
    }

    .previewModal {
        height: calc(100dvh - 16px);
    }
}

.siteFooter {
    flex: none;
    background: #e8ebe9;
    border-top: 1px solid #ccd3ce;
    color: #4a4a4a;
    padding: 16px 0 0;
}

.siteFooterInner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 48px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 16px;
}

.footerCol {
    flex: 0 1 auto;
    min-width: 150px;
}

.footerHd {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
    color: #222222;
}

.footerList {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footerSocial {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
}

.footerList a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 26px;
    font-size: 16px;
    line-height: 1.6;
    color: #1c5b8c;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.siteFooterBar {
    max-width: 1000px;
    margin: 12px auto 16px;
    padding: 0 16px;
    font-size: 0.8rem;
    text-align: center;
    color: #4f4f4f;
}

@media (max-width: 860px) {
    .siteFooter {
        padding: 14px 0 0;
    }

    .siteFooterBar {
        margin-bottom: 14px;
    }

        .siteFooterInner {
            justify-content: flex-start;
            gap: 14px 32px;
        }

        .footerList a {
            min-height: 32px;
        }
    }
