.grecaptcha-badge {
    visibility: hidden;
}

/* ===== OVERVIEW ===== */
:root {
    --navy: #2B5B9B;
    --navy-deep: #0A1526;
    --navy-side: #0F1B33;
    --blue: #2B5B9B;
    --gold: #C8A559;
    --gold-line: #C2AB45;
    --purple: #7A5FB0;
    --orange: #DB7600;
    --red: #C13737;
    --ink: #1A2233;
    --gray-500: #536176;
    --gray-400: #5C6A7F;
    --gray-300: #CBD5E1;
    --gray-200: #E2E8F0;
    --gray-100: #EEF2F7;
    --page-bg: #F2F5FA;
    --white: #FFFFFF;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background: var(--page-bg);
    color: var(--ink);
}

/* ---------- SUBSCRIPTION MANAGEMENT ---------- */
.subscription-management-brand {
    color: inherit;
    text-decoration: none;
}

.subscription-management-brand img {
    display: block;
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.subscription-management-brand .tb-t1,
.subscription-management-brand .tb-t2 {
    display: block;
}

.public-application-main {
    width: min(1100px, calc(100% - 40px));
    margin: 0 auto;
    padding: 30px 0 64px;
}

.public-application-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 24px;
    padding: 26px 28px;
    color: var(--white);
    background: var(--navy);
    border-bottom: 4px solid var(--gold);
    border-radius: 12px;
}

.public-application-header .subscription-management-eyebrow {
    color: rgba(255, 255, 255, .75);
}

.public-application-header h1 {
    margin-bottom: 6px;
    font-family: var(--font-serif);
    font-size: clamp(28px, 4vw, 40px);
}

.public-application-header p {
    color: rgba(255, 255, 255, .85);
    font-size: 14px;
}

.public-application-header dl {
    display: flex;
    gap: 10px;
}

.public-application-header dl > div {
    min-width: 160px;
    padding: 10px 12px;
    color: var(--ink);
    background: #eaf1fa;
    border-radius: 6px;
}

.public-application-header dt,
.public-detail-grid dt,
.public-detail-card dt {
    margin-bottom: 3px;
    color: var(--gray-500);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.public-application-header dd {
    font-size: 13px;
    font-weight: 700;
}

.public-detail-section {
    margin-top: 16px;
    overflow: hidden;
    background: var(--white);
    border: 1px solid #d7e0ea;
    border-radius: 10px;
    box-shadow: 0 5px 16px rgba(23, 54, 93, .05);
}

.public-detail-section > h2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    color: var(--white);
    background: var(--navy);
    font-size: 16px;
}

.public-detail-section > h2 span {
    min-width: 28px;
    padding: 3px 8px;
    color: var(--navy);
    background: var(--white);
    border-radius: 999px;
    font-size: 12px;
    text-align: center;
}

.public-detail-grid,
.public-detail-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 16px;
}

.public-detail-grid > div,
.public-detail-card {
    padding: 13px 14px;
    background: #f8fafc;
    border: 1px solid var(--gray-200);
    border-radius: 7px;
}

.public-detail-grid dd,
.public-detail-card dd {
    color: var(--ink);
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.public-detail-card {
    display: grid;
    gap: 11px;
    margin: 0;
}

.public-detail-list {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.public-detail-list article {
    position: relative;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid var(--gray-200);
    border-radius: 7px;
}

.public-detail-list article > strong {
    color: #17365d;
    font-size: 14px;
}

.public-detail-list time,
.public-detail-list article > span {
    float: right;
    color: var(--gray-500);
    font-size: 12px;
}

.public-detail-list p {
    margin-top: 8px;
    color: var(--gray-500);
    font-size: 13px;
    line-height: 1.55;
}

.public-detail-list a {
    display: inline-block;
    margin-top: 9px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
}

.public-detail-section > .application-details-empty {
    padding: 18px;
}

@media (max-width: 720px) {
    .public-application-main {
        width: min(100% - 28px, 1100px);
        padding-top: 22px;
    }

    .public-application-header {
        align-items: stretch;
        flex-direction: column;
    }

    .public-application-header dl,
    .public-detail-grid,
    .public-detail-cards {
        grid-template-columns: 1fr;
    }

    .public-application-header dl {
        display: grid;
    }
}

.subscription-management-main {
    width: min(1040px, calc(100% - 40px));
    margin: 0 auto;
    padding: 30px 0 64px;
}

.subscription-management-breadcrumb {
    display: flex;
    gap: 9px;
    margin-bottom: 26px;
    color: var(--gray-500);
    font-size: 13px;
    font-weight: 600;
}

.subscription-management-breadcrumb a {
    color: var(--blue);
    text-decoration: none;
}

.subscription-management-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 28px;
}

.subscription-management-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.subscription-management-heading h1 {
    margin: 0 0 8px;
    color: #17365d;
    font-family: var(--font-serif);
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.12;
}

.subscription-management-heading p {
    color: var(--gray-500);
    font-size: 15px;
    line-height: 1.6;
}

.subscription-management-heading p strong {
    color: var(--ink);
}

.subscription-management-total {
    min-width: 160px;
    padding: 16px 18px;
    background: #eaf2fb;
    border: 1px solid #c9dcef;
    border-radius: 10px;
}

.subscription-management-total strong,
.subscription-management-total span {
    display: block;
}

.subscription-management-total strong {
    color: #17365d;
    font-size: 25px;
    line-height: 1;
}

.subscription-management-total span {
    margin-top: 6px;
    color: #49647f;
    font-size: 12px;
    font-weight: 700;
}

.subscription-management-groups {
    display: grid;
    gap: 18px;
}

.subscription-management-alert {
    margin-bottom: 20px;
    padding: 12px 15px;
    border: 1px solid;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
}

.subscription-management-alert-success {
    color: #17643a;
    background: #edf9f2;
    border-color: #b9dfc9;
}

.subscription-management-alert-error {
    color: #8d2929;
    background: #fff2f2;
    border-color: #efc2c2;
}

.subscription-management-toolbar {
    display: flex;
    justify-content: flex-end;
    margin: -10px 0 14px;
}

.subscription-management-unsubscribe-all,
.subscription-management-unsubscribe {
    color: #a52e2e;
    background: var(--white);
    border: 1px solid #d9a7a7;
    border-radius: 7px;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
}

.subscription-management-unsubscribe-all {
    padding: 9px 13px;
}

.subscription-management-unsubscribe {
    padding: 8px 11px;
}

.subscription-management-unsubscribe-all:hover,
.subscription-management-unsubscribe:hover {
    color: #7f1f1f;
    background: #fff5f5;
    border-color: #c87979;
}

.subscription-management-unsubscribe-all:focus-visible,
.subscription-management-unsubscribe:focus-visible {
    outline: 3px solid rgba(43, 91, 155, .28);
    outline-offset: 2px;
}

.subscription-management-group {
    overflow: hidden;
    background: var(--white);
    border: 1px solid #d7e0ea;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(23, 54, 93, .06);
}

.subscription-management-group > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
    background: #f8fafc;
    border-bottom: 1px solid var(--gray-200);
}

.subscription-management-group h2 {
    margin: 0 0 4px;
    color: #17365d;
    font-size: 18px;
}

.subscription-management-group header p {
    color: var(--gray-500);
    font-size: 13px;
}

.subscription-management-group header > span {
    min-width: 30px;
    padding: 5px 9px;
    color: #17365d;
    background: #eaf2fb;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.subscription-management-group ul {
    list-style: none;
}

.subscription-management-group li {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    padding: 17px 22px;
}

.subscription-management-group li + li {
    border-top: 1px solid var(--gray-100);
}

.subscription-management-item-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: var(--blue);
    background: #eaf2fb;
    border-radius: 9px;
}

.subscription-management-item-icon svg {
    width: 17px;
    height: 17px;
}

.subscription-management-item-copy strong,
.subscription-management-item-copy span {
    display: block;
}

.subscription-management-item-copy strong {
    color: var(--ink);
    font-size: 15px;
}

.subscription-management-item-copy span,
.subscription-management-group time {
    margin-top: 4px;
    color: var(--gray-500);
    font-size: 12px;
    line-height: 1.45;
}

.subscription-management-group time {
    margin-top: 0;
    white-space: nowrap;
}

.subscription-management-state {
    max-width: 620px;
    margin: 58px auto 0;
    padding: 42px;
    background: var(--white);
    border: 1px solid #d7e0ea;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(23, 54, 93, .07);
    text-align: center;
}

.subscription-management-state-icon {
    display: grid;
    width: 52px;
    height: 52px;
    margin: 0 auto 18px;
    place-items: center;
    color: #17365d;
    background: #eaf2fb;
    border-radius: 50%;
    font-size: 21px;
    font-weight: 800;
}

.subscription-management-state h1,
.subscription-management-state h2 {
    margin-bottom: 10px;
    color: #17365d;
    font-family: var(--font-serif);
    font-size: 28px;
}

.subscription-management-state p {
    color: var(--gray-500);
    font-size: 14px;
    line-height: 1.65;
}

.subscription-management-button {
    display: inline-flex;
    margin-top: 22px;
    padding: 11px 17px;
    color: var(--white);
    background: var(--blue);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.subscription-access-card {
    max-width: 620px;
    margin: 42px auto 0;
    padding: 38px 40px;
    background: var(--white);
    border: 1px solid #d7e0ea;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(23, 54, 93, .07);
}

.subscription-access-card h1 {
    margin: 0 0 10px;
    color: #17365d;
    font-family: var(--font-serif);
    font-size: 32px;
}

.subscription-access-card > p {
    color: var(--gray-500);
    font-size: 14px;
    line-height: 1.65;
}

.subscription-access-form {
    display: grid;
    gap: 8px;
    margin-top: 24px;
}

.subscription-access-form label {
    font-size: 13px;
    font-weight: 700;
}

.subscription-access-form input {
    width: 100%;
    padding: 11px 12px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 7px;
    font: inherit;
}

.subscription-access-form input:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.subscription-access-form .subscription-management-button {
    justify-self: start;
    margin-top: 10px;
    border: 0;
    cursor: pointer;
}

.subscription-access-error {
    min-height: 18px;
    color: #8a1c26;
    font-size: 12px;
}

.subscription-access-success {
    margin-left: 0;
    color: #17643a;
    background: #d9f2e3;
}

.subscription-confirmation-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
    padding: 26px 28px;
    background: #edf9f2;
    border: 1px solid #b9dfc9;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(23, 54, 93, .06);
}

.subscription-confirmation-icon {
    display: grid;
    width: 52px;
    height: 52px;
    color: #17643a;
    background: #d9f2e3;
    border-radius: 50%;
    place-items: center;
}

.subscription-confirmation-icon svg {
    width: 27px;
    height: 27px;
}

.subscription-confirmation-copy h1 {
    margin: 0 0 7px;
    color: #17365d;
    font-family: var(--font-serif);
    font-size: clamp(28px, 4vw, 38px);
}

.subscription-confirmation-copy p,
.subscription-confirmation-summary p {
    color: var(--gray-500);
    font-size: 14px;
    line-height: 1.6;
}

.subscription-confirmation-copy p strong {
    color: var(--ink);
}

.subscription-confirmation-manage {
    margin-top: 0;
    white-space: nowrap;
}

