:root { --navy:#0e1c36; --orange:#e36a1e; --ink:#142033; --muted:#5c6b80; --line:#e2e7ee; --paper:#f3f5f8; }
* { box-sizing: border-box; }
body { margin:0; font-family: "Segoe UI", sans-serif; background:var(--paper); color:var(--ink); }
a { color:#9a3f08; }
button, input, select, textarea { font: inherit; }
.login { display:grid; min-height:100vh; }
.login-side { background:var(--navy); color:#f7f4ef; padding:32px 24px; display:flex; flex-direction:column; justify-content:space-between; }
.login-side h1 { font-family: Georgia, serif; font-weight:500; font-size:40px; line-height:1.1; }
.login-form { padding:32px 20px; max-width:460px; margin:0 auto; }
.mark { display:flex; gap:10px; align-items:center; }
.mark strong { font-family: Georgia, serif; font-size:22px; }
.demos { display:grid; gap:8px; margin-top:16px; }
.demos button, .chip { text-align:left; border:1px solid var(--line); background:#fff; border-radius:12px; padding:8px 12px; }
.shell { min-height:100vh; }
.side { display:none; }
.main { min-width:0; }
header.top { position:sticky; top:0; z-index:5; background:rgba(243,245,248,.95); border-bottom:1px solid var(--line); display:flex; gap:8px; align-items:center; flex-wrap:wrap; padding:12px; }
header.top h1 { font-family: Georgia, serif; font-weight:500; font-size:26px; margin:0; flex:1; }
.card { background:#fff; border:1px solid var(--line); border-radius:16px; padding:16px; }
.grid { display:grid; gap:12px; }
.two { grid-template-columns: 1fr; }
@media (min-width: 900px) { .two { grid-template-columns: 1fr 1fr; } }
.stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.stat b { display:block; font-family: Georgia, serif; font-size:32px; font-weight:500; }
label.field { display:grid; gap:4px; font-size:14px; font-weight:600; }
input, select, textarea { border:1px solid #d5dce6; border-radius:10px; padding:8px 10px; background:#fff; width:100%; }
textarea { min-height:70px; }
.btn { display:inline-flex; align-items:center; justify-content:center; border:0; border-radius:10px; background:var(--navy); color:#fff; padding:10px 14px; cursor:pointer; text-decoration:none; }
.btn.orange { background:var(--orange); }
.btn.ghost { background:#fff; color:var(--ink); border:1px solid var(--line); }
.btn.bad { background:#b42318; }
.row { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.pill { display:inline-flex; border-radius:999px; padding:2px 8px; font-size:12px; font-weight:700; background:#eef1f6; }
.pill.good { background:#e7f6ee; color:#1f7a4d; }
.pill.warn { background:#fff4df; color:#9a6700; }
.pill.bad { background:#fde8e6; color:#b42318; }
.pill.orange { background:#fff1e6; color:#9a3f08; }
.hero { background:var(--navy); color:#f7f4ef; border-radius:16px; padding:18px; }
.hero p { margin:6px 0 0; color:rgba(255,255,255,.75); }
.bar { height:8px; background:rgba(255,255,255,.15); border-radius:99px; margin-top:12px; }
.bar span { display:block; height:100%; background:var(--orange); border-radius:99px; }
.flash { margin:12px; padding:10px 12px; border-radius:12px; }
.flash.error { background:#fde8e6; color:#b42318; }
.flash.ok { background:#e7f6ee; color:#1f7a4d; }
.bottom { position:fixed; left:0; right:0; bottom:0; display:grid; grid-template-columns:repeat(5,1fr); background:#fff; border-top:1px solid var(--line); z-index:6; }
.bottom button, .bottom a { border:0; background:transparent; padding:12px 2px; font-size:12px; color:var(--ink); text-decoration:none; }
.content { padding:12px 12px 88px; }
.muted { color:var(--muted); font-size:13px; }
table { width:100%; border-collapse:collapse; font-size:14px; }
th, td { text-align:left; padding:6px; border-top:1px solid var(--line); vertical-align:top; }
.id-card { width:min(100%, 430px); aspect-ratio: 85.6 / 53.98; background:#f7f4ef; border-radius:12px; overflow:hidden; border:1px solid #d5dce6; display:flex; flex-direction:column; }
.id-card header, .id-card footer { background:var(--navy); color:#fff; padding:8px 12px; display:flex; justify-content:space-between; align-items:center; }
.id-card .body { display:flex; gap:8px; padding:8px 12px; flex:1; }
#map { height:420px; border-radius:16px; border:1px solid var(--line); }
.mode button { border:0; background:transparent; color:#fff; padding:8px; border-radius:8px; }
.mode .on { background:#fff; color:var(--navy); }
.mode .on-m { background:var(--orange); color:#fff; }
@media (min-width: 900px) {
  .shell { display:grid; grid-template-columns: 240px 1fr; }
  .side { display:flex; flex-direction:column; justify-content:space-between; background:var(--navy); color:#fff; padding:16px; min-height:100vh; }
  .side a, .side button.nav { color:#fff; text-decoration:none; display:block; text-align:left; background:transparent; border:0; padding:8px 10px; border-radius:8px; width:100%; }
  .side a.on, .side button.nav.on { background:rgba(255,255,255,.15); }
  .bottom { display:none; }
  .content { padding:20px 24px 32px; }
  .login { grid-template-columns: 1.1fr .9fr; }
}
@media print {
  .side, .top, .bottom, .no-print { display:none !important; }
  .shell { display:block; }
  .content { padding:0; }
}
@page idcard { size: 85.6mm 53.98mm; margin: 0; }
