:root { --blue:#0b5cab; --blue-d:#084482; --bg:#f3f6fa; --card:#fff; --ink:#18212b; --mute:#5b6b7b; --line:#d9e1ea; --ok:#1a7f45; --warn:#b45309; --bad:#b42318; --amber:#fff4d6; }
* { box-sizing: border-box; }
html, body { margin:0; background:var(--bg); color:var(--ink); font:16px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif; }
body { padding-bottom: env(safe-area-inset-bottom); }
#app { max-width: 760px; margin: 0 auto; min-height: 100vh; padding-bottom: 84px; }
header.top { position: sticky; top:0; z-index:5; background:var(--blue); color:#fff; display:flex; align-items:center; gap:8px; padding:10px 14px; padding-top: calc(10px + env(safe-area-inset-top)); }
header.top h1 { font-size:18px; margin:0; flex:1; }
header.top select, header.top button { background:rgba(255,255,255,.15); color:#fff; border:1px solid rgba(255,255,255,.35); border-radius:8px; padding:6px 8px; min-height:36px; font:inherit; }
header.top select option { color:#000; }
.badge-count { background:#e11d48; color:#fff; border-radius:10px; padding:0 6px; font-size:12px; margin-inline-start:4px; }
.pilot { background:var(--amber); color:#6b4a00; font-size:13px; padding:6px 14px; }
main { padding: 14px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px; margin-bottom:12px; }
.card h2 { font-size:17px; margin:0 0 10px; }
.card h3 { font-size:15px; margin:12px 0 6px; }
.row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.between { justify-content:space-between; }
.grow { flex:1; }
.mute { color:var(--mute); font-size:14px; }
label.f { display:block; margin:10px 0; font-size:14px; color:var(--mute); }
label.f > span { display:block; margin-bottom:4px; }
input, select, textarea { width:100%; font:inherit; color:var(--ink); background:#fff; border:1px solid #b9c5d1; border-radius:8px; padding:10px; min-height:44px; }
input[type=checkbox], input[type=radio] { width:22px; height:22px; min-height:0; flex:none; }
textarea { min-height:80px; }
button { font:inherit; min-height:44px; border-radius:10px; border:1px solid var(--blue); background:var(--blue); color:#fff; padding:8px 16px; cursor:pointer; }
button.sec { background:#fff; color:var(--blue); }
button.bad { background:#fff; color:var(--bad); border-color:var(--bad); }
button.ok { background:var(--ok); border-color:var(--ok); }
button:disabled { opacity:.5; cursor:not-allowed; }
button.lnk { background:none; border:none; color:var(--blue); padding:4px 6px; min-height:0; text-decoration:underline; }
.chip { display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); background:#fff; border-radius:999px; padding:6px 12px; margin:3px; min-height:40px; font-size:15px; cursor:pointer; }
.chip.on { background:#e6f0fb; border-color:var(--blue); }
.chip.safety { background:#fff4d6; border-color:#e0b100; }
.status { display:inline-block; padding:2px 10px; border-radius:999px; font-size:13px; background:#e5ecf4; color:#24425f; }
.status.active { background:#dcf5e5; color:var(--ok); } .status.expired, .status.rejected { background:#fde4e1; color:var(--bad); }
.status.signing, .status.review, .status.sent { background:#fff0cc; color:var(--warn); } .status.closed { background:#e8e8ee; color:#444; }
.permit-item { display:block; text-decoration:none; color:inherit; }
.permit-item.need { border-inline-start:5px solid #f59e0b; }
.tag { font-size:12px; background:#fff4d6; border:1px solid #e0b100; color:#7a5800; border-radius:6px; padding:1px 6px; margin-inline-start:6px; }
.bar { height:10px; background:#e5ecf4; border-radius:6px; overflow:hidden; margin:6px 0; }
.bar > i { display:block; height:100%; background:var(--blue); } .bar.full > i { background:var(--bad); }
.sig { display:flex; gap:10px; align-items:flex-start; padding:10px 0; border-bottom:1px solid var(--line); }
.sig:last-child { border-bottom:none; }
.dot { width:28px; height:28px; border-radius:50%; background:#e5ecf4; display:flex; align-items:center; justify-content:center; flex:none; font-size:14px; }
.dot.done { background:var(--ok); color:#fff; } .dot.next { background:#f59e0b; color:#fff; }
.banner { padding:10px 12px; border-radius:10px; margin-bottom:12px; background:#e6f0fb; }
.banner.ok { background:#dcf5e5; } .banner.warn { background:#fff0cc; } .banner.bad { background:#fde4e1; }
.tabs { display:flex; gap:6px; margin-bottom:10px; } .tabs button { flex:1; }
nav.bottom { position:fixed; inset-inline:0; bottom:0; background:#fff; border-top:1px solid var(--line); display:flex; justify-content:space-around; padding:6px 4px calc(6px + env(safe-area-inset-bottom)); z-index:6; max-width:760px; margin:0 auto; }
nav.bottom a { flex:1; text-align:center; text-decoration:none; color:var(--mute); padding:8px 4px; font-size:13px; border-radius:8px; }
nav.bottom a.on { color:var(--blue); font-weight:600; background:#e6f0fb; }
#toast { position:fixed; inset-inline:12px; bottom:90px; background:#222; color:#fff; padding:12px 14px; border-radius:10px; display:none; z-index:20; max-width:720px; margin:0 auto; }
#toast.show { display:block; } #toast.err { background:var(--bad); }
table { width:100%; border-collapse:collapse; font-size:14px; } th, td { text-align:start; padding:8px 6px; border-bottom:1px solid var(--line); vertical-align:top; }
.notif { padding:10px 0; border-bottom:1px solid var(--line); } .notif.unread { font-weight:600; }
.media-grid { display:flex; flex-wrap:wrap; gap:8px; } .media-grid img, .media-grid video { width:110px; height:110px; object-fit:cover; border-radius:8px; border:1px solid var(--line); }
.cert { background:#fff; padding:18px; border:1px solid #888; }
.offline { background:#b42318; color:#fff; padding:6px 14px; font-size:13px; }
ul.plain { list-style:none; padding:0; margin:0; } ul.plain li { padding:4px 0; }
.small { font-size:13px; } code, .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size:12px; word-break: break-all; }
@media print { header.top, nav.bottom, .noprint, .pilot, #toast { display:none !important; } body, .cert { background:#fff; } #app { padding:0; max-width:none; } }
