:root {
  --bg: #f5f6f8; --card: #fff; --text: #1d2430; --muted: #6b7484; --line: #e3e6eb;
  --brand: #0b6bcb; --brand-ink: #fff; --ok: #1a7f4b; --warn: #a76700; --bad: #c62828;
  --plate: #f6c500;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #12161c; --card: #1b2129; --text: #e6e9ee; --muted: #98a2b3; --line: #2c3440; --brand: #4c9bff; --brand-ink: #0b1220; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--brand); }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.top nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.brand { font-weight: 700; text-decoration: none; color: var(--text); }
main { max-width: 1100px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.5rem; margin: .2em 0 .6em; } h2 { font-size: 1.15rem; margin: 0 0 .6em; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.narrow { max-width: 480px; margin: 24px auto; } .center { text-align: center; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.park { text-decoration: none; color: inherit; } .park:hover { border-color: var(--brand); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; align-items: end; margin-top: 12px; }
.grid-form .wide { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
input, select { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); min-width: 0; }
.btn { display: inline-block; font: inherit; font-weight: 600; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink); text-decoration: none; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; } .btn.danger.ghost { background: transparent; color: var(--bad); margin-top: 12px; }
.btn.big { font-size: 1.1rem; padding: 14px 22px; width: 100%; }
button.link { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; padding: 0; }
.danger { color: var(--bad); }
.inline { display: inline; }
details > summary { list-style: none; cursor: pointer; margin-top: 12px; } details > summary::-webkit-details-marker { display: none; }
details.cam { border-top: 1px solid var(--line); padding: 8px 0; }
.gates { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.gate { display: flex; flex-direction: column; gap: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.right { text-align: right; } .muted { color: var(--muted); } .small { font-size: .85rem; }
tr.blocked td { opacity: .6; }
.plate { display: inline-block; font-family: ui-monospace, Menlo, monospace; font-weight: 700; background: var(--plate); color: #111; border-radius: 4px; padding: 1px 8px; border-left: 6px solid #1f4aa8; }
.tag { display: inline-block; font-size: .75rem; padding: 1px 8px; border-radius: 999px; background: var(--line); color: var(--text); }
.tag.ok { background: #d8f2e3; color: var(--ok); } .tag.warn { background: #fdecc8; color: var(--warn); } .tag.bad { background: #fbdcdc; color: var(--bad); }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; background: #d8f2e3; color: #0f5132; }
.flash.error { background: #fbdcdc; color: #842029; }
@media (max-width: 640px) { th:nth-child(5), td:nth-child(5) { display: none; } }
.armed, button.link.armed { background: var(--bad) !important; border-color: var(--bad) !important; color: #fff !important; padding: 4px 10px; border-radius: 6px; }
.cam-form[data-ctype="autoreg"] .only-http, .cam-form[data-ctype="http"] .only-autoreg { display: none; }
.mono { font-family: ui-monospace, Menlo, monospace; } .btn.small { padding: 6px 10px; font-size: .85rem; }