.subscription-confirmation-summary {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.subscription-confirmation-summary h2 {
    margin-bottom: 5px;
    color: #17365d;
    font-size: 22px;
}

.subscription-confirmation-page .subscription-management-group li {
    grid-template-columns: 38px minmax(0, 1fr) auto;
}

@media (max-width: 640px) {
    .subscription-management-main {
        width: min(100% - 28px, 1040px);
        padding-top: 22px;
    }

    .subscription-management-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .subscription-management-total {
        min-width: 0;
    }

    .subscription-management-group li {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .subscription-management-group time,
    .subscription-management-group li form {
        grid-column: 2;
    }

    .subscription-management-group li form {
        justify-self: start;
    }

    .subscription-management-state {
        margin-top: 28px;
        padding: 32px 22px;
    }

    .subscription-access-card {
        margin-top: 28px;
        padding: 30px 22px;
    }

    .subscription-confirmation-hero {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 22px;
    }

    .subscription-confirmation-manage {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .subscription-confirmation-summary {
        align-items: stretch;
        flex-direction: column;
    }

    .subscription-confirmation-page .subscription-management-group time {
        grid-column: 2;
    }
}

.shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---------- TOP BAR ---------- */
.topbar {
    height: 60px;
    background: var(--navy-deep);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px 0 20px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(200,165,89,0.18);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-seal {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #24365E, #0F1B33);
    border: 1.5px solid rgba(200,165,89,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 15px;
    font-weight: 800;
}

.topbar-brand .tb-t1 {
    color: #fff;
    font-size: 16.5px;
    font-weight: 800;
    line-height: 1.2;
}

.topbar-brand .tb-t2 {
    color: #8A94AF;
    font-size: 12.5px;
    font-weight: 600;
    margin-top: 1px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #A8B0CC;
    background: rgba(255,255,255,0.05);
    position: relative;
    cursor: pointer;
}

    .topbar-icon svg {
        width: 15px;
        height: 15px;
    }

.topbar-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
    border: 2px solid var(--navy-deep);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-left: 12px;
    border-left: 1px solid rgba(255,255,255,0.12);
}

.topbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}

.topbar-user .n {
    color: #fff;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.2;
}

.topbar-user .r {
    color: #8A94AF;
    font-size: 12.5px;
}

/* ---------- BODY ---------- */
.body-row {
    display: flex;
    flex: 1;
    min-height: 0;
}

.side-nav-slim {
    width: 190px;
    background: #0F1B33;
    display: flex;
    flex-direction: column;
    padding: 18px 0;
    flex-shrink: 0;
}

.sn-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 20px;
    color: #A8B0CC;
    font-size: 15.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

    .sn-item svg {
        width: 17px;
        height: 17px;
        opacity: 0.8;
        flex-shrink: 0;
    }

    .sn-item.active {
        background: rgba(200,165,89,0.14);
        color: #fff;
        border-left: 3px solid var(--gold);
        padding-left: 17px;
        font-weight: 700;
    }

        .sn-item.active svg {
            opacity: 1;
            color: var(--gold);
        }

    .sn-item:not(.active):hover {
        background: rgba(255,255,255,0.05);
    }

/* ---------- SIDEBAR ---------- */
.sidebar {
    width: 220px;
    background: var(--navy-side);
    display: flex;
    flex-direction: column;
    padding: 18px 0;
    flex-shrink: 0;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 13px;
    border-radius: 7px;
    color: #A8B0CC;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

    .nav-item svg {
        width: 16px;
        height: 16px;
        opacity: 0.8;
        flex-shrink: 0;
    }

    .nav-item.active {
        background: rgba(200,165,89,0.14);
        color: #fff;
        border-left: 3px solid var(--gold);
        padding-left: 10px;
        font-weight: 700;
    }

        .nav-item.active svg {
            opacity: 1;
            color: var(--gold);
        }

    .nav-item:not(.active):hover {
        background: rgba(255,255,255,0.05);
    }

/* ---------- MAIN ---------- */
.main {
    flex: 1;
    min-width: 0;
    padding: 22px 28px 36px 28px;
    overflow-y: auto;
}

.breadcrumb {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

    .breadcrumb a {
        color: var(--navy);
        text-decoration: none;
        font-weight: 600;
    }

.page-title {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 800;
    color: var(--navy);
}

.page-subtitle {
    font-size: 15px;
    color: var(--gray-500);
    margin-top: 4px;
    font-weight: 500;
}

/* ---------- FILTERS ---------- */
.filters-row {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin: 18px 0 22px 0;
}

.filter-group {
    width: 170px;
}

.filter-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: var(--gray-500);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.filter-select {
    position: relative;
    display: flex;
    align-items: center;
}

    .filter-select select {
        width: 100%;
        appearance: none;
        background: var(--white);
        border: 1px solid var(--gray-200);
        border-radius: 8px;
        padding: 9px 32px 9px 12px;
        font-size: 14.5px;
        font-weight: 600;
        color: var(--ink);
        font-family: var(--font-sans);
        cursor: pointer;
    }

    .filter-select svg {
        position: absolute;
        right: 11px;
        width: 12px;
        height: 12px;
        color: var(--gray-400);
        pointer-events: none;
    }

.reset-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    color: var(--navy);
    font-size: 14.5px;
    font-weight: 700;
    padding: 9px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-sans);
}

    .reset-btn:hover {
        background: var(--gray-100);
    }

    .reset-btn svg {
        width: 13px;
        height: 13px;
    }

/* ---------- KPI ROW ---------- */
.kpi-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.kpi-card {
    flex: 1 1 220px;
    min-width: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 13px;
}

button.kpi-card,
button.stat-card {
    appearance: none;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

button.kpi-card:hover,
button.stat-card:hover {
    border-color: #9AB6DA;
    box-shadow: 0 4px 12px rgba(43, 91, 155, 0.12);
    transform: translateY(-1px);
}

button.kpi-card:focus-visible,
button.stat-card:focus-visible {
    outline: 3px solid rgba(43, 91, 155, 0.28);
    outline-offset: 2px;
}

button.kpi-card.is-selected,
button.stat-card.is-selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(43, 91, 155, 0.18), 0 4px 12px rgba(43, 91, 155, 0.12);
}

.kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--k-wash);
    color: var(--k-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .kpi-icon svg {
        width: 20px;
        height: 20px;
    }

.kpi-value {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 800;
    color: var(--ink);
    line-height: 1;
}

.kpi-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-500);
    margin-top: 4px;
}

.k-1 {
    --k-color: var(--blue);
    --k-wash: #EAF1FA;
}

.k-2 {
    --k-color: var(--gold);
    --k-wash: #FBF3E1;
}

.k-3 {
    --k-color: var(--purple);
    --k-wash: #F0ECFA;
}

.k-4 {
    --k-color: var(--orange);
    --k-wash: #FDEFE0;
}

/* ---------- PANELS ---------- */
.panels-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    width: 100%;
    margin-bottom: 20px;
    align-items: stretch;
}

.panels-row > .panel {
    flex: 1 1 300px;
    min-width: 0;
}

.panel {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--navy);
    color: #fff;
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: 0.2px;
    padding: 12px 16px;
    border-bottom: 3px solid var(--gold-line);
}

    .panel-header svg {
        width: 14px;
        height: 14px;
        color: var(--gold);
        flex-shrink: 0;
    }

/* District bars */
.district-panel {
    flex: 1.15;
}

.district-body {
    padding: 16px 18px 10px 18px;
}

.dist-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
}

.dist-label {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink);
    width: 26px;
    flex-shrink: 0;
}

.dist-track {
    flex: 1;
    height: 16px;
    background: var(--gray-100);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
}

.dist-seg {
    height: 100%;
}

.dist-total {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-500);
    width: 30px;
    text-align: right;
    flex-shrink: 0;
}

.dist-legend {
    display: flex;
    gap: 16px;
    padding: 8px 18px 16px 18px;
    flex-wrap: wrap;
}

.page-header-with-filters {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    margin: 18px 0 22px;
}

.page-heading-copy {
    flex: 0 0 auto;
}

.page-header-with-filters > .filters-row {
    min-width: 0;
    flex: 1;
    justify-content: flex-end;
    margin: 0;
}

#section-app .page-header-with-filters {
    gap: 20px;
}

#section-app .page-header-with-filters .filter-group {
    width: 125px;
}

#section-app .page-header-with-filters .filter-date {
    width: 130px;
}

#section-ov .page-header-with-filters .application-search,
#section-app .page-header-with-filters .application-search {
    width: min(100%, 320px);
    min-width: 0;
    flex: 0 0 320px;
}

.dl-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
}

.dl-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

/* Donut */
.workgroup-panel {
    flex: 0.85;
}

.donut-body {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 20px auto 6px auto;
}

.donut-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    overflow: visible;
}

    .donut-svg circle {
        cursor: pointer;
        transition: stroke-width .12s;
    }

.donut-center {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    text-align: center;
    padding: 0 10px;
}

.donut-total {
    font-family: var(--font-serif);
    font-size: 23px;
    font-weight: 800;
    color: var(--ink);
}

.donut-total-label {
    font-size: 10px;
    font-weight: 800;
    color: var(--gray-400);
    letter-spacing: 0.6px;
    margin-top: 2px;
    text-transform: uppercase;
}

.donut-legend {
    padding: 2px 18px 16px 18px;
}

.legend-row {
    display: flex;
    align-items: center;
    padding: 5px 4px;
    border-radius: 6px;
    gap: 8px;
    cursor: pointer;
}

    .legend-row:hover, .legend-row.hovered {
        background: var(--gray-100);
    }

.legend-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    flex: 1;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-value {
    font-size: 13px;
    font-weight: 800;
    color: var(--ink);
}

.legend-pct {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--gray-400);
    margin-left: 4px;
}

/* Map */
.map-panel {
    flex: 1.3;
}

.map-body {
    position: relative;
    flex: 1;
    min-height: 280px;
    overflow: hidden;
}

#ov_leafletMap {
    width: 100%;
    height: 100%;
    min-height: 280px;
}

.leaflet-popup-content {
    font-family: var(--font-sans);
    font-size: 14px;
}

    .leaflet-popup-content b {
        color: var(--navy);
    }

.stylized-map {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 280px;
    background: linear-gradient(135deg,#EAF0F7 0%,#DCE6F0 60%,#CFE0EE 100%);
    overflow: hidden;
}

    .stylized-map::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: linear-gradient(rgba(255,255,255,0.35) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.35) 1px, transparent 1px);
        background-size: 40px 40px;
    }

.sm-compass {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    color: var(--navy);
    font-size: 12.5px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    z-index: 3;
}

.sm-markers {
    position: absolute;
    inset: 0;
}

.sm-marker {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transform: translate(-50%,-50%);
    cursor: pointer;
    z-index: 2;
}

    .sm-marker:hover {
        width: 13px;
        height: 13px;
        z-index: 4;
    }

.sm-tooltip {
    position: absolute;
    background: var(--navy-deep);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    padding: 7px 10px;
    border-radius: 7px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .12s;
    white-space: nowrap;
    transform: translate(-50%,-130%);
    z-index: 6;
    line-height: 1.5;
}

    .sm-tooltip b {
        font-weight: 800;
    }

.map-legend {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 1000;
    background: rgba(255,255,255,0.94);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-500);
    display: flex;
    gap: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

    .map-legend .ml-item {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .map-legend .ml-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
    }

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
}

thead tr {
    background: #F6F8FB;
}

