/*
 * Vendor inventory / point-of-sale module.
 * Tokens and component classes follow the "Inventory Web App" design:
 * a warm light ground, ink text, one red accent, square accent buttons.
 */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap');

:root {
    --ink: #101820;
    --ground: #F3F0E8;
    --panel: #FAF8F2;
    --white: #ffffff;
    --accent: #101820;
    --accent-600: #2A3440;
    --accent-700: #7A5A12;
    --accent-100: #F6EDD6;
    --accent-soft: rgba(201, 154, 46, 0.18);
    --grey: #667085;
    --grey-dark: #555E70;
    --grey-light: #a5a1a0;
    --neutral-300: #d7d3d3;
    --neutral-800: #444141;
    --fill: rgba(120, 116, 114, 0.12);
    --fill-soft: rgba(120, 116, 114, 0.1);
    --hair: rgba(32, 30, 29, 0.12);
    --rule: #eceae9;
    --hover: #f7f5f4;
    --thumb: #e8e5e4;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: -apple-system, 'SF Pro Text', 'Archivo', system-ui, sans-serif;
    font-size: 14px;
    letter-spacing: -0.005em;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-700); text-decoration: none; }
input, textarea, select, button { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--grey); }
.accent { color: var(--accent); }
.right { text-align: right; }
.nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scr { scrollbar-width: thin; }
[hidden] { display: none !important; }

