:root {
    color-scheme: light;
    --green: #176b55;
    --green-dark: #115440;
    --ink: #24332f;
    --muted: #687873;
    --line: #dfe8e3;
    --white: #fff;
    --site-blue: #4f83b5;
    --site-gold: #ebc000;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--site-blue);
    color: #fff;
    font: 16px/1.6 "Segoe UI", Arial, sans-serif;
}

#page.page {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.shell {
    width: min(1120px, 100%);
    flex: 1 0 auto;
    margin: 0 auto;
    padding: 28px 20px 36px;
}

.portal-userbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin: 0 0 18px;
    color: #fff;
    font-size: 14px;
}

.portal-userbar form { margin: 0; }
.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 24px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 12px;
    background: rgba(255, 255, 255, .16);
}
.admin-nav a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 9px 14px;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}
.admin-nav a:hover, .admin-nav a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; background: rgba(255, 255, 255, .2); color: #fff; }
.admin-nav a.is-active { background: var(--site-gold); color: var(--ink); }
.intro { padding: 10px 0 24px; }
.eyebrow { margin: 0 0 6px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.intro .eyebrow { color: #fff0a6; }
h1 { margin: 4px 0 10px; font-size: clamp(32px, 5vw, 46px); line-height: 1.15; }
.intro h1 { color: var(--site-gold); }
h2 { margin: 0 0 16px; font-size: 23px; line-height: 1.3; }
.intro > p:last-child { max-width: 700px; margin: 0; color: #fff; font-size: 18px; }

.card, .summary-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 8px 26px rgba(25, 53, 43, .12);
    color: var(--ink);
}

.card { margin: 0 0 20px; padding: clamp(20px, 4vw, 30px); }
.card h1, .card h2, .card h3 { color: var(--ink); }
.login-card { max-width: 560px; }
.login-card > p { color: var(--muted); }
.form-stack { display: grid; gap: 10px; margin-top: 20px; }
label { font-size: 14px; font-weight: 650; }
input, select, textarea { width: 100%; min-width: 0; border: 1px solid #cbd8d1; border-radius: 8px; padding: 11px 12px; background: var(--white); color: var(--ink); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid #7bb59f; outline-offset: 1px; }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; border: 0; border-radius: 8px; padding: 10px 17px; background: var(--green); color: var(--white); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.button:hover, .button:focus { background: var(--green-dark); color: var(--white); }
.button-quiet { min-height: 36px; padding: 6px 12px; background: #fff; color: var(--green); font-size: 14px; }
.button-quiet:hover, .button-quiet:focus { background: #edf5f0; color: var(--green-dark); }
.help, .muted { color: var(--muted); font-size: 13px; }
.notice { margin: 0 0 18px; border-left: 4px solid #dfa52b; border-radius: 5px; padding: 13px 16px; background: #fff6df; color: var(--ink); }
.notice.success { border-color: var(--green); background: #edf7f1; }
.shell > .help { color: #fff; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 0 0 20px; }
.summary-card { min-height: 112px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; padding: 20px; }
.summary-card span { color: var(--muted); font-size: 14px; }
.summary-card strong { color: var(--green); font-size: clamp(22px, 3vw, 30px); font-variant-numeric: tabular-nums; }
.summary-card small { color: var(--muted); font-size: 13px; }
.section-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.section-title h2 { margin-bottom: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-grid label { display: grid; gap: 6px; }
.form-grid label.checkbox-label { display: flex; align-items: center; gap: 9px; }
.checkbox-label input[type="checkbox"] { width: auto; margin: 0; }
.form-submit { grid-column: 1 / -1; }
.import-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.form-stack a { font-weight: 500; }
.table-wrap { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.status { display: inline-block; border-radius: 999px; padding: 3px 9px; background: #edf4f0; color: #355b4a; font-size: 12px; white-space: nowrap; }
.status-pending { background: #fff6df; color: #805d13; }
.status-rejected, .status-cancelled { background: #fbe9e7; color: #8b2b20; }
.empty { color: var(--muted); }

@media (max-width: 767px) {
    #header-1 .main-nav .navbar-header { padding-right: 155px; }
    #header-1 .site-header-actions { right: 12px; }
    #header-1 .main-nav .navbar-collapse { background: #fff; }
    #header-1 .main-nav .navbar-collapse .nav .nav-item > a { color: #000; }
    #header-1 .main-nav .navbar-collapse .nav .nav-item > a:hover,
    #header-1 .main-nav .navbar-collapse .nav .nav-item > a:focus { color: var(--site-gold); }
}

@media (max-width: 640px) {
    .shell { padding: 22px 14px 28px; }
    .portal-userbar { align-items: flex-start; flex-direction: column; gap: 8px; }
    .admin-nav a { min-width: 0; flex: 1 1 calc(50% - 8px); text-align: center; }
    .form-grid { grid-template-columns: 1fr; }
    .form-submit { grid-column: auto; }
    .table-wrap { margin-right: -6px; margin-left: -6px; }
    th, td { padding: 10px 8px; }
}