thead th {
    text-align: left;
    padding: 10px 16px;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: var(--gray-500);
    text-transform: uppercase;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

tbody td {
    padding: 10px 16px;
    font-size: 13.5px;
    color: var(--ink);
    border-bottom: 1px solid #F1F3F7;
    white-space: nowrap;
}

.app-link {
    color: var(--blue);
    font-weight: 700;
}

.status-pill {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.2px;
}

.st-inprocess {
    background: #EAF1FA;
    color: var(--blue);
}

.st-submitted {
    background: var(--gray-100);
    color: var(--gray-500);
}

.st-review {
    background: #FDEFE0;
    color: #934F00;
}

.st-approved {
    background: #dcfce7;
    color: #166534;
}

.table-footer {
    display: flex;
    justify-content: flex-end;
    padding: 12px 18px;
}

.view-all {
    color: var(--blue);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.table-panel {
    margin-top: 2px;
}

/* ===== APPLICATIONS ===== */
:root {
    --navy: #2B5B9B;
    --navy-deep: #0A1526;
    --navy-side: #0F1B33;
    --blue: #2B5B9B;
    --gold: #C8A559;
    --gold-line: #C2AB45;
    --purple: #7A5FB0;
    --orange: #DB7600;
    --red: #C13737;
    --slate: #64748B;
    --ink: #1A2233;
    --gray-500: #536176;
    --gray-400: #5C6A7F;
    --gray-200: #E2E8F0;
    --gray-100: #EEF2F7;
    --page-bg: #F2F5FA;
    --white: #FFFFFF;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background: var(--page-bg);
    color: var(--ink);
}

.shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---------- TOP BAR ---------- */
.topbar {
    height: 60px;
    background: var(--navy-deep);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px 0 20px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(200,165,89,0.18);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-seal {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #24365E, #0F1B33);
    border: 1.5px solid rgba(200,165,89,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 15px;
    font-weight: 800;
}

.topbar-brand .tb-t1 {
    color: #fff;
    font-size: 16.5px;
    font-weight: 800;
    line-height: 1.2;
}

.topbar-brand .tb-t2 {
    color: #8A94AF;
    font-size: 12.5px;
    font-weight: 600;
    margin-top: 1px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #A8B0CC;
    background: rgba(255,255,255,0.05);
    position: relative;
    cursor: pointer;
}

    .topbar-icon svg {
        width: 15px;
        height: 15px;
    }

.topbar-user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-left: 12px;
    border-left: 1px solid rgba(255,255,255,0.12);
}

.topbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}

.topbar-user .n {
    color: #fff;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.2;
}

.topbar-user .r {
    color: #8A94AF;
    font-size: 12.5px;
}

/* ---------- BODY / SIDEBAR ---------- */
.body-row {
    display: flex;
    flex: 1;
    min-height: 0;
}

.side-nav-slim {
    width: 190px;
    background: #0F1B33;
    display: flex;
    flex-direction: column;
    padding: 18px 0;
    flex-shrink: 0;
}

.sn-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 20px;
    color: #A8B0CC;
    font-size: 15.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

    .sn-item svg {
        width: 17px;
        height: 17px;
        opacity: 0.8;
        flex-shrink: 0;
    }

    .sn-item.active {
        background: rgba(200,165,89,0.14);
        color: #fff;
        border-left: 3px solid var(--gold);
        padding-left: 17px;
        font-weight: 700;
    }

        .sn-item.active svg {
            opacity: 1;
            color: var(--gold);
        }

    .sn-item:not(.active):hover {
        background: rgba(255,255,255,0.05);
    }

.main {
    flex: 1;
    min-width: 0;
    padding: 22px 28px 36px 28px;
    overflow-y: auto;
}

.page-title {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 800;
    color: var(--navy);
}

.page-subtitle {
    font-size: 15px;
    color: var(--gray-500);
    margin-top: 4px;
    font-weight: 500;
}

/* ---------- FILTERS ---------- */
.filters-row {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin: 18px 0 22px 0;
    flex-wrap: wrap;
}

.filter-group {
    width: 160px;
}

.filter-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: var(--gray-500);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.filter-select {
    position: relative;
    display: flex;
    align-items: center;
}

    .filter-select select {
        width: 100%;
        appearance: none;
        background: var(--white);
        border: 1px solid var(--gray-200);
        border-radius: 8px;
        padding: 9px 32px 9px 12px;
        font-size: 14.5px;
        font-weight: 600;
        color: var(--ink);
        font-family: var(--font-sans);
        cursor: pointer;
    }

    .filter-select svg {
        position: absolute;
        right: 11px;
        width: 12px;
        height: 12px;
        color: var(--gray-400);
        pointer-events: none;
    }

.filter-date {
    width: 135px;
}

    .filter-date input {
        width: 100%;
        font-family: var(--font-sans);
        font-size: 14.5px;
        padding: 9px 12px;
        border: 1px solid var(--gray-200);
        border-radius: 8px;
        color: var(--ink);
    }

.action-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    color: var(--navy);
    font-size: 14.5px;
    font-weight: 700;
    padding: 9px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-sans);
}

    .action-btn:hover {
        background: var(--gray-100);
    }

    .action-btn svg {
        width: 13px;
        height: 13px;
    }

/* ---------- LAYOUT ---------- */
.layout-row {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.left-col {
    width: 340px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.panel {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--navy);
    color: #fff;
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: 0.2px;
    padding: 12px 16px;
    border-bottom: 3px solid var(--gold-line);
}

    .panel-header svg {
        width: 14px;
        height: 14px;
        color: var(--gold);
        flex-shrink: 0;
    }

/* donut */
.donut-body {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 20px auto 6px auto;
}

.donut-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    overflow: visible;
}

    .donut-svg circle {
        cursor: pointer;
        transition: stroke-width .12s;
    }

.donut-center {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    text-align: center;
    padding: 0 10px;
}

.donut-total {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
}

.donut-total-label {
    font-size: 10px;
    font-weight: 800;
    color: var(--gray-400);
    letter-spacing: 0.6px;
    margin-top: 2px;
    text-transform: uppercase;
}

.donut-legend {
    padding: 2px 16px 16px 16px;
}

.legend-row {
    display: flex;
    align-items: center;
    padding: 5px 4px;
    border-radius: 6px;
    gap: 8px;
    cursor: pointer;
}

    .legend-row:hover, .legend-row.hovered {
        background: var(--gray-100);
    }

.legend-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    flex: 1;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-value {
    font-size: 13px;
    font-weight: 800;
    color: var(--ink);
}

/* district bars */
.district-body {
    padding: 14px 16px 6px 16px;
}

.dist-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
}

.dist-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    width: 22px;
    flex-shrink: 0;
}

.dist-track {
    flex: 1;
    height: 14px;
    background: var(--gray-100);
    border-radius: 4px;
    overflow: hidden;
}

.dist-fill {
    height: 100%;
    background: var(--navy);
    border-radius: 4px;
}

.dist-total {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--gray-500);
    width: 34px;
    text-align: right;
    flex-shrink: 0;
}

/* applications table */
.table-panel {
    flex: 1;
    min-width: 0;
}

.table-scroll {
    max-height: 640px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead tr {
    background: #F6F8FB;
    position: sticky;
    top: 0;
    z-index: 1;
}

thead th {
    text-align: left;
    padding: 10px 16px;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: var(--gray-500);
    text-transform: uppercase;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
    cursor: pointer;
}

tbody td {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--ink);
    border-bottom: 1px solid #F1F3F7;
    vertical-align: top;
}

.app-no {
    color: var(--blue);
    font-weight: 700;
    white-space: nowrap;
    text-align: left;
}

.app-no .app-link {
    text-align: left;
}

.app-name {
    font-weight: 700;
}

.app-loc {
    color: var(--gray-500);
    max-width: 280px;
}

.status-pill {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 11px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.st-draft {
    background: var(--gray-100);
    color: var(--gray-500);
}

.st-inprocess {
    background: #FDEFE0;
    color: #934F00;
}

.st-complete {
    background: #EAF1FA;
    color: var(--blue);
}

.st-approved {
    background: #dcfce7;
    color: #166534;
}

.st-withdrawn {
    background: #FBEAEA;
    color: var(--red);
}

.row-count {
    margin-left: auto;
    font-size: 12.5px;
    font-weight: 800;
    background: rgba(255,255,255,0.14);
    padding: 3px 9px;
    border-radius: 20px;
}

/* ===== MAP ===== */
:root {
    --navy: #2B5B9B;
    --navy-deep: #0A1526;
    --navy-side: #0F1B33;
    --blue: #2B5B9B;
    --gold: #C8A559;
    --gold-line: #C2AB45;
    --purple: #7A5FB0;
    --orange: #DB7600;
    --red: #C13737;
    --slate: #4A5568;
    --ink: #1A2233;
    --gray-500: #536176;
    --gray-400: #5C6A7F;
    --gray-200: #E2E8F0;
    --gray-100: #EEF2F7;
    --page-bg: #F2F5FA;
    --white: #FFFFFF;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background: var(--page-bg);
    color: var(--ink);
}

.shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    height: 60px;
    background: var(--navy-deep);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px 0 20px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(200,165,89,0.18);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-seal {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #24365E, #0F1B33);
    border: 1.5px solid rgba(200,165,89,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 15px;
    font-weight: 800;
}

.topbar-brand .tb-t1 {
    color: #fff;
    font-size: 16.5px;
    font-weight: 800;
    line-height: 1.2;
}

.topbar-brand .tb-t2 {
    color: #8A94AF;
    font-size: 12.5px;
    font-weight: 600;
    margin-top: 1px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #A8B0CC;
    background: rgba(255,255,255,0.05);
    cursor: pointer;
}

    .topbar-icon svg {
        width: 15px;
        height: 15px;
    }

.topbar-user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-left: 12px;
    border-left: 1px solid rgba(255,255,255,0.12);
}

.topbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
}

.topbar-user .n {
    color: #fff;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.2;
}

.topbar-user .r {
    color: #8A94AF;
    font-size: 12.5px;
}

.body-row {
    display: flex;
    flex: 1;
    min-height: 0;
}

.side-nav-slim {
    width: 190px;
    background: #0F1B33;
    display: flex;
    flex-direction: column;
    padding: 18px 0;
    flex-shrink: 0;
}

.sn-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 20px;
    color: #A8B0CC;
    font-size: 15.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

    .sn-item svg {
        width: 17px;
        height: 17px;
        opacity: 0.8;
        flex-shrink: 0;
    }

    .sn-item.active {
        background: rgba(200,165,89,0.14);
        color: #fff;
        border-left: 3px solid var(--gold);
        padding-left: 17px;
        font-weight: 700;
    }

        .sn-item.active svg {
            opacity: 1;
            color: var(--gold);
        }

    .sn-item:not(.active):hover {
        background: rgba(255,255,255,0.05);
    }

.main {
    flex: 1;
    min-width: 0;
    padding: 22px 28px 30px 28px;
    display: flex;
    flex-direction: column;
}

.page-title {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 800;
    color: var(--navy);
}

.page-subtitle {
    font-size: 15px;
    color: var(--gray-500);
    margin-top: 4px;
    margin-bottom: 18px;
    font-weight: 500;
}

.map-layout {
    display: flex;
    gap: 18px;
    flex: 1;
    min-height: 520px;
}

.filters-panel {
    width: 220px;
    flex-shrink: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-group .filter-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: var(--gray-500);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.filter-select {
    position: relative;
    display: flex;
    align-items: center;
}

    .filter-select select {
        width: 100%;
        appearance: none;
        background: var(--white);
        border: 1px solid var(--gray-200);
        border-radius: 8px;
        padding: 9px 32px 9px 12px;
        font-size: 14.5px;
        font-weight: 600;
        color: var(--ink);
        font-family: var(--font-sans);
        cursor: pointer;
    }

    .filter-select svg {
        position: absolute;
        right: 11px;
        width: 12px;
        height: 12px;
        color: var(--gray-400);
        pointer-events: none;
    }

.filter-date-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fds-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fds-label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--gray-400);
    width: 32px;
    flex-shrink: 0;
}

.fds-row input {
    flex: 1;
    min-width: 0;
    font-family: var(--font-sans);
    font-size: 13.5px;
    padding: 8px 8px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    color: var(--ink);
}

.district-legend {
    margin-top: 4px;
}

.district-legend-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: var(--gray-500);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.dl-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

.dl-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.map-panel {
    flex: 1;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--navy);
    color: #fff;
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: 0.2px;
    padding: 12px 16px;
    border-bottom: 3px solid var(--gold-line);
}

    .panel-header svg {
        width: 14px;
        height: 14px;
        color: var(--gold);
        flex-shrink: 0;
    }

.map-panel .stylized-map {
    flex: 1;
    min-height: 0;
}

#map_leafletMap {
    flex: 1;
    width: 100%;
    min-height: 0;
}

.stat-strip {
    display: flex;
    gap: 16px;
    margin-top: 18px;
}

.stat-card {
    flex: 1;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 13px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--s-wash);
    color: var(--s-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .stat-icon svg {
        width: 19px;
        height: 19px;
    }

.stat-value {
    font-family: var(--font-serif);
    font-size: 23px;
    font-weight: 800;
    color: var(--ink);
    line-height: 1;
}

.stat-label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--gray-500);
    margin-top: 4px;
}

.s-1 {
    --s-color: var(--blue);
    --s-wash: #EAF1FA;
}

.s-2 {
    --s-color: var(--gold);
    --s-wash: #FBF3E1;
}

