/* Built with Baron client dashboard. Base: the house dashboard style (skill `dashboard`, copied 2026-11-27).
   This project's own parts: the BRAND block, the dark neutrals, and everything after "BWB additions".
   Nate's house dashboard style. Model: shadcn/ui "dashboard-01" (Nate's pick, 2026-11-26), as it turned out on the
   Yellowbirdie shop desk (2026-11-26/27): a neutral work area inside a branded frame (ink sidebar with the logo,
   brand-colour active item, brand rule under the top bar, brand edge on each KPI card, brand-coloured chart).
   Neutral values are shadcn's default theme (ui.shadcn.com/docs/theming, 2026-11-26). --ok and --warn are ours.
   Copy this file into the project; do not hot-link it. To brand it, change ONLY the BRAND block. */

:root {
  color-scheme: light dark;            /* follows the device until the sidebar's Theme switch puts class="light" or "dark" on <html> */

  /* ── BRAND: Built with Baron (site/css/site.css). The futuristic variant of the house standard: dark first. ── */
  --primary: #58e0d8;                  /* the teal of the logo mark: what you press, the open tab, the KPI edge */
  --primary-foreground: #04201f;       /* 10.6:1 on the teal */
  --brand-ink: #08090a;                /* the site's background: the sidebar in both modes */
  --brand-paper: #f7f8f8;
  --brand-rule: light-dark(#0c7f79, rgb(88 224 216 / 32%));
  --chart-1: light-dark(#0c7f79, #58e0d8);   /* 4.85:1 on white, 4.53:1 on --muted; the teal itself is 1.6:1 on white */
  --link: light-dark(#0c7f79, #58e0d8);
  --font-display: "Inter", var(--font);

  --radius: 0.625rem;
  --background: light-dark(oklch(1 0 0), #08090a);
  --foreground: light-dark(oklch(0.145 0 0), oklch(0.985 0 0));
  --card: light-dark(oklch(1 0 0), #0d0e10);
  --muted: light-dark(oklch(0.97 0 0), #17191c);
  --muted-foreground: light-dark(oklch(0.5 0 0), #9aa0a9);
  --border: light-dark(oklch(0.922 0 0), oklch(1 0 0 / 10%));
  --ring: light-dark(oklch(0.556 0 0), oklch(0.708 0 0));
  --destructive: light-dark(oklch(0.577 0.245 27.325), oklch(0.704 0.191 22.216));
  --ok: light-dark(oklch(0.52 0.14 155), oklch(0.75 0.16 155));
  --warn: light-dark(oklch(0.58 0.14 75), oklch(0.80 0.15 80));
  /* chart series in this order. One series = --chart-1 (in BRAND); take -2..-5 from the dataviz skill when a chart needs them */
  --font: "Inter", ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --gap: 1.5rem;                        /* between panels. Spacing steps: 4, 8, 12, 16 and 24px only */
  --sidebar-w: 16rem;
  --tap: 2.25rem;
}
:root.light { color-scheme: light; }
:root.dark { color-scheme: dark; }
@media (pointer: coarse), (max-width: 768px) { :root { --tap: 2.75rem; --gap: 1rem; } }   /* 44px taps on a phone */

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--background); color: var(--foreground);
  font: 14px/1.5 var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted-foreground); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* ---- shell: ink sidebar + main ---- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  background: var(--brand-ink); color: var(--brand-paper);
  /* the neutrals recomputed on ink. Status red uses its dark-mode step: the light one fails on ink */
  --muted-foreground: color-mix(in oklch, var(--brand-paper) 65%, var(--brand-ink));
  --border: color-mix(in oklch, var(--brand-paper) 18%, var(--brand-ink));
  --ring: var(--primary); --destructive: oklch(0.704 0.191 22.216);
  padding: 0.5rem; display: flex; flex-direction: column; gap: 0.25rem;
  position: sticky; top: 0; height: 100dvh; overflow-y: auto;
}
/* the lockup: logo on a paper disc with a brand ring, the name in the display face, the product name in the brand colour */
.brand { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 0.75rem; padding: 0.5rem 0.5rem 1rem; color: inherit; text-decoration: none; }
.brand .mark { grid-row: span 2; width: 40px; height: 40px; }
.mark { display: grid; place-items: center; padding: 2px; border-radius: 50%; background: var(--brand-paper); color: var(--brand-ink);
  box-shadow: 0 0 0 2px var(--primary); font: 600 1rem/1 var(--font-display); object-fit: contain; }
.brand b { font: 600 1rem/1.2 var(--font-display); }
.brand small { font-size: 12px; line-height: 1.2; color: var(--primary); }
.sidebar .group { font-size: 12px; color: var(--muted-foreground); padding: 1rem 0.5rem 0.25rem; }
.sidebar a:not(.brand) {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: var(--tap); padding: 0 0.5rem;
  border-radius: calc(var(--radius) - 2px); color: inherit; text-decoration: none;
}
.sidebar a:not(.brand):hover { background: color-mix(in oklch, var(--brand-paper) 10%, var(--brand-ink)); }
.sidebar a:not(.brand)[aria-current="page"] { background: var(--primary); color: var(--primary-foreground); font-weight: 500; }
/* a count inside the active item turns ink too: a status colour on the brand fill fails contrast */
.sidebar a[aria-current="page"] .badge { color: inherit; border-color: color-mix(in oklch, var(--primary-foreground) 30%, var(--primary)); }
.sidebar .foot { margin-top: auto; }

.topbar {
  display: flex; align-items: center; gap: 0.5rem; min-height: 3rem; padding: 0.25rem 1.5rem;
  border-bottom: 2px solid var(--brand-rule); position: sticky; top: 0; background: var(--background); z-index: 1;
}
.topbar h1 { font: 600 1.0625rem/1.25 var(--font-display); margin: 0 auto 0 0; min-width: 0; }
.topmark { display: none; text-decoration: none; }   /* the logo in the top bar, phone only: on a desktop the sidebar carries it */
.topmark .mark { width: 32px; height: 32px; }
.updated { font-size: 12px; color: var(--muted-foreground); }
.menu-btn { display: none; }

.content { padding: 1.5rem; display: grid; gap: var(--gap); }

/* ---- controls ---- */
.btn, select {
  font: inherit; color: inherit; background: var(--background); border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px); min-height: var(--tap); padding: 0 0.75rem; cursor: pointer;
}
.btn:hover { background: var(--muted); }
.btn.primary { background: var(--primary); color: var(--primary-foreground); border-color: transparent; }
/* segmented control: a muted track, the chosen one raised */
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--muted); border-radius: var(--radius); }
.seg button { font: inherit; color: var(--muted-foreground); background: transparent; border: 1px solid transparent;
  border-radius: calc(var(--radius) - 4px); min-height: calc(var(--tap) - 8px); padding: 0 0.75rem; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--background); color: var(--foreground); border-color: var(--border); font-weight: 500; }