@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(0.99); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Shell ────────────────────────────────────────── */
.app { display: flex; height: 100vh; overflow: hidden; }
.side { width: 244px; flex-shrink: 0; display: flex; flex-direction: column; background: var(--panel); border-right: 0.5px solid var(--hair); }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 18px; border-bottom: 0.5px solid var(--hair); color: var(--ink); }
.side-mark { width: 36px; height: 36px; border-radius: 10px; background: transparent; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.side-name { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.side-sub { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey); }
.side-nav { flex: 1; overflow-y: auto; padding: 16px 0; }
.nav-label { padding: 0 20px 8px; font-size: 12px; font-weight: 600; color: var(--grey-light); }
.nav-label + .nav-item { margin-top: 0; }
.nav-label:not(:first-child) { padding-top: 22px; }
.nav-item { margin: 2px 10px; padding: 9px 12px; border-radius: 10px; display: flex; align-items: center; gap: 11px; color: var(--ink); font-size: 14px; font-weight: 600; transition: background 0.15s ease; }
.nav-item:hover { background: var(--fill-soft); }
.nav-item.on { background: #eae7e7; font-weight: 800; }
.nav-badge { margin-left: auto; font-size: 11px; font-weight: 700; color: #7d7979; }
.nav-badge.hot { color: var(--accent); }
.side-user { display: flex; align-items: center; gap: 11px; padding: 14px 20px; border-top: 0.5px solid var(--hair); color: var(--ink); transition: background 0.15s ease; }
.side-user:hover { background: var(--fill-soft); }
.avatar { width: 34px; height: 34px; border-radius: 999px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.avatar.xl { width: 84px; height: 84px; font-size: 30px; letter-spacing: -0.02em; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 18px 26px; border-bottom: 0.5px solid var(--hair); flex-shrink: 0; }
.kicker { font-size: 13px; font-weight: 600; color: var(--grey); white-space: nowrap; }
.title { margin: 2px 0 0; font-size: 32px; font-weight: 700; letter-spacing: -0.028em; line-height: 1.06; }
.head-tools { display: flex; align-items: center; gap: 10px; }
.search { display: flex; align-items: center; gap: 9px; width: 260px; height: 40px; padding: 0 12px; border-radius: 12px; background: #f3f2f2; flex-shrink: 0; }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 14px; }
.content { flex: 1; overflow-y: auto; }
.view { animation: viewIn 0.28s ease both; }
.menu-btn { display: none; }

/* ── Buttons, pills, chips ────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 12px; background: var(--fill); color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: background 0.15s ease; }
.btn:hover { background: var(--fill-soft); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 12px; }
.btn-lg { height: 44px; padding: 0 18px; }
/* The accent button is square on purpose: it is the one hard edge on the page */
.btn-accent { border-radius: 0; background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-600); }
.btn-soft { background: var(--accent-soft); color: var(--accent-700); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: default; }
.link { color: var(--accent-700); font-size: 14px; font-weight: 500; cursor: pointer; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.pill-accent { background: var(--accent); color: #fff; }
.pill-neutral { background: var(--neutral-300); color: var(--neutral-800); }
.pill-ink { background: var(--ink); color: #f3f2f2; }
.pill-soft { background: rgba(201, 154, 46, 0.12); color: var(--accent-700); padding: 4px 10px; }
.chip { display: inline-flex; align-items: center; height: 34px; padding: 0 13px; border-radius: 999px; color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; transition: background 0.15s ease; }
.chip:hover { background: var(--fill-soft); }
.chip.on { background: var(--ink); color: #f3f2f2; }
.chip.fill { background: var(--fill); color: #3d3a39; }
.chip.fill.on { background: var(--ink); color: #fff; }
.chip.box { height: 40px; border-radius: 12px; background: var(--fill); font-weight: 700; }
.chip.box.on { background: var(--ink); color: #f3f2f2; }

/* ── Rows and tables ──────────────────────────────── */
.bar { display: flex; align-items: center; gap: 10px; padding: 14px 26px; border-bottom: 0.5px solid var(--hair); flex-wrap: wrap; }
.bar .note { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--grey); }
.thead { display: flex; padding: 11px 26px; border-bottom: 0.5px solid var(--hair); background: var(--panel); font-size: 12px; font-weight: 600; color: var(--grey); }
.thead.top { border-top: 0.5px solid var(--hair); }
.trow { display: flex; align-items: center; padding: 12px 26px; border-bottom: 1px solid var(--rule); color: var(--ink); font-size: 14px; transition: background 0.15s ease; }
a.trow:hover, .trow.click:hover { background: var(--hover); }
.c { flex-shrink: 0; }
.grow { flex: 1; min-width: 0; }
.strong { font-weight: 700; letter-spacing: -0.015em; }
.sku { font-size: 13px; color: var(--grey-dark); letter-spacing: 0.02em; }
.big { font-size: 17px; font-weight: 700; }
.sec { display: flex; align-items: baseline; justify-content: space-between; padding: 20px 26px 12px; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.sec.ruled { border-bottom: 1px solid var(--rule); }
.sub { font-size: 12px; color: var(--grey); margin-top: 2px; }
.mono-tile { width: 36px; height: 36px; border-radius: 10px; background: var(--thumb); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--grey-dark); flex-shrink: 0; overflow: hidden; }
.mono-tile img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
.actions { display: flex; align-items: center; gap: 10px; padding: 18px 26px 30px; flex-wrap: wrap; }
.empty { padding: 56px 26px; text-align: center; color: var(--grey); }
.empty strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 15px; font-weight: 600; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 16px 26px; font-size: 12px; color: var(--grey); }
.pager .btns { display: flex; gap: 6px; }

/* ── Figures ──────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 0.5px solid var(--hair); }
.kpi { padding: 22px 26px 24px; border-right: 1px solid var(--rule); }
.kpi:last-child { border-right: 0; }
.kpi-label { font-size: 13px; font-weight: 600; color: var(--grey); }
.kpi-value { margin-top: 8px; font-size: 42px; font-weight: 700; letter-spacing: -0.04em; line-height: 1.02; font-variant-numeric: tabular-nums; }
.kpi-note { margin-top: 6px; font-size: 12px; color: var(--grey-dark); }
.kpis.sm .kpi { padding: 18px 26px 20px; }
.kpis.sm .kpi-label { font-size: 12px; }
.kpis.sm .kpi-value { margin-top: 5px; font-size: 26px; letter-spacing: -0.03em; }
.cells { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 0.5px solid var(--hair); }
.cells.three { grid-template-columns: repeat(3, 1fr); }
.cell { padding: 16px 22px 18px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.cell-label { font-size: 12px; font-weight: 600; color: var(--grey); }
.cell-value { margin-top: 5px; font-size: 26px; font-weight: 700; letter-spacing: -0.03em; }
.cell-value.lg { font-size: 34px; letter-spacing: -0.04em; }
.split { display: grid; grid-template-columns: 1.35fr 1fr; }
.split.detail { grid-template-columns: 1.4fr 1fr; min-height: 100%; }
.split.even { grid-template-columns: 1fr 1fr; min-height: 100%; }
.split > .lead { border-right: 0.5px solid var(--hair); min-width: 0; }
.split > .aside { background: var(--panel); min-width: 0; }
.tick { width: 3px; height: 34px; background: var(--accent); flex-shrink: 0; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 11px 22px; border-top: 1px solid var(--rule); font-size: 13px; }
.kv span:first-child { color: var(--grey-dark); }
.kv span:last-child { font-weight: 700; text-align: right; }
.kv.wide { padding: 12px 26px; font-size: 14px; }
.group-label { padding: 18px 22px 10px; font-size: 13px; font-weight: 600; color: var(--grey); }

/* ── Forms ────────────────────────────────────────── */
.label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 600; color: var(--grey); }
.input, .select, .textarea { width: 100%; height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--fill-soft); font-size: 15px; font-weight: 600; outline: none; }
.select { cursor: pointer; }
.textarea { height: auto; padding: 10px 12px; font-size: 14px; font-weight: 400; resize: vertical; }
.input.sm, .select.sm { height: 38px; border-radius: 11px; font-size: 14px; }
.input.cell-in { width: 78px; height: 34px; padding: 0 9px; border-radius: 10px; text-align: right; font-size: 14px; font-variant-numeric: tabular-nums; }
.input.cell-in.price { background: rgba(201, 154, 46, 0.09); font-weight: 700; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.span2 { grid-column: span 2; }
.error { margin-top: 6px; color: var(--accent-700); font-size: 12px; font-weight: 600; }
.errors { margin: 0 26px 16px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-700); font-size: 13px; font-weight: 600; }
.errors ul { margin: 0; padding-left: 18px; }
.stepper { display: inline-flex; align-items: center; border-radius: 12px; background: var(--fill); overflow: hidden; }
.stepper button { width: 34px; height: 34px; font-size: 17px; font-weight: 700; }
.stepper button:hover { background: var(--fill-soft); }
.stepper button.plus { background: var(--accent); color: #fff; }
.stepper input { width: 56px; height: 34px; border: 0; background: transparent; text-align: center; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; outline: none; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.seg { display: flex; gap: 3px; padding: 3px; border-radius: 12px; background: var(--fill); }
.seg > * { flex: 1; height: 34px; padding: 0 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: var(--grey-dark); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background 0.18s ease; }
.seg > .on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(32, 30, 29, 0.16); }
.seg.hard { gap: 0; padding: 0; overflow: hidden; }
.seg.hard > * { height: 40px; border-radius: 0; border-right: 1px solid var(--rule); color: var(--ink); font-weight: 700; }
.seg.hard > .on { background: var(--accent); color: #fff; box-shadow: none; }
.switch { width: 51px; height: 31px; padding: 2px; border-radius: 999px; background: #bab6b6; display: flex; align-items: center; flex-shrink: 0; cursor: pointer; transition: background 0.2s ease; }
.switch::after { content: ""; width: 27px; height: 27px; border-radius: 999px; background: #fff; box-shadow: 0 2px 5px rgba(32, 30, 29, 0.25); }
.switch.on { background: var(--accent); justify-content: flex-end; }
input.switch-input { position: absolute; opacity: 0; pointer-events: none; }

/* ── Cards (reports, point of sale) ───────────────── */
.card { border-radius: 18px; background: #fff; box-shadow: 0 1px 3px rgba(32, 30, 29, 0.08); }
.card-title { font-size: 18px; font-weight: 700; letter-spacing: -0.022em; }
.cards4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.meter { height: 8px; border-radius: 999px; background: rgba(120, 116, 114, 0.14); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 999px; background: rgba(32, 30, 29, 0.72); }
.meter > i.hot { background: var(--accent); }
.meter.thin { height: 5px; max-width: 200px; background: var(--fill); }
.chart { display: flex; align-items: flex-end; gap: 12px; height: 152px; margin-top: 20px; padding-bottom: 4px; }
.chart-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.chart-amt { font-size: 12px; font-weight: 600; color: var(--grey-dark); white-space: nowrap; }
.chart-bar { width: 100%; border-radius: 8px 8px 0 0; background: rgba(32, 30, 29, 0.82); display: flex; align-items: flex-end; min-height: 2px; }
.chart-bar.peak { background: var(--accent); }
.chart-bar > i { display: block; width: 100%; border-radius: 8px 8px 0 0; background: rgba(201, 154, 46, 0.4); }
.chart-bar.peak > i { background: rgba(255, 255, 255, 0.35); }
.chart-axis { display: flex; gap: 12px; padding-top: 9px; border-top: 1px solid var(--rule); }
.chart-axis > div { flex: 1; min-width: 0; text-align: center; font-size: 12px; font-weight: 600; color: var(--grey); }
.legend { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--grey); }
.legend i { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 3px; }

.pos { display: flex; height: 100%; min-height: 0; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.pos-item { display: block; width: 100%; text-align: left; border-radius: 18px; background: #fff; overflow: hidden; box-shadow: 0 1px 3px rgba(32, 30, 29, 0.08); transition: transform 0.15s ease; }
.pos-item:active { transform: scale(0.98); }
.pos-thumb { height: 96px; background: var(--thumb) center/cover no-repeat; filter: grayscale(1); display: flex; align-items: flex-end; justify-content: space-between; padding: 8px 10px; }
.pos-cart { width: 380px; flex-shrink: 0; display: flex; flex-direction: column; background: var(--panel); }
.cart-line { margin-bottom: 8px; padding: 11px 12px 12px; border-radius: 14px; background: #fff; box-shadow: 0 1px 3px rgba(32, 30, 29, 0.07); }
.qty-btn { width: 34px; height: 32px; border-radius: 10px; background: var(--fill); font-size: 18px; }
.qty-val { width: 42px; height: 32px; border-radius: 10px; background: rgba(120, 116, 114, 0.07); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; }
.charge { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 52px; margin-top: 12px; padding: 0 18px; border-radius: 14px; background: var(--accent); color: #fff; font-size: 16px; font-weight: 600; box-shadow: 0 8px 20px rgba(201, 154, 46, 0.26); transition: transform 0.15s ease; }
.charge:active { transform: scale(0.99); }
.charge[disabled] { background: rgba(120, 116, 114, 0.45); box-shadow: none; cursor: default; }

/* ── Overlays ─────────────────────────────────────── */
.overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(32, 30, 29, 0.5); animation: fadeIn 0.2s ease both; }
.overlay.side-sheet { justify-content: flex-end; align-items: stretch; }
.modal { width: 880px; max-width: calc(100vw - 28px); max-height: 88vh; display: flex; flex-direction: column; border-radius: 22px; background: var(--ground); overflow: hidden; box-shadow: 0 30px 70px rgba(32, 30, 29, 0.34); animation: modalIn 0.26s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.modal.narrow { width: 560px; }
.sheet { width: 470px; max-width: calc(100vw - 28px); margin: 14px; display: flex; flex-direction: column; border-radius: 22px; background: var(--ground); overflow: hidden; box-shadow: 0 24px 60px rgba(32, 30, 29, 0.3); animation: modalIn 0.24s ease both; }
.sheet.scan { width: 440px; }
.o-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px 16px; border-bottom: 0.5px solid var(--hair); }
.o-title { font-size: 20px; font-weight: 700; letter-spacing: -0.025em; }
.o-body { flex: 1; overflow-y: auto; padding: 22px 24px; }
.o-body.flush { padding: 0; }
.o-foot { padding: 16px 24px; border-top: 0.5px solid var(--hair); }
.x { width: 32px; height: 32px; border-radius: 12px; background: var(--fill); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.steps { display: flex; gap: 3px; padding: 0 26px; margin-top: -2px; }
.steps i { flex: 1; height: 3px; border-radius: 999px; background: var(--neutral-300); }
.steps i.on { background: var(--accent); }
.tag-in { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; background: var(--ink); color: #f3f2f2; font-size: 13px; font-weight: 700; }
.tag-in button { color: #bab6b6; font-size: 15px; line-height: 1; }
.tag-add { height: 34px; width: 110px; padding: 0 13px; border: 0; border-radius: 999px; background: var(--fill); font-size: 13px; font-weight: 700; outline: none; }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.photo { aspect-ratio: 1; border-radius: 14px; background: var(--thumb) center/cover no-repeat; filter: grayscale(1); display: flex; align-items: flex-end; padding: 10px; font-size: 11px; font-weight: 700; color: var(--grey-dark); }
.photo.add { background: rgba(201, 154, 46, 0.08); filter: none; flex-direction: column; align-items: flex-start; justify-content: flex-end; cursor: pointer; color: var(--accent-700); font-size: 13px; }
.photo.add:hover { background: var(--accent-100); }
.viewfinder { display: flex; align-items: center; justify-content: center; padding: 26px; background: #171615; }
.viewfinder > div { position: relative; width: 180px; height: 180px; }
.viewfinder b { position: absolute; width: 34px; height: 34px; border: 0 solid var(--accent); }
.viewfinder b:nth-child(1) { top: 0; left: 0; border-top-width: 3px; border-left-width: 3px; }
.viewfinder b:nth-child(2) { top: 0; right: 0; border-top-width: 3px; border-right-width: 3px; }
.viewfinder b:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 3px; border-left-width: 3px; }
.viewfinder b:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 3px; border-right-width: 3px; }
.viewfinder span { position: absolute; inset: 44px; opacity: 0.5; background: repeating-linear-gradient(90deg, #fff 0 6px, transparent 6px 9px, #fff 9px 12px, transparent 12px 18px, #fff 18px 27px, transparent 27px 30px); }
.toast { position: fixed; bottom: 24px; left: 260px; z-index: 70; display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 14px; background: rgba(32, 30, 29, 0.95); color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 14px 34px rgba(32, 30, 29, 0.3); animation: modalIn 0.24s ease both; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--accent); flex-shrink: 0; }

/* ── Sign-in ──────────────────────────────────────── */
.signin { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.signin-brand { display: flex; flex-direction: column; justify-content: space-between; padding: 48px; background: var(--ink); color: #f3f2f2; }
.signin-brand h1 { margin: 0 0 14px; max-width: 12ch; font-size: clamp(34px, 4vw, 54px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; }
.signin-form { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.signin-form form { width: 100%; max-width: 360px; }

/* ── Small screens ────────────────────────────────── */
@media (max-width: 1100px) {
    .kpis, .cards4 { grid-template-columns: 1fr 1fr; }
    .kpi:nth-child(2n) { border-right: 0; }
    .split, .split.detail, .split.even, .rep2 { grid-template-columns: 1fr !important; }
    .split > .lead { border-right: 0; }
    .pos { flex-direction: column; height: auto; }
    .pos-cart { width: 100%; }
    .wide-scroll { overflow-x: auto; }
    .wide-scroll > * { min-width: 860px; }
}
@media (max-width: 820px) {
    .side { position: fixed; top: 0; bottom: 0; left: 0; z-index: 55; transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: 8px 0 24px rgba(32, 30, 29, 0.18); }
    .side.open { transform: none; }
    .menu-btn { display: inline-flex; }
    .head { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px 16px; }
    .head-tools { flex-wrap: wrap; }
    .search { flex: 1; width: auto; min-width: 160px; }
    .title { font-size: 26px; }
    .grid2 { grid-template-columns: 1fr; }
    .span2 { grid-column: auto; }
    .toast { left: 16px; right: 16px; }
    .signin { grid-template-columns: 1fr; }
    .signin-brand { display: none; }
}

/* ── Bordered tables ──────────────────────────────── */
/* Every table (a .thead followed by .trow rows) is drawn as a full grid:
   a line under each row and a line between each column. Cells take over the
   row's padding so the column lines run the full height of the row. */
:root { --grid: #d9d6d4; }
.thead, .thead ~ .trow {
    padding: 0 !important;
    gap: 0 !important;
    align-items: stretch !important;
    border-bottom: 1px solid var(--grid) !important;
    border-top: 0 !important;
}
.thead { border-top: 1px solid var(--grid) !important; }
.thead > *, .thead ~ .trow > * {
    box-sizing: content-box;
    min-width: 0;
    padding: 11px 12px;
    border-right: 1px solid var(--grid);
}
/* Stack and vertically centre cell content, except cells that lay themselves out */
.thead > :not([style*="display: flex"]), .thead ~ .trow > :not([style*="display: flex"]) {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.thead ~ .trow > * > .pill, .thead ~ .trow > * > .btn { align-self: flex-start; }
.thead ~ .trow > .right > .pill, .thead ~ .trow > .right > .btn { align-self: flex-end; }
.thead > :first-child, .thead ~ .trow > :first-child,
.thead ~ .trow > input[type="hidden"]:first-child + * { padding-left: 26px; }
.thead > :last-child, .thead ~ .trow > :last-child { padding-right: 26px; border-right: 0; }
.card .thead > :first-child, .card .thead ~ .trow > :first-child { padding-left: 20px; }
.card .thead > :last-child, .card .thead ~ .trow > :last-child { padding-right: 20px; }
.thead ~ .trow > input[type="hidden"] { display: none; }

/* ── Product edit page: pinned header, section links, main + side columns ── */
.pe { padding: 16px 22px 30px; }
.pe-head { position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 18px; background: #fff; box-shadow: 0 1px 3px rgba(32, 30, 29, 0.1); }
.pe-crumb { font-size: 12px; color: var(--grey); }
.pe-title { display: flex; align-items: center; gap: 8px; margin-top: 2px; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; min-width: 0; }
.pe-title .pill { flex-shrink: 0; }
.pe-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pe-unsaved { font-size: 12px; font-weight: 600; color: var(--accent-700); }
.pe-anchors { position: sticky; top: 70px; z-index: 25; display: flex; gap: 4px; margin: 10px 0 12px; padding: 5px; border-radius: 14px; background: #fff; box-shadow: 0 1px 3px rgba(32, 30, 29, 0.08); overflow-x: auto; scrollbar-width: none; }
.pe-anchors::-webkit-scrollbar { display: none; }
.pe-anchors a { padding: 7px 14px; border-radius: 10px; color: var(--grey-dark); font-size: 13px; font-weight: 600; white-space: nowrap; }
.pe-anchors a:hover { background: var(--fill-soft); }
.pe-anchors a.on { background: var(--ink); color: #f3f2f2; }
.pe-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; align-items: start; }
.pe-main { min-width: 0; }
.pe-side { min-width: 0; position: sticky; top: 128px; }
.pe-card { margin-bottom: 12px; padding: 18px 20px 20px; }
.pe-card-title { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.pe-card-sub { margin: 3px 0 14px; font-size: 13px; color: var(--grey); }
.pe-card-foot { padding: 12px 20px 14px; font-size: 12px; color: var(--grey); }
.pe-side .pe-card-title { margin-bottom: 10px; }
.pe-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13px; }
.pe-row > span:first-child { color: var(--grey-dark); }
.pe-note { margin: 4px 0 12px; font-size: 12px; line-height: 1.5; color: var(--grey); }
.pe-figures { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--grid); }
.pe-figures > div { padding: 12px 20px 14px; border-right: 1px solid var(--grid); min-width: 0; }
.pe-figures > div:last-child { border-right: 0; }
.pe-figures span { display: block; font-size: 12px; font-weight: 600; color: var(--grey); }
.pe-figures strong { display: block; margin-top: 3px; font-size: 22px; font-weight: 700; letter-spacing: -0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pe-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.pe-lens { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(20, 22, 31, 0.7); color: #fff; }
.pe-lens:hover, .pe-lens:focus-visible { background: var(--accent); color: #fff; }
.pe .thead ~ .trow:last-of-type { border-bottom: 0 !important; }
@media (max-width: 1100px) {
    .pe-grid { grid-template-columns: 1fr; }
    .pe-side { position: static; }
    .pe-figures { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
    .pe { padding: 12px; }
    .pe-head { position: static; }
    .pe-anchors { top: 0; }
}

/* ── Products list ────────────────────────────────── */
.pl { padding: 16px 22px 30px; }
.pl-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.pl-stat { display: block; padding: 14px 16px 16px; border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(32, 30, 29, 0.08); min-width: 0; }
.pl-stat span { display: block; font-size: 12px; font-weight: 600; color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-stat strong { display: block; margin-top: 5px; font-size: 26px; font-weight: 700; letter-spacing: -0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.pl-tools .seg > * { padding: 0 14px; }
.pl-table { overflow: visible; }
.pl-table .wide-scroll { border-radius: 18px 18px 0 0; }
.pl-table .thead { border-radius: 18px 18px 0 0; border-top: 0 !important; }
.pl-bulk { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; border-radius: 18px 18px 0 0; background: var(--ink); color: #f3f2f2; font-size: 13px; font-weight: 600; }
.pl-bulk[hidden] + .wide-scroll .thead { border-radius: 18px 18px 0 0; }
.pl-bulk:not([hidden]) + .wide-scroll, .pl-bulk:not([hidden]) + .wide-scroll .thead { border-radius: 0; }
.pl-bulk-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pl-bulk-actions button { height: 32px; padding: 0 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 12px; font-weight: 700; }
.pl-bulk-actions button:hover { background: rgba(255, 255, 255, 0.24); }
.pl-icon { width: 28px; height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; color: var(--grey-dark); cursor: pointer; list-style: none; transition: background 0.15s ease, transform 0.15s ease; }
.pl-icon::-webkit-details-marker { display: none; }
.pl-icon:hover { background: var(--fill); color: var(--ink); }
.pl-icon[aria-expanded="true"] { background: var(--fill); color: var(--ink); }
.pl-icon[aria-expanded="true"] svg { transform: rotate(90deg); }
.pl-menu { position: relative; }
.pl-menu-list { position: absolute; right: 0; top: 32px; z-index: 40; min-width: 190px; padding: 6px; border-radius: 14px; background: #fff; box-shadow: 0 14px 34px rgba(32, 30, 29, 0.2); }
.pl-menu-list a, .pl-menu-list button { display: block; width: 100%; padding: 8px 10px; border-radius: 9px; color: var(--ink); font-size: 13px; font-weight: 600; text-align: left; white-space: nowrap; }
.pl-menu-list a:hover, .pl-menu-list button:hover { background: var(--fill-soft); }
.pl-menu-list .danger { color: var(--accent-700); }
.pl-variants { padding: 8px 20px 16px 76px; background: var(--panel); border-bottom: 1px solid var(--grid); }
.pl-vrow { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) 96px 96px 96px 70px; gap: 12px; align-items: center; padding: 7px 0; border-top: 1px solid var(--rule); font-size: 13px; }
.pl-vrow.head { border-top: 0; font-size: 12px; font-weight: 600; color: var(--grey); }
.pill-plain { background: #f1efee; color: var(--grey-dark); }
@media (max-width: 1100px) {
    .pl-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pl-variants { padding-left: 20px; overflow-x: auto; }
    .pl-vrow { min-width: 620px; }
}
@media (max-width: 820px) {
    .pl { padding: 12px; }
    .pl-stats { grid-template-columns: 1fr 1fr; }
}

/* ── Full-screen register ─────────────────────────── */
.kiosk .side, .kiosk .head { display: none; }
.kiosk .content { display: flex; flex-direction: column; overflow: hidden; }
.kiosk .pos { flex: 1; min-height: 0; height: auto; }
.kiosk .toast { left: 24px; }
.kiosk-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 18px; border-bottom: 0.5px solid var(--hair); background: var(--panel); flex-shrink: 0; }
.kiosk-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.kiosk-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.kiosk-scan { display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--fill); font-size: 13px; font-weight: 600; color: var(--grey-dark); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background 0.2s ease, color 0.2s ease; }
.kiosk-dot { width: 8px; height: 8px; border-radius: 999px; background: #1d9e75; flex-shrink: 0; }
.kiosk-scan.hit { background: var(--ink); color: #f3f2f2; }
.kiosk-scan.miss { background: var(--accent-soft); color: var(--accent-700); }
.kiosk-scan.miss .kiosk-dot { background: var(--accent); }
@media (max-width: 1100px) {
    .kiosk .content { overflow-y: auto; }
    .kiosk-scan { display: none; }
}

.pos-cart .switch::after { width: 22px; height: 22px; }

/* ── Receiving ────────────────────────────────────── */
.rc { padding: 16px 22px 30px; }
.rc-top { display: flex; align-items: stretch; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.rc-top > .btn { align-self: center; }
.rc-stats { flex: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; min-width: 300px; }
.rc-stat { display: block; padding: 10px 14px 12px; border-radius: 16px; background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(32, 30, 29, 0.08); border: 2px solid transparent; min-width: 0; }
.rc-stat span { display: block; font-size: 12px; font-weight: 600; color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-stat strong { display: block; margin-top: 2px; font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.rc-stat.on { border-color: var(--ink); }
.rc-grid { display: grid; grid-template-columns: minmax(280px, 5fr) minmax(0, 9fr); gap: 12px; align-items: start; }
.rc-list { overflow: hidden; }
.rc-po { display: block; padding: 12px 16px 14px; border-top: 1px solid var(--rule); color: var(--ink); transition: background 0.15s ease; }
.rc-po:hover { background: var(--hover); }
.rc-po.on { background: #eae7e7; }
.rc-po-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.rc-po-head strong { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.meter > i.ok { background: #1d9e75; }
.rc-detail { overflow: hidden; min-width: 0; }
.rc-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; flex-wrap: wrap; }
.rc-steps { display: flex; padding: 0 12px 4px; }
.rc-step { flex: 1; position: relative; padding: 18px 4px 8px; border-radius: 10px; color: var(--grey-light); font-size: 12px; font-weight: 600; text-align: center; }
button.rc-step:hover { background: var(--fill-soft); color: var(--ink); }
.rc-step::before { content: ""; position: absolute; top: 5px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 999px; background: var(--neutral-300); z-index: 1; }
.rc-step::after { content: ""; position: absolute; top: 9px; left: -50%; width: 100%; height: 2px; background: var(--neutral-300); }
.rc-step:first-child::after { display: none; }
.rc-step.done { color: var(--grey-dark); }
.rc-step.done::before, .rc-step.done::after, .rc-step.now::after { background: #1d9e75; }
.rc-step.now { color: var(--ink); font-weight: 800; }
.rc-step.now::before { background: var(--accent); box-shadow: 0 0 0 4px rgba(201, 154, 46, 0.18); }
.rc-eta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 20px 14px; font-size: 13px; }
.rc-eta label { font-weight: 600; color: var(--grey); font-size: 12px; }
.rc-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--grid); }
.rc-totals > div { padding: 12px 20px 14px; border-right: 1px solid var(--grid); min-width: 0; }
.rc-totals > div:last-child { border-right: 0; }
.rc-totals span { display: block; font-size: 12px; font-weight: 600; color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-totals strong { display: block; margin-top: 3px; font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.rc-scan { display: flex; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--grid); }
.rc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 20px 16px; }
.rc [data-line].flash { animation: rcFlash 0.7s ease; }
@keyframes rcFlash { from { background: rgba(29, 158, 117, 0.22); } to { background: transparent; } }
.np-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 110px; gap: 12px; align-items: center; padding: 9px 24px; border-bottom: 1px solid var(--rule); font-size: 13px; }
.np-row input { height: 34px; text-align: center; font-weight: 700; }
@media (max-width: 1100px) {
    .rc-grid { grid-template-columns: 1fr; }
    .rc-totals { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
    .rc { padding: 12px; }
    .rc-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ── Stock count ──────────────────────────────────── */
.ct { padding: 16px 22px 30px; }
.ct-top { display: flex; gap: 12px; align-items: stretch; margin-bottom: 12px; flex-wrap: wrap; }
.ct-progress { flex: 1; min-width: 260px; padding: 14px 18px 16px; }
.ct-progress-text { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--grey-dark); }
.ct-actions { display: flex; gap: 8px; align-items: center; }
.ct-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.ct-stats .card { padding: 12px 16px 14px; min-width: 0; }
.ct-stats span { display: block; font-size: 12px; font-weight: 600; color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-stats strong { display: block; margin-top: 3px; font-size: 24px; font-weight: 700; letter-spacing: -0.03em; white-space: nowrap; }
.ct-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.ct-tools .seg > * { padding: 0 14px; }
.ct-tools .seg > .on { background: var(--ink); color: #f3f2f2; box-shadow: none; }
.ct-blind { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ct-blind .switch::after { width: 22px; height: 22px; }
.ct-table { overflow: hidden; }
.ct-table .thead { border-top: 0 !important; }
.ct-mark { width: 20px; height: 20px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: var(--fill); color: var(--grey); font-size: 12px; font-weight: 700; }
[data-count-row].match .ct-mark { background: rgba(29, 158, 117, 0.16); color: #0f6e56; }
[data-count-row].variance .ct-mark { background: var(--accent); color: #fff; }
[data-count-row].variance { background: rgba(201, 154, 46, 0.06); }
[data-count-row].flash { animation: rcFlash 0.7s ease; }
.ct-note { margin-top: 6px; max-width: 360px; height: 32px; font-size: 13px; font-weight: 400; background: #fff; }
.ct-table.blind .ct-exp { visibility: hidden; }
.ct-table.blind [data-count-row].variance { background: transparent; }
.ct-table.blind [data-count-row].variance .ct-mark, .ct-table.blind [data-count-row].match .ct-mark { background: var(--ink); color: #f3f2f2; }
.ct-table.blind .ct-note { display: none; }
.ct-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 20px 14px; font-size: 13px; color: var(--grey); border-top: 1px solid var(--grid); }
.ct-start { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; align-items: start; }
.stepper[data-blank] input::placeholder { color: var(--grey-light); }
@media (max-width: 1100px) { .ct-start { grid-template-columns: 1fr; } .ct-stats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 820px) { .ct { padding: 12px; } }

/* ── Suppliers ────────────────────────────────────── */
.sp-row { display: flex !important; align-items: center; gap: 12px; }
.sp-avatar { width: 38px; height: 38px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.sp-avatar.lg { width: 50px; height: 50px; font-size: 17px; }
.sp-contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--grid); }
.sp-contact > div { padding: 12px 20px; border-bottom: 1px solid var(--rule); min-width: 0; }
.sp-contact > div:nth-child(odd) { border-right: 1px solid var(--rule); }
.sp-contact span { display: block; font-size: 12px; font-weight: 600; color: var(--grey); }
.sp-contact strong, .sp-contact a { display: block; margin-top: 2px; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-tabs { display: flex; gap: 4px; padding: 12px 16px; }
.sp-tabs button { height: 34px; padding: 0 14px; border-radius: 10px; color: var(--grey-dark); font-size: 13px; font-weight: 600; }
.sp-tabs button:hover { background: var(--fill-soft); }
.sp-tabs button.on { background: var(--ink); color: #f3f2f2; }
@media (max-width: 820px) { .sp-contact { grid-template-columns: 1fr; } .sp-contact > div:nth-child(odd) { border-right: 0; } }

/* ── Settings ─────────────────────────────────────── */
.st-grid { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 12px; }
.st-nav { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 2px; }
.st-nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 10px; color: var(--grey-dark); font-size: 14px; font-weight: 600; }
.st-nav a:hover { background: var(--fill-soft); }
.st-nav a.on { background: #fff; color: var(--ink); font-weight: 800; box-shadow: 0 1px 3px rgba(32, 30, 29, 0.08); }
.st-nav a span { font-size: 11px; font-weight: 700; color: var(--grey); }
.st-store { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 20px; align-items: start; }
.st-receipt { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 14px 12px; border-radius: 12px; background: var(--fill-soft); font-family: 'Courier New', ui-monospace, monospace; font-size: 11px; line-height: 1.45; text-align: center; overflow-wrap: anywhere; }
.st-receipt > i { width: 100%; margin: 6px 0; border-top: 1px dashed var(--grey-light); }
.st-rline { display: flex; justify-content: space-between; gap: 8px; width: 100%; }
.st-four { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.st-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--rule); cursor: default; }
label.st-row { cursor: pointer; }
.st-row strong { display: block; font-size: 14px; font-weight: 700; }
.st-row small { display: block; margin-top: 2px; font-size: 12px; color: var(--grey); }
.st-person { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-top: 1px solid var(--rule); }
.st-person.off .avatar { background: var(--neutral-300); color: var(--grey-dark); }
.st-person.off .strong { color: var(--grey); }
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.st-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 13px; border-radius: 999px; background: var(--fill); font-size: 13px; font-weight: 600; }
.st-chip small { font-size: 11px; font-weight: 700; color: var(--grey); }
.st-chip form { display: flex; }
.st-chip button { width: 22px; height: 22px; border-radius: 999px; color: var(--grey-dark); font-size: 15px; line-height: 1; }
.st-chip button:hover { background: var(--accent); color: #fff; }
.st-chip > small:last-child { margin-right: 7px; }
.st-add { display: flex; gap: 8px; margin-top: 14px; max-width: 420px; }
.st-notice { display: flex; flex-direction: column; gap: 3px; margin-top: 12px; padding: 14px 18px; border-radius: 16px; background: var(--ink); color: #f3f2f2; font-size: 13px; }
.st-notice strong { font-size: 14px; }
.st-notice code { padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.16); font-size: 14px; font-weight: 700; letter-spacing: 0.04em; }
@media (max-width: 1100px) {
    .st-grid { grid-template-columns: 1fr; }
    .st-nav { position: static; flex-direction: row; flex-wrap: wrap; }
    .st-store { grid-template-columns: 1fr; }
    .st-four { grid-template-columns: 1fr 1fr; }
}

/* ── Category picker (catalogue categories and subcategories) ── */
.cp { min-width: 0; }
.cp-current { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--fill-soft); }
.cp-label { min-width: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.cp-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.cp-panel { margin-top: 8px; padding: 10px; border-radius: 14px; background: var(--fill-soft); }
.cp-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 8px 2px 6px; font-size: 12px; color: var(--grey); min-height: 18px; }
.cp-crumbs button { color: var(--accent-700); font-size: 12px; font-weight: 600; }
.cp-crumbs b { color: var(--ink); font-weight: 700; }
.cp-list { max-height: 230px; overflow-y: auto; border-radius: 10px; background: #fff; }
.cp-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 12px; border-bottom: 1px solid var(--rule); font-size: 13px; text-align: left; }
.cp-item:last-child { border-bottom: 0; }
.cp-item:hover, .cp-item:focus-visible { background: var(--hover); }
.cp-item strong { display: block; font-weight: 600; }
.cp-item small { display: block; margin-top: 1px; color: var(--grey); font-size: 11px; }
.cp-item .cp-more { color: var(--grey); font-size: 15px; flex-shrink: 0; }
.cp-empty { padding: 18px 12px; text-align: center; font-size: 13px; color: var(--grey); }
.cp-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; min-height: 34px; }
.st-cats { border-top: 1px solid var(--rule); }
.st-cat { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.st-cat-add { margin-top: 16px; max-width: 520px; }

/* ── New product dialog: steps, form, live summary ── */
.modal.np { width: 1320px; height: 94vh; max-height: 94vh; }
.np-grid { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.np-steps { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px; padding: 10px 24px; border-bottom: 0.5px solid var(--hair); }
.np-step { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; text-align: left; color: var(--ink); background: var(--fill-soft); }
.np-step:hover { background: var(--fill-soft); }
.np-step.on { background: #fff; box-shadow: 0 1px 3px rgba(32, 30, 29, 0.1); }
.np-step strong { display: block; font-size: 13px; font-weight: 700; }
.np-step small { display: none; }
.np-step-n { width: 24px; height: 24px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: var(--fill); color: var(--grey-dark); font-size: 12px; font-weight: 700; flex-shrink: 0; }
.np-step.on .np-step-n { background: var(--accent); color: #fff; }
.np-step.done .np-step-n { background: rgba(29, 158, 117, 0.18); color: #0f6e56; }
.np-body { flex: 1; min-height: 0; min-width: 0; overflow-y: auto; padding: 20px 24px 24px; }
.np-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: start; }
.np-col-photo { min-width: 0; padding: 14px; border-radius: 16px; background: var(--panel); }
.np-col-form { min-width: 0; }
.np-phead2 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; font-size: 13px; } .np-phead2 span { font-size: 12px; color: var(--grey-dark); }
.np-pgrid { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
@media (max-width: 900px) { .np-cols { grid-template-columns: minmax(0, 1fr); } }
.np-top { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; align-items: start; }
.np-photo { width: 92px; height: 92px; aspect-ratio: auto; padding: 10px; align-items: center; justify-content: center; text-align: center; }
.np-thumbs { display: contents; }
.np-thumbs:empty { display: none; }
.np-thumbs .photo { width: 92px; height: 92px; aspect-ratio: auto; border-radius: 12px; padding: 0; font-size: 0; filter: none; }
.np-thumbs .photo:first-child { width: 192px; height: 192px; box-shadow: inset 0 0 0 2px var(--accent); }
.np-find { margin-top: 16px; display: grid; gap: 10px; }
.np-find .btn:disabled { opacity: 0.5; cursor: default; }
.np-find-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.np-find-link { display: flex; gap: 8px; min-width: 0; } .np-find-link .input { flex: 1; min-width: 0; height: 40px; }
.np-find .np-hint { margin: 0; } .np-find .np-hint.bad { color: var(--accent-700); font-weight: 600; } .np-find .np-hint.good { color: var(--ink); font-weight: 600; }
.np-sort { display: flex; gap: 6px; flex-wrap: wrap; }
.np-chip { padding: 5px 11px; border-radius: 999px; background: var(--fill); color: var(--ink); font-size: 12px; font-weight: 600; cursor: pointer; } .np-chip.on { background: var(--accent); color: #fff; }
.np-results { display: grid; gap: 10px; }
.np-guess { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--fill); font-size: 13px; }
.np-guess .btn, .np-rc .btn { height: 30px; padding: 0 11px; font-size: 12px; }
.np-rc { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; padding: 10px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--hair); }
.np-rc.sel { box-shadow: 0 0 0 2px var(--accent); }
.np-rc-main { position: relative; aspect-ratio: 1; border-radius: 10px; background: var(--fill) center/cover no-repeat; }
.np-rc-badge { position: absolute; left: 5px; top: 5px; padding: 1px 7px; border-radius: 999px; background: #e6f4ea; color: #1e7a3c; font-size: 10px; font-weight: 700; }
.np-rc-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; margin-top: 3px; } .np-rc-thumbs span { aspect-ratio: 1; border-radius: 5px; background: var(--fill) center/cover no-repeat; }
.np-rc-count { margin-top: 4px; font-size: 11px; color: var(--grey-dark); }
.np-rc-title { font-size: 13px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.np-rc-site { margin: 1px 0 6px; font-size: 12px; color: var(--grey-dark); overflow-wrap: anywhere; } .np-rc-site a { color: var(--accent-700); font-weight: 600; }
.np-rc-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; font-size: 12px; color: var(--grey-dark); } .np-rc-price b { font-size: 16px; color: var(--ink); } .np-rc-price .ok { color: #1e7a3c; font-weight: 600; } .np-rc-price .no { color: var(--accent-700); font-weight: 600; }
.np-rc-row { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 6px 0; border-top: 1px solid var(--rule); font-size: 12px; }
.np-rc-row > span:first-child { color: var(--grey-dark); } .np-rc-row .v { min-width: 0; overflow-wrap: anywhere; } .np-rc-row .clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.np-rc-cat { display: inline-block; margin: 0 4px 4px 0; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-700); font-size: 11px; font-weight: 600; text-align: left; cursor: pointer; } .np-rc-cat:hover, .np-rc-cat:focus-visible { background: var(--accent); color: #fff; }
.np-rc-opt { display: inline-block; margin: 0 4px 3px 0; padding: 1px 8px; border-radius: 999px; background: var(--fill); font-size: 11px; }
.np-rc-dupe { margin: 0 0 6px; padding: 6px 9px; border-radius: 9px; background: #fff4e0; color: #8a5300; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; } .np-rc-dupe a { color: #8a5300; font-weight: 700; text-decoration: underline; }
.np-rc-facts > span { display: block; margin-bottom: 2px; } .np-rc-facts b { font-weight: 600; color: var(--grey-dark); } .np-rc-row .clamp1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-rc-miss { margin-top: 6px; font-size: 11px; color: var(--grey); }
.np-rc-foot { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.np-rc-plain { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--hair); font-size: 12px; }
.np-rc-plain .np-rc-main { width: 44px; } .np-rc-plain b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .np-rc-plain small { display: block; color: var(--grey-dark); }
.np-rc-wait { padding: 14px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--hair); font-size: 12px; color: var(--grey-dark); }
@media (max-width: 720px) { .np-find { grid-template-columns: minmax(0, 1fr); } }
.np-hint { margin: 5px 0 0; font-size: 12px; color: var(--grey); }
.np-hint.live { color: var(--accent-700); font-weight: 600; }
.np-lead { margin: 0 0 18px; font-size: 13px; line-height: 1.5; color: var(--grey-dark); }
.np-affix { position: relative; }
.np-affix .input { padding-right: 92px; }
.np-tag { position: absolute; right: 10px; top: 13px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-700); font-size: 11px; font-weight: 700; }
.np-row { display: flex; gap: 6px; }
.np-row .input { flex: 1; min-width: 0; }
.np-icon { width: 44px; height: 44px; padding: 0; flex-shrink: 0; }
.np-icon.live { background: var(--accent); color: #fff; }
.np-summary { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px 24px; border-top: 0.5px solid var(--hair); background: var(--panel); min-width: 0; font-size: 12px; }
.np-summary > .label, .np-summary .np-nudge { display: none; }
.np-summary [data-sum-name] { font-size: 13px !important; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-summary [data-sum-sub] { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-sum-photo { width: 34px; height: 34px; flex-shrink: 0; font-size: 12px !important; border-radius: 9px; background: var(--thumb) center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--grey); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.np-sum-rows { display: flex; gap: 14px; flex-wrap: wrap; margin-left: auto; }
.np-sum-rows > div { display: flex; gap: 6px; font-size: 12px; }
.np-sum-rows span { color: var(--grey-dark); }
.np-sum-rows strong { font-weight: 700; text-align: right; }
.np-sum-rows strong.todo { color: var(--grey-light); font-weight: 600; }
.np-nudge { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-700); font-size: 12px; font-weight: 600; line-height: 1.4; }
.np-review { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
.np-review > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.np-review span { color: var(--grey-dark); }
.np-review strong { text-align: right; overflow-wrap: anywhere; }
@media (max-width: 1100px) {
    .np-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
    .np-steps { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 0.5px solid var(--hair); padding: 10px; }
    .np-step small { display: none; }
    .np-summary { display: none; }
}
@media (max-width: 820px) { .np-review { grid-template-columns: 1fr; } .np-top { grid-template-columns: 72px minmax(0, 1fr); } .np-photo { width: 72px; height: 72px; } }

/* New product dialog: one price row per variant */
.np-prow { display: grid; grid-template-columns: minmax(90px, 1fr) repeat(3, minmax(0, 118px)) 62px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.np-phead { margin-top: 6px; padding: 9px 0; border-bottom: 0.5px solid var(--hair); font-size: 11px; font-weight: 700; color: var(--grey-dark); }
.np-prow .input { width: 100%; height: 36px; text-align: right; font-weight: 700; font-size: 13px; }
.np-pvar { font-weight: 700; overflow-wrap: anywhere; }
.np-rtable { margin-top: 18px; }
.np-rtable .np-prow { grid-template-columns: minmax(90px, 1fr) repeat(3, minmax(0, 118px)) 62px; font-size: 13px; }
.np-rtable .np-prow > div:not(:first-child) { text-align: right; }

/* Variant image: a small square that opens the file chooser */
.np-vphoto { position: relative; width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; border: 1.5px dashed var(--neutral-300); background: var(--fill-soft) center/cover no-repeat; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 18px; font-weight: 600; overflow: hidden; }
.np-vphoto::before { content: '+'; }
.np-vphoto.has { border: 1px solid var(--hair); }
.np-vphoto.has::before { content: ''; }
.np-vphoto:hover { border-color: var(--accent); }

/* Register: variant picture in the variant chooser and on each sale line */
.pos-vthumb { flex-shrink: 0; border-radius: 10px; background: var(--thumb) center/cover no-repeat; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--grey); }

/* ── Overview: sales first, then what needs doing ── */
.db { padding: 20px 26px 30px; }
.db-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-bottom: 16px; }
.db-actions .btn { height: 40px; padding: 0 16px; display: inline-flex; align-items: center; font-weight: 600; }
.db-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.db-kpi { padding: 16px 18px 17px; border-radius: 16px; background: var(--fill); min-width: 0; }
.db-kpi span { display: block; font-size: 13px; font-weight: 600; color: var(--grey-dark); }
.db-kpi strong { display: block; margin-top: 6px; font-size: 28px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.db-kpi small { display: block; margin-top: 6px; font-size: 12px; color: var(--grey-dark); }
.db-kpi small.up { color: #0f6e56; font-weight: 600; }
.db-kpi small.down { color: var(--accent-700); font-weight: 600; }
.db-row { display: grid; gap: 14px; margin-bottom: 14px; }
.db-row.wide { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.db-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.db-card { padding: 16px 18px 8px; border: 1px solid var(--rule); border-radius: 16px; background: #fff; min-width: 0; }
.db-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: 15px; font-weight: 700; letter-spacing: -0.015em; }
.db-head em { font-style: normal; font-size: 12px; font-weight: 500; color: var(--grey-dark); }
.db-head .link { font-size: 12px; font-weight: 600; }
.db-chart { display: flex; align-items: flex-end; gap: 12px; height: 190px; padding-bottom: 10px; }
.db-bar { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; font-size: 12px; color: var(--grey-dark); }
.db-bar b { font-size: 11px; font-weight: 600; color: var(--grey); white-space: nowrap; }
.db-bar i { display: block; width: 100%; max-width: 64px; border-radius: 6px 6px 0 0; background: var(--neutral-300); }
.db-bar.on { color: var(--ink); font-weight: 700; }
.db-bar.on i { background: var(--accent); }
.db-bar.on b { color: var(--ink); }
.db-line { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); color: inherit; font-size: 13px; min-width: 0; }
a.db-line:hover strong { color: var(--accent-700); }
.db-line .grow { min-width: 0; }
.db-line .grow strong { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-line .grow small { display: block; margin-top: 1px; font-size: 12px; color: var(--grey-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-line svg { flex-shrink: 0; color: var(--grey-dark); }
.db-line svg.urgent { color: var(--accent); }
.db-go { color: var(--grey-light); }
.db-thumb { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; background: var(--thumb) center/cover no-repeat; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--grey); }
.db-warn { background: #faeeda; color: #854f0b; }
.db-empty { padding: 22px 0 24px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--grey-dark); }
.db-empty strong { display: block; margin-bottom: 2px; font-size: 14px; color: var(--ink); }
@media (max-width: 1100px) { .db-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .db-row.wide, .db-row.three { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 620px) { .db { padding: 14px; } .db-kpis { grid-template-columns: minmax(0, 1fr); } .db-actions { justify-content: stretch; } .db-actions .btn { flex: 1; justify-content: center; } }

/* Description editor (textarea[data-rich]) */
.rich { border: 1px solid var(--line, #dcdfe6); border-radius: 10px; background: #fff; overflow: hidden; }
.rich-bar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px; border-bottom: 1px solid var(--line, #dcdfe6); background: #f7f8fa; }
.rich-tool { min-width: 32px; height: 30px; padding: 0 9px; border: 1px solid transparent; border-radius: 6px; background: none; font-size: 13px; color: inherit; cursor: pointer; }
.rich-tool:hover, .rich-tool.on { background: #fff; border-color: var(--line, #dcdfe6); }
.rich-count { margin-left: auto; font-size: 11px; color: var(--grey, #6b7083); padding-right: 4px; } .rich-count.bad { color: #b3261e; font-weight: 600; }
.rich-view { min-height: 110px; max-height: 420px; overflow-y: auto; padding: 10px 12px; font-size: 14px; line-height: 1.5; outline: none; }
.rich-view:empty::before { content: attr(data-placeholder); color: var(--grey, #6b7083); }
.rich-view:focus { box-shadow: inset 0 0 0 2px rgba(83, 74, 183, .25); }
.rich-view img { max-width: 100%; height: auto; border-radius: 6px; } .rich-view ul { margin: 6px 0; padding-left: 20px; } .rich-view p { margin: 0 0 8px; } .rich-view h4 { margin: 12px 0 6px; font-size: 15px; }
.rich-source { display: block; width: 100%; border: 0; border-radius: 0; min-height: 160px; font-family: ui-monospace, monospace; font-size: 12px; }
.rich-source[hidden] { display: none; }

/* New product, one page: photo pane on the left, the form in sections on the right */
.np-body.np-one { display: grid; grid-template-columns: 340px minmax(0, 1fr); padding: 0; overflow: hidden; }
.np-side { min-width: 0; overflow-y: auto; padding: 18px; background: var(--panel); border-right: 0.5px solid var(--hair); }
.np-side .np-col-photo { padding: 0; background: none; border-radius: 0; }
.np-main { min-width: 0; overflow-y: auto; padding: 0 24px 24px; }
.np-sec { padding: 20px 0; border-top: 0.5px solid var(--hair); }
.np-main > .np-sec:first-of-type { border-top: 0; }
.np-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.np-sec-tag { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--fill); color: var(--grey-dark); letter-spacing: 0; }
.np-sec-tag:empty { display: none; }
.np-sec-tag.ok { background: rgba(29, 158, 117, 0.16); color: #0f6e56; }
.np-sec-tag.todo { background: #faeeda; color: #633806; }
.np-amazon-price { margin: -6px 0 12px; }
.np-ready { font-size: 13px; color: var(--grey-dark); min-width: 0; }
.np-ready strong { color: var(--ink); } .np-ready strong.ok { color: #0f6e56; }
.np-am-tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.np-am-list { display: grid; gap: 2px; }
.np-am-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border-radius: 10px; text-align: left; color: var(--ink); }
.np-am-row:hover { background: var(--fill-soft); }
.np-am-row.on { background: var(--accent-100); box-shadow: 0 0 0 1px var(--accent-soft); }
.np-am-pic { flex: none; width: 40px; height: 50px; border-radius: 6px; background: #fff center / contain no-repeat; box-shadow: 0 0 0 1px var(--hair); }
.np-am-text { min-width: 0; display: grid; gap: 1px; }
.np-am-text b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-am-row.on .np-am-text b { font-weight: 700; }
.np-am-text small { font-size: 12px; color: var(--grey-dark); }
.np-am-more { justify-self: center; font-size: 13px; }
.np-am-fill { width: 100%; justify-content: center; position: sticky; bottom: 0; z-index: 1; box-shadow: 0 -10px 0 var(--panel), 0 8px 0 var(--panel); }
.np-am-go { margin-left: auto; padding-left: 6px; font-size: 20px; color: var(--grey-light); }
.np-am-detail { display: grid; gap: 10px; min-width: 0; }
.np-am-back { justify-self: start; font-size: 13px; font-weight: 600; }
.np-am-big { width: 100%; aspect-ratio: 1 / 1; border-radius: 14px; background: #fff center / contain no-repeat; box-shadow: 0 0 0 1px var(--hair); }
.np-am-thumbs { display: flex; gap: 6px; overflow-x: auto; padding: 2px; }
.np-am-thumb { flex: none; width: 46px; height: 56px; border-radius: 8px; background: #fff center / contain no-repeat; box-shadow: 0 0 0 1px var(--hair); }
.np-am-thumb.on { box-shadow: 0 0 0 2px var(--accent); }
.np-am-name { font-size: 15px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.np-am-facts { display: grid; gap: 0; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--hair); overflow: hidden; }
.np-am-fact { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 8px 12px; font-size: 13px; border-top: 0.5px solid var(--hair); }
.np-am-fact:first-child { border-top: 0; }
.np-am-fact span { color: var(--grey-dark); } .np-am-fact strong { font-weight: 600; overflow-wrap: anywhere; }
.np-am-label { font-size: 12px; font-weight: 700; color: var(--grey-dark); margin-top: 4px; }
.np-am-desc { max-height: 320px; overflow-y: auto; padding: 10px 12px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--hair); font-size: 13px; line-height: 1.5; }
.np-am-desc.muted { color: var(--grey-dark); }
.np-am-desc img { max-width: 100%; height: auto; border-radius: 6px; } .np-am-desc ul { margin: 0 0 8px; padding-left: 18px; } .np-am-desc p { margin: 0 0 8px; } .np-am-desc h4 { margin: 10px 0 6px; font-size: 14px; }
/* the window's own buttons only matter while the window is shown */
.np-side .ab:has(#ab-view[hidden]) #ab-back, .np-side .ab:has(#ab-view[hidden]) #ab-home { display: none; }
.np-side #ab-toggle { padding: 4px 10px; font-size: 12px; }
/* in the narrow pane the Amazon window only needs its status and its show/hide button */
.np-side .ab-card { padding: 0; border: 0; margin: 0; background: none; }
.np-side #ab-choose, .np-side #ab-cover, .np-side #ab-thumb { display: none !important; }
.np-side .ab-bar { margin-bottom: 6px; }
@media (max-width: 900px) {
    .np-body.np-one { display: block; overflow-y: auto; }
    .np-side, .np-main { overflow: visible; }
    .np-side { border-right: 0; border-bottom: 0.5px solid var(--hair); }
}

/* New product fills the whole screen */
.overlay[data-overlay="product-form"] { padding: 0; }
.modal.np { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; margin: 0; }
.np-body.np-one { grid-template-columns: 380px minmax(0, 1fr); }
.np-main > * { max-width: 1100px; margin-left: auto; margin-right: auto; }

/* An opened Amazon match: a panel on the right edge of the New product page, over the dimmed form */
.np-body.np-one { position: relative; }
.np-am-scrim { position: absolute; top: 0; bottom: 0; left: 380px; right: 0; z-index: 4; background: rgba(32, 30, 29, 0.32); animation: fadeIn 0.15s ease both; }
.np-am-sheet { position: absolute; top: 0; right: 0; bottom: 0; z-index: 5; width: 460px; max-width: 100%; display: flex; flex-direction: column; background: var(--ground); border-left: 0.5px solid var(--hair); box-shadow: -18px 0 40px rgba(32, 30, 29, 0.18); }
.np-am-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-bottom: 0.5px solid var(--hair); font-size: 13px; color: var(--grey-dark); }
.np-am-nav { display: flex; gap: 6px; }
.np-am-icon { width: 34px; height: 32px; padding: 0; justify-content: center; font-size: 14px; }
.np-am-icon:disabled { opacity: 0.4; cursor: default; }
.np-am-sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; gap: 10px; align-content: start; }
.np-am-sheet .np-am-big { aspect-ratio: auto; height: 280px; }
.np-am-sheet .np-am-thumbs { overflow-y: hidden; }
.np-am-brand { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--grey-dark); }
.np-am-brand em { font-style: normal; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: rgba(29, 158, 117, 0.16); color: #0f6e56; }
.np-am-price { display: flex; align-items: baseline; gap: 10px; } .np-am-price strong { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; } .np-am-price span { font-size: 13px; color: var(--grey-dark); }
.np-am-tabbar { display: flex; gap: 18px; border-bottom: 0.5px solid var(--hair); }
.np-am-tab { padding: 8px 0; font-size: 14px; font-weight: 600; color: var(--grey-dark); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.np-am-tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.np-am-cats { display: flex; flex-wrap: wrap; gap: 4px; }
.np-am-sheet .np-am-desc { max-height: none; }
.np-am-sheet-foot { display: grid; gap: 10px; padding: 12px 16px 14px; border-top: 0.5px solid var(--hair); background: var(--panel); }
.np-am-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; font-size: 13px; }
.np-am-checks label { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.np-am-sheet-foot .np-am-fill { position: static; box-shadow: none; }
.np-am-out { justify-self: center; font-size: 13px; font-weight: 600; color: var(--accent-700); }
@media (max-width: 900px) { .np-am-scrim { left: 0; position: fixed; } .np-am-sheet { position: fixed; width: 100%; } }

/* New product, full page: top bar, three columns (photo and Amazon · form cards · app preview and checklist) */
.np-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; background: #fff; border-bottom: 0.5px solid var(--hair); }
.np-top-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.np-top-title { font-size: 19px; font-weight: 700; letter-spacing: -0.03em; }
.np-top-r { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.np-jump { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.np-jump-b { padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--grey-dark); }
.np-jump-b:hover { background: var(--fill-soft); }
.np-jump-b.on { background: var(--accent-100); color: var(--accent-700); }
.np-body.np-one { grid-template-columns: 340px minmax(0, 1fr) 300px; background: var(--ground); }
.np-side { background: var(--ground); border-right: 0; padding: 16px 0 16px 20px; }
.np-side .np-col-photo { background: #fff; border-radius: 16px; box-shadow: 0 0 0 1px var(--hair); padding: 16px; }
.np-main { padding: 16px 20px 28px; }
.np-right { min-width: 0; overflow-y: auto; padding: 16px 20px 16px 0; }
.np-card { background: #fff; border-radius: 16px; box-shadow: 0 0 0 1px var(--hair); padding: 18px 20px; margin-bottom: 14px; }
.np-sec.np-card { border-top: 0; padding: 18px 20px; scroll-margin-top: 12px; }
.np-am-row.on { background: var(--accent-100); }
.np-am-fill { box-shadow: none; }
.np-am-scrim { left: 0; }
.np-desc.is-short .rich-view { max-height: 170px; }
.np-desc-more { display: block; margin: 8px auto 0; font-size: 13px; font-weight: 600; }
.np-desc-more[hidden] { display: none; }
.np-app .np-summary { display: block; padding: 0; border: 0; background: none; font-size: 13px; }
.np-app .np-summary > .label { display: none; }
.np-app .np-sum-photo { width: 100%; height: 190px; border-radius: 12px; margin-bottom: 10px; font-size: 26px !important; background-size: contain; background-color: var(--fill-soft); }
.np-app .np-summary [data-sum-name] { font-size: 14px !important; max-width: none; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
.np-app .np-summary [data-sum-sub] { max-width: none; margin-top: 2px; }
.np-app .np-sum-rows { display: grid; gap: 0; margin: 10px 0 0; border-top: 0.5px solid var(--hair); }
.np-app .np-sum-rows > div { justify-content: space-between; padding: 7px 0; border-bottom: 0.5px solid var(--hair); font-size: 13px; }
.np-app .np-sum-rows > div:last-child { border-bottom: 0; }
.np-app .np-summary .np-nudge { display: block; margin-top: 10px; }
.np-app .np-summary .np-nudge[hidden] { display: none; }
.np-checklist { display: grid; gap: 2px; }
.np-check { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 13px; color: var(--grey-dark); }
.np-check i { width: 18px; height: 18px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--neutral-300); display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.np-check.ok { color: var(--ink); } .np-check.ok i { background: rgba(29, 158, 117, 0.18); box-shadow: none; color: #0f6e56; }
.np-check.need { color: #8a5300; font-weight: 600; } .np-check.need i { box-shadow: inset 0 0 0 1.5px #d9a441; }
.np-check small { margin-left: auto; font-size: 11px; color: var(--grey-light); }
@media (max-width: 1200px) {
    .np-body.np-one { grid-template-columns: 320px minmax(0, 1fr); overflow-y: auto; align-items: start; }
    .np-side, .np-main, .np-right { overflow: visible; }
    .np-right { grid-column: 2; padding: 0 20px 20px; }
    .np-am-scrim { position: fixed; } .np-am-sheet { position: fixed; }
    .np-jump { display: none; }
}
@media (max-width: 900px) {
    .np-body.np-one { display: block; }
    .np-side { padding: 16px 16px 0; } .np-right { padding: 0 16px 20px; } .np-main { padding: 16px; }
    .np-top { padding: 10px 14px; } .np-top .muted { display: none; }
}

/* Options and variants, easy entry: chips for sizes and colours, one grid for the quantities */
.np-easy { display: grid; gap: 18px; }
.np-easy-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.np-easy-head strong { font-size: 14px; font-weight: 700; } .np-easy-head span { font-size: 12px; color: var(--grey-dark); }
.np-easy-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.np-easy-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 15px; border-radius: 999px; background: var(--fill); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.np-easy-chip:hover { background: var(--neutral-300); }
.np-easy-chip.on { background: var(--accent); color: #fff; }
.np-easy-chip i { width: 14px; height: 14px; border-radius: 999px; box-shadow: 0 0 0 1px rgba(32, 30, 29, 0.25); flex-shrink: 0; }
.np-easy-chip.on i { box-shadow: 0 0 0 1.5px #fff; }
.np-easy-none { font-size: 13px; color: var(--grey-dark); padding: 8px 0; }
.np-easy-more { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.np-easy-more .tag-in { display: none; }
.np-easy-sets { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--grey-dark); }
.np-easy-set { padding: 5px 11px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--neutral-300); font-size: 12px; font-weight: 600; color: var(--grey-dark); }
.np-easy-set:hover { color: var(--ink); } .np-easy-set.on { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent-700); }
.np-easy-type { flex: 1; min-width: 200px; width: auto; border-radius: 10px; font-weight: 500; }
.np-easy-all { display: inline-flex; align-items: center; gap: 8px; }
.np-easy-all .input { width: 76px; height: 34px; text-align: center; font-weight: 700; }
.np-easy-all .btn { height: 34px; padding: 0 14px; font-size: 13px; }
.np-easy-gridwrap { overflow-x: auto; }
.np-easy-grid { border-collapse: separate; border-spacing: 6px 6px; margin: 0 -6px; }
.np-easy-grid th { font-size: 12px; font-weight: 700; color: var(--grey-dark); text-align: center; white-space: nowrap; padding: 0 4px; }
.np-easy-grid th[scope="row"] { text-align: left; font-size: 13px; color: var(--ink); padding-right: 12px; }
.np-easy-grid td { padding: 0; }
.np-easy-grid .input { width: 78px; height: 38px; text-align: center; font-weight: 700; }
.np-easy-foot { margin-top: 8px; font-size: 13px; color: var(--grey-dark); }
.np-easy-adv { border-top: 0.5px solid var(--hair); padding-top: 12px; }
.np-easy-adv summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--accent-700); }

.np-easy-rowhead { display: flex; align-items: center; gap: 10px; }
.np-easy-photo { margin-top: 10px; }
.np-easy-photo.done { background: rgba(29, 158, 117, 0.14); color: #0f6e56; }
.np-easy-photo[hidden] { display: none; }

button.np-vphoto { padding: 0; } .np-vphoto.open { border: 2px solid var(--accent); }
.np-easy-media { margin-top: 10px; padding: 12px; border-radius: 14px; background: var(--panel); box-shadow: 0 0 0 1px var(--hair); display: grid; gap: 10px; }
.np-easy-media[hidden] { display: none; }
.np-easy-media-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.np-easy-media-head span { display: flex; gap: 14px; } .np-easy-media-head .link { font-size: 13px; font-weight: 600; }
.np-easy-tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.np-easy-tile { width: 76px; height: 92px; border-radius: 10px; background: #fff center / cover no-repeat; box-shadow: 0 0 0 1px var(--hair); cursor: pointer; }
.np-easy-tile:hover { box-shadow: 0 0 0 2px var(--accent); }
.np-easy-upload { display: flex; align-items: center; justify-content: center; background: var(--accent-100); color: var(--accent-700); font-size: 12px; font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--accent-soft); }

/* Brand: the gold of the logo marks what is selected; the mark itself replaces the old icon */
.side-mark img { width: 100%; height: 100%; object-fit: contain; }
:root { --brand-gold: #C99A2E; }
.side-nav a.on, .side-nav a.active { box-shadow: inset 3px 0 0 var(--brand-gold); }
*:focus-visible { outline-color: var(--brand-gold); }