.s-3 {
    --s-color: var(--purple);
    --s-wash: #F0ECFA;
}

.s-4 {
    --s-color: var(--orange);
    --s-wash: #FDEFE0;
}

/* ===== REPORTS ===== */
:root {
    --navy: #2B5B9B;
    --navy-deep: #0A1526;
    --navy-side: #0F1B33;
    --blue: #2B5B9B;
    --gold: #C8A559;
    --gold-line: #C2AB45;
    --purple: #7A5FB0;
    --orange: #DB7600;
    --red: #C13737;
    --slate: #64748B;
    --ink: #1A2233;
    --gray-500: #536176;
    --gray-400: #5C6A7F;
    --gray-200: #E2E8F0;
    --gray-100: #EEF2F7;
    --page-bg: #F2F5FA;
    --white: #FFFFFF;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background: var(--page-bg);
    color: var(--ink);
}

.shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    height: 60px;
    background: var(--navy-deep);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px 0 20px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(200,165,89,0.18);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-seal {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #24365E, #0F1B33);
    border: 1.5px solid rgba(200,165,89,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 15px;
    font-weight: 800;
}

.topbar-brand .tb-t1 {
    color: #fff;
    font-size: 16.5px;
    font-weight: 800;
    line-height: 1.2;
}

.topbar-brand .tb-t2 {
    color: #8A94AF;
    font-size: 12.5px;
    font-weight: 600;
    margin-top: 1px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #A8B0CC;
    background: rgba(255,255,255,0.05);
    cursor: pointer;
}

    .topbar-icon svg {
        width: 15px;
        height: 15px;
    }

.topbar-user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-left: 12px;
    border-left: 1px solid rgba(255,255,255,0.12);
}

.topbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
}

.topbar-user .n {
    color: #fff;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.2;
}

.topbar-user .r {
    color: #8A94AF;
    font-size: 12.5px;
}

.body-row {
    display: flex;
    flex: 1;
    min-height: 0;
}

.side-nav-slim {
    width: 190px;
    background: #0F1B33;
    display: flex;
    flex-direction: column;
    padding: 18px 0;
    flex-shrink: 0;
}

.sn-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 20px;
    color: #A8B0CC;
    font-size: 15.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

    .sn-item svg {
        width: 17px;
        height: 17px;
        opacity: 0.8;
        flex-shrink: 0;
    }

    .sn-item.active {
        background: rgba(200,165,89,0.14);
        color: #fff;
        border-left: 3px solid var(--gold);
        padding-left: 17px;
        font-weight: 700;
    }

        .sn-item.active svg {
            opacity: 1;
            color: var(--gold);
        }

    .sn-item:not(.active):hover {
        background: rgba(255,255,255,0.05);
    }

.main {
    flex: 1;
    min-width: 0;
    padding: 22px 28px 36px 28px;
    overflow-y: auto;
}

.page-title {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 800;
    color: var(--navy);
}

.page-subtitle {
    font-size: 15px;
    color: var(--gray-500);
    margin-top: 4px;
    font-weight: 500;
}

.filters-row {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin: 18px 0 22px 0;
    flex-wrap: wrap;
}

.filter-group {
    width: 150px;
}

.filter-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: var(--gray-500);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.filter-select {
    position: relative;
    display: flex;
    align-items: center;
}

    .filter-select select {
        width: 100%;
        appearance: none;
        background: var(--white);
        border: 1px solid var(--gray-200);
        border-radius: 8px;
        padding: 9px 32px 9px 12px;
        font-size: 14.5px;
        font-weight: 600;
        color: var(--ink);
        font-family: var(--font-sans);
        cursor: pointer;
    }

    .filter-select svg {
        position: absolute;
        right: 11px;
        width: 12px;
        height: 12px;
        color: var(--gray-400);
        pointer-events: none;
    }

.filter-date {
    width: 135px;
}

    .filter-date input {
        width: 100%;
        font-family: var(--font-sans);
        font-size: 14.5px;
        padding: 9px 12px;
        border: 1px solid var(--gray-200);
        border-radius: 8px;
        color: var(--ink);
    }

.action-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    color: var(--navy);
    font-size: 14.5px;
    font-weight: 700;
    padding: 9px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-sans);
}

    .action-btn:hover {
        background: var(--gray-100);
    }

    .action-btn svg {
        width: 13px;
        height: 13px;
    }

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.row-3col {
    display: flex;
    gap: 18px;
}

.reports-chart-column {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 18px;
}

.reports-chart-column .grid-2 {
    margin-bottom: 0;
}

.panel {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--navy);
    color: #fff;
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: 0.2px;
    padding: 12px 16px;
    border-bottom: 3px solid var(--gold-line);
}

    .panel-header svg {
        width: 14px;
        height: 14px;
        color: var(--gold);
        flex-shrink: 0;
    }

/* trend chart */
.trend-body {
    padding: 16px 18px 8px 18px;
    position: relative;
}

.trend-svg {
    width: 100%;
    height: 220px;
    overflow: visible;
}

.trend-legend {
    display: flex;
    gap: 18px;
    padding: 0 18px 14px 18px;
}

.tl-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--gray-500);
}

.tl-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.trend-tooltip {
    position: absolute;
    background: var(--navy-deep);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .1s;
    white-space: nowrap;
    transform: translate(-50%,-120%);
    z-index: 5;
}

/* donut */
.donut-body {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 18px auto 6px auto;
}

.donut-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    overflow: visible;
}

    .donut-svg circle {
        cursor: pointer;
        transition: stroke-width .12s;
    }

.donut-center {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    text-align: center;
    padding: 0 10px;
}

.donut-total {
    font-family: var(--font-serif);
    font-size: 21px;
    font-weight: 800;
    color: var(--ink);
}

.donut-total-label {
    font-size: 10px;
    font-weight: 800;
    color: var(--gray-400);
    letter-spacing: 0.6px;
    margin-top: 2px;
    text-transform: uppercase;
}

.donut-legend {
    padding: 2px 16px 16px 16px;
}

.legend-row {
    display: flex;
    align-items: center;
    padding: 5px 4px;
    border-radius: 6px;
    gap: 8px;
    cursor: pointer;
}

    .legend-row:hover, .legend-row.hovered {
        background: var(--gray-100);
    }

.legend-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    flex: 1;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-value {
    font-size: 13px;
    font-weight: 800;
    color: var(--ink);
}

/* bars */
.bar-body {
    padding: 14px 18px 10px 18px;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 11px;
}

.bar-label {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink);
    width: 110px;
    flex-shrink: 0;
}

.bar-track {
    flex: 1;
    height: 15px;
    background: var(--gray-100);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--navy);
    border-radius: 4px;
}

.bar-total {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--gray-500);
    width: 36px;
    text-align: right;
    flex-shrink: 0;
}

.completion-days-body {
    padding-top: 24px;
}

.completion-days-body .bar-label {
    width: 125px;
}

.completion-days-total {
    width: 64px;
    white-space: nowrap;
}

/* Preserve chart context while emphasizing the active filter, Power BI-style. */
.chart-filter-option {
    transition: opacity .18s ease;
}

.donut-svg circle.chart-filter-option {
    transition: opacity .18s ease, stroke-width .12s;
}

.chart-filter-option.is-muted {
    opacity: .34;
}

.chart-filter-option.is-muted:hover,
.chart-filter-option.is-muted:focus-visible {
    opacity: .62;
}

.chart-filter-option.is-selected {
    opacity: 1;
}

/* key insights */
.insights-panel {
    width: 270px;
    flex-shrink: 0;
    align-self: flex-start;
}

/* District names are short; do not reserve the workgroup label width here. */
#rep_districtBars .bar-label {
    width: 26px;
}

@media (max-width: 1200px) {
    #section-rep .reports-grid {
        flex-direction: column;
    }

    #section-rep .reports-chart-column,
    #section-rep .insights-panel {
        width: 100%;
    }

    #section-rep .insights-panel {
        align-self: stretch;
    }
}

@media (max-width: 768px) {
    #section-rep {
        padding-right: 16px;
        padding-left: 16px;
    }

    #section-rep .grid-2 {
        grid-template-columns: minmax(0, 1fr);
    }

    #section-rep .filters-row {
        justify-content: flex-start;
    }

    #section-rep .filter-group {
        width: min(100%, 180px);
        flex: 1 1 140px;
    }

    #section-rep .filter-date {
        width: min(100%, 180px);
    }
}

.insight-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--gray-100);
}

    .insight-card:last-child {
        border-bottom: none;
    }

.insight-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--i-wash);
    color: var(--i-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .insight-icon svg {
        width: 17px;
        height: 17px;
    }

.insight-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-500);
}

.insight-value {
    font-family: var(--font-serif);
    font-size: 21px;
    font-weight: 800;
    color: var(--ink);
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .insight-value .arrow-down {
        color: var(--red);
        font-size: 16px;
    }

.insight-sub {
    font-size: 13px;
    color: var(--gray-400);
    margin-top: 3px;
}

.i-1 {
    --i-color: var(--blue);
    --i-wash: #EAF1FA;
}

.i-2 {
    --i-color: var(--purple);
    --i-wash: #F0ECFA;
}

.i-3 {
    --i-color: var(--gold);
    --i-wash: #FBF3E1;
}

/* ===== PAGE SWITCHING ===== */
.page-section {
    display: none;
}

    .page-section.active {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-width: 0;
    }

/* ===== FEEDBACK REFINEMENTS ===== */
.table-panel table {
    width: 100%;
    min-width: 800px;
    table-layout: auto;
}

.map-location-button {
    appearance: none;
    display: inline-grid;
    width: 34px;
    height: 34px;
    padding: 7px;
    color: var(--blue);
    background: var(--white);
    border: 1px solid var(--blue);
    border-radius: 50%;
    cursor: pointer;
    place-items: center;
    transition: color .16s ease, background-color .16s ease, transform .16s ease;
}

.map-location-button svg {
    width: 18px;
    height: 18px;
}

.map-location-button:hover,
.map-location-button:focus-visible {
    color: var(--white);
    background: var(--blue);
}

.map-location-button:hover {
    transform: translateY(-1px);
}

.map-location-button:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.map-location-cell {
    text-align: center;
}

.table-panel thead th {
    white-space: nowrap;
}

.table-panel tbody td {
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

.app-link,
.app-no,
.app-no a {
    color: var(--blue);
    font-weight: 700;
    text-decoration: none;
}

#section-app .app-no,
#section-app .app-no .app-link,
#section-app .app-name {
    font-weight: 400;
}

.subscribe-link {
    appearance: none;
    display: inline-grid;
    width: 34px;
    height: 34px;
    padding: 7px;
    color: var(--blue);
    background: var(--white);
    border: 1px solid var(--blue);
    border-radius: 50%;
    cursor: pointer;
    place-items: center;
    transition: color .16s ease, background-color .16s ease, transform .16s ease;
}

.subscribe-link svg {
    width: 18px;
    height: 18px;
}

.subscribe-link:hover,
.subscribe-link:focus-visible {
    color: var(--white);
    background: var(--blue);
}

.subscribe-link:hover {
    transform: translateY(-1px);
}

.subscribe-link:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.dist-filter-trigger {
    appearance: none;
    display: flex;
    flex: 1;
    min-width: 0;
    align-items: center;
    gap: 8px;
    padding: 2px 0;
    color: inherit;
    background: transparent;
    border: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
    border-radius: 5px;
}

.dist-filter-trigger:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.district-subscribe-link {
    width: 28px;
    height: 28px;
    padding: 5px;
    flex: 0 0 28px;
}

.district-subscribe-link svg {
    width: 16px;
    height: 16px;
}

.dist-row-all {
    margin-top: 2px;
}

.dist-all-label {
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 700;
}

.district-body .dist-track {
    height: 18px;
}

.subscribe-cell,
#section-ov .table-panel th:first-child,
#section-ov .table-panel td:first-child {
    width: 50px;
    min-width: 50px;
    max-width: 50px;
    padding-right: 8px;
    padding-left: 8px;
    text-align: center;
}

