:root {
  --accent: #41729F; --accent-dark: #345D84; --accent-soft: #D8E3EE; --accent-line: #B7CBDF;
  --ink: #1E2430; --text: #344054; --muted: #667085; --faint: #98A2B3;
  --line: #D3D7DE; --line-soft: #DDE0E6; --bg: #E6E8EC; --bg-soft: #DFE2E7; --surface: #F0F1F4;
  --green: #17915A; --green-soft: #D9ECE3; --amber: #B7791F; --amber-soft: #F2E7D2; --red: #B9493F; --red-soft: #F2DEDB;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
*:focus, *:focus-visible { outline: none; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 Inter, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
h1 { font-size: 20px; line-height: 1.3; margin: 0; color: var(--ink); font-weight: 650; }
h2 { font-size: 15px; margin: 0 0 12px; color: var(--ink); font-weight: 650; }
p { margin: 0 0 10px; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.ink { color: var(--ink); font-weight: 500; }
.link { color: var(--accent); font-weight: 500; }
.link:hover { color: var(--accent-dark); }
.wrapword { word-break: break-all; }
.prewrap { white-space: pre-wrap; margin: 0; }
.grow { flex: 1; min-width: 280px; }
.danger-t { color: var(--red); }

/* Shell */
.shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; }
.side { border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 16px 10px; position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--bg); }
.brand { display: block; font-weight: 700; font-size: 16px; color: var(--ink); padding: 2px 10px 18px; }
.brand img { display: block; height: 18px; width: auto; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--text); font-weight: 500; margin-bottom: 1px; }
.nav-item:hover { background: var(--bg-soft); color: var(--ink); }
.nav-item.on { background: var(--accent-soft); color: var(--accent-dark); }
.nav-sub { margin: 0 0 4px 18px; padding-left: 10px; border-left: 1px solid var(--line); }
.nav-sub a { display: flex; justify-content: space-between; align-items: center; padding: 5px 10px; border-radius: 7px; color: var(--text); margin-bottom: 1px; }
.nav-sub a:hover { background: var(--bg-soft); }
.nav-sub a.on { background: var(--accent-soft); color: var(--accent-dark); font-weight: 500; }
.nav-sub.solo-group { margin: 8px 0 0; padding: 0; border: 0; }
.count { background: var(--accent-soft); color: var(--accent-dark); border-radius: 6px; font-size: 11px; font-weight: 600; padding: 0 6px; line-height: 18px; }
.side-end { margin-top: auto; padding-top: 16px; }
.me { display: flex; align-items: center; gap: 8px; padding: 10px; border-top: 1px solid var(--line); margin-top: 10px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.me div { min-width: 0; }
.me b { display: block; color: var(--ink); font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { display: block; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 24px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.top-action { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 500; background: none; border: 0; padding: 4px 2px; font: inherit; cursor: pointer; }
.top-action:hover { color: var(--ink); }
.wp-admin-link { display: inline-flex; vertical-align: -3px; margin: 0 4px 0 6px; color: var(--muted); }
.wp-admin-link:hover { color: var(--ink); }
.wp-admin-link svg.i { width: 15px; height: 15px; }
.inline-form { display: inline; }
button.wp-admin-link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.wp-admin-link + .wp-admin-link, .wp-admin-link + .inline-form .wp-admin-link { margin-left: 2px; }
.wp-admin-link.spin { color: var(--ink); }
.wp-admin-link.spin svg.i { animation: spin 1.4s linear infinite; }
.star { color: var(--muted); }
.star.on { color: #E8A317; }
.star.on svg { fill: currentColor; }
.page { padding: 24px; flex: 1; min-width: 0; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }

/* Dropdowns without script */
details.drop { position: relative; }
details.drop > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); }
details.drop > summary::-webkit-details-marker { display: none; }
.drop-panel { position: absolute; left: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(16,24,40,.12); padding: 6px; min-width: 280px; max-height: 340px; overflow: auto; z-index: 20; }
.drop-panel.right { left: auto; right: 0; min-width: 340px; }
.drop-panel a { display: block; padding: 7px 10px; border-radius: 7px; }
.drop-panel a:hover { background: var(--bg-soft); }
/* Names come from CSS so Chrome's find-in-page doesn't match them and pop the menus open */
.drop-panel [data-name]::before { content: attr(data-name); }

/* Site page: second column of navigation */
.site-grid { display: grid; grid-template-columns: 204px minmax(0, 1fr); flex: 1; min-width: 0; }
.site-nav { border-right: 1px solid var(--line); padding: 16px 12px; }
.site-page { padding: 24px; min-width: 0; }

/* Blocks */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.stat-i { width: 32px; height: 32px; border-radius: 50%; background: var(--line-soft); display: grid; place-items: center; color: var(--muted); flex: none; }
.stat small { display: block; color: var(--muted); font-size: 12px; }
.stat b { display: block; color: var(--ink); font-weight: 600; font-size: 14px; line-height: 1.35; }
.stat .big { font-size: 22px; font-weight: 650; }
.stat .big.t-good { color: var(--green); } .stat .big.t-bad { color: var(--red); }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--accent-soft); border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; }
.bar .end { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bar select.auto { width: auto; margin: 0; }
.bar label.row { margin: 0; }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; border: 1px solid var(--line); border-radius: 9px; padding: 3px; margin-bottom: 14px; background: var(--surface); }
.filter .tabs { margin-bottom: 0; }
.tabs a { padding: 4px 11px; border-radius: 7px; color: var(--text); font-weight: 500; display: inline-flex; gap: 7px; align-items: center; }
.tabs a:hover { background: var(--bg-soft); }
.tabs a.on { background: var(--accent-soft); color: var(--accent-dark); box-shadow: inset 0 0 0 1px var(--accent-line); }
.tabs em { font-style: normal; font-size: 11.5px; color: var(--accent-dark); }

