/* =====================================================================
   Colourful theme layer (loaded after styles.css)
   ===================================================================== */
:root {
  --brand: #ff7a00;
  --brand-2: #ff3d6e;
  --brand-text: #d35400;
  --grad-brand: linear-gradient(135deg, #ff8a00 0%, #ff4f5e 100%);
  --vc: #007aff;
}
@media (prefers-color-scheme: dark) { :root { --brand-text: #ffa94d; } }

[data-nav="home"], body[data-view="home"] { --c: #007aff; --vc: #007aff; }
[data-nav="pos"], body[data-view="pos"] { --c: #ff8a00; --vc: #ff8a00; }
[data-nav="orders"], body[data-view="orders"] { --c: #af52de; --vc: #af52de; }
[data-nav="bills"], body[data-view="bills"] { --c: #30b0c7; --vc: #30b0c7; }
[data-nav="customers"], body[data-view="customers"] { --c: #ff2d55; --vc: #ff2d55; }
[data-nav="inventory"], body[data-view="inventory"] { --c: #34c759; --vc: #34c759; }
[data-nav="expenses"], body[data-view="expenses"] { --c: #ff3b30; --vc: #ff3b30; }
[data-nav="reports"], body[data-view="reports"] { --c: #5856d6; --vc: #5856d6; }
[data-nav="settings"], body[data-view="settings"] { --c: #8e8e93; --vc: #8e8e93; }
[data-nav="live"], body[data-view="live"] { --c: #ff6b00; --vc: #ff6b00; }
[data-nav="more"], body[data-view="more"] { --c: #636366; --vc: #636366; }

/* tinted navigation header per module */
.nav { background: linear-gradient(180deg, color-mix(in srgb, var(--vc) 14%, var(--bar)) 0%, var(--bar) 100%); }
.large-title.solo { padding-top: 18px; }
.lt-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lt-row h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subtitle { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* sidebar: coloured icon squares */
.sb-ic { width: 28px; height: 28px; border-radius: 8px; background: var(--c); color: #fff; flex: none; }
.sb-ic .ic { width: 17px; height: 17px; stroke-width: 2; }
.sb-nav a.active { background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--label); font-weight: 600; }
.sb-nav a.active .badge { background: var(--red-fill); color: #fff; }

/* tab bar uses module colour */
.tab.active { color: var(--c); }
.tab.active .ic { stroke-width: 2.1; }

/* colourful stat tiles */
.stat {
  position: relative; overflow: hidden;
  background: linear-gradient(145deg, color-mix(in srgb, var(--c, #007aff) 17%, var(--card)) 0%, var(--card) 72%);
  border: 0.5px solid color-mix(in srgb, var(--c, #007aff) 20%, transparent);
}
.stat-top { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--label-2); min-width: 0; }
.stat-top > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-ic { width: 26px; height: 26px; border-radius: 8px; background: var(--c, #007aff); color: #fff; display: grid; place-items: center; flex: none; }
.stat-ic .ic { width: 15px; height: 15px; stroke-width: 2.2; }
.stat strong { margin-top: 10px; }
.stat .stat-ic { display: grid; color: #fff; font-size: 0; }
.stat .stat-top > span:last-child { display: block; font-size: 13px; }

/* dashboard hero */
.hero {
  display: flex; align-items: stretch; justify-content: space-between; gap: 16px; margin-top: 16px;
  padding: 20px; border-radius: 18px; color: #fff; background: var(--grad-brand);
  box-shadow: 0 14px 30px -14px rgba(255, 106, 0, .7);
  position: relative; overflow: hidden;
}
.hero::after { content: ""; position: absolute; right: -60px; top: -70px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.12); }
.hero::before { content: ""; position: absolute; right: 120px; bottom: -90px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero-main { display: flex; flex-direction: column; gap: 4px; position: relative; z-index: 1; min-width: 0; }
.hero-label { font-size: 14px; font-weight: 600; opacity: .92; }
.hero-value { font-size: 40px; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.hero-sub { font-size: 14px; opacity: .95; }
.hero-side { display: flex; flex-direction: column; justify-content: center; gap: 10px; position: relative; z-index: 1; }
.hero-side div { background: rgba(255,255,255,.2); border-radius: 12px; padding: 8px 14px; min-width: 140px; }
.hero-side span { display: block; font-size: 12px; opacity: .92; }
.hero-side b { font-size: 18px; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .hero { flex-direction: column; }
  .hero-value { font-size: 34px; }
  .hero-side { flex-direction: row; }
  .hero-side div { flex: 1; min-width: 0; }
}

/* buttons & chips */
.btn-primary { background: var(--grad-brand); box-shadow: 0 8px 20px -10px rgba(255, 106, 0, .8); }
.btn-primary:disabled { background: var(--fill-2); box-shadow: none; }
.btn-secondary { background: color-mix(in srgb, var(--brand) 13%, var(--card)); color: var(--brand-text); }
.chips button.active { background: var(--grad-brand); color: #fff; }

/* POS rows tinted by item colour */
.add-btn { background: color-mix(in srgb, var(--c, #007aff) 15%, transparent); color: color-mix(in srgb, var(--c, #007aff) 80%, #000); }
@media (prefers-color-scheme: dark) { .add-btn { color: color-mix(in srgb, var(--c, #0a84ff) 65%, #fff); } }
.item-row.in-cart { background: color-mix(in srgb, var(--c) 8%, var(--card)); }
.item-row.in-cart .stepper { background: color-mix(in srgb, var(--c) 20%, transparent); }
.thumb { box-shadow: inset 0 -10px 18px rgba(0,0,0,.12); }
.total-row .row-value { color: var(--brand-text); }

/* misc colour accents */
.quick-btn { border: 0.5px solid var(--sep); }
.qi { box-shadow: 0 6px 14px -6px rgba(0,0,0,.35); }
.hbar-row .bar-fill { background: linear-gradient(90deg, var(--vc), color-mix(in srgb, var(--vc) 55%, #fff)); }
.bar-fill.low { background: var(--red-fill) !important; }

/* ---------- Customer Menu screen ---------- */
.live-hero {
  margin-top: 16px; padding: 20px; border-radius: 18px; color: #fff;
  background: linear-gradient(135deg, #ff8a00 0%, #ff3d6e 55%, #8f3cff 100%);
  display: flex; flex-direction: column; gap: 16px;
}
.lh-text b { display: block; font-size: 20px; margin-bottom: 4px; }
.lh-text span { font-size: 15px; opacity: .94; }
.lh-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-white { background: #fff; color: #d6304f; height: 44px; font-size: 16px; }
.btn-glass { background: rgba(255,255,255,.22); color: #fff; height: 44px; font-size: 16px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-green { background: var(--green-fill); }
.dot-red { background: var(--red-fill); }
.dot-orange { background: var(--orange-fill); }
.dot-gray { background: var(--label-3); }
.live-pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,199,89,.55); } 70% { box-shadow: 0 0 0 8px rgba(52,199,89,0); } 100% { box-shadow: 0 0 0 0 rgba(52,199,89,0); } }
.live-big.available { color: var(--green) !important; }
.live-big.few { color: var(--orange) !important; }
.live-big.soldout { color: var(--red) !important; }
.qr-card { background: #fff; color: #111; border-radius: 18px; padding: 22px; text-align: center; }
.qr-brand { display: flex; align-items: center; justify-content: center; gap: 10px; text-align: left; margin-bottom: 16px; }
.qr-brand img { border-radius: 10px; }
.qr-brand b { display: block; font-size: 17px; }
.qr-brand small { color: #6b6b70; }
.qr-box { display: grid; place-items: center; min-height: 220px; padding: 10px; }
.qr-card p { margin: 12px 0 4px; font-weight: 600; }
.qr-card code { font-family: var(--font); font-size: 13px; color: #6b6b70; }
