/* DZ Digital Store admin. Owner's design system (docs/DESIGN.md): white and black, red only for what needs action. */
@font-face {
  font-family: Inter;
  src: url("fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #ffffff;
  --text: #0a0a0a;
  --muted: #737373;
  --faint: #a3a3a3;
  --line: #ebebeb;
  --soft: #f5f5f5;
  --accent: #e10600;
  --accent-soft: #fff1f0;
  --r-input: 10px;
  --r-btn: 12px;
  --r-card: 14px;
  --r-next: 18px;
  --r-sheet: 20px;
  --side: 20px;
  --gap: 22px;
  --rail: 248px;
  --tabbar: 64px;
  --sans: Inter, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", Tahoma, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  color-scheme: light;
}
@media (max-width: 379px) { :root { --side: 16px; } }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--sans); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
html.sheet-open, html.sheet-open body { overflow: hidden; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1 { font-size: 30px; line-height: 1.1; font-weight: 900; letter-spacing: -.04em; margin: 0; }
h2 { font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -.03em; margin: 0; overflow-wrap: anywhere; }
h3 { font-size: 17px; line-height: 1.25; font-weight: 800; letter-spacing: -.015em; margin: 0; overflow-wrap: anywhere; }
p { margin: 0 0 .6em; overflow-wrap: anywhere; }
small { font-size: 12.5px; color: var(--muted); }
code { font-family: var(--mono); font-size: .86em; background: var(--soft); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
pre { font-family: var(--sans); white-space: pre-wrap; background: var(--soft); border-radius: var(--r-input); padding: 12px 14px; margin: 0 0 12px; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.icon { width: 18px; height: 18px; flex: none; vertical-align: -.2em; }
.muted { color: var(--muted); }
.eyebrow { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.meta { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.45; margin: 2px 0 0; overflow-wrap: anywhere; }
.mono { font-family: var(--mono); font-size: .9em; overflow-wrap: anywhere; }
.num, .tabular, strong, td, .numbers, .amount { font-variant-numeric: tabular-nums; }
.num { text-align: right; white-space: nowrap; }
.pos { color: var(--text); font-weight: 650; }
.neg { color: var(--accent); }
.nowrap { white-space: nowrap; }
.small { font-size: 12.5px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; }
.link { font-size: 14px; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.link:hover { text-decoration-color: currentColor; }

/* Buttons: primary black, secondary outlined, danger red outline (never filled red). */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: var(--r-btn);
  font: inherit; font-size: 15px; font-weight: 700; letter-spacing: -.01em; line-height: 1.1; text-align: center;
  border: 1px solid var(--text); background: var(--text); color: #fff; cursor: pointer; text-decoration: none;
  transition: opacity .15s, background .15s;
}
button:hover, .btn:hover { opacity: .86; text-decoration: none; }
button:active, .btn:active { opacity: .7; }
button.secondary, .btn.secondary { background: var(--bg); color: var(--text); border-color: var(--line); }
button.secondary:hover, .btn.secondary:hover { opacity: 1; border-color: var(--text); }
button.danger, .btn.danger { background: var(--bg); color: var(--accent); border-color: var(--accent); }
button.danger:hover, .btn.danger:hover { opacity: 1; background: var(--accent-soft); }
button.ghost, .btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
button.ghost:hover, .btn.ghost:hover { opacity: 1; color: var(--text); background: var(--soft); }
button.small, .btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
button.block, .btn.block { width: 100%; }
button.icon-only, .btn.icon-only { min-height: 44px; width: 44px; padding: 0; }
button .icon, .btn .icon { width: 17px; height: 17px; }

/* Form controls: filled inputs, 10px radius. */
input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea {
  width: 100%; min-height: 48px; font: inherit; font-size: 15px; font-weight: 450; color: var(--text);
  background-color: var(--soft); border: 1px solid transparent; border-radius: var(--r-input); padding: 12px 14px;
  transition: border-color .15s, background .15s;
}
select { appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 21px) 52%, calc(100% - 16px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.select { position: relative; }
textarea { resize: vertical; min-height: 96px; line-height: 1.45; }
input:hover, select:hover, textarea:hover { border-color: var(--line); }
input:focus, select:focus, textarea:focus { outline: none; background-color: var(--bg); border-color: var(--text); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
input[readonly] { color: var(--muted); }
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }
input[type=datetime-local] { padding-block: 10px; }
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; accent-color: var(--text); margin: 0; flex: none; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 650; color: var(--text); align-content: start; }
label small { font-weight: 450; line-height: 1.35; }
label.check { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 550; min-height: 44px; cursor: pointer; }
label.confirm { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-card); font-size: 16px; font-weight: 650; cursor: pointer; }
label.confirm:has(input:checked) { border-color: var(--text); }
label.switch { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 550; min-height: 44px; cursor: pointer; }
label.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
label.switch span { position: relative; width: 44px; height: 26px; border-radius: 99px; background: var(--line); transition: background .15s; flex: none; }
label.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
label.switch input:checked + span { background: var(--text); }
label.switch input:checked + span::after { transform: translateX(18px); }
label.switch input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }
fieldset { border: 0; margin: 0; padding: 0 0 22px; }
fieldset + fieldset { border-top: 1px solid var(--line); padding-top: 22px; }
legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; float: left; width: 100%; font-size: 17px; font-weight: 800; letter-spacing: -.015em; padding: 0; margin-bottom: 14px; }
legend + * { clear: both; }
legend small { flex-basis: 100%; font-size: 12.5px; font-weight: 450; letter-spacing: 0; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.wide { grid-column: 1 / -1; }
.fields > label { align-content: space-between; }
@media (min-width: 1100px) { .page-growth .fields { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stack { display: grid; gap: 16px; }
.row-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 12px 0 0; }
.row-form label { flex: 1 1 200px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions form { margin: 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.form-actions.wide, .fields > .form-actions { grid-column: 1 / -1; }

/* Disclosure */
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details.more { margin-top: 12px; }
details.more > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; font-weight: 700; }
details.more > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: 2px; transition: transform .15s; }
details.more[open] > summary::after { transform: rotate(225deg) translateY(-1px); }
details.more[open] > summary { margin-bottom: 10px; }
details.more > summary .muted { font-weight: 500; }

/* Feedback */
.notice { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-input); background: var(--soft); color: var(--text); font-size: 14px; margin: 0 0 16px; }
.notice .icon { margin-top: 1px; }
.notice.error, .notice.warning { background: var(--accent-soft); color: var(--text); }
.notice.error .icon, .notice.warning .icon { color: var(--accent); }
.callout { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--r-card); background: var(--soft); font-size: 14px; margin-bottom: 18px; }
.empty { display: grid; justify-items: center; gap: 10px; padding: 36px 20px; color: var(--muted); text-align: center; font-size: 14px; }
.empty p { margin: 0; max-width: 340px; }
.empty-icon { width: 22px; height: 22px; color: var(--faint); }
td.empty { text-align: center; color: var(--muted); padding: 28px; }

/* Status marker: 7px dot + label. Red pulsing = act now, red = pending, black = done, grey = closed. */
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--text); }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.status.done i { background: var(--text); }
.status.pending i { background: var(--accent); }
.status.live i { background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
.status.off { color: var(--muted); }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }
@media (prefers-reduced-motion: reduce) { .status.live i { animation: none; } * { transition: none !important; scroll-behavior: auto !important; } }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; font-style: normal; font-variant-numeric: tabular-nums; }
.flag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 6px; border-radius: 99px; background: var(--accent); color: #fff; font-family: var(--sans); font-size: 11.5px; font-weight: 700; vertical-align: 1px; white-space: nowrap; }
.flag .icon { width: 12px; height: 12px; }
.flag.watch { background: var(--accent-soft); color: var(--accent); }
.cust { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.cust:hover { text-decoration-color: currentColor; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line); font-size: 12.5px; font-weight: 550; color: var(--muted); overflow-wrap: anywhere; }
.tag .icon { width: 13px; height: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-tag { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; background: var(--soft); color: var(--muted); }

/* Chips, segmented control, underline tabs */
.chips { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.chips label, .seg label { display: block; position: relative; cursor: pointer; font-weight: 600; }
.chips input, .seg input, .tab-radio { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chips span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--bg); transition: background .12s, color .12s, border-color .12s; }
.chips label:hover span { border-color: var(--text); }
.chips input:checked + span { background: var(--text); border-color: var(--text); color: #fff; }
.chips input:focus-visible + span, .seg input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }
.seg { display: flex; gap: 2px; padding: 3px; border-radius: var(--r-btn); background: var(--soft); border: 0; margin: 0; }
.seg label { flex: 1; }
.seg span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 12px; border: 1px solid transparent; border-radius: 9px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.seg input:checked + span, #f7:checked ~ .seg label[for=f7] span, #f30:checked ~ .seg label[for=f30] span { background: var(--bg); color: var(--text); border-color: var(--line); }
.seg.danger input[value=block]:checked + span { color: var(--accent); }
.group-label { font-size: 13px; font-weight: 650; margin: 0 0 8px; }
.utabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin: 0 0 18px; }
.utabs::-webkit-scrollbar { display: none; }
.utabs label, .utabs a { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; margin-bottom: -1px; border-bottom: 2px solid transparent; font-size: 15px; font-weight: 650; color: var(--faint); white-space: nowrap; cursor: pointer; }
.utabs label:hover, .utabs a:hover { color: var(--text); text-decoration: none; }
.utabs a[aria-current] { color: var(--text); border-color: var(--text); }
.utabs .count { font-size: 12.5px; font-weight: 600; color: inherit; }

