#main { padding: 18px 18px 60px; }
.page { max-width: 1200px; margin: 0 auto; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.head h1 { margin: 0; }
.filters { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.filters label { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.filters input, .filters select { min-height: 36px; padding: 6px 9px; width: auto; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kpi .v { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cols3 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 8px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; height: 100%; justify-content: flex-end; }
.bars .fill { width: 100%; background: var(--ink); border-radius: 4px 4px 0 0; min-height: 2px; }
.bars .b.today .fill { background: #65a30d; }
.bars .lab { font-size: 11px; color: var(--muted); white-space: nowrap; }
.bars .val { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.tablewrap { overflow-x: auto; }
tr.click { cursor: pointer; } tr.click:hover td { background: #f9fafb; }
tr.cx td { color: var(--muted); }
.tabs2 { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs2 button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 12px; cursor: pointer; font-weight: 600; font-size: 13px; }
.tabs2 button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.dl { display: grid; grid-template-columns: 160px 1fr; gap: 6px 12px; font-size: 14px; }
.dl dt { color: var(--muted); } .dl dd { margin: 0; }
.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
textarea.csv { font-family: ui-monospace, monospace; font-size: 12px; min-height: 160px; }
.stockin { width: 70px; min-height: 30px; padding: 4px 6px; }
.priceIn { width: 100px; min-height: 30px; padding: 4px 6px; text-align: right; }
.big { font-size: 22px; font-weight: 800; }
.note { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
@media (max-width: 900px) { .cols, .cols3, .formgrid { grid-template-columns: 1fr; } .dl { grid-template-columns: 120px 1fr; } }
@media (max-width: 560px) { #main { padding: 12px; } .kpis { grid-template-columns: 1fr 1fr; gap: 8px; } .kpi { padding: 10px 12px; } .kpi .v { font-size: 19px; } .bars .val { display: none; } }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.chip input { width: 16px; height: 16px; min-height: 0; padding: 0; }

/* analysis */
.anq { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.anq button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; min-height: 0; }
.anq button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.atable td { padding: 6px 4px; }
.abar { width: 45%; }
.abar span { display: block; height: 6px; background: var(--ink, #111); border-radius: 3px; min-width: 2px; }
/* store view: reports only, every control that changes something is hidden (the server refuses them too) */
.store-ro [data-save], .store-ro [data-adj], .store-ro [data-hold], .store-ro [data-onoff], .store-ro #soUse, .store-ro #impBtn, .store-ro #resetBtn, .store-ro .priceIn { display: none !important; }

/* product photos */
.ph-site { margin: 14px 0; } .ph-site h3 { margin: 0 0 4px; }
.ph-job { margin-top: 10px; font-size: 13px; } .ph-bar { height: 4px; background: #f1f1f1; border-radius: 4px; margin-top: 6px; overflow: hidden; max-width: 420px; } .ph-bar span { display: block; height: 100%; background: var(--ink); transition: width .4s; }
.ph-filter { gap: 12px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.ph-card { border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.ph-card img, .ph-none { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top center; border-radius: 8px; background: #f4f4f5; }
.ph-none { display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.ph-meta { font-size: 13px; line-height: 1.35; min-height: 52px; }
.ph-up { cursor: pointer; }

/* the clothing store's side menu (the café's is in shared/cafe.css): quiet groups, a hairline, and the brand colour
   only as the thin bar beside the page you are on */
html[data-mode="retail"] body.side-on .top { position: sticky; top: 0; height: 64px; flex-wrap: nowrap; backdrop-filter: none; background: #fff; } /* a backdrop filter would trap the fixed menu inside the header */
html[data-mode="retail"] body.side-on .top nav.side { position: fixed; top: 64px; left: 0; bottom: 0; width: 220px; flex-direction: column; flex-wrap: nowrap; gap: 1px; padding: 18px 14px 40px; background: #fff; border-right: 1px solid var(--line); overflow-y: auto; }
html[data-mode="retail"] body.side-on nav.side .grp { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #a0a0a4; font-weight: 600; padding: 16px 12px 6px; }
html[data-mode="retail"] body.side-on nav.side .grp:first-child { padding-top: 0; }
html[data-mode="retail"] body.side-on nav.side .nav { padding: 7px 12px; font-size: 13.5px; border-bottom: 0; border-left: 2px solid transparent; border-radius: 0; color: var(--muted); }
html[data-mode="retail"] body.side-on nav.side .nav:hover { color: var(--ink); background: var(--soft); }
html[data-mode="retail"] body.side-on nav.side .nav.on { color: var(--ink); font-weight: 600; background: none; border-left-color: var(--b-magenta, var(--ink)); }
html[data-mode="retail"] body.side-on #main { margin-left: 220px; padding: 24px 28px 60px; }
@media (max-width: 900px) {
  html[data-mode="retail"] body.side-on .top { height: auto; flex-wrap: wrap; position: static; }
  html[data-mode="retail"] body.side-on .top nav.side { position: static; width: auto; flex-direction: row; overflow-x: auto; padding: 4px 0; border: 0; order: 3; flex-basis: 100%; gap: 18px; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  html[data-mode="retail"] body.side-on nav.side .grp { display: none; }
  html[data-mode="retail"] body.side-on nav.side .nav { padding: 6px 0; white-space: nowrap; border-left: 0; border-bottom: 2px solid transparent; }
  html[data-mode="retail"] body.side-on nav.side .nav.on { border-bottom-color: var(--b-magenta, var(--ink)); }
  html[data-mode="retail"] body.side-on #main { margin-left: 0; padding: 16px; }
}

/* store floor: transfers, carry bags, lost sales, cash to bank, return photos */
.note.ops-late { background: #fff; border-color: var(--line); border-left: 3px solid var(--bad, #c62828); }
.note.ops-late a { color: inherit; }
.kpi.warnk .v { color: var(--warn, #b26a00); } .kpi.badk .v { color: var(--bad, #c62828); }
.kpi.small-v .v { font-size: 17px; line-height: 1.25; }
.ops-scan input.big { font-size: 20px; padding: 12px 14px; width: 100%; }
.ops-msg { min-height: 24px; margin-top: 8px; font-weight: 600; } .ops-msg.ok { color: var(--ok, #2e7d32); } .ops-msg.bad { color: var(--bad, #c62828); }
tr.hot td { background: #fafafa; } tr.hot td:first-child { box-shadow: inset 3px 0 0 var(--b-magenta); }
tr.warnrow td { background: #fff8f8; }
.ops-bar { display: grid; grid-template-columns: 120px 1fr 36px; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0; }
.ops-bar i { display: block; height: 8px; background: var(--ink); border-radius: 4px; min-width: 2px; }
.ops-bar b { text-align: right; font-variant-numeric: tabular-nums; }
.ops-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 10px 0 14px; }
.ops-photos figure { margin: 0; } .ops-photos figcaption { font-size: 13px; margin-top: 6px; }
.ops-ph { aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: #fafafa; }
.ops-ph img { width: 100%; height: 100%; object-fit: contain; }
.ops-acts { flex-wrap: wrap; }
@media (max-width: 640px) { .ops-acts { width: 100%; } }

/* store plus */
.pbar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; max-width: 220px; }
.pbar span { display: block; height: 100%; background: var(--ink); }
.chk { display: flex; gap: 8px; align-items: center; margin: 6px 0; font-size: 14px; }