.app-loc {
    max-width: none;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

#app_districtBody .bar-label {
    width: 22px;
}

.status-pill {
    white-space: nowrap;
}

.overview-table-scroll table {
    min-width: 1050px;
    table-layout: fixed;
}

#section-ov .table-panel th:nth-child(2),
#section-ov .table-panel td:nth-child(2) {
    width: 160px;
    min-width: 160px;
    max-width: 160px;
    white-space: nowrap;
}

#section-ov .table-panel th:nth-child(3) {
    width: 5%;
}

#section-ov .table-panel th:nth-child(4) {
    width: 9%;
}

#section-ov .table-panel th:nth-child(5) {
    width: 9%;
}

#section-ov .table-panel th:nth-child(6) {
    width: 16%;
}

#section-ov .table-panel th:nth-child(7) {
    width: 9%;
}

#section-ov .table-panel th:nth-child(8) {
    width: 14%;
}

#section-ov .table-panel th:nth-child(9) {
    width: calc(27% - 100px);
}

#section-ov .table-panel th:nth-child(10) {
    width: 76px;
    text-align: center;
}

#section-ov .table-panel td:nth-child(10) {
    width: 76px;
    padding-right: 18px;
    padding-left: 12px;
}

#section-app .table-panel th:nth-child(1),
#section-app .table-panel td:nth-child(1) {
    width: 105px;
    min-width: 105px;
    max-width: 105px;
    white-space: nowrap;
}

#section-app .table-panel th:nth-child(2) {
    width: 8%;
}

#section-app .table-panel th:nth-child(3),
#section-app .table-panel td:nth-child(3) {
    width: 160px;
    min-width: 160px;
    max-width: 160px;
    white-space: nowrap;
}

#section-app .table-panel th:nth-child(4) {
    width: 24%;
}

#section-app .table-panel th:nth-child(5) {
    width: 31%;
}

#section-app .table-panel th:nth-child(6) {
    width: 12%;
}

@media (max-width: 1200px) {
    #section-app .layout-row {
        flex-direction: column;
    }

    #section-app .left-col {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #section-app .table-panel {
        width: 100%;
    }
}

/***************************************/
.app-table-scroll table {
    table-layout: auto;
    width: 100%;
    min-width: 800px;
}

.app-table-scroll th:first-child,
.app-table-scroll td:first-child {
    white-space: nowrap !important;
    min-width: 85px;
}

.app-table-scroll th:nth-child(2),
.app-table-scroll td:nth-child(2) {
    white-space: nowrap;
    min-width: 45px;
    width: 45px;
    text-align: center;
}
/***********************************/

@media (max-width: 768px) {
    .side-nav-slim {
        width: 60px;
    }

    .side-nav-slim .sn-item {
        justify-content: center;
        padding: 12px 5px;
        overflow: hidden;
        font-size: 0;
    }

    .side-nav-slim .sn-item svg {
        width: 24px;
        height: 24px;
        margin: 0;
    }
}

/* ---------- RESOURCE LINKS ---------- */
.links-grid {
    display: grid;
    gap: 16px;
    max-width: 900px;
    margin-top: 24px;
}

.resource-links-card {
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(15, 27, 51, 0.06);
}

.resource-links-card a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    color: var(--navy);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    text-decoration: none;
}

.resource-links-card a + a {
    border-top: 1px solid var(--gray-200);
}

.resource-links-card a:hover,
.resource-links-card a:focus-visible {
    color: var(--navy-deep);
    background: var(--gray-100);
    text-decoration: underline;
}

.resource-links-card a:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: -3px;
}

.resource-links-card a svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ---------- SUBSCRIPTION DIALOG ---------- */
.subscribe-dialog {
    position: fixed;
    inset: 0;
    width: min(460px, calc(100vw - 32px));
    margin: auto;
    padding: 0;
    overflow: hidden;
    color: var(--ink);
    background: var(--white);
    border: 0;
    border-radius: 10px;
    box-shadow: 0 24px 70px rgba(15, 27, 51, 0.28);
}

.subscribe-dialog::backdrop {
    background: rgba(15, 27, 51, 0.58);
}

.subscribe-form {
    margin: 0;
}

.subscribe-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px;
    color: var(--white);
    background: var(--navy);
}

.subscribe-eyebrow {
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.subscribe-header h1 {
    margin: 0;
    color: inherit;
    font-size: 21px;
}

.subscribe-close {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    padding: 8px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    cursor: pointer;
    place-items: center;
}

.subscribe-close:hover,
.subscribe-close:focus-visible {
    background: rgba(255, 255, 255, 0.22);
}

.subscribe-close svg {
    width: 20px;
    height: 20px;
}

.subscribe-body {
    padding: 22px;
}

.subscribe-body p {
    margin: 0 0 18px;
}

.subscribe-target-message {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    min-height: 32px;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.4;
}

.subscribe-district-badge {
    display: inline-grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    background: #EAF1FA;
    border: 2px solid var(--blue);
    border-radius: 50%;
    place-items: center;
}

.subscribe-body label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
}

.subscribe-body input {
    width: 100%;
    padding: 10px 11px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font: inherit;
}

.subscribe-body input:focus-visible,
.subscribe-close:focus-visible,
.subscribe-primary:focus-visible,
.subscribe-secondary:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.subscribe-error {
    margin-top: 9px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.45;
}

.subscribe-error {
    color: #8a1c26;
    background: #fde7e9;
    border: 1px solid #e7a9af;
}

.subscribe-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px;
    background: var(--gray-100);
    border-top: 1px solid var(--gray-200);
}

.subscribe-primary,
.subscribe-secondary {
    padding: 9px 16px;
    border-radius: 6px;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.app-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 10000;
    display: flex;
    width: min(440px, calc(100vw - 32px));
    align-items: center;
    gap: 12px;
    padding: 14px 14px 14px 16px;
    color: #14532d;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(15, 27, 51, 0.2);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

.app-toast[hidden] {
    display: none;
}

.app-toast-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
}

.app-toast span {
    flex: 1;
}

.app-toast-close {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    padding: 6px;
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    place-items: center;
}

.app-toast-close:hover,
.app-toast-close:focus-visible {
    background: rgba(20, 83, 45, 0.1);
    outline: 2px solid currentColor;
    outline-offset: 1px;
}

.app-toast-close svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 520px) {
    .app-toast {
        right: 16px;
        bottom: 16px;
        left: 16px;
        width: auto;
    }
}

.subscribe-primary {
    color: var(--white);
    background: var(--blue);
    border: 1px solid var(--blue);
}

.subscribe-secondary {
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--gray-300);
}

/* ---------- APPLICATION DETAILS DIALOG ---------- */
.application-details-trigger {
    appearance: none;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    white-space: nowrap;
    cursor: pointer;
}

.application-details-trigger:hover {
    text-decoration: underline;
}

.application-details-trigger:focus-visible {
    border-radius: 2px;
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

.application-details-dialog {
    position: fixed;
    inset: 0;
    width: min(1280px, calc(100vw - 32px));
    height: min(820px, calc(100vh - 48px));
    max-height: calc(100vh - 48px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    color: var(--ink);
    background: var(--white);
    border: 0;
    border-radius: 10px;
    box-shadow: 0 24px 70px rgba(15, 27, 51, 0.28);
}

.application-details-dialog[open] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.application-details-dialog::backdrop {
    background: rgba(15, 27, 51, 0.58);
}

.application-details-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 24px;
    color: var(--white);
    background: var(--navy);
}

.application-details-eyebrow {
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.application-details-header h1 {
    margin: 0;
    color: inherit;
    font-size: 23px;
    line-height: 1.25;
    text-align: left;
    overflow-wrap: anywhere;
}

.application-details-header-summary {
    min-width: 0;
}

.application-details-header-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: center;
    gap: 16px;
    min-width: 0;
    margin-left: auto;
}

.application-details-application-summary {
    min-width: 0;
}

.application-details-header-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0;
}

.application-details-header-fields[hidden] {
    display: none;
}

.application-details-header-fields > div {
    max-width: 100%;
    min-width: 180px;
    padding: 8px 12px;
    color: var(--blue);
    background: #EAF1FA;
    border: 1px solid #AFC7E3;
    border-radius: 5px;
}

.application-details-header-fields span,
.application-details-header-fields strong {
    display: block;
}

