/* [Claude 2026-11-14] Hadi: « it looks like a black and white TV from 1970, I want an 8K OLED TV from 2030 ».
   One stylesheet, loaded last, that gives the shared surfaces depth instead of flat grey: layered surfaces with soft
   shadows, a faint glow of the shop's colour (--accent) behind the page, elevated cards, gradient primary buttons, a
   glowing active pill in the navigation, a cleaner top bar and bigger page titles. CSS only: no behaviour changes.
   Weak POS GPU: no blur filter, nothing animates a shadow, the page glow is a static gradient (no fixed attachment).
   Remove this file's <link> in index.html to go back to the previous look. */

/* ---------- tokens ---------- */
:root {
  --bg: #eef1f6; --surface: #ffffff; --surface-2: #f5f7fb; --surface-3: #e7ebf2;
  --line: rgba(15,23,42,.08); --line-2: rgba(15,23,42,.13);
  --text: #0b1220; --muted: rgba(11,18,32,.64); --faint: rgba(11,18,32,.34);
  --fill: rgba(15,23,42,.055); --fill-2: rgba(15,23,42,.09); --hover: rgba(15,23,42,.035); --pressed: rgba(15,23,42,.07);
  --green: #12b76a; --green-soft: rgba(18,183,106,.13); --red: #f04438; --red-soft: rgba(240,68,56,.12);
  --orange: #f79009; --orange-soft: rgba(247,144,9,.14); --blue: #2e90fa; --blue-soft: rgba(46,144,250,.12);
  --radius: 16px; --radius-sm: 12px; --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(15,23,42,.05), 0 6px 18px -6px rgba(15,23,42,.10);
  --shadow-hi: 0 2px 4px rgba(15,23,42,.05), 0 14px 32px -10px rgba(15,23,42,.18);
  --edge: inset 0 1px 0 rgba(255,255,255,.7);
  --material: rgba(246,248,252,.94); --material-line: rgba(15,23,42,.08);
  --page-glow: radial-gradient(1100px 520px at 0% 14%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 70%),
               radial-gradient(900px 480px at 100% 40%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #05070b; --surface: #10141b; --surface-2: #161b24; --surface-3: #1f2531;
  --line: rgba(255,255,255,.07); --line-2: rgba(255,255,255,.12);
  --text: #f4f6fb; --muted: rgba(228,233,244,.68); --faint: rgba(228,233,244,.32);
  --fill: rgba(255,255,255,.06); --fill-2: rgba(255,255,255,.1); --hover: rgba(255,255,255,.04); --pressed: rgba(255,255,255,.09);
  --green: #32d583; --green-soft: rgba(50,213,131,.16); --red: #ff5a4e; --red-soft: rgba(255,90,78,.17);
  --orange: #fdb022; --orange-soft: rgba(253,176,34,.16); --blue: #53b1fd; --blue-soft: rgba(83,177,253,.17);
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 10px 28px -12px rgba(0,0,0,.8);
  --shadow-hi: 0 1px 0 rgba(255,255,255,.06) inset, 0 18px 40px -14px rgba(0,0,0,.9);
  --edge: inset 0 1px 0 rgba(255,255,255,.05);
  --material: rgba(10,13,19,.94); --material-line: rgba(255,255,255,.08);
  --page-glow: radial-gradient(1100px 520px at 0% 14%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 70%),
               radial-gradient(900px 480px at 100% 40%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
} }
:root[data-theme="dark"] {
  --bg: #05070b; --surface: #10141b; --surface-2: #161b24; --surface-3: #1f2531;
  --line: rgba(255,255,255,.07); --line-2: rgba(255,255,255,.12);
  --text: #f4f6fb; --muted: rgba(228,233,244,.68); --faint: rgba(228,233,244,.32);
  --fill: rgba(255,255,255,.06); --fill-2: rgba(255,255,255,.1); --hover: rgba(255,255,255,.04); --pressed: rgba(255,255,255,.09);
  --green: #32d583; --green-soft: rgba(50,213,131,.16); --red: #ff5a4e; --red-soft: rgba(255,90,78,.17);
  --orange: #fdb022; --orange-soft: rgba(253,176,34,.16); --blue: #53b1fd; --blue-soft: rgba(83,177,253,.17);
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 10px 28px -12px rgba(0,0,0,.8);
  --shadow-hi: 0 1px 0 rgba(255,255,255,.06) inset, 0 18px 40px -14px rgba(0,0,0,.9);
  --edge: inset 0 1px 0 rgba(255,255,255,.05);
  --material: rgba(10,13,19,.94); --material-line: rgba(255,255,255,.08);
  --page-glow: radial-gradient(1100px 520px at 0% 14%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 70%),
               radial-gradient(900px 480px at 100% 40%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
}

/* ---------- page ---------- */
body:not(:has(.login)):not(:has(.pos-lock)) { background: var(--page-glow), var(--bg); background-repeat: no-repeat; }
h1 { letter-spacing: -.03em; }
.ltitle .lt-row h1.lt, .main > .ltitle h1 { font-size: clamp(28px, 3.2vw, 36px); font-weight: 800; letter-spacing: -.035em; }

/* ---------- navigation rail (tablet / desktop) ---------- */
.side { background: color-mix(in srgb, var(--surface) 70%, var(--bg)); border-right: 1px solid var(--line); }
.side.rail nav a { transition: background .18s var(--out), color .18s var(--out); }
.side.rail nav a:hover { background: var(--hover); }
.side.rail nav a.on {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 22%, var(--surface)), color-mix(in srgb, var(--accent) 12%, var(--surface)));
  color: var(--accent-text);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent), 0 8px 22px -8px color-mix(in srgb, var(--accent) 55%, transparent), var(--edge);
}
.side.rail nav a.on::before { content: ""; position: absolute; left: -8px; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.side nav a { position: relative; }

/* ---------- top bar ---------- */
.app-top { background: var(--material); border-bottom: 1px solid var(--material-line); box-shadow: 0 6px 20px -16px rgba(15,23,42,.35); }
.ctabs { background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); }
.ctab.on, :root[data-theme="dark"] .ctab.on { background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ctab.on { background: var(--surface-3); box-shadow: var(--shadow), 0 0 0 1px var(--line-2); } }
:root[data-theme="dark"] .ctab.on { background: var(--surface-3); }
.app-top .action-corner-trigger { background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--line); border-radius: 14px; }

