
:root { --bg: #f3f5f9; --panel: #fff; --line: #e1e6ee; --soft: #f7f9fc; --text: #17202c; --muted: #667085;
  --brand: #0f2a4a; --accent: #1d64d8; --accent-soft: #e9f1fe; --ok: #13804c; --ok-soft: #e7f6ee;
  --warn: #a35f00; --warn-soft: #fff5e3; --bad: #c4302b; --bad-soft: #fdeeee; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
header.top { background: var(--brand); color: #fff; height: 58px; display: flex; align-items: center; gap: 32px; padding: 0 28px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand:hover { text-decoration: none; }
.logo { background: #fff; color: var(--brand); font-weight: 800; font-size: 13px; border-radius: 7px; padding: 3px 7px; letter-spacing: .02em; }
.brand b { font-size: 17px; }
.brand small { color: #9fb3cc; font-size: 13px; }
header nav { display: flex; gap: 22px; align-self: stretch; }
header nav a { color: #c9d6e6; display: flex; align-items: center; border-bottom: 3px solid transparent; padding-top: 3px; }
header nav a:hover { color: #fff; text-decoration: none; }
header nav a.on { color: #fff; border-bottom-color: #63a4ff; }
header .right { margin-left: auto; font-size: 14px; }
header .right a { color: #c9d6e6; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 26px 28px 70px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
h1 { font-size: 26px; line-height: 1.25; margin: 0; font-weight: 650; }
h2 { font-size: 17px; margin: 0 0 4px; font-weight: 650; }
.head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 18px; }
.head .facts { display: flex; flex-wrap: wrap; gap: 8px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 18px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.card.flat { padding: 0; overflow: hidden; }
.card.warnbox { border-color: #f0d29b; background: var(--warn-soft); }
.hint { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }
.count { display: inline-block; min-width: 20px; text-align: center; font-size: 12px; border-radius: 999px; padding: 0 7px; margin-left: 6px; background: #e8ecf2; color: var(--muted); }
.count.warn { background: var(--warn); color: #fff; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: #edf0f5; color: #475467; white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--accent-soft); color: var(--accent); }
.pill-link:hover { text-decoration: none; filter: brightness(.97); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 13px; font-weight: 600; color: #344054; }
.grow { flex: 1; min-width: 200px; }
input, select, textarea { background: #fff; color: var(--text); border: 1px solid #cfd6e1; border-radius: 8px; padding: 9px 11px; font: inherit; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(29, 100, 216, .18); border-color: var(--accent); }
input.mono, .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
input.valid { border-color: var(--ok); }
input.invalid { border-color: var(--bad); }
textarea { width: 100%; min-height: 150px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 14px; }
.check { font-size: 13px; min-height: 20px; color: var(--muted); }
.check.ok { color: var(--ok); } .check.bad { color: var(--bad); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: #fff; color: var(--text); border: 1px solid #cfd6e1;
  border-radius: 8px; padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--soft); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #1957bd; }
.btn.primary[disabled] { background: #9dbbe9; border-color: #9dbbe9; cursor: not-allowed; }
.btn.danger { color: var(--bad); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.okay { color: var(--ok); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.link { border: 0; background: none; color: var(--accent); padding: 0; font-weight: 600; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.flash { border-radius: 10px; padding: 11px 15px; margin-bottom: 18px; font-weight: 500; display: flex; align-items: center; gap: 14px; }
.flash form { margin: 0; }
.flash.warn { background: var(--warn-soft); color: #7a4700; border: 1px solid #f0d29b; }
.flash.ok { background: var(--ok-soft); color: #0d5c37; border: 1px solid #b7e2cb; }
.flash.bad { background: var(--bad-soft); color: #8f1f1b; border: 1px solid #f3c2c0; }
table { width: 100%; border-collapse: collapse; }
table.fixed { table-layout: fixed; }
table.fixed td { overflow-wrap: anywhere; }
th, td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: var(--soft); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfd; }
tr.new { background: var(--ok-soft) !important; }
td form { display: inline; margin: 0; }
td.actions { text-align: right; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.dev b { display: block; font-weight: 600; }
.dev .mono { font-size: 13px; color: var(--muted); }
.group { margin-bottom: 18px; }
.ghead { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.vnum { font-family: ui-monospace, Consolas, monospace; font-weight: 700; background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 1px 8px; }
.ghead b { font-size: 16px; }
.ghead .muted { margin-left: auto; font-size: 14px; }
.gempty { padding: 14px 16px; color: var(--muted); font-size: 14px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 14px; }
.toolbar input[type=search] { flex: 1; min-width: 240px; }
.chip { border: 1px solid #cfd6e1; background: #fff; color: #344054; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
details.menu { position: relative; display: inline-block; }
details.menu summary { list-style: none; }
details.menu summary::-webkit-details-marker { display: none; }
details.menu .pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .14); padding: 14px; width: 330px; text-align: left; white-space: normal; }
details.menu .pop .field { margin-bottom: 10px; }
details.menu .pop input, details.menu .pop select { width: 100%; }
.addcard h2 { margin-bottom: 2px; }
.addgrid { display: grid; grid-template-columns: minmax(230px, 270px) minmax(180px, 1fr) minmax(190px, 240px) auto; gap: 12px; align-items: start; }
.addgrid .btn { margin-top: 26px; }
.bulk { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
.step .num { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: #e8ecf2; color: var(--muted); }
.step.done .num { background: var(--ok); color: #fff; }
.step.next { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.step.next .num { background: var(--accent); color: #fff; }
.step b { display: block; }
.step span { font-size: 13px; color: var(--muted); }
.sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.site { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; color: inherit; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.site:hover { border-color: var(--accent); text-decoration: none; box-shadow: 0 4px 14px rgba(29, 100, 216, .12); }
.site b { font-size: 17px; }
.site .nums { display: flex; gap: 22px; }
.site .nums div { display: flex; flex-direction: column; }
.site .nums strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.site .nums span { font-size: 12px; color: var(--muted); }
.site.add { border-style: dashed; background: transparent; box-shadow: none; justify-content: center; }
.site.add:hover { border-color: var(--line); box-shadow: none; }
.site.add input { width: 100%; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.guide { margin: 0; padding-left: 22px; }
.guide li { margin-bottom: 14px; }
pre { background: #0f1b2b; color: #e3ebf6; border-radius: 8px; padding: 11px 13px; overflow-x: auto; margin: 8px 0 0; font-size: 13px; }
.secret { display: flex; gap: 10px; align-items: center; background: var(--warn-soft); border: 1px solid #f0d29b; border-radius: 8px; padding: 10px 12px; }
.secret code { flex: 1; overflow-wrap: anywhere; }
.empty { text-align: center; color: var(--muted); padding: 44px 20px; }
.empty b { display: block; color: var(--text); font-size: 18px; margin-bottom: 6px; }
.empty .btn { margin-top: 16px; }
.danger-zone { border-color: #f3c2c0; }
.radio { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; cursor: pointer; }
.radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio input { margin-top: 4px; }
.radio span { font-size: 13px; color: var(--muted); display: block; }
.login { display: grid; min-height: 100vh; place-items: center; background: var(--brand); }
.login form { background: #fff; border-radius: 14px; padding: 30px; width: 360px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.login .logo { background: var(--brand); color: #fff; }
.login input { width: 100%; margin: 18px 0 12px; }
.login .btn { width: 100%; }
[hidden] { display: none !important; }
.qr svg { width: 100%; height: auto; display: block; }
@media (max-width: 900px) {
  .addgrid { grid-template-columns: 1fr; } .addgrid .btn { margin-top: 0; }
  .steps { grid-template-columns: 1fr; } .wrap { padding: 18px; } header.top { padding: 0 16px; gap: 16px; }
  .brand small { display: none; } th:nth-child(3), td:nth-child(3) { display: none; }
}
