/* Bruno Admin. The agent site's look (white, slate ink, Bruno's teal used sparingly), laid out for a desk:
   a left sidebar, dense tables, details on the right. On a phone the sidebar becomes a drawer. */
:root {
  --teal: #00ccbb; --teal-ink: #0a9488; --tint: #e2f5f1; --tint-line: #c6ebe3;
  --paper: #ffffff; --fill: #f7f8fa; --fill-2: #f1f3f5;
  --ink: #18202c; --ink-2: #4f5866; --ink-3: #8a919c; --line: #e8eaee; --edge: #d8dce2;
  --slate: #263040; --slate-hover: #323d50;
  --amber: #b7791f; --amber-dot: #f0b429; --amber-bg: #fdf6e9;
  --red: #b42318; --red-dot: #e5484d; --red-bg: #fef3f2; --red-line: #f6d0cc;
  --gray-dot: #b6bcc5;
  --r-sm: 6px; --r-md: 8px; --r-lg: 12px;
  --ring: 0 0 0 3px rgba(0, 204, 187, .3);
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --side: 248px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; font-feature-settings: "ss01"; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.sprite { position: absolute; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 18px; height: 18px; flex: none; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--ink-3); }
.ink2 { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

/* ---------- shell: sidebar + main ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--paper); padding: 14px 12px; }
.brand { display: flex; align-items: center; gap: 9px; padding: 4px 8px 16px; text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.brand b { font-weight: 650; font-size: 18px; letter-spacing: -0.03em; }
.brand span { font-size: 12px; font-weight: 550; color: var(--teal-ink); background: var(--tint); border-radius: var(--r-sm); padding: 1px 7px; margin-left: 2px; }
.nav { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; }
.nav a { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: var(--r-md); color: var(--ink-2); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--fill); color: var(--ink); }
.nav a.on { background: var(--tint); color: var(--teal-ink); font-weight: 550; }
.nav a.on .icon { color: var(--teal-ink); }
.nav .icon { color: var(--ink-3); }
.nav .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--teal); color: var(--ink); font: 600 11.5px/20px var(--sans); text-align: center; font-variant-numeric: tabular-nums; }
.nav .later { margin-left: auto; font-size: 11px; color: var(--ink-3); font-weight: 500; }
.nav a.soon { color: var(--ink-3); }
.nav .group { margin: 14px 10px 4px; font-size: 11.5px; font-weight: 550; color: var(--ink-3); letter-spacing: .02em; }
.me { margin-top: auto; border-top: 1px solid var(--line); padding: 12px 6px 2px; display: flex; align-items: center; gap: 10px; }
.me .av { width: 30px; height: 30px; border-radius: 50%; background: var(--fill-2); color: var(--ink-2); display: grid; place-items: center; font-weight: 600; font-size: 12px; flex: none; }
.me .who { min-width: 0; flex: 1; line-height: 1.25; }
.me .who b { display: block; font-weight: 550; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who small { color: var(--ink-3); font-size: 12px; }
.iconbtn { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 0; background: none; border-radius: var(--r-md); color: var(--ink-3); }
.iconbtn:hover { background: var(--fill); color: var(--ink); }
.top { display: none; }
.scrim { display: none; }

.main { min-width: 0; padding: 28px 36px 64px; max-width: 1360px; width: 100%; }
.head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.head h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.head .sub { color: var(--ink-3); margin-top: 3px; }
.head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); text-decoration: none; font-size: 13px; margin-bottom: 8px; }
.crumb:hover { color: var(--ink); }
.crumb .icon { width: 15px; height: 15px; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: var(--r-md);
  border: 1px solid var(--edge); background: var(--paper); color: var(--ink); font-weight: 550; font-size: 13.5px; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--fill); }
.btn:focus-visible, .in:focus-visible, .nav a:focus-visible, .iconbtn:focus-visible, .row:focus-visible, .tab:focus-visible { outline: none; box-shadow: var(--ring); }
.btn.primary { background: var(--slate); border-color: var(--slate); color: #fff; }
.btn.primary:hover { background: var(--slate-hover); }
.btn.teal { background: var(--teal-ink); border-color: var(--teal-ink); color: #fff; }
.btn.teal:hover { background: #087f75; }
.btn.danger { color: var(--red); border-color: var(--red-line); }
.btn.danger:hover { background: var(--red-bg); }
.btn.danger.solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn .icon { width: 16px; height: 16px; }
.in { height: 36px; width: 100%; padding: 0 11px; border: 1px solid var(--edge); border-radius: var(--r-md); background: var(--paper); }
textarea.in { height: auto; min-height: 84px; padding: 9px 11px; resize: vertical; line-height: 1.45; }
select.in { padding-right: 28px; appearance: none; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%238a919c' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 10px center no-repeat; }
.code-in { font: 500 22px/1 var(--mono); letter-spacing: .3em; text-align: center; height: 48px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-weight: 550; font-size: 13px; }
.field small { color: var(--ink-3); font-size: 12.5px; }
.search { position: relative; flex: 1 1 260px; max-width: 420px; }
.search .icon { position: absolute; left: 10px; top: 9px; width: 17px; height: 17px; color: var(--ink-3); pointer-events: none; }
.search .in { padding-left: 34px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters select.in { width: auto; min-width: 150px; }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 40px; border: 0; background: none; padding: 0; color: var(--ink-3); font-weight: 550; text-decoration: none; white-space: nowrap; }
.tab:hover, .tab.on { color: var(--ink); }
.tab.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--ink); }
.tab .n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--fill-2); color: var(--ink-2); font: 600 11px/18px var(--sans); text-align: center; }
.tab.on .n { background: var(--teal); color: var(--ink); }

/* ---------- status: a dot and words (pills are only for counts) ---------- */
.st { display: inline-flex; align-items: center; gap: 7px; font-weight: 550; white-space: nowrap; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gray-dot); flex: none; }
.st.live { color: var(--teal-ink); } .st.live::before { background: var(--teal-ink); }
.st.wait { color: var(--amber); } .st.wait::before { background: var(--amber-dot); }
.st.bad { color: var(--red); } .st.bad::before { background: var(--red-dot); }
.st.off { color: var(--ink-3); }
.st.ok { color: var(--ink); } .st.ok::before { background: var(--teal); }
.st + .why { display: block; color: var(--ink-3); font-size: 12.5px; font-weight: 400; margin-top: 1px; }

