/* Forbidden Essentials Back Office
   Calm boutique back office: warm-white ground, Forbidden Purple for structure and action,
   Passion Pink only as highlight. Outfit for headings and figures, Hanken Grotesk for reading. */

:root {
  --purple: #4A1B9A;
  --purple-700: #3B1580;
  --purple-50: #F3EDFF;
  --pink: #FF4DBD;
  --pink-ink: #D41F8E;
  --blush: #FFD6EB;
  --lav: #C9B3FF;
  --coral: #FF7A9E;
  --bg: #FFF7FB;
  --card: #FFFFFF;
  --ink: #141016;
  --ink-2: #4A4150;
  --ink-3: #6F6577;
  --line: #F0E4EC;
  --line-2: #E6D8E2;
  --wash: #FBF4F8;
  --good: #0B7A52;
  --good-bg: #E3F4EC;
  --warn: #A55A00;
  --warn-bg: #FFF1DC;
  --bad: #C0223A;
  --bad-bg: #FDE6EA;
  --info: #3F3AB8;
  --info-bg: #ECEBFF;

  --r-card: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(74, 27, 154, .04), 0 6px 24px -12px rgba(74, 27, 154, .14);
  --shadow-lg: 0 24px 64px -24px rgba(36, 12, 70, .35), 0 2px 8px rgba(36, 12, 70, .08);
  --ease-out: cubic-bezier(.22, 1, .36, 1);

  --f-head: 'Outfit', ui-sans-serif, system-ui, sans-serif;
  --f-body: 'Hanken Grotesk', ui-sans-serif, system-ui, sans-serif;
  --side: 248px;
  --top: 68px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 var(--f-body); letter-spacing: .003em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--f-head); margin: 0; color: var(--ink); }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.05rem); line-height: 1.1; letter-spacing: -.02em; font-weight: 600; }
h2 { font-size: 1.06rem; line-height: 1.3; letter-spacing: -.008em; font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--purple); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.ic { flex: none; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--purple); color: #fff; padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }

.num { font-family: var(--f-head); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .86em; letter-spacing: 0; }
.muted { color: var(--ink-3); }
.small { font-size: .84rem; }
.r { text-align: right; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 600; }
.tx-bad { color: var(--bad); }
.tx-warn { color: var(--warn); }
.tx-good { color: var(--good); }
.tx-pink { color: var(--pink-ink); }
.clip { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
  padding: 22px 16px 18px; background: linear-gradient(180deg, #FFFFFF 0%, #FFFAFD 100%);
  border-right: 1px solid var(--line);
}
/* brand: the official wordmark; the heart mark stands in when the sidebar collapses to icons */
.sidebar .brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 6px 10px 20px; border-radius: 14px; text-decoration: none !important; transition: transform .1s ease-out; }
.sidebar .brand:active { transform: scale(.98); }
.brand-word { display: block; width: 184px; height: auto; }
.brand-mark { display: none; }
.brand-sub { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 99px; background: var(--purple-50); color: var(--purple); font: 700 .66rem/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; }
.nav-group { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 18px 12px 6px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 2px 0; border-radius: 12px;
  color: var(--ink-2); font-weight: 500; text-decoration: none; position: relative;
  transition: background-color .18s var(--ease-out), color .18s var(--ease-out), transform .1s ease-out;
}
.sidebar nav a:hover { background: var(--wash); color: var(--ink); }
.sidebar nav a:active { transform: scale(.98); }
.sidebar nav a.active { background: var(--purple); color: #fff; box-shadow: 0 6px 16px -8px rgba(74, 27, 154, .7); }
.nav-count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 99px; font-size: .74rem; font-weight: 700; display: inline-grid; place-items: center; background: var(--blush); color: var(--pink-ink); }
.nav-count.warn { background: var(--warn-bg); color: var(--warn); }
.nav-count[hidden] { display: none; }
.sidebar nav a.active .nav-count { background: rgba(255, 255, 255, .2); color: #fff; }
.side-foot { margin-top: auto; padding: 14px; border-radius: 16px; background: var(--wash); font-size: .84rem; }
.side-foot small { color: var(--ink-3); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--top);
  display: flex; align-items: center; gap: 16px; padding: 0 28px;
  background: rgba(255, 247, 251, .78); backdrop-filter: blur(20px) saturate(170%); -webkit-backdrop-filter: blur(20px) saturate(170%);
}
.topbar::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 14px; pointer-events: none; background: linear-gradient(rgba(255, 247, 251, .9), rgba(255, 247, 251, 0)); }
.m-brand { display: none; }
.search { position: relative; flex: 1; max-width: 560px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; color: var(--ink-3); transition: border-color .15s, box-shadow .15s; }
.search:focus-within { border-color: var(--lav); box-shadow: 0 0 0 4px rgba(201, 179, 255, .35); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); height: 100%; }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { font: 600 .72rem var(--f-body); color: var(--ink-3); background: var(--wash); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
.search .search-x { display: none; }
.search-panel { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--card); border-radius: 18px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); padding: 8px; max-height: min(70vh, 520px); overflow: auto; color: var(--ink); transform-origin: top center; animation: pop .22s var(--ease-out); }
.search-panel h4 { font: 600 .72rem var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 10px 10px 4px; }
.sr { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; color: var(--ink); text-decoration: none !important; }
.sr:hover, .sr:focus { background: var(--wash); outline: none; }
.sr > span:nth-child(2) { flex: 1; min-width: 0; }
.sr b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr small { display: block; color: var(--ink-3); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--purple-50); color: var(--purple); }
.search-empty { padding: 18px; color: var(--ink-3); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top-actions .m-search { display: none; }
.syncpill { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); font-size: .86rem; font-weight: 500; color: var(--ink-2); transition: transform .1s ease-out, border-color .15s; }
.syncpill:hover { border-color: var(--lav); }
.syncpill:active { transform: scale(.97); }
.syncpill i { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-bg); }
.syncpill.warn i { background: #E08A00; box-shadow: 0 0 0 3px var(--warn-bg); }
.whoami { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 10px 0 4px; border: 1px solid var(--line); background: var(--card); border-radius: 99px; color: var(--ink-3); transition: transform .1s ease-out; }
.whoami:active { transform: scale(.97); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: linear-gradient(135deg, var(--purple), #7A3FD0); color: #fff; font: 600 .8rem var(--f-head); letter-spacing: .02em; flex: none; }
.avatar.sm { width: 28px; height: 28px; font-size: .7rem; vertical-align: middle; margin-right: 6px; }
.who { text-align: left; line-height: 1.15; }
.who b { display: block; font-size: .86rem; color: var(--ink); font-weight: 600; }
.who small { font-size: .74rem; color: var(--pink-ink); font-weight: 600; }

#banner { padding: 0 28px; }
.banner { display: flex; align-items: center; gap: 10px; margin-top: 4px; padding: 5px 6px 5px 14px; border-radius: 12px; background: var(--warn-bg); color: #6B3B00; border: 1px solid #F7D9A8; }
.banner p { flex: 1; font-size: .84rem; }
.banner .btn.sm { height: 28px; }
.banner span { color: #7A4A10; }

#view { outline: none; }
.view-pad { padding: 18px 28px 64px; max-width: 1480px; animation: viewin .32s var(--ease-out); }
@keyframes viewin { from { opacity: 0; transform: translateY(6px); } }

/* ---------- page furniture ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 6px 0 22px; }
.lede { color: var(--ink-3); margin-top: 6px; max-width: 70ch; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { margin-bottom: 6px; }
.crumbs a { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); font-weight: 500; font-size: .9rem; }
.crumbs a:hover { color: var(--purple); }
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--pink-ink); margin-bottom: 6px; }
.eyebrow .dchip { text-transform: none; letter-spacing: 0; }
.mono-h { font-family: var(--f-head); font-variant-numeric: tabular-nums; }

.card { background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow); border: 1px solid rgba(240, 228, 236, .7); }
.pad { padding: 22px; }
.pad-s { padding: 12px 14px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head.pad-s { margin: 0; border-bottom: 1px solid var(--line); padding: 16px 20px; align-items: center; }
.card-head .count { background: var(--blush); color: var(--pink-ink); font: 700 .8rem var(--f-head); padding: 2px 10px; border-radius: 99px; }
.link { color: var(--purple); font-weight: 600; font-size: .88rem; display: inline-flex; align-items: center; gap: 2px; background: none; border: 0; padding: 0; }
.link.sm { font-size: .84rem; }

/* buttons: feedback lives on the press */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 16px;
  border-radius: 12px; border: 1px solid transparent; font-weight: 600; font-size: .9rem; white-space: nowrap; text-decoration: none !important;
  transition: background-color .15s, border-color .15s, color .15s, transform .1s ease-out, box-shadow .15s;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.sm { height: 32px; padding: 0 12px; font-size: .82rem; border-radius: 10px; }
.btn.full { width: 100%; }
.btn.primary { background: var(--purple); color: #fff; box-shadow: 0 6px 14px -8px rgba(74, 27, 154, .8); }
.btn.primary:hover:not(:disabled) { background: var(--purple-700); }
.btn.ghost { background: var(--card); border-color: var(--line-2); color: var(--ink); }
.btn.ghost:hover:not(:disabled) { border-color: var(--lav); background: #FFFCFE; }
.btn.soft { background: var(--purple-50); color: var(--purple); }
.btn.soft:hover:not(:disabled) { background: #E8DDFF; }
.btn.danger { background: var(--bad); color: #fff; }
.btn.danger:hover:not(:disabled) { background: #A11A30; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; display: inline-grid; place-items: center; color: var(--ink-2); transition: background-color .15s, transform .1s ease-out; }
.icon-btn:hover { background: rgba(74, 27, 154, .07); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.sm { width: 32px; height: 32px; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; display: inline-block; animation: spin .7s linear infinite; vertical-align: -2px; }
.spin.dark { border-color: var(--line-2); border-top-color: var(--purple); }
.btn.ghost .spin { border-color: var(--line-2); border-top-color: var(--purple); }
@keyframes spin { to { transform: rotate(360deg); } }

/* segmented controls */
.range { display: inline-flex; gap: 2px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.range.sm { padding: 3px; border-radius: 12px; }
.seg { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font-weight: 600; font-size: .86rem; transition: background-color .18s var(--ease-out), color .18s; }
.range.sm .seg { height: 28px; padding: 0 11px; font-size: .8rem; border-radius: 9px; }
.seg:hover { color: var(--ink); background: var(--wash); }
.seg.on { background: var(--ink); color: #fff; }
.custom-range { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: -8px 0 18px; }
.custom-range label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .86rem; }
.custom-range input, .fsel input, .fsel select, .field input, .field select, .field textarea {
  height: 38px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; padding: 0 10px; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--purple) !important; box-shadow: 0 0 0 3px rgba(74, 27, 154, .14); }

/* deltas & badges */
.delta { display: inline-flex; align-items: center; gap: 3px; font: 600 .78rem var(--f-body); padding: 2px 8px; border-radius: 99px; }
.delta.up { color: var(--good); background: var(--good-bg); }
.delta.down { color: var(--bad); background: var(--bad-bg); }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: .76rem; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.t-good { color: var(--good); background: var(--good-bg); }
.t-warn { color: var(--warn); background: var(--warn-bg); }
.t-bad { color: var(--bad); background: var(--bad-bg); }
.t-info { color: var(--info); background: var(--info-bg); }
.t-purple { color: var(--purple); background: var(--purple-50); }
.t-muted { color: var(--ink-2); background: #F3EEF2; }
.flag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 7px; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.f-purple { background: var(--purple-50); color: var(--purple); }
.f-pink { background: #FFE7F4; color: var(--pink-ink); }
.f-warn { background: var(--warn-bg); color: var(--warn); }
.f-bad { background: var(--bad-bg); color: var(--bad); }
.f-good { background: var(--good-bg); color: var(--good); }
.f-info { background: var(--info-bg); color: var(--info); }
.f-muted { background: #F3EEF2; color: var(--ink-2); }
.dchip { display: inline-flex; align-items: center; gap: 7px; font-size: .84rem; font-weight: 500; white-space: nowrap; }
.dchip i { width: 10px; height: 10px; border-radius: 3px; background: var(--tone); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.tone { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.thumb { width: var(--s); height: var(--s); border-radius: min(14px, calc(var(--s) * .24)); flex: none; display: inline-block; overflow: hidden; background: #F7F0F4; box-shadow: inset 0 0 0 1px rgba(20, 16, 22, .06); }
.thumb svg, .thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }

/* ---------- overview ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpis.four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 4px; }
.kpi { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.kpi-top { display: flex; align-items: center; gap: 10px; }
.kpi-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--wash); color: var(--purple); }
.kpi-label { font-size: .86rem; color: var(--ink-3); font-weight: 500; }
.kpi-value { font-size: clamp(1.5rem, 1.1rem + .9vw, 1.9rem); font-weight: 600; line-height: 1.05; letter-spacing: -.025em; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.kpi-pct { font-size: .58em; color: var(--pink-ink); font-weight: 600; letter-spacing: -.01em; }
.kpi-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .78rem; color: var(--ink-3); }
.kpi-hero { background: linear-gradient(160deg, #FFFFFF 30%, #FFF0F8 100%); border-color: #FBD9EC; }
.kpi-hero .kpi-ic { background: var(--blush); color: var(--pink-ink); }

.grid-2-1 { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.grid-1-1 { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; }
.legend { display: flex; gap: 14px; font-size: .82rem; color: var(--ink-2); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; }
.report-body > .legend { margin-bottom: 8px; }

.chart-host { width: 100%; min-height: 120px; }
.chart { position: relative; }
.chart svg { display: block; touch-action: pan-y; }
.chart .grid { stroke: #F1E7EE; stroke-width: 1; }
.chart .axis { fill: var(--ink-3); font: 500 11px var(--f-body); font-variant-numeric: tabular-nums; }
.chart .xline { stroke: var(--ink); stroke-opacity: .25; stroke-dasharray: 3 3; }
.chart .xhair { transition: opacity .12s; }
.chart .col { transition: opacity .12s; }
.tip { position: absolute; left: 0; top: 0; pointer-events: none; min-width: 150px; padding: 10px 12px; border-radius: 12px; background: rgba(20, 16, 22, .92); color: #fff; font-size: .8rem; box-shadow: var(--shadow-lg); backdrop-filter: blur(8px); z-index: 2; }
.tip b { display: block; font-weight: 600; margin-bottom: 4px; }
.tip span { display: flex; align-items: center; gap: 7px; }
.tip i { width: 8px; height: 8px; border-radius: 2px; }
.tip em { margin-left: auto; padding-left: 14px; font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }

.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: minmax(118px, 160px) minmax(0, 1fr) 72px; align-items: center; gap: 12px; border-radius: 8px; }
.bar-row:hover .bar, .bar-row:focus .bar { filter: brightness(1.1); }
.bar-label { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--ink-2); min-width: 0; }
.bar-label span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { position: relative; height: 12px; background: #F6EFF4; border-radius: 4px; }
.bar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; transition: width .5s var(--ease-out); }
.bar-ref { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); opacity: .55; border-radius: 1px; }
.bar-val { text-align: right; font: 600 .86rem var(--f-head); font-variant-numeric: tabular-nums; }
.bar-val small { display: block; font: 500 .72rem var(--f-body); color: var(--ink-3); }

.att-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.att { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.att:first-child { border-top: 0; padding-top: 2px; }
.att > div { flex: 1; min-width: 0; }
.att b { display: block; font-weight: 600; font-size: .92rem; }
.att small { display: block; color: var(--ink-3); font-size: .8rem; margin-top: 2px; }
.att-ic { width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--wash); color: var(--purple); }
.att.warn .att-ic { background: var(--warn-bg); color: var(--warn); }
.att.ok .att-ic { background: var(--good-bg); color: var(--good); }

.snap-hero { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.snap-hero .num { font-size: 2.4rem; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.snap-hero small { color: var(--ink-3); }
.snap-bar { display: flex; gap: 2px; height: 10px; margin-bottom: 18px; }
.snap-bar span { border-radius: 4px; }
.snap-bar .in { background: var(--purple); }
.snap-bar .out { background: var(--pink); }
.snap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.snap-grid > * { padding: 10px 12px; border-radius: 12px; background: var(--wash); color: var(--ink); text-decoration: none !important; transition: background-color .15s, transform .1s ease-out; }
.snap-grid a:hover { background: #F6E9F1; }
.snap-grid a:active { transform: scale(.98); }
.snap-grid dt { font-size: .76rem; color: var(--ink-3); }
.snap-grid dd { margin: 2px 0 0; font-size: 1.15rem; font-weight: 600; }

/* ---------- tabs, filters, tables ---------- */
.tabs { display: flex; gap: 4px; margin: 6px 0 14px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 10px 12px 12px; color: var(--ink-3); font-weight: 600; font-size: .9rem; white-space: nowrap; text-decoration: none !important; }
.tabs a:hover { color: var(--ink); }
.tabs a span { font: 600 .74rem var(--f-body); background: #F3EEF2; color: var(--ink-2); padding: 1px 7px; border-radius: 99px; }
.tabs a.on { color: var(--purple); }
.tabs a.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2.5px; border-radius: 2px; background: var(--purple); }
.tabs a.on span { background: var(--purple-50); color: var(--purple); }
.warn-dot { width: 7px; height: 7px; border-radius: 50%; background: #E08A00; display: inline-block; }

.filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.fsel { display: flex; flex-direction: column; gap: 3px; font-size: .72rem; font-weight: 600; color: var(--ink-3); letter-spacing: .02em; }
.fsel select, .fsel input { height: 34px; font-size: .86rem; color: var(--ink); max-width: 170px; }
.fsel .pair { display: flex; align-items: center; gap: 4px; }
.fsel .pair input { width: 70px; }
.fsel .pair i { color: var(--ink-3); font-style: normal; }
.fcheck { display: flex; align-items: center; gap: 7px; font-size: .86rem; font-weight: 500; height: 34px; }
.fcheck input { accent-color: var(--purple); width: 16px; height: 16px; }
.filters-toggle { display: none; }
.pill-n { background: var(--purple); color: #fff; border-radius: 99px; padding: 0 6px; font-size: .7rem; }
.inline-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 12px; color: var(--ink-3); flex: 1 1 260px; max-width: 360px; background: #fff; align-self: flex-end; }
.inline-search:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(74, 27, 154, .14); }
.inline-search input { border: 0; outline: 0; box-shadow: none !important; background: transparent; flex: 1; min-width: 0; height: 100%; color: var(--ink); }
.chipbar { display: flex; gap: 6px; margin: -4px 0 12px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 99px; background: var(--card); border: 1px solid var(--line-2); color: var(--ink-2); font-size: .82rem; font-weight: 600; text-decoration: none !important; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.table-card { overflow: clip; }
.table-card > .tbl thead th { position: sticky; top: var(--top); z-index: 2; }
.scroll-x { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th { text-align: left; font-size: .74rem; font-weight: 600; color: var(--ink-3); letter-spacing: .03em; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #FFFCFE; }
.tbl th.r { text-align: right; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { font-family: var(--f-body); font-weight: 500; }
.tbl tr[data-href] { cursor: pointer; transition: background-color .12s; }
.tbl tr[data-href]:hover { background: #FFF8FC; }
.tbl tr[data-href]:active { background: #FCEFF6; }
.tbl select { height: 32px; border: 1px solid var(--line-2); border-radius: 9px; padding: 0 8px; background: #fff; }
.cust { display: flex; flex-direction: column; line-height: 1.25; }
.cust small { color: var(--ink-3); font-size: .78rem; }
.masked { letter-spacing: .01em; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.pager div { display: flex; gap: 6px; }
.info-line { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.mlist { display: none; list-style: none; margin: 0; padding: 0; }
.chg .old { color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(111, 101, 119, .5); }
.chg .new { color: var(--ink); font-weight: 600; }

/* ---------- empty & skeleton ---------- */
.empty { padding: 56px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--ink-3); }
.empty .ic { color: var(--lav); width: 44px; height: 44px; padding: 8px; border-radius: 14px; background: var(--purple-50); color: var(--purple); }
.empty h3 { color: var(--ink); font-size: 1.12rem; }
.empty p { max-width: 46ch; }
.empty .btn { margin-top: 8px; }
.sk { display: inline-block; border-radius: 8px; background: linear-gradient(90deg, #F5ECF2 0%, #FBF5F9 50%, #F5ECF2 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-row { display: flex; gap: 22px; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.sk-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: 70px 0 14px; }
.sk-kpis .card { display: flex; flex-direction: column; gap: 6px; }
.sk-grid { display: grid; grid-template-columns: 1.65fr 1fr; gap: 14px; }

/* ---------- order detail ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: var(--wash); border: 1px solid var(--line); margin-bottom: 14px; color: var(--ink-2); }
.notice b { color: var(--ink); }
.notice p { font-size: .88rem; margin-top: 2px; }
.notice > .ic { margin-top: 2px; color: var(--purple); }
.notice.warn { background: var(--warn-bg); border-color: #F7D9A8; }
.notice.warn > .ic { color: var(--warn); }
.notice.good { background: var(--good-bg); border-color: #BFE4D2; }
.notice.good > .ic { color: var(--good); }
.notice.soft { background: var(--purple-50); border-color: #E2D6FF; font-size: .86rem; margin: 6px 0 0; }
.notice.conflict { background: #FFF0F8; border-color: #F9C6E2; }
.notice.conflict > .ic { color: var(--pink-ink); }
.notice.conflict > div { flex: 1; }
.notice.conflict ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.notice.conflict li { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: rgba(255, 255, 255, .7); padding: 10px 12px; border-radius: 12px; font-size: .86rem; }
.cf-act { display: flex; gap: 6px; }

.progress { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 0 0 18px; padding: 0; }
.progress li { display: flex; flex-direction: column; gap: 8px; font-size: .78rem; font-weight: 600; color: var(--ink-3); }
.progress li span { height: 6px; border-radius: 3px; background: #EFE4EC; }
.progress li.done { color: var(--ink-2); }
.progress li.done span { background: var(--purple); }
.progress li.now { color: var(--purple); }
.progress li.now span { background: linear-gradient(90deg, var(--purple), var(--pink)); }
.progress li.warn { color: var(--warn); }
.progress li.warn span { background: repeating-linear-gradient(135deg, #F2B654 0 6px, #F8D69C 6px 12px); }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.col-main, .col-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.margin-card .card-head { align-items: flex-start; }
.margin-big { text-align: right; }
.margin-big .num { display: block; font-size: 2rem; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.margin-big small { color: var(--pink-ink); font-weight: 600; }
.wf { display: flex; flex-direction: column; }
.wf-row { display: grid; grid-template-columns: minmax(150px, 230px) minmax(0, 1fr) 96px; align-items: center; gap: 14px; padding: 8px 0; }
.wf-k { font-size: .88rem; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.wf-k small { flex-basis: 100%; color: var(--ink-3); font-size: .74rem; }
.wf-track { position: relative; height: 14px; }
.wf-track span { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: var(--lav); }
.wf-zero { position: absolute; top: -6px; bottom: -6px; width: 1px; background: var(--ink-3); opacity: .5; }
.wf-row.in .wf-track span { background: #B9A1F5; }
.wf-row.out .wf-track span { background: repeating-linear-gradient(135deg, #F7A9CF 0 5px, #FBC6DF 5px 10px); }
.wf-row.total, .wf-row.margin { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 12px; }
.wf-row.total .wf-k, .wf-row.margin .wf-k { color: var(--ink); font-weight: 700; }
.wf-row.total .wf-track span { background: var(--purple); }
.wf-row.margin .wf-track span { background: linear-gradient(90deg, var(--purple), var(--pink)); height: 18px; top: -2px; }
.wf-row.loss .wf-track span { background: var(--bad); }
.wf-v { text-align: right; font-weight: 600; font-size: .95rem; }
.wf-row.margin .wf-v { font-size: 1.1rem; }
.wf-v.neg { color: var(--ink-2); }
.est { display: inline-flex; height: 19px; align-items: center; padding: 0 7px; border-radius: 6px; font-size: .68rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; background: var(--warn-bg); color: var(--warn); }
.est.actual { background: var(--good-bg); color: var(--good); }
.formula { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-2); line-height: 1.55; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; padding: 0 0 18px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li:last-child { padding-bottom: 0; }
.tl-dot { width: 14px; height: 14px; margin-top: 3px; border-radius: 50%; background: #fff; border: 3px solid var(--purple); position: relative; z-index: 1; }
.timeline li.warn .tl-dot { border-color: #E08A00; }
.timeline li.bad .tl-dot { border-color: var(--bad); }
.timeline li.eldorado .tl-dot { border-color: var(--lav); }
.timeline li.store .tl-dot { border-color: var(--pink); }
.timeline b { font-weight: 600; font-size: .9rem; display: block; }
.timeline small { display: block; color: var(--ink-3); font-size: .8rem; margin-top: 2px; word-break: break-word; }
.timeline time { color: var(--ink-3); font-size: .8rem; white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.src { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 1px 6px; border-radius: 5px; }
.src.e { background: var(--purple-50); color: var(--purple); }
.src.s { background: #FFE7F4; color: var(--pink-ink); }

.kv { margin: 0; display: flex; flex-direction: column; }
.kv > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: .88rem; }
.kv > div:first-child { border-top: 0; padding-top: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; word-break: break-word; }
.kv dd small { display: block; color: var(--ink-3); font-size: .76rem; }
.kv .sum dt, .kv .sum dd { font-weight: 700; color: var(--ink); }
.kv.inline { flex-direction: row; flex-wrap: wrap; gap: 8px 28px; margin: 10px 0; }
.kv.inline > div { display: block; border: 0; padding: 0; }
.reveal-note { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.file-preview { margin-top: 12px; font-size: .84rem; }
.file-preview summary, .sync-job summary { cursor: pointer; color: var(--purple); font-weight: 600; }
pre { background: #1C1520; color: #F4E9F0; padding: 12px 14px; border-radius: 12px; font-size: .76rem; line-height: 1.6; overflow-x: auto; margin: 8px 0; }
.notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.notes li { background: var(--wash); border-radius: 12px; padding: 10px 12px; font-size: .88rem; }
.notes small { color: var(--ink-3); font-size: .76rem; }

/* fields */
.field { display: flex; flex-direction: column; gap: 6px; font-size: .84rem; font-weight: 600; color: var(--ink-2); margin-bottom: 14px; }
.field > small { font-weight: 400; color: var(--ink-3); font-size: .78rem; }
.field textarea { height: auto; padding: 10px; resize: vertical; font-weight: 400; color: var(--ink); }
.field input, .field select { color: var(--ink); font-weight: 400; }
.field-err { color: var(--bad); font-weight: 500; font-size: .8rem; display: flex; align-items: center; gap: 5px; }
.money-in { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; height: 38px; overflow: hidden; }
.money-in:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(74, 27, 154, .14); }
.money-in b { padding: 0 4px 0 10px; color: var(--ink-3); font-weight: 600; }
.money-in b:last-child { padding: 0 10px 0 4px; }
.money-in input { border: 0 !important; box-shadow: none !important; flex: 1; min-width: 0; height: 100%; padding: 0 8px 0 2px; background: transparent; font-variant-numeric: tabular-nums; }
.money-in.sm { height: 32px; width: 110px; margin-left: auto; }
.money-in:has(input.invalid) { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(192, 34, 58, .12); }
.money-in:has(input:disabled) { background: #FAF6F8; }
.seg-group { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: #F3EEF2; margin-bottom: 14px; }
.seg-group.sm { margin: 0; }
.seg-group label { position: relative; }
.seg-group input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg-group span { display: inline-flex; height: 32px; align-items: center; padding: 0 14px; border-radius: 9px; font-weight: 600; font-size: .86rem; color: var(--ink-2); transition: background-color .18s, color .18s; }
.seg-group input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(20, 16, 22, .12); }
.seg-group input:focus-visible + span { outline: 2px solid var(--purple); }
.seg-group input:disabled + span { opacity: .6; }
.preview-margin { margin-top: 14px; font-size: .9rem; }

/* ---------- sheet (bottom sheet on phones, side panel on desktop) ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(28, 12, 40, .28); }
.sheet {
  position: fixed; z-index: 61; top: 12px; right: 12px; bottom: 12px; width: min(440px, calc(100vw - 24px));
  display: flex; flex-direction: column; background: rgba(255, 255, 255, .96); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 24px; box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, .7); will-change: transform; overscroll-behavior: contain;
}
.sheet.wide { width: min(560px, calc(100vw - 24px)); }
.sheet-grab { display: none; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 12px 22px; }
.sheet-head h2 { font-size: 1.2rem; }
.sheet-head p { color: var(--ink-3); font-size: .86rem; margin-top: 2px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 6px 22px 20px; }
.sheet-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
body.sheet-open { overflow: hidden; }
.sync-job { padding: 14px 0; border-top: 1px solid var(--line); }
.sheet .sync-job:first-child { border-top: 0; padding-top: 0; }
.sync-job p { font-size: .88rem; color: var(--ink-2); margin: 4px 0 8px; }
.sync-job dl { display: flex; gap: 22px; margin: 0 0 8px; font-size: .8rem; flex-wrap: wrap; }
.sync-job dt { color: var(--ink-3); }
.sync-job dd { margin: 0; font-weight: 600; }
.sync-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sync-top small { color: var(--ink-3); font-size: .8rem; }
.sync-job .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-bg); }
.sync-job.error .dot { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); }
section.sync-job { border-top: 0; padding: 22px; margin-bottom: 14px; }
.role-list { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.role-opt { display: grid; grid-template-columns: 1fr auto; text-align: left; gap: 2px 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: #fff; transition: border-color .15s, transform .1s ease-out; }
.role-opt:active { transform: scale(.98); }
.role-opt small { grid-column: 1; color: var(--ink-3); font-size: .8rem; }
.role-opt .ic { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--purple); }
.role-opt.on { border-color: var(--purple); background: var(--purple-50); }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.more-nav { display: flex; flex-direction: column; }
.more-nav a, .more-nav button { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font-weight: 600; text-align: left; text-decoration: none !important; }
.more-nav span { flex: 1; }
.more-nav .ic:first-child { color: var(--purple); }
.filter-stack { display: flex; flex-direction: column; gap: 14px; }
.filter-stack .fsel select, .filter-stack .fsel input { max-width: none; width: 100%; height: 42px; }
.filter-stack .fsel .pair input { flex: 1; }
.opt-list { display: flex; flex-direction: column; gap: 6px; }
.opt { text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 600; transition: border-color .15s, transform .1s ease-out; }
.opt:hover { border-color: var(--lav); }
.opt:active { transform: scale(.98); }

/* toast */
.toast { position: fixed; z-index: 80; left: 50%; bottom: 24px; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; max-width: min(520px, calc(100vw - 32px)); border-radius: 14px; background: rgba(20, 16, 22, .94); color: #fff; font-size: .88rem; box-shadow: var(--shadow-lg); transform: translate(-50%, 20px) scale(.96); opacity: 0; pointer-events: none; transition: transform .35s var(--ease-out), opacity .2s; }
.toast.show { transform: translate(-50%, 0) scale(1); opacity: 1; pointer-events: auto; }
.toast > span { color: var(--pink); display: grid; }
.toast-undo { margin-left: 6px; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-weight: 700; padding: 6px 12px; border-radius: 9px; }

/* ---------- products ---------- */
.list-meta { display: flex; justify-content: space-between; align-items: center; margin: 0 4px 10px; font-size: .9rem; }
.prod-card { overflow: hidden; }
.pr-scroll { overflow-x: auto; }
.pr-table { min-width: 1484px; } /* = sum of the fixed tracks below + gaps + padding, so rows never spill */
.pr-h, .pr-row {
  display: grid; align-items: center; gap: 12px; padding: 0 16px;
  grid-template-columns: 20px 40px 112px minmax(200px, 1fr) 112px 156px 120px 80px 84px 64px 80px 56px 184px;
}
.pr-h { height: 44px; font-size: .74rem; font-weight: 600; color: var(--ink-3); letter-spacing: .03em; border-bottom: 1px solid var(--line); background: #FFFCFE; }
.pr-h input, .pr-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--purple); margin: 0; }
.vbody { position: relative; }
.pr-row { position: absolute; left: 0; right: 0; top: 0; border-bottom: 1px solid var(--line); font-size: .86rem; cursor: pointer; transition: background-color .12s; }
.pr-row:hover { background: #FFF8FC; }
.pr-row:active { background: #FCEFF6; }
.pr-row.sel { background: #F7F1FF; }
.pr-row > * { min-width: 0; }
.pr-row .sku { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pname { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pname a { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-row .brand, .pr-row .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-row .num { font-family: var(--f-body); font-weight: 500; font-variant-numeric: tabular-nums; }
.pr-row .flags { display: flex; gap: 4px; overflow: hidden; flex-wrap: nowrap; }
.pr-row .flags .flag { flex: none; }
.pr-row .dchip, .pr-h > span { min-width: 0; overflow: hidden; }
.pr-row .num { white-space: nowrap; }
.dchip { max-width: 100%; }
.dchip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.prod-card { position: relative; }
.prod-card::before, .prod-card::after { content: ''; position: absolute; top: 0; bottom: 0; width: 28px; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .2s; }
.prod-card::before { left: 0; background: linear-gradient(90deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0)); }
.prod-card::after { right: 0; background: linear-gradient(270deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0)); }
.prod-card.scroll-l::before, .prod-card.scroll-r::after { opacity: 1; }
.ovdot { width: 7px; height: 7px; border-radius: 50%; background: var(--pink); flex: none; display: inline-block; margin-left: 4px; vertical-align: middle; }
.m-only { display: none; }
.c-chk { display: flex; align-items: center; height: 100%; }
.bulkbar { position: fixed; z-index: 40; left: calc(var(--side) + 50% - var(--side) / 2); transform: translateX(-50%); bottom: 22px; display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 16px; border-radius: 18px; background: rgba(20, 16, 22, .94); color: #fff; box-shadow: var(--shadow-lg); max-width: calc(100vw - var(--side) - 32px); overflow-x: auto; animation: rise .35s var(--ease-out); }
.bulkbar b { white-space: nowrap; margin-right: 6px; font-size: .9rem; }
.bulkbar .btn.ghost { background: rgba(255, 255, 255, .1); border-color: transparent; color: #fff; }
.bulkbar .btn.ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .18); }
.bulkbar .icon-btn { color: #fff; }
@keyframes rise { from { transform: translate(-50%, 24px); opacity: 0; } }

.prod-head { display: flex; align-items: flex-start; gap: 20px; margin: 8px 0 18px; flex-wrap: wrap; }
.ph-main { flex: 1; min-width: 260px; }
.ph-main h1 { font-size: clamp(1.4rem, 1.1rem + .9vw, 1.8rem); }
.ph-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 10px; }
.ph-main .flags { display: flex; gap: 6px; flex-wrap: wrap; }
.sku-copy { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); transition: transform .1s ease-out, border-color .15s; }
.sku-copy:hover { border-color: var(--lav); }
.sku-copy:active { transform: scale(.96); }
.sku-copy .mono { font-size: .84rem; font-weight: 600; }

.ov-grid { display: flex; flex-direction: column; }
.ov-h, .ov-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1.3fr) 88px; gap: 16px; align-items: start; }
.ov-h { font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); padding: 0 0 10px; border-bottom: 1px solid var(--line); }
.ov-row { padding: 14px 0; border-bottom: 1px solid var(--line); transition: background-color .2s; }
.ov-row:last-child { border-bottom: 0; }
.ov-row.over { background: linear-gradient(90deg, rgba(255, 77, 189, .05), transparent 60%); }
.ov-k { font-weight: 600; font-size: .88rem; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 8px; }
.ov-e { font-size: .86rem; color: var(--ink-3); padding-top: 9px; word-break: break-word; }
.ov-e .clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ov-s input[type=text], .ov-s select, .ov-s textarea { width: 100%; height: 38px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 10px; background: #fff; }
.ov-s textarea { height: auto; padding: 9px 10px; resize: vertical; line-height: 1.45; }
.ov-s :disabled { background: #FAF6F8; color: var(--ink-2); }
.ov-r { padding-top: 3px; text-align: right; }
.reset { color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-t { position: relative; }
.chip-t input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip-t span { display: inline-flex; align-items: center; height: 30px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--line-2); font-size: .8rem; font-weight: 600; color: var(--ink-2); background: #fff; transition: all .15s; }
.chip-t input:checked + span { background: var(--purple); border-color: var(--purple); color: #fff; }
.chip-t input:focus-visible + span { outline: 2px solid var(--purple); outline-offset: 2px; }
.chip-t input:disabled + span { opacity: .6; }
.price-help { margin-top: 6px; font-size: .8rem; }
.readonly { background: linear-gradient(180deg, #FFFFFF, #FDF9FC); }
.restrict { display: inline-flex; align-items: flex-start; gap: 6px; color: var(--ink); font-weight: 500; }
.restrict .ic { margin-top: 3px; color: var(--pink-ink); }
.savebar { position: sticky; bottom: 16px; z-index: 20; display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 10px 10px 18px; border-radius: 18px; background: rgba(255, 255, 255, .86); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: rise2 .35s var(--ease-out); }
.savebar > span { flex: 1; font-size: .9rem; }
@keyframes rise2 { from { transform: translateY(16px); opacity: 0; } }

/* ---------- catalog changes ---------- */
.today { margin-bottom: 14px; background: linear-gradient(135deg, #FFFFFF 40%, #F7F0FF 100%); }
.today-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.today-head h2 { font-size: 1.3rem; letter-spacing: -.015em; }
.today-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.today-stats a { padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .8); border: 1px solid var(--line); color: var(--ink); text-decoration: none !important; transition: border-color .15s, transform .1s ease-out; }
.today-stats a:hover { border-color: var(--lav); }
.today-stats a:active { transform: scale(.98); }
.today-stats .num { display: block; font-size: 1.7rem; font-weight: 600; line-height: 1.1; }
.today-stats .num.up { color: var(--purple); }
.today-stats small { color: var(--ink-3); font-size: .8rem; }
.changes-tbl td.chg { max-width: 360px; }

/* ---------- reports ---------- */
.reports-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 14px; align-items: start; }
.report-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--top) + 12px); }
.report-nav a { padding: 9px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 500; font-size: .9rem; text-decoration: none !important; transition: background-color .15s; }
.report-nav a:hover { background: var(--wash); }
.report-nav a.on { background: var(--purple-50); color: var(--purple); font-weight: 600; }
.report-pick { display: none; }
.report-ctl { display: flex; gap: 8px; flex-wrap: wrap; }
.report-body .bars, .report-body .chart-host, .dept-compare { margin-bottom: 18px; }
.dept-compare p { margin-top: 10px; }
.report-tbl { margin-top: 4px; }

/* ---------- settings ---------- */
.settings-body > .card { margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 18px; }
.masked-field { display: flex; align-items: center; justify-content: space-between; height: 38px; padding: 0 10px; border: 1px dashed var(--line-2); border-radius: 10px; background: #FAF6F8; font-weight: 500; }
.pair-in { display: flex; align-items: center; gap: 8px; }
.pair-in i { font-style: normal; color: var(--ink-3); }
.pair-in .money-in { flex: 1; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.toggle-row { display: flex; align-items: center; gap: 10px; height: 38px; }
.switch { width: 40px; height: 24px; border-radius: 99px; background: var(--line-2); position: relative; }
.switch.on { background: var(--purple); opacity: .75; }
.switch i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch.on i { left: 19px; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 20px; border: 1.5px dashed var(--lav); border-radius: 16px; background: #FCFAFF; text-align: center; color: var(--ink-2); cursor: pointer; position: relative; transition: background-color .15s, border-color .15s; }
.drop:hover, .drop.over { background: var(--purple-50); border-color: var(--purple); }
.drop.off { opacity: .55; cursor: not-allowed; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .ic { color: var(--purple); }
.drop small { color: var(--ink-3); }
.recon { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; font-size: .9rem; }
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }

/* ---------- phone tab bar ---------- */
.tabbar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1360px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi-hero { grid-column: span 1; }
  .sk-kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1180px) {
  .grid-2-1, .grid-1-1, .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .col-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .today-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
  :root { --side: 84px; }
  .sidebar { padding: 18px 12px; align-items: center; }
  .nav-group, .side-foot, .sidebar nav a { font-size: 0; }
  .sidebar .brand { padding: 4px 0 18px; align-items: center; }
  .brand-word, .brand-sub { display: none; }
  .brand-mark { display: block; width: 40px; height: 40px; }
  .sidebar nav a { justify-content: center; padding: 12px; gap: 0; }
  .sidebar nav .nav-count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 16px; font-size: .64rem; padding: 0 5px; }
  .nav-group { margin: 10px 0; height: 1px; width: 32px; background: var(--line); }
  .sidebar nav { display: flex; flex-direction: column; align-items: center; }
  .reports-layout { grid-template-columns: 1fr; }
  .report-nav { display: none; }
  .report-pick { display: block; height: 42px; border-radius: 12px; border: 1px solid var(--line-2); padding: 0 12px; background: #fff; font-weight: 600; }
  .filters .filter-row { display: none; }
  .filters .filter-row.show-m { display: flex; }
  .filters-toggle { display: inline-flex; }
  .who { display: none; }
}
@media (max-width: 860px) {
  :root { --top: 60px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .topbar { padding: 0 16px; gap: 10px; }
  .m-brand { display: block; }
  .m-brand img { display: block; width: 110px; height: auto; }
  .search { display: none; }
  .top-actions .m-search { display: inline-grid; }
  .lg-only, .banner p span { display: none; }
  body.searching .search { display: flex; position: fixed; top: 8px; left: 12px; right: 12px; max-width: none; z-index: 50; box-shadow: var(--shadow-lg); }
  body.searching .search kbd { display: none; }
  body.searching .search .search-x { display: inline-grid; width: 32px; height: 32px; }
  .syncpill span { display: none; }
  .syncpill { width: 38px; padding: 0; justify-content: center; }
  .whoami { padding: 0 4px; height: 42px; }
  .whoami > .ic { display: none; }
  #banner { padding: 0 16px; }
  .banner { flex-wrap: wrap; }
  .banner p { flex-basis: calc(100% - 60px); }
  .view-pad { padding: 12px 16px calc(96px + env(safe-area-inset-bottom)); }
  .page-head { align-items: flex-start; margin-bottom: 16px; }
  .page-head .range { width: 100%; overflow-x: auto; }
  .page-head .seg { flex: 1; padding: 0 10px; justify-content: center; }
  .kpis, .kpis.four { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-hero { grid-column: span 2; }
  .kpi { padding: 14px; }
  .kpi-ic { display: none; }
  .pad { padding: 18px 16px; }
  .snap-grid { grid-template-columns: repeat(2, 1fr); }
  .att { flex-wrap: wrap; }
  .att > .btn { margin-left: 52px; }
  .bar-row { grid-template-columns: 112px minmax(0, 1fr) 56px; gap: 8px; }
  .tbl:has(+ .mlist) { display: none; }
  .mlist { display: block; }
  .mlist li { border-bottom: 1px solid var(--line); }
  .mlist li:last-child { border-bottom: 0; }
  .mlist li > a { display: block; padding: 14px 16px; color: var(--ink); text-decoration: none; }
  .mlist li:not(:has(> a)) { padding: 14px 16px; }
  .mlist li > a:active { background: #FCEFF6; }
  .ml-top, .ml-mid, .ml-bot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
  .ml-top b { font-family: var(--f-head); }
  .ml-mid { margin: 6px 0 4px; }
  .ml-mid .cust { flex-direction: row; gap: 6px; align-items: baseline; }
  .ml-bot { font-size: .8rem; color: var(--ink-3); flex-wrap: wrap; }
  .pager { flex-wrap: wrap; }
  .progress li { font-size: .66rem; }
  .wf-row { grid-template-columns: minmax(0, 1fr) 84px; gap: 4px 10px; }
  .wf-track { grid-column: 1 / -1; grid-row: 2; height: 10px; }
  .margin-big .num { font-size: 1.6rem; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; }
  .today-stats { grid-template-columns: repeat(2, 1fr); }
  .today-stats a:last-child { grid-column: span 2; }
  .inline-search { max-width: none; }
  .list-meta { flex-direction: column; align-items: flex-start; gap: 2px; }
  /* products: compact two-line rows */
  .pr-table { min-width: 0; }
  .pr-h, .pr-row { grid-template-columns: 22px 44px minmax(0, 1fr) auto; gap: 12px; padding: 0 14px; }
  .pr-h > :nth-child(n+3):not(:nth-child(4)), .pr-row > :nth-child(3), .pr-row > :nth-child(5), .pr-row > :nth-child(6), .pr-row > :nth-child(7),
  .pr-row > :nth-child(n+9) { display: none; }
  .pname { flex-direction: column; align-items: flex-start; gap: 2px; }
  .pname a { max-width: 100%; }
  .pname .ovdot { display: none; }
  .m-only { display: block; font-size: .76rem; color: var(--ink-3); font-weight: 400; }
  .pr-row .price { display: flex; flex-direction: column; align-items: flex-end; font-weight: 600 !important; }
  .bulkbar { left: 12px; right: 12px; transform: none; bottom: calc(76px + env(safe-area-inset-bottom)); max-width: none; animation: none; }
  .ov-h { display: none; }
  .ov-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .ov-k { flex-direction: row; align-items: center; padding: 0; grid-column: 1; }
  .ov-r { grid-column: 2; grid-row: 1; padding: 0; }
  .ov-e, .ov-s { grid-column: 1 / -1; padding: 0; }
  .ov-e::before, .ov-s::before { content: attr(data-label); display: block; font-size: .7rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
  .ov-r .reset span { display: none; }
  .savebar { bottom: calc(80px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
  .savebar > span { flex-basis: 100%; }
  .savebar .btn { flex: 1; }
  .roles { grid-template-columns: 1fr; }
  .sk-kpis { grid-template-columns: repeat(2, 1fr); margin-top: 60px; }
  .sk-grid { grid-template-columns: 1fr; }
  .prod-head .thumb { --s: 64px !important; }
  .prod-head .head-actions { width: auto; }
  .detail .page-head .head-actions .btn { flex: 1 1 30%; }
  .kv > div { grid-template-columns: 96px minmax(0, 1fr); }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }

  /* bottom sheet */
  .sheet, .sheet.wide { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 88vh; border-radius: 24px 24px 0 0; border-bottom: 0; }
  .sheet-grab { display: flex; justify-content: center; padding: 8px 0 0; touch-action: none; cursor: grab; }
  .sheet-grab span { width: 38px; height: 5px; border-radius: 3px; background: #DCCFD8; }
  .sheet-head { touch-action: none; padding-top: 10px; }
  .sheet-foot .btn { flex: 1; }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 35; left: 0; right: 0; bottom: 0;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 250, 253, .82); backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%);
    border-top: 1px solid rgba(240, 228, 236, .9);
  }
  .tabbar a, .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 4px; border: 0; background: none; border-radius: 12px; color: var(--ink-3); font-size: .68rem; font-weight: 600; text-decoration: none !important; transition: transform .1s ease-out, color .15s; }
  .tabbar a:active, .tabbar button:active { transform: scale(.92); }
  .tabbar .active { color: var(--purple); }
  .tabbar .active .ic { stroke-width: 2; }
  .tab-dot { position: absolute; top: 4px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: #E08A00; box-shadow: 0 0 0 2px #FFF7FB; }
  .tab-dot[hidden] { display: none; }
}
@media (max-width: 420px) {
  .progress { gap: 3px; }
  .bar-row { grid-template-columns: 96px minmax(0, 1fr) 50px; }
  .snap-hero .num { font-size: 2rem; }
}

/* ---------- product gallery ---------- */
.sel-all { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; color: var(--ink-2); margin: 0 4px 10px; }
.sel-all input, .pc-chk input { width: 17px; height: 17px; accent-color: var(--purple); }
.gbody { position: relative; }
.pcard { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; background: var(--card); border-radius: 18px; border: 1px solid rgba(240, 228, 236, .8); box-shadow: var(--shadow); overflow: hidden; cursor: pointer; transition: box-shadow .2s var(--ease-out), border-color .15s; }
.pcard:hover { box-shadow: 0 2px 4px rgba(74, 27, 154, .05), 0 16px 34px -18px rgba(74, 27, 154, .35); border-color: var(--lav); }
.pcard:active { border-color: var(--purple); }
.pcard.sel { border-color: var(--purple); box-shadow: 0 0 0 2px var(--purple); }
.pc-img { position: relative; height: var(--img-h, 190px); flex: none; }
.pc-img .thumb { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
.pc-flags { position: absolute; left: 10px; top: 10px; display: flex; gap: 4px; flex-wrap: wrap; }
.pc-flags .flag { box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.pc-chk { position: absolute; right: 8px; top: 8px; width: 32px; height: 32px; border-radius: 10px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(8px); display: grid; place-items: center; }
.pc-body { padding: 12px 14px 12px; display: flex; flex-direction: column; gap: 6px; min-height: 0; flex: 1; }
.pc-cat { display: flex; align-items: center; gap: 6px; font-size: .74rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.pc-cat .dchip { font-size: .74rem; }
.pc-cat span:last-child { overflow: hidden; text-overflow: ellipsis; }
.pcard h3 { font-size: .95rem; line-height: 1.25; letter-spacing: -.005em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard h3 a { color: var(--ink); }
.pc-desc { font-size: .8rem; line-height: 1.4; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-coll { display: flex; gap: 4px; flex-wrap: wrap; min-height: 22px; overflow: hidden; max-height: 22px; }
.chip-s { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 99px; background: var(--purple-50); color: var(--purple); font-size: .72rem; font-weight: 600; white-space: nowrap; }
.pc-foot { margin-top: auto; display: flex; align-items: baseline; gap: 8px; font-size: .78rem; white-space: nowrap; overflow: hidden; }
.pc-foot b { font-size: 1.02rem; font-weight: 600; color: var(--ink); }
.pc-foot .mono { margin-left: auto; font-size: .7rem; overflow: hidden; text-overflow: ellipsis; }
.notice.assign { background: #F4EEFF; border-color: #DCCBFF; align-items: center; }
.notice.assign > div { flex: 1; }
.notice.assign > .ic { color: var(--purple); }
.back-link { display: inline-flex; align-items: center; gap: 4px; }

/* product editor: image + storefront preview */
.img-field { display: flex; gap: 14px; align-items: center; }
.img-prev { width: 96px; height: 96px; flex: none; border-radius: 14px; overflow: hidden; background: #F7F0F4; box-shadow: inset 0 0 0 1px rgba(20, 16, 22, .06); display: block; }
.img-prev.sm { width: 72px; height: 72px; }
.img-prev svg, .img-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-acts { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.upl { position: relative; overflow: hidden; cursor: pointer; }
.upl input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upl:focus-within { outline: 2.5px solid var(--purple); outline-offset: 2px; }
.sf { display: flex; flex-direction: column; gap: 6px; }
.sf-img { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: #F7F0F4; margin-bottom: 6px; }
.sf-img svg, .sf-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sf.is-hidden .sf-img > svg, .sf.is-hidden .sf-img > img { opacity: .45; filter: grayscale(.6); }
.sf-badge { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 99px; background: rgba(20, 16, 22, .82); color: #fff; font-size: .74rem; font-weight: 600; backdrop-filter: blur(6px); }
.sf-badge.feat { background: rgba(74, 27, 154, .88); }
.sf-crumb { font-size: .74rem; color: var(--ink-3); letter-spacing: .02em; }
.sf h3 { font-size: 1.12rem; line-height: 1.25; letter-spacing: -.01em; }
.sf-price { font-size: 1.15rem; font-weight: 600; color: var(--purple); }
.sf-desc { font-size: .84rem; color: var(--ink-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.sf .pc-coll { max-height: none; }
.sf-ship { display: flex; align-items: center; gap: 5px; margin-top: 4px; }

/* multi-subcategory picking */
.chip-add { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 11px; border-radius: 99px; border: 1px dashed var(--lav); background: transparent; color: var(--purple); font-size: .8rem; font-weight: 600; }
.chip-add:hover { background: var(--purple-50); }
.sub-help { display: block; margin-top: 6px; font-size: .78rem; }
.ov-s .field-err { margin-top: 6px; }
.opt-chk { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.opt-chk input { width: 17px; height: 17px; accent-color: var(--purple); }
.opt-chk:has(input:checked) { border-color: var(--purple); background: var(--purple-50); }

/* ---------- categories ---------- */
.cat-note { margin: -4px 4px 12px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.cat-card { display: flex; flex-direction: column; overflow: hidden; }
.cat-mosaic { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: var(--line); }
.cat-mosaic .thumb { width: 100%; height: auto; aspect-ratio: 1; border-radius: 0; box-shadow: none; }
.empty-tile { background: repeating-linear-gradient(135deg, #FBF5F9 0 8px, #F6EDF3 8px 16px) !important; }
.cat-body { padding: 16px 18px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cat-top { display: flex; align-items: center; gap: 10px; }
.cat-top h3 { flex: 1; font-size: 1.08rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tone.lg { width: 14px; height: 14px; border-radius: 4px; }
.cat-desc { font-size: .86rem; color: var(--ink-2); }
.sub-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 4px; }
.sub-chip { display: inline-flex; align-items: center; height: 28px; border-radius: 99px; border: 1px solid var(--line-2); background: #fff; font-size: .78rem; font-weight: 600; overflow: hidden; }
.sub-chip a { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; color: var(--ink-2); height: 100%; text-decoration: none !important; }
.sub-chip a:hover { background: var(--wash); color: var(--ink); }
.sub-chip b { font-weight: 600; color: var(--ink-3); font-size: .72rem; }
.sub-chip.own { border-color: #F9C6E2; background: #FFF5FA; }
.sub-chip.own a { color: var(--pink-ink); }
.sub-chip button { border: 0; background: none; color: var(--pink-ink); height: 100%; padding: 0 8px 0 2px; display: grid; place-items: center; }
.sub-chip.add { border-style: dashed; color: var(--purple); background: transparent; padding: 0 11px; gap: 4px; cursor: pointer; }
.sub-chip.add:hover { background: var(--purple-50); }
.cat-actions { margin-top: auto; padding-top: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cat-actions .icon-btn:first-of-type { margin-left: auto; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches label { position: relative; }
.swatches input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.swatches i { display: block; width: 30px; height: 30px; border-radius: 9px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); transition: transform .1s ease-out; }
.swatches input:checked + i { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.swatches input:focus-visible + i { outline: 2px solid var(--purple); outline-offset: 4px; }
.swatches label:active i { transform: scale(.92); }
.field em { font-style: normal; font-weight: 400; }
.cat-preview { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--wash); }

/* ---------- customers ---------- */
.avatar { background: hsl(var(--h, 270) 45% 46%); }
.avatar.masked-av { background: #E9DEE6; color: var(--ink-2); }
.avatar.lg { width: 56px; height: 56px; font-size: 1.15rem; }
.cust-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cust-cell .avatar.sm { margin: 0; }
.cust-cell .cust b { font-weight: 600; }
.cust-tbl td { white-space: nowrap; }
.cust-title { display: flex; align-items: center; gap: 16px; }
.cust-head h1.masked { letter-spacing: .02em; }
.custf { align-items: center; margin-bottom: 12px; }
.custf p { flex: 1; margin: 0; }
.cust-link { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--wash); color: var(--ink); text-decoration: none !important; font-weight: 600; font-size: .9rem; transition: background-color .15s, transform .1s ease-out; }
.cust-link:hover { background: #F6E9F1; }
.cust-link:active { transform: scale(.98); }
.cust-link > .ic:first-child { color: var(--purple); }
.cust-link span { flex: 1; }
.cust-link small { display: block; font-weight: 400; color: var(--ink-3); font-size: .78rem; }
.hist-items { display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 340px; }
.hist-items span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-items small { display: block; color: var(--ink-3); font-size: .76rem; }
.hist-tbl tr { cursor: pointer; }
.hist-tbl tr:hover { background: #FFF8FC; }
.kv.contact dt { display: flex; align-items: center; gap: 6px; }
.kv.contact dd { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .cust-title { gap: 12px; }
  .avatar.lg { width: 46px; height: 46px; }
  .pc-body { padding: 10px 11px; gap: 5px; }
  .pcard h3 { font-size: .86rem; }
  .pc-foot .mono { display: none; }
  .img-prev { width: 80px; height: 80px; }
  .cat-actions .btn { flex: 1; }
}

/* =================== OVERVIEW =================== */
.ov { max-width: 1520px; }
.ov-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin: 4px 0 22px; }
.ov-hello { max-width: 720px; }
.ov-date { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--pink-ink); margin-bottom: 8px; }
.ov-hello h1 { font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); letter-spacing: -.028em; line-height: 1.05; }
.ov-summary { margin-top: 10px; font-size: 1.02rem; color: var(--ink-2); line-height: 1.5; }
.ov-summary a { font-weight: 600; color: var(--purple); border-bottom: 1.5px solid var(--lav); text-decoration: none; }
.ov-summary a:hover { border-color: var(--purple); }
.ov-controls { display: flex; align-items: center; gap: 10px; }

/* segmented control with a spring-driven thumb */
.seg-ctl { position: relative; display: inline-flex; padding: 4px; border-radius: 14px; background: rgba(74, 27, 154, .06); box-shadow: inset 0 0 0 1px rgba(74, 27, 154, .05); }
.seg-thumb { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgba(20, 16, 22, .08), 0 4px 12px -4px rgba(74, 27, 154, .25); will-change: transform, width; pointer-events: none; }
.seg-ctl button { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 15px; border: 0; background: none; border-radius: 10px; font-weight: 600; font-size: .86rem; color: var(--ink-3); transition: color .2s; white-space: nowrap; }
.seg-ctl button:hover { color: var(--ink); }
.seg-ctl button.on { color: var(--ink); }
.seg-ctl button:active { transform: scale(.96); transition: transform .1s ease-out; }
.cz-btn { height: 42px; border-radius: 14px; }
.ov-custom { display: flex; gap: 16px; flex-wrap: wrap; margin: -8px 0 18px; padding: 12px 16px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.ov-custom label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .86rem; }
.ov-custom input { height: 36px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 10px; }

/* modular grid */
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; grid-auto-flow: dense; align-items: stretch; }
.mod { grid-column: span 4; display: flex; flex-direction: column; min-width: 0; background: var(--card); border-radius: 22px; border: 1px solid rgba(240, 228, 236, .8); box-shadow: 0 1px 2px rgba(74, 27, 154, .04), 0 10px 30px -18px rgba(74, 27, 154, .22); padding: 20px 22px 18px; }
.mod-l { grid-column: span 8; }
.mod-m { grid-column: span 6; }
.ov.enter .mod { animation: modIn .62s cubic-bezier(.22, 1, .36, 1) backwards; animation-delay: calc(var(--i) * 55ms + 40ms); }
.ov.enter .ov-head { animation: modIn .5s cubic-bezier(.22, 1, .36, 1) backwards; }
@keyframes modIn { from { opacity: 0; transform: translateY(12px) scale(.985); } }
.mod-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.mod-head h2 { font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.mod-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--pink); color: #fff; font: 700 .74rem/22px var(--f-head); text-align: center; }
.mod-link { display: inline-flex; align-items: center; gap: 2px; font-size: .82rem; font-weight: 600; color: var(--ink-3); padding: 4px 6px 4px 10px; border-radius: 9px; text-decoration: none !important; transition: background-color .15s, color .15s; }
.mod-link:hover { background: var(--wash); color: var(--purple); }
.mod-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.mod-foot { margin-top: auto; padding-top: 12px; }
button.mod-foot { align-self: flex-start; }

/* performance: KPI tabs drive the chart */
.ktabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: -4px -8px 14px; }
.ktab { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px 14px; border: 0; background: none; border-radius: 16px; text-align: left; transition: background-color .2s var(--ease-out); }
.ktab + .ktab::before { content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 1px; background: var(--line); }
.ktab:hover { background: var(--wash); }
.ktab:active { transform: scale(.985); transition: transform .1s ease-out; }
.ktab.on { background: linear-gradient(180deg, #F6F1FF, #FBF8FF); }
.ktab.on::before, .ktab.on + .ktab::before { opacity: 0; }
.ktab::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 3px; border-radius: 3px; background: var(--purple); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out); }
.ktab.on::after { transform: scaleX(1); }
.ktab[data-metric="margin"].on::after { background: var(--pink-ink); }
.ktab-label { font-size: .8rem; font-weight: 600; color: var(--ink-3); }
.ktab.on .ktab-label { color: var(--purple); }
.ktab-value { font-size: clamp(1.4rem, 1rem + 1vw, 1.85rem); font-weight: 600; letter-spacing: -.03em; line-height: 1; color: var(--ink); }
.ktab-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 22px; }
.ktab-extra { font-size: .74rem; font-weight: 600; color: var(--pink-ink); }
.trend-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.legend i.dash { width: 16px; height: 0; border-top: 2px dashed var(--ink-3); opacity: .6; background: none; }
.refund-chip { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; background: var(--wash); color: var(--ink-2); font-size: .78rem; font-weight: 600; text-decoration: none !important; transition: background-color .15s; }
.refund-chip:hover { background: #F6E9F1; color: var(--ink); }
.trend-host { flex: 1; min-height: 210px; }
.chart.trend .prev-line { fill: none; stroke: var(--ink-3); stroke-opacity: .5; stroke-width: 1.6; stroke-dasharray: 4 5; stroke-linecap: round; }
.chart.trend .pdot { fill: #fff; stroke: var(--ink-3); stroke-width: 2; }
.tip .tp i { background: none; border-top: 2px dashed rgba(255, 255, 255, .7); height: 0; width: 10px; border-radius: 0; }
.tip .td { margin-top: 4px; font-weight: 700; font-size: .74rem; }
.tip .td.up { color: #7BE0B0; }
.tip .td.down { color: #FF9AAE; }
.chart .tip { transition: transform .12s ease-out; }

/* needs attention */
.focus-list { list-style: none; margin: 0 -8px; padding: 0; display: flex; flex-direction: column; }
.fitem { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .34s var(--ease-out), opacity .22s ease-out, transform .34s var(--ease-out); }
.fitem.leaving { grid-template-rows: 0fr; opacity: 0; transform: translateX(16px); }
.fitem-in { min-height: 0; overflow: hidden; display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 14px; transition: background-color .15s; }
.fitem-in:hover { background: var(--wash); }
.fitem-ic { width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--purple-50); color: var(--purple); }
.fitem.warn .fitem-ic { background: var(--warn-bg); color: var(--warn); }
.fitem.bad .fitem-ic { background: var(--bad-bg); color: var(--bad); }
.fitem-txt { flex: 1; min-width: 0; }
.fitem-txt b { display: block; font-size: .88rem; font-weight: 600; line-height: 1.3; }
.fitem-txt small { display: block; font-size: .76rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fitem-act { display: flex; align-items: center; gap: 2px; flex: none; }
.fitem .fx { opacity: 0; color: var(--ink-3); transition: opacity .15s; }
.fitem-in:hover .fx, .fx:focus-visible { opacity: 1; }
.caught { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 24px 12px; animation: viewin .45s var(--ease-out); }
.caught span { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--good-bg); color: var(--good); margin-bottom: 6px; }
.caught b { font-family: var(--f-head); font-size: 1.05rem; }
.caught small { color: var(--ink-3); max-width: 30ch; }

/* latest orders */
.rlist, .tlist { list-style: none; margin: 0 -8px; padding: 0; }
.rlist a, .tlist a { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; color: var(--ink); text-decoration: none !important; transition: background-color .15s, transform .1s ease-out; }
.rlist a:hover, .tlist a:hover { background: var(--wash); }
.rlist a:active, .tlist a:active { transform: scale(.985); }
.ravatar { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: hsl(var(--h) 40% 92%); color: hsl(var(--h) 45% 32%); font: 600 .78rem var(--f-head); }
.rmain { flex: 1; min-width: 0; }
.rmain b { display: block; font: 600 .9rem var(--f-head); font-variant-numeric: tabular-nums; }
.rmain small { display: block; color: var(--ink-3); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rside { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.rside b { font-size: .9rem; font-weight: 600; }
.rside .badge { height: 20px; font-size: .68rem; padding: 0 7px; }

/* top products */
.trank { width: 16px; flex: none; text-align: center; font: 600 .82rem var(--f-head); color: var(--ink-3); }
.tmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.tmain b { font-size: .86rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbar { height: 5px; border-radius: 3px; background: #F4ECF2; overflow: hidden; }
.tbar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--purple), #8B5CF0); }
.tside { display: flex; flex-direction: column; align-items: flex-end; }
.tside b { font-size: .95rem; font-weight: 600; }
.tside small { font-size: .74rem; color: var(--ink-3); }

/* categories module */
.mini-seg { display: inline-flex; align-self: flex-start; padding: 3px; gap: 2px; border-radius: 11px; background: rgba(74, 27, 154, .06); margin-bottom: 14px; }
.mini-seg button { height: 28px; padding: 0 11px; border: 0; border-radius: 8px; background: none; font-size: .78rem; font-weight: 600; color: var(--ink-3); transition: background-color .2s, color .2s; }
.mini-seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(20, 16, 22, .1); }
.mod .bars { gap: 8px; }
.mod .bar-row { grid-template-columns: minmax(96px, 128px) minmax(0, 1fr) 50px; gap: 10px; }
.mod .bar-track { height: 10px; }

/* catalog module */
.cat-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cat-hero .num { display: block; font-size: 2.3rem; font-weight: 600; letter-spacing: -.035em; line-height: 1; }
.cat-hero small { color: var(--ink-3); font-size: .82rem; }
.stock-bar { display: flex; gap: 3px; height: 12px; }
.stock-bar span { border-radius: 4px; }
.stock-bar span:first-child { background: var(--purple); }
.stock-bar span:last-child { background: var(--pink); }
.stock-legend { display: flex; gap: 16px; margin: 8px 0 16px; font-size: .8rem; color: var(--ink-2); }
.stock-legend span { display: inline-flex; align-items: center; gap: 6px; }
.stock-legend i { width: 9px; height: 9px; border-radius: 3px; }
.stock-legend i.in { background: var(--purple); }
.stock-legend i.out { background: var(--pink); }
.cat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: auto; }
.cat-tiles a { padding: 12px; border-radius: 14px; background: var(--wash); color: var(--ink); text-decoration: none !important; transition: background-color .15s, transform .1s ease-out; }
.cat-tiles a:hover { background: #F6E9F1; }
.cat-tiles a:active { transform: scale(.97); }
.cat-tiles b { display: block; font-size: 1.15rem; font-weight: 600; }
.cat-tiles small { font-size: .74rem; color: var(--ink-3); }

/* feeds module */
.feeds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.feeds li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--wash); }
.feeds li.error { background: var(--bad-bg); }
.fdot { width: 10px; height: 10px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(11, 122, 82, .14); flex: none; }
.feeds li.error .fdot { background: var(--bad); box-shadow: 0 0 0 4px rgba(192, 34, 58, .16); }
.fmain { flex: 1; min-width: 0; }
.fmain b { display: block; font-size: .88rem; font-weight: 600; }
.fmain small { display: block; font-size: .76rem; color: var(--ink-3); }
.fok { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 600; color: var(--good); }

/* customize sheet */
.cz-help { margin-bottom: 12px; }
.cz-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cz-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 8px; border-radius: 16px; background: #fff; border: 1px solid var(--line); position: relative; touch-action: none; }
.cz-item.off .cz-txt { opacity: .5; }
.cz-item.lifted { z-index: 2; box-shadow: var(--shadow-lg); border-color: var(--lav); }
.cz-handle { width: 28px; height: 36px; display: grid; place-items: center; color: var(--ink-3); cursor: grab; border-radius: 8px; flex: none; }
.cz-handle:hover { background: var(--wash); color: var(--ink); }
.cz-item.lifted .cz-handle { cursor: grabbing; }
.cz-txt { flex: 1; min-width: 0; }
.cz-txt b { display: block; font-size: .9rem; }
.cz-txt small { display: block; font-size: .76rem; color: var(--ink-3); }
.cz-move { display: flex; }
.rot90 { transform: rotate(90deg); }
.tgl { position: relative; flex: none; display: inline-flex; width: 44px; height: 26px; }
.tgl input { position: absolute; inset: 0; z-index: 1; opacity: 0; cursor: pointer; margin: 0; width: 100%; height: 100%; }
.tgl i { pointer-events: none; }
.tgl i { display: block; width: 44px; height: 26px; border-radius: 99px; background: #E2D6DE; position: relative; transition: background-color .22s; }
.tgl i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .28s cubic-bezier(.3, 1.4, .5, 1); }
.tgl input:checked + i { background: var(--purple); }
.tgl input:checked + i::after { transform: translateX(18px); }
.tgl input:focus-visible + i { outline: 2.5px solid var(--purple); outline-offset: 2px; }

@media (max-width: 1240px) {
  .dash-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .mod, .mod-m { grid-column: span 3; }
  .mod-l { grid-column: span 6; }
}
@media (max-width: 860px) {
  .ov-head { margin-bottom: 16px; gap: 16px; }
  .ov-controls { width: 100%; }
  .seg-ctl { flex: 1; overflow-x: auto; scrollbar-width: none; }
  .seg-ctl button { flex: 1; justify-content: center; padding: 0 10px; }
  .cz-btn { width: 42px; padding: 0; }
  .cz-btn span { display: none; }
  .dash-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .mod, .mod-l, .mod-m { grid-column: auto; padding: 16px 16px 14px; border-radius: 20px; }
  .ktabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: -4px -6px 10px; }
  .ktab + .ktab::before { display: none; }
  .ktab { padding: 10px 12px 14px; }
  .refund-chip { margin-left: 0; }
  .cat-tiles { grid-template-columns: repeat(2, 1fr); }
  .fitem .fx { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .fitem, .ktab::after, .tgl i::after { transition: none !important; }
}

/* =================== SHARED PAGE FURNITURE =================== */
.page-head.slim { margin: 4px 0 16px; align-items: flex-end; }
.page-head.slim .lede { margin-top: 6px; font-size: .95rem; }

/* stats strip: one calm row instead of a grid of cards */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 16px; overflow: hidden; }
.st { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; color: var(--ink); text-decoration: none !important; transition: background-color .15s; }
.st + .st::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 1px; background: var(--line); }
a.st:hover { background: var(--wash); }
a.st:active { background: #F6E9F1; }
.st-label { font-size: .76rem; font-weight: 600; color: var(--ink-3); }
.st-value { font-size: 1.45rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.st-sub { font-size: .74rem; color: var(--ink-3); }
.st-warn .st-value { color: var(--warn); }
a.st .st-label::after { content: '›'; margin-left: 4px; opacity: 0; transition: opacity .15s, margin .15s; }
a.st:hover .st-label::after { opacity: 1; margin-left: 6px; }

/* quick views */
.qviews { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.qviews::-webkit-scrollbar { display: none; }
.qviews a { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 99px; color: var(--ink-2); font-weight: 600; font-size: .86rem; white-space: nowrap; text-decoration: none !important; border: 1px solid transparent; transition: background-color .18s, color .18s, border-color .18s, transform .1s ease-out; }
.qviews a:hover { background: rgba(74, 27, 154, .05); color: var(--ink); }
.qviews a:active { transform: scale(.96); }
.qviews a span { font: 600 .74rem var(--f-body); color: var(--ink-3); background: rgba(74, 27, 154, .06); padding: 1px 7px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.qviews a.on { background: var(--ink); color: #fff; }
.qviews a.on span { background: rgba(255, 255, 255, .18); color: #fff; }

/* toolbar */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.tb-search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; flex: 0 1 320px; min-width: 220px; border-radius: 12px; background: var(--card); border: 1px solid var(--line-2); color: var(--ink-3); transition: border-color .15s, box-shadow .15s; }
.tb-search:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(74, 27, 154, .14); }
.tb-search input { flex: 1; min-width: 0; border: 0; outline: 0; box-shadow: none !important; background: transparent; color: var(--ink); height: 100%; }
.tb-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.fchip { display: inline-flex; align-items: center; height: 34px; border-radius: 99px; background: var(--card); border: 1px solid var(--line-2); font-size: .84rem; font-weight: 600; color: var(--ink-2); overflow: hidden; transition: border-color .15s, background-color .15s; }
.fchip:hover { border-color: var(--lav); }
button.fchip, .fchip > button { display: inline-flex; align-items: center; gap: 5px; height: 100%; padding: 0 12px; border: 0; background: none; color: inherit; font: inherit; white-space: nowrap; }
button.fchip { padding: 0 13px; }
.fchip > button:active, button.fchip:active { transform: scale(.97); }
.fchip.on { background: var(--purple-50); border-color: #D8C8FF; color: var(--purple); }
.fchip.on b { font-weight: 700; max-width: 180px; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: bottom; }
.fchip .fx { padding: 0 10px 0 4px; color: var(--purple); }
.fchip.sort { margin-left: auto; background: transparent; border-color: transparent; color: var(--ink-3); }
.fchip.sort:hover { background: var(--card); border-color: var(--line-2); color: var(--ink); }
.tb-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.tb-count { font-size: .86rem; color: var(--ink-3); white-space: nowrap; }
.tb-count b { color: var(--ink); font-size: 1rem; }
.seg-mini { display: inline-flex; padding: 3px; border-radius: 11px; background: rgba(74, 27, 154, .06); }
.seg-mini a { display: grid; place-items: center; width: 34px; height: 30px; border-radius: 8px; color: var(--ink-3); transition: background-color .18s, color .18s; }
.seg-mini a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(20, 16, 22, .1); }

/* popover menus (anchored, grow from their trigger) */
.popover { position: fixed; z-index: 70; padding: 6px; border-radius: 16px; background: rgba(255, 255, 255, .97); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border: 1px solid rgba(240, 228, 236, .9); box-shadow: 0 18px 48px -12px rgba(36, 12, 70, .32), 0 2px 6px rgba(36, 12, 70, .06); max-height: min(420px, 70vh); overflow-y: auto; }
.menu { display: flex; flex-direction: column; gap: 1px; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; text-align: left; font-size: .88rem; color: var(--ink); transition: background-color .12s; }
.menu button:hover, .menu button:focus-visible { background: var(--wash); outline: none; }
.menu button > span { flex: 1; min-width: 0; }
.menu button small { display: block; color: var(--ink-3); font-size: .76rem; }
.menu button > .ic:first-child { color: var(--purple); }
.menu button.on { font-weight: 600; color: var(--purple); }
.menu button.on .ic { color: var(--purple); }
.menu button[hidden] { display: none; }
.pop-search { display: flex; align-items: center; gap: 6px; height: 36px; margin: 2px 2px 6px; padding: 0 10px; border-radius: 10px; background: var(--wash); color: var(--ink-3); }
.pop-search input { flex: 1; border: 0; outline: 0; background: transparent; box-shadow: none !important; font-size: .86rem; }
.pop-form { padding: 6px; display: flex; flex-direction: column; gap: 10px; }
.pop-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pop-pair label { display: flex; flex-direction: column; gap: 4px; font-size: .74rem; font-weight: 600; color: var(--ink-3); }
.pop-pair input { height: 36px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 8px; min-width: 0; font-size: .86rem; color: var(--ink); }
.pop-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.pop-presets button { height: 28px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--line-2); background: #fff; font-size: .76rem; font-weight: 600; color: var(--ink-2); }
.pop-presets button:hover { border-color: var(--lav); color: var(--purple); }
.pop-actions { display: flex; justify-content: flex-end; gap: 6px; }
.sheet .menu button { padding: 13px 10px; font-size: .95rem; }

/* tables: tidier cells */
.m2 { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.m2 b { font-weight: 600; }
.m2 small { font-size: .74rem; color: var(--ink-3); }
.pager .pg { padding: 0 6px; align-self: center; }
.pcell { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; min-width: 0; max-width: 380px; }
.pcell > span:last-child { min-width: 0; }
.pcell b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcell small { display: block; color: var(--ink-3); font-size: .74rem; }
.pcell:hover b { color: var(--purple); }
.chg2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chg-field { font-size: .74rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-3); min-width: 64px; }
.chg2 .chg { display: inline-flex; align-items: center; gap: 5px; max-width: 360px; }
.chg2 .chg .old, .chg2 .chg .new { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.chg2 .chg .ic { color: var(--ink-3); flex: none; }
.dpill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.tx-purple { color: var(--purple); }

/* catalog changes: today */
.today2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 0; margin-bottom: 16px; overflow: hidden; }
.t2-main { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.t2-main h2 { font-size: 1.5rem; letter-spacing: -.02em; }
.t2-main .eyebrow { margin: 0; }
.t2-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.t2-stats a { padding: 10px 12px; border-radius: 14px; background: var(--wash); color: var(--ink); text-decoration: none !important; transition: background-color .15s, transform .1s ease-out; }
.t2-stats a:hover { background: #F6E9F1; }
.t2-stats a:active { transform: scale(.97); }
.t2-stats b { display: block; font-size: 1.35rem; font-weight: 600; }
.t2-stats small { font-size: .74rem; color: var(--ink-3); }
.t2-alert { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: #FFF0F8; border: 1px solid #F9C6E2; color: var(--ink); text-decoration: none !important; transition: background-color .15s; }
.t2-alert:hover, .t2-alert.on { background: #FFE5F3; }
.t2-alert > .ic:first-child { color: var(--pink-ink); }
.t2-alert span { flex: 1; }
.t2-alert b { display: block; font-size: .9rem; }
.t2-alert small { display: block; font-size: .78rem; color: var(--ink-3); }
.t2-chart { padding: 18px 18px 12px; background: linear-gradient(180deg, #FCF9FF, #FFFFFF); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.t2-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.t2-chart .mini-seg { margin: 0; }

/* side navigation (reports, settings) */
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 10px; position: sticky; top: calc(var(--top) + 12px); }
.sn-group { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 10px 10px 4px; }
.sn-group:first-child { margin-top: 4px; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; color: var(--ink-2); font-weight: 500; font-size: .9rem; text-decoration: none !important; transition: background-color .15s, color .15s; }
.side-nav a .ic { color: var(--ink-3); flex: none; }
.side-nav a span { flex: 1; min-width: 0; }
.side-nav a small { display: block; font-size: .74rem; color: var(--ink-3); font-weight: 400; }
.side-nav a:hover { background: var(--wash); color: var(--ink); }
.side-nav a.on { background: var(--purple-50); color: var(--purple); font-weight: 600; }
.side-nav a.on .ic { color: var(--purple); }
.reports-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 16px; }
.report-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rep-title { font-size: 1.3rem; letter-spacing: -.015em; }
.report-body .eyebrow { margin-bottom: 2px; }
.insight { font-size: 1.02rem; line-height: 1.55; color: var(--ink-2); max-width: 72ch; margin: -2px 0 14px; }
.insight b { color: var(--ink); }
.ins-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.ins-tiles div { padding: 12px 14px; border-radius: 14px; background: var(--wash); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ins-tiles small { font-size: .74rem; font-weight: 600; color: var(--ink-3); }
.ins-tiles b { font-size: 1.2rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ins-tiles span { font-size: .74rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viz { padding-top: 4px; border-top: 1px solid var(--line); padding-top: 16px; }
.viz-note { margin-top: 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lg-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.lg-sw.own { background: #FFF5FA; border: 1px solid #F9C6E2; vertical-align: -1px; margin-right: 2px; }

/* settings */
.settings-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.settings-body { display: flex; flex-direction: column; gap: 14px; max-width: 880px; }
.set-title { font-size: 1.3rem; letter-spacing: -.015em; margin: 4px 2px 0; }
.set-group { padding: 6px 0; }
.set-group > h3 { font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); padding: 14px 22px 4px; }
.set-help { padding: 0 22px 6px; font-size: .84rem; color: var(--ink-3); }
.set-pad { padding: 8px 22px 16px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 22px; border-top: 1px solid var(--line); }
.set-group > h3 + .set-row, .set-group > .set-help + .set-row { border-top: 0; }
.set-label { min-width: 0; flex: 1; }
.set-label b { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .92rem; }
.set-label small { display: block; font-size: .8rem; color: var(--ink-3); margin-top: 2px; }
.set-ctl { display: flex; align-items: center; gap: 10px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.set-ctl .money-in { width: 130px; }
.set-ctl .pair-in .money-in { width: 100px; }
.set-ctl select { height: 38px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 10px; background: #fff; }
.set-ctl .masked-field { height: 38px; gap: 10px; }
.saved { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 600; color: var(--good); opacity: 0; min-width: 0; }
.saved.show { animation: savedIn 2.2s var(--ease-out) forwards; }
@keyframes savedIn { 0% { opacity: 0; transform: translateX(-4px); } 12% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; } }
.gw { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.locked-on { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-2); }
.feed-row .set-label b { gap: 10px; }
.feed-row .set-ctl { flex-direction: column; align-items: flex-end; gap: 6px; }
.feed-row details { margin-top: 6px; font-size: .84rem; }
.feed-row summary { color: var(--purple); font-weight: 600; cursor: pointer; }
.user-l { display: flex; align-items: center; gap: 12px; }
.user-l .avatar { width: 38px; height: 38px; }

/* audit log: activity grouped by day */
.feed-day { margin-bottom: 16px; }
.feed-day h3 { font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin: 0 4px 8px; }
.feed { list-style: none; margin: 0; padding: 6px 0; }
.feed li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 12px 20px; }
.feed li + li { border-top: 1px solid var(--line); }
.ev-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; }
.ev-main p { margin: 0; font-size: .9rem; }
.ev-main p a { font-weight: 600; }
.ev-what { color: var(--ink-3); font-size: .84rem !important; margin-top: 2px !important; }
.ev-chg { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px !important; padding: 4px 10px; border-radius: 9px; background: var(--wash); font-size: .82rem !important; }
.ev-chg .old { color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(111, 101, 119, .5); }
.ev-chg .new { font-weight: 600; }
.ev-chg .ic { color: var(--ink-3); }
.feed time { font-size: .8rem; color: var(--ink-3); white-space: nowrap; padding-top: 2px; }

/* categories: collapsed subcategory lists */
.sub-chips.clamped .extra { display: none; }
.sub-chip.more { padding: 0 11px; color: var(--ink-2); cursor: pointer; background: var(--wash); border-color: transparent; }
.sub-chip.more:hover { color: var(--purple); }
.sub-chip.hit { border-color: var(--purple); box-shadow: 0 0 0 2px rgba(74, 27, 154, .12); }

@media (max-width: 1024px) {
  .side-nav { display: none; }
  .settings-layout, .reports-layout { grid-template-columns: minmax(0, 1fr); }
  .report-pick { display: block; height: 42px; border-radius: 12px; border: 1px solid var(--line-2); padding: 0 12px; background: #fff; font-weight: 600; }
  .today2 { grid-template-columns: minmax(0, 1fr); }
  .t2-chart { border-left: 0; border-top: 1px solid var(--line); }
  .set-title { display: none; }
}
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st:nth-child(odd)::before { display: none; }
  .st:nth-child(n+3) { border-top: 1px solid var(--line); }
  .st { padding: 12px 14px; }
  .st-value { font-size: 1.25rem; }
  .toolbar { gap: 8px; }
  .tb-search { flex: 1 1 100%; min-width: 0; }
  .tb-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; flex: 1 1 100%; padding-bottom: 2px; }
  .tb-chips::-webkit-scrollbar { display: none; }
  .fchip { flex: none; }
  .fchip.sort { margin-left: 0; background: var(--card); border-color: var(--line-2); }
  .tb-right { margin-left: 0; width: 100%; justify-content: space-between; }
  .t2-stats { grid-template-columns: repeat(2, 1fr); }
  .ins-tiles { grid-template-columns: minmax(0, 1fr); }
  .set-row { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px 16px; }
  .set-ctl { justify-content: flex-start; }
  .set-group > h3 { padding: 14px 16px 4px; }
  .set-help { padding: 0 16px 6px; }
  .feed li { grid-template-columns: 32px minmax(0, 1fr); padding: 12px 14px; }
  .feed time { grid-column: 2; padding: 0; }
  .ev-ic { width: 32px; height: 32px; }
  .page-head.slim .head-actions { width: auto; }
  .page-head.slim .head-actions .btn { flex: none; }
}

/* =================== NEW-PRODUCT REVIEW =================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-count.info { background: var(--info-bg); color: var(--info); }
kbd { font: 600 .68rem var(--f-body); padding: 1px 5px; border-radius: 5px; border: 1px solid currentColor; opacity: .6; margin-left: 4px; }
.review-callout { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 14px; border-radius: 18px; background: linear-gradient(120deg, #EEF0FF, #F7F2FF); border: 1px solid #DCDDFB; }
.review-callout > div { flex: 1; min-width: 0; }
.review-callout b { display: block; font-size: .95rem; }
.review-callout small { display: block; color: var(--ink-2); font-size: .82rem; margin-top: 2px; }
.rc-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--info); box-shadow: 0 2px 8px -4px rgba(63, 58, 184, .4); }
.sku-copy.sm { height: 24px; padding: 0 8px; gap: 5px; vertical-align: middle; }
.sku-copy.sm .mono { font-size: .78rem; }

.rv-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 4px 0 18px; }
.rv-progress { min-width: 220px; display: flex; flex-direction: column; gap: 8px; font-size: .86rem; color: var(--ink-3); }
.rv-progress b { color: var(--ink); font-size: 1.2rem; }
.rv-bar { height: 6px; border-radius: 3px; background: #ECE4F2; overflow: hidden; }
.rv-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--purple), var(--pink)); transition: width .5s var(--ease-out); }
.rv-stage { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.rv-card { display: grid; grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.2fr); grid-template-rows: 1fr auto; overflow: hidden; border-radius: 26px; will-change: transform; animation: rvIn .42s var(--ease-out); touch-action: pan-y; }
@keyframes rvIn { from { opacity: 0; transform: scale(.965) translateY(8px); } }
.rv-card.dragging { box-shadow: var(--shadow-lg); transition: none; }
.rv-media { position: relative; grid-row: 1 / 3; min-height: 420px; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.rv-card.dragging .rv-media { cursor: grabbing; }
.rv-media .thumb { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
.rv-badges { position: absolute; left: 14px; top: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.rv-badges .flag { box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.rv-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 99px; background: rgba(20, 16, 22, .55); color: #fff; font-size: .74rem; font-weight: 600; backdrop-filter: blur(8px); white-space: nowrap; pointer-events: none; }
.rv-stamp { position: absolute; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 14px; font: 700 1rem var(--f-head); letter-spacing: .02em; opacity: 0; pointer-events: none; box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .35); }
.rv-stamp.ok { right: 18px; background: var(--good); color: #fff; }
.rv-stamp.skip { left: 18px; background: #fff; color: var(--ink); }
.rv-body { padding: 22px 24px 8px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rv-meta { font-size: .82rem; color: var(--ink-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rv-meta > span:first-child { font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--pink-ink); }
.rv-name input { width: 100%; border: 1px solid transparent; border-radius: 12px; padding: 6px 10px; margin: -6px -10px 0; background: transparent; font: 600 1.45rem/1.2 var(--f-head); letter-spacing: -.02em; color: var(--ink); transition: border-color .15s, background-color .15s; }
.rv-name input:hover { background: var(--wash); }
.rv-name input:focus { border-color: var(--purple); background: #fff; }
.rv-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rv-fact { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 14px; background: var(--wash); min-width: 0; }
.rv-fact small { font-size: .72rem; font-weight: 600; color: var(--ink-3); }
.rv-fact b { font-size: 1.1rem; font-weight: 600; }
.rv-fact em { font-style: normal; font-size: .72rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-fact.price { background: #fff; border: 1px solid var(--line-2); }
.rv-fact.price .money-in { height: 30px; border: 0; background: transparent; box-shadow: none !important; }
.rv-fact.price .money-in b { padding: 0 2px 0 0; font-size: 1rem; }
.rv-fact.price input { font: 600 1.1rem var(--f-head); padding: 0; }
.rv-fact.price.bad { border-color: var(--bad); background: var(--bad-bg); }
.rv-fact.price.bad em { color: var(--bad); font-weight: 600; }
.rv-field { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: start; padding-top: 12px; border-top: 1px solid var(--line); }
.rv-field > span, .rv-desc summary span { font-size: .8rem; font-weight: 600; color: var(--ink-3); padding-top: 7px; }
.rv-cat { display: flex; flex-direction: column; gap: 8px; }
.rv-cat select, .rv-site select { height: 36px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 10px; background: #fff; max-width: 260px; }
.rv-site { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rv-desc { display: block; }
.rv-desc summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.rv-desc summary::-webkit-details-marker { display: none; }
.rv-desc[open] summary .ic { transform: rotate(180deg); }
.rv-desc textarea { width: 100%; margin-top: 8px; border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 10px; resize: vertical; line-height: 1.45; }
.rv-actions { grid-column: 2; display: flex; align-items: center; gap: 12px; padding: 14px 24px 18px; border-top: 1px solid var(--line); background: linear-gradient(180deg, #fff, #FDFAFD); }
.rv-changes { flex: 1; font-size: .82rem; color: var(--ink-3); min-width: 0; }
.rv-next { padding: 18px; position: sticky; top: calc(var(--top) + 12px); }
.rv-next h3 { font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.rv-next ol { list-style: none; margin: 0 -6px 12px; padding: 0; }
.rv-next button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px; border: 0; border-radius: 12px; background: none; text-align: left; transition: background-color .15s, transform .1s ease-out; }
.rv-next button:hover { background: var(--wash); }
.rv-next button:active { transform: scale(.98); }
.rv-next button > span:last-child { min-width: 0; }
.rv-next b { display: block; font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-next small { display: block; font-size: .74rem; color: var(--ink-3); }
.rv-keys { margin-bottom: 10px; }
.rv-keys kbd { margin: 0 2px; }
.rv-done { padding: 48px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rv-done > span { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--good-bg); color: var(--good); }
.rv-done p { max-width: 46ch; }

/* =================== CUSTOMER REVIEWS =================== */
.section-tabs { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 16px; border-radius: 14px; background: rgba(74, 27, 154, .06); }
.section-tabs a { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 10px; color: var(--ink-3); font-weight: 600; font-size: .88rem; text-decoration: none !important; transition: background-color .18s, color .18s; }
.section-tabs a span { font: 600 .74rem var(--f-body); opacity: .7; }
.section-tabs a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(20, 16, 22, .1); }
.sec-alert { white-space: nowrap; font-style: normal; font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--warn-bg); color: var(--warn); }
.stars { display: inline-flex; gap: 1px; vertical-align: middle; }
.stars svg { fill: #E9DEE6; }
.stars svg.on { fill: #F2A900; }
.rev-summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; align-items: center; padding: 20px 24px; margin-bottom: 16px; }
.rs-score { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.rs-score b { font-size: 2.6rem; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.rs-score small { color: var(--ink-3); font-size: .8rem; }
.rs-dist { display: flex; flex-direction: column; gap: 4px; max-width: 420px; }
.rs-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 34px; gap: 10px; align-items: center; font-size: .8rem; color: var(--ink-2); text-decoration: none !important; border-radius: 6px; }
.rs-row:hover .rs-bar i { filter: brightness(1.08); }
.rs-row .num { text-align: right; color: var(--ink-3); font-family: var(--f-body); }
.rs-bar { height: 8px; border-radius: 4px; background: #F2EAF0; overflow: hidden; }
.rs-bar i { display: block; height: 100%; border-radius: 4px; background: #F2A900; }
.rs-stats { display: flex; gap: 8px; }
.rs-stats > * { min-width: 120px; padding: 12px 14px; border-radius: 14px; background: var(--wash); color: var(--ink); text-decoration: none !important; display: flex; flex-direction: column; }
.rs-stats a:hover { background: #F6E9F1; }
.rs-stats .warn { background: var(--warn-bg); }
.rs-stats .warn b { color: var(--warn); }
.rs-stats b { font-size: 1.35rem; font-weight: 600; }
.rs-stats small { font-size: .74rem; color: var(--ink-3); }
.rev-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.rev-card { padding: 18px 22px; display: flex; flex-direction: column; gap: 10px; }
.rev-card.held { border-color: #F7D9A8; box-shadow: 0 0 0 1px #F7D9A8, var(--shadow); }
.rev-card.hidden { opacity: .72; }
.rv-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.rv-top h3 { font-size: 1.02rem; margin-top: 4px; }
.rv-status { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.rv-status time { font-size: .76rem; color: var(--ink-3); }
.rv-text { font-size: .92rem; line-height: 1.55; color: var(--ink-2); max-width: 80ch; }
mark.pii { background: #FFE0A3; color: #6B3B00; border-radius: 4px; padding: 0 3px; font-weight: 600; }
.held-why { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; background: var(--warn-bg); color: #6B3B00; font-size: .84rem; }
.rv-meta2 { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); }
.rv-meta2 .pcell { max-width: 300px; }
.rv-by { font-size: .8rem; color: var(--ink-3); }
.rv-by b { color: var(--ink-2); }
.verified { display: inline-flex; align-items: center; gap: 3px; color: var(--good); font-weight: 600; }
.rv-reply { margin-left: 14px; padding: 10px 14px; border-left: 3px solid var(--lav); border-radius: 0 12px 12px 0; background: #FAF7FF; font-size: .86rem; }
.rv-reply b { display: block; font-size: .78rem; color: var(--purple); margin-bottom: 2px; }
.rv-reply small { color: var(--ink-3); font-size: .74rem; }
.rv-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.rv-quote { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--wash); font-size: .88rem; }
.mini-reviews { list-style: none; margin: 0 -8px; padding: 0; }
.mini-reviews a { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; color: var(--ink); text-decoration: none !important; }
.mini-reviews a:hover { background: var(--wash); }
.mini-reviews a > span:last-child { min-width: 0; flex: 1; }
.mr-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mr-top .badge { height: 20px; font-size: .68rem; }
.mini-reviews b { display: block; font-size: .88rem; }
.mini-reviews small { display: block; font-size: .76rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rating-card { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.rating-card > div:first-child { flex: none; }
.rc-score { display: flex; flex-direction: column; gap: 2px; }
.rc-score b { font-size: 2rem; font-weight: 600; line-height: 1; }
.rc-score small { font-size: .76rem; color: var(--ink-3); }
.rating-card blockquote { flex: 1; min-width: 220px; margin: 0; font-size: .88rem; }
.rating-card h2 { font-size: 1rem; }

@media (max-width: 1100px) {
  .rv-stage { grid-template-columns: minmax(0, 1fr); }
  .rv-next { position: static; }
  .rev-summary { grid-template-columns: auto minmax(0, 1fr); }
  .rs-stats { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .rv-card { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; border-radius: 22px; }
  .rv-media { grid-row: auto; min-height: 0; aspect-ratio: 4 / 3; }
  .rv-body { padding: 18px 16px 6px; }
  .rv-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rv-field { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .rv-field > span { padding-top: 0; }
  .rv-actions { grid-column: auto; position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); padding: 12px 16px; flex-wrap: wrap; z-index: 3; }
  .rv-changes { flex-basis: 100%; order: -1; }
  .rv-actions .btn { flex: 1; }
  .rv-actions kbd, .rv-keys { display: none; }
  .review-callout { flex-wrap: wrap; }
  .review-callout > div { flex-basis: calc(100% - 56px); }
  .review-callout .btn { flex: 1; }
  .rev-summary { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 18px 16px; }
  .rs-stats { overflow-x: auto; }
  .rev-card { padding: 16px; }
  .rv-top { flex-direction: column; }
  .rv-status { flex-direction: row; align-items: center; }
  .section-tabs { display: flex; }
  .section-tabs a { flex: 1; justify-content: center; }
}

/* =================== LIVE CATALOG =================== */
.boot-card { max-width: 520px; margin: 40px auto; padding: 36px 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.boot-card .spin.dark { width: 26px; height: 26px; border-width: 3px; margin-bottom: 4px; }
.boot-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--purple-50); color: var(--purple); }
.boot-form { display: flex; gap: 8px; width: 100%; max-width: 360px; margin-top: 8px; }
.boot-form input { flex: 1; height: 42px; border: 1px solid var(--line-2); border-radius: 12px; padding: 0 12px; }
.ex-chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 99px; background: #F3EEF2; color: var(--ink-3); font: 600 .7rem var(--f-body); letter-spacing: .01em; vertical-align: middle; white-space: nowrap; }
h1 .ex-chip { font-size: .74rem; height: 24px; margin-left: 6px; position: relative; top: -4px; }
.mod-head .ex-chip { margin-left: 2px; }
.ex-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; font-size: .82rem; color: var(--ink-3); }
.syncpill.live i { background: var(--good); }

/* =================== SIGN-IN & TEAM =================== */
.boot-logo { width: 180px; height: auto; margin-bottom: 8px; }
.auth-form { width: 100%; max-width: 360px; text-align: left; margin-top: 8px; display: flex; flex-direction: column; }
.auth-form .field input { height: 44px; font-size: .95rem; }
.auth-form input[readonly] { background: #FAF6F8; color: var(--ink-2); }
.auth-form .field-err { margin: -4px 0 10px; }
.boot-card code, .banner code, .notice code { font: 600 .82em ui-monospace, Menlo, monospace; background: rgba(74, 27, 154, .08); padding: 1px 6px; border-radius: 6px; }
.banner.setup { background: var(--purple-50); border-color: #DCCBFF; color: var(--ink); }
.banner.setup > .ic { color: var(--purple); }
.banner.setup span { color: var(--ink-2); }
.acct { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.acct b { display: block; }
.acct small { color: var(--pink-ink); font-weight: 600; }
.set-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px 6px 0; }
.set-head h3 { font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); padding: 2px 0 0 22px; }
.set-group > .set-head + .set-row { border-top: 0; }
label.role-opt { position: relative; cursor: pointer; }
label.role-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
label.role-opt:has(input:focus-visible) { outline: 2.5px solid var(--purple); outline-offset: 2px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; font: 500 .82rem ui-monospace, Menlo, monospace; }

body.auth-screen .sidebar, body.auth-screen .topbar, body.auth-screen .tabbar, body.auth-screen #banner { display: none !important; }
body.auth-screen .app { grid-template-columns: minmax(0, 1fr); }
body.auth-screen .boot-card { margin-top: 10vh; }

/* ---------- accessibility preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .btn:active, .icon-btn:active, .tabbar a:active { transform: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .topbar, .tabbar, .sheet, .savebar { background: #FFF7FB; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .sheet { background: #fff; }
}
@media (prefers-contrast: more) {
  :root { --line: #CDBBC8; --line-2: #B7A3B2; --ink-3: #4F4656; }
  .card { border-color: var(--line-2); }
}
@media (forced-colors: active) {
  .bar, .wf-track span, .snap-bar span { forced-color-adjust: none; }
}
@media print {
  .sidebar, .topbar, .tabbar, #banner, .head-actions, .filters { display: none !important; }
  .app { grid-template-columns: 1fr; }
}

/* keep toasts clear of the bulk-action bar */
body:has(.bulkbar:not([hidden])) .toast { bottom: 88px; }
@media (max-width: 860px) { body:has(.bulkbar:not([hidden])) .toast { bottom: calc(140px + env(safe-area-inset-bottom)); } }

/* Product editor: "Shop filters" group inside the overrides grid */
.ov-sec { padding: 24px 0 10px; border-bottom: 1px solid var(--line); }
.ov-sec h3 { font-size: .95rem; font-weight: 650; margin: 0 0 2px; }

/* Categories → Filters, Arrange menu: reorder lists with buttons (no drag, so touch scrolling stays native) */
.cz-list.plain .cz-item { touch-action: auto; }
.flt-card { padding: 14px; }
.flt-name { width: 100%; max-width: 320px; border: 1px solid transparent; border-radius: 10px; background: transparent; font: inherit; font-weight: 600; font-size: .9rem; padding: 4px 8px; margin-left: -8px; color: var(--ink); }
.flt-name:hover:not(:disabled) { border-color: var(--line-2); }
.flt-name:focus-visible { border-color: var(--purple); outline: none; background: #fff; }
.cz-back { margin-bottom: 10px; }
.sub-chip:not(.own) button { color: var(--ink-3); }
.sub-chip button:hover { color: var(--ink); }
.icon-btn:disabled { opacity: .3; cursor: default; background: transparent; transform: none; }