/* ---------- buttons ---------- */
.btn { border-radius: 14px; transition: transform .12s var(--out), background .18s var(--out), filter .18s var(--out); }
.btn.primary, .app-top .master-scan-button, .chip.on {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, white), var(--accent) 55%, color-mix(in srgb, var(--accent) 86%, black));
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.28) inset, 0 8px 20px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn.primary:hover, .app-top .master-scan-button:hover { filter: brightness(1.05); }
.btn.primary:active, .btn.primary.is-pressed, .app-top .master-scan-button:active { transform: scale(.97); filter: brightness(.96); }
.btn.green { background: linear-gradient(180deg, color-mix(in srgb, var(--green) 85%, white), var(--green) 60%); box-shadow: 0 8px 20px -10px var(--green); }
.btn.red { background: linear-gradient(180deg, color-mix(in srgb, var(--red) 85%, white), var(--red) 60%); box-shadow: 0 8px 20px -10px var(--red); }
.btn.ghost { box-shadow: none; }
.sl-paybtn { border-radius: 18px; box-shadow: 0 1px 0 rgba(255,255,255,.28) inset, 0 12px 28px -10px color-mix(in srgb, var(--accent) 75%, transparent); }

/* ---------- segmented controls, chips ---------- */
.seg { background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); border-radius: 12px; padding: 3px; }
.seg button { border-radius: 9px; min-height: 34px; }
.seg button.on { background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--line); color: var(--text); }
:root[data-theme="dark"] .seg button.on { background: var(--surface-3); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg button.on { background: var(--surface-3); } }
.chip { background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(15,23,42,.04); }

/* ---------- cards and lists ---------- */
.card, .kpi, .home-figure, .home-issue-list, .om-card, .sl-cart:not(.in-sheet), .sl-tile {
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.card { border-radius: var(--radius-lg); }
.kpi, .home-figure { border-radius: 18px; }
.home-issue-list { border-radius: 18px; }
.kpi .v, .home-figure strong { letter-spacing: -.03em; }
.list > .item { transition: background .15s var(--out); }
.list > button.item:hover, .list > a.item:hover, .home-issue:hover { background: var(--hover); }
.list > .item:not(:last-child)::after { background: var(--line); height: 1px; }
.itile { border-radius: 10px; box-shadow: 0 4px 10px -4px color-mix(in srgb, var(--c, var(--gray)) 70%, transparent), inset 0 1px 0 rgba(255,255,255,.25); }
.badge.count { box-shadow: 0 2px 8px -2px var(--red); }

/* home: the « today in brief » hero carries the shop's colour */
.home-brief-heading {
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 22px; padding: 18px 20px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 22%, var(--surface)) 0%, color-mix(in srgb, var(--accent) 8%, var(--surface)) 45%, var(--surface) 80%);
  box-shadow: var(--shadow-hi);
}
.home-brief-heading h2 { font-size: clamp(22px, 2.6vw, 32px); font-weight: 800; letter-spacing: -.03em; }
.home-kicker { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.home-figure strong { font-size: clamp(22px, 2.2vw, 30px); }
.home-issue-list header { border-bottom-color: var(--line); }
.home-issue-dot { box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 0%, transparent); }
.home-issue-dot[data-level=urgent] { box-shadow: 0 0 10px var(--red); }
.home-fresh i { box-shadow: 0 0 8px var(--green); }

/* ---------- POS ---------- */
.sl-tile { border-radius: 18px; transition: transform .12s var(--out); }
.sl-tile:hover { box-shadow: var(--shadow-hi); }
.sl-cart:not(.in-sheet) { border-radius: 22px; }