/* ---------- cards, tables, lists ---------- */
.card { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); }
.card + .card { margin-top: 16px; }
.card-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-h h2 { font-size: 14.5px; font-weight: 600; }
.card-h .muted { font-size: 13px; }
.card-h .right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card-b { padding: 16px 18px; }
.empty { padding: 28px 18px; text-align: center; color: var(--ink-3); }
.empty b { display: block; color: var(--ink); font-weight: 550; margin-bottom: 2px; }
.table-wrap { overflow-x: auto; container-type: inline-size; }
/* Columns that need room (.col-600/800/960): hidden when the table's own box is narrower, whether that's a small window
   or a detail page's left column. A .narrow-800 line in another cell carries what a hidden column said. */
td .sub.narrow-800 { display: none; }
@container (max-width: 959px) { .col-960 { display: none; } }
@container (max-width: 799px) { .col-800 { display: none; } td .sub.narrow-800 { display: block; } }
@container (max-width: 599px) { .col-600 { display: none; } }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 550; font-size: 12.5px; color: var(--ink-3); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--fill); }
th:first-child { border-top-left-radius: var(--r-lg); } th:last-child { border-top-right-radius: var(--r-lg); }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.row { cursor: pointer; }
tr.row:hover td { background: var(--fill); }
td .sub, .cell-sub { display: block; color: var(--ink-3); font-size: 12.5px; }
td b { font-weight: 550; }
.thumb { width: 52px; height: 40px; border-radius: var(--r-sm); background: var(--fill-2); object-fit: cover; display: block; }
.thumb.none { display: grid; place-items: center; color: var(--ink-3); font-size: 11px; }
.more { display: flex; justify-content: center; padding: 12px; border-top: 1px solid var(--line); }
.dl { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 9px 16px; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; text-decoration: none; }
a.item:hover { background: var(--fill); }
.item .t { font-weight: 550; }
.item .d { color: var(--ink-2); font-size: 13px; overflow-wrap: anywhere; }
.item .when { margin-left: auto; color: var(--ink-3); font-size: 12.5px; white-space: nowrap; padding-left: 8px; }
.item .go { color: var(--ink-3); width: 16px; height: 16px; margin-top: 2px; }
.mark { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--amber-dot); }
.mark.high { background: var(--red-dot); }
.mark.quiet { background: var(--gray-dot); }
.mark.teal { background: var(--teal); }
.note { border-radius: var(--r-md); padding: 10px 12px; background: var(--fill); color: var(--ink-2); font-size: 13px; }
.note.teal { background: var(--tint); color: #0b5f58; }
.note.amber { background: var(--amber-bg); color: #7a4d0b; }
.note.red { background: var(--red-bg); color: var(--red); }
.note b { font-weight: 600; }
.note + .note, .note + .btns, .btns + .note { margin-top: 10px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btns.gap { margin: 0 0 16px; }
.in.narrow { flex: 1 1 220px; width: auto; max-width: 300px; }

/* ---------- overview ---------- */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 20px; overflow: hidden; }
.metric { display: block; padding: 16px 18px 15px; text-decoration: none; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric:nth-child(4n) { border-right: 0; }
.metric:nth-last-child(-n+4) { border-bottom: 0; }
a.metric:hover { background: var(--fill); }
/* Two numbers in one tile (registered and verified brokers), each a link of its own. */
.metric.pair .part { color: inherit; text-decoration: none; white-space: nowrap; }
.metric.pair .part + .part { margin-left: 14px; }
.metric.pair .part small { margin-left: 5px; font-size: 12.5px; font-weight: 500; letter-spacing: 0; color: var(--ink-3); }
.metric.pair a.part:hover small { color: var(--ink); text-decoration: underline; }
.metric .k { color: var(--ink-3); font-size: 12.5px; font-weight: 500; }
.metric .v { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.25; margin-top: 4px; }
.metric.alert .v { color: var(--red); }
.metric.wait .v { color: var(--amber); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.grid-2 > .card + .card { margin-top: 0; }
.facts { display: flex; gap: 18px; flex-wrap: wrap; color: var(--ink-3); font-size: 12.5px; margin-top: 18px; }
.facts .st { font-weight: 500; }

/* ---------- master / detail (verification) ---------- */
.split { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 16px; align-items: start; }
.split > .card + .card { margin-top: 0; }
.queue a.item.on { background: var(--tint); }
@media (min-width: 901px) { .split > .queue { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; } }
.queue .item .t { display: block; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.photo { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--fill); }
.photo img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: contain; background: #0f141b; cursor: zoom-in; }
.photo figcaption { padding: 7px 10px; font-size: 12.5px; color: var(--ink-2); display: flex; justify-content: space-between; }
.veil { border: 1px dashed var(--edge); border-radius: var(--r-md); padding: 22px; text-align: center; background: var(--fill); }
.veil p { color: var(--ink-2); margin: 6px 0 12px; font-size: 13px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; padding: 7px 0; font-size: 13px; }
.timeline li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gray-dot); margin: 6px 0 0 3px; }
.timeline li.good::before { background: var(--teal-ink); }
.timeline li.bad::before { background: var(--red-dot); }
.timeline li.wait::before { background: var(--amber-dot); }
.timeline .when { color: var(--ink-3); white-space: nowrap; font-size: 12.5px; }
.timeline .what b { font-weight: 550; }
.timeline .what small { display: block; color: var(--ink-3); font-size: 12.5px; }

/* ---------- listing detail ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.detail > div > .card + .card { margin-top: 16px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.gallery button { padding: 0; border: 0; background: var(--fill-2); border-radius: var(--r-md); overflow: hidden; aspect-ratio: 4 / 3; position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery .tag { position: absolute; left: 6px; bottom: 6px; background: rgba(24, 32, 44, .75); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 4px; }
.gallery .gone { opacity: .45; }

/* ---------- renters, tours, conversations ---------- */
.grid-2 + .card { margin-top: 16px; }
.m-show, td .sub.m-show { display: none; } /* phone-only lines (shown again under 900px) */
ul.plain { margin: 0; padding-left: 18px; }
ul.plain li { margin: 3px 0; }
tr.attn td:first-child { box-shadow: inset 3px 0 0 var(--red-dot); }
tr.attn.normal td:first-child { box-shadow: inset 3px 0 0 var(--amber-dot); }
.reasons { display: block; margin-top: 3px; font-size: 12.5px; color: var(--red); line-height: 1.4; }
.reasons.normal { color: var(--amber); }
.privacy { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.privacy .icon { width: 15px; height: 15px; }
.btn .icon, .actions .btn .icon { width: 16px; height: 16px; }
.item .t a { text-decoration: none; }
.item .t a:hover { text-decoration: underline; }
.snip { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.snip.quote { color: var(--ink-2); }
.snip .st { font-weight: 500; font-size: 12.5px; }
.snip .st::before { width: 6px; height: 6px; }
mark { background: #fff1bf; color: inherit; border-radius: 3px; padding: 0 1px; }
/* The texts: theirs on the left, Bruno's on the right in his tint (not .in/.out: .in is the input box). Failed texts in red, held ones dashed. */
.chat { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; max-height: calc(100vh - 240px); min-height: 240px; overflow-y: auto; }
.chat .day { align-self: center; font-size: 12px; color: var(--ink-3); font-weight: 550; margin: 8px 0 0; }
.chat .day:first-child { margin-top: 0; }
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: min(78%, 560px); }
.msg.them { align-self: flex-start; }
.msg.bruno { align-self: flex-end; align-items: flex-end; }
.bubble { padding: 8px 12px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.msg.them .bubble { background: var(--fill-2); border-bottom-left-radius: 4px; }
.msg.bruno .bubble { background: var(--tint); color: #0b3f3a; border-bottom-right-radius: 4px; }
.msg.failed .bubble { background: var(--red-bg); color: var(--red); box-shadow: inset 0 0 0 1px var(--red-line); }
.msg.held .bubble { background: var(--paper); color: var(--ink-2); border: 1px dashed var(--edge); }
.msg.flash .bubble { box-shadow: 0 0 0 3px rgba(0, 204, 187, .45); }
.msg .pic { display: block; font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.msg .meta { display: flex; gap: 4px 8px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.msg.bruno .meta { justify-content: flex-end; }
.msg .meta .st { font-weight: 500; font-size: 12px; gap: 5px; }
.msg .meta .st::before { width: 6px; height: 6px; }
.msg .meta .err-words { color: var(--red); }
.carried { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12.5px; font-weight: 500; color: var(--teal-ink); text-decoration: none;
  border: 1px solid var(--tint-line); border-radius: var(--r-md); padding: 3px 8px; background: var(--paper); }
a.carried:hover { background: var(--tint); }
.carried .icon { width: 14px; height: 14px; }
.older { display: flex; justify-content: center; padding: 10px; border-bottom: 1px solid var(--line); }

/* ---------- analytics & system health (Phase 3) ----------
   Thin teal columns on a hairline baseline, one color for every chart (each chart is one count, so the title names it).
   Days before something was recorded are a gray band, never a zero. Heights are set from admin.js (no inline styles). */
.small { font-size: 12.5px; }
th.r, td.r { text-align: right; }
.seg { display: inline-flex; border: 1px solid var(--edge); border-radius: var(--r-md); padding: 2px; background: var(--fill); }
.seg a { padding: 4px 11px; border-radius: 6px; text-decoration: none; color: var(--ink-2); font-weight: 550; font-size: 13px; white-space: nowrap; }
.seg a:hover { color: var(--ink); }
.seg a.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 20, 27, .1); }
.grid-even { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.grid-even > .card + .card { margin-top: 0; }
.grid-even + .card, .card + .grid-even, .grid-even + .grid-even { margin-top: 16px; }
.grid-even > div > .card + .card { margin-top: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 24px; }
.grid-3 b { display: block; font-weight: 600; margin-bottom: 4px; }
.mults { display: grid; gap: 20px 24px; }
.mults.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mults.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cq { container-type: inline-size; }
@container (max-width: 460px) { .mults.n3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 400px) { .mults.n2, .mults.n3 { grid-template-columns: minmax(0, 1fr); } }
/* Trend cards in pairs of equal height; an odd one out at the end takes the whole row. */
.grid-even.trends { align-items: stretch; }
.grid-even.trends > .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.mult .mh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.mult .mh span { color: var(--ink-2); font-weight: 550; font-size: 13px; }
.mult .mh b { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.mult .about { color: var(--ink-3); font-size: 12px; margin-top: 6px; line-height: 1.4; }
.chart { margin-top: 20px; }
.chart .plot { position: relative; height: 84px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--edge); }
.chart .ytop { position: absolute; right: 0; top: -17px; font-size: 11px; line-height: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chart .bars { position: absolute; inset: 0; display: flex; align-items: stretch; gap: 2px; }
.chart .col { flex: 1 1 0; min-width: 0; display: flex; align-items: flex-end; justify-content: center; }
.chart .col i { display: block; width: 100%; max-width: 24px; height: 0; background: var(--teal-ink); border-radius: 4px 4px 0 0; }
.chart .col.nr i { max-width: none; background: var(--fill-2); border-radius: 0; }
.chart .col.hover { background: var(--fill); }
.chart .col.hover i { background: #087f75; }
.chart .col.nr.hover i { background: var(--line); }
.chart .xaxis { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.chart.line svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart.line path { fill: none; stroke: var(--teal-ink); stroke-width: 2px; stroke-linejoin: round; stroke-linecap: round; }
.chart.line .dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--teal-ink); box-shadow: 0 0 0 2px var(--paper); pointer-events: none; }
.chart.line .hits .col.hover { background: rgba(10, 148, 136, .07); }
.tip { position: fixed; z-index: 80; pointer-events: none; background: var(--slate); color: #fff; font-size: 12.5px; padding: 5px 9px; border-radius: var(--r-sm);
  white-space: nowrap; box-shadow: 0 6px 18px rgba(15, 20, 27, .2); }
.tip b { font-weight: 650; }
.funnel { display: block; height: 8px; width: 100%; border-radius: 4px; background: var(--fill-2); overflow: hidden; margin-top: 6px; }
.funnel-table .bar-cell { width: 34%; }
.funnel i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--teal-ink); }
.funnel-table td { vertical-align: top; }
.num-table td, .num-table th { padding-top: 7px; padding-bottom: 7px; }
.num-table th { white-space: normal; vertical-align: bottom; }
.mult .table-wrap { border: 1px solid var(--line); border-radius: var(--r-md); }
@media (max-width: 900px) { .num-table td, .num-table th { padding-left: 8px; padding-right: 8px; } }

/* ---------- sign-in ---------- */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--fill); }
.gate .box { width: 100%; max-width: 400px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 26px 24px; }
.gate .box.wide { max-width: 520px; }
.gate .brand { padding: 0 0 18px; }
.gate h1 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 4px; }
.gate .lede { color: var(--ink-2); margin-bottom: 18px; }
.gate .btn.primary { width: 100%; height: 40px; }
.gate .foot { margin-top: 16px; color: var(--ink-3); font-size: 12.5px; display: flex; gap: 6px; align-items: center; }
.gate .foot .icon { width: 14px; height: 14px; }
.err { color: var(--red); font-size: 13px; margin: -4px 0 12px; }
.qr { display: grid; grid-template-columns: 148px 1fr; gap: 16px; align-items: center; margin: 4px 0 16px; }
.qr img { width: 148px; height: 148px; border: 1px solid var(--line); border-radius: var(--r-md); }
.secret { font: 500 13px/1.6 var(--mono); background: var(--fill); border-radius: var(--r-sm); padding: 6px 8px; word-break: break-all; user-select: all; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font: 500 14px/1.7 var(--mono); background: var(--fill); border-radius: var(--r-md); padding: 12px 16px; margin: 6px 0 14px; user-select: all; }
.tick { display: flex; gap: 9px; align-items: flex-start; margin: 4px 0 16px; font-size: 13.5px; }
.tick input { margin-top: 3px; accent-color: var(--teal-ink); }

/* ---------- dialogs and toasts ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(15, 20, 27, .42); display: grid; place-items: center; padding: 16px; }
.dialog { width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--paper); border-radius: var(--r-lg); box-shadow: 0 20px 50px rgba(15, 20, 27, .25); }
.dialog .dh { padding: 18px 20px 4px; }
.dialog .dh h2 { font-size: 16.5px; font-weight: 600; letter-spacing: -0.01em; }
.dialog .db { padding: 10px 20px 4px; color: var(--ink-2); }
.dialog .db ul { margin: 8px 0 12px; padding-left: 18px; }
.dialog .db li { margin: 3px 0; }
.dialog .df { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; }
.viewer { position: fixed; inset: 0; z-index: 60; background: rgba(10, 13, 18, .92); display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; background: var(--slate); color: #fff; padding: 10px 16px; border-radius: var(--r-md);
  font-weight: 500; box-shadow: 0 8px 24px rgba(15, 20, 27, .25); max-width: calc(100vw - 32px); }
.toast.bad { background: var(--red); }
.loading { padding: 40px 0; color: var(--ink-3); text-align: center; }
.soon-card { max-width: 640px; }
.soon-card ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); }
.soon-card li { margin: 4px 0; }

/* ---------- smaller screens ---------- */
/* Between a phone and a wide screen (a laptop with the menu open), the list gives the record more room, and nothing
   is wider than the window (found at 995 px on the test server). */
@media (min-width: 901px) and (max-width: 1180px) { .split { grid-template-columns: minmax(220px, 260px) minmax(0, 1fr); } }
@media (max-width: 1180px) { .hide-t { display: none; } }
@media (max-width: 1100px) {
  .detail { grid-template-columns: minmax(0, 1fr); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .grid-even, .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 40; left: 0; top: 0; width: 272px; transform: translateX(-100%); transition: transform .2s ease; }
  .shell.open .side { transform: none; box-shadow: 0 0 40px rgba(15, 20, 27, .18); } /* only when open: closed, it would shade the page's left edge */
  .shell.open .scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(15, 20, 27, .3); }
  .top { display: flex; align-items: center; gap: 6px; position: sticky; top: 0; z-index: 20; height: 54px; padding: 0 10px; background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .top .brand { padding: 0; }
  .top .brand svg { width: 26px; height: 26px; }
  .main { padding: 18px 16px 48px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(4n) { border-right: 1px solid var(--line); }
  .metric:nth-child(2n) { border-right: 0; }
  .metric:nth-last-child(-n+4) { border-bottom: 1px solid var(--line); }
  .metric:nth-last-child(-n+2) { border-bottom: 0; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split.has-detail > .queue { display: none; }
  .split:not(.has-detail) > .pane { display: none; }
  .head h1 { font-size: 20px; }
  .head .actions { margin-left: 0; width: 100%; }
  .hide-m { display: none; }
  td, th { padding: 10px 10px; }
  .dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .dl dd { margin-bottom: 8px; }
  .qr { grid-template-columns: 1fr; justify-items: center; }
  .msg { max-width: 88%; }
  td .sub.m-show, td .reasons.m-show { display: block; }
  td.nowrap .sub { white-space: normal; }
  td .st { white-space: normal; }
  td .sub { overflow-wrap: anywhere; }
  .metric.pair .part + .part { margin-left: 10px; }
  .chat { max-height: 70vh; padding: 12px; }
}
@media (min-width: 901px) { .split > .pane .crumb.m-only { display: none; } }
