/* Freedom Strawz staff admin */
:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --hover: #f1f4f8;
  --border: #e4e8ee;
  --border-strong: #d0d6e0;
  --text: #0f1729;
  --text-2: #4a5568;
  --muted: #6b7486;
  --accent: #1c5cab;
  --accent-hover: #184f95;
  --btn: #1c5cab;
  --btn-hover: #184f95;
  --focus: rgba(42, 120, 214, .35);
  --series-1: #2a78d6;
  --series-wash: rgba(42, 120, 214, .08);
  --grid: #edf0f4;
  --axis: #c9d0da;
  --good: #0ca30c;
  --good-ink: #006300;
  --good-wash: rgba(12, 163, 12, .10);
  --critical: #d03b3b;
  --critical-ink: #b42323;
  --critical-wash: rgba(208, 59, 59, .09);
  --warning: #fab219;
  --warning-ink: #855600;
  --warning-wash: rgba(250, 178, 25, .16);
  --info-wash: rgba(42, 120, 214, .09);
  --nav-bg: #0d1a30;
  --nav-text: #a9b8d3;
  --nav-hover: rgba(255, 255, 255, .06);
  --nav-active: rgba(255, 255, 255, .11);
  --shadow: 0 1px 2px rgba(15, 23, 41, .04), 0 1px 3px rgba(15, 23, 41, .06);
  --shadow-lg: 0 12px 32px -12px rgba(15, 23, 41, .28), 0 2px 6px rgba(15, 23, 41, .06);
  --radius: 12px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a1120;
    --surface: #111a2e;
    --surface-2: #0e1628;
    --hover: #172238;
    --border: #1e2a42;
    --border-strong: #2a3854;
    --text: #eef2f8;
    --text-2: #b4bfd2;
    --muted: #8893a8;
    --accent: #6da7ec;
    --accent-hover: #86b6ef;
    --btn: #2a78d6;
    --btn-hover: #3987e5;
    --focus: rgba(57, 135, 229, .45);
    --series-1: #3987e5;
    --series-wash: rgba(57, 135, 229, .10);
    --grid: #1a2539;
    --axis: #2c3a55;
    --good-ink: #3fc23f;
    --good-wash: rgba(12, 163, 12, .16);
    --critical-ink: #f07a7a;
    --critical-wash: rgba(208, 59, 59, .16);
    --warning-ink: #fab219;
    --warning-wash: rgba(250, 178, 25, .12);
    --info-wash: rgba(57, 135, 229, .14);
    --nav-bg: #070d1a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lg: 0 12px 32px -12px rgba(0, 0, 0, .7);
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11"; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: .92em; }
:focus-visible { outline: 2px solid var(--series-1); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 1.5rem; padding: 1.25rem .9rem 1rem; background: var(--nav-bg); color: var(--nav-text); }
.side::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, #c8102e 0 33.3%, #f6efe0 0 66.6%, #5fb2ff 0); }
.side__brand { display: flex; align-items: center; gap: .7rem; padding: .35rem .5rem; color: #fff; }
.side__brand:hover { color: #fff; text-decoration: none; }
.side__brand img { width: 36px; height: 36px; border-radius: 50%; background: #fff; }
.side__brand strong { display: block; font-size: 15px; font-weight: 650; letter-spacing: -.01em; line-height: 1.2; }
.side__brand small { display: block; font-size: 12px; color: var(--nav-text); }
.side__nav { display: grid; gap: 2px; }
.side__nav a, .side__link { display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; border-radius: 8px; color: var(--nav-text); font-weight: 500; }
.side__nav a:hover, .side__link:hover { background: var(--nav-hover); color: #fff; text-decoration: none; }
.side__nav a[aria-current] { background: var(--nav-active); color: #fff; }
.side__nav a[aria-current] .icon { color: #5fb2ff; }
.side__foot { margin-top: auto; display: grid; gap: .5rem; }
.me { display: flex; align-items: center; gap: .65rem; padding: .75rem .5rem 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.me__avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: #1f3a66; color: #fff; font-weight: 600; font-size: 13px; }
.me__who { min-width: 0; flex: 1; line-height: 1.3; }
.me__who strong { display: block; color: #fff; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me__who small { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--nav-text); cursor: pointer; }
.icon-btn:hover { background: var(--nav-hover); color: #fff; }

.main { padding: 2rem clamp(1rem, 3vw, 2.5rem) 3rem; max-width: 1320px; width: 100%; }
.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 1.5rem; margin-bottom: 1.5rem; }
.top h1 { font-size: 24px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
.top__sub { margin-top: .2rem; color: var(--muted); }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.seg a { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .75rem; border-radius: 7px; color: var(--text-2); font-weight: 500; font-size: 13px; white-space: nowrap; }
.seg a:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.seg a[aria-current] { background: var(--text); color: var(--surface); }
.mode-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.mode-dot--test { background: var(--warning); }

/* ---------- notices ---------- */
.flashes { display: grid; gap: .5rem; margin-bottom: 1.25rem; }
.flash, .notice { display: flex; gap: .65rem; align-items: flex-start; padding: .75rem 1rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.flash .icon, .notice .icon { margin-top: 1px; }
.flash--success .icon { color: var(--good); }
.flash--error { border-color: color-mix(in srgb, var(--critical) 35%, var(--border)); background: var(--critical-wash); }
.flash--error .icon { color: var(--critical); }
.flash--warning, .notice--warning { border-color: color-mix(in srgb, var(--warning) 45%, var(--border)); background: var(--warning-wash); }
.flash--warning .icon, .notice--warning .icon { color: var(--warning-ink); }
.flash--info .icon, .notice--info .icon { color: var(--series-1); }
.notice--info { background: var(--info-wash); border-color: color-mix(in srgb, var(--series-1) 25%, var(--border)); box-shadow: none; }
.notice { margin-bottom: 1.25rem; }
.notice--inline { margin: 0 0 1rem; box-shadow: none; }

/* ---------- cards & layout ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.tile, .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.tile { padding: 1.1rem 1.25rem 1.15rem; }
.tile__label { color: var(--text-2); font-weight: 500; font-size: 13px; }
.tile__value { margin: .35rem 0 .3rem; font-size: 28px; font-weight: 650; letter-spacing: -.025em; line-height: 1.15; }
.tile__delta { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .4rem; color: var(--muted); font-size: 12.5px; }
.delta { display: inline-flex; align-items: center; gap: .15rem; font-weight: 600; }
.delta .icon { width: 14px; height: 14px; stroke-width: 2.2; }
.delta--up { color: var(--good-ink); }
.delta--down { color: var(--critical-ink); }
.delta--flat { color: var(--text-2); }

.card { padding: 1.25rem 1.5rem 1.5rem; margin-bottom: 1rem; min-width: 0; }
.card__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1.25rem; }
.card__head h2 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: .6rem; }
.card__head p { color: var(--muted); font-size: 13px; margin-top: .15rem; }
.card__foot { margin-top: 1rem; color: var(--muted); font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 + .card, .card + .grid-2 { margin-top: 1rem; }
.grid-2 { margin-bottom: 1rem; }
.places { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.5rem; align-items: start; }

.empty { display: grid; justify-items: center; text-align: center; gap: .35rem; padding: 2.5rem 1rem; color: var(--muted); }
.empty__icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: .4rem; border-radius: 12px; background: var(--series-wash); color: var(--series-1); }
.empty__icon .icon { width: 22px; height: 22px; }
.empty strong { color: var(--text); font-weight: 600; font-size: 14px; }
.empty p { max-width: 26rem; }
.empty--small { padding: 1.5rem 1rem; }

/* ---------- charts ---------- */
.chart { margin: 0; }
.chart__plot { position: relative; height: 240px; margin: .6rem 0 0 3.25rem; border-radius: 0; }
.chart__plot:focus-visible { outline-offset: 6px; }
.chart__grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--grid); }
.chart__grid--base { border-top-color: var(--axis); }
.chart__grid > span { position: absolute; right: calc(100% + .7rem); top: -.65em; color: var(--muted); font-size: 12px; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart__cols { position: absolute; inset: 0; display: flex; align-items: stretch; }
.chart__col { flex: 1 1 0; min-width: 0; display: flex; align-items: flex-end; justify-content: center; padding: 0 1px; border-radius: 4px 4px 0 0; }
.chart__bar { width: 100%; max-width: 24px; background: var(--series-1); border-radius: 4px 4px 0 0; }
.chart__col.is-active { background: var(--series-wash); }
.chart__col.is-active .chart__bar { filter: brightness(1.12) saturate(1.05); }
.chart__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart__area { fill: var(--series-1); fill-opacity: .1; }
.chart__line { fill: none; stroke: var(--series-1); stroke-width: 2px; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart__cross { position: absolute; top: 0; bottom: 0; width: 1px; margin-left: -.5px; background: var(--axis); pointer-events: none; }
.chart__dot { position: absolute; width: 10px; height: 10px; margin: 0 0 -5px -5px; border-radius: 50%; background: var(--series-1); box-shadow: 0 0 0 2px var(--surface); pointer-events: none; }
.chart__dot[hidden], .chart__cross[hidden], .chart__tip[hidden] { display: none; }
.chart__tip { position: absolute; top: .25rem; z-index: 2; display: grid; gap: .05rem; padding: .45rem .7rem; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); pointer-events: none; white-space: nowrap; }
.chart__tip strong { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.chart__tip span { color: var(--text-2); font-size: 12px; }
.chart__x { display: flex; margin: .55rem 0 0 3.25rem; }
.chart__x span { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; color: var(--muted); font-size: 12px; white-space: nowrap; }

.table-view { margin-top: 1.1rem; border-top: 1px solid var(--border); padding-top: .8rem; }
.table-view summary { cursor: pointer; color: var(--text-2); font-size: 13px; font-weight: 500; width: max-content; }
.table-view summary:hover { color: var(--text); }
.table-view .table-wrap { max-height: 320px; overflow: auto; margin-top: .6rem; }

/* ---------- tables ---------- */
.table-wrap { position: relative; overflow-x: auto; margin: 0 -1.5rem; padding: 0 1.5rem; }  /* relative: keeps .sr-only text inside the scroll box */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--muted); padding: 0 .75rem .6rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: .7rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table th:first-child, .table td:first-child { padding-left: 0; }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .nowrap { white-space: nowrap; }
.table--compact td { padding-block: .45rem; }
.table small { display: block; color: var(--muted); font-size: 12.5px; }
.table .is-muted td { color: var(--muted); }
.cell-main { font-weight: 500; }
.items { margin: 0; padding: 0; list-style: none; }
.items li { white-space: nowrap; }

.meter { display: block; height: 6px; margin-top: .4rem; border-radius: 999px; background: var(--grid); overflow: hidden; }
.meter > span { display: block; height: 100%; min-width: 2px; border-radius: 999px; background: var(--series-1); }

.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .1rem .55rem; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 1.5; white-space: nowrap; background: var(--hover); color: var(--text-2); border: 1px solid var(--border); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge--good { background: var(--good-wash); color: var(--good-ink); border-color: transparent; }
.badge--good::before { background: var(--good); opacity: 1; }
.badge--critical { background: var(--critical-wash); color: var(--critical-ink); border-color: transparent; }
.badge--critical::before { background: var(--critical); opacity: 1; }
.badge--warning { background: var(--warning-wash); color: var(--warning-ink); border-color: transparent; }
.badge--warning::before { background: var(--warning); opacity: 1; }
.badge--plain::before { display: none; }
.code { display: inline-block; padding: .05rem .45rem; border-radius: 6px; background: var(--hover); border: 1px solid var(--border); font: 500 12.5px var(--mono); letter-spacing: .02em; }

/* ---------- funnel ---------- */
.funnel { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.funnel li { display: grid; grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr) 4.5rem 3.5rem; align-items: center; gap: 1rem; }
.funnel__bar { height: 24px; border-radius: 0 4px 4px 0; background: var(--grid); overflow: hidden; }
.funnel__bar > span { display: block; height: 100%; min-width: 2px; background: var(--series-1); border-radius: 0 4px 4px 0; }
.funnel .num { text-align: right; font-variant-numeric: tabular-nums; }
.funnel .pct { color: var(--muted); }

/* ---------- forms ---------- */
.form { display: grid; gap: 1rem; max-width: 34rem; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-row--host { grid-template-columns: minmax(0, 1fr) 7.5rem; }
.form-row--end { align-items: end; }
.field { display: grid; gap: .35rem; align-content: start; }
.field > span { font-weight: 500; font-size: 13px; }
.field small { color: var(--muted); font-size: 12.5px; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], select, textarea { width: 100%; height: 40px; padding: 0 .8rem; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: var(--shadow); transition: border-color .12s, box-shadow .12s; }
textarea { height: auto; min-height: 6.5rem; padding: .55rem .8rem; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--series-1); box-shadow: 0 0 0 3px var(--focus); }
input[type="checkbox"] { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--btn); }
.field > span em { margin-left: .3rem; font-style: normal; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.field .field__error { color: var(--critical-ink); font-weight: 500; }
.field--error input, .field--error select, .field--error textarea, .field--error .affix > span { border-color: var(--critical); }
fieldset.field { min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset.field > legend { padding: 0; margin-bottom: .6rem; }
.field > .affix { display: flex; font-weight: 400; font-size: 14px; }
.affix > span { display: grid; place-items: center; padding: 0 .7rem; border: 1px solid var(--border-strong); border-right: 0; border-radius: 8px 0 0 8px; background: var(--surface-2); color: var(--muted); font-size: 13px; white-space: nowrap; }
.affix > input { min-width: 0; border-radius: 0 8px 8px 0; }
.check { display: flex; align-items: center; gap: .55rem; font-weight: 500; cursor: pointer; }
.hint { color: var(--muted); font-size: 12.5px; }
input[type="file"] { width: 100%; font: inherit; font-size: 13px; color: var(--text-2); }
input[type="file"]::file-selector-button { height: 36px; margin-right: .75rem; padding: 0 .9rem; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: 600 13px var(--font); box-shadow: var(--shadow); cursor: pointer; }
input[type="file"]::file-selector-button:hover { background: var(--hover); }
input.mono { font-family: var(--mono); font-size: 13px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; height: 40px; padding: 0 1rem; border-radius: 8px; border: 1px solid transparent; font: 600 14px var(--font); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn--primary { background: var(--btn); color: #fff; box-shadow: var(--shadow); }
.btn--primary:hover { background: var(--btn-hover); }
.btn--secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow); }
.btn--secondary:hover { background: var(--hover); }
.link-btn { display: inline-flex; align-items: center; gap: .3rem; margin-top: .3rem; padding: 0; border: 0; background: none; color: var(--accent); font: 500 12.5px var(--font); cursor: pointer; }
.link-btn:hover { color: var(--accent-hover); text-decoration: underline; }
.link-btn .icon { width: 14px; height: 14px; }
.plate-slogan { font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.btn--small { height: 32px; padding: 0 .7rem; font-size: 13px; }
.btn--danger { background: var(--critical); color: #fff; box-shadow: var(--shadow); }
.btn--danger:hover { background: color-mix(in srgb, var(--critical) 85%, #000); }
.btn:disabled { cursor: not-allowed; opacity: .55; }
.btn--block { width: 100%; }
.btn .icon { width: 16px; height: 16px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }

.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .75rem 2rem; margin: 0; }
.kv dt { color: var(--muted); font-size: 13px; padding-top: .1rem; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv dd small { display: block; color: var(--muted); font-size: 12.5px; margin-top: .1rem; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.subhead { font-size: 14px; font-weight: 600; margin-bottom: .25rem; }
.subhead + p { color: var(--muted); font-size: 13px; margin-bottom: 1rem; }
.endpoint { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding: .85rem 1rem; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.endpoint code { flex: 1 1 16rem; min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.endpoint p { flex-basis: 100%; color: var(--muted); font-size: 12.5px; }
.endpoint p code { font-size: 12px; }
.kv + .endpoint, .muted + .endpoint { margin-top: 1.25rem; }
.endpoint + .form { margin-top: 1.25rem; }

/* ---------- products ---------- */
.crumb { display: inline-flex; align-items: center; gap: .2rem; margin: 0 0 .3rem -.2rem; color: var(--muted); font-size: 13px; font-weight: 500; }
.crumb .icon { width: 16px; height: 16px; }
.table th .sort { display: inline-flex; align-items: center; gap: .25rem; color: inherit; }
.table th .sort:hover { color: var(--text); text-decoration: none; }
.table th[aria-sort] { color: var(--text); }
.table th .sort .icon { width: 13px; height: 13px; stroke-width: 2.2; }
.table tbody tr:target td { background: var(--info-wash); }
.table small.delta { display: flex; justify-content: flex-end; gap: .1rem; margin-top: .1rem; }
.product-cell { display: flex; align-items: flex-start; gap: .8rem; min-width: 15rem; }
.product-cell .badge { margin-top: .35rem; }
.actions-cell { text-align: right; white-space: nowrap; }
.actions-cell .btn + .btn { margin-left: .25rem; }
.thumb, .preview__art { display: grid; place-items: center; flex: none; overflow: hidden; aspect-ratio: 4 / 3; background: radial-gradient(circle at 50% 40%, #1c3866, #0a1428 75%); }
.thumb { width: 56px; border-radius: 6px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb__illo { display: grid; place-items: center; width: 100%; height: 100%; }
.thumb__illo svg, .preview__art svg { width: 92%; height: 92%; }
.preview__art img { width: 100%; height: 100%; object-fit: cover; }
.dot { display: inline-block; width: 16px; height: 16px; flex: none; border-radius: 50%; border: 1px solid rgba(10, 20, 40, .35); background: linear-gradient(135deg, var(--c0) 0 34%, var(--c1) 34% 67%, var(--c2) 67%); }

.product-form { display: grid; grid-template-columns: minmax(0, 36rem) minmax(0, 280px); justify-content: space-between; align-items: start; gap: 2rem; }
.product-form .form { max-width: none; }
.product-form .divider { margin: .5rem 0; }
.product-form .subhead { margin: 0; }
.product-form .subhead + p, .product-form .form-row + .hint { margin: -.6rem 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .7rem .3rem .55rem; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); font-size: 13px; cursor: pointer; }
.chip:hover { background: var(--hover); }
.chip:has(input:checked) { border-color: var(--series-1); background: var(--info-wash); }
.preview { position: sticky; top: 1.5rem; display: grid; gap: .2rem; padding: 1rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.preview__label { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.preview__art { margin: .4rem 0 .6rem; border-radius: 8px; }
.preview__name { font-weight: 600; overflow-wrap: anywhere; }
.preview__meta { color: var(--text-2); font-size: 13px; }

/* The switch that puts a product on the store or takes it off. */
.switch-card { padding: 1rem 1.5rem; }
.switch-card.is-off { background: var(--warning-wash); border-color: color-mix(in srgb, var(--warning) 45%, var(--border)); box-shadow: none; }
.switch-row { display: flex; align-items: flex-start; gap: .9rem; }
.switch-row__label { font-weight: 600; }
.switch-row__help { color: var(--text-2); font-size: 13px; }
.switch-row__note { color: var(--muted); font-size: 12.5px; }
.switch-row__note:empty { display: none; }
.switch { position: relative; flex: none; width: 44px; height: 24px; margin-top: 1px; padding: 0; border: 0; border-radius: 999px; background: var(--muted); cursor: pointer; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 41, .35); transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--good); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.switch:focus-visible { border-radius: 999px; outline-offset: 3px; }
.switch:disabled { cursor: not-allowed; opacity: .5; }
.switch[aria-busy="true"] { cursor: progress; }

/* ---------- customers ---------- */
.card__tools { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.search { position: relative; }
.search .icon { position: absolute; top: 50%; left: .65rem; width: 16px; height: 16px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 15rem; height: 32px; padding-left: 2rem; font-size: 13px; }
.person { display: flex; align-items: flex-start; gap: .7rem; min-width: 14rem; color: inherit; }
.person:hover { text-decoration: none; }
.person:hover .cell-main { color: var(--accent); text-decoration: underline; }
.person .badge { margin-top: .3rem; }
.person__avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--series-wash); color: var(--series-1); font-weight: 600; font-size: 13px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 1rem; color: var(--muted); font-size: 13px; }
.stack { display: grid; gap: 1rem; align-content: start; }
.stack > .card { margin-bottom: 0; }
.card__action { margin-top: 1.25rem; }
.card--danger { border-color: color-mix(in srgb, var(--critical) 35%, var(--border)); }
.card--danger h2 .icon { color: var(--critical); }

/* ---------- sign-in ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; background: radial-gradient(900px 520px at 85% 0%, rgba(95, 178, 255, .16), transparent 60%), radial-gradient(700px 480px at 0% 100%, rgba(200, 16, 46, .16), transparent 60%), #0d1a30; }
.auth__wrap { width: 100%; max-width: 400px; }
.auth__card { position: relative; overflow: hidden; padding: 2.25rem 2rem 2rem; border-radius: 16px; background: var(--surface); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55); }
.auth__card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, #c8102e 0 33.3%, #f6efe0 0 66.6%, #5fb2ff 0); }
.auth__logo { width: 56px; height: 56px; border-radius: 50%; margin-bottom: 1.1rem; background: #fff; box-shadow: 0 0 0 1px var(--border); }
.auth h1 { font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.auth__card > p { color: var(--muted); margin: .25rem 0 1.5rem; }
.auth .flashes { margin-bottom: 1rem; }
.auth .flash { box-shadow: none; }
.auth__foot { margin-top: 1.25rem; text-align: center; font-size: 13px; }
.auth__foot a { color: #a9b8d3; }
.auth__foot a:hover { color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; z-index: 10; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .75rem 1rem .5rem; }
  .side__brand { padding: 0; }
  .side__brand img { width: 32px; height: 32px; }
  .side__nav { order: 3; display: flex; width: 100%; overflow-x: auto; gap: .25rem; }
  .side__nav a { padding: .45rem .7rem; white-space: nowrap; }
  .side__foot { margin: 0 0 0 auto; display: flex; align-items: center; gap: .25rem; }
  .side__link span, .me__who { display: none; }
  .me { padding: 0; border: 0; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .product-form { grid-template-columns: minmax(0, 1fr); }
  .preview { position: static; max-width: 320px; }
}

@media (max-width: 640px) {
  .side__nav { gap: .1rem; }
  .side__nav a { gap: .4rem; padding-inline: .45rem; }
  .main { padding: 1.25rem 1rem 2.5rem; }
  .top h1 { font-size: 21px; }
  .tiles { gap: .75rem; }
  .tile { padding: .9rem 1rem; }
  .tile__value { font-size: 22px; }
  .card { padding: 1.1rem 1rem 1.25rem; }
  .switch-card { padding: .9rem 1rem; }
  .table-wrap { margin: 0 -1rem; padding: 0 1rem; }
  .chart__plot { height: 200px; margin-left: 2.75rem; }
  .chart__x { margin-left: 2.75rem; }
  .chart__x .alt { visibility: hidden; }
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .card__tools, .search, .search input { width: 100%; }
  .places { grid-template-columns: minmax(0, 1fr); }
  .funnel li { grid-template-columns: minmax(0, 1fr) 3.5rem 3rem; gap: .35rem .75rem; }
  .funnel__bar { grid-column: 1 / -1; grid-row: 2; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
  .kv dd { margin-bottom: .6rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