.empty { text-align: center; background: var(--bg-soft); border-radius: 10px; padding: 34px 16px; color: var(--muted); margin-bottom: 16px; }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12.5px; white-space: nowrap; }
.sort-th { color: inherit; display: inline-flex; gap: 4px; align-items: center; }
.sort-th:hover, .sort-th.on { color: var(--ink); }
.sort-arrow { font-size: 11px; }
th, td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.r:hover { background: var(--bg); }
.site-name { display: flex; align-items: center; gap: 10px; min-width: 240px; }
.site-name a.t { color: var(--ink); font-weight: 600; }
.site-name a.t:hover { color: var(--accent-dark); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.up { background: var(--green); } .dot.down { background: var(--red); }
.initial { width: 26px; height: 26px; border-radius: 7px; background: var(--line-soft); display: grid; place-items: center; font-size: 11.5px; font-weight: 700; color: var(--muted); flex: none; }
tr.faded { opacity: .5; }
.chip { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.chip i { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-style: normal; background: var(--line-soft); color: var(--muted); }
.chip i svg.i { width: 13px; height: 13px; }
.chip i.g { background: var(--green-soft); color: var(--green); }
.chip i.a { background: var(--amber-soft); color: var(--amber); }
.chip i.r { background: var(--red-soft); color: var(--red); }
.chip i.spin svg.i, .top-action.spin svg.i { animation: spin 1.4s linear infinite; }
.top-action.spin { cursor: default; color: var(--muted); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .chip i.spin svg.i, .top-action.spin svg.i { animation: none; } }
.pill { display: inline-block; padding: 0 8px; border-radius: 6px; font-size: 11.5px; line-height: 20px; font-weight: 500; white-space: nowrap; background: var(--line-soft); color: var(--muted); }
.pill.ok, .pill.success { background: var(--green-soft); color: var(--green); }
.pill.warning, .pill.expired { background: var(--amber-soft); color: var(--amber); }
.pill.critical, .pill.failed, .pill.high { background: var(--red-soft); color: var(--red); }
.label-pill { margin-left: 4px; }

/* Rings and charts */
.ring { display: inline-block; vertical-align: middle; }
.ring circle { fill: none; }
.ring .track { stroke: var(--line); }
.ring .good { stroke: var(--green); } .ring .mid { stroke: #E8A317; } .ring .bad { stroke: var(--red); }
.ring text { font: 600 11px Inter, "Segoe UI", Arial, sans-serif; fill: var(--ink); text-anchor: middle; dominant-baseline: central; }
.ring.big text { font-size: 30px; font-weight: 650; }
.t-good { color: var(--green); } .t-mid { color: var(--amber); } .t-bad { color: var(--red); }
.rate { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.rate .num { font-size: 34px; font-weight: 700; color: var(--green); line-height: 1.1; }
.chart { display: block; width: 100%; height: auto; }
.chart .b-ok { fill: #5CAF85; } .chart .b-mid { fill: #E8A317; } .chart .b-bad { fill: var(--red); } .chart .b-none { fill: var(--line); }
.chart .l { fill: none; stroke: var(--accent); stroke-width: 2; }
.chart .a { fill: var(--accent-soft); stroke: none; }
.chart .g { stroke: var(--line-soft); stroke-width: 1; }
.chart text { font: 10px Inter, Arial, sans-serif; fill: var(--muted); }
.two { display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.center { text-align: center; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.metric { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.metric b { display: block; font-size: 18px; color: var(--ink); }
.metric small { color: var(--muted); }

/* Lists */
.find { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); align-items: flex-start; }
.find:last-child { border-bottom: 0; }
.find-i { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; flex: none; background: var(--line-soft); color: var(--muted); }
.find-i.critical { background: var(--red-soft); color: var(--red); } .find-i.warning { background: var(--amber-soft); color: var(--amber); } .find-i.ok { background: var(--green-soft); color: var(--green); }
.find b { display: block; color: var(--ink); font-weight: 500; }
.find small { color: var(--muted); }
details.fold { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
details.fold > summary { padding: 11px 14px; cursor: pointer; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--ink); font-weight: 500; }
details.fold > div { padding: 0 14px 12px; }
.day { display: flex; gap: 10px; align-items: center; color: var(--ink); font-weight: 600; margin: 18px 0 4px; }
.day small { color: var(--muted); font-weight: 400; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 14px; }

/* Forms */
label { display: block; margin-bottom: 5px; color: var(--text); font-size: 13px; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=url], select, textarea {
  width: 100%; padding: 8px 11px; margin-bottom: 14px; color: var(--ink); font: inherit;
  background: var(--surface); border: 1px solid #C4C9D2; border-radius: 8px;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--accent); vertical-align: -2px; margin: 0; }
label.check { display: block; margin: 7px 0; font-weight: 400; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row label.check { margin: 0; display: inline-flex; gap: 6px; align-items: center; }
.row input, .row select { margin-bottom: 0; width: auto; }
.row input[type=text] { min-width: 200px; }
input.code, .row input.code { width: 112px; min-width: 0; margin: 0; letter-spacing: 2px; }
.filter { margin-bottom: 16px; }
.filter > input[type=text] { flex: 1 1 200px; }
.filter select { flex: 0 1 165px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--accent); border-radius: 8px; font: inherit; font-weight: 500; color: #fff; cursor: pointer; background: var(--accent); white-space: nowrap; transition: background .2s ease; }
.btn:hover { background: var(--accent-dark); }
.btn.ghost { background: var(--surface); border-color: #C4C9D2; color: var(--text); }
.btn.ghost:hover { background: var(--bg-soft); color: var(--ink); }
.btn.ghost.danger { color: var(--red); }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.text-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; font-weight: 500; }

.flash, .error { padding: 9px 14px; border-radius: 9px; margin-bottom: 16px; font-weight: 500; }
.flash { background: var(--green-soft); color: var(--green); }
.error { background: var(--red-soft); color: var(--red); }
.secret { display: block; padding: 11px; word-break: break-all; font: 12.5px/1.5 Consolas, monospace; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; color: var(--ink); }
.qr { display: inline-block; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }
.qr svg { display: block; }
.codes { columns: 2; font: 13px/1.9 Consolas, monospace; margin-bottom: 16px; color: var(--ink); }
.pager { margin-top: 14px; }
.pager svg { display: none; }
.pager nav > div:first-child { display: none; }
.pager a, .pager span { margin-right: 6px; }
.narrow { max-width: 400px; margin: 9vh auto; padding: 0 16px; }
.narrow .brand { font-size: 20px; padding: 0 0 18px; }
.report-frame { background: var(--bg-soft); border-radius: 12px; padding: 16px; overflow-x: auto; }
.mine { background: var(--accent-soft); }

@media (max-width: 1000px) {
  .site-grid { grid-template-columns: minmax(0, 1fr); }
  .site-nav { border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 2px; }
  .site-nav .nav-item { display: none; }
  .site-nav .nav-sub { margin: 0; padding: 0; border: 0; display: contents; }
  .site-nav .nav-sub a { display: inline-flex; gap: 5px; padding: 3px 9px; }
  .two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; flex-direction: row; flex-wrap: wrap; gap: 2px; }
  .brand { width: 100%; padding: 2px 8px 8px; }
  .nav-item { padding: 5px 9px; }
  .side > .nav-sub { display: none; }
  .side-end { margin: 0; padding: 0; display: contents; }
  .me { display: none; }
  .top { position: static; padding: 8px 16px; }
  .page, .site-page { padding: 16px; }
  .drop-panel.right { right: auto; left: 0; min-width: 280px; }
  .site-name { min-width: 200px; }
}

.day + .table-wrap td:nth-child(1) { width: 56px; }
.day + .table-wrap td:nth-child(2) { width: 84px; }
.day + .table-wrap td:nth-child(3) { width: 330px; }

.turnstile { margin-bottom: 14px; min-height: 65px; }
.narrow .brand img { height: 24px; }
img.initial { object-fit: contain; background: var(--surface); border: 1px solid var(--line-soft); padding: 2px; }
.site-icon { width: 20px; height: 20px; border-radius: 5px; object-fit: contain; }
.ext-link { color: var(--text); }
.ext-link:hover { color: var(--accent); text-decoration: underline; }
.file-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; }