/* in the sidebar (the Theme switch): full width on ink, the choice in the brand colour */
.sidebar .seg { display: flex; background: color-mix(in oklch, var(--brand-paper) 10%, var(--brand-ink)); }
.sidebar .seg button { flex: 1; }
.sidebar .seg button:hover { background: var(--border); color: var(--brand-paper); }
.sidebar .seg button[aria-pressed="true"] { background: var(--primary); color: var(--primary-foreground); border-color: transparent; }

/* ---- card ---- */
.card {
  background: var(--card); border-radius: calc(var(--radius) + 4px);
  border: 1px solid color-mix(in oklch, var(--foreground) 10%, transparent);
  padding: 1rem; display: flex; flex-direction: column; gap: 1rem; min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; flex-wrap: wrap; }
.card-title { font-size: 1rem; font-weight: 600; margin: 0; }
.card-sub { color: var(--muted-foreground); margin: 0; }
.tools { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---- KPI row: the brand edge on every KPI card ---- */
.kpis { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.services { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)); }   /* three across on a laptop, one on a phone */
.kpi { border-top: 3px solid var(--primary); gap: 0.5rem; }
.kpi .label { color: var(--muted-foreground); }
.kpi .value { font-size: 1.75rem; font-weight: 600; line-height: 1.1; }
.kpi .note { font-weight: 500; }
.badge {
  display: inline-flex; align-items: center; gap: 0.25rem; white-space: nowrap;
  font-size: 12px; font-weight: 500; border: 1px solid var(--border); border-radius: 999px; padding: 0 0.5rem;
}
/* status is always a word or arrow first; colour is extra */
.badge.ok { color: var(--ok); }
.badge.warn { color: var(--warn); }
.badge.bad { color: var(--destructive); }

