:root {
  --bg: #f4f2ed; --surface: #fff; --surface-2: #faf9f6; --ink: #1c2321; --muted: #5f6864; --line: #e4e1d9;
  --pine: #1f5c4f; --pine-weak: #e4efea; --side: #15302a; --red: #b42318; --red-weak: #fdeceb;
  --amber: #a14006; --amber-weak: #fdf1e1; --blue: #2f5a8f; --blue-weak: #e8eef7; --grey-weak: #eef0ef;
  --radius: 10px; --shadow: 0 1px 2px rgba(20,30,25,.06), 0 4px 14px rgba(20,30,25,.05);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px; color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: var(--pine); }
button, input, select { font: inherit; color: inherit; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 10px; }
code { background: var(--grey-weak); padding: 1px 5px; border-radius: 5px; font-size: 13.5px; overflow-wrap: anywhere; }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.top { background: var(--side); color: #e7f0ec; padding: 14px 24px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.top h1 { color: #fff; font-size: 18px; }
.top .sub { color: #a9c3ba; font-size: 13.5px; }
.top .grow { flex: 1; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 20px 24px 48px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 16px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; }
.btn.primary { background: var(--pine); color: #fff; border-color: var(--pine); }
.btn.ghost { background: transparent; color: #e7f0ec; border-color: #3b5d54; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat .n { font-size: 26px; font-weight: 700; }
.stat .l { color: var(--muted); font-size: 13.5px; }
.stat.bad .n { color: var(--red); }
.banner { border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; border: 1px solid; }
.banner.red { background: var(--red-weak); border-color: #f5c9c5; }
.banner.amber { background: var(--amber-weak); border-color: #f3d7b2; }
.banner.blue { background: var(--blue-weak); border-color: #cbd9ec; }
.banner ul { margin: 6px 0 0; padding-left: 20px; }
.banner li { margin: 3px 0; }
.tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 18px 0 12px; }
.tools input, .tools select { font-size: 16px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: var(--surface); }
.tools input { flex: 1; min-width: 180px; }
.sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.site { display: flex; flex-direction: column; gap: 10px; }
.site.problem { border-color: #f0b3ad; }
.site-head { display: flex; gap: 10px; align-items: flex-start; }
.site-head .names { flex: 1; min-width: 0; }
.site-head b { font-size: 16px; overflow-wrap: anywhere; }
.site-head .label { color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.site a.addr { font-size: 13.5px; overflow-wrap: anywhere; display: inline-block; padding: 4px 0; }
.chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--grey-weak); }
.chip.ok { background: var(--pine-weak); color: var(--pine); }
.chip.bad { background: var(--red-weak); color: var(--red); }
.chip.warn { background: var(--amber-weak); color: var(--amber); }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kv div { background: var(--surface-2); border-radius: 8px; padding: 8px; }
.kv .v { font-weight: 700; font-size: 16px; }
.kv .k { color: var(--muted); font-size: 13px; }
.bar { height: 8px; background: var(--grey-weak); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; background: var(--pine); }
.bar i.warn { background: #d97706; } .bar i.bad { background: var(--red); }
.lines { margin: 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--muted); }
.lines li { padding: 2px 0; }
.lines .bad { color: var(--red); font-weight: 600; }
.lines .warn { color: var(--amber); font-weight: 600; }
.help { margin-top: 22px; }
.help table { width: 100%; border-collapse: collapse; font-size: 14px; }
.help td { padding: 7px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.help td:first-child { width: 46%; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.empty { padding: 26px; text-align: center; color: var(--muted); }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 20px; }
.login { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 12px; }
.login input { min-height: 46px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 16px; }
.error-text { color: var(--red); min-height: 20px; font-size: 14px; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) {
  .wrap { padding: 14px 12px 40px; }
  .top { padding: 12px; }
  .sites { grid-template-columns: 1fr; }
  .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help td { display: block; width: auto !important; border-top: 0; padding: 2px 0; }
  .help tr { display: block; border-top: 1px solid var(--line); padding: 8px 0; }
}
