:root {
    color-scheme: light;
    --ink: #17201c;
    --muted: #5c6a63;
    --line: #dfe7e2;
    --panel: #ffffff;
    --page: #f3f6f1;
    --brand: #17673d;
    --brand-dark: #0f442c;
    --amber: #a36100;
    --red: #b51f2f;
    --ok: #197642;
    --warn: #b87503;
    --fail: #bf2638;
    --shadow: 0 14px 36px rgba(23, 32, 28, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.45;
}

a {
    color: inherit;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px clamp(18px, 4vw, 48px);
    background: rgba(243, 246, 241, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 8px;
    background: var(--brand-dark);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0;
}

.eyebrow {
    margin: 0 0 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.brand h1 {
    margin: 0;
    font-size: 23px;
    line-height: 1.05;
}

.top-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.button,
button {
    min-height: 40px;
    border: 1px solid var(--brand-dark);
    border-radius: 8px;
    background: var(--brand-dark);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: 9px 14px;
    text-decoration: none;
}

.button.secondary {
    background: #fff;
    color: var(--brand-dark);
}

.button.quiet {
    border-color: transparent;
    background: transparent;
    color: var(--muted);
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 56px;
}

.summary-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: clamp(20px, 4vw, 32px);
    border: 1px solid var(--line);
    border-left: 8px solid var(--ok);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.summary-band.warn {
    border-left-color: var(--warn);
}

.summary-band.fail {
    border-left-color: var(--fail);
}

.summary-band h2 {
    margin-bottom: 8px;
    font-size: clamp(26px, 4vw, 44px);
    line-height: 1.05;
    letter-spacing: 0;
}

.summary-copy {
    margin-bottom: 0;
    color: var(--muted);
}

.count-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(84px, 1fr));
    gap: 10px;
}

.count-tile {
    min-width: 92px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f9fbf8;
}

.count-tile span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.count-tile strong {
    display: block;
    font-size: 30px;
    line-height: 1.05;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 26px;
}

.quick-links a {
    min-height: 72px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    text-decoration: none;
}

.quick-links span,
.section-heading span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.quick-links strong {
    display: block;
    margin-top: 3px;
    line-height: 1.2;
}

.status-section {
    margin-top: 26px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.section-heading h2,
.alert-note h2 {
    margin-bottom: 0;
    font-size: 20px;
}

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

.status-card {
    min-height: 164px;
    padding: 16px;
    border: 1px solid var(--line);
    border-top: 5px solid var(--ok);
    border-radius: 8px;
    background: var(--panel);
}

.status-card.warn {
    border-top-color: var(--warn);
}

.status-card.fail {
    border-top-color: var(--fail);
}

.status-card-head {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.status-dot {
    width: 12px;
    height: 12px;
    margin-top: 5px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--ok);
}

.status-card.warn .status-dot {
    background: var(--warn);
}

.status-card.fail .status-dot {
    background: var(--fail);
}

.status-card h3 {
    margin-bottom: 2px;
    font-size: 16px;
    line-height: 1.2;
}

.status-card-head p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
}

.status-summary {
    margin: 14px 0 10px;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.text-link {
    display: inline-block;
    margin-right: 12px;
    color: var(--brand-dark);
    font-weight: 800;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.alert-note {
    margin-top: 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #eef4f0;
}

.alert-note p {
    margin: 6px 0 0;
    color: var(--muted);
}

.login-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #eef4f0;
}

.login-shell {
    width: min(440px, 100%);
}

.login-panel {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.login-panel h1 {
    margin-bottom: 24px;
    font-size: 32px;
    line-height: 1.1;
}

.login-form {
    display: grid;
    gap: 14px;
}

.login-form label span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.login-form input {
    width: 100%;
    min-height: 44px;
    border: 1px solid #c8d3cc;
    border-radius: 8px;
    color: var(--ink);
    font: inherit;
    padding: 10px 12px;
}

.login-error {
    padding: 10px 12px;
    border: 1px solid #f1b7be;
    border-radius: 8px;
    background: #fff5f6;
    color: var(--red);
    font-weight: 700;
}

@media (max-width: 860px) {
    .topbar,
    .summary-band,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .summary-band {
        grid-template-columns: 1fr;
    }

    .count-row,
    .quick-links,
    .status-grid {
        grid-template-columns: 1fr;
    }

    .top-actions {
        justify-content: stretch;
    }

    .top-actions .button {
        flex: 1 1 auto;
        text-align: center;
    }
}

@media (min-width: 861px) and (max-width: 1120px) {
    .quick-links,
    .status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

