/* Spicy refresh: same chili tokens as the app (apps/mobile/lib/brand/theme.dart). */
@font-face { font-family: "Figtree"; src: url("fonts/Figtree-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/Figtree-600.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/Figtree-700.ttf") format("truetype"); font-weight: 700 900; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("fonts/BricolageGrotesque-700.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("fonts/BricolageGrotesque-800.ttf") format("truetype"); font-weight: 800 900; font-display: swap; }
:root {
  --brand: #d7263d;
  --brand-dark: #8e1328;
  --brand-text: #b01e33;
  --tint: #fbe3e6;
  --ok: #188038;
  --warn: #9a6700;
  --bad: #c62839;
  --bg: #fbf8f6;
  --sunken: #f3edea;
  --card: #ffffff;
  --ink: #23181a;
  --muted: #6e5f5c;
  --line: #e8dfdb;
  --shadow: 0 1px 2px rgba(35, 24, 26, .06), 0 8px 24px rgba(35, 24, 26, .05);
  --display: "Bricolage", "Figtree", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1a1012; --sunken: #2b1a1d; --card: #24161a; --ink: #f6ecea; --muted: #cdbdb9; --line: #4a3335; --brand: #e0384e; --brand-dark: #ff8a97; --brand-text: #ff8a97; --tint: #4a1a22; --ok: #5fc77a; --warn: #f0c04a; --bad: #ff7a85; --shadow: 0 1px 2px #0006, 0 8px 24px #0004; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); }
h1, h2, header strong, .stat strong { font-family: var(--display); letter-spacing: -0.01em; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
header { display: flex; align-items: center; gap: 10px; padding: 10px 20px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; position: sticky; top: 0; z-index: 2; }
header strong { font-size: 19px; font-weight: 800; color: var(--ink); }
.brand { display: flex; align-items: center; gap: 10px; }
nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: 12px; }
.tab { background: none; color: var(--ink); font-weight: 600; padding: 8px 14px; border-radius: 999px; min-height: 40px; }
.tab:hover { background: var(--sunken); color: var(--ink); }
.tab.active { background: var(--tint); color: var(--brand-dark); font-weight: 800; }
#who { margin-left: auto; color: var(--muted); font-size: 14px; }
main { max-width: 1200px; margin: 0 auto; padding: 24px 16px 60px; }
.card { background: var(--card); border: 0; border-radius: 20px; box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 16px; }
.narrow { max-width: 380px; margin: 40px auto; }
h1 { font-size: 28px; font-weight: 800; line-height: 1.15; margin: 0 0 16px; }
h2 { font-size: 18px; font-weight: 700; margin: 0 0 12px; }
label { display: block; margin-bottom: 12px; color: var(--muted); font-size: 14px; }
label small { color: var(--muted); font-weight: 400; }
label.check { display: flex; gap: 8px; align-items: center; }
label.check input { width: auto; margin: 0; }
input, textarea, select { display: block; width: 100%; min-height: 44px; margin-top: 4px; padding: 10px 14px; font: inherit; color: var(--ink); background: var(--sunken); border: 1px solid transparent; border-radius: 14px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
textarea { min-height: 80px; }
select { width: auto; }
button { font: inherit; font-weight: 700; min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 0; background: var(--brand); color: #fff; cursor: pointer; }
button:hover { background: var(--brand-dark); }
button:disabled { opacity: .5; cursor: wait; }
button.small { min-height: 34px; padding: 6px 14px; font-size: 13px; margin: 2px; }
button.ghost { background: var(--sunken); color: var(--ink); border: 0; }
button.ghost:hover { background: var(--line); }
button.link { background: none; color: var(--brand-text); padding: 0; min-height: 0; margin-bottom: 16px; }
button.approve { background: var(--ok); }
button.decline { background: var(--bad); }
#logout { background: var(--sunken); color: var(--ink); border: 0; }
.row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.row h1 { margin: 0; }
.row.search input { flex: 1; margin: 0; min-width: 220px; }
.row.inline { justify-content: flex-start; margin: 12px 0 0; }
.row.inline input { width: 140px; margin: 0; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.muted { color: var(--muted); }
.error { color: var(--bad); min-height: 1.5em; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--card); padding: 10px 18px; border-radius: 999px; box-shadow: 0 6px 24px #0003; margin: 0; z-index: 5; }
.toast.error { background: var(--bad); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.two > div > .card:last-child { margin-bottom: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; background: var(--card); color: var(--ink); border: 0; border-radius: 20px; box-shadow: var(--shadow); padding: 16px 18px; }
.stat:hover { background: var(--card); }
.stat strong { font-size: 30px; font-weight: 800; }
.stat .muted { font-weight: 500; font-size: 13px; }
.stat.ok strong { color: var(--ok); }
.stat.warn strong { color: var(--warn); }
.stat.bad strong { color: var(--bad); }
figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
figure img { width: 100%; height: 220px; object-fit: contain; background: #0001; border-radius: 8px; }
figure video.evidence-video { width: 100%; height: 220px; background: #000; border-radius: 8px; display: block; }
figcaption { font-size: 13px; color: var(--muted); padding-top: 6px; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--sunken); color: var(--ink); vertical-align: middle; }
.pill.ok { background: #18803822; color: var(--ok); }
.pill.warn { background: #9a670022; color: var(--warn); }
.pill.bad { background: #c6283922; color: var(--bad); }
.chat { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; }
.msg { margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--bg); max-width: 80%; }
.msg.them { background: #c6283914; align-self: flex-end; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 0; }
legend { font-weight: 700; padding: 0 6px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 14px; }
code { font-size: 13px; background: var(--bg); padding: 1px 6px; border-radius: 6px; }
@media (max-width: 760px) {
  .two { grid-template-columns: 1fr; }
  nav { margin-left: 0; width: 100%; }
}

/* Bars (dashboard trend, matches per hour) */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 160px; padding-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 18px; }
.bar { width: 100%; max-width: 48px; height: var(--h, 0%); min-height: 2px; background: var(--brand); border-radius: 6px 6px 0 0; }
.bar-v { font-size: 12px; font-weight: 600; }
.bar-l { font-size: 11px; white-space: nowrap; }
.meta { font-size: 12px; word-break: break-all; display: block; max-width: 420px; }
.audit-filter label { margin: 0; }
.audit-filter input { width: 200px; }

/* Signed in: navigation as a left sidebar (top bar again on narrow screens). */
body.signed-in header {
  position: fixed; top: 0; left: 0; bottom: 0; width: 232px; box-sizing: border-box;
  flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 6px;
  padding: 18px 14px; border-bottom: none; border-right: 1px solid var(--line); overflow-y: auto;
}
body.signed-in .brand { padding: 0 6px 12px; border-bottom: 1px solid var(--line); }
body.signed-in nav { flex-direction: column; flex-wrap: nowrap; gap: 2px; margin: 10px 0 0; }
body.signed-in .tab { text-align: left; border-radius: 14px; width: 100%; padding: 10px 14px; }
body.signed-in #who { margin: auto 0 0; padding: 12px 6px 4px; border-top: 1px solid var(--line); font-size: 13px; word-break: break-all; }
body.signed-in #logout { width: 100%; }
body.signed-in main { margin-left: 232px; max-width: none; padding: 24px 28px 60px; }
@media (max-width: 760px) {
  body.signed-in header {
    position: sticky; bottom: auto; width: auto; flex-direction: row; flex-wrap: wrap; align-items: center;
    border-right: none; border-bottom: 1px solid var(--line); padding: 10px 14px; overflow-y: visible;
  }
  body.signed-in .brand { padding: 0; border-bottom: none; }
  body.signed-in nav { flex-direction: row; overflow-x: auto; width: 100%; margin: 0; }
  body.signed-in .tab { width: auto; white-space: nowrap; }
  body.signed-in #who { margin: 0 0 0 auto; padding: 0; border-top: none; }
  body.signed-in #logout { width: auto; }
  body.signed-in main { margin-left: 0; padding: 16px 12px 60px; }
}

/* Users list: whole row opens the account. Account page: three detail columns. */
tr.clickable { cursor: pointer; }
tr.clickable:hover td, tr.clickable:focus td { background: var(--bg); }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 1100px) { .three { grid-template-columns: 1fr; } }
.row.search select { width: auto; }

/* Call safety: recording player dialog and live listening panel. */
.overlay { position: fixed; inset: 0; background: #0006; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 16px; }
.dialog { max-width: 720px; width: 100%; max-height: 90vh; overflow: auto; }
.dialog.step-up { max-width: 380px; }
video.recording { width: 100%; max-height: 60vh; background: #000; border-radius: 10px; margin: 8px 0; }
.listen-panel { position: fixed; right: 16px; bottom: 16px; width: 420px; max-width: calc(100vw - 32px); z-index: 15; box-shadow: 0 10px 30px #0003; }
.listen-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.listen-tile { aspect-ratio: 3 / 4; background: #000; border-radius: 10px; overflow: hidden; }
.small { font-size: 12px; }

/* Exports, clickable dashboard tiles, minor sidebar entry, password form. */
.export-bar { gap: 6px; margin: 4px 0 12px; }
.export-bar input[type=date] { width: auto; padding: 4px 8px; }
.stat.clickable { cursor: pointer; }
.stat.clickable:hover { outline: 2px solid var(--brand); }
.tab-minor { margin-top: 10px; font-size: 13px; }
.narrow-form { max-width: 460px; }
.row select { width: auto; }

/* Pricing & configuration */
.settings-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.settings-groups > .card { margin-bottom: 0; }
@media (max-width: 1100px) { .settings-groups { grid-template-columns: 1fr; } }
.group-head { margin-bottom: 12px; }
.group-head h2 { margin: 0 0 2px; }
.group-head p { margin: 0; font-size: 13px; }
.settings-grid { display: grid; gap: 10px; }
.setting { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; }
.setting small { grid-column: 1 / -1; font-size: 12px; }
.setting.changed { background: #fff7e0; border-color: #f0c040; }
.setting-label { margin: 0; color: var(--ink); font-weight: 600; font-size: 14px; }
.setting-control { display: flex; align-items: center; gap: 6px; }
.setting-control input[type=number] { width: 110px; text-align: right; margin: 0; }
.setting-control select { width: auto; margin: 0; }
.unit { color: var(--muted); font-size: 13px; white-space: nowrap; }
.unit.pre { font-weight: 600; }
input.switch { width: 44px; height: 24px; accent-color: var(--brand); margin: 0; }
.publish-bar { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px;
  padding: 12px 16px; background: var(--card); border: 0; border-radius: 20px; box-shadow: 0 -6px 24px rgba(35, 24, 26, .1); }
.publish-bar input { flex: 1; min-width: 200px; margin: 0; }
.add-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.add-form label { margin: 0; }
.add-form input { width: 130px; }
.cell-input { width: 80px; padding: 4px 6px; margin: 0; }
.cell-input.wide { width: 160px; }
tr.editing td { background: #fff7e0; }
details.card > summary { cursor: pointer; font-weight: 700; }
details.card[open] > summary { margin-bottom: 12px; }

/* Verification: click a document to see it full size. */
img.zoomable { cursor: zoom-in; }
img.zoomed { max-width: 92vw; max-height: 82vh; object-fit: contain; border-radius: 10px; background: #fff; }
.overlay .zoom-caption { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #fff; }
.overlay.zoom { flex-direction: column; cursor: zoom-out; }

/* Host posts (moderation) */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.post-card { margin-bottom: 0; }
.post-card p { margin: 6px 0; overflow-wrap: anywhere; }
.post-photos { display: grid; gap: 8px; }
.post-photos figure img { height: 200px; }

/* Home banners: preview card (layout like the app's carousel) */
.banner-preview { position: relative; overflow: hidden; border-radius: 20px; min-height: 150px; color: #fff; display: flex; align-items: flex-end; background: #d7263d; }
.banner-preview.style-gradient_pink { background: #d7263d; }
.banner-preview.style-gradient_gold { background: linear-gradient(135deg, #b57f00, #9a6700, #6e4a00); }
.banner-preview.style-gradient_purple { background: linear-gradient(135deg, #c2410c, #8e1328); }
.banner-preview.style-image { background: #23181a; }
.banner-preview .bp-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner-preview .bp-body { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px 18px; width: 100%; }
.banner-preview.style-image .bp-body { background: linear-gradient(to top, #000a, #0000); }
.banner-preview .bp-badge { font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: #fff3; }
.banner-preview .bp-title { font-family: var(--display); font-size: 21px; line-height: 1.2; }
.banner-preview .bp-subtitle { font-size: 14px; opacity: .9; }
.banner-preview .bp-cta { margin-top: 6px; font-size: 13px; font-weight: 800; padding: 6px 14px; border-radius: 999px; background: #fff; color: #b01e33; }
.banner-preview [hidden] { display: none; }
.banner-preview.small-preview { min-height: 70px; width: 200px; border-radius: 12px; }
.banner-preview.small-preview .bp-body { padding: 8px 10px; gap: 2px; }
.banner-preview.small-preview .bp-title { font-size: 13px; }
.banner-preview.small-preview .bp-subtitle, .banner-preview.small-preview .bp-cta { display: none; }