/* ---------- forms ---------- */
/* fields keep their own wrapper when one exists (search boxes, number pads): only bare fields get the new surface */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([class*="search"]):not([class*="search"] input):not(.pad input), select, textarea { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
input:not([class*="search"]):not([class*="search"] input):focus, select:focus, textarea:focus { box-shadow: 0 0 0 4px var(--accent-soft), inset 0 0 0 1.5px var(--accent) !important; background: var(--surface); }
/* search boxes: the label is the field; the input inside stays transparent */
.search { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); border-radius: 14px; min-height: 44px; padding: 0 12px; transition: box-shadow .15s var(--out); }
.search:focus-within { background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft), inset 0 0 0 1.5px var(--accent); }
.search input:not([type="checkbox"]):not([type="radio"]):not([type="range"]) { background: transparent; box-shadow: none !important; }

/* ---------- sheets, toasts, empty states ---------- */
.overlay { background: rgba(5,8,14,.48); }
.modal { border-radius: 22px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.45), 0 0 0 1px var(--line-2); }
.toast { border-radius: 16px; box-shadow: var(--shadow-hi), 0 0 0 1px var(--line); }
.empty svg.i { width: 56px; height: 56px; padding: 12px; border-radius: 18px; box-sizing: border-box; background: var(--accent-soft); color: var(--accent-text); stroke-width: 1.6; }
.empty { color: var(--muted); }

/* ---------- phone tab bar ---------- */
@media (max-width: 760px) {
  .bottom { background: var(--material); border-top: 1px solid var(--material-line); box-shadow: 0 -8px 24px -18px rgba(15,23,42,.4); }
  .bottom a.on, .bottom button.on { color: var(--accent-text); }
  .bottom a.on svg.i { filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--accent) 55%, transparent)); }
  .home-brief-heading { padding: 14px 16px; border-radius: 18px; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .btn, .sl-tile, .list > .item, .side.rail nav a { transition: none; }
  .btn.primary:active, .btn.primary.is-pressed { transform: none; }
}

/* [Claude 2026-11-19] Hadi: « work on the mobile app, the interface is not nice: sizes, banners, filters ». Phones (≤ 640 px): the
   chrome above the content is tighter (title, tabs on one scrolling line, search on its own full row, compact notices), so the
   first screen shows work, not headers. Tablets, tills and desktops are unchanged. */
@media (max-width: 640px) {
  .ltitle { gap: 8px; padding: 2px 14px 6px; }
  .ltitle .lt-row { min-height: 0; gap: 4px 8px; }
  .ltitle .lt-row h1.lt, .main > .ltitle h1 { font-size: 24px; letter-spacing: -.02em; flex: 1 1 auto; }
  .ltitle .lt-sub { font-size: 13px; margin-top: -4px; }
  .ltitle #top-actions { width: auto; margin-left: auto; gap: 2px; }
  .ltitle #top-actions .btn.ghost { font-size: 15px; min-height: 40px; min-width: 40px; padding-inline: 8px; }
  .ltitle #top-actions .btn.ghost svg.i { width: 22px; height: 22px; }
  /* section tabs: one line, swipe sideways, never a second row */
  .space-seg.workspace-tabs, .ltitle .seg.block { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; justify-content: flex-start; }
  .space-seg.workspace-tabs::-webkit-scrollbar, .ltitle .seg.block::-webkit-scrollbar { display: none; }
  .space-seg.workspace-tabs > *, .ltitle .seg.block > * { flex: 0 0 auto; white-space: nowrap; }
  /* header: slimmer scan row */
  .app-top .master-scan-row { margin-bottom: 6px; gap: 8px; }
  .app-top .master-scan-button { min-height: 44px; border-radius: 14px; }
  /* toolbars: the search takes the whole row, filters sit under it and scroll */
  #lt-tools .toolbar { flex-wrap: wrap; gap: 8px; }
  #lt-tools .toolbar > .search, #lt-tools .toolbar > .searchbar, #lt-tools .toolbar > label.search, #lt-tools > input[type="search"] { flex: 1 1 100%; min-width: 0; width: 100%; }
  .toolbar > .searchbar, #lt-tools .searchbar { flex-wrap: wrap; gap: 8px; width: 100%; }
  .searchbar > label.search { flex: 1 1 100%; min-width: 0; }
  .searchbar > .filter-btn { flex: 1 1 0; justify-content: center; min-height: 40px; white-space: nowrap; }
  /* selling: the till line is one compact banner (its long explanation stays on larger screens) */
  #view > .notice:has(~ .sl-left) .small.muted { display: none; }
  #view > .notice:has(~ .sl-left) { padding-block: 8px; }
  .sl-linkrow { min-height: 40px; }
  /* content: a little more width for cards, smaller notices */
  .content { padding-inline: 14px; }
  .notice { padding: 10px 12px; gap: 10px; font-size: 14px; border-radius: 14px; }
  .notice .btn.sm { min-height: 36px; padding-inline: 12px; white-space: nowrap; }
  .card.pad { padding: 14px; }
  /* sheets use the full width and never spill past the screen */
  .overlay .sheet, .overlay .modal { max-width: 100vw; }
}
