:root {
    color-scheme: light;
    --bg: #f5f7fb;
    --card: #ffffff;
    --ink: #172033;
    --muted: #657085;
    --line: #dce3ee;
    --brand: #184f8f;
    --brand-dark: #0d3565;
    --ok: #0c7a43;
    --warn: #9a5a00;
    --danger: #a32929;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, sans-serif; background: var(--bg); color: var(--ink); font-size: 17px; line-height: 1.5; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar { display: flex; align-items: center; gap: 1.5rem; padding: .75rem 2rem; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; min-height: 72px; }
.brand { flex: 0 0 auto; font-weight: 800; color: var(--brand-dark); font-size: 1.2rem; }
nav { display: flex; align-items: center; justify-content: flex-end; gap: .55rem; flex: 1 1 auto; min-width: 0; }
nav form { margin: 0; }
nav > a { min-height: 44px; display: inline-flex; align-items: center; color: var(--brand-dark); font-weight: 700; padding: 0 .55rem; white-space: nowrap; }
.nav-menu { position: relative; display: inline-flex; align-items: center; min-height: 44px; }
.nav-trigger { appearance: none; border: 0; background: transparent; color: var(--brand-dark); min-height: 44px; padding: 0 .7rem; border-radius: .65rem; font: inherit; font-weight: 800; white-space: nowrap; cursor: default; }
.nav-trigger::after { content: "▾"; margin-left: .4rem; font-size: .78em; color: var(--muted); }
.nav-menu:hover .nav-trigger, .nav-menu:focus-within .nav-trigger { background: #eef5ff; color: var(--brand-dark); }
.nav-panel { position: absolute; top: 100%; left: 0; min-width: 230px; display: none; gap: .15rem; padding: .55rem; background: #fff; border: 1px solid var(--line); border-radius: .9rem; box-shadow: 0 18px 35px rgba(21, 43, 80, .16); z-index: 40; }
.nav-menu:hover .nav-panel, .nav-menu:focus-within .nav-panel { display: grid; }
.nav-panel a { display: block; padding: .68rem .75rem; border-radius: .65rem; color: var(--ink); white-space: nowrap; }
.nav-panel a:hover, .nav-panel a:focus { background: #f1f6ff; text-decoration: none; outline: none; }
.nav-search { display: inline-flex; align-items: center; gap: .35rem; flex: 0 0 auto; min-height: 44px; border: 1px solid var(--line); background: #f8fbff; border-radius: 999px; padding: .15rem .2rem .15rem .7rem; white-space: nowrap; }
.nav-search input { width: clamp(10rem, 14vw, 16rem); height: 36px; border: 0; background: transparent; padding: .35rem .25rem; }
.nav-search input:focus { outline: none; }
.nav-search button { width: 36px; height: 36px; min-height: 36px; border: 1px solid var(--brand); background: #fff; color: var(--brand); border-radius: 999px; padding: 0; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.nav-search button:hover, .nav-search button:focus { background: #eef5ff; outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
button, .button { border: 0; background: var(--brand); color: #fff; padding: .72rem 1rem; border-radius: .8rem; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; min-height: 46px; }
button.secondary, .button.secondary { background: #eaf1fb; color: var(--brand-dark); }
.page { width: min(1160px, calc(100% - 2rem)); margin: 2rem auto 4rem; }
.hero { display: grid; grid-template-columns: 1.3fr .7fr; gap: 1rem; align-items: stretch; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 1.2rem; padding: 1.25rem; box-shadow: 0 12px 30px rgba(21, 43, 80, .06); }
.card h1, .card h2, .card h3 { margin-top: 0; line-height: 1.2; }
.muted { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.list { display: grid; gap: .75rem; }
.item { border: 1px solid var(--line); border-radius: .9rem; padding: .9rem; background: #fbfdff; }
.meta { display: flex; gap: .5rem; flex-wrap: wrap; color: var(--muted); font-size: .92rem; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: .2rem .55rem; background: #edf4ff; color: var(--brand-dark); font-size: .82rem; font-weight: 700; }
.badge.public { background: #e8f7ee; color: var(--ok); }
.badge.confidential, .badge.non_public { background: #fff5e3; color: var(--warn); }
.notice { border-left: 5px solid var(--ok); background: #e8f7ee; padding: .9rem 1rem; border-radius: .8rem; margin-bottom: 1rem; }
.alert { border-left: 5px solid var(--danger); background: #fff0f0; padding: .9rem 1rem; border-radius: .8rem; margin-bottom: 1rem; }
label { display: grid; gap: .35rem; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: .75rem; padding: .75rem; font: inherit; background: #fff; }
textarea { min-height: 9rem; }
.form-grid { display: grid; gap: 1rem; }
.actions { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; }
.table { width: 100%; border-collapse: collapse; overflow: hidden; }
.table th, .table td { text-align: left; border-bottom: 1px solid var(--line); padding: .8rem; vertical-align: top; }
.table th { color: var(--muted); font-size: .9rem; }
.section-title { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin: 2rem 0 1rem; }
.searchbar { display: flex; gap: .7rem; }
.searchbar input { flex: 1; }
.qr-code { display: inline-flex; padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 1rem; margin: .5rem 0 1rem; }
.qr-code svg { width: min(260px, 70vw); height: auto; display: block; }
details { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; }
summary { cursor: pointer; font-weight: 700; color: var(--brand-dark); }
@media (max-width: 760px) {
    .topbar { align-items: flex-start; flex-direction: column; padding: 1rem; }
    .hero { grid-template-columns: 1fr; }
    .searchbar { flex-direction: column; }
    nav { flex-wrap: wrap; justify-content: flex-start; align-items: stretch; width: 100%; }
    .nav-menu, .nav-search, nav > form { width: 100%; }
    .nav-menu { display: grid; }
    .nav-trigger { justify-content: flex-start; width: 100%; background: #eef5ff; }
    .nav-panel { position: static; display: grid; box-shadow: none; margin-top: .35rem; }
    .nav-search input { width: 100%; }
}