.application-details-header-fields span {
    margin-bottom: 2px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.application-details-header-fields strong {
    color: #111111;
    font-size: 14px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.application-details-close {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    padding: 8px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    cursor: pointer;
    place-items: center;
}

.application-details-close:hover,
.application-details-close:focus-visible {
    background: rgba(255, 255, 255, 0.22);
}

.application-details-close:focus-visible,
.application-details-done:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.application-details-close svg {
    width: 20px;
    height: 20px;
}

.application-details-body {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.application-details-content {
    display: block;
    min-width: 0;
    min-height: 0;
    padding: 22px 24px;
    overflow-x: hidden;
    overflow-y: scroll;
    scrollbar-gutter: stable;
    scrollbar-color: #94a3b8 #e8edf3;
    scrollbar-width: auto;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
}

.application-details-content > .application-details-group + .application-details-group {
    margin-top: 14px;
}

.application-details-content::-webkit-scrollbar {
    width: 12px;
}

.application-details-content::-webkit-scrollbar-track {
    background: #e8edf3;
}

.application-details-content::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border: 3px solid #e8edf3;
    border-radius: 999px;
}

.application-details-content::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.application-details-tree {
    min-width: 0;
    min-height: 0;
    padding: 22px 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #f8fafc;
    border-right: 1px solid var(--gray-200);
}

.application-details-tree-title {
    margin: 0 10px 11px;
    color: var(--gray-500);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.application-details-tree ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.application-details-tree > ul > li + li {
    margin-top: 3px;
}

.application-details-tree a {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 5px 9px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 6px;
}

.application-details-tree a:hover,
.application-details-tree a:focus-visible,
.application-details-tree a.is-active {
    color: var(--blue);
    background: #e9f0f8;
}

.application-details-tree a:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 1px;
}

.application-details-tree a b {
    min-width: 22px;
    color: var(--gray-500);
    font-size: 11px;
    font-weight: 700;
    text-align: right;
}

.application-details-tree-icon {
    display: grid;
    width: 25px;
    height: 25px;
    color: var(--white);
    font-size: 10px;
    font-weight: 800;
    background: var(--blue);
    border-radius: 50%;
    place-items: center;
}

.application-details-tree > ul > li:nth-child(2) .application-details-tree-icon { background: #0f766e; }
.application-details-tree > ul > li:nth-child(3) .application-details-tree-icon { background: #7a5fb0; }
.application-details-tree > ul > li:nth-child(4) .application-details-tree-icon { background: #2f6f54; }
.application-details-tree > ul > li:nth-child(5) .application-details-tree-icon { background: #934f00; }
.application-details-tree > ul > li:nth-child(6) .application-details-tree-icon { background: #c13737; }
.application-details-tree > ul > li:nth-child(7) .application-details-tree-icon { background: #9f1239; }
.application-details-tree > ul > li:nth-child(8) .application-details-tree-icon { background: #4a5568; }

.application-details-tree li ul {
    position: relative;
    margin: 2px 0 7px 21px;
    padding-left: 14px;
    border-left: 1px solid #cbd5e1;
}

.application-details-tree li ul a {
    grid-template-columns: 10px minmax(0, 1fr) auto;
    min-height: 30px;
    padding: 4px 7px;
    color: var(--gray-500);
    font-size: 11px;
    font-weight: 600;
}

.application-details-tree-dot {
    width: 7px;
    height: 7px;
    background: #94a3b8;
    border: 2px solid #f8fafc;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #94a3b8;
}

.application-details-group {
    min-height: 108px;
    padding: 0 18px 17px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    scroll-margin-top: 12px;
}

.application-details-group h2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 -18px 12px;
    padding: 7px 12px;
    color: var(--white);
    font-size: 15px;
    line-height: 1.2;
    background: var(--navy);
    border-radius: 7px 7px 0 0;
}

.application-details-group h2 span {
    min-width: 28px;
    padding: 2px 8px;
    color: var(--navy);
    font-size: 12px;
    text-align: center;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 999px;
}

.application-details-group p {
    margin: 0;
    color: var(--gray-500);
    font-size: 13px;
    line-height: 1.5;
}

.application-details-fields,
.application-details-card {
    margin: 0;
}

.application-request-card .application-details-field:nth-child(3) {
    grid-column: 1 / -1;
}

.application-detail-table-scroll {
    width: 100%;
    overflow-x: auto;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
}

.application-detail-table {
    width: 100%;
    min-width: 760px;
    table-layout: fixed;
    border-collapse: collapse;
}

.application-detail-table th,
.application-detail-table td {
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
    border-right: 1px solid var(--gray-200);
}

.application-detail-table th:last-child,
.application-detail-table td:last-child {
    border-right: 0;
}

.application-detail-table th {
    color: var(--ink);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
    background: #f8fafc;
    border-bottom: 2px solid var(--blue);
}

.application-history-table th:nth-child(1) { width: 12%; }
.application-history-table th:nth-child(2) { width: 20%; }
.application-history-table th:nth-child(3) { width: 13%; }
.application-history-table th:nth-child(4) { width: 24%; }
.application-history-table th:nth-child(5) { width: 18%; }
.application-history-table th:nth-child(6) { width: 13%; }

.application-detail-table td {
    color: var(--ink);
    font-size: 12.5px;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
}

.application-history-record td:nth-child(1),
.application-history-record td:nth-child(2),
.application-history-record td:nth-child(6) {
    white-space: nowrap;
}

.application-history-record:nth-child(even) {
    background: #f8fafc;
}

.application-history-app-number {
    font-weight: 400;
}

.application-history-record td {
    border-bottom: 1px solid var(--gray-200);
}

.application-history-record:last-child td {
    border-bottom: 0;
}

.application-history-result-link {
    color: var(--blue);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.application-history-result-link:hover {
    color: #174a82;
}

.application-history-result-link:focus-visible {
    border-radius: 2px;
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.application-history-decision {
    max-width: 100%;
    font-weight: 800;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
}

.application-history-decision-in-process {
    color: #934F00;
}

.application-history-decision-complete {
    color: var(--blue);
}

.application-history-decision-approved {
    color: #166534;
}

.application-history-decision-negative {
    color: var(--red);
}

.application-history-decision-draft {
    color: var(--gray-500);
}

.application-comment-table th:nth-child(1) { width: 14%; }
.application-comment-table th:nth-child(2) { width: 12%; }
.application-comment-table th:nth-child(3) { width: 12%; }
.application-comment-table th:nth-child(4) { width: 62%; }

.application-comment-record:nth-of-type(even) .application-comment-summary,
.application-comment-record:nth-of-type(even) .application-comment-response {
    background: #f8fafc;
}

.application-comment-summary td {
    border-bottom: 2px solid #b8c9dc;
}

.application-comment-record.has-response .application-comment-summary td {
    border-bottom: 1px solid #d5e1ee;
}

.application-comment-record:last-child .application-comment-summary:last-child td,
.application-comment-record:last-child .application-comment-response td {
    border-bottom: 0;
}

.application-comment-summary td:first-child {
    white-space: nowrap;
}

.application-comment-resolved-cell {
    text-align: center !important;
}

.application-comment-resolved-icon {
    display: inline-grid;
    width: 20px;
    height: 20px;
    place-items: center;
    color: var(--white);
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    border-radius: 4px;
}

.application-comment-resolved-yes {
    background: #16803c;
}

.application-comment-resolved-no {
    background: #c62828;
}

.application-comment-resolved-na {
    display: inline-block;
    padding: 3px 7px;
    color: var(--gray-500);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    background: #f1f5f9;
    border: 1px solid #dbe3ec;
    border-radius: 999px;
}

.application-comment-response td {
    padding-top: 7px;
    padding-bottom: 9px;
    background: #eef4fa;
    border-top: 1px solid #d5e1ee;
    border-bottom: 2px solid #b8c9dc;
}

.application-comment-response dl {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 22px;
    margin: 0;
}

.application-comment-response dl > div {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.application-comment-response .application-comment-response-text {
    flex: 1 1 100%;
}

.application-comment-response dt {
    flex: 0 0 auto;
    color: var(--gray-500);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.application-comment-response dd {
    min-width: 0;
    margin: 0;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.application-comment-type-text {
    font-weight: 800;
}

.application-comment-type-comment {
    color: #174a82;
}

.application-comment-type-issue {
    color: #b42318;
}

.application-condition-table th:nth-child(1) { width: 16%; }
.application-condition-table th:nth-child(2) { width: 84%; }

.application-condition-record:nth-of-type(even) .application-condition-summary,
.application-condition-record:nth-of-type(even) .application-condition-metadata {
    background: #f8fafc;
}

.application-condition-summary td:first-child {
    white-space: nowrap;
}

.application-condition-summary td {
    border-bottom: 2px solid #b8c9dc;
}

.application-condition-record.has-metadata .application-condition-summary td {
    border-bottom: 1px solid #d5e1ee;
}

.application-condition-metadata td {
    padding-top: 7px;
    padding-bottom: 9px;
    background: #eef4fa;
    border-top: 1px solid #d5e1ee;
    border-bottom: 2px solid #b8c9dc;
}

.application-condition-metadata dl {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 22px;
    margin: 0;
}

.application-condition-metadata dl > div {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.application-condition-metadata dt {
    color: var(--gray-500);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.application-condition-metadata dd {
    margin: 0;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}

.application-condition-status {
    display: inline-block;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    border: 1px solid transparent;
    border-radius: 999px;
}

.application-condition-status-complete {
    color: var(--blue);
    background: #EAF1FA;
    border-color: #AFC7E3;
}

.application-condition-status-open {
    color: #166534;
    background: #dcfce7;
    border-color: #86efac;
}

.application-condition-status-draft {
    color: #854D0E;
    background: #FEF3C7;
    border-color: #FACC15;
}

.application-condition-status-closed {
    color: #991b1b;
    background: #fee2e2;
    border-color: #fca5a5;
}

.application-condition-status-neutral {
    color: var(--gray-500);
    background: var(--gray-100);
    border-color: var(--gray-200);
}

.application-condition-record:last-child .application-condition-summary:last-child td,
.application-condition-record:last-child .application-condition-metadata td {
    border-bottom: 0;
}

.application-attachment-table th:nth-child(1) { width: 16%; }
.application-attachment-table th:nth-child(2) { width: 26%; }
.application-attachment-table th:nth-child(3) { width: 40%; }
.application-attachment-table th:nth-child(4) { width: 18%; }

.application-attachment-record:nth-of-type(even) .application-attachment-summary,
.application-attachment-record:nth-of-type(even) .application-attachment-metadata {
    background: #f8fafc;
}

.application-attachment-summary td:first-child,
.application-attachment-summary td:last-child {
    white-space: nowrap;
}

.application-attachment-summary td {
    border-bottom: 2px solid #b8c9dc;
}

.application-attachment-record.has-metadata .application-attachment-summary td {
    border-bottom: 1px solid #d5e1ee;
}

.application-attachment-link {
    color: var(--blue);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.application-attachment-link:hover {
    color: #174a82;
}

.application-attachment-link:focus-visible {
    border-radius: 2px;
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.application-attachment-metadata td {
    padding-top: 7px;
    padding-bottom: 9px;
    background: #eef4fa;
    border-top: 1px solid #d5e1ee;
    border-bottom: 2px solid #b8c9dc;
}

.application-attachment-metadata dl {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 22px;
    margin: 0;
}

.application-attachment-metadata dl > div {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.application-attachment-metadata dt {
    color: var(--gray-500);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.application-attachment-metadata dd {
    margin: 0;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}

.application-attachment-record:last-child .application-attachment-summary:last-child td,
.application-attachment-record:last-child .application-attachment-metadata td {
    border-bottom: 0;
}

.application-request-decision {
    display: inline-block;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.35;
    border-radius: 999px;
}

.application-request-decision-in-process {
    color: #934F00;
    background: #FDEFE0;
    border: 1px solid #F4CFA5;
}

.application-request-decision-complete {
    color: var(--blue);
    background: #EAF1FA;
    border: 1px solid #AFC7E3;
}

.application-request-decision-approved {
    color: #166534;
    background: #dcfce7;
    border: 1px solid #86efac;
}

.application-request-decision-negative {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fca5a5;
}

.application-request-decision-draft {
    color: var(--gray-500);
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
}

.application-details-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 24px;
}

.application-summary-fields {
    grid-template-areas:
        "name manager application-date"
        "address status intake";
    grid-template-columns: 2fr 1fr 1fr;
    gap: 6px 24px;
}

.application-summary-name {
    grid-area: name;
}

.application-summary-manager {
    grid-area: manager;
}

.application-summary-address {
    grid-area: address;
    align-self: start;
}

.application-summary-address dd span {
    display: block;
}

.application-summary-status {
    grid-area: status;
}

.application-summary-application-date {
    grid-area: application-date;
}

.application-summary-intake-date {
    grid-area: intake;
}

.application-summary-fields .application-details-field dt {
    margin-bottom: 5px;
}

.application-summary-fields .application-details-field dd {
    font-size: 16px;
    line-height: 1.4;
}

.application-summary-fields .application-summary-application-date dd,
.application-summary-fields .application-summary-intake-date dd {
    font-size: 14px;
}

.application-summary-fields .application-summary-address dd {
    font-size: 13px;
    line-height: 1.45;
}

.application-details-cards {
    display: grid;
    gap: 10px;
}

.application-details-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 20px;
    padding: 13px 14px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
}

.application-applicant-card {
    display: block;
}

.application-applicant-heading {
    color: var(--ink);
    font-size: 14px;
    line-height: 1.45;
}

.application-applicant-separator {
    margin: 0 8px;
    color: var(--gray-500);
}

.application-applicant-address {
    margin-top: 7px;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.45;
}

.application-details-field {
    min-width: 0;
}

.application-details-field dt {
    margin-bottom: 3px;
    color: var(--gray-500);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.application-details-field dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.45;
}

.application-details-empty-value,
.application-details-empty {
    color: var(--gray-500);
}

.application-details-agency + .application-details-agency {
    margin-top: 18px;
}

.application-details-agency h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    padding: 8px 10px;
    color: #172033;
    font-size: 13px;
    font-weight: 800;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    box-shadow: 0 2px 5px rgba(15, 39, 70, .08);
}

.application-details-agency-icon {
    display: inline-grid;
    flex: 0 0 23px;
    width: 23px;
    height: 23px;
    color: var(--white);
    background: var(--blue);
    border-radius: 50%;
    place-items: center;
}

.application-details-agency-icon svg {
    width: 13px;
    height: 13px;
}

.application-details-agency-icon-requests {
    background: #174f7c;
}

.application-details-agency-icon-comments {
    background: #2b68a3;
}

.application-details-agency-icon-conditions {
    background: #4f86bd;
}

.application-details-agency {
    scroll-margin-top: 12px;
}

.application-details-loading,
.application-details-error {
    grid-column: 1 / -1;
    padding: 42px 24px;
    color: var(--gray-500);
    text-align: center;
}

.application-details-error {
    color: #8a1c26;
    background: #fde7e9;
    border: 1px solid #e7a9af;
    border-radius: 8px;
}

@media (max-width: 760px) {
    .application-details-dialog {
        height: calc(100vh - 64px);
        max-height: calc(100vh - 64px);
    }

    .application-details-header {
        flex-wrap: wrap-reverse;
        gap: 12px;
        padding: 18px 20px;
    }

    .application-details-header-summary,
    .application-details-header-actions {
        width: 100%;
    }

    .application-details-header-actions {
        min-height: 48px;
    }

    .application-details-header h1 {
        text-align: left;
        white-space: normal;
    }

    .application-details-body {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        min-height: 0;
        overflow: hidden;
    }

    .application-details-tree {
        position: sticky;
        top: 0;
        z-index: 2;
        padding: 10px 12px;
        overflow-x: auto;
        overflow-y: hidden;
        border-right: 0;
        border-bottom: 1px solid var(--gray-200);
    }

    .application-details-tree-title,
    .application-details-tree li ul {
        display: none;
    }

    .application-details-tree > ul {
        display: flex;
        gap: 5px;
        width: max-content;
    }

    .application-details-tree > ul > li + li {
        margin-top: 0;
    }

    .application-details-tree a {
        grid-template-columns: 24px auto auto;
        min-height: 34px;
        white-space: nowrap;
    }

    .application-details-tree-icon {
        width: 22px;
        height: 22px;
    }

    .application-details-content {
        min-height: 0;
        overflow-x: hidden;
        overflow-y: scroll;
        padding: 16px;
        scrollbar-gutter: stable;
    }

    .application-details-group,
    .application-details-agency {
        scroll-margin-top: 70px;
    }

    .application-details-fields,
    .application-details-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .application-summary-fields {
        grid-template-areas:
            "name"
            "address"
            "manager"
            "status"
            "application-date"
            "intake";
    }

    .application-request-card .application-details-field:nth-child(3) {
        grid-column: auto;
    }
}

@supports (height: 100dvh) {
    @media (max-width: 760px) {
        .application-details-dialog {
            height: calc(100dvh - 64px);
            max-height: calc(100dvh - 64px);
        }
    }
}

.application-details-footer {
    display: flex;
    justify-content: flex-end;
    padding: 14px 24px;
    border-top: 1px solid var(--gray-200);
}

.application-details-done {
    padding: 9px 20px;
    color: var(--white);
    font-weight: 700;
    background: var(--blue);
    border: 0;
    border-radius: 5px;
    cursor: pointer;
}

.application-details-done:hover {
    filter: brightness(0.92);
}

.public-application-page {
    min-height: 100vh;
    padding: 12px;
    overflow: hidden;
    background: var(--page-bg);
}

.application-details-public-shell {
    position: relative;
    inset: auto;
    display: grid;
    width: min(1410px, 100%);
    height: calc(100vh - 24px);
    max-height: none;
    margin: 0 auto;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.application-details-public-shell .application-details-close,
.application-details-public-shell .application-details-done {
    text-decoration: none;
}

.application-details-public-shell .application-details-done {
    display: inline-flex;
    align-items: center;
}

@media (max-width: 640px) {
    .public-application-page {
        padding: 0;
    }

    .application-details-public-shell {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
}

/* Compact message for unavailable public application links. */
.missing-application-page {
    min-height: 100vh;
    margin: 0;
    padding: 32px 16px;
    display: grid;
    place-items: center;
    background: #eef2f7;
    color: #243247;
    font-family: Inter, Arial, sans-serif;
}

.missing-application-card {
    width: min(100%, 520px);
    overflow: hidden;
    background: #fff;
    border: 1px solid #d9e3ee;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(23, 54, 93, .12);
}

.missing-application-brand {
    padding: 17px 28px;
    color: #fff;
    background: #254f84;
    border-bottom: 4px solid #c8a559;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
}

.missing-application-brand span { margin: 0 4px; color: #e8ce91; }
.missing-application-content { padding: 34px 36px 38px; }
.missing-application-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 22px;
    color: #315e91;
    background: #eaf1f9;
    border-radius: 14px;
}
.missing-application-icon svg { width: 27px; height: 27px; }
.missing-application-eyebrow {
    margin: 0 0 8px;
    color: #56718e;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.missing-application-content h1 {
    margin: 0 0 14px;
    color: #17365d;
    font-size: clamp(24px, 5vw, 29px);
    line-height: 1.2;
}
.missing-application-message, .missing-application-help {
    margin: 0 0 12px;
    color: #4d6075;
    font-size: 15px;
    line-height: 1.65;
}
.missing-application-button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 16px;
    padding: 12px 18px;
    color: #fff;
    background: #285b97;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}
.missing-application-button:hover { background: #1d477a; }
.missing-application-button:focus-visible { outline: 3px solid #c8a559; outline-offset: 3px; }
@media (max-width: 480px) {
    .missing-application-content { padding: 28px 24px 32px; }
    .missing-application-brand { padding: 16px 24px; }
}

/* ---------- ACCESSIBILITY ---------- */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.side-nav-slim {
    background: var(--navy-side);
}

.side-nav-slim button.sn-item {
    appearance: none;
    width: 100%;
    color: #A8B0CC;
    background-color: transparent;
    border: 0;
    font-family: var(--font-sans);
    text-align: left;
}

.side-nav-slim button.sn-item.active {
    color: var(--white);
    background-color: rgba(200, 165, 89, 0.14);
}

.side-nav-slim button.sn-item:not(.active):hover {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.05);
}

.sn-item:focus-visible,
.reset-btn:focus-visible,
.action-btn:focus-visible,
.view-all:focus-visible,
.filter-select select:focus-visible,
.filter-date input:focus-visible,
.fds-row input:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.sn-item:focus-visible {
    outline-offset: -3px;
}

.filter-label,
.fds-label {
    display: block;
}

[role="button"][tabindex="0"]:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.page-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.sort-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    color: inherit;
    font: inherit;
    text-align: left;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.sort-button::after {
    width: 10px;
    color: currentColor;
    content: "\002195";
    opacity: .55;
}

.sort-button[data-direction="asc"]::after {
    content: "\0025B2";
    opacity: 1;
}

.sort-button[data-direction="desc"]::after {
    content: "\0025BC";
    opacity: 1;
}

.sort-button:focus-visible,
.table-pagination button:focus-visible,
.table-pagination select:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.table-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 700;
    border-top: 1px solid var(--gray-200);
}

.table-pagination select,
.table-pagination button {
    min-height: 34px;
    padding: 6px 10px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 4px;
}

.table-pagination button {
    color: var(--blue);
    font-weight: 700;
    cursor: pointer;
}

.table-pagination button:disabled {
    color: var(--gray-500);
    cursor: not-allowed;
    opacity: .6;
}

.application-search {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    width: min(100%, 320px);
    min-width: 0;
    margin-left: 0;
}

.application-search-input {
    min-width: 0;
    flex: 1;
}

.application-search input {
    min-width: 0;
    min-height: 40px;
    width: 100%;
    padding: 8px 12px;
    color: var(--ink);
    font: inherit;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 5px;
}

.application-search input:focus-visible,
.application-search button:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.application-search button {
    min-height: 40px;
    padding: 8px 18px;
    font-weight: 700;
    border-radius: 5px;
    cursor: pointer;
}

.application-search-submit {
    color: var(--white);
    background: var(--blue);
    border: 1px solid var(--blue);
}

.application-search-clear {
    color: var(--blue);
    background: var(--white);
    border: 1px solid var(--gray-300);
}

.application-search-submit:hover {
    filter: brightness(.92);
}

.application-search-clear:hover {
    background: var(--gray-100);
}

@media (max-width: 700px) {
    .application-search {
        flex-wrap: wrap;
    }

    .application-search-input {
        flex-basis: 100%;
    }
}

/* ---------- RESPONSIVE FILTER HEADERS ---------- */
.filter-actions > .action-btn,
.filter-actions > .reset-btn,
.application-search-submit {
    flex-shrink: 0;
    justify-content: center;
    min-width: 88px;
    white-space: nowrap;
}

.filter-actions > .reset-btn,
#app_resetBtn,
#rep_resetBtn {
    min-width: 96px;
}

.filter-actions > .action-btn svg,
.filter-actions > .reset-btn svg {
    flex: 0 0 13px;
}

.application-search,
.filter-actions {
    gap: 14px;
}

.filter-actions {
    display: flex;
    align-items: flex-end;
}

.filters-row > .filter-actions {
    min-width: max-content;
}

.filter-group.filter-workgroup,
#section-app .page-header-with-filters .filter-workgroup {
    width: 200px;
}

/* Keep the title and filters together until the controls actually need the room. */
@media (max-width: 1650px) {
    #section-ov .page-header-with-filters,
    #section-app .page-header-with-filters {
        flex-direction: column;
        gap: 18px;
    }

    #section-ov .page-header-with-filters > .filters-row,
    #section-app .page-header-with-filters > .filters-row {
        display: grid;
        width: 100%;
        flex: none;
        grid-template-columns: repeat(12, minmax(0, 1fr));
        align-items: end;
        justify-content: flex-start;
        column-gap: 14px;
        row-gap: 16px;
    }

    #section-ov .filters-row > .application-search,
    #section-app .filters-row > .application-search {
        grid-column: span 3;
        width: 100%;
        justify-self: stretch;
    }

    #section-ov .filters-row > .filter-group,
    #section-app .filters-row > .filter-group {
        width: 100%;
    }

    #section-ov .filters-row > .filter-group {
        grid-column: span 2;
    }

    #section-app .filters-row > .filter-group:not(.filter-date) {
        grid-column: span 4;
    }

    #section-app .filters-row > .filter-date {
        grid-column: span 3;
    }

    #section-ov .filters-row > .filter-actions,
    #section-app .filters-row > .filter-actions {
        grid-column: span 3;
    }
}

@media (max-width: 1470px) {
    .page-header-with-filters {
        flex-direction: column;
        gap: 18px;
    }

    .page-header-with-filters > .filters-row {
        width: 100%;
        flex: none;
        justify-content: flex-start;
    }

    #section-rep .filters-row {
        display: grid;
        grid-template-columns:
            repeat(3, minmax(115px, 1fr))
            repeat(2, minmax(130px, 1fr))
            max-content;
        align-items: end;
        column-gap: 14px;
        row-gap: 16px;
    }

    #section-ov .filters-row > .filter-group,
    #section-app .filters-row > .filter-group,
    #section-rep .filters-row > .filter-group {
        width: 100%;
    }
}

/* Tablet: three filters above, dates and actions below. */
@media (max-width: 1100px) {
    #section-ov .filters-row,
    #section-app .filters-row,
    #section-rep .filters-row {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    #section-ov .filters-row > .filter-group,
    #section-app .filters-row > .filter-group,
    #section-rep .filters-row > .filter-group {
        grid-column: span 2;
    }

    #section-app .filters-row > .filter-group:not(.filter-date),
    #section-app .filters-row > .filter-date {
        grid-column: span 2;
    }

    #section-ov .filters-row > .application-search,
    #section-app .filters-row > .application-search {
        grid-column: span 4;
    }

    #section-ov .filters-row > .filter-actions,
    #section-app .filters-row > .filter-actions,
    #section-rep .filters-row > .filter-actions {
        grid-column: span 2;
    }
}

/* Phone: use a stable vertical form instead of one-control-at-a-time wrapping. */
@media (max-width: 760px) {
    .main {
        padding: 18px 14px 28px;
    }

    .page-header-with-filters {
        gap: 14px;
        margin-top: 12px;
    }

    #section-ov .filters-row,
    #section-app .filters-row,
    #section-rep .filters-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 10px;
        row-gap: 14px;
    }

    #section-ov .filters-row > .filter-group,
    #section-app .filters-row > .filter-group,
    #section-rep .filters-row > .filter-group {
        grid-column: 1 / -1;
    }

    #section-app .filters-row > .filter-group:not(.filter-date),
    #section-app .filters-row > .filter-date {
        grid-column: 1 / -1;
    }

    #section-ov .filters-row > .application-search,
    #section-app .filters-row > .application-search {
        grid-column: 1 / -1;
    }

    #section-ov .filters-row > .filter-actions,
    #section-app .filters-row > .filter-actions,
    #section-rep .filters-row > .filter-actions {
        grid-column: 1 / -1;
        justify-self: start;
    }

    #section-app .left-col {
        grid-template-columns: minmax(0, 1fr);
    }

    .filters-row > *,
    .filter-select,
    .filter-select select,
    .filter-date input {
        min-width: 0;
        max-width: 100%;
    }

}

