/* TechStore Stage 3: clean mobile-first polish on top of the working Stage 2 styles. */
:root {
  --bg:#f7f8fa; --card:#fff; --text:#18202e; --muted:#778294;
  --line:#e8ecf1; --primary:#16243a; --accent:#2563eb;
  --radius:22px; --shadow:0 4px 20px rgba(22,36,58,.035);
}
html {scroll-behavior:smooth;-webkit-text-size-adjust:100%;}
body {background:var(--bg);padding-bottom:calc(100px + env(safe-area-inset-bottom));}
a,button,input { -webkit-tap-highlight-color:transparent; }
button, .btn, .scan-btn, .filter-pill { transition:background-color .16s ease, transform .16s ease, border-color .16s ease; }
button:active:not(:disabled), .btn:active, .scan-btn:active {transform:scale(.985);}
:focus-visible { outline:3px solid #82aafa!important; outline-offset:3px; }
button:disabled {cursor:not-allowed;opacity:.48;transform:none!important;}
.topbar {background:rgba(247,248,250,.95);height:68px;border-bottom:1px solid #eef0f4;}
.brand {display:flex;align-items:center;gap:10px;min-width:0;font-size:15px;letter-spacing:-.03em;}
.brand-mark {display:grid;place-items:center;width:35px;height:35px;flex-shrink:0;border-radius:12px;background:var(--primary);color:white;font-size:18px;font-weight:800;}
.brand-label {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.topbar-right {display:flex;align-items:center;gap:8px;margin-left:12px;}
.connection-status {border-radius:99px;padding:7px 10px;background:#ffefeb;color:#9b3428;font-size:12px;font-weight:800;white-space:nowrap;}
.connection-status[hidden] {display:none;}
.user-pill {background:#fff;color:#495569;font-weight:700;}
.shell {padding-top:25px;}
h1,h2,h3 {letter-spacing:-.04em;color:var(--text);}
h1 {line-height:1.12;}
h2 {font-size:20px;line-height:1.22;}
.eyebrow {letter-spacing:.1em;font-size:11px;}
.hero {padding:20px 0 8px;}
.hero h1 {font-size:clamp(35px,7vw,55px);letter-spacing:-.06em;line-height:1.1;overflow-wrap:anywhere;}
.hero .muted {font-size:14px;}
.card,.product-hero,.action-card,.stat,.list-row,.product-card,.cart-row {box-shadow:var(--shadow);}
.card {padding:20px;border-radius:24px;}
.action-grid {gap:12px;}
.action-card {border-radius:22px;min-height:150px;position:relative;}
.action-card.primary-action {background:var(--primary);}
.action-card strong {font-size:19px;letter-spacing:-.03em;}
.action-icon {opacity:.84;}
.stats-grid {gap:12px;}
.stat {min-width:0;border-radius:20px;padding:19px 17px;}
.stat strong {font-size:22px;letter-spacing:-.045em;overflow-wrap:anywhere;}
.stat span {font-size:12px;}
.section-head {margin-bottom:6px;}
.section-head h1 {font-size:clamp(27px,5vw,38px);}
.section-head .btn {white-space:nowrap;}
.list-row,.product-card {min-height:75px;padding:15px 16px;}
.list-row strong,.product-card strong {line-height:1.35;overflow-wrap:anywhere;}
.list-row b,.product-card b {font-size:14px;white-space:nowrap;}
.muted {line-height:1.48;}
.stack input,.stack textarea,.stack select,.search input,.scan-field input,.inventory-product input,.date-range input {border-color:#dfe5ed;min-height:48px;box-shadow:none;}
.stack input:focus,.stack textarea:focus,.search input:focus,.scan-field input:focus,.inventory-product input:focus {outline:0;border-color:#648cec;box-shadow:0 0 0 4px rgba(37,99,235,.09);}
.btn {min-height:46px;display:inline-flex;align-items:center;justify-content:center;gap:8px;}
.btn.primary {background:var(--primary);color:#fff;}
.btn.large {min-height:51px;}
.btn.compact {min-height:40px;}
.btn:not(.primary):hover,.scan-btn:hover {background:#e6ebf2;}
.scan-field {align-items:stretch;gap:8px;min-width:0;}
.scan-field input {min-width:0;flex:1;font-size:16px;}
.scan-btn {min-width:80px;min-height:49px;white-space:nowrap;padding:0 16px;background:#edf1f6;color:var(--text);}
.search input {min-width:0;font-size:16px;}
.search button {min-width:75px;}
.filter-pills {display:flex;align-items:center;gap:8px;overflow-x:auto;scrollbar-width:none;padding:0 1px 13px;white-space:nowrap;}
.filter-pills::-webkit-scrollbar {display:none;}
.filter-pill {font-size:13px;font-weight:750;border:1px solid #e5e9ef;background:white;border-radius:999px;padding:10px 14px;}
.filter-pill.active {background:var(--primary);border-color:var(--primary);color:#fff;}
.stock {white-space:nowrap;}
.workflow-card {gap:18px;}
.workflow-intro {display:flex;align-items:flex-start;gap:12px;}
.workflow-intro h2 {margin:0 0 4px;font-size:19px;}
.workflow-intro p {margin:0;font-size:13px;}
.step-tag {width:30px;height:30px;flex:none;display:grid;place-items:center;border-radius:11px;background:#eef2f8;color:#4a5e78;font-size:11px;font-weight:900;}
.scan-action {min-height:72px;font-size:17px;letter-spacing:-.025em;border-radius:18px;width:100%;}
.scan-action::before {content:'⌗';font-size:27px;font-weight:500;line-height:1;}
.workflow-card label:not(.toggle-line) {font-size:13px;color:#5e6b7d;}
.toggle-line {display:flex!important;align-items:center;flex-direction:row!important;gap:10px!important;line-height:1.4;color:#57657a;font-size:13px!important;font-weight:600!important;cursor:pointer;}
.toggle-line input {width:19px!important;height:19px!important;min-height:auto;accent-color:var(--accent);margin:0;flex:none;}
.lookup-status {margin:0;padding:12px;text-align:center;}
.inventory-product {margin-top:0;border-top:1px solid var(--line);padding-top:18px;display:flex;flex-direction:column;gap:7px;}
.inventory-product .step-tag {margin-bottom:3px;}
.inventory-product h3 {font-size:22px;margin:0;}
.inventory-product p {margin:4px 0 7px;}
.inventory-product input {font-size:24px;font-weight:750;letter-spacing:-.03em;min-height:65px;}
.inventory-product .btn {min-height:56px;}
.inventory-product .inventory-note {text-align:center;font-size:12px;margin:0;}
.inventory-session {padding:18px 20px;border:1px solid #e0e9f8;background:#f0f5ff;}
.inventory-session .eyebrow {color:#4e6b9f;}
.sale-top {margin-bottom:18px;}
.sale-top h1 {margin-bottom:0;}
.cart-head {margin:12px 0 4px;}
.cart-head h2 {display:flex;align-items:center;gap:10px;margin:14px 0 10px;}
.cart-head h2 span {font-size:13px;font-weight:600;letter-spacing:0;}
.cart {margin:0 0 155px;gap:10px;}
.cart-empty {padding:38px 16px;border:1px dashed #dce4ee;border-radius:22px;background:#fff;}
.cart-empty strong {display:block;color:var(--text);font-size:16px;}
.cart-empty p {margin:7px 0 0;font-size:13px;}
.cart-row {align-items:flex-start;gap:12px;}
.cart-row .cart-content {min-width:0;}
.cart-row .cart-content strong {display:block;font-size:15px;overflow-wrap:anywhere;}
.cart-row .cart-content small {margin-top:5px;font-size:12px;line-height:1.4;}
.cart-row>b {white-space:nowrap;font-size:15px;}
.qty {gap:11px;margin-top:15px;}
.qty button {width:38px;height:38px;border:1px solid #e4e9f0;background:#f3f6fa;border-radius:12px;}
.qty span {font-variant-numeric:tabular-nums;font-weight:800;min-width:19px;text-align:center;}
.sale-bottom {bottom:calc(78px + env(safe-area-inset-bottom));box-shadow:0 -10px 25px rgba(22,36,58,.04);}
.sale-bottom strong {white-space:nowrap;letter-spacing:-.04em;}
.bottom-nav {height:calc(76px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);box-shadow:0 -10px 28px rgba(23,32,46,.035);gap:0;}
.bottom-nav a {min-width:0;max-width:155px;color:#778497;font-size:11px;font-weight:650;padding-top:5px;}
.bottom-nav .nav-icon {display:grid;place-items:center;width:36px;height:36px;}
.bottom-nav .nav-icon svg {width:22px;height:22px;}
.bottom-nav .nav-label {display:block;overflow:hidden;text-overflow:ellipsis;max-width:100%;white-space:nowrap;}
.bottom-nav a[aria-current="page"] {color:var(--primary);font-weight:850;}
.bottom-nav .nav-sale .nav-icon {width:49px;height:49px;min-height:49px;margin-top:-16px;margin-bottom:3px;background:var(--primary);color:white;border-radius:17px;box-shadow:0 7px 15px rgba(22,36,58,.22);}
.bottom-nav .nav-sale .nav-icon svg {width:27px;height:27px;}
.bottom-nav .nav-sale .nav-label {font-weight:800;color:var(--primary);}
.scanner-open {overflow:hidden;}
.scanner-modal {padding:10px;overscroll-behavior:contain;}
.scanner-panel {width:min(100%,510px);max-height:calc(100dvh - 20px);overflow:auto;background:#0f1928;padding:16px;border-radius:27px;color:#fff;box-shadow:0 30px 80px rgba(0,0,0,.2);}
.scanner-head {padding:0 0 15px;}
.scanner-head strong,.scanner-head small {display:block;}
.scanner-head strong {font-size:19px;letter-spacing:-.025em;}
.scanner-head small {color:#b6c4d9;font-size:12px;margin-top:4px;}
.scanner-head button {min-width:43px;min-height:43px;border-radius:50%;background:#243248;}
.scanner-viewport {position:relative;overflow:hidden;border-radius:19px;background:#080d15;}
.scanner-viewport video {display:block;width:100%;height:min(49vh,430px);min-height:210px;object-fit:cover;aspect-ratio:auto;border-radius:0;}
.scanner-frame {position:absolute;inset:21% 8%;pointer-events:none;}
.scanner-frame i {position:absolute;width:31px;height:31px;border:3px solid #75b3ff;}
.scanner-frame i:nth-child(1) {left:0;top:0;border-right:0;border-bottom:0;border-radius:10px 0 0 0;}
.scanner-frame i:nth-child(2) {right:0;top:0;border-left:0;border-bottom:0;border-radius:0 10px 0 0;}
.scanner-frame i:nth-child(3) {left:0;bottom:0;border-right:0;border-top:0;border-radius:0 0 0 10px;}
.scanner-frame i:nth-child(4) {right:0;bottom:0;border-left:0;border-top:0;border-radius:0 0 10px 0;}
#scannerStatus {font-size:13px;line-height:1.5;text-align:center;margin:12px 0;color:#d4e0ef;padding:0 4px;min-height:20px;}
.scanner-tool {width:100%;min-height:43px;background:#253955;color:white;border:1px solid #425775;border-radius:12px;margin:0 0 10px;}
.scanner-tool[hidden] {display:none;}
.scanner-manual {padding:13px 2px 0;border-top:1px solid #2b394c;}
.scanner-manual label {display:block;font-size:13px;color:#cad6e7;margin:0 0 9px;}
.scanner-manual input {background:#fff;color:#1f2b3e;border:0;}
.scanner-manual button {background:#e7effc;color:#10243f;}
.toast {bottom:calc(95px + env(safe-area-inset-bottom));padding:14px 18px;font-size:14px;line-height:1.4;}
@media(max-width:640px){
  .shell {padding:18px 15px;}
  .topbar {padding:0 15px;}
  .user-pill {max-width:36vw;}
  .action-card {min-height:140px;padding:16px;}
  .action-card strong {font-size:17px;}
  .stat {padding:16px 14px;}
  .stat strong {font-size:20px;}
  .cart-row>b {max-width:43%;overflow-wrap:anywhere;text-align:right;white-space:normal;}
  .scanner-modal {padding:0;align-items:stretch;}
  .scanner-panel {width:100%;max-height:100dvh;min-height:100dvh;border-radius:0;padding:calc(17px + env(safe-area-inset-top)) 15px calc(18px + env(safe-area-inset-bottom));}
  .scanner-viewport video {height:min(45vh,450px);min-height:170px;}
}
@media(min-width:900px){
  body {padding-bottom:35px;}
  .bottom-nav {height:76px;padding-bottom:0;position:sticky;bottom:18px;}
  .bottom-nav a {padding-top:5px;}
  .sale-bottom {bottom:24px;}
}
@media(prefers-reduced-motion:reduce){
  html {scroll-behavior:auto;}
  button,.btn,.filter-pill {transition:none;}
}
/* Stage 2 targeted every nav span; restore distinct icon and label typography. */
.bottom-nav .nav-label {font-size:11px;line-height:1.2;color:inherit;}
.bottom-nav .nav-icon {font-size:initial;color:inherit;}
.bottom-nav .nav-sale .nav-label {width:auto;height:auto;background:transparent;display:block;place-items:initial;box-shadow:none;border-radius:0;margin:0;color:var(--primary);font-size:11px;}