/* ---- charts: the shadcn/ui chart look (ui.shadcn.com/charts), drawn by hand with no library (Nate, 2026-11-26).
   One hue, faint grid lines, rounded bars, 12px labels and a hover card on every mark. Each mark sits in a .slot, the
   hover target (.mark is the logo here). The numbers are printed too; the card adds the long form. ---- */
.tip {
  display: none; position: absolute; z-index: 2; width: max-content; max-width: 160px; gap: 4px; padding: 8px;
  background: var(--background); border: 1px solid color-mix(in oklch, var(--border) 50%, transparent); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgb(0 0 0 / 12%); color: var(--foreground);
  font-size: 12px; font-weight: 400; line-height: 1.4; text-align: left; white-space: normal; pointer-events: none;
}
.slot:hover .tip { display: grid; }
.tip b { font-weight: 500; }
.tip span { display: flex; align-items: center; gap: 8px; }
.tip span i { flex: none; width: 10px; height: 10px; border-radius: 2px; background: var(--chart-1); }   /* the series swatch */
/* horizontal bars ("Bar Chart - Horizontal"): label, bar, value; each row is one hover target */
.bars { display: grid; grid-template-columns: minmax(70px, auto) minmax(60px, 1fr) auto; gap: 8px 16px; }
.bars .slot { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; }
.bars .lbl { font-size: 12px; color: var(--muted-foreground); text-align: right; }
.bars .t { position: relative; }
.bars .t > i { display: block; height: 24px; min-width: 2px; border-radius: 5px; background: var(--chart-1); }
.bars .t > i.zero { min-width: 0; }
.bars .val { font-size: 12px; text-align: right; white-space: nowrap; }
.bars .tip { bottom: calc(100% + 4px); left: 0; }
/* the trend card's columns and line: grid lines at quarters, one slot per week (the plot's full height), the week under it.
   A slot in the right half (.flip) opens its card leftward, so it stays on a 360px screen. */
.plot {
  --grid: color-mix(in oklch, var(--border) 50%, transparent);
  position: relative; display: grid; grid-template-columns: repeat(var(--n, 12), minmax(0, 1fr)); height: 160px; margin-top: 24px;
  border-bottom: 1px solid var(--grid); background: linear-gradient(var(--grid) 1px, transparent 0) 0 0 / 100% 25%;
}
.plot > .slot { position: relative; display: flex; align-items: flex-end; justify-content: center; }
.plot .tip { top: 0; left: 90%; }
.plot .flip .tip { left: auto; right: 90%; }
.lbls { display: grid; grid-template-columns: repeat(var(--n, 12), minmax(0, 1fr)); margin-top: 8px; color: var(--muted-foreground); font-size: 12px; text-align: center; white-space: nowrap; }
.columns .slot > i { position: relative; width: 80%; min-height: 2px; border-radius: 8px; background: var(--chart-1); }
.columns .slot > i.zero { min-height: 0; }
.columns .slot > i > b, .linechart .dot > b {
  position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  font-size: 12px; font-style: normal; font-weight: 400; white-space: nowrap;
}
/* the line: the path is SVG stretched to the plot; the dots are HTML so they stay round, and grow under the pointer */
.linechart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.linechart polyline { fill: none; stroke: var(--chart-1); stroke-width: 2px; stroke-linejoin: round; stroke-linecap: round; }
.linechart .dot { position: absolute; left: 50%; width: 8px; height: 8px; margin: 0 0 -4px -4px; border-radius: 50%; background: var(--chart-1); box-shadow: 0 0 0 2px var(--card); }
.linechart .slot:hover .dot { width: 12px; height: 12px; margin: 0 0 -6px -6px; }
/* the trend card's footer: the direction in words with a neutral icon, then both numbers and their weeks */
.trendfoot { display: grid; gap: 4px; margin-top: 16px; }
.trendfoot p { margin: 0; }
.trendfoot p:first-child { font-weight: 500; }
.trendfoot p:first-child > span { white-space: nowrap; }   /* the last word and the icon stay on one line */
.trendfoot svg { margin-left: 8px; vertical-align: -3px; }