/* App shell: phone header + bottom tab bar; left rail from 900px. */
.shell { min-height: 100vh; }
.rail { display: none; }
.workspace { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px var(--side); padding-top: max(8px, env(safe-area-inset-top)); background: rgb(255 255 255 / .85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.topbar-title { flex: 1; min-width: 0; font-size: 17px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .15s; }
.js .topbar-title.hide { opacity: 0; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 15px; letter-spacing: -.02em; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand small { display: block; font-weight: 500; letter-spacing: 0; }
.brand-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; flex: none; background: var(--text); color: #fff; font-weight: 900; letter-spacing: -.05em; font-size: 13px; }
.brand-mark:hover { text-decoration: none; }
.content { max-width: 620px; margin: 0 auto; padding: 22px var(--side) calc(var(--tabbar) + 40px + env(safe-area-inset-bottom)); }
.page-head { margin-bottom: var(--gap); }
.page-head h1 { font-size: 34px; letter-spacing: -.045em; }
.page-head p { margin: 6px 0 0; font-size: 14px; }
.tabbar { position: fixed; z-index: 30; inset: auto 0 0 0; display: flex; padding: 6px 4px env(safe-area-inset-bottom); background: rgb(255 255 255 / .85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.tabbar a { position: relative; flex: 1; display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 52px; color: var(--faint); font-size: 11px; font-weight: 650; }
.tabbar a:hover { text-decoration: none; color: var(--muted); }
.tabbar a[aria-current] { color: var(--text); }
.tabbar .icon { width: 23px; height: 23px; stroke-width: 1.9; }
.tabbar .badge { position: absolute; top: 2px; left: calc(50% + 6px); height: 18px; min-width: 18px; font-size: 11px; border: 2px solid #fff; box-sizing: content-box; }
nav { display: grid; gap: 18px; }
.nav-group { display: grid; gap: 2px; }
.nav-label { padding: 0 10px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nav-group a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 10px; border-radius: 10px; color: var(--text); font-size: 15px; font-weight: 600; }
.nav-group a:hover { background: var(--soft); text-decoration: none; }
.nav-group a[aria-current] { background: var(--soft); font-weight: 750; }
.nav-group a .icon { color: var(--muted); }
.nav-group a[aria-current] .icon { color: var(--text); }
.nav-group .badge { margin-left: auto; }
.nav-group .chev { margin-left: auto; color: var(--faint) !important; }
.nav-group .badge + .chev { margin-left: 6px; }
.sheet .nav-group { margin-bottom: 18px; }
.profile { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 4px 0 8px; border-top: 1px solid var(--line); }
.profile .who { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; }
.profile small { display: block; font-weight: 500; }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none; background: var(--soft); color: var(--text); font-weight: 800; font-size: 13px; }
.avatar.small { width: 24px; height: 24px; font-size: 11px; vertical-align: middle; margin-right: 6px; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); }
  .rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; padding: 20px 14px 18px; border-right: 1px solid var(--line); overflow-y: auto; }
  .rail > .brand { padding: 2px 8px; }
  .tabbar, .topbar .brand-mark { display: none; }
  .topbar { min-height: 52px; padding: 8px 36px; }
  .topbar-title { font-size: 14px; font-weight: 650; color: var(--muted); letter-spacing: 0; }
  .js .topbar-title.hide { opacity: 1; }
  .content { max-width: 1200px; padding: 30px 36px 64px; }
  .page-head h1 { font-size: 40px; }
  h1 { font-size: 34px; }
}

/* Cards, sections, rows */
.section { margin: 0 0 30px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.section-head .meta { margin-top: 4px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; margin: 0 0 14px; }
.card > :last-child { margin-bottom: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head:last-child { margin-bottom: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .rows > .row:first-child { border-top: 0; }
.divided { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.grid-2 { display: grid; gap: 14px; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } .grid-2 > .card { margin: 0; } }

/* Task row and generic row list */
.rows { display: grid; }
.row { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--text); }
.card .row { padding-inline: 18px; }
a.row:hover { text-decoration: none; background: var(--soft); }
.rows.plain .row { padding-inline: 0; }
.rows.plain a.row:hover { background: transparent; }
.rows.plain a.row:hover .row-title { text-decoration: underline; text-underline-offset: 3px; }
.row-main { flex: 1; min-width: 0; }
.row-title { display: block; font-weight: 600; overflow-wrap: anywhere; }
.row-end { display: grid; justify-items: end; gap: 4px; text-align: right; flex: none; max-width: 45%; }
.row-end strong { font-weight: 750; }
.row .chev { color: var(--faint); }
.tick { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--faint); flex: none; color: #fff; }
.tick.done { background: var(--text); border-color: var(--text); }
.tick.act { border-color: var(--accent); }
.tick .icon { width: 13px; height: 13px; stroke-width: 3; }

/* Today */
.hero { margin: 4px 0 var(--gap); }
.hero-num { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin: 0; }
.hero-num b { font-size: 68px; line-height: .95; font-weight: 900; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.hero-num span { font-size: 26px; font-weight: 800; letter-spacing: -.035em; }
.hero p.muted { margin: 10px 0 0; font-size: 15px; }
@media (min-width: 900px) { .hero-num b { font-size: 76px; } .hero-num span { font-size: 30px; } }
.nextup { display: grid; gap: 4px; padding: 20px; margin: 0 0 var(--gap); border: 1.5px solid var(--text); border-radius: var(--r-next); color: var(--text); }
.nextup:hover { text-decoration: none; background: var(--soft); }
.nextup .eyebrow { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.nextup .eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .nextup .eyebrow i { animation: none; } }
.nextup-title { font-size: 22px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; }
.nextup .btn { justify-self: start; margin-top: 14px; }
.today-grid { display: grid; gap: 0 36px; }
@media (min-width: 900px) { .today-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; } .today-top { max-width: 760px; } }

/* Number blocks: values side by side, thin vertical lines instead of boxes. */
.numbers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 var(--gap); }
.numbers > * { display: grid; align-content: start; gap: 2px; padding: 4px 16px 14px; color: var(--text); min-width: 0; }
.numbers > a:hover { text-decoration: none; }
.numbers > a:hover strong { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.numbers > :nth-child(odd) { padding-left: 0; }
.numbers > :nth-child(even) { border-left: 1px solid var(--line); }
.numbers > :nth-child(n+3) { padding-top: 14px; border-top: 1px solid var(--line); }
.numbers small { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.numbers strong { font-size: clamp(20px, 5.4vw, 26px); font-weight: 850; letter-spacing: -.035em; line-height: 1.15; white-space: nowrap; }
.numbers strong.neg { color: var(--accent); }
@media (min-width: 620px) {
  .numbers { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .numbers > :nth-child(n) { padding: 2px 18px 4px; border-top: 0; border-left: 1px solid var(--line); }
  .numbers > :first-child { border-left: 0; padding-left: 0; }
}
.funnel { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 14px; }
.funnel > div { display: grid; gap: 2px; padding: 0 8px; border-left: 1px solid var(--line); min-width: 0; }
.funnel > div:first-child { border-left: 0; padding-left: 0; }
.funnel small { font-size: 11.5px; font-weight: 600; }
.funnel strong { font-size: 20px; font-weight: 850; letter-spacing: -.03em; }
.funnel em { font-style: normal; font-size: 12px; color: var(--muted); }
.switcher > .panel { display: none; }
#f7:checked ~ .p7, #f30:checked ~ .p30 { display: block; }
.switcher .seg { max-width: 300px; }

/* Payments board */
.board-tabs { display: flex; }
.board-tabs label { flex: none; }
.columns { display: block; }
.column { display: none; }
#col-review:checked ~ .columns .col-review, #col-auto:checked ~ .columns .col-auto,
#col-fix:checked ~ .columns .col-fix, #col-done:checked ~ .columns .col-done { display: block; }
#col-review:checked ~ .board-tabs label[for=col-review], #col-auto:checked ~ .board-tabs label[for=col-auto],
#col-fix:checked ~ .board-tabs label[for=col-fix], #col-done:checked ~ .board-tabs label[for=col-done] { color: var(--text); border-color: var(--text); }
.tab-radio:focus-visible ~ .board-tabs { outline: 2px solid var(--text); outline-offset: 4px; }
.column-head { display: none; }
.column .empty { padding: 28px 10px; }
@media (min-width: 900px) {
  .board-tabs { display: none; }
  .columns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
  .column { display: block !important; min-width: 0; }
  .column-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 2px 10px; margin-bottom: 12px; border-bottom: 2px solid var(--text); }
  .column-head h2 { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
  .column-head .count { font-size: 13px; font-weight: 700; color: var(--muted); }
  .column-head .count.hot { color: var(--accent); }
  .column .pay { padding: 14px; }
  .column .facts div { display: grid; gap: 0; }
  .column .facts dd { text-align: left; }
  .column .pay-top { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; }
  .column .thumb { width: 48px; height: 64px; }
  .column .pay-amount { font-size: 22px; }
  .column .pay.is-done .pay-amount { font-size: 18px; }
  .column .pay.is-done .pay-top { grid-template-columns: 40px minmax(0, 1fr); }
  .column .pay.is-done .thumb { width: 40px; height: 52px; }
  .col-done .column-head, .col-auto .column-head, .col-fix .column-head { border-color: var(--line); }
}
.pay { padding: 16px; }
.pay-top { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: start; }
.thumb { position: relative; display: grid; place-items: center; width: 64px; height: 84px; border-radius: 10px; overflow: hidden; background: var(--soft); color: var(--faint); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; color: transparent; font-size: 0; }
.thumb:hover { text-decoration: none; }
.thumb .icon { width: 20px; height: 20px; }
.pay-amount { display: block; font-size: 26px; font-weight: 900; letter-spacing: -.045em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.pay-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; font-weight: 600; }
.pay .status { margin-top: 8px; }
.facts { display: grid; gap: 8px; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); }
.facts div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 650; text-align: right; overflow-wrap: break-word; min-width: 0; }
.facts dd:not(.mono) { white-space: nowrap; }
.facts dd.mono { overflow-wrap: anywhere; }
.pay .notice { margin: 12px 0 0; font-size: 13.5px; }
.pay-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.pay-actions > :first-child { grid-column: 1 / -1; }
.pay-actions .btn { min-height: 44px; padding: 0 10px; font-size: 14px; }
.pay-actions > :last-child:nth-child(2) { grid-column: 1 / -1; }
.pay.is-done { padding: 14px 16px; }
.pay.is-done .pay-amount { font-size: 20px; }
.pay.is-done .pay-top { grid-template-columns: 44px minmax(0, 1fr); }
.pay.is-done .thumb { width: 44px; height: 56px; }
.sheet-amount { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 0 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.sheet-amount strong { font-size: 34px; font-weight: 900; letter-spacing: -.05em; }
.sheet-receipt { display: block; margin: 0 0 16px; border-radius: var(--r-card); overflow: hidden; background: var(--soft); }
.sheet-receipt img { display: block; width: 100%; max-height: 38vh; object-fit: contain; }
.sheet form > * + *, .sheet-body > form > * + * { margin-top: 16px; }
.sheet .fields { margin-top: 0; }

/* Bottom sheet; centered dialog from 900px. Base works without JS through :target. */
.sheet { position: fixed; inset: 0; z-index: 50; display: none; align-items: flex-end; justify-content: center; }
.sheet:target, .sheet.open { display: flex; }
.js .sheet:target:not(.open) { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgb(0 0 0 / .32); cursor: default; }
.sheet-panel { position: relative; width: 100%; max-width: 620px; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); border-radius: var(--r-sheet) var(--r-sheet) 0 0; padding: 8px var(--side) calc(24px + env(safe-area-inset-bottom)); animation: rise .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { transform: translateY(40px); opacity: .4; } }
@keyframes pop { from { transform: scale(.97); opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .sheet-panel { animation: none !important; } }
.sheet-panel:focus { outline: none; }
.grip { display: block; width: 38px; height: 5px; border-radius: 99px; background: var(--line); margin: 0 auto 12px; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.sheet-close { display: grid; place-items: center; width: 40px; height: 40px; margin: -6px -8px 0 0; border-radius: 50%; color: var(--muted); flex: none; }
.sheet-close:hover { background: var(--soft); color: var(--text); }
@media (min-width: 900px) {
  .sheet { align-items: center; padding: 24px; }
  .sheet-panel { max-width: 520px; border-radius: var(--r-sheet); padding: 22px 24px 24px; animation-name: pop; }
  .grip { display: none; }
}

/* Tables become row lists on phones. */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { padding: 0 14px 10px; text-align: left; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
tbody tr:last-child td { border-bottom: 0; }
tr.selected td { background: var(--soft); }
td form { display: inline-block; margin: 2px 4px 2px 0; }
td .btn, td button { min-height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
@media (max-width: 699px) {
  table.list, table.list tbody, table.list tr, table.list td { display: block; }
  table.list thead { display: none; }
  table.list tr { padding: 12px 0; border-top: 1px solid var(--line); }
  table.list tbody tr:first-child { border-top: 0; }
  table.list td { display: flex; justify-content: space-between; gap: 14px; padding: 3px 0; border: 0; text-align: right; }
  table.list td::before { content: attr(data-label); font-size: 12.5px; color: var(--muted); font-weight: 600; text-align: left; flex: none; }
  table.list td:first-child { font-weight: 700; text-align: left; justify-content: flex-start; }
  table.list td:first-child::before { display: none; }
  table.list td.num { white-space: normal; }
  table.list td.empty { justify-content: center; }
  table.list td.empty::before { display: none; }
}

/* Orders */
.order { padding: 16px 18px; }
.order-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.order-top strong { font-size: 17px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.order .tags { margin-top: 10px; }
.order .notice { margin: 12px 0 0; }
.order details.more { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 4px; }
.order .actions { margin-top: 12px; }

/* Catalogue */
.product-grid { display: grid; gap: 14px; align-items: start; }
@media (min-width: 700px) { .product-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); } }
details.product { margin: 0; padding: 0; }
details.product[open] { grid-column: 1 / -1; }
details.product > summary { display: grid; gap: 4px; padding: 18px; border-radius: var(--r-card); }
details.product > summary:hover { background: var(--soft); }
details.product[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--r-card) var(--r-card) 0 0; }
details.product > .inner { padding: 18px; }
details.product > .inner + .inner { border-top: 1px solid var(--line); }
details.card.add { padding: 0; }
details.card.add > summary { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 18px; font-size: 17px; font-weight: 800; }
details.card.add > summary .icon { width: 20px; height: 20px; }
details.card.add[open] > summary { border-bottom: 1px solid var(--line); }
details.card.add > .inner { padding: 18px; }
.product-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.category { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.translated { margin: 0; color: var(--muted); font-size: 14px; text-align: left; }
.price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; }
.price-row strong { font-size: 24px; font-weight: 900; letter-spacing: -.04em; }
.margin { font-size: 13px; font-weight: 650; color: var(--muted); }
.margin.neg { color: var(--accent); }
.edit-hint { margin-top: 10px; font-size: 13.5px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
details.product[open] .edit-hint { display: none; }
.balance { display: grid; margin-bottom: 14px; }
.balance strong { font-size: 24px; font-weight: 900; letter-spacing: -.04em; }
.supplier .actions { margin-top: 4px; }

/* Support: two panes on desktop, list or thread on phones. */
.support { display: grid; gap: 14px; }
.ticket-list { margin: 0; }
.ticket { display: grid; gap: 2px; min-height: 64px; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--text); }
.ticket:first-child { border-top: 0; }
.ticket:hover { background: var(--soft); text-decoration: none; }
.ticket.active { background: var(--soft); box-shadow: inset 3px 0 0 var(--text); }
.ticket-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 650; }
.thread { margin: 0; display: grid; }
.thread-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.back-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-size: 14px; font-weight: 650; margin-top: -10px; }
.messages { display: grid; align-content: start; gap: 10px; padding: 18px; min-height: 180px; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 16px; background: var(--soft); justify-self: start; border-bottom-left-radius: 6px; }
.bubble.staff { justify-self: end; background: var(--text); color: #fff; border-bottom-left-radius: 16px; border-bottom-right-radius: 6px; }
.bubble.staff small { color: #c9c9c9; }
.bubble header { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; margin-bottom: 3px; }
.bubble p { margin: 0; white-space: pre-wrap; }
.bubble img { display: block; max-width: 240px; width: 100%; margin-top: 8px; border-radius: 10px; }
.composer { display: grid; gap: 10px; padding: 14px 18px 18px; border-top: 1px solid var(--line); }
.composer textarea { min-height: 80px; }
.composer button { justify-self: end; }
@media (max-width: 899px) {
  .support.has-thread .ticket-list { display: none; }
  .support:not(.has-thread) .thread { display: none; }
}
@media (min-width: 900px) {
  .support { grid-template-columns: 320px minmax(0, 1fr); align-items: start; }
  .ticket-list { position: sticky; top: 72px; max-height: calc(100vh - 96px); overflow-y: auto; }
  .messages { max-height: calc(100vh - 400px); overflow-y: auto; }
  .back-link { display: none; }
}

/* Channel */
.post { white-space: pre-wrap; margin: 0; }
.setup-rows .row { min-height: 52px; }

/* Customers */
.search { display: flex; gap: 8px; margin: 0 0 var(--gap); }
.search .field { position: relative; flex: 1; }
.search .field .icon { position: absolute; left: 14px; top: 15px; color: var(--muted); pointer-events: none; }
.search .field input[type=search] { padding-left: 42px; }
.profile-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.profile-head .avatar { width: 52px; height: 52px; font-size: 20px; }
.profile-head h2 { font-size: 26px; letter-spacing: -.04em; }
.signal { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--r-input); background: var(--accent-soft); font-size: 14px; margin: 0 0 8px; }
.signal .icon { color: var(--accent); margin-top: 2px; }
.note-item { padding: 12px 0; border-top: 1px solid var(--line); }
.note-item p { margin: 0; white-space: pre-wrap; }

/* Login */
.login { display: grid; place-items: center; min-height: 100vh; padding: 32px var(--side); }
.login-card { width: min(100%, 400px); }
.login-card > .brand { margin-bottom: 40px; }
.login-card h1 { font-size: 40px; letter-spacing: -.05em; margin-bottom: 6px; }
.login-card > .muted { margin-bottom: 26px; }
.login-card .callout { grid-template-columns: auto auto; justify-content: start; gap: 4px 16px; }
.login-card .callout b { grid-column: 1 / -1; }
.login-card form button { margin-top: 6px; }
.login-foot { display: flex; align-items: center; gap: 8px; margin-top: 28px; font-size: 12.5px; color: var(--muted); }

/* Small screens */
@media (max-width: 560px) {
  .fields { grid-template-columns: minmax(0, 1fr); }
  .bubble { max-width: 92%; }
  .row-end { max-width: 50%; }
}

/* Helpers used by several pages */
[id] { scroll-margin-top: 76px; }
.card.flush > .card-head { padding: 16px 18px 12px; margin: 0; }
.card.flush > .empty { padding: 28px 18px; }
.card > .inner { padding: 0; }
.profile-head .status { margin-top: 10px; }
.note-text { font-weight: 500; white-space: pre-wrap; }
.utabs a { scroll-margin: 0; }
.page-growth .utabs { position: sticky; top: 56px; z-index: 10; background: rgb(255 255 255 / .92); }
@media (min-width: 900px) { .page-growth .utabs { top: 52px; } }
