/* ScoutMyDomain admin: same type and tokens as the public site, denser layout, two validated chart hues. */
:root {
  --bg: #f6f7f5; --surface: #ffffff; --surface-2: #eef0ec; --ink: #14181d; --muted: #626b75; --line: rgba(20, 24, 29, .1);
  --accent: #0f9d8a; --accent-soft: rgba(15, 157, 138, .12); --ok: #178a5a; --warn: #b8720a; --bad: #c2413a;
  --s1: #0f9d8a; --s2: #5b5bd6;   /* chart series: validated on the light surface */
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.32, .72, 0, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1214; --surface: #171b1f; --surface-2: #1f242a; --ink: #edf0f2; --muted: #9aa3ac; --line: rgba(255, 255, 255, .1);
          --s1: #22a893; --s2: #7777e0; }   /* validated on the dark surface */
}
*, *::before, *::after { box-sizing: border-box; }
body.admin { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.5; }
a { color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }

.abar { display: flex; align-items: center; gap: 24px; padding: 14px clamp(16px, 3vw, 32px); border-bottom: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.alogo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; font-size: 16px; }
.logo-mark { width: 22px; height: 22px; border-radius: 7px; background: var(--ink); position: relative; flex: none; }
.logo-mark::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 2px solid var(--accent); }
.logo-mark::after { content: ""; position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); top: 3px; right: 3px; }
.anav { display: flex; gap: 4px; flex-wrap: wrap; }
.anav a { text-decoration: none; padding: 7px 12px; border-radius: 999px; color: var(--muted); font-weight: 550; }
.anav a.on { background: var(--accent-soft); color: var(--accent); }
.anav a:hover { color: var(--ink); }
.awho { margin-left: auto; display: flex; gap: 14px; align-items: center; color: var(--muted); }
.amain { max-width: 88rem; margin: 0 auto; padding: 24px clamp(16px, 3vw, 32px) 64px; }
.ahead { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 8px 0 18px; }
h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.025em; font-weight: 680; }
h2 { margin: 24px 0 10px; font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.more { font-size: 13px; color: var(--muted); }
.ranges { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.range { text-decoration: none; padding: 6px 12px; border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 550; }
.range.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 24, 29, .08); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 10px; margin-bottom: 20px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile-label { font-size: 12px; color: var(--muted); }
.tile-value { font-size: 26px; font-weight: 680; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tile-value.sm { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.tile-sub { font-size: 12px; color: var(--muted); }
.tiles.small { grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }

.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); gap: 14px; }
.chart { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 8px; }
.chart figcaption { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; margin-bottom: 10px; }
.legend { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 8px; }
.sw.s1 { background: var(--s1); } .sw.s2 { background: var(--s2); }
.bars { display: flex; align-items: stretch; gap: 6px; height: 170px; }
.day { flex: 1 1 0; display: flex; align-items: flex-end; gap: 2px; padding-bottom: 18px; position: relative; min-width: 0; border-bottom: 1px solid var(--line); }
.bar { flex: 1 1 0; height: 0; border-radius: 4px 4px 0 0; transition: height .8s var(--ease); }
.bar.s1 { background: var(--s1); } .bar.s2 { background: var(--s2); }
.day:hover .bar { filter: brightness(1.15); }
.dlabel { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tablev { margin: 14px 0 6px; } .tablev summary { cursor: pointer; color: var(--muted); font-size: 13px; }

table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-variant-numeric: tabular-nums; }
th { text-align: left; font-weight: 550; color: var(--muted); font-size: 12px; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
td a { text-decoration: none; color: var(--accent); }
td.err { color: var(--bad); overflow-wrap: anywhere; }
.st-available { color: var(--ok); } .st-for_sale { color: var(--warn); } .st-taken { color: var(--muted); } .st-unknown { color: var(--muted); font-style: italic; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); font-size: 11px; color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.pager a, .pager b { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-size: 13px; }
.pager b { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); gap: 18px; }
.alerts { list-style: none; margin: 0 0 14px; padding: 0; }
.alerts li { padding: 8px 12px; border-radius: 10px; background: rgba(184, 114, 10, .14); color: var(--warn); margin-bottom: 6px; }
section { min-width: 0; overflow-x: auto; }

.login { max-width: 22rem; margin: 10vh auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.login h1 { font-size: 22px; margin-bottom: 14px; }
.login label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.login input { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-size: 15px; }
.login input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.primary { border: 0; cursor: pointer; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font: inherit; font-weight: 600; width: 100%; }
.primary:hover { background: var(--accent); color: #fff; }
.alert { background: rgba(194, 65, 58, .12); color: var(--bad); padding: 9px 12px; border-radius: 10px; font-size: 13px; }
@media (max-width: 640px) { .awho { margin-left: 0; } .bars { height: 130px; } }
pre.log { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 12px; line-height: 1.5; overflow-x: auto; max-height: 30rem; white-space: pre-wrap; }
pre.log.tall { max-height: 60rem; }
td.ua { max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.inline-form { margin: 0 0 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ghost { border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 550; }
.ghost:hover { background: var(--accent-soft); color: var(--accent); }
input.mini { width: 4.5rem; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-size: 13px; }