/* ---- table: on a phone, a table with class="stack" turns each row into label/value lines (td data-label) ---- */
.table-wrap { overflow-x: auto; margin-inline: -1rem; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.5rem 1rem; border-bottom: 1px solid var(--border); }
th { font-weight: 500; color: var(--muted-foreground); background: var(--muted); white-space: nowrap; }
td.num, th.num { text-align: right; white-space: nowrap; }
tbody tr:hover { background: color-mix(in oklch, var(--muted) 60%, transparent); }
tbody tr:last-child td { border-bottom: 0; }

/* ---- states: every panel needs all three ---- */
.state { display: grid; place-items: center; align-content: center; flex: 1; text-align: center; gap: 0.5rem; min-height: 8rem; color: var(--muted-foreground); }
.skeleton { background: var(--muted); border-radius: calc(var(--radius) - 2px); min-height: 1rem; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* ---- sign-in card: the full logo above the form ---- */
.signin { width: min(24rem, calc(100% - 2rem)); margin: 12vh auto 0; text-align: center; }
.signin .logo { align-self: center; width: 120px; height: 120px; }

/* ---- phone ---- */
@media (max-width: 768px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(var(--sidebar-w), 80vw); z-index: 2; translate: -100% 0; transition: translate 0.2s; }
  .nav-open .sidebar { translate: 0 0; box-shadow: 0 0 0 100vmax rgb(0 0 0 / 40%); }
  .menu-btn { display: inline-flex; align-items: center; }
  .topmark { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); flex: none; }
  .topbar, .content { padding-inline: 1rem; }
  .seg button { min-height: var(--tap); }
  .lbls > span:nth-last-child(even) { visibility: hidden; }   /* every other week, counted from the newest so it always shows */
  .columns.long .slot > i > b:not(.key) { display: none; }   /* $ values collide on a phone: print the key points only (not the card's label) */
  .stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .stack, .stack tbody, .stack tr, .stack td { display: block; }
  .stack tr { padding: 0.5rem 1rem; border-bottom: 1px solid var(--border); }
  .stack tr:last-child { border-bottom: 0; }
  .stack td { border: 0; padding: 0.25rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .stack td::before { content: attr(data-label); color: var(--muted-foreground); text-align: left; }
}

/* ════ BWB additions (2026-11-27). Nate: "create it in the theme of the builtwithbaron website". ════ */

/* Futuristic frame, dark mode only (every effect is transparent in light): a faint 64px grid fading from the top
   right, a soft glow behind it and a glass top bar. */
:root { --fx-line: light-dark(transparent, rgb(255 255 255 / 3.5%)); --fx-glow: light-dark(transparent, rgb(88 224 216 / 10%));
  --in-border: light-dark(oklch(0.82 0 0), rgb(255 255 255 / 16%)); }
.main { position: relative; min-width: 0; }
.main::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 420px; pointer-events: none;
  background:
    radial-gradient(600px 300px at 85% 0, var(--fx-glow), transparent 70%),
    linear-gradient(var(--fx-line) 1px, transparent 0) 0 0 / 64px 64px,
    linear-gradient(90deg, var(--fx-line) 1px, transparent 0) 0 0 / 64px 64px;
  mask-image: radial-gradient(900px 420px at 85% 0, #000, transparent 75%);
}
.topbar { background: light-dark(var(--background), rgb(8 9 10 / 72%)); backdrop-filter: blur(12px); border-bottom-width: 1px; }
.content { position: relative; }
.sidebar { border-right: 1px solid rgb(255 255 255 / 8%); }
.mark { border-radius: 10px; background: #111315; box-shadow: 0 0 0 1px rgb(88 224 216 / 32%); padding: 6px; }
a { color: var(--link); }
.sample { background: var(--destructive); color: #fff; border-color: transparent; font-weight: 600; }

/* section heads in the mono face with a small glowing square (the site's .kicker) */
.sec { display: flex; align-items: center; gap: 8px; font: 500 12px/1.2 var(--mono); color: var(--muted-foreground); margin: 0; }
.sec::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--chart-1); flex: none;
  box-shadow: 0 0 10px light-dark(transparent, var(--primary)); }

