:root {
    color-scheme: light;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: #17283a;
    background: #f2f5f8;
    font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
a { color: #145ca8; }
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem max(1.25rem, calc((100% - 1080px) / 2));
    background: #132c45;
    color: #fff;
}
.brand { color: #fff; font-size: 1.05rem; font-weight: 750; text-decoration: none; }
nav { display: flex; align-items: center; gap: 1.2rem; }
nav a, .nav-button { color: #fff; font: inherit; text-decoration: none; }
.inline-form { display: inline; margin: 0; }
.nav-button { padding: 0; border: 0; background: none; cursor: pointer; }
.container { width: min(100% - 2rem, 900px); min-height: calc(100vh - 130px); margin: 2rem auto; }
.test-banner { margin-bottom: 1.5rem; padding: .8rem 1rem; border: 1px solid #f2c96d; border-radius: 8px; background: #fff6df; color: #634600; font-size: .92rem; }
.hero { padding: clamp(2rem, 7vw, 5rem); border-radius: 16px; background: #fff; box-shadow: 0 8px 28px #122d4610; }
.hero h1, .page-heading h1, .form-panel h1 { max-width: 720px; margin: .4rem 0 1rem; font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.08; }
.hero > p:not(.eyebrow) { max-width: 620px; color: #526578; font-size: 1.15rem; line-height: 1.6; }
.eyebrow { margin: 0; color: #2766a5; font-size: .76rem; font-weight: 800; letter-spacing: .12em; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.7rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .7rem 1rem; border: 0; border-radius: 7px; background: #145ca8; color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.button:hover { background: #104b89; }
.button.secondary { border: 1px solid #b8c7d5; background: #fff; color: #18354f; }
.button.danger { background: #a72e27; }
.panel, .form-panel { margin: 1.25rem 0; padding: 1.35rem; border: 1px solid #e0e7ee; border-radius: 12px; background: #fff; box-shadow: 0 4px 18px #122d4608; }
.form-panel { width: min(100%, 540px); margin: 2rem auto; }
.form-panel.wide { width: 100%; }
.page-heading { padding: 1rem 0; }
.page-heading h1 { font-size: clamp(2rem, 5vw, 2.7rem); }
h2 { margin: 2rem 0 1rem; font-size: 1.5rem; }
h3 { margin: .8rem 0; }
.muted, .help { color: #5d6d7c; font-size: .92rem; }
form label { display: block; margin: 1rem 0; font-weight: 650; }
input:not([type=checkbox]), textarea, select { display: block; width: 100%; margin-top: .45rem; padding: .75rem; border: 1px solid #aebdca; border-radius: 6px; background: #fff; color: #17283a; font: inherit; }
input:focus, textarea:focus, select:focus { outline: 3px solid #91c4f6; border-color: #145ca8; }
textarea { resize: vertical; }
.help { display: block; margin-top: .4rem; font-weight: 400; }
.checkbox-label { display: flex; align-items: flex-start; gap: .6rem; font-weight: 500; line-height: 1.5; }
.checkbox-label input { margin-top: .25rem; }
.notice { margin: 1rem 0; padding: .85rem 1rem; border-radius: 8px; background: #e8f1fa; }
.notice.success { background: #e6f5ec; color: #155b31; }
.notice.error { background: #fff0ee; color: #84241e; }
.alert-list { display: grid; gap: 1rem; }
.alert-card { margin: 0; border-left: 5px solid #4c7da8; }
.alert-card.attention { border-left-color: #d99511; }
.alert-card.emergency { border-left-color: #bb352c; }
.alert-meta { display: flex; justify-content: space-between; gap: 1rem; color: #5d6d7c; font-size: .85rem; }
.tag { font-weight: 750; }
.empty { color: #5d6d7c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: .75rem .55rem; border-bottom: 1px solid #e5ebf0; vertical-align: top; }
th { color: #45596b; font-size: .86rem; }
.footer { padding: 1.25rem; background: #e6edf3; color: #536578; text-align: center; font-size: .88rem; }
@media (max-width: 520px) {
    .topbar { align-items: flex-start; flex-direction: column; }
    nav { flex-wrap: wrap; gap: 1rem; }
    .container { width: min(100% - 1.25rem, 900px); margin-top: 1rem; }
    .panel, .form-panel { padding: 1rem; }
}
