:root {
  --bg: #f5f6f8; --card: #fff; --text: #1d2330; --muted: #6b7280; --line: #e3e6eb;
  --brand: #1f5fbf; --brand-ink: #fff;
  --ok: #1a7f4b; --ok-bg: #e7f6ee; --warn: #8a5a00; --warn-bg: #fff4dc; --bad: #b42318; --bad-bg: #fdecea;
  --up: #1f5fbf; --up-bg: #e8f0fc;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--brand); }
h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 16px; margin: 0 0 12px; }

.top { display: flex; align-items: center; gap: 24px; padding: 0 20px; background: #16213a; color: #fff; min-height: 52px; flex-wrap: wrap; }
.top .brand { font-weight: 700; }
.top nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
.top nav a { color: #c9d3e6; text-decoration: none; padding: 16px 10px; border-bottom: 3px solid transparent; }
.top nav a.active, .top nav a:hover { color: #fff; border-bottom-color: #6ea0ff; }
.top .me { font-size: 13px; color: #c9d3e6; }
.top .me a { color: #fff; }

main { max-width: 1280px; margin: 0 auto; padding: 24px 16px 80px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 18px; margin-bottom: 18px; }
.okbox { border-color: #b7e2c9; background: var(--ok-bg); }
.warnbox { border-color: #f0d9a4; background: var(--warn-bg); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.bad { color: var(--bad); }
.nowrap { white-space: nowrap; }
.r { text-align: right; }

table { width: 100%; border-collapse: collapse; background: var(--card); }
table.card { padding: 0; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; }
tr.muted td { opacity: .6; }

.review td { padding: 10px; }
.review tr.has-issue { background: #fffafa; }
.review .big { font-size: 16px; font-weight: 600; }
.line { padding: 4px 0; }
.line + .line { border-top: 1px dashed var(--line); }

.tag { display: inline-block; font: 12px ui-monospace, Menlo, monospace; background: #eef1f5; border-radius: 4px; padding: 1px 6px; }
.badge { display: inline-block; font-size: 11.5px; font-weight: 600; border-radius: 10px; padding: 1px 8px; background: #eef1f5; color: var(--muted); }
.badge.up { background: var(--up-bg); color: var(--up); }
.badge.new { background: var(--ok-bg); color: var(--ok); }
.badge.down { background: #f1ecfb; color: #5b3aa8; }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.note { font-size: 12.5px; border-radius: 6px; padding: 5px 8px; margin: 4px 0; }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.note.bad { background: var(--bad-bg); color: var(--bad); }

.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; background: var(--ok-bg); color: var(--ok); }
.flash.warn { background: var(--warn-bg); color: var(--warn); }
.flash.error { background: var(--bad-bg); color: var(--bad); }
ul.errors { color: var(--bad); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px; text-decoration: none; color: var(--text); display: flex; flex-direction: column; }
.tile .num { font-size: 28px; font-weight: 700; }
.tile.bad .num { color: var(--bad); }

label { display: block; margin-bottom: 12px; font-weight: 600; }
label.check { font-weight: 400; }
label small { display: block; font-weight: 400; margin-top: 4px; }
input, select, button, .button { font: inherit; }
input:not([type=checkbox]):not([type=file]), select { display: block; width: 100%; margin-top: 4px; padding: 7px 9px; border: 1px solid #cfd5dd; border-radius: 6px; background: #fff; }
td select, .inline select, .toolbar input, .note select, .line select { display: inline-block; width: auto; max-width: 420px; margin: 0; }
input.short { width: 80px !important; display: inline-block !important; }
fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 0 0 12px; }
fieldset select { display: inline-block !important; width: auto !important; }
button, .button { display: inline-block; padding: 7px 14px; border-radius: 6px; border: 1px solid #cfd5dd; background: #fff; color: var(--text); cursor: pointer; text-decoration: none; }
button.primary, .button.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
button.link { border: 0; background: none; color: var(--bad); padding: 0; }
.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; align-items: end; }

.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input[type=search] { min-width: 280px; }
.actions.sticky { position: sticky; bottom: 0; background: rgba(245,246,248,.95); padding: 12px 0; display: flex; gap: 8px; border-top: 1px solid var(--line); }
.split { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 16px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.tabs a.active { background: var(--brand); color: #fff; border-color: var(--brand); }
pre { white-space: pre-wrap; font-size: 12px; max-height: 400px; overflow: auto; background: #fff; padding: 10px; border-radius: 6px; }

body.login { display: grid; place-items: center; min-height: 100vh; }
.narrow { width: 340px; }
.narrow button { width: 100%; }

@media (max-width: 720px) {
  .review thead { display: none; }
  .review tr { display: block; border-bottom: 2px solid var(--line); }
  .review td { display: block; border: 0; }
}