@media (max-width: 700px) {
    #section-ov .application-search-submit,
    #section-app .application-search-submit {
        width: 100%;
    }
}

/* ---------- FIXED DASHBOARD CHROME ---------- */
body.dashboard-page {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.dashboard-page .shell {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

.dashboard-page .body-row {
    min-height: 0;
    overflow: hidden;
}

.dashboard-page .side-nav-slim {
    min-height: 0;
    overflow-y: auto;
}

.dashboard-page .main.page-section.active {
    min-height: 0;
    overflow-y: scroll;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
}

/* Keep the In Process dashboard content at its natural height. The active page,
   rather than the grid panel, owns vertical scrolling. */
#section-ov > .breadcrumb,
#section-ov > .page-header-with-filters,
#section-ov > .kpi-row,
#section-ov > .panels-row,
#section-ov > .table-panel {
    flex: 0 0 auto;
}

#section-ov .overview-table-scroll {
    max-height: none;
}

/* ---------- MOBILE TABLE CARDS ---------- */
@media (max-width: 760px) {
    html,
    body {
        height: 100%;
        overflow: hidden;
    }

    .topbar {
        min-height: 60px;
        height: auto;
        padding: 4px 12px;
    }

    .topbar-right {
        display: none !important;
    }

    .topbar-brand {
        min-width: 0;
        gap: 9px;
    }

    .topbar-brand .tb-t1,
    .topbar-brand .tb-t2 {
        white-space: nowrap;
    }

    .topbar-brand .tb-t1 {
        font-size: clamp(15px, 4.6vw, 16.5px);
    }

    .topbar-brand .tb-t2 {
        font-size: clamp(11.5px, 3.5vw, 12.5px);
    }

    .page-title {
        font-size: clamp(20px, 6.3vw, 24px);
        white-space: nowrap;
    }

    .shell {
        height: 100vh;
        height: 100dvh;
        min-height: 0;
    }

    .body-row {
        flex-direction: column;
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
        overflow: hidden;
    }

    .side-nav-slim {
        position: relative;
        z-index: 1000;
        display: flex;
        flex-direction: row;
        flex: 0 0 auto;
        width: 100%;
        padding: 0;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
    }

    .side-nav-slim button.sn-item {
        justify-content: center;
        flex-direction: column;
        flex: 1 1 20%;
        width: auto;
        min-width: 0;
        padding: 8px 3px 7px;
        gap: 3px;
        font-size: 10.5px;
        text-align: center;
        white-space: nowrap;
        border-left: 0;
        border-bottom: 3px solid transparent;
    }

    .side-nav-slim button.sn-item.active {
        padding-left: 3px;
        border-left: 0;
        border-bottom-color: var(--gold);
    }

    .side-nav-slim .sn-item svg {
        width: 17px;
        height: 17px;
    }

    .main.page-section.active {
        flex: 1 1 auto;
        height: auto;
        max-height: none;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: scroll;
        overscroll-behavior-y: contain;
        scrollbar-gutter: stable;
        -webkit-overflow-scrolling: touch;
    }

    #section-map .map-layout {
        display: flex;
        flex: none;
        flex-direction: column;
        gap: 14px;
        min-height: 0;
    }

    #section-map .filters-panel {
        order: 1;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        width: 100%;
        padding: 14px;
    }

    #section-map .filters-panel > .filter-group,
    #section-map .filters-panel > .district-legend {
        width: 100%;
        min-width: 0;
    }

    #section-map .filters-panel .action-btn {
        justify-content: center;
        width: 100%;
    }

    #section-map .map-panel {
        order: 2;
        flex: none;
        width: 100%;
        height: min(56dvh, 420px);
        min-height: 300px;
    }

    #map_leafletMap {
        width: 100%;
        height: 100%;
        min-height: 300px;
    }

    #section-map .stat-strip {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        margin-top: 14px;
    }

    #section-map .stat-card {
        flex: none;
        width: 100%;
        min-width: 0;
    }

    .table-pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        padding: 14px 12px;
    }

    .table-pagination label { order: 1; }
    .table-pagination select { order: 2; }
    #ov_pageStatus,
    #app_pageStatus {
        order: 3;
        flex: 1 0 100%;
        text-align: center;
    }
    #ov_firstPage,
    #app_firstPage { order: 4; }
    #ov_prevPage,
    #app_prevPage { order: 5; }
    #ov_nextPage,
    #app_nextPage { order: 6; }
    #ov_lastPage,
    #app_lastPage { order: 7; }

    .table-panel .table-scroll,
    .application-detail-table-scroll {
        max-height: none !important;
        overflow: visible;
    }

    .table-panel {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .table-panel table,
    .overview-table-scroll table,
    .app-table-scroll table,
    .application-detail-table {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .table-panel thead,
    .application-detail-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .table-panel tbody {
        display: grid;
        gap: 12px;
        padding: 12px;
        background: var(--page-bg);
    }

    .table-panel tbody > tr {
        display: block;
        overflow: hidden;
        background: var(--white);
        border: 1px solid var(--gray-200);
        border-radius: 8px;
        box-shadow: 0 2px 7px rgba(15, 27, 51, .06);
    }

    .table-panel tbody > tr > td,
    .application-history-record > td,
    .application-attachment-summary > td,
    .application-comment-summary > td,
    .application-condition-summary > td {
        display: grid;
        grid-template-columns: minmax(104px, 38%) minmax(0, 1fr);
        align-items: start;
        gap: 12px;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 9px 12px;
        text-align: left !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
        border-right: 0;
        border-bottom: 1px solid var(--gray-100);
    }

    .table-panel tbody > tr > td:last-child,
    .application-history-record > td:last-child,
    .application-attachment-summary > td:last-child,
    .application-comment-summary > td:last-child,
    .application-condition-summary > td:last-child {
        border-bottom: 0;
    }

    .table-panel tbody > tr > td::before,
    .application-detail-table td::before {
        color: var(--gray-500);
        font-size: 10px;
        font-weight: 800;
        letter-spacing: .055em;
        line-height: 1.45;
        text-transform: uppercase;
    }

    .overview-table-scroll td:nth-child(1)::before { content: "Subscribe"; }
    .overview-table-scroll td:nth-child(2)::before { content: "Application #"; }
    .overview-table-scroll td:nth-child(3)::before { content: "District"; }
    .overview-table-scroll td:nth-child(4)::before { content: "Workgroup"; }
    .overview-table-scroll td:nth-child(5)::before { content: "Control #"; }
    .overview-table-scroll td:nth-child(6)::before { content: "Application Name"; }
    .overview-table-scroll td:nth-child(7)::before { content: "Intake Date"; }
    .overview-table-scroll td:nth-child(8)::before { content: "Agents / Applicants"; }
    .overview-table-scroll td:nth-child(9)::before { content: "Property Address"; }
    .overview-table-scroll td:nth-child(10)::before { content: "Map"; }

    .app-table-scroll td:nth-child(1)::before { content: "Application Date"; }
    .app-table-scroll td:nth-child(2)::before { content: "District"; }
    .app-table-scroll td:nth-child(3)::before { content: "Application #"; }
    .app-table-scroll td:nth-child(4)::before { content: "Application Name"; }
    .app-table-scroll td:nth-child(5)::before { content: "Property Address"; }
    .app-table-scroll td:nth-child(6)::before { content: "Status"; }

    .table-panel tbody > tr > .subscribe-cell,
    .table-panel tbody > tr > .map-location-cell {
        justify-items: start;
    }

    .table-panel tbody > tr > .empty-state {
        display: block;
        padding: 24px 16px;
        text-align: center !important;
    }

    .table-panel tbody > tr > .empty-state::before {
        content: none;
    }

    .application-detail-table-scroll {
        background: transparent;
        border: 0;
    }

    .application-history-table tbody {
        display: grid;
        gap: 12px;
    }

    .application-history-record,
    .application-attachment-record,
    .application-comment-record,
    .application-condition-record {
        display: block;
        overflow: hidden;
        margin: 0 0 12px;
        background: var(--white);
        border: 1px solid var(--gray-200);
        border-radius: 8px;
        box-shadow: 0 2px 7px rgba(15, 27, 51, .06);
    }

    .application-history-record,
    .application-history-record:last-child,
    .application-attachment-record:last-child,
    .application-comment-record:last-child,
    .application-condition-record:last-child {
        margin-bottom: 0;
    }

    .application-attachment-summary,
    .application-comment-summary,
    .application-condition-summary,
    .application-attachment-metadata,
    .application-comment-response,
    .application-condition-metadata {
        display: block;
    }

    .application-history-table td:nth-child(1)::before { content: "Decision Date"; }
    .application-history-table td:nth-child(2)::before { content: "Application #"; }
    .application-history-table td:nth-child(3)::before { content: "Decision"; }
    .application-history-table td:nth-child(4)::before { content: "Request"; }
    .application-history-table td:nth-child(5)::before { content: "Project Manager"; }
    .application-history-table td:nth-child(6)::before { content: "Result"; }

    .application-attachment-summary td:nth-child(1)::before { content: "Submitted"; }
    .application-attachment-summary td:nth-child(2)::before { content: "Description"; }
    .application-attachment-summary td:nth-child(3)::before { content: "Detail"; }
    .application-attachment-summary td:nth-child(4)::before { content: "Document Type"; }

    .application-comment-summary td:nth-child(1)::before { content: "Date"; }
    .application-comment-summary td:nth-child(2)::before { content: "Type"; }
    .application-comment-summary td:nth-child(3)::before { content: "Resolved"; }
    .application-comment-summary td:nth-child(4)::before { content: "Comment"; }

    .application-condition-summary td:nth-child(1)::before { content: "Date"; }
    .application-condition-summary td:nth-child(2)::before { content: "Condition"; }

    .application-attachment-metadata > td,
    .application-comment-response > td,
    .application-condition-metadata > td {
        display: block;
        width: auto !important;
        padding: 10px 12px;
        border: 0;
        border-top: 1px solid #d5e1ee;
    }

    .application-attachment-metadata > td::before,
    .application-comment-response > td::before,
    .application-condition-metadata > td::before {
        content: none;
    }

    .application-attachment-metadata dl,
    .application-comment-response dl,
    .application-condition-metadata dl {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .application-attachment-metadata dl > div,
    .application-comment-response dl > div,
    .application-condition-metadata dl > div {
        display: grid;
        grid-template-columns: minmax(104px, 38%) minmax(0, 1fr);
        align-items: start;
        gap: 12px;
    }
}

@media print {
    .topbar,
    .side-nav-slim,
    .action-btn,
    .reset-btn,
    .table-pagination,
    .application-search,
    .subscribe-link,
    .table-footer,
    #data-status {
        display: none !important;
    }

    body,
    .shell,
    .body-row,
    .main,
    .page-section.active {
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #fff !important;
    }

    .page-section {
        display: none !important;
    }

    .page-section.active {
        display: block !important;
    }

    .table-scroll,
    .app-table-scroll,
    .overview-table-scroll {
        max-height: none !important;
        overflow: visible !important;
    }

    .panel,
    .stat-card,
    .resource-links-card {
        break-inside: avoid;
        box-shadow: none !important;
    }
}

/* Leaflet's default attribution link is too light against its translucent panel. */
.leaflet-control-attribution {
    color: var(--ink);
}

.leaflet-control-attribution a {
    color: #003E7B;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.leaflet-control-attribution a:focus-visible {
    border-radius: 2px;
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.map-popup-actions {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--gray-200);
}

.map-popup-details {
    appearance: none;
    padding: 0;
    color: var(--blue);
    background: transparent;
    border: 0;
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.map-popup-details:hover {
    color: var(--navy-deep);
}

.map-popup-details:focus-visible {
    border-radius: 2px;
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

/* Visible reCAPTCHA branding replaces the floating badge. */
.recaptcha-menu-notice {
    flex: 0 0 auto;
    margin-top: auto;
    padding: 20px 20px 0;
    color: #A8B0CC;
    font-size: 12px;
    line-height: 1.5;
    text-align: left;
    white-space: normal;
    overflow-wrap: break-word;
}

.recaptcha-details-notice {
    margin-right: auto;
    color: var(--gray-500);
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 760px) {
    .dashboard-page .side-nav-slim {
        flex-wrap: wrap;
    }

    .recaptcha-menu-notice {
        flex-basis: 100%;
        margin-top: 0;
        padding: 6px 12px 8px;
    }
}