/* ---- forms ---- */
.form { display: grid; gap: 1rem; }
.form.two { grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); align-items: start; }
.field { display: grid; gap: 4px; min-width: 0; }
.field > span { font-weight: 500; }
.field small { color: var(--muted-foreground); }
.wide { grid-column: 1 / -1; }
.in { font: inherit; color: inherit; background: var(--background); border: 1px solid var(--in-border); width: 100%;
  border-radius: calc(var(--radius) - 2px); min-height: var(--tap); padding: 0.375rem 0.75rem; }
select { border-color: var(--in-border); }
textarea.in { min-height: 6rem; resize: vertical; line-height: 1.5; }
.check { display: flex; align-items: flex-start; gap: 0.5rem; min-height: var(--tap); padding: 0.375rem 0; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--chart-1); }
.check small { display: block; color: var(--muted-foreground); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; text-decoration: none; white-space: nowrap; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.danger { color: var(--destructive); }
.btn.link { border-color: transparent; background: none; color: var(--link); padding-inline: 0.25rem; }
.savebar { position: sticky; bottom: 0; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem;
  padding: 0.75rem 1rem; margin: 0 -1rem -1rem; background: var(--card); border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius); }
.msg { margin: 0; }
.msg.ok { color: var(--ok); }
.msg.bad { color: var(--destructive); }

/* sub-tabs (agent settings): a scrolling row; the open one carries the brand colour */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border); }
.tabs button { font: inherit; color: var(--muted-foreground); background: none; border: 0; border-bottom: 2px solid transparent;
  min-height: var(--tap); padding: 0 0.75rem; white-space: nowrap; cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--foreground); border-bottom-color: var(--chart-1); font-weight: 500; }

/* list + detail (calls, texts, requests) */
.split { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.list { display: grid; }
.list button { all: unset; box-sizing: border-box; display: grid; gap: 2px; width: 100%; padding: 0.75rem 1rem; cursor: pointer;
  border-bottom: 1px solid var(--border); }
.list button:last-child { border-bottom: 0; }
.list button:hover { background: color-mix(in oklch, var(--muted) 60%, transparent); }
.list button:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.list button[aria-current="true"] { background: var(--muted); box-shadow: inset 2px 0 0 var(--chart-1); }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.row b { font-weight: 500; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.turns { display: grid; gap: 0.5rem; }
.turn { max-width: 85%; padding: 0.5rem 0.75rem; border-radius: var(--radius); background: var(--muted); overflow-wrap: anywhere; white-space: pre-wrap; }
.turn.me { justify-self: end; background: color-mix(in oklch, var(--primary) 16%, var(--card)); }
.turn small { display: block; color: var(--muted-foreground); }
audio { width: 100%; }
dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 1rem; margin: 0; }
dl.facts dt { color: var(--muted-foreground); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
.meter { height: 8px; border-radius: 99px; background: var(--muted); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--chart-1); border-radius: 99px; }
.stackv { display: grid; gap: 1rem; }
.signin form { display: grid; gap: 0.75rem; text-align: left; width: min(22rem, 100%); }
.who { padding: 0.5rem; font-size: 12px; color: var(--muted-foreground); overflow-wrap: anywhere; }
.who b { display: block; color: var(--brand-paper); font-size: 14px; font-weight: 500; }
.sidebar select { width: 100%; background: var(--brand-ink); color: inherit; border-color: var(--border); }
#links { display: grid; gap: 0.25rem; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.grow { flex: 1 1 12rem; min-width: 0; }
label.group { display: block; }
[hidden] { display: none !important; }

@media (max-width: 768px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split.open > :first-child, .split:not(.open) > :last-child { display: none; }
  .turn { max-width: 95%; }
}
@media (min-width: 769px) { .back, .menu-btn { display: none; } }
