:root {
  color-scheme: light;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --bg: #f8f9fa; --surface: #ffffff; --surface-2: #f1f3f4; --sidebar: #f3f5f8;
  --ink: #1f1f1f; --muted: #5f6368; --faint: #70757a;
  --line: #e8eaed; --line-strong: #dadce0;
  --accent: #1a73e8; --accent-hover: #1557b0; --accent-ink: #ffffff;
  --accent-soft: #eef4fe; --accent-soft-ink: #1967d2; --accent-border: #c2dbff;
  --danger: #d93025; --danger-ink: #b3261e; --danger-soft: #fce8e6;
  --ok: #137333; --ok-soft: #e6f4ea; --warn: #b06000; --warn-soft: #fef7e0;
  --row-hover: #f4f7fc; --th: #f8f9fa;
  --shadow: 0 2px 6px rgba(60,64,67,.08), 0 12px 32px rgba(60,64,67,.12);
  --shadow-sm: 0 1px 2px rgba(60,64,67,.08);
  --focus: 0 0 0 3px rgba(26,115,232,.20);
  --scrim: rgba(32,33,36,.38); --radius: 14px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131314; --surface: #1e1f20; --surface-2: #282a2c; --sidebar: #17181a;
  --ink: #e3e3e3; --muted: #9aa0a6; --faint: #80868b;
  --line: #2d2f31; --line-strong: #3c4043;
  --accent: #8ab4f8; --accent-hover: #aecbfa; --accent-ink: #062e6f;
  --accent-soft: #1b2c44; --accent-soft-ink: #a8c7fa; --accent-border: #36598a;
  --danger: #f28b82; --danger-ink: #f6aea9; --danger-soft: #3a2220;
  --ok: #81c995; --ok-soft: #182e20; --warn: #fdd663; --warn-soft: #332a15;
  --row-hover: #24272c; --th: #191a1c;
  --shadow: 0 4px 16px rgba(0,0,0,.38), 0 12px 36px rgba(0,0,0,.42);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --focus: 0 0 0 3px rgba(138,180,248,.24);
  --scrim: rgba(0,0,0,.62);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
body { font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
button, a { touch-action: manipulation; }
button, .btn { transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s; }
button:disabled { cursor: not-allowed; opacity: .45; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.hidden, [hidden] { display: none !important; }
.muted { color: var(--muted); }
::selection { background: var(--accent-soft); }
.skip-link { position: fixed; left: 20px; top: -80px; padding: 12px 20px; z-index: 100; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.skip-link:focus { top: 16px; }
.mark { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 600 12px var(--font); letter-spacing: -.3px; flex: none; }
.login { min-height: 100svh; display: flex; flex-direction: column; }
.login-top { display: flex; align-items: center; justify-content: space-between; padding: 20px 32px; }
.login-wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.login-wordmark strong { font-size: 14px; font-weight: 500; }
.login-main { display: grid; place-items: center; flex: 1; padding: 36px 20px 72px; }
.login-card { width: min(390px, 100%); padding: 34px 32px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.login-symbol { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--accent-border); border-radius: 12px; margin-bottom: 22px; color: var(--accent-soft-ink); background: var(--accent-soft); }
.login-card h1 { font-size: 21px; font-weight: 500; letter-spacing: -.3px; }
.login-subtitle { color: var(--muted); font-size: 13px; margin: 5px 0 26px; }
.login-card > .field { margin: 0 0 8px; }
.login-card .secret { margin-bottom: 20px; }
.login-switch { margin: 10px 0 18px; }
.login-switch button { background: none; border: 0; padding: 0; color: var(--accent); font: 13px var(--font); cursor: pointer; }
.login-switch button:hover { text-decoration: underline; text-underline-offset: 3px; }
.login-card .btn { height: 42px; min-height: 42px; justify-content: space-between; padding: 0 20px; }
.login-foot { color: var(--faint); font-size: 12px; text-align: center; padding: 20px; letter-spacing: .2px; }
.login-foot span { padding: 0 8px; }
.shell { display: flex; min-height: 100svh; }
.sidebar { position: sticky; top: 0; height: 100svh; width: 220px; flex: none; padding: 18px 12px 14px; display: flex; flex-direction: column; background: var(--sidebar); border-right: 1px solid var(--line); z-index: 40; }
.side-brand { display: flex; align-items: center; text-align: left; gap: 10px; padding: 4px 8px 20px; background: none; border: 0; }
.side-brand strong { display: block; font-size: 14px; font-weight: 500; letter-spacing: 0; }
.side-brand small { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.brand-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin: 0 4px 0 auto; }
.nav { flex: 1; overflow-y: auto; margin: 2px 0 14px; }
.nav-group + .nav-group { margin-top: 20px; }
.nav-label { font-size: 11px; font-weight: 500; color: var(--faint); padding: 0 12px 6px; letter-spacing: .3px; }
.nav-item, .side-btn { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 7px 12px; margin: 2px 0; border: 0; border-radius: 999px; background: transparent; color: var(--muted); text-align: left; font-size: 13px; font-weight: 450; }
.nav-item svg, .side-btn svg { width: 16px; height: 16px; flex: none; }
.nav-item:hover, .side-btn:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.nav-item.is-active { background: var(--accent-soft); color: var(--accent-soft-ink); font-weight: 500; }
.side-foot { border-top: 1px solid var(--line); padding-top: 8px; }
.side-profile { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 12px 6px 0; margin-top: 8px; }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-soft-ink); border: 1px solid var(--accent-border); border-radius: 50%; font: 500 12px var(--font); }
.profile-text { flex: 1; min-width: 0; }
.profile-text strong { display: block; font-size: 12.5px; font-weight: 500; }
.profile-text small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11px; margin-top: 1px; }
.profile-text i { width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }
.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 32px; border-bottom: 1px solid var(--line); background: var(--surface); }
.top-title { display: flex; align-items: center; flex: 1; min-width: 0; gap: 10px; }
.top-title > span { color: var(--muted); font-size: 12.5px; }
.top-title .crumb-divider { color: var(--line-strong); font-size: 14px; }
.top-title h1 { font-size: 13px; font-weight: 500; white-space: nowrap; }
.clock { font-size: 11px; font-family: var(--mono); color: var(--faint); white-space: nowrap; }
#nav-toggle { display: none; }
.view { padding: 26px 32px 44px; width: 100%; max-width: 1480px; margin: 0 auto; flex: 1; }
.view:focus { outline: none; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-head h2 { font-size: 20px; font-weight: 500; letter-spacing: -.3px; line-height: 1.4; }
.page-actions { display: flex; align-items: center; gap: 8px; }
.workspace-foot { display: flex; justify-content: space-between; margin: 0 32px; padding: 14px 0; color: var(--faint); border-top: 1px solid var(--line); font-size: 11px; }
.icon-btn, .text-btn { display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--muted); border-radius: 999px; }
.icon-btn { width: 32px; height: 32px; padding: 0; flex: none; font-size: 18px; line-height: 1; }
.icon-btn:hover, .text-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 6px; height: 36px; min-height: 36px; padding: 0 16px; border: 1px solid transparent; border-radius: 999px; font-size: 13px; font-weight: 500; line-height: 1.4; text-decoration: none; white-space: nowrap; }
.btn:active:not(:disabled) { transform: scale(.985); }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn-primary { color: var(--accent-ink); background: var(--accent); box-shadow: none; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); box-shadow: 0 1px 3px rgba(26,115,232,.28); }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); border-color: var(--line-strong); }
.btn-danger { color: var(--danger-ink); background: var(--danger-soft); border-color: transparent; }
.btn-danger:hover:not(:disabled) { background: var(--danger); border-color: var(--danger); color: #ffffff; }
.btn-sm { height: 30px; min-height: 30px; font-size: 12px; padding: 0 12px; border-radius: 999px; }
.btn-block { width: 100%; }
.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.stat { position: relative; padding: 18px 20px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.stat-kicker { color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; align-items: center; }
.stat-kicker svg { width: 16px; height: 16px; opacity: .75; }
.stat-value { display: block; font-size: clamp(22px,2.2vw,30px); letter-spacing: -.6px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.2; margin: 12px 0 10px; }
.stat-note { font-size: 11px; color: var(--faint); }
.stat-featured { background: var(--accent-soft); color: var(--ink); border-color: var(--accent-border); }
.stat-featured .stat-kicker { color: var(--accent-soft-ink); }
.stat-featured .stat-note { color: var(--muted); }
.stat-featured .stat-value { color: var(--accent-soft-ink); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; overflow: clip; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 14px; font-weight: 500; }
.card-head .help { margin-top: 4px; }
.card-head .actions { margin-top: 0; }
.card-head .actions select { width: auto; min-width: 104px; height: 34px; min-height: 34px; border-radius: 999px; padding: 0 12px; }
.card-body { padding: 20px; }
.card-body:has(> .table-scroll), .card-body:has(> .state-empty:only-child) { padding: 0; }
.card-body h3 { margin: 16px 0 10px; font-size: 13px; font-weight: 500; }
.card-count { color: var(--faint); font-size: 11.5px; font-weight: 400; margin-left: 8px; white-space: nowrap; }
.split { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(0,.92fr); gap: 18px; align-items: start; }
.split-even { grid-template-columns: repeat(2,minmax(0,1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 12px; font-weight: 500; color: var(--muted); }
.field > span { color: var(--muted); }
.fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: 14px; }
.field + .field, .fields + .fields, .fields + .field, .field + .fields { margin-top: 16px; }
.fields > .field { margin-top: 0; }
.fields > .field-action { align-self: end; justify-self: start; }
#sell-extra:not(:empty), #undo-extra:not(:empty), #delete-extra:not(:empty), #legacy-sale-options, #dedup-extra:not(:empty), #sell-extra + .field, #undo-extra + .field, #delete-extra + .field { margin-top: 16px; }
#sell-extra .field + .field, #undo-extra .field + .field, #delete-extra .field + .field { margin-top: 16px; }
input:not([type=checkbox]):not([type=file]), select, textarea { display: block; width: 100%; min-width: 0; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 12px; min-height: 36px; font-size: 13px; color: var(--ink); font-weight: 400; transition: border-color .15s, box-shadow .15s, background .15s; }
input:not([type=checkbox]):not([type=file]), select { height: 36px; padding: 0 12px; line-height: 1.4; }
input::placeholder, textarea::placeholder { color: var(--faint); opacity: .8; }
input:not([type=checkbox]):hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: var(--focus); }
input[type=checkbox] { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }
input[type=file] { max-width: 100%; font-size: 12px; }
input[type=file]::file-selector-button { padding: 6px 12px; border: 1px solid var(--line-strong); background: var(--surface-2); border-radius: 999px; margin-right: 10px; color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; }
textarea { resize: vertical; min-height: 120px; line-height: 1.75; font-family: var(--mono); }
.secret { display: block; position: relative; }
.secret input { padding-right: 57px !important; }
.text-btn { position: absolute; right: 5px; top: 3px; min-height: 30px; padding: 3px 10px; font-size: 11.5px; }
.checks { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin: 16px 0; }
.checks .field { flex: 1; }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; }
.actions:has(> .check:only-child) { margin-top: 14px; }
.actions:has(> .check:only-child) + .actions { margin-top: 12px; }
.help { margin-top: 6px; color: var(--faint); font-size: 11.5px; line-height: 1.65; font-weight: 400; }
.table-scroll { width: 100%; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
table { width: 100%; min-width: 640px; border-collapse: separate; border-spacing: 0; font-size: 12.5px; text-align: left; }
th { padding: 11px 18px; font-size: 11.5px; font-weight: 500; color: var(--muted); background: var(--th); white-space: nowrap; border-bottom: 1px solid var(--line); }
td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; line-height: 1.55; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--row-hover); }
td input:not([type=checkbox]) { height: 32px !important; min-height: 32px !important; padding: 0 9px !important; font-size: 12px !important; border-radius: 8px !important; }
.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.low-num { color: var(--warn); }
.nowrap, .fit { white-space: nowrap; }
.fit { width: 1%; }
.clip { min-width: 130px; max-width: 420px; overflow-wrap: anywhere; white-space: pre-wrap; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: nowrap; }
.table-actions .btn { min-height: 30px; }
.kinds-table { min-width: 820px; }
.kinds-table td.center-cell, .kinds-table th.center-cell { text-align: center; }
.inline-price-input { width: 102px !important; min-width: 88px; text-align: right; font-family: var(--mono); }
.switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { width: 36px; height: 20px; border-radius: 999px; background: var(--line-strong); transition: background .18s; position: relative; display: inline-block; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.22); transition: transform .18s; }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch input:disabled + .switch-track { opacity: .5; cursor: not-allowed; }
.kind-cell { min-width: 130px; display: flex; align-items: center; gap: 11px; }
.kind-symbol { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.kind-symbol svg { width: 14px; }
.kind-name { white-space: nowrap; border: 0; background: none; color: var(--ink); font: 500 13px var(--font); text-align: left; padding: 0; display: block; }
.kind-name:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.entity-label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; vertical-align: middle; }
.entity-id { display: inline-flex; flex: none; align-items: center; padding: 0 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--muted); font: 11px/1.6 var(--mono); white-space: nowrap; vertical-align: middle; }
.cell-meta { display: block; margin-top: 3px; color: var(--faint); font: 10.5px var(--mono); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--faint); font-size: 11.5px; }
.pager-btns { display: flex; align-items: center; gap: 6px; }
.pager-index { min-width: 46px; text-align: center; font-family: var(--mono); font-size: 11.5px; }
.pager .btn { background: transparent; border-color: var(--line); min-height: 28px; height: 28px; font-size: 11.5px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border: 0; border-radius: 999px; font-size: 11px; font-weight: 500; line-height: 1.55; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .75; }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-bad { background: var(--danger-soft); color: var(--danger-ink); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-info { background: var(--accent-soft); color: var(--accent-soft-ink); }
.tag-plain::before { display: none; }
.segmented { display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.segmented button { padding: 4px 12px; min-height: 26px; border: 0; background: transparent; border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
.segmented button[aria-selected=true], .segmented button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.section-tools { margin-bottom: 18px; }
.table-tools { display: flex; align-items: center; gap: 10px; }
.table-tools input { height: 32px !important; min-height: 32px !important; padding: 0 12px !important; max-width: 170px; font-size: 12px !important; border-radius: 999px !important; }
.stock-alert { display: flex; align-items: center; gap: 9px; margin: 0 0 18px; padding: 11px 16px; border: 1px solid color-mix(in srgb, var(--warn) 22%, var(--line)); background: var(--warn-soft); color: var(--warn); border-radius: 12px; font-size: 12.5px; }
.stock-alert svg { width: 16px; height: 16px; flex: none; }
.stock-alert > span { flex: 1; }
.stock-alert button { background: transparent; border: 0; color: inherit; font: inherit; padding: 4px; }
.recent-list { list-style: none; padding: 0; margin: 0; }
.recent-list li { display: flex; gap: 12px; align-items: center; padding: 15px 22px; border-bottom: 1px solid var(--line); }
.recent-list li:last-child { border: 0; }
.activity-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; }
.activity-icon svg { width: 14px; height: 14px; }
.activity-text { min-width: 0; flex: 1; }
.activity-text strong { display: block; font-weight: 500; font-size: 12px; }
.activity-text p { color: var(--faint); font-size: 11px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-list time { font: 11px var(--mono); color: var(--faint); white-space: nowrap; }
.link-btn { background: transparent; border: 0; color: var(--muted); font: 11px var(--font); display: inline-flex; align-items: center; gap: 7px; }
.link-btn:hover { color: var(--accent); }
.link-btn svg { width: 14px; }
.dropzone { position: relative; min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; border: 1px dashed var(--line-strong); background: var(--surface-2); border-radius: 14px; cursor: pointer; text-align: center; margin-top: 16px; transition: background .15s, border-color .15s; }
.dropzone > svg { color: var(--accent); width: 25px; height: 25px; margin-bottom: 4px; }
.dropzone strong { font-weight: 500; font-size: 13px; }
.dropzone > span { color: var(--faint); font-size: 11px; }
.dropzone input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.dropzone:hover, .dropzone.is-dragging, .dropzone:focus-within { background: var(--accent-soft); border-color: var(--accent); }
.file-meta { margin: 9px 0 0; font: 11px var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.source-tabs { margin: 20px 0 0; }
#paste-source { margin-top: 18px; }
.advanced { margin-top: 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.advanced summary { padding: 14px 0; color: var(--muted); font-size: 12px; cursor: pointer; list-style: none; display: flex; align-items: center; gap: 7px; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary::before { content: "›"; font-size: 16px; line-height: 1; transition: transform .15s; }
.advanced[open] > summary::before { transform: rotate(90deg); }
.advanced summary small { color: var(--faint); margin-left: auto; font-size: 11px; }
.advanced-body { padding: 2px 0 20px; }
.advanced-body .checks { margin-top: 0; }
.dedup-field { margin-top: 22px; }
#dedup-extra:empty { display: none; }
.paste-hold { margin-top: 10px; padding: 9px 11px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 6px; display: flex; gap: 8px; justify-content: space-between; align-items: center; font-size: 11px; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; margin: 20px 0; overflow: hidden; }
.metrics.metrics-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metrics > div { padding: 13px 14px; background: var(--surface); }
.metrics strong { display: block; font-size: 21px; letter-spacing: -.5px; font-weight: 500; font-variant-numeric: tabular-nums; }
.metrics span { color: var(--faint); font-size: 10px; }
.progress { height: 4px; border-radius: 4px; overflow: hidden; background: var(--line); }
.progress > span { display: block; height: 100%; background: var(--accent); transition: width .25s; }
/* Integer widths keep the bars free of inline style attributes. */
.w-0 { width: 0%; } .w-1 { width: 1%; } .w-2 { width: 2%; } .w-3 { width: 3%; } .w-4 { width: 4%; }
.w-5 { width: 5%; } .w-6 { width: 6%; } .w-7 { width: 7%; } .w-8 { width: 8%; } .w-9 { width: 9%; }
.w-10 { width: 10%; } .w-11 { width: 11%; } .w-12 { width: 12%; } .w-13 { width: 13%; } .w-14 { width: 14%; }
.w-15 { width: 15%; } .w-16 { width: 16%; } .w-17 { width: 17%; } .w-18 { width: 18%; } .w-19 { width: 19%; }
.w-20 { width: 20%; } .w-21 { width: 21%; } .w-22 { width: 22%; } .w-23 { width: 23%; } .w-24 { width: 24%; }
.w-25 { width: 25%; } .w-26 { width: 26%; } .w-27 { width: 27%; } .w-28 { width: 28%; } .w-29 { width: 29%; }
.w-30 { width: 30%; } .w-31 { width: 31%; } .w-32 { width: 32%; } .w-33 { width: 33%; } .w-34 { width: 34%; }
.w-35 { width: 35%; } .w-36 { width: 36%; } .w-37 { width: 37%; } .w-38 { width: 38%; } .w-39 { width: 39%; }
.w-40 { width: 40%; } .w-41 { width: 41%; } .w-42 { width: 42%; } .w-43 { width: 43%; } .w-44 { width: 44%; }
.w-45 { width: 45%; } .w-46 { width: 46%; } .w-47 { width: 47%; } .w-48 { width: 48%; } .w-49 { width: 49%; }
.w-50 { width: 50%; } .w-51 { width: 51%; } .w-52 { width: 52%; } .w-53 { width: 53%; } .w-54 { width: 54%; }
.w-55 { width: 55%; } .w-56 { width: 56%; } .w-57 { width: 57%; } .w-58 { width: 58%; } .w-59 { width: 59%; }
.w-60 { width: 60%; } .w-61 { width: 61%; } .w-62 { width: 62%; } .w-63 { width: 63%; } .w-64 { width: 64%; }
.w-65 { width: 65%; } .w-66 { width: 66%; } .w-67 { width: 67%; } .w-68 { width: 68%; } .w-69 { width: 69%; }
.w-70 { width: 70%; } .w-71 { width: 71%; } .w-72 { width: 72%; } .w-73 { width: 73%; } .w-74 { width: 74%; }
.w-75 { width: 75%; } .w-76 { width: 76%; } .w-77 { width: 77%; } .w-78 { width: 78%; } .w-79 { width: 79%; }
.w-80 { width: 80%; } .w-81 { width: 81%; } .w-82 { width: 82%; } .w-83 { width: 83%; } .w-84 { width: 84%; }
.w-85 { width: 85%; } .w-86 { width: 86%; } .w-87 { width: 87%; } .w-88 { width: 88%; } .w-89 { width: 89%; }
.w-90 { width: 90%; } .w-91 { width: 91%; } .w-92 { width: 92%; } .w-93 { width: 93%; } .w-94 { width: 94%; }
.w-95 { width: 95%; } .w-96 { width: 96%; } .w-97 { width: 97%; } .w-98 { width: 98%; } .w-99 { width: 99%; }
.w-100 { width: 100%; }
.progress-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; font-size: 11px; color: var(--muted); }
.sample { padding: 0; margin: 0; list-style: none; counter-reset: sample; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; max-height: 360px; overflow-y: auto; }
.sample li { counter-increment: sample; display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--line); font: 11px/1.7 var(--mono); overflow-wrap: anywhere; }
.sample li::before { content: counter(sample); color: var(--faint); text-align: right; }
.sample li:last-child { border: 0; }
.banner { margin-top: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; line-height: 1.6; }
.banner-ok { background: var(--ok-soft); color: var(--ok); }
.banner-err { background: var(--danger-soft); color: var(--danger-ink); }
.banner-info { background: var(--accent-soft); color: var(--accent-soft-ink); }
.form-error { font-size: 12px; color: var(--danger-ink); margin-top: 14px; min-height: 17px; }
.state { min-height: 200px; padding: 36px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; color: var(--faint); font-size: 12px; }
.state strong { color: var(--muted); font-size: 13px; font-weight: 500; }
.state p { max-width: 350px; font-size: 11px; }
.state-mark { display: grid; place-items: center; width: 42px; height: 42px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 2px; }
.state-mark svg { width: 19px; height: 19px; }
.spinner { display: inline-block; width: 17px; height: 17px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toasts { position: fixed; bottom: 22px; right: 24px; z-index: 100; display: flex; flex-direction: column; gap: 10px; width: min(360px,calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); pointer-events: auto; animation: toast-in .15s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(5px); } }
.toast-mark { display: inline-flex; padding-top: 1px; }
.toast-mark svg { width: 16px; height: 16px; }
.toast-ok .toast-mark { color: var(--ok); }
.toast-err .toast-mark { color: var(--danger); }
.toast-info .toast-mark { color: var(--accent); }
.toast-text { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 12.5px; line-height: 1.65; }
.toast-close { padding: 0; width: 18px; height: 20px; border: 0; background: none; color: var(--faint); font-size: 16px; }
.modal-scrim { position: fixed; inset: 0; z-index: 90; background: var(--scrim); display: grid; place-items: center; padding: 24px; }
.modal { width: min(420px,100%); padding: 26px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.modal-symbol { width: 38px; height: 38px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); border-radius: 50%; margin-bottom: 20px; }
.modal-symbol.is-danger { background: var(--danger-soft); color: var(--danger); }
.modal h3 { font-size: 17px; font-weight: 600; }
.modal p { margin: 10px 0 25px; color: var(--muted); font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.facts { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 15px 20px; font-size: 12px; margin: 0 0 24px; }
.facts dt { color: var(--faint); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
code { font-family: var(--mono); font-size: .95em; }
.snippet { margin: 0; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font: 12px/1.9 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2; }
.card-code { display: flex; align-items: flex-start; gap: 6px; }
.card-code code { display: block; max-height: 5.2em; overflow: auto; flex: 1; line-height: 1.7; scrollbar-width: thin; }
.card-code button { width: 27px; height: 27px; opacity: .55; }
.card-code:hover button, .card-code button:focus-visible { opacity: 1; }
.danger-section { border: 1px solid color-mix(in srgb,var(--danger) 22%,var(--line)); }
.danger-section > summary { padding: 20px 22px; cursor: pointer; font-size: 13px; color: var(--danger-ink); }
.danger-section .card-body { border-top: 1px solid var(--line); }
.create-kind .card-body { max-width: 900px; }
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 35; }
@media (min-width: 1700px) { .view { padding-top: 45px; } }
@media (max-width: 1180px) {
  .sidebar { width: 194px; padding-left: 10px; padding-right: 10px; }
  .view { padding: 28px 25px 40px; }
  .topbar { padding: 0 25px; }
  .workspace-foot { margin: 0 25px; }
  .stats { gap: 12px; }
  .stat { padding: 18px; }
  .split { grid-template-columns: minmax(0,1fr); }
  .split-even { grid-template-columns: repeat(2,minmax(0,1fr)); }
  th, td { padding-left: 15px; padding-right: 15px; }
  .table-tools { flex-wrap: wrap; gap: 8px; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: -240px; width: 216px; transition: left .18s ease-out; }
  .sidebar.is-open { left: 0; box-shadow: var(--shadow); }
  #nav-toggle { display: inline-flex; margin-left: -7px; }
  .view { padding: 25px 22px 40px; }
  .topbar { min-height: 58px; padding: 0 22px; gap: 10px; }
  .top-title { gap: 10px; }
  .page-head h2 { font-size: 23px; }
  .stat-value { font-size: 30px; }
  #dash-table table { min-width: 760px; }
}
@media (max-width: 640px) {
  .login-top { padding: 20px; }
  .login-main { padding-bottom: 50px; }
  .login-card { padding: 30px 26px 18px; }
  .view { padding: 24px 16px 30px; }
  .topbar { padding: 0 16px; }
  .top-title > #hint, .crumb-divider { display: none; }
  .clock { font-size: 10px; }
  .page-head { margin-bottom: 20px; gap: 12px; }
  .page-head h2 { font-size: 22px; }
  .page-actions { gap: 6px; }
  .page-actions .btn { font-size: 11px; padding: 7px 10px; }
  .page-actions .btn-secondary span { display: none; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 18px; }
  .stat { padding: 17px 16px 15px; }
  .stat-value { font-size: 30px; margin: 17px 0 12px; }
  .stat-kicker { font-size: 11px; }
  .stat-note { font-size: 10px; }
  .card { margin-bottom: 18px; border-radius: 8px; }
  .card-head { padding: 17px 16px; }
  .card-body { padding: 18px 16px; }
  .card-count { margin-left: 6px; font-size: 10px; }
  .card-head:has(.table-tools) { align-items: stretch; flex-direction: column; gap: 12px; }
  .table-tools { justify-content: space-between; }
  .table-tools input { max-width: 130px; }
  .segmented button { padding: 5px 9px; }
  .split, .split-even { grid-template-columns: minmax(0,1fr); gap: 0; }
  .fields { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px 12px; }
  .fields .field:only-child { grid-column: 1 / -1; }
  .create-kind .fields { grid-template-columns: minmax(0,1fr); }
  th, td { padding: 13px 14px; }
  .pager { padding: 13px 14px; }
  .pager .btn { font-size: 10px; padding: 5px 8px; }
  .pager-btns { gap: 3px; }
  .stock-alert { font-size: 11px; padding: 10px 12px; }
  .recent-list li { padding: 14px 16px; }
  .recent-list time { font-size: 10px; }
  .activity-text p { max-width: 180px; }
  .facts { grid-template-columns: 64px minmax(0,1fr); gap: 14px; font-size: 11px; }
  .snippet { padding: 16px; font-size: 11px; }
  .workspace-foot { margin: 0 16px; }
  .toasts { bottom: 16px; right: 16px; }
  .metrics strong { font-size: 20px; }
  .metrics > div { padding: 12px; }
  .modal { padding: 24px; }
  .btn, .field, .check, input:not([type=checkbox]):not([type=file]), select, textarea { font-size: 13px; }
  input:not([type=checkbox]):not([type=file]), select, textarea { min-height: 42px; }
  input:not([type=checkbox]):not([type=file]), select { height: 42px; }
  .btn { height: 40px; min-height: 40px; }
  .btn-sm { height: 32px; min-height: 32px; }
  input:not([type=checkbox]):not([type=file]), select, textarea { font-size: 16px; }
  #dash-table th:first-child, #dash-table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); border-right: 1px solid var(--line); }
  #dash-table th:first-child { background: var(--th); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.retry-actions { display: flex; justify-content: center; padding: 0 24px 28px; }
.stock-alert button { display: inline-flex; align-items: center; gap: 5px; }
#delete-form + .banner + .actions { border-top: 1px solid var(--line); padding-top: 20px; }
/* Inventory and shipment controls */
.page-size { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.page-size select { width: auto; min-width: 58px; height: 31px; min-height: 31px; padding: 0 8px; font-size: 11px; }
.selection-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 20px; background: var(--accent-soft); border-bottom: 1px solid var(--line); }
.selection-bar > strong { font-size: 11px; font-weight: 550; white-space: nowrap; color: var(--accent-soft-ink); }
.selection-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
#selection-download:empty { display: none; }
.select-cell { width: 42px; text-align: center; }
.select-cell input { display: block; margin: 0 auto; cursor: pointer; }
.inventory-table { min-width: 1040px; }
.inventory-table .clip { min-width: 240px; max-width: 400px; }
.inventory-table .card-code code { max-height: 5.2em; }
.shipment-cell { min-width: 180px; max-width: 250px; overflow-wrap: anywhere; }
.mono { font-family: var(--mono); }
.order-link { display: inline; padding: 0; text-align: left; font: 11px/1.65 var(--mono); color: var(--accent); overflow-wrap: anywhere; }
.order-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.shipments-table { min-width: 950px; }
.shipments-table .clip { min-width: 120px; max-width: 200px; }
.shipments-table .order-link { min-width: 150px; max-width: 240px; display: block; }
.field-line { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px 16px; margin-top: 18px; }
.field-line > .field { flex: 1 1 160px; }
.field-line > .btn { height: 38px; min-height: 38px; }
.field-line + .field { margin-top: 18px; }
.stock-hint { padding-bottom: 10px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.take-layout input[readonly] { background: var(--surface-2); color: var(--muted); }
.take-layout input:disabled, .take-layout select:disabled { background: var(--surface-2); opacity: .75; }
.take-layout .btn-primary .spinner { width: 14px; height: 14px; border-color: currentColor; border-top-color: transparent; }
.shipment-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.order-number { min-width: 0; font: 550 12px/1.7 var(--mono); overflow-wrap: anywhere; }
.shipment-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px 20px; margin: 21px 0; }
.shipment-facts > div { min-width: 0; }
.shipment-facts dt { color: var(--faint); font-size: 10px; margin-bottom: 5px; }
.shipment-facts dd { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.shipment-wide { grid-column: 1 / -1; }
textarea.shipment-preview { min-height: 210px; max-height: 400px; font: 12px/1.9 var(--mono); white-space: pre; background: var(--surface-2); }
.shipment-preview-pager .pager { padding: 13px 0 0; border: 0; }
.shipment-preview-pager + .actions { padding-top: 18px; border-top: 1px solid var(--line); }
.shipment-share-box { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); display: grid; gap: 12px; }
.shipment-share-head { display: grid; gap: 4px; }
.shipment-share-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shipment-share-title strong { font-size: 13px; font-weight: 500; }
.shipment-share-url-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shipment-share-input { flex: 1; min-width: 180px; height: 32px; min-height: 32px; font-size: 12px; background: var(--surface); }
.shipment-share-origin { width: auto; height: 32px; min-height: 32px; font-size: 12px; padding: 0 10px; background: var(--surface); }
.shipment-share-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shipment-share-days { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.shipment-share-days input { width: 72px; height: 32px; min-height: 32px; text-align: center; font-size: 12.5px; background: var(--surface); }
.shipment-share-presets { display: inline-flex; align-items: center; gap: 4px; }
.legacy-sale > summary { padding: 19px 22px; color: var(--muted); cursor: pointer; font-size: 12px; }
.legacy-sale[open] > summary { border-bottom: 1px solid var(--line); }
.legacy-body { padding: 20px 20px 0; }
.legacy-body .card { box-shadow: none; }
#export-sale-options { margin-top: 20px; }
#shipment-detail-card { scroll-margin-top: 18px; }
@media (max-width: 640px) {
  .selection-bar { align-items: flex-start; flex-direction: column; padding: 13px 14px; gap: 10px; }
  .selection-actions { justify-content: flex-start; gap: 6px; }
  .selection-actions .btn { font-size: 11px; padding: 6px 9px; }
  .inventory-table th:first-child, .inventory-table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); border-right: 1px solid var(--line); }
  .inventory-table th:first-child { background: var(--th); }
  .legacy-body { padding: 12px 12px 0; }
  .legacy-sale > summary { padding: 17px 16px; }
  .field-line { gap: 10px; }
  .stock-hint { font-size: 11px; }
  .shipment-heading { flex-direction: column; gap: 10px; }
  textarea.shipment-preview { font-size: 12px; }
  .page-size select { font-size: 14px; }
  .recovery-list { grid-template-columns: 1fr; }
}

#totp-qr { display: block; width: 180px; max-width: 100%; height: auto; margin: 12px 0 18px; background: white; padding: 8px; border-radius: 8px; border: 1px solid var(--line); }
#totp-setup .actions, #totp-enabled .actions { margin-top: 16px; }
#totp-confirm .snippet { margin: 6px 0 14px; padding: 12px 14px; line-height: 1.6; }
#totp-confirm .actions { margin-top: 6px; }
#trash-table { margin-top: 18px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
#trash-table:has(> .state-empty:only-child) { border: 0; }
.recovery-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.recovery-list code { display: block; overflow-wrap: anywhere; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.paid-modal { color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; margin: auto; padding: 24px; width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; box-shadow: var(--shadow); }
.paid-modal::backdrop { background: var(--scrim); }
.paid-modal form { display: flex; flex-direction: column; gap: 18px; min-width: 0; max-height: calc(100dvh - 82px); }
.paid-modal h3 { flex: none; margin: 0; font-size: 16px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.paid-modal .paid-body { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.paid-modal fieldset { display: grid; gap: 16px; min-width: 0; border: 0; padding: 0; margin: 0; }
.paid-modal fieldset > .btn { justify-self: start; }
.paid-modal fieldset .actions { margin: 0; padding-top: 0; border-top: 0; justify-content: flex-start; }
.paid-modal .field, .paid-modal .form-error { margin: 0; }
.paid-modal .fields { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.paid-modal textarea:not(.shipment-preview) { min-height: 96px; font-family: var(--font); }
.paid-modal textarea.shipment-preview { min-height: 88px; max-height: 200px; white-space: pre-wrap; overflow-wrap: anywhere; }
.paid-modal .form-error:empty { display: none; }
.paid-modal form > .actions { flex: none; justify-content: flex-end; margin: 0; padding-top: 16px; border-top: 1px solid var(--line); }
.paid-summary { padding: 13px 15px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; }
.paid-summary + form, .paid-summary + .help { margin-top: 16px; }
.paid-table { margin-top: 16px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.paid-table:first-child { margin-top: 0; }
.paid-reference { margin-top: 8px; color: var(--muted); font-size: 11px; }
.paid-reference summary { cursor: pointer; }
.paid-reference code { display: block; margin-top: 6px; overflow-wrap: anywhere; }
.paid-modal .help:first-child { margin-top: 0; }
.paid-modal .mono { overflow-wrap: anywhere; }
.intro-editor-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.intro-editor-hint { margin: -8px 0 0; }
#product-intro-source { min-height: 230px; font-family: var(--mono); line-height: 1.65; }
.intro-editor-preview { background: var(--surface-2); padding: 20px; border: 1px solid var(--line); border-radius: 10px; }
.product-prose { font-size: 14px; line-height: 1.85; overflow-wrap: anywhere; }
.product-prose > :first-child { margin-top: 0; }
.product-prose > :last-child { margin-bottom: 0; }
.product-prose p, .product-prose ul, .product-prose ol, .product-prose blockquote, .product-prose pre { margin: 0 0 1.05em; }
.product-prose h1, .product-prose h2, .product-prose h3, .product-prose h4, .product-prose h5, .product-prose h6 { margin: 1.35em 0 .55em; color: var(--ink); line-height: 1.4; font-weight: 650; }
.product-prose h1 { font-size: 1.55em; }
.product-prose h2 { font-size: 1.34em; }
.product-prose h3 { font-size: 1.15em; }
.product-prose ul, .product-prose ol { padding-inline-start: 1.45em; }
.product-prose li + li { margin-top: .25em; }
.product-prose a { color: var(--accent); text-underline-offset: .22em; }
.product-prose img { display: block; width: auto; max-width: 100%; max-height: 640px; border-radius: 10px; margin: .85em auto; object-fit: contain; }
.product-prose blockquote { padding: .65em 1em; border-inline-start: 3px solid var(--accent); background: var(--surface-2); color: var(--muted); }
.product-prose blockquote > :last-child { margin-bottom: 0; }
.product-prose code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
.product-prose pre { overflow: auto; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.product-prose pre code { padding: 0; }
.product-prose hr { border: 0; border-top: 1px solid var(--line); margin: 1.5em 0; }
.product-prose table { display: block; overflow-x: auto; margin: 0 0 1em; }
.product-prose .intro-align-center { text-align: center; }
.product-prose .intro-align-right { text-align: right; }
.paid-actions { margin: 18px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.fields > .field-full { grid-column: 1 / -1; }
#customer-edit > button { align-self: end; justify-self: start; }
#paid-filter, #pay-order-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 16px; }
#paid-filter > .field, #pay-order-filter > .field { flex: 1 1 140px; }
#paid-filter > .field:has(input[type=datetime-local]) { flex: 1.35 1 185px; }
#paid-filter > button, #pay-order-filter > button { flex: 0 0 auto; margin-left: auto; }
.stats-revenue { margin-top: 12px; }
.stats-revenue .stat-value { font-size: clamp(22px, 2.4vw, 28px); }
.pay-switch-row { flex-direction: row; align-items: center; gap: 10px; font-size: 13px; color: var(--ink); cursor: pointer; }
.pay-switch-row input[type=checkbox] { width: 16px; height: 16px; min-height: 16px; margin: 0; accent-color: var(--accent); }
.pay-channels-grid { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 4px; }
.pay-channel-item { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); font-size: 12.5px; color: var(--ink); cursor: pointer; }
.pay-channel-item input[type=checkbox] { width: 15px; height: 15px; min-height: 15px; margin: 0; accent-color: var(--accent); }
.notify-url-row { display: flex; align-items: stretch; gap: 10px; }
.notify-url-row input { flex: 1 1 auto; min-width: 0; background: var(--surface-2); }
.notify-url-row .btn { flex: 0 0 auto; }
#kind-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 16px; }
#kind-form > .field { flex: 1 1 130px; }
#kind-form > .field:first-child { flex: 1.5 1 180px; }
#kind-form > button { flex: 0 0 auto; }
.tier-rows { display: grid; gap: 10px; }
.tier-edit-row { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 10px; }
#customer-filter { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 16px; max-width: 640px; }
#customer-filter > .field { flex: 1 1 160px; }
#customer-filter > button { flex: 0 0 auto; }
.trash-bar { grid-template-columns: minmax(180px, 320px) auto; }
#customer-detail, #paid-order-detail { scroll-margin-top: 20px; }
@media (max-width: 640px) {
  .card-head .actions { width: 100%; justify-content: flex-start; }
  .card-head .actions select { height: 42px; min-height: 42px; }
  .trash-bar { grid-template-columns: minmax(0, 1fr); }
  #kind-form > .field, #paid-filter > .field, #pay-order-filter > .field, #customer-filter > .field { flex: 1 1 calc(50% - 8px); }
  #paid-filter > .field:has(input[type=datetime-local]) { flex: 1 1 100%; }
  #kind-form > button, #paid-filter > button, #pay-order-filter > button, #customer-filter > button { height: 42px; min-height: 42px; }
  .tier-edit-row { grid-template-columns: 1fr 1fr; }
  .tier-edit-row > button { grid-column: 1 / -1; justify-self: start; }
  #customer-edit > button, .fields > .field-action { height: 42px; min-height: 42px; }
  .notify-url-row { flex-direction: column; }
}
@media (max-width: 480px) {
  .paid-modal { padding: 20px; }
  .paid-modal form { max-height: calc(100dvh - 74px); }
  .paid-modal .fields { grid-template-columns: minmax(0,1fr); }
  .paid-modal textarea.shipment-preview { font-size: 16px; }
  .paid-modal form > .actions > .btn { flex: 1; }
}
/* RemixIcon alignment, ECharts trend card, unified kind modal, and order center */
i[class^="ri-"], i[class*=" ri-"] { font-style: normal; line-height: 1; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; flex: none; }
.nav-item i[class^="ri-"], .side-btn i[class^="ri-"] { font-size: 16px; width: 18px; }
.btn i[class^="ri-"] { font-size: 15px; }
.btn-sm i[class^="ri-"] { font-size: 14px; }
.icon-btn i[class^="ri-"] { font-size: 17px; }
.login-symbol i[class^="ri-"] { font-size: 22px; }
.stat-kicker i[class^="ri-"] { font-size: 17px; opacity: .82; }
.kind-symbol i[class^="ri-"] { font-size: 15px; }
.activity-icon i[class^="ri-"] { font-size: 15px; }
.dropzone > i[class^="ri-"] { color: var(--accent); font-size: 28px; margin-bottom: 4px; }
.state-mark i[class^="ri-"] { font-size: 20px; }
.toast-mark i[class^="ri-"] { font-size: 17px; }
.modal-symbol i[class^="ri-"] { font-size: 20px; }
.stock-alert i[class^="ri-"] { font-size: 17px; }
.link-btn i[class^="ri-"] { font-size: 14px; }
.chart-card .card-body { padding: 14px 18px 18px; }
.chart-box { width: 100%; height: 290px; }
.chart-fallback { display: flex; align-items: center; justify-content: center; height: 220px; color: var(--muted); font-size: 13px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.profit-pos { color: var(--ok); }
.profit-neg { color: var(--danger-ink); }
.paid-modal.kind-modal { width: min(740px, calc(100vw - 32px)); }
.kind-modal-tabs { margin-bottom: 16px; }
.kind-modal-panel[hidden] { display: none !important; }
.kind-modal-panel { display: grid; gap: 16px; }
.order-center-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.order-status-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
@media (max-width: 640px) {
  .chart-box { height: 240px; }
}
