/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
  --bg:       #1e1e2e;
  --surface:  #181825;
  --surface2: #1e1e2e;
  --border:   #313244;
  --text:     #cdd6f4;
  --subtext:  #a6adc8;
  --green:    #a6e3a1;
  --yellow:   #f9e2af;
  --red:      #f38ba8;
  --blue:     #89b4fa;
  --peach:    #fab387;
  --lavender: #b4befe;
  --teal:     #94e2d5;
  --mauve:    #cba6f7;
  --orange:   #fe8019;
  --header-bg: #11111b;
  --font: "Arial", "Helvetica Neue", sans-serif;
  --surface0:  #313244;
  --surface1:  #45475a;
  --overlay1:  #7f849c;
  --subtext0:  #a6adc8;
  --subtext1:  #bac2de;
  --sky:       #89dceb;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font); }
input  { font-family: var(--font); }
.hidden { display: none !important; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.main { height: calc(100vh - 90px); overflow-y: auto; display: flex; flex-direction: column; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.header {
  display: flex; align-items: center; gap: 10px;
  background: var(--header-bg); padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.home-btn {
  background: var(--border); color: var(--text); border: none;
  padding: 5px 12px; border-radius: 6px; font-size: 12px; cursor: pointer;
}
.home-btn:hover { background: #45475a; }
.back-btn {
  background: none; color: var(--subtext1); border: none;
  padding: 5px 10px; border-radius: 6px; font-size: 12px; cursor: pointer;
}
.back-btn:hover { background: var(--surface0); color: var(--text); }
.brand { font-size: 16px; font-weight: bold; color: var(--lavender); }
.header-right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.hdr-btn {
  background: var(--border); color: var(--subtext); border: none;
  padding: 5px 10px; border-radius: 6px; font-size: 12px;
}
.hdr-btn:hover { background: #45475a; color: var(--text); }
.bell-btn { font-size: 14px; }
.bell-btn.active { background: #2a2a1e; color: var(--yellow); }

/* ── Status bar ──────────────────────────────────────────────────────────── */
.statusbar {
  font-size: 11px; color: var(--subtext); padding: 3px 14px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}

/* ── Notification panel ──────────────────────────────────────────────────── */
.notif-panel {
  background: var(--surface); border-bottom: 1px solid var(--border);
  max-height: 220px; overflow: hidden;
}
.notif-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 14px; border-bottom: 1px solid var(--border);
}
.notif-title { font-weight: bold; color: var(--yellow); font-size: 13px; }
.notif-file  { font-size: 11px; color: var(--subtext); }
.notif-body  { padding: 4px 0; overflow-y: auto; max-height: 160px; }
.notif-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px;
  padding: 4px 14px; font-size: 12px;
}
.notif-row:hover { background: var(--border); }
.notif-sku   { width: 130px; color: var(--text); font-family: monospace; font-size: 12px; }
.notif-title { flex: 1; color: var(--lavender); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-qty         { width: 36px; color: var(--red); }
.notif-stocks      { display: flex; align-items: center; gap: 3px; width: 80px; font-size: 12px; font-family: monospace; }
.notif-stock-old   { color: var(--subtext); }
.notif-stock-arrow { color: var(--subtext); }
.notif-stock-new   { font-weight: bold; }
.notif-rev         { width: 55px; color: var(--subtext); }
.notif-check-btn {
  background: var(--blue); color: #1e1e2e; border: none;
  padding: 2px 8px; border-radius: 4px; font-size: 11px; cursor: pointer;
}
.notif-elsewhere {
  display: block; width: 100%; font-size: 11px; color: var(--yellow);
  padding: 1px 0 0 0;
}
.notif-footer {
  padding: 8px 14px; border-top: 1px solid var(--border); margin-top: 4px;
}
.notif-report-btn {
  display: inline-block; padding: 5px 12px; border-radius: 6px;
  background: var(--green); color: #1e1e2e; font-size: 12px;
  font-weight: bold; text-decoration: none;
}
.notif-report-btn:hover { opacity: 0.85; }

/* ── Colour helpers ──────────────────────────────────────────────────────── */
.green    { color: var(--green);    }
.red      { color: var(--red);      }
.blue     { color: var(--blue);     }
.peach    { color: var(--peach);    }
.lavender { color: var(--lavender); }
.teal     { color: var(--teal);     }
.yellow   { color: var(--yellow);   }
.subtext  { color: var(--subtext);  }

/* ── Home page ───────────────────────────────────────────────────────────── */
.home-page {
  display: flex; flex-direction: column; align-items: center;
  gap: 24px; padding: 32px 16px;
  flex: 1; overflow-y: auto; justify-content: flex-start;
}
.home-hero   { margin-top: auto; }
.home-status { margin-bottom: auto; }
.home-hero   { text-align: center; }
.home-logo   { font-size: 56px; margin-bottom: 8px; }
.home-title  { font-size: 32px; font-weight: bold; color: var(--lavender); }
.home-sub    { color: var(--subtext); font-size: 15px; margin-top: 4px; }
button.home-nav-btn {
  border: none; cursor: pointer; font-family: inherit;
}
.home-sections { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; justify-content: center; }
.home-section  { display: flex; flex-direction: column; gap: 12px; align-items: stretch; min-width: 180px; }
.home-section-label { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--subtext); padding-left: 4px; }
.home-nav-btn {
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 32px; border-radius: 12px; font-weight: bold;
  transition: transform 0.1s; gap: 6px; width: 100%;
}
.home-nav-btn:hover { transform: scale(1.03); }
.home-nav-btn.blue  { background: var(--blue);  color: #1e1e2e; }
.home-nav-btn.peach { background: var(--peach); color: #1e1e2e; }
.home-nav-btn.green { background: var(--green); color: #1e1e2e; }
.nav-icon  { font-size: 26px; }
.nav-label { font-size: 14px; }
.home-status { color: var(--subtext); font-size: 12px; }

/* ── Stock search page ───────────────────────────────────────────────────── */
.stock-page {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
}
.search-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; background: var(--bg);
}
.search-bar input {
  flex: 1; max-width: 420px; padding: 8px 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); font-size: 14px; outline: none;
}
.search-bar input:focus { border-color: var(--blue); }
.btn-blue  { background: var(--blue);  color: #1e1e2e; border: none; padding: 7px 14px; border-radius: 6px; font-size: 13px; }
.btn-grey  { background: var(--border); color: var(--text); border: none; padding: 7px 12px; border-radius: 6px; font-size: 13px; }
.btn-filter { background: var(--border); color: var(--subtext); border: none; padding: 7px 12px; border-radius: 6px; font-size: 13px; }
.btn-filter.active { background: var(--blue); color: #1e1e2e; }

/* Filter panel */
.filter-panel {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 8px 12px;
}
.filter-top {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.filter-label { color: var(--subtext); font-size: 12px; }
.filter-top input {
  padding: 4px 8px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 4px; color: var(--text); font-size: 12px; width: 160px; outline: none;
}
.filter-actions { margin-left: auto; display: flex; gap: 6px; }
.btn-xs { background: var(--border); color: var(--subtext); border: none; padding: 3px 6px; border-radius: 4px; font-size: 11px; }
.btn-green-sm { background: var(--green); color: #1e1e2e; border: none; padding: 4px 12px; border-radius: 4px; font-size: 12px; }
.btn-grey-sm  { background: var(--border); color: var(--text); border: none; padding: 4px 10px; border-radius: 4px; font-size: 12px; }
.filter-tree  { max-height: 150px; overflow-y: auto; font-size: 12px; }
.filter-row   { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.filter-subs  { padding-left: 20px; }
.filter-sub-row { display: flex; align-items: center; gap: 6px; padding: 2px 0; font-size: 12px; color: var(--subtext); }
.filter-arrow { cursor: pointer; color: var(--subtext); width: 14px; display: inline-block; }
.filter-cat-label { color: var(--lavender); font-weight: bold; cursor: pointer; }
.filter-badge { color: var(--subtext); font-size: 11px; }

/* Results panes */
.panes {
  display: flex; flex: 1; overflow: hidden; gap: 0;
}
.pane { flex: 1; overflow-y: auto; padding: 4px 6px; }
.pane-divider { width: 1px; background: var(--border); flex-shrink: 0; }
.placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--subtext); gap: 8px; }
.placeholder p { font-size: 14px; }
.placeholder .sub { font-size: 12px; }
.placeholder.red { color: var(--red); }

/* Section headers */
.section-hdr {
  padding: 5px 10px; font-size: 13px; font-weight: bold;
  background: var(--surface); margin-bottom: 2px; border-radius: 4px;
}
.section-hdr.green { color: var(--green); }
.section-hdr.red   { color: var(--red); }
.section-hdr.peach { color: var(--peach); }
.section-divider   { height: 1px; background: var(--border); margin: 8px 0; }

/* Stock card */
.stock-card, .supplier-only-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 8px 10px; margin-bottom: 4px; cursor: pointer;
  transition: border-color 0.15s;
}
.stock-card:hover, .supplier-only-card:hover { border-color: var(--blue); }
.stock-card.active { border-color: var(--blue); background: #1c2035; }
.supplier-only-card.active { border-color: var(--peach); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card-title { font-size: 13px; font-weight: bold; color: var(--text); }
.card-title.peach { color: var(--peach); }
.card-sub { display: flex; gap: 16px; margin-top: 4px; font-size: 11px; color: var(--subtext); }
.stock-badge { font-size: 11px; font-weight: bold; white-space: nowrap; flex-shrink: 0; }
.order-badge { font-size: 11px; color: var(--yellow); margin-top: 3px; }

/* Supplier panel */
.supplier-panel-title { font-weight: bold; color: var(--text); padding: 6px 4px 10px; font-size: 13px; }
.supplier-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 8px 10px; margin-bottom: 6px;
}
.supplier-card.oos { opacity: 0.7; }
.sup-top   { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.sup-name  { font-weight: bold; font-size: 13px; }
.sup-title { font-size: 11px; color: var(--subtext); margin-bottom: 3px; }
.sup-detail { font-size: 11px; color: var(--subtext); }
.match-info { color: var(--border); font-size: 10px; margin-left: 6px; }

/* ── Sales page ──────────────────────────────────────────────────────────── */
.sales-page { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.sales-header {
  display: flex; align-items: center; gap: 14px;
  padding: 8px 14px; border-bottom: 1px solid var(--border);
}
.sales-title    { font-weight: bold; font-size: 15px; color: var(--peach); }
.sales-file-info { font-size: 11px; color: var(--subtext); flex: 1; }
.sales-col-headers {
  display: flex; align-items: center; gap: 0;
  padding: 4px 14px; background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 11px; color: var(--subtext); font-weight: bold;
}
.sales-col-headers span { padding: 0 4px; }
.sales-body { flex: 1; overflow-y: auto; }

/* Day headers */
.day-hdr {
  display: flex; align-items: center; gap: 12px;
  padding: 7px 14px; border-bottom: 1px solid var(--border);
}
.day-hdr.today     { background: #1a1a2e; }
.day-hdr.collapsible { background: var(--surface); cursor: pointer; }
.day-hdr.collapsible:hover { background: #252535; }
.day-hdr.open      { border-left: 3px solid var(--blue); }
.day-arrow { color: var(--subtext); font-size: 11px; width: 14px; }
.day-label { font-weight: bold; font-size: 13px; color: var(--lavender); }
.day-stats { font-size: 12px; color: var(--subtext); margin-left: auto; }
.day-rows  { }

/* Sale rows */
.sale-row {
  display: flex; align-items: center; gap: 0;
  padding: 4px 14px; font-size: 12px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.sale-row:hover { background: var(--border); }
.row-a { background: var(--bg); }
.row-b { background: var(--surface); }
.col-time  { width: 60px;  color: var(--subtext); }
.col-order { width: 70px;  color: var(--subtext); }
.col-sku   { width: 150px; color: var(--text); }
.col-title { flex: 1;      color: var(--lavender); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-qty   { width: 45px;  color: var(--red); }
.col-price { width: 70px;  color: var(--text); }
.col-stock { width: 60px;  font-weight: bold; }

.load-more-btn {
  width: 100%; padding: 12px; background: var(--border);
  border: none; color: var(--text); font-size: 13px; cursor: pointer;
}
.load-more-btn:hover { background: #45475a; }
.locs.yellow { color: var(--yellow); }

/* ── Stock location editor (right pane) ─────────────────────────────────── */
.stock-editor {
  background: var(--surface); border-radius: 8px;
  border: 1px solid var(--border); margin: 8px 6px; padding: 10px 12px;
}
.stock-editor-hdr {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; font-weight: bold; font-size: 13px;
  color: var(--lavender); padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.loc-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; border-bottom: 1px solid var(--border);
}
.loc-row:last-of-type { border-bottom: none; }
.loc-name { font-size: 13px; color: var(--text); }
.loc-controls { display: flex; align-items: center; gap: 0; }
.loc-btn {
  background: var(--border); color: var(--text); border: none;
  width: 30px; height: 30px; font-size: 18px; line-height: 1;
  border-radius: 4px; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
}
.loc-btn:hover { background: var(--blue); color: #1e1e2e; }
.loc-btn:active { transform: scale(0.92); }
.loc-qty {
  min-width: 40px; text-align: center; font-size: 16px;
  font-weight: bold; color: var(--text); font-family: monospace;
}
.save-status {
  margin-top: 6px; font-size: 11px; text-align: right; min-height: 14px;
}
.save-status.green  { color: var(--green); }
.save-status.yellow { color: var(--yellow); }
.save-status.red    { color: var(--red); }

/* ── Inline card expand panel ────────────────────────────────────────────── */
.card-expand {
  border-top: 1px solid var(--border);
  padding: 8px 4px 4px;
  margin-top: 6px;
}
.card-expand.hidden { display: none; }

.stock-card.active {
  border-color: var(--blue);
  background: #1a1e2e;
}

/* Location input — overrideable number field */
.loc-input {
  width: 52px;
  text-align: center;
  font-size: 15px;
  font-weight: bold;
  font-family: monospace;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 4px;
  outline: none;
  -moz-appearance: textfield;
}
.loc-input:focus { border-color: var(--blue); }
.loc-input::-webkit-outer-spin-button,
.loc-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Tighten loc-row inside card expand */
.card-expand .loc-row {
  padding: 4px 2px;
  border-bottom: 1px solid var(--border);
}
.card-expand .loc-row:last-of-type { border-bottom: none; }

/* ── Stock Report page ───────────────────────────────────────────────────── */
.stock-report-page { display: flex; flex-direction: column; height: 100%; padding: 12px 14px; gap: 10px; }
.report-header { display: flex; align-items: center; gap: 12px; }
.report-title  { font-size: 17px; font-weight: bold; color: var(--green); flex: 1; }
.report-filters-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.report-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; flex: 1; }
.highlight-btn {
  padding: 4px 12px; border-radius: 6px; border: 1px solid var(--yellow);
  background: var(--surface); color: var(--yellow); font-size: 12px; white-space: nowrap;
}
.highlight-btn:hover  { background: #2a2510; }
.highlight-btn.active { background: var(--yellow); color: #1e1e2e; font-weight: bold; }
.report-table tbody tr.row-highlight { background: #2a2316; }
.report-table tbody tr.row-highlight:hover { background: #3a3020; }
.filter-label  { font-size: 12px; color: var(--subtext); margin-right: 4px; }
.filter-btn {
  padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--surface); color: var(--subtext); font-size: 12px;
}
.filter-btn:hover  { border-color: var(--green); color: var(--text); }
.filter-btn.active { background: var(--green); color: #1e1e2e; border-color: var(--green); font-weight: bold; }
.filter-clear      { border-color: var(--subtext); }
.report-summary    { font-size: 12px; color: var(--subtext); }
.report-table-wrap { flex: 1; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.report-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.report-table thead th {
  position: sticky; top: 0; background: var(--surface);
  padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border);
  color: var(--subtext); font-weight: 600; white-space: nowrap;
}
.report-table tbody tr.row-a { background: var(--surface); }
.report-table tbody tr.row-b { background: var(--bg); }
.report-table tbody tr:hover { background: var(--border); }
.report-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); }
.report-table td.col-sku   { font-family: monospace; font-size: 12px; white-space: nowrap; }
.report-table td.col-title { color: var(--lavender); }
.report-table td.qty-green { color: var(--green); text-align: center; }
.report-table td.qty-zero  { color: var(--subtext); text-align: center; }
.report-table td.placeholder { text-align: center; color: var(--subtext); padding: 20px; }

/* ── Product Review page ─────────────────────────────────────────────────── */
.pr-page          { display: flex; flex-direction: column; height: 100%; padding: 12px 14px; gap: 12px; overflow: auto; }
.pr-header        { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.pr-title         { font-size: 17px; font-weight: bold; color: var(--mauve); flex: 1; }
.pr-meta          { font-size: 12px; color: var(--subtext); }
.pr-empty         { color: var(--subtext); font-size: 14px; padding: 24px; text-align: center; }
.pr-section       { display: flex; flex-direction: column; gap: 6px; }
.pr-section-head  { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pr-section-title { font-size: 14px; font-weight: bold; }
.pr-section-title.pr-new     { color: var(--green); }
.pr-section-title.pr-changed { color: var(--yellow); }
.pr-section-title.pr-removed { color: var(--red); }
.pr-section-title.pr-rename  { color: var(--sky); }
.pr-old-sku      { color: var(--subtext0); text-decoration: line-through; font-size: 0.88em; }
.pr-rename-arrow { color: var(--overlay1); margin: 0 4px; }
.pr-count         { font-size: 12px; color: var(--subtext); }
.pr-hint          { font-size: 12px; color: var(--subtext); font-style: italic; }
.pr-sel-btn       { padding: 3px 10px; border-radius: 5px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 12px; cursor: pointer; }
.pr-sel-btn:hover { border-color: var(--blue); color: var(--blue); }
.pr-accept-cell   { text-align: center; }
.pr-check         { width: 16px; height: 16px; cursor: pointer; accent-color: var(--green); }
.pr-field-name    { font-family: monospace; font-size: 12px; color: var(--lavender); }
.pr-old           { color: var(--red); font-size: 12px; max-width: 200px; word-break: break-word; }
.pr-new-val       { color: var(--green); font-size: 12px; max-width: 200px; word-break: break-word; }
.pr-sku-group     { vertical-align: top; padding-top: 8px; }
.pr-sku-label     { font-family: monospace; font-size: 12px; }
.pr-mono          { font-family: monospace; font-size: 12px; }
.pr-small         { font-size: 11px; color: var(--subtext); max-width: 160px; word-break: break-word; }
.pr-editable      { cursor: pointer; }
.pr-editable:hover { background: #1a1e2e; }

/* ── Purple home button ───────────────────────────────────────────────────── */
.home-nav-btn.purple { background: var(--mauve); color: #1e1e2e; border: none; }
.home-nav-btn.purple:hover { filter: brightness(1.1); }

/* ── Modal ──────────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); z-index: 200;
  align-items: center; justify-content: center;
}
.modal-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 28px 32px; max-width: 400px; width: 90%;
  display: flex; flex-direction: column; gap: 16px;
}
.modal-title  { font-size: 17px; font-weight: bold; color: var(--lavender); }
.modal-body   { font-size: 14px; color: var(--text); line-height: 1.5; white-space: pre-wrap; min-height: 36px; }
.modal-btns   { display: flex; gap: 10px; flex-wrap: wrap; }
.modal-btn-primary {
  padding: 9px 20px; border-radius: 8px; font-weight: bold; font-size: 14px;
  background: var(--blue); color: #1e1e2e; border: none; cursor: pointer;
}
.modal-btn-primary:hover { filter: brightness(1.1); }
.modal-btn-grey {
  padding: 9px 20px; border-radius: 8px; font-size: 14px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); cursor: pointer;
}
.modal-btn-grey:hover { border-color: var(--subtext); }
.modal-progress {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: var(--subtext);
}
.spinner {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Hub pages (home, stock-hub, sales-hub) ──────────────────────────────── */
.hub-page {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; overflow-y: auto; padding: 32px 16px; gap: 32px;
}
.hub-page .home-hero { margin-top: auto; }
.hub-page .home-status { margin-bottom: auto; }
.hub-title {
  font-size: 22px; font-weight: bold; color: var(--lavender);
  letter-spacing: 0.04em;
}
.hub-buttons {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: center;
}
.hub-buttons .home-nav-btn { min-width: 160px; width: auto; flex: 0 0 auto; }

/* ── Home grouped nav rows ── */
.hub-row {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center;
}
.hub-row .home-nav-btn { min-width: 140px; width: auto; flex: 0 0 auto; }
.hub-row .home-nav-btn.sm { min-width: 72px; padding: 14px 16px; }
.hub-row .home-nav-btn.sm .nav-label { font-size: 15px; font-weight: 800; letter-spacing: 0.04em; }
.hub-rule { width: 70%; max-width: 480px; height: 1px; background: var(--border); opacity: 0.6; }

/* ── Tables ──────────────────────────────────────────────────────────── */
.tables-page   { display:flex; flex-direction:column; gap:16px; padding:16px; max-width:900px; margin:0 auto; flex-shrink:0; }
.tables-header { display:flex; align-items:center; gap:12px; }
.tables-title  { font-size:1.3em; font-weight:700; color:var(--text); }
.tables-grid   { display:grid; grid-template-columns:repeat(2,1fr); gap:18px; }

.table-card {
  background:var(--surface0); border:2px solid #ffffff;
  border-radius:16px; padding:28px 24px; cursor:pointer;
  display:flex; flex-direction:column; gap:8px;
  width:200px; min-height:300px;
  transition:border-color .15s, background .15s;
}
.table-card:hover          { border-color:#ffffff; }
.table-card-active         { border-color:var(--green); background:var(--surface0); }
.table-card-active:hover   { border-color:var(--teal); }
.tc-num   { font-weight:700; font-size:1em; color:var(--subtext1); }
.tc-name  { font-size:0.85em; color:var(--text); font-weight:600; }
.tc-timer { font-size:1.5em; font-weight:700; color:var(--green); font-variant-numeric:tabular-nums; }
.tc-people, .tc-items { font-size:0.85em; color:var(--subtext0); }
.tc-empty { font-size:0.85em; color:var(--overlay1); margin-top:auto; }

/* Overlay */
.table-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,.55);
  display:flex; align-items:center; justify-content:center; z-index:200;
}
.table-panel {
  background:#1e1e2e; border:2px solid #ffffff;
  border-radius:18px; width:min(720px,95vw);
  min-height:600px; max-height:95vh; overflow-y:auto; display:flex; flex-direction:column;
}

/* Panel header */
.tp-header {
  display:flex; align-items:flex-start; justify-content:space-between;
  padding:18px 20px 12px; border-bottom:1px solid var(--surface0);
}
.tp-title     { font-size:1.2em; font-weight:700; color:var(--text); }
.tp-close     { background:none; border:none; font-size:1.2em; color:var(--subtext0); cursor:pointer; padding:0 4px; }
.tp-close:hover { color:var(--text); }
.tp-name-wrap { margin-left:10px; }
.tp-name      { font-size:0.9em; color:var(--blue); cursor:pointer; border-bottom:1px dashed var(--blue); }
.tp-name:hover { color:var(--sky); }
.tp-name-hint { color:var(--overlay1); font-style:italic; }
.tp-name-input { background:var(--surface0); border:1px solid var(--blue); border-radius:6px; color:var(--text); padding:2px 6px; font-size:0.9em; width:140px; }

/* Timer row */
.tp-timer-row   { display:flex; align-items:center; gap:16px; padding:14px 20px 8px; }
.tp-timer       { font-size:2em; font-weight:700; color:var(--green); font-variant-numeric:tabular-nums; }
.tp-people-badge { font-size:1em; color:var(--subtext1); background:var(--surface0); border-radius:8px; padding:4px 10px; }

/* Body */
.tp-body  { padding:12px 20px; flex:1; }
.tp-label { font-size:0.85em; color:var(--subtext0); margin-bottom:8px; }
.tp-err   { color:var(--red); font-size:0.85em; margin-top:8px; min-height:18px; }

/* Setup */
.tp-people-row { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.tp-ppl-btn {
  background:var(--surface0); border:2px solid var(--surface1); border-radius:10px;
  color:var(--text); font-size:1.1em; font-weight:600; width:58px; height:58px;
  cursor:pointer; transition:border-color .1s;
}
.tp-ppl-btn:hover   { border-color:var(--overlay1); }
.tp-ppl-btn.selected { border-color:#ffffff; background:var(--surface1); color:#ffffff; }
.tp-ppl-input { background:var(--surface0); border:2px solid var(--surface1); border-radius:10px; color:var(--text); font-size:1.1em; font-weight:600; width:64px; height:48px; text-align:center; padding:0 4px; }
.tp-ppl-input:focus { border-color:var(--blue); outline:none; }
.tp-delay-row { display:flex; gap:10px; flex-wrap:wrap; }
.tp-delay-btn { background:var(--surface0); border:2px solid var(--surface1); border-radius:10px; color:var(--text); font-size:1em; font-weight:600; padding:14px 28px; cursor:pointer; transition:border-color .1s; }
.tp-delay-btn:hover { border-color:var(--green); color:var(--green); }

/* Items */
.tp-items-section { padding:0 20px 8px; display:flex; flex-direction:column; gap:8px; }
.tp-no-items      { color:var(--overlay1); font-size:0.85em; padding:4px 0; }
.tp-item-row      { display:flex; align-items:center; gap:8px; padding:6px 0; border-bottom:1px solid var(--surface0); }
.tp-item-title    { flex:1; font-size:0.9em; color:var(--text); }
.tp-item-price    { font-size:0.85em; color:var(--subtext0); min-width:48px; text-align:right; }
.tp-item-qty      { display:flex; align-items:center; gap:4px; }
.tp-item-qty button { background:var(--surface1); border:none; border-radius:5px; color:var(--text); width:24px; height:24px; cursor:pointer; font-size:1em; }
.tp-item-qty span   { min-width:20px; text-align:center; font-size:0.9em; }
.tp-item-del { background:none; border:none; color:var(--overlay1); cursor:pointer; font-size:0.85em; padding:2px 4px; }
.tp-item-del:hover { color:var(--red); }

/* Search */
.tp-search-wrap    { position:relative; }
.tp-search         { width:100%; background:#ffffff; border:1px solid #cccccc; border-radius:10px; color:#1e1e2e; padding:9px 14px; font-size:0.95em; box-sizing:border-box; }
.tp-search::placeholder { color:#888; }
.tp-search:focus   { border-color:#555; outline:none; }
.tp-search-results { position:absolute; background:#1e1e2e; border:1px solid #45475a; border-radius:10px; z-index:9999; max-height:220px; overflow-y:auto; overflow-x:hidden; box-shadow:0 6px 24px rgba(0,0,0,.5); min-width:180px; }
.tp-sr-row         { display:flex; justify-content:space-between; align-items:center; padding:9px 14px; cursor:pointer; font-size:0.9em; }
.tp-sr-row:hover   { background:var(--surface0); }
.tp-sr-title       { color:var(--text); }
.tp-sr-price       { color:var(--green); font-weight:600; margin-left:8px; }

/* Footer */
.tp-footer   { padding:14px 20px; border-top:1px solid var(--surface0); display:flex; gap:10px; justify-content:flex-end; }
.tp-min-btn  { background:var(--surface1); border:2px solid #ffffff; border-radius:10px; color:#ffffff; font-size:1em; font-weight:700; padding:14px 24px; cursor:pointer; }
.tp-min-btn:hover { background:var(--surface2); }
.tp-bill-btn { background:var(--red); border:none; border-radius:10px; color:#fff; font-size:1em; font-weight:700; padding:14px 30px; cursor:pointer; }
.tp-bill-btn:hover { opacity:.85; }
.tp-push-btn { background:var(--green); border:none; border-radius:10px; color:var(--base); font-size:1em; font-weight:700; padding:14px 30px; cursor:pointer; }
.tp-push-btn:hover { opacity:.85; }


/* Billing */
.tp-billing       { padding:8px 20px; }
.bill-table       { width:100%; border-collapse:collapse; font-size:0.92em; }
.bill-table td    { padding:8px 6px; border-bottom:1px solid var(--surface0); color:var(--text); }
.bill-amt         { text-align:right; font-weight:600; color:var(--green); }
.bill-total td    { font-weight:700; font-size:1.05em; border-top:2px solid var(--surface1); border-bottom:none; }
.bill-total .bill-amt { color:var(--yellow); font-size:1.1em; }

.home-nav-btn.teal     { background:var(--teal);     color:#1e1e2e; }
.home-nav-btn.lavender { background:var(--lavender); color:#1e1e2e; }
.home-nav-btn.orange  { background:var(--orange);  color:#1e1e2e; }
.home-nav-btn.yellow  { background:var(--yellow);  color:#1e1e2e; }
.booker-b { font-family: Georgia, serif; font-weight: 900; font-size: 2em; line-height: 1; }

/* ── Kallax / Rent Room ───────────────────────────────────────────────── */
.kallax-page { padding: 20px; }
.kallax-page-title { font-size: 1.4em; font-weight: 700; color: var(--text); margin-bottom: 20px; }

.kallax-section { margin-bottom: 28px; }
.kallax-section-title { font-size: 1.1em; font-weight: 700; color: var(--text); margin-bottom: 14px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.kallax-units { display: flex; flex-wrap: wrap; gap: 32px; justify-content: center; }
.kallax-units.compact { flex-wrap: nowrap; overflow-x: auto; gap: 16px; padding-bottom: 8px; justify-content: flex-start; }
.kallax-unit-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.kallax-unit-label { font-size: 0.95em; color: var(--subtext1); font-weight: 600; letter-spacing: .02em; }

.kallax-frame {
  background: #e8e0d0;
  padding: 12px;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
  display: inline-block;
}
.kallax-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), 80px);
  gap: 10px;
}
.kallax-cell {
  width: 80px; height: 80px;
  background: var(--bg);
  border-radius: 3px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: background .15s;
}
.kallax-cell:hover { background: rgba(255,255,255,0.18); }

.kc-names { display: flex; flex-direction: column; align-items: center; padding: 3px 4px; gap: 1px; text-align: center; width: 100%; overflow: hidden; }
.kc-game { font-size: 0.38em; color: var(--text); line-height: 1.2; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; padding: 0 2px; }
.kc-more { font-size: 0.42em; color: #4a4466; font-style: italic; margin-top: 1px; }

.kallax-units.compact .kallax-frame { padding: 8px; }
.kallax-units.compact .kallax-grid { grid-template-columns: repeat(var(--cols), 52px); gap: 7px; }
.kallax-units.compact .kallax-cell { width: 52px; height: 52px; }
.kallax-units.compact .kc-game { font-size: 0.38em; }
.kallax-units.compact .kc-more { font-size: 0.34em; }

/* ═══════════════════ REORDER PAGE ═══════════════════ */
.reorder-page {
  display: flex; height: 100%; overflow: hidden; flex: 1; gap: 0;
}
.reorder-left {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
  border-right: 1px solid var(--border);
}
.reorder-header {
  display: flex; align-items: baseline; gap: 12px;
  padding: 12px 16px 8px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.reorder-title { font-size: 1.1em; font-weight: 700; color: var(--text); }
.reorder-meta  { font-size: 0.8em; color: var(--subtext0); }
.reorder-filters {
  display: flex; gap: 6px; padding: 8px 12px;
  border-bottom: 1px solid var(--border); flex-shrink: 0; flex-wrap: wrap;
}
.ro-tab {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--subtext0); border-radius: 6px; padding: 4px 12px;
  font-size: 0.82em; cursor: pointer; transition: all .15s;
}
.ro-tab:hover { border-color: var(--blue); color: var(--text); }
.ro-tab.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.reorder-list {
  flex: 1; overflow-y: auto; padding: 4px 0;
}
.ro-loading, .ro-empty {
  padding: 24px; text-align: center; color: var(--subtext0); font-size: 0.9em;
}

/* Suggestion rows */
.ro-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.ro-row:hover  { background: var(--surface); }
.ro-in-basket  { background: color-mix(in srgb, var(--blue) 10%, transparent); }
.ro-in-basket:hover { background: color-mix(in srgb, var(--blue) 15%, transparent); }
.ro-ordered    { opacity: 0.5; }
.ro-row-main   { flex: 1; min-width: 0; }
.ro-row-title  { font-size: 0.88em; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ro-row-detail { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 3px; }
.ro-chip       { font-size: 0.72em; padding: 2px 7px; border-radius: 10px; }
.ro-chip-sold  { background: color-mix(in srgb, var(--red) 20%, transparent); color: var(--red); }
.ro-chip-rate  { background: color-mix(in srgb, var(--yellow) 20%, transparent); color: var(--yellow); }
.ro-chip-sup   { background: color-mix(in srgb, var(--blue) 20%, transparent); color: var(--blue); }
.ro-chip-rrp   { background: color-mix(in srgb, var(--green) 15%, transparent); color: var(--green); }
.ro-no-sup     { color: var(--subtext0); font-style: italic; }

.ro-row-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.ro-qty-ctrl   { display: flex; align-items: center; gap: 4px; }
.ro-qty-btn    {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  width: 24px; height: 24px; border-radius: 4px; cursor: pointer; font-size: 1em;
  display: flex; align-items: center; justify-content: center;
}
.ro-qty-btn:hover { border-color: var(--blue); }
.ro-qty-val    { min-width: 24px; text-align: center; font-size: 0.85em; font-weight: 600; }
.ro-add-btn {
  background: var(--blue); border: none; color: #fff;
  padding: 5px 12px; border-radius: 6px; cursor: pointer; font-size: 0.8em; white-space: nowrap;
}
.ro-add-btn:hover { filter: brightness(1.1); }
.ro-in-basket-btn {
  background: color-mix(in srgb, var(--blue) 20%, transparent);
  border: 1px solid var(--blue); color: var(--blue);
  padding: 5px 10px; border-radius: 6px; cursor: pointer; font-size: 0.8em; white-space: nowrap;
}
.ro-in-basket-btn:hover { background: color-mix(in srgb, var(--red) 20%, transparent); border-color: var(--red); color: var(--red); }
.ro-ordered-badge {
  font-size: 0.75em; color: var(--green); padding: 4px 8px;
  border: 1px solid var(--green); border-radius: 6px;
}
.ro-undo-btn {
  background: none; border: 1px solid var(--border); color: var(--subtext0);
  padding: 4px 8px; border-radius: 6px; cursor: pointer; font-size: 0.75em;
}

/* BGG section */
.ro-bgg-section { border-top: 2px solid var(--border); flex-shrink: 0; }
.ro-bgg-toggle {
  width: 100%; background: var(--surface); border: none; color: var(--subtext0);
  padding: 10px 16px; text-align: left; cursor: pointer; font-size: 0.85em;
}
.ro-bgg-toggle:hover { color: var(--text); }
.ro-bgg-list { max-height: 180px; overflow-y: auto; padding: 4px 0; }
.ro-bgg-row {
  display: flex; gap: 10px; padding: 5px 16px;
  border-bottom: 1px solid var(--border); font-size: 0.82em;
}
.ro-bgg-rank { color: var(--subtext0); min-width: 30px; }
.ro-bgg-title { color: var(--text); }

/* RIGHT: Order basket */
.reorder-right {
  width: 300px; flex-shrink: 0; display: flex; flex-direction: column;
  background: var(--surface); overflow-y: auto;
}
.reorder-basket-header {
  padding: 14px 16px 10px; font-size: 1em; font-weight: 700;
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.ro-basket-empty {
  padding: 20px 16px; color: var(--subtext0); font-size: 0.85em; text-align: center;
}

/* Supplier blocks */
.ro-sup-block {
  border-bottom: 2px solid var(--border); padding: 12px 14px 10px;
}
.ro-sup-block-header {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px;
}
.ro-sup-block-name { font-weight: 700; font-size: 0.9em; }
.ro-sup-block-total { font-size: 0.82em; color: var(--subtext0); }
.ro-total-met { color: var(--green) !important; }

.ro-progress {
  height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 3px;
}
.ro-progress-fill { height: 100%; background: var(--blue); border-radius: 3px; transition: width .3s; }
.ro-progress-met  { background: var(--green); }
.ro-progress-label { font-size: 0.72em; color: var(--subtext0); margin-bottom: 6px; }
.ro-min-met { color: var(--green) !important; }

.ro-basket-items { margin: 6px 0; }
.ro-basket-row {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 0; border-bottom: 1px solid var(--border); font-size: 0.8em;
}
.ro-basket-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ro-basket-qty   { color: var(--subtext0); min-width: 24px; text-align: center; }
.ro-basket-line  { min-width: 46px; text-align: right; font-weight: 600; }
.ro-basket-del {
  background: none; border: none; color: var(--subtext0); cursor: pointer;
  padding: 2px 4px; font-size: 0.9em;
}
.ro-basket-del:hover { color: var(--red); }

.ro-mark-btn {
  width: 100%; margin-top: 8px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border); color: var(--subtext0);
  border-radius: 6px; cursor: pointer; font-size: 0.82em;
}
.ro-mark-btn-ready {
  background: var(--green); border-color: var(--green); color: #fff; font-weight: 600;
}
.ro-mark-btn-ready:hover { filter: brightness(1.1); }

/* Kallax cell overlay */
.kallax-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: none; align-items: center; justify-content: center; z-index: 200;
}
.kallax-panel {
  background: #1e1e2e; border: 2px solid #ffffff;
  border-radius: 18px; width: min(500px, 95vw);
  max-height: 88vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.kp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px; border-bottom: 1px solid var(--surface0);
  position: sticky; top: 0; background: #1e1e2e; z-index: 1;
}
.kp-title { font-size: 1em; font-weight: 700; color: var(--text); }
.kp-close { background: none; border: none; color: var(--subtext0); font-size: 1.2em; cursor: pointer; padding: 0 4px; }
.kp-close:hover { color: var(--text); }
.kp-body { padding: 14px 20px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.kp-no-games { color: var(--overlay1); font-style: italic; font-size: 0.88em; padding: 4px 0; }
.kp-game-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--surface0); }
.kp-game-name { color: var(--text); font-size: 0.9em; flex: 1; }
.kp-game-del { background: none; border: none; color: var(--overlay1); cursor: pointer; font-size: 0.9em; padding: 2px 6px; margin-left: 8px; }
.kp-game-del:hover { color: var(--red); }
.kp-search { width: 100%; background: #fff; border: 1px solid #ccc; border-radius: 10px; color: #1e1e2e; padding: 9px 14px; font-size: 0.95em; box-sizing: border-box; margin-top: 4px; }
.kp-search::placeholder { color: #888; }
.kp-search:focus { border-color: #555; outline: none; }
.kp-search-drop { background: #1e1e2e; border: 1px solid #fff; border-radius: 10px; overflow: hidden; }
.kp-sr-section { font-size: 0.72em; font-weight: 700; color: var(--overlay1); text-transform: uppercase; letter-spacing: .06em; padding: 7px 14px 3px; }
.kp-sr-row { display: flex; align-items: center; padding: 9px 14px; cursor: pointer; font-size: 0.9em; color: var(--text); }
.kp-sr-row:hover { background: var(--surface0); }
.kp-sr-rental { color: var(--lavender); }
.kp-sr-new { color: var(--green); border-top: 1px solid var(--surface0); margin-top: 2px; font-style: italic; }
.kp-sr-new:hover { background: var(--surface0); }
.kp-footer { padding: 14px 20px; border-top: 1px solid var(--surface0); display: flex; gap: 10px; justify-content: flex-end; position: sticky; bottom: 0; background: #1e1e2e; }
.kp-edit-btn { background: var(--blue); border: none; border-radius: 10px; color: #1e1e2e; font-size: 0.95em; font-weight: 700; padding: 12px 24px; cursor: pointer; }
.kp-edit-btn:hover { opacity: .85; }
.kp-close-btn { background: var(--surface1); border: 2px solid #fff; border-radius: 10px; color: #fff; font-size: 0.95em; font-weight: 700; padding: 12px 24px; cursor: pointer; }
.kp-close-btn:hover { background: var(--surface0); }

/* ── Export CSV column picker ─────────────────────────────────────────── */
.export-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: none; align-items: center; justify-content: center; z-index: 300;
}
.export-panel {
  background: #1e1e2e; border: 2px solid #ffffff;
  border-radius: 18px; width: min(420px, 95vw);
  display: flex; flex-direction: column;
}
.export-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px; border-bottom: 1px solid var(--surface0);
}
.export-title { font-size: 1em; font-weight: 700; color: var(--text); }
.export-x { background: none; border: none; color: var(--subtext0); font-size: 1.2em; cursor: pointer; padding: 0 4px; }
.export-x:hover { color: var(--text); }
.export-cols { padding: 14px 20px; display: flex; flex-direction: column; gap: 2px; }
.ec-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.ec-row:hover { background: var(--surface0); }
.ec-check { width: 18px; height: 18px; accent-color: var(--blue); cursor: pointer; flex-shrink: 0; }
.ec-check:disabled { opacity: 0.35; cursor: not-allowed; }
.ec-label { color: var(--text); font-size: 0.95em; }
.ec-row:has(.ec-check:disabled) .ec-label { color: var(--overlay1); }
.export-footer {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px; border-top: 1px solid var(--surface0);
}
.export-count { font-size: 0.9em; font-weight: 700; margin-right: auto; }
.export-cancel-btn { background: var(--surface1); border: 2px solid #fff; border-radius: 10px; color: #fff; font-size: 0.9em; font-weight: 700; padding: 10px 20px; cursor: pointer; }
.export-cancel-btn:hover { background: var(--surface0); }
.export-go-btn { background: var(--green); border: none; border-radius: 10px; color: #1e1e2e; font-size: 0.9em; font-weight: 700; padding: 10px 24px; cursor: pointer; transition: opacity .15s; }
.export-go-btn:hover:not(:disabled) { opacity: .85; }
.export-go-btn:disabled { cursor: not-allowed; }
.export-csv-btn   { background: var(--blue);  border: none; border-radius: 10px; color: #1e1e2e; font-size: 0.9em; font-weight: 700; padding: 10px 20px; cursor: pointer; transition: opacity .15s; }
.export-csv-btn:hover:not(:disabled)   { opacity: .85; }
.export-csv-btn:disabled   { cursor: not-allowed; }
.export-print-btn { background: var(--green); border: none; border-radius: 10px; color: #1e1e2e; font-size: 0.9em; font-weight: 700; padding: 10px 20px; cursor: pointer; transition: opacity .15s; }
.export-print-btn:hover:not(:disabled) { opacity: .85; }
.export-print-btn:disabled { cursor: not-allowed; }
.ec-section { font-size: 0.75em; font-weight: 700; color: var(--overlay1); text-transform: uppercase; letter-spacing: .06em; padding: 8px 12px 2px; }

/* Sortable table headers */
.sortable-th { cursor: pointer; user-select: none; white-space: nowrap; }
.sortable-th:hover { color: var(--blue); }
.sort-arrow { font-size: 0.8em; color: var(--blue); margin-left: 2px; }

/* ── Stock edit mode ──────────────────────────────────────────────────── */
.mode-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px; background: var(--surface0);
  border-bottom: 1px solid var(--border); font-size: 0.85em;
}
.mode-banner.hidden { display: none; }
.mode-pill { border-radius: 20px; padding: 3px 12px; font-weight: 700; font-size: 0.9em; }
.mode-add-pill  { background: var(--green);  color: #1e1e2e; }
.mode-move-pill { background: var(--blue);   color: #1e1e2e; }
.mode-change-btn { background: none; border: none; color: var(--subtext0); font-size: 0.85em; cursor: pointer; text-decoration: underline; padding: 0; }
.mode-change-btn:hover { color: var(--text); }

.mode-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  display: none; align-items: center; justify-content: center; z-index: 500;
}
.mode-panel {
  background: #1e1e2e; border: 2px solid #ffffff;
  border-radius: 18px; width: min(440px, 95vw); padding: 28px 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.mode-title    { font-size: 1.1em; font-weight: 700; color: var(--text); text-align: center; }
.mode-subtitle { font-size: 0.8em; color: var(--overlay1); text-align: center; margin-top: -8px; }
.mode-btn {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface0); border: 2px solid var(--surface1);
  border-radius: 14px; padding: 16px 20px; cursor: pointer;
  text-align: left; transition: border-color .15s;
  width: 100%;
}
.mode-btn:hover { border-color: #ffffff; }
.mode-icon { font-size: 2em; flex-shrink: 0; }
.mode-text { display: flex; flex-direction: column; gap: 3px; }
.mode-label { font-size: 1em; font-weight: 700; color: var(--text); }
.mode-desc  { font-size: 0.8em; color: var(--subtext0); }
.mode-add:hover  { border-color: var(--green); }
.mode-move:hover { border-color: var(--blue); }

.move-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--blue); color: #1e1e2e;
  padding: 10px 20px; border-radius: 20px;
  font-size: 0.9em; font-weight: 700; z-index: 999;
  animation: toastIn .2s ease;
}
@keyframes toastIn { from { opacity:0; transform:translateX(-50%) translateY(10px); } to { opacity:1; transform:translateX(-50%) translateY(0); } }

/* ── Suppliers page ──────────────────────────────────────────────────────── */
.suppliers-page { display: flex; flex-direction: column; gap: 20px; padding: 20px; max-width: 900px; margin: 0 auto; flex-shrink: 0; }
.suppliers-header { display: flex; align-items: center; gap: 16px; }
.suppliers-title { font-size: 1.4em; font-weight: 700; color: var(--text); }
.suppliers-update-all { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.sup-btn-all {
  background: var(--green); color: #1e1e2e;
  border: none; border-radius: 10px; padding: 12px 28px;
  font-size: 1em; font-weight: 700; cursor: pointer;
  transition: filter .15s;
}
.sup-btn-all:hover:not(:disabled) { filter: brightness(1.12); }
.sup-btn-all:disabled { opacity: 0.5; cursor: default; }
.sup-all-status { font-size: 0.9em; color: var(--subtext0); }
.suppliers-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px;
}
.sup-card {
  background: var(--surface0); border: 2px solid var(--border);
  border-radius: 14px; padding: 18px 16px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s;
}
.sup-card.sup-running { border-color: var(--yellow); }
.sup-card-name { font-size: 1em; font-weight: 700; color: var(--text); }
.sup-card-file { font-size: 0.78em; color: var(--subtext0); min-height: 1.2em; }
.sup-card-status { font-size: 0.82em; color: var(--subtext1); min-height: 1.2em; }
.sup-btn {
  margin-top: 4px; background: var(--blue); color: #1e1e2e;
  border: none; border-radius: 8px; padding: 8px 12px;
  font-size: 0.88em; font-weight: 700; cursor: pointer;
  transition: filter .15s;
}
.sup-btn:hover:not(:disabled) { filter: brightness(1.12); }
.sup-btn:disabled { opacity: 0.5; cursor: default; }
.sup-card-btns { display: flex; gap: 8px; margin-top: 4px; align-items: center; }
.sup-btn-upload {
  background: var(--surface1); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
  font-size: 0.88em; cursor: pointer; transition: filter .15s; line-height: 1;
}
.sup-btn-upload:hover { filter: brightness(1.2); }
.sup-btn-log {
  background: var(--surface1); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
  font-size: 0.82em; font-weight: 600; cursor: pointer;
  transition: filter .15s;
}
.sup-btn-log:hover { filter: brightness(1.2); }
.sup-upload-rows { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 16px; }
.sup-upload-row { display: flex; align-items: center; gap: 12px; }
.sup-upload-label { width: 110px; font-size: 0.9em; font-weight: 600; color: var(--text); flex-shrink: 0; }
.sup-upload-pick {
  background: var(--blue); color: #1e1e2e;
  border-radius: 8px; padding: 7px 14px;
  font-size: 0.85em; font-weight: 700; cursor: pointer;
  transition: filter .15s; white-space: nowrap;
}
.sup-upload-pick:hover { filter: brightness(1.12); }
.sup-upload-status { font-size: 0.82em; color: var(--subtext1); min-width: 0; }

.sup-log-panel {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 40vh; background: var(--mantle);
  border-top: 2px solid var(--border);
  display: flex; flex-direction: column; z-index: 200;
}
.sup-log-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; background: var(--surface0);
  font-size: 0.9em; font-weight: 700; color: var(--text);
}
.sup-log-close {
  background: none; border: none; color: var(--subtext0);
  font-size: 1.1em; cursor: pointer; padding: 2px 6px;
}
.sup-log-close:hover { color: var(--text); }
.sup-log-body {
  flex: 1; overflow-y: auto; padding: 10px 16px;
  font-size: 0.78em; line-height: 1.5; color: var(--green);
  white-space: pre-wrap; word-break: break-all; margin: 0;
}

/* ── Compare page ──────────────────────────────────────────────────────── */
.compare-summary {
  display: flex; gap: 16px; justify-content: center;
  flex-wrap: wrap; padding: 20px 24px 0;
}
.cmp-stat {
  background: var(--surface0); border: 1px solid var(--surface1);
  border-radius: 10px; padding: 18px 28px; text-align: center; min-width: 140px;
}
.cmp-n { display: block; font-size: 2em; font-weight: 700; color: var(--lavender); }
.cmp-label { font-size: 0.8em; color: var(--subtext0); margin-top: 4px; display: block; }

.compare-review-wrap {
  margin: 24px; background: var(--surface0);
  border: 1px solid var(--surface1); border-radius: 12px; overflow: hidden;
}
.compare-review-header {
  padding: 14px 20px; background: var(--surface1);
  font-weight: 600; font-size: 0.95em; display: flex; align-items: center; gap: 12px;
}
.cmp-hint { font-size: 0.78em; color: var(--subtext0); font-weight: 400; }

.cmp-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid var(--surface1);
  transition: opacity 0.3s;
}
.cmp-row:last-child { border-bottom: none; }
.cmp-row-left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.cmp-row-score {
  font-size: 1em; font-weight: 700; min-width: 46px; text-align: center;
  padding: 4px 8px; border-radius: 6px;
}
.score-high { background: rgba(166,227,161,0.15); color: var(--green); }
.score-med  { background: rgba(249,226,175,0.15); color: var(--yellow); }
.score-low  { background: rgba(243,139,168,0.15); color: var(--red); }

.cmp-row-titles { flex: 1; min-width: 0; }
.cmp-stock-title, .cmp-sup-title {
  font-size: 0.88em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 2px 0;
}
.cmp-stock-title { color: var(--text); }
.cmp-sup-title   { color: var(--subtext1); }
.cmp-sku { font-size: 0.82em; color: var(--subtext0); margin-left: 6px; }

.cmp-row-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cmp-accept, .cmp-skip {
  padding: 6px 14px; border: none; border-radius: 6px;
  font-size: 0.82em; font-weight: 600; cursor: pointer; transition: opacity 0.2s;
}
.cmp-accept { background: #2d7a4f; color: #ffffff; }
.cmp-skip   { background: var(--surface2); color: var(--text); }
.cmp-accept:hover { opacity: 0.85; }
.cmp-skip:hover   { opacity: 0.85; }

/* ── Price Changes report ─────────────────────────────────────────── */
.report-table .num-col { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.report-table .sku-col  { font-family: monospace; font-size: 12px; white-space: nowrap; }
.report-table .price-up { color: #f38ba8; font-weight: 600; }
.report-table .price-dn { color: #a6e3a1; font-weight: 600; }

/* ── Compare queue table (batch) ──────────────────────────────────── */
.compare-review-header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; padding:10px 14px; background:var(--surface0); border-radius:8px 8px 0 0; border-bottom:1px solid var(--border); font-size:0.9em; }
.cmp-apply-btn { background:#2d7a4f; color:#fff; border:none; border-radius:6px; padding:7px 18px; font-size:0.88em; font-weight:600; cursor:pointer; transition:opacity .15s; }
.cmp-apply-btn:disabled { opacity:0.4; cursor:default; }
.cmp-apply-btn:not(:disabled):hover { opacity:0.85; }
.cmp-score-badge { display:inline-block; padding:2px 8px; border-radius:4px; font-size:0.82em; font-weight:700; }
.cmp-title-main { font-size:0.88em; font-weight:500; }
.cmp-title-sub  { font-size:0.78em; color:var(--subtext0); margin-top:1px; }
.cmp-dec-btn { width:34px; height:28px; border:1px solid var(--border); border-radius:5px; background:var(--surface0); color:var(--subtext0); font-size:0.85em; cursor:pointer; transition:background .12s, color .12s; }
.cmp-dec-btn:hover { border-color:var(--text); color:var(--text); }
.cmp-dec-active-accept { background:#2d7a4f !important; color:#fff !important; border-color:#2d7a4f !important; }
.cmp-dec-active-skip   { background:#5a3a3a !important; color:#f38ba8 !important; border-color:#f38ba8 !important; }

/* BGG row active highlight */
.report-table tbody tr.bgg-row-active { background: #1a2d3a !important; outline: 2px solid var(--blue); outline-offset: -2px; }
.report-table tbody tr.bgg-row-active:hover { background: #1e3445 !important; }


/* ── EPOS ────────────────────────────────────────────────────── */
.epos-page { display:flex; height:100%; overflow:hidden; flex:1; gap:0; }

.epos-left {
  width:300px; flex-shrink:0; display:flex; flex-direction:column;
  border-right:1px solid var(--border); background:var(--surface);
}
.epos-search-row {
  display:flex; align-items:center; gap:6px; padding:10px 10px 8px;
  border-bottom:1px solid var(--border); flex-shrink:0;
}
.epos-search {
  flex:1; background:var(--bg); border:1px solid var(--border); border-radius:6px;
  padding:8px 12px; color:var(--text); font-size:0.9em; outline:none;
}
.epos-search:focus { border-color:var(--blue); }
.epos-clear-btn { background:none; border:none; color:var(--subtext0); cursor:pointer; padding:4px 6px; }

.epos-basket { flex:1; overflow-y:auto; padding:4px 0; }
.epos-empty  { padding:32px; text-align:center; color:var(--subtext0); font-size:0.88em; }

.epos-basket-item {
  display:flex; align-items:center; gap:5px; padding:5px 8px;
  border-bottom:1px solid var(--border);
}
.epos-item-title {
  flex:1; font-size:0.8em; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.epos-item-price {
  font-size:0.83em; font-weight:600; white-space:nowrap;
  font-variant-numeric:tabular-nums; min-width:50px; text-align:right;
}
.epos-qty-btn {
  background:var(--surface0); border:1px solid var(--border); border-radius:4px;
  color:var(--text); cursor:pointer; width:22px; height:22px; font-size:0.85em;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.epos-qty-val   { font-size:0.82em; min-width:16px; text-align:center; }
.epos-remove-btn { background:none; border:none; color:var(--subtext0); cursor:pointer; padding:2px 4px; font-size:0.82em; }
.epos-remove-btn:hover { color:#f38ba8; }

.epos-totals {
  border-top:2px solid var(--border); padding:8px 12px; flex-shrink:0;
  display:flex; flex-direction:column; gap:5px;
}
.epos-totals-row { display:flex; justify-content:space-between; font-size:0.87em; }
.epos-total      { font-size:1.05em !important; font-weight:700; margin-top:4px; padding-top:5px; border-top:1px solid var(--border); }

.epos-actions {
  padding:8px 10px; border-top:1px solid var(--border); flex-shrink:0;
  display:flex; flex-direction:column; gap:6px;
}
.epos-action-btn {
  flex:1; padding:8px 6px; background:var(--surface0); border:1px solid var(--border);
  border-radius:6px; color:var(--text); cursor:pointer; font-size:0.78em;
  font-weight:600; letter-spacing:0.5px;
}
.epos-action-btn:hover { background:var(--surface1); }

.epos-pay-btn {
  padding:14px; background:#2d7a4f; border:none; border-radius:8px;
  color:#ffffff; cursor:pointer; font-size:1.05em; font-weight:700;
  letter-spacing:1px; width:100%;
}
.epos-pay-btn:disabled { background:#1a4530; color:#4a8a6a; cursor:not-allowed; }
.epos-pay-btn:not(:disabled):hover { background:#37996a; }


.epos-resize-handle {
  width: 5px; flex-shrink: 0; cursor: col-resize;
  background: var(--border);
  transition: background .15s;
}
.epos-resize-handle:hover { background: var(--blue); }
.epos-right { flex:1; display:flex; flex-direction:column; overflow:hidden; background:var(--bg); }

.epos-cat-grid {
  display:grid; grid-template-columns:repeat(3,1fr); gap:10px; padding:16px;
}
.epos-cat-btn {
  background:#1e5f74; border:none; border-radius:8px; color:#ffffff; cursor:pointer;
  font-size:0.8em; font-weight:700; letter-spacing:0.5px; padding:20px 10px;
  text-align:center; text-transform:uppercase; line-height:1.3; min-height:68px;
}
.epos-cat-btn:hover { background:#265f7a; }
.epos-misc-btn { background:#2d5a3d; width:100%; padding:14px; min-height:auto; }
.epos-misc-btn:hover { background:#356e4a; }

.epos-prod-header {
  display:flex; align-items:center; gap:12px; padding:10px 14px;
  background:var(--surface0); border-bottom:1px solid var(--border); flex-shrink:0;
}
.epos-back-btn {
  background:var(--surface); border:1px solid var(--border); border-radius:6px;
  color:var(--text); cursor:pointer; padding:6px 12px; font-size:0.85em; flex-shrink:0;
}
.epos-prod-list { flex:1; overflow-y:auto; }

.epos-prod-row {
  display:flex; align-items:center; padding:8px 14px;
  border-bottom:1px solid var(--border); gap:10px; cursor:pointer;
}
.epos-prod-row:hover { background:var(--surface); }
.epos-prod-row.oos  { opacity:0.45; }
.epos-prod-title  { flex:1; font-size:0.87em; }
.epos-prod-stock  { font-size:0.78em; color:var(--subtext0); min-width:28px; text-align:center; }
.epos-prod-price  { font-size:0.9em; font-weight:600; min-width:52px; text-align:right; font-variant-numeric:tabular-nums; }
.epos-add-btn {
  background:#2d7a4f; border:none; border-radius:6px; color:#ffffff;
  cursor:pointer; padding:5px 10px; font-size:0.85em; font-weight:700; flex-shrink:0;
}
.epos-add-btn:hover { background:#37996a; }

.epos-pay-method {
  flex:1; padding:10px; background:var(--surface); border:2px solid var(--border);
  border-radius:8px; color:var(--text); cursor:pointer; font-size:0.88em; font-weight:600;
}
.epos-pay-method.active { border-color:var(--blue); background:rgba(137,180,250,0.12); }

.epos-numpad { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.epos-np-btn {
  padding:12px; background:var(--surface); border:1px solid var(--border);
  border-radius:6px; color:var(--text); cursor:pointer; font-size:0.95em; font-weight:600;
}
.epos-np-btn:hover { background:var(--surface1); }
.epos-np-btn.np-del { color:#f38ba8; }

.hdr-logout {
  color: var(--subtext0) !important; text-decoration: none;
  font-size: 1.1em; padding: 4px 8px; border-radius: 4px; line-height: 1;
}
.hdr-logout:hover { color: var(--red) !important; }

.bgg-chain-btn {
  background: none; border: none; cursor: pointer; font-size: 1em;
  opacity: 0.3; padding: 2px 4px; border-radius: 4px; transition: opacity .15s;
}
.bgg-chain-btn:hover { opacity: 1; }
.bgg-chain-linked { opacity: 0.9; color: var(--green); }
.bgg-chain-linked:hover { opacity: 1; }

/* Play Room search */
.pr-search-wrap {
  position: relative; width: 100%; max-width: 420px;
  margin: 0 auto 20px; padding: 0 16px; box-sizing: border-box;
}
.pr-search-input {
  width: 100%; box-sizing: border-box;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 16px; color: var(--text); font-size: 0.95em; outline: none;
}
.pr-search-input:focus { border-color: var(--blue); }
.pr-search-drop {
  display: none; position: absolute; top: calc(100% + 4px); left: 16px; right: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  z-index: 200; max-height: 260px; overflow-y: auto; box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
.pr-drop-row {
  padding: 10px 14px; cursor: pointer; font-size: 0.88em; border-bottom: 1px solid var(--border);
}
.pr-drop-row:hover { background: var(--bg); }
.pr-drop-row:last-child { border-bottom: none; }
.pr-drop-empty { padding: 10px 14px; color: var(--subtext0); font-size: 0.85em; }

/* Kallax cell highlight */
@keyframes kc-pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--yellow); }
  50%       { box-shadow: 0 0 0 5px var(--yellow), 0 0 14px var(--yellow); }
}
.kc-highlight {
  box-shadow: 0 0 0 3px var(--yellow) !important;
  animation: kc-pulse 1.4s ease-in-out infinite;
}

/* ═══════════════════ PRODUCTS PAGE ═══════════════════ */
.prod-action-bar {
  display:flex; align-items:center; gap:10px;
  padding:10px 16px; border-bottom:1px solid var(--border);
  background:var(--surface); flex-shrink:0;
}
.prod-action-btn {
  background:var(--blue); color:#fff; border:none;
  padding:7px 14px; border-radius:7px; cursor:pointer;
  font-size:0.84em; font-weight:600; text-decoration:none;
  white-space:nowrap;
}
.prod-action-btn:disabled { opacity:0.5; cursor:default; }
.prod-action-btn-grey {
  background:var(--surface); color:var(--text);
  border:1px solid var(--border);
}
.prod-page { display:flex; height:100%; overflow:hidden; flex:1; }

/* List panel */
.prod-list-panel {
  display:flex; flex-direction:column; overflow:hidden;
  width:60%; border-right:1px solid var(--border);
}
.prod-list-toolbar {
  padding:10px 12px 8px; border-bottom:1px solid var(--border);
  display:flex; flex-direction:column; gap:7px; flex-shrink:0;
}
.prod-search {
  width:100%; box-sizing:border-box;
  background:var(--bg); border:1px solid var(--border); border-radius:8px;
  padding:8px 12px; color:var(--text); font-size:0.9em; outline:none;
}
.prod-search:focus { border-color:var(--blue); }
.prod-filters { display:flex; gap:6px; }
.prod-tab {
  background:var(--surface); border:1px solid var(--border); color:var(--subtext0);
  border-radius:6px; padding:4px 12px; font-size:0.8em; cursor:pointer;
}
.prod-tab:hover { border-color:var(--blue); color:var(--text); }
.prod-tab.active { background:var(--blue); border-color:var(--blue); color:#fff; }
.prod-list-meta {
  padding:5px 14px; font-size:0.78em; color:var(--subtext0);
  border-bottom:1px solid var(--border); flex-shrink:0;
}
.prod-table-wrap { flex:1; overflow-y:auto; }
.prod-table { width:100%; border-collapse:collapse; font-size:0.82em; }
.prod-table th {
  position:sticky; top:0; background:var(--surface);
  padding:8px 10px; text-align:left; font-size:0.78em; color:var(--subtext0);
  font-weight:600; border-bottom:2px solid var(--border); white-space:nowrap;
}
.prod-row { cursor:pointer; border-bottom:1px solid var(--border); transition:background .1s; }
.prod-row:hover { background:var(--surface); }
.prod-row-active { background:color-mix(in srgb,var(--blue) 12%,transparent) !important; }
.prod-row td { padding:7px 10px; vertical-align:middle; }
.prod-td-sku    { color:var(--subtext0); font-size:0.85em; white-space:nowrap; max-width:110px; overflow:hidden; text-overflow:ellipsis; }
.prod-td-title  { font-weight:500; max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.prod-td-cat    { color:var(--subtext0); font-size:0.8em; max-width:160px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.prod-td-price  { white-space:nowrap; text-align:right; font-variant-numeric:tabular-nums; }
.prod-td-stock  { text-align:center; }
.prod-td-live   { text-align:center; }
.prod-live-yes  { color:var(--green); font-weight:700; }
.prod-live-no   { color:var(--subtext0); }
.prod-pagination {
  padding:8px 12px; border-top:1px solid var(--border); display:flex;
  gap:4px; flex-wrap:wrap; align-items:center; flex-shrink:0;
}
.prod-pagination button {
  background:var(--surface); border:1px solid var(--border); color:var(--text);
  padding:4px 10px; border-radius:5px; cursor:pointer; font-size:0.8em;
}
.prod-pagination button:hover { border-color:var(--blue); }
.prod-pagination .prod-page-active { background:var(--blue); border-color:var(--blue); color:#fff; }
.prod-pagination span { color:var(--subtext0); padding:0 4px; }

/* Edit panel */
.prod-edit-panel {
  flex:1; display:flex; flex-direction:column; overflow:hidden; background:var(--surface);
}
.prod-edit-empty {
  flex:1; display:flex; align-items:center; justify-content:center;
  color:var(--subtext0); font-size:0.9em;
}
.prod-edit-header {
  display:flex; justify-content:space-between; align-items:flex-start;
  padding:14px 16px 10px; border-bottom:1px solid var(--border); flex-shrink:0;
}
.prod-edit-title { font-weight:700; font-size:1em; color:var(--text); }
.prod-edit-sku   { font-size:0.78em; color:var(--subtext0); margin-top:2px; }
.prod-save-btn {
  background:var(--blue); border:none; color:#fff;
  padding:8px 18px; border-radius:7px; cursor:pointer; font-size:0.85em; font-weight:600;
  white-space:nowrap; flex-shrink:0;
}
.prod-save-btn:hover { filter:brightness(1.1); }
.prod-tabs {
  display:flex; border-bottom:2px solid var(--border); flex-shrink:0;
}
.prod-etab {
  flex:1; padding:10px 8px; background:none; border:none; color:var(--subtext0);
  font-size:0.85em; cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-2px;
}
.prod-etab:hover { color:var(--text); }
.prod-etab.active { color:var(--blue); border-bottom-color:var(--blue); font-weight:600; }
.prod-edit-body { flex:1; overflow-y:auto; padding:12px 16px; }

/* Form fields */
.pf-row {
  display:flex; align-items:center; gap:10px;
  padding:7px 0; border-bottom:1px solid var(--border);
}
.pf-row-tall { align-items:flex-start; }
.pf-row-toggle { align-items:center; }
.pf-label {
  width:130px; flex-shrink:0; font-size:0.8em; color:var(--subtext0); font-weight:500;
}
.pf-input {
  flex:1; background:var(--bg); border:1px solid var(--border); border-radius:6px;
  padding:6px 10px; color:var(--text); font-size:0.88em; outline:none;
}
.pf-input:focus { border-color:var(--blue); }
.pf-textarea { resize:vertical; min-height:80px; font-family:inherit; }
.pf-toggle-wrap { display:flex; gap:16px; }
.pf-radio { display:flex; align-items:center; gap:5px; font-size:0.85em; cursor:pointer; }
.pf-checkbox { width:16px; height:16px; cursor:pointer; accent-color:var(--blue); }

.prod-cat-btn {
  background: var(--surface); border: 1px solid var(--border); color: var(--subtext0);
  border-radius: 6px; padding: 4px 12px; font-size: 0.8em; cursor: pointer;
  margin-left: auto;
}
.prod-cat-btn:hover { border-color: var(--blue); color: var(--text); }

/* ── Reorder: search bar ── */
.ro-search-wrap { position:relative; padding:8px 10px 0; flex-shrink:0; }
.ro-search-input {
  width:100%; box-sizing:border-box;
  background:var(--bg); border:1px solid var(--border); border-radius:7px;
  padding:8px 12px; color:var(--text); font-size:0.87em; outline:none;
}
.ro-search-input:focus { border-color:var(--blue); }
.ro-search-dropdown {
  position:absolute; left:10px; right:10px; top:calc(100% - 2px);
  background:var(--surface); border:1px solid var(--border); border-radius:0 0 8px 8px;
  z-index:200; max-height:320px; overflow-y:auto; box-shadow:0 6px 18px rgba(0,0,0,.35);
}
.ro-search-result { padding:10px 14px; cursor:pointer; border-bottom:1px solid var(--border); }
.ro-search-result:hover { background:var(--bg); }
.ro-search-result-title { font-size:0.87em; font-weight:500; color:var(--text); margin-bottom:4px; }
.ro-search-result-meta { display:flex; gap:5px; flex-wrap:wrap; }
.ro-search-none { padding:12px 14px; color:var(--subtext0); font-size:0.84em; }
.ro-chip-stock { background:color-mix(in srgb,var(--blue) 15%,transparent); color:var(--blue); }
.ro-chip-zero  { background:color-mix(in srgb,var(--red) 15%,transparent); color:var(--red); }
.ro-chip-inbasket { background:color-mix(in srgb,var(--green) 15%,transparent); color:var(--green); }
.ro-chip-nosales  { background:color-mix(in srgb,var(--subtext0) 15%,transparent); color:var(--subtext0); }

/* ── Reorder: at-risk chips ── */
.ro-chip-urgent { background:color-mix(in srgb,var(--red) 20%,transparent); color:var(--red); font-weight:700; }
.ro-chip-warn   { background:color-mix(in srgb,var(--yellow) 20%,transparent); color:var(--yellow); font-weight:600; }
.ro-chip-ok     { background:color-mix(in srgb,var(--green) 15%,transparent); color:var(--green); }

/* ── Reorder: deadline banner ── */
.ro-deadline-banner {
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  padding:9px 14px; margin:10px 10px 0;
  background:var(--bg); border:1px solid var(--border); border-radius:8px;
  font-size:0.82em; flex-shrink:0;
}
.ro-deadline-label { color:var(--subtext0); }
.ro-deadline-date  { color:var(--text); font-weight:600; }
.ro-deadline-time  { font-weight:700; padding:2px 8px; border-radius:5px; }
.ro-deadline-green { background:color-mix(in srgb,var(--green) 20%,transparent); color:var(--green); }
.ro-deadline-amber { background:color-mix(in srgb,var(--yellow) 20%,transparent); color:var(--yellow); }
.ro-deadline-red   { background:color-mix(in srgb,var(--red) 20%,transparent); color:var(--red); }
.ro-deadline-risk  { color:var(--red); font-weight:600; }

.epos-stock-editable { cursor:text; border-radius:3px; transition:background .1s; min-width:20px; text-align:center; }
.epos-stock-editable:hover { background:color-mix(in srgb,var(--blue) 15%,transparent); }
.epos-stock-input { width:44px; background:var(--bg); border:1px solid var(--blue); border-radius:4px; color:var(--text); text-align:center; font-size:0.82em; padding:1px 3px; outline:none; }

/* Report search input */
.report-search-input {
  flex:1; max-width:320px; background:var(--bg); border:1px solid var(--border);
  border-radius:7px; padding:6px 12px; color:var(--text); font-size:0.85em; outline:none;
}
.report-search-input:focus { border-color:var(--blue); }

/* Products: new product button */
.prod-new-btn {
  background:var(--blue); border:none; color:#fff;
  border-radius:6px; padding:4px 12px; font-size:0.8em; cursor:pointer; margin-left:4px;
}
.prod-new-btn:hover { filter:brightness(1.1); }

/* ═══════════════════ SALE / CLEARANCE REPORT ═══════════════════ */
.sr-page { display:flex; flex-direction:column; height:100%; overflow:hidden; }

.sr-header {
  display:flex; align-items:baseline; gap:14px;
  padding:12px 16px 8px; border-bottom:1px solid var(--border); flex-shrink:0;
}
.sr-title { font-weight:700; font-size:1.05em; }
.sr-meta  { font-size:0.8em; color:var(--subtext0); }

/* Summary cards */
.sr-cards {
  display:flex; gap:12px; padding:10px 16px;
  border-bottom:1px solid var(--border); flex-shrink:0; flex-wrap:wrap;
}
.sr-card {
  flex:1; min-width:120px; background:var(--bg); border:1px solid var(--border);
  border-radius:8px; padding:10px 14px;
}
.sr-card-green { border-color:var(--green); }
.sr-card-amber { border-color:var(--yellow); }
.sr-card-val { font-size:1.25em; font-weight:700; color:var(--text); }
.sr-card-green .sr-card-val { color:var(--green); }
.sr-card-amber .sr-card-val { color:var(--yellow); }
.sr-card-lbl { font-size:0.72em; color:var(--subtext0); margin-top:2px; }

/* Toolbar */
.sr-toolbar {
  display:flex; align-items:center; gap:10px;
  padding:8px 16px; border-bottom:1px solid var(--border); flex-shrink:0; flex-wrap:wrap;
}
.sr-tabs { display:flex; gap:5px; flex-wrap:wrap; }
.sr-tab {
  background:var(--surface); border:1px solid var(--border); color:var(--subtext0);
  border-radius:6px; padding:4px 12px; font-size:0.8em; cursor:pointer;
}
.sr-tab:hover { border-color:var(--blue); color:var(--text); }
.sr-tab.active { background:var(--blue); border-color:var(--blue); color:#fff; }
.sr-search {
  margin-left:auto; width:220px; background:var(--bg); border:1px solid var(--border);
  border-radius:7px; padding:6px 12px; color:var(--text); font-size:0.83em; outline:none;
}
.sr-search:focus { border-color:var(--blue); }

/* Table */
.sr-table-wrap { flex:1; overflow-y:auto; }
.sr-table { width:100%; border-collapse:collapse; font-size:0.83em; }
.sr-table thead th {
  position:sticky; top:0; background:var(--surface); padding:8px 10px;
  text-align:left; font-size:0.78em; color:var(--subtext0); font-weight:600;
  border-bottom:2px solid var(--border); white-space:nowrap; cursor:pointer; user-select:none;
}
.sr-table thead th:hover { color:var(--text); }
.sr-th-title { min-width:220px; }
.sr-row { border-bottom:1px solid var(--border); }
.sr-row:hover { background:var(--surface); }
.sr-td-title { padding:8px 10px; }
.sr-td-num   { padding:8px 10px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.sr-td-price { padding:8px 10px; white-space:nowrap; }
.sr-prod-name { font-weight:500; color:var(--text); }
.sr-prod-sku  { font-size:0.75em; color:var(--subtext0); margin-top:1px; }
.sr-val-col   { font-weight:600; color:var(--text); }
.sr-sale-price { font-weight:700; font-size:1.05em; color:var(--green); margin-right:6px; }
.sr-est-clear  { color:var(--subtext0); font-size:0.82em; }

/* Weeks cover colour coding */
.sr-wc-ok   { color:var(--subtext0); }
.sr-wc-slow { color:var(--yellow); font-weight:600; }
.sr-wc-dead { color:var(--red); font-weight:600; }

/* Discount badge */
.sr-disc-badge {
  display:inline-block; padding:2px 7px; border-radius:5px; font-size:0.75em; font-weight:700;
}
.sr-disc-light { background:color-mix(in srgb,var(--blue) 18%,transparent); color:var(--blue); }
.sr-disc-mid   { background:color-mix(in srgb,var(--yellow) 20%,transparent); color:var(--yellow); }
.sr-disc-deep  { background:color-mix(in srgb,var(--red) 20%,transparent); color:var(--red); }
.sr-sort-ind   { font-size:0.75em; margin-left:2px; }

/* ═══════════════════ BOOKER ORDER ═══════════════════ */
.bo-page { display:flex; flex-direction:column; height:100%; overflow:hidden; }

.bo-header {
  display:flex; align-items:center; gap:12px; padding:10px 16px 8px;
  border-bottom:1px solid var(--border); flex-shrink:0;
}
.bo-title { font-weight:700; font-size:1.05em; color:var(--orange); }
.bo-date  { font-size:0.8em; color:var(--subtext0); margin-right:auto; }

.bo-print-btn {
  background:var(--blue); border:none; color:#fff; border-radius:7px;
  padding:6px 14px; font-size:0.83em; cursor:pointer;
}
.bo-print-btn:hover:not(:disabled) { filter:brightness(1.1); }
.bo-print-btn:disabled { opacity:0.5; cursor:default; }

/* Tabs */
.bo-tabs {
  display:flex; gap:4px; padding:8px 16px 0;
  border-bottom:1px solid var(--border); flex-shrink:0;
}
.bo-tab {
  background:none; border:none; border-bottom:2px solid transparent;
  color:var(--subtext0); padding:6px 14px; font-size:0.85em; cursor:pointer;
  transition:color 0.15s; position:relative; top:1px;
}
.bo-tab:hover { color:var(--text); }
.bo-tab.active { color:var(--blue); border-bottom-color:var(--blue); font-weight:600; }
.bo-badge {
  background:var(--blue); color:#fff; border-radius:10px;
  padding:1px 6px; font-size:0.75em; margin-left:4px;
}

/* Tab content */
.bo-tab-content { display:flex; flex-direction:column; flex:1; overflow:hidden; }

.bo-filter-bar {
  display:flex; align-items:center; gap:8px; padding:8px 16px;
  border-bottom:1px solid var(--border); flex-shrink:0;
}
.bo-filter {
  background:var(--surface); border:1px solid var(--border); color:var(--subtext0);
  border-radius:6px; padding:4px 12px; font-size:0.8em; cursor:pointer;
}
.bo-filter.active { background:var(--blue); border-color:var(--blue); color:#fff; }
.bo-hint { font-size:0.78em; color:var(--subtext0); margin-left:auto; }

.bo-item-toolbar {
  display:flex; align-items:center; gap:12px; padding:8px 16px;
  border-bottom:1px solid var(--border); flex-shrink:0;
}
.bo-add-btn {
  background:var(--green); border:none; color:#fff; border-radius:6px;
  padding:5px 14px; font-size:0.82em; cursor:pointer;
}
.bo-add-btn:hover { filter:brightness(1.1); }

/* Table */
.bo-table-wrap { flex:1; overflow-y:auto; }
.bo-table { width:100%; border-collapse:collapse; font-size:0.83em; }
.bo-table thead th {
  position:sticky; top:0; background:var(--surface); padding:8px 10px;
  text-align:left; font-size:0.78em; color:var(--subtext0); font-weight:600;
  border-bottom:2px solid var(--border); white-space:nowrap;
}
.bo-row { border-bottom:1px solid var(--border); }
.bo-row:hover { background:var(--surface); }
.bo-row-low { background:color-mix(in srgb,var(--yellow) 8%,transparent); }
.bo-row-low:hover { background:color-mix(in srgb,var(--yellow) 14%,transparent); }
.bo-td-name { padding:7px 10px; font-weight:500; }
.bo-td-num  { padding:7px 10px; text-align:center; font-variant-numeric:tabular-nums; }
.bo-val-red   { color:var(--red);    font-weight:700; }
.bo-val-amber { color:var(--yellow); font-weight:700; }
.bo-val-dim   { color:var(--subtext0); }
.bo-loading   { padding:24px; text-align:center; color:var(--subtext0); }
.bo-empty-cell{ padding:24px; text-align:center; color:var(--subtext0); }
.bo-empty     { padding:48px; text-align:center; color:var(--subtext0); font-size:0.9em; }

.bo-qty-input {
  width:64px; background:var(--bg); border:1px solid var(--border);
  border-radius:5px; padding:4px 8px; color:var(--text);
  font-size:0.85em; text-align:center; outline:none;
}
.bo-qty-input:focus { border-color:var(--blue); }

.bo-add-order-btn {
  background:var(--surface); border:1px solid var(--border); color:var(--text);
  border-radius:5px; padding:3px 10px; font-size:0.8em; cursor:pointer;
}
.bo-add-order-btn:hover { border-color:var(--blue); color:var(--blue); }

.bo-edit-btn, .bo-del-btn {
  background:none; border:none; cursor:pointer; padding:3px 6px;
  border-radius:4px; font-size:0.9em; color:var(--subtext0);
}
.bo-edit-btn:hover { color:var(--blue); background:color-mix(in srgb,var(--blue) 12%,transparent); }
.bo-del-btn:hover  { color:var(--red);  background:color-mix(in srgb,var(--red)  12%,transparent); }

.bo-qty-editable {
  cursor:pointer; padding:2px 6px; border-radius:4px; display:inline-block;
  border:1px solid transparent;
}
.bo-qty-editable:hover { border-color:var(--border); background:var(--surface); }

.bo-item-cat {
  display:inline-block; margin-left:8px; font-size:0.72em; color:var(--subtext0);
  background:var(--surface); border-radius:4px; padding:1px 6px; font-weight:400;
}
.bo-pack-size { font-size:0.82em; color:var(--subtext0); }

/* Order tab toolbar */
.bo-order-toolbar {
  display:flex; align-items:center; gap:10px; padding:8px 16px;
  border-bottom:1px solid var(--border); flex-shrink:0;
}
.bo-order-date { font-size:0.82em; color:var(--subtext0); margin-right:auto; }
.bo-clear-btn {
  background:none; border:1px solid var(--border); color:var(--subtext0);
  border-radius:6px; padding:5px 12px; font-size:0.82em; cursor:pointer;
}
.bo-clear-btn:hover { border-color:var(--red); color:var(--red); }

/* Modal */
.bo-modal-box {
  background:var(--surface); border:1px solid var(--border); border-radius:12px;
  width:440px; max-width:95vw; padding:24px; display:flex; flex-direction:column; gap:10px;
}
.bo-modal-title { font-weight:700; font-size:1.05em; margin-bottom:4px; }
.bo-modal-input {
  width:100%; box-sizing:border-box; background:var(--bg); border:1px solid var(--border);
  border-radius:7px; padding:8px 12px; color:var(--text); font-size:0.9em; outline:none;
}
.bo-modal-input:focus { border-color:var(--blue); }
.bo-modal-footer { display:flex; gap:8px; justify-content:flex-end; margin-top:4px; }
.bo-modal-cancel {
  background:var(--surface); border:1px solid var(--border); color:var(--text);
  padding:7px 16px; border-radius:7px; cursor:pointer; font-size:0.85em;
}
.bo-modal-save {
  background:var(--blue); border:none; color:#fff;
  padding:7px 20px; border-radius:7px; cursor:pointer; font-size:0.85em;
}
.bo-modal-save:hover { filter:brightness(1.1); }

/* ═══════════════════ SUPPLIER REORDER (sro-) ═══════════════════ */
.sro-page { display:flex; flex-direction:column; height:100%; overflow:hidden; }

.sro-header {
  display:flex; align-items:center; gap:12px; padding:10px 16px 8px;
  border-bottom:1px solid var(--border); flex-shrink:0; flex-wrap:wrap;
}
.sro-back  { color:var(--blue); text-decoration:none; font-size:0.85em; }
.sro-back:hover { text-decoration:underline; }
.sro-title { font-weight:700; font-size:1.05em; color:var(--orange); }
.sro-meta  { font-size:0.8em; color:var(--subtext0); }
.sro-min   { font-size:0.78em; color:var(--yellow); background:color-mix(in srgb,var(--yellow) 12%,transparent); border-radius:6px; padding:2px 8px; }
.sro-basket-total { font-size:0.82em; color:var(--green); font-weight:600; margin-left:auto; }

.sro-tabs {
  display:flex; gap:4px; padding:8px 16px 0;
  border-bottom:1px solid var(--border); flex-shrink:0;
}
.sro-tab {
  background:none; border:none; border-bottom:2px solid transparent;
  color:var(--subtext0); padding:6px 14px; font-size:0.85em; cursor:pointer;
  position:relative; top:1px; transition:color 0.15s;
}
.sro-tab:hover { color:var(--text); }
.sro-tab.active { color:var(--blue); border-bottom-color:var(--blue); font-weight:600; }
.sro-badge { background:var(--blue); color:#fff; border-radius:10px; padding:1px 6px; font-size:0.75em; margin-left:4px; }

.sro-pane { display:flex; flex-direction:column; flex:1; overflow:hidden; }

.sro-filter-bar {
  display:flex; align-items:center; gap:6px; padding:8px 16px;
  border-bottom:1px solid var(--border); flex-shrink:0; flex-wrap:wrap;
}
.sro-filter-label { font-size:0.8em; color:var(--subtext0); margin-right:4px; }
.sro-win {
  background:var(--surface); border:1px solid var(--border); color:var(--subtext0);
  border-radius:6px; padding:4px 10px; font-size:0.8em; cursor:pointer;
}
.sro-win.active { background:var(--blue); border-color:var(--blue); color:#fff; }
.sro-oos-toggle { font-size:0.8em; color:var(--subtext0); margin-left:auto; display:flex; align-items:center; gap:5px; cursor:pointer; }

.sro-genre {
  background:var(--surface); border:1px solid var(--border); color:var(--subtext0);
  border-radius:6px; padding:4px 10px; font-size:0.78em; cursor:pointer;
}
.sro-genre.active { background:var(--mauve); border-color:var(--mauve); color:#fff; }

.sro-search {
  background:var(--surface); border:1px solid var(--border); border-radius:7px;
  color:var(--text); padding:5px 12px; font-size:0.85em; outline:none; width:240px;
}
.sro-search:focus { border-color:var(--blue); }

.sro-table-wrap { flex:1; overflow-y:auto; }
.sro-table { width:100%; border-collapse:collapse; font-size:0.83em; }
.sro-table thead th {
  position:sticky; top:0; background:var(--surface); padding:8px 10px;
  text-align:left; font-size:0.78em; color:var(--subtext0); font-weight:600;
  border-bottom:2px solid var(--border); white-space:nowrap;
}
.sro-row { border-bottom:1px solid var(--border); }
.sro-row:hover { background:var(--surface); }
.sro-row-ordered { opacity:0.55; }
.sro-td-name { padding:7px 10px; font-weight:500; }
.sro-td-num  { padding:7px 10px; text-align:center; font-variant-numeric:tabular-nums; }
.sro-val-red   { color:var(--red);    font-weight:700; }
.sro-val-amber { color:var(--yellow); font-weight:700; }
.sro-avail-yes { color:var(--green); font-weight:700; }
.sro-avail-no  { color:var(--red); }
.sro-empty { padding:48px; text-align:center; color:var(--subtext0); font-size:0.9em; }

.sro-qty-input {
  width:56px; background:var(--bg); border:1px solid var(--border);
  border-radius:5px; padding:3px 6px; color:var(--text);
  font-size:0.85em; text-align:center; outline:none;
}
.sro-qty-input:focus { border-color:var(--blue); }

.sro-add-btn {
  background:var(--surface); border:1px solid var(--border); color:var(--text);
  border-radius:5px; padding:3px 10px; font-size:0.8em; cursor:pointer; white-space:nowrap;
}
.sro-add-btn:hover { border-color:var(--blue); color:var(--blue); }
.sro-add-btn.in-basket { background:var(--green); border-color:var(--green); color:#fff; }

.sro-del-btn {
  background:none; border:none; cursor:pointer; color:var(--subtext0);
  padding:3px 6px; border-radius:4px; font-size:0.9em;
}
.sro-del-btn:hover { color:var(--red); background:color-mix(in srgb,var(--red) 12%,transparent); }

.sro-genre-tag { display:inline-block; margin-left:6px; font-size:0.72em; color:var(--subtext0); background:var(--surface); border-radius:4px; padding:1px 5px; font-weight:400; }
.sro-ordered-tag { font-size:0.72em; color:var(--green); background:color-mix(in srgb,var(--green) 12%,transparent); border-radius:4px; padding:1px 5px; margin-left:4px; }
.sro-pending-tag { font-size:0.72em; color:var(--yellow); }

.sro-order-toolbar {
  display:flex; align-items:center; gap:10px; padding:8px 16px;
  border-bottom:1px solid var(--border); flex-shrink:0; flex-wrap:wrap;
}
.sro-order-total { font-weight:700; font-size:0.95em; }
.sro-order-min  { font-size:0.82em; border-radius:6px; padding:2px 8px; }
.sro-order-min.below { color:var(--red);   background:color-mix(in srgb,var(--red) 10%,transparent); }
.sro-order-min.met   { color:var(--green); background:color-mix(in srgb,var(--green) 10%,transparent); }
.sro-print-btn { background:var(--blue); border:none; color:#fff; border-radius:7px; padding:5px 14px; font-size:0.82em; cursor:pointer; }
.sro-print-btn:hover { filter:brightness(1.1); }
.sro-clear-btn { background:none; border:1px solid var(--border); color:var(--subtext0); border-radius:6px; padding:5px 12px; font-size:0.82em; cursor:pointer; margin-left:auto; }
.sro-clear-btn:hover { border-color:var(--red); color:var(--red); }

.ro-sup-link { color:inherit; text-decoration:none; border-bottom:1px dashed var(--subtext0); }
.ro-sup-link:hover { color:var(--blue); border-bottom-color:var(--blue); }

/* Supplier page — Reorder button + card name link */
.sup-btn-reorder {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .5rem 1.1rem;
  background: var(--mauve);
  color: var(--base);
  border-radius: 8px;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  transition: filter .15s;
}
.sup-btn-reorder:hover { filter: brightness(1.12); }

.sup-card-name-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: color .15s;
}
.sup-card-name-link:hover { color: var(--mauve); }

/* Booker Weekend Plan */
.bo-weekend-toolbar { display:flex; justify-content:space-between; align-items:center; padding:10px 16px; flex-wrap:wrap; gap:8px; }
.bo-weekend-grid    { display:grid; grid-template-columns:1fr 1fr; gap:0; flex:1; overflow:auto; }
.bo-day-col         { padding:16px; border-right:1px solid var(--surface1); display:flex; flex-direction:column; }
.bo-day-col:last-child { border-right:none; }
.bo-day-header      { font-size:1.1em; font-weight:700; color:var(--mauve); margin-bottom:12px; padding-bottom:8px; border-bottom:2px solid var(--surface1); }
.bo-wk-row          { display:flex; align-items:center; gap:8px; padding:5px 0; border-bottom:1px solid var(--surface0); }
.bo-wk-name         { flex:1; font-size:0.92em; }
.bo-wk-qty          { width:60px !important; }
.bo-wk-empty        { color:var(--subtext0); font-size:0.88em; padding:8px 0; }

/* Delivery review modal */
.dlv-summary        { display:flex; gap:16px; padding:10px 0 14px; font-weight:600; }
.dlv-ok             { color:var(--green); }
.dlv-warn           { color:var(--yellow); }
.dlv-table-wrap     { max-height:55vh; overflow-y:auto; }
.dlv-table          { width:100%; border-collapse:collapse; font-size:0.88em; }
.dlv-table thead th { position:sticky; top:0; background:var(--surface0); padding:6px 8px;
                       text-align:left; border-bottom:2px solid var(--surface1); white-space:nowrap; }
.dlv-table td       { padding:6px 8px; border-bottom:1px solid var(--surface0); vertical-align:middle; }
.dlv-row-warn td    { background:color-mix(in srgb, var(--yellow) 8%, transparent); }
.dlv-badge-green    { background:var(--green); color:var(--base); border-radius:4px; padding:1px 5px; font-size:0.75em; font-weight:700; }
.dlv-badge-warn     { background:var(--yellow); color:var(--base); border-radius:4px; padding:1px 5px; font-size:0.75em; font-weight:700; }
.dlv-sku            { font-family:monospace; font-size:0.9em; }
.dlv-desc         { display:inline-block; min-width:40px; border-radius:3px; padding:1px 3px; cursor:text; }
.dlv-desc:hover   { background:var(--surface1); }
.dlv-desc:focus   { background:var(--surface1); outline:1px solid var(--mauve); }
.dlv-sku-input      { background:var(--surface1); border:1px solid var(--overlay0); border-radius:4px;
                       color:var(--text); padding:3px 6px; font-size:0.85em; width:120px; }

/* ── Home outer wrapper ───────────────────────────────────── */
.home-outer {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  flex: 1;
  overflow: hidden;
  height: 100%;
}
.home-outer .hub-page {
  flex: 1;
  overflow-y: auto;
  align-items: center;
}

/* ── Opening checklist sidebar ────────────────────────────── */
.checklist-sidebar {
  width: 240px;
  min-width: 160px;
  max-width: 480px;
  height: 100%;
  overflow-y: auto;
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 14px 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
  position: relative;
}
.cl-resize-handle {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  cursor: col-resize;
  z-index: 10;
  transition: background .15s;
}
.cl-resize-handle:hover,
.cl-resize-handle.dragging {
  background: var(--lavender);
  opacity: 0.5;
}
.cl-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.cl-title   { font-weight: 700; font-size: 0.97em; color: var(--text); }
.cl-progress {
  font-size: 0.82em; color: var(--subtext);
  background: var(--surface1, #2a2a3e);
  padding: 2px 7px; border-radius: 10px;
}
.cl-alert {
  display: flex; flex-direction: column; gap: 5px;
  background: color-mix(in srgb, var(--red) 15%, transparent);
  border: 1px solid var(--red);
  border-radius: 8px; padding: 8px 10px;
  font-size: 0.82em; color: var(--red); font-weight: 600;
  margin-bottom: 4px;
}
.cl-snooze-btn {
  background: var(--red); color: var(--base);
  border: none; border-radius: 5px;
  padding: 4px 8px; font-size: 0.78em; font-weight: 600;
  cursor: pointer; align-self: flex-start;
  transition: filter .15s;
}
.cl-snooze-btn:hover { filter: brightness(1.15); }
.cl-section-label {
  font-size: 0.72em; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--subtext); padding: 6px 2px 2px;
}
.cl-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 6px 4px; border-radius: 7px;
  transition: background .12s; position: relative;
}
.cl-item:hover { background: var(--surface1, #2a2a3e); }
.cl-check {
  flex-shrink: 0; width: 26px; height: 26px;
  border-radius: 6px; border: 2px solid var(--border);
  background: transparent; color: transparent;
  font-size: 0.9em; font-weight: 700; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; padding: 0;
}
.cl-check:hover { border-color: var(--lavender); color: var(--lavender); }
.cl-done .cl-check {
  background: var(--green); border-color: var(--green); color: var(--base);
}
.cl-label {
  font-size: 0.84em; color: var(--text);
  line-height: 1.35; flex: 1; padding-top: 2px;
  transition: color .12s;
}
.cl-label small { color: var(--subtext); font-size: 0.9em; }
.cl-done .cl-label { color: var(--subtext); text-decoration: line-through; }
.cl-pri-dot {
  font-size: 0.6em; color: var(--red);
  line-height: 1; padding-top: 4px; flex-shrink: 0;
}
.cl-done .cl-pri-dot { color: var(--green); }
.cl-reset-btn {
  margin-top: auto; padding-top: 14px;
  background: none; border: none; color: var(--subtext);
  font-size: 0.78em; cursor: pointer; text-decoration: underline;
  align-self: center; transition: color .15s;
}
.cl-reset-btn:hover { color: var(--red); }
