/*
 * GAPO-HEADER
 * Project: Vintage Audio Drops (gtvad)
 * Path: assets/app.css
 * Author: Duncan Ogweno
 * Contact: tech@ogweno.net . ogweno.net
 * Created: 2026-11-30
 * Changed: 2026-11-30 (build v0.0.0-261130)
 * Copyright (c) GAPO Tech. All rights reserved.
 * #GTVAD0001
 */
/* Vintage Audio Drops: GAPO base look (Lenana) in the app's three colours. Light and dark from the same tokens. */
@font-face { font-family: "GAPO Speaks"; src: url("fonts/GAPOSpeaks-Bold.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }
:root {
  --accent: #0b6e69; --accent2: #e8a33a; --accent3: #fbe9c8;
  --bg: #f3f2ee; --card: #ffffff; --ink: #1a1b1d; --muted: #61646a; --line: #e2e0d9; --field: #ffffff;
  --ok: #1d7a46; --ok-soft: #dcefe3; --warn: #9a5a00; --warn-soft: #f8e7c9; --bad: #a3322a; --bad-soft: #f6dedb;
  --lcd-bg: #1d1a14; --lcd-ink: #ffb53d;
  --shadow: 0 1px 2px rgba(20,20,20,.05), 0 8px 24px rgba(20,20,20,.07);
  --f-head: "GAPO Speaks", "Chakra Petch", "Arial Narrow", sans-serif;
  --f-body: "Figtree", "Segoe UI", Roboto, system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #121315; --card: #1c1d20; --ink: #ecebe6; --muted: #a3a5a0; --line: #303236; --field: #25272b;
  --ok: #62cf8d; --ok-soft: #173826; --warn: #f0a83c; --warn-soft: #3b2a10; --bad: #f08479; --bad-soft: #3d1c19;
  --lcd-bg: #0b0a08; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3); color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #121315; --card: #1c1d20; --ink: #ecebe6; --muted: #a3a5a0; --line: #303236; --field: #25272b;
  --ok: #62cf8d; --ok-soft: #173826; --warn: #f0a83c; --warn-soft: #3b2a10; --bad: #f08479; --bad-soft: #3d1c19;
  --lcd-bg: #0b0a08; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3); color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15.5px/1.55 var(--f-body); }
body.has-cart { padding-bottom: 84px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--f-head); font-weight: 700; line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); } h2 { font-size: 1.4rem; } h3 { font-size: 1.12rem; }
p { margin: 0; }
a { color: var(--accent); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent2); outline-offset: 2px; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .strong { font-weight: 700; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.good { color: var(--ok); } .badtext { color: var(--bad); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.eyebrow { font-family: var(--f-head); text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: var(--muted); font-weight: 600; }
[hidden] { display: none !important; }

/* top bar */
.topbar { background: var(--accent); color: #fff; padding-top: env(safe-area-inset-top, 0px); }
.topbar-in { display: flex; align-items: center; gap: 12px; padding-block: 10px; flex-wrap: wrap; }
.crest-link { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; margin-right: auto; min-width: 0; }
.crest { background: #fff; color: var(--accent); font-family: var(--f-head); font-weight: 700; border-radius: 10px; padding: 6px 8px; font-size: .95rem; letter-spacing: .04em; }
.brand { display: flex; flex-direction: column; line-height: 1.15; }
.brand b { font-family: var(--f-head); font-size: 1.1rem; }
.brand .suffix { color: rgba(255,255,255,.7); font-weight: 500; }
.brand b + .suffix { display: inline; }
.brand small { color: rgba(255,255,255,.82); font-size: .8rem; }
.navwrap { order: 3; width: 100%; }
.navwrap > summary { list-style: none; cursor: pointer; display: inline-flex; }
.navwrap > summary::-webkit-details-marker { display: none; }
.nav { display: flex; flex-direction: column; gap: 10px; padding: 10px 0 4px; }
.navgroup { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.navlabel { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.7); width: 100%; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; cursor: pointer; font-size: .92rem; white-space: nowrap; }
.pill.active { background: var(--accent2); border-color: var(--accent2); color: #1d1a14; font-weight: 600; }
.topbar .pill { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #fff; }
.topbar .pill.active { background: #fff; color: var(--accent); border-color: #fff; }
.topbar .pill.ghost { background: transparent; }
.me { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--accent); display: grid; place-items: center; font-weight: 700; font-family: var(--f-head); }
@media (min-width: 900px) {
  .navwrap { order: 0; width: auto; }
  .navwrap > summary { display: none; }
  .navwrap:not([open]) > .nav, .nav { display: flex; flex-direction: row; padding: 0; gap: 14px; }
  .navlabel { display: none; }
}
@media (max-width: 899px) { .me-name { display: none; } }
.clientbar { padding-block: 8px; font-size: .9rem; }
.clientbar select { width: auto; display: inline-block; padding: 4px 8px; }

main.main { padding-block: 22px 48px; display: flex; flex-direction: column; gap: 20px; }
.narrow-main { max-width: 640px; }
.card { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.card.narrow { max-width: 520px; width: 100%; margin-inline: auto; }
.two-col { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .two-col { grid-template-columns: 1fr 1fr; } }
.bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.pills-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.toggle { display: inline-flex; gap: 6px; align-items: center; font-size: .92rem; cursor: pointer; }

/* forms and buttons */
label.f { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .93rem; }
label.f .hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
label.radio { display: flex; gap: 8px; align-items: flex-start; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { width: 100%; min-width: 0; border: 1px solid var(--line); background: var(--field); border-radius: 10px; padding: 10px 12px; font-size: 16px; }
textarea { min-height: 110px; resize: vertical; }
textarea.mono { font-size: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 9px 16px; font-weight: 700; cursor: pointer; text-decoration: none; color: var(--ink); }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.amber { background: var(--accent2); border-color: var(--accent2); color: #1d1a14; }
.btn.danger { color: var(--bad); }
.btn.small { padding: 6px 12px; font-size: .88rem; }
.btn.picked { background: var(--accent3); border-color: var(--accent2); color: #1d1a14; }
.btn.ghost-light { background: transparent; color: inherit; border-color: currentColor; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.flash { border-radius: 10px; padding: 10px 14px; background: var(--ok-soft); color: var(--ok); font-weight: 500; }
.flash.warn { background: var(--warn-soft); color: var(--warn); }
.flash.bad { background: var(--bad-soft); color: var(--bad); }
.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }

/* tables */
.tablewrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.t th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 0; font-size: .95rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }

/* KPI tiles */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tile { background: var(--accent3); border-radius: 14px; padding: 14px; border-bottom: 3px solid var(--accent2); color: #1d1a14; }
.tile .big { font-family: var(--f-head); font-size: 1.9rem; font-weight: 700; line-height: 1; }
.tile .lbl { font-size: .85rem; }

/* status pills */
.pill-s { display: inline-flex; border-radius: 999px; padding: 1px 9px; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.pill-s.available { background: var(--ok-soft); color: var(--ok); }
.pill-s.reserved, .pill-s.pending { background: var(--warn-soft); color: var(--warn); }
.pill-s.sold, .pill-s.confirmed { background: var(--ink); color: var(--bg); }
.pill-s.rejected { background: var(--bad-soft); color: var(--bad); }
.pill.pending, .pill.confirmed, .pill.rejected { cursor: default; }
.pill.pending { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.confirmed { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.rejected { background: var(--bad-soft); color: var(--bad); border-color: transparent; }

/* public drop page */
.shop-head { display: flex; flex-direction: column; gap: 4px; }
.drop-head { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .drop-head { grid-template-columns: 1.3fr 1fr; align-items: end; } }
.drop-title { font-size: clamp(1.6rem, 5.5vw, 2.4rem); }
.state { display: inline-flex; gap: 8px; align-items: center; font-family: var(--f-head); text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; color: var(--muted); font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.state.open .dot { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); animation: pulse 1.6s infinite; }
.state.upcoming .dot { background: var(--accent2); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px transparent; } }
@media (prefers-reduced-motion: reduce) { .state.open .dot { animation: none; } }
.lcd { background: var(--lcd-bg); border-radius: 12px; padding: 14px 16px 12px; box-shadow: inset 0 2px 10px rgba(0,0,0,.6); color: var(--lcd-ink); }
.lcd-label { font-family: var(--f-head); text-transform: uppercase; letter-spacing: .16em; font-size: .76rem; opacity: .8; }
.lcd-digits { display: flex; gap: 6px; align-items: flex-end; font-family: var(--f-mono); font-weight: 700; font-size: clamp(1.9rem, 9vw, 2.8rem); line-height: 1.1; text-shadow: 0 0 12px rgba(255,170,40,.45); }
.lcd-unit { display: flex; flex-direction: column; align-items: center; }
.lcd-unit small { font-size: .6rem; letter-spacing: .2em; opacity: .6; font-family: var(--f-head); }
.lcd-sep { opacity: .5; padding-bottom: 14px; }
.lcd.closed .lcd-digits { color: #5a4520; text-shadow: none; }
.steps { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.item { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.item.sel { box-shadow: 0 0 0 3px var(--accent2), var(--shadow); }
.item.dim .media { filter: grayscale(.85); opacity: .7; }
.media { position: relative; aspect-ratio: 1 / 1; background: var(--accent3); max-width: 100%; }
.media img, .media svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.media .pill-s { position: absolute; top: 8px; left: 8px; }
.item-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.item .meta { font-size: .8rem; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.item .meta b { color: var(--ink); font-family: var(--f-head); letter-spacing: .05em; text-transform: uppercase; }
.item-title { font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.price { font-weight: 700; margin-top: auto; }
.log { padding: 0; overflow: hidden; }
.log-row { display: grid; grid-template-columns: 2.6rem 1fr auto; gap: 4px 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.log-row:first-child { border-top: 0; }
.log-row .n { color: var(--muted); font-weight: 700; }
.log-row .who { min-width: 0; } .log-row .nm { font-weight: 600; } .log-row .items { overflow-wrap: anywhere; }
.log-row .right { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; text-align: right; }
.log-row.rejected .nm, .log-row.rejected .items { text-decoration: line-through; color: var(--muted); }
.empty { padding: 22px 16px; text-align: center; color: var(--muted); }
.loading { padding: 40px 0; text-align: center; color: var(--muted); }
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--ink); color: var(--bg); padding-bottom: env(safe-area-inset-bottom, 0px); }
.cart-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; }
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(10,10,10,.55); display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 720px) { .overlay { align-items: center; } }
.sheet { background: var(--card); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: 16px 16px 0 0; display: flex; flex-direction: column; gap: 14px;
  padding: 20px max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
@media (min-width: 720px) { .sheet { border-radius: 16px; padding: 24px; } }
.sheet-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.x { border: 0; background: transparent; font-size: 1.7rem; line-height: 1; cursor: pointer; color: var(--muted); }
.lines { display: flex; flex-direction: column; gap: 4px; }
.line { display: flex; justify-content: space-between; gap: 10px; }
.line .mono { white-space: nowrap; }
.line.total { font-weight: 700; border-top: 1px solid var(--line); padding-top: 6px; }
.note { background: var(--accent3); color: #1d1a14; border-radius: 10px; padding: 10px 12px; }
.parse { background: var(--bg); border-radius: 10px; padding: 10px 12px; }

/* admin */
.res-card { display: flex; flex-direction: column; gap: 10px; }
.res-card.pending { border-left: 4px solid var(--accent2); }
.res-card.confirmed { border-left: 4px solid var(--ok); }
.res-card.rejected { border-left: 4px solid var(--bad); opacity: .85; }
pre.sms { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--f-mono); font-size: .84rem; background: var(--bg); padding: 10px; border-radius: 10px; margin: 6px 0 0; }
.irow { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.irow:first-child { border-top: 0; }
.thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--accent3); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.form-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } .form-grid .wide { grid-column: 1 / -1; } }
.progress { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent2); }

/* footer */
.foot { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: .85rem; }
.foot-in { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; }
@media (max-width: 640px) { .foot-in { justify-content: center; text-align: center; } }
.gt { color: #0f8a3c; font-weight: 700; text-decoration: none; }
.gt-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #f28c13; margin-left: 2px; vertical-align: super; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 60; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.updbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: #0f6b43; color: #fff; text-align: center; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); }
