﻿/* ============================================================
   ANGEL GST MOBILE â€” Ultra Premium Design System
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Manrope:wght@600;700;800&display=swap');

:root {
  --bg: #060a14;
  --bg-2: #0b1120;
  --bg-3: #101a2e;
  --card: rgba(255, 255, 255, 0.055);
  --card-2: rgba(255, 255, 255, 0.085);
  --stroke: rgba(255, 255, 255, 0.10);
  --stroke-2: rgba(255, 255, 255, 0.18);
  --text: #eef2ff;
  --muted: #8e9bbd;
  --muted-2: #6b7899;
  --brand: #6d5efc;
  --brand-2: #a855f7;
  --brand-3: #38bdf8;
  --gold: #f5b942;
  --gold-2: #d99a1f;
  --green: #22c55e;
  --green-2: #15803d;
  --red: #f43f5e;
  --red-2: #be123c;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  --radius: 20px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --nav-h: 74px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
button, .nav-item, .more-tile, .pick-item, .btn-primary, .btn-secondary, .bill-card, .list-card, .quick-tile { touch-action: manipulation; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  min-height: 100%;
  overscroll-behavior-y: none;
}

body {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(109, 94, 252, 0.20), transparent 60%),
    radial-gradient(700px 420px at -10% 15%, rgba(168, 85, 247, 0.14), transparent 60%),
    radial-gradient(800px 500px at 50% 115%, rgba(56, 189, 248, 0.10), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
}

button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; border: none; }
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 0; height: 0; }

.hidden { display: none !important; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-wrap {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 26px 20px calc(26px + var(--safe-b));
  position: relative; overflow: hidden;
}
.aurora {
  position: fixed; border-radius: 50%; filter: blur(70px); pointer-events: none; z-index: 0;
  animation: floaty 12s ease-in-out infinite;
}
.aurora.a { width: 340px; height: 340px; background: rgba(109, 94, 252, 0.45); top: -90px; left: -80px; }
.aurora.b { width: 300px; height: 300px; background: rgba(168, 85, 247, 0.38); bottom: -90px; right: -70px; animation-delay: -4s; }
.aurora.c { width: 220px; height: 220px; background: rgba(56, 189, 248, 0.28); top: 45%; right: -110px; animation-delay: -8s; }
@keyframes floaty {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(18px, -22px, 0) scale(1.08); }
}

.brand-mark {
  width: 84px; height: 84px; border-radius: 26px; position: relative; z-index: 1;
  background: linear-gradient(145deg, #7c6bff, #a855f7 55%, #f5b942 130%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 18px 45px rgba(109, 94, 252, 0.45), inset 0 1px 0 rgba(255,255,255,0.35);
  margin-bottom: 18px;
  animation: popIn .6s cubic-bezier(.2, .9, .3, 1.2) both;
}
.brand-mark i { font-size: 38px; color: #fff; filter: drop-shadow(0 3px 8px rgba(0,0,0,.3)); }
.brand-mark::after {
  content: ''; position: absolute; inset: -1px; border-radius: 27px;
  background: linear-gradient(160deg, rgba(255,255,255,.5), transparent 40%);
  mask: linear-gradient(#000, transparent 60%);
  -webkit-mask: linear-gradient(#000, transparent 60%);
}
@keyframes popIn { from { opacity: 0; transform: scale(.7) translateY(10px); } to { opacity: 1; transform: none; } }

.login-title {
  position: relative; z-index: 1; text-align: center; margin-bottom: 26px;
  animation: fadeUp .6s .08s both;
}
.login-title h1 {
  margin: 0; font-family: 'Manrope', 'Inter', sans-serif; font-size: 27px; font-weight: 800; letter-spacing: -0.4px;
  background: linear-gradient(100deg, #fff 10%, #cfc8ff 55%, #f7d98a 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.login-title p { margin: 7px 0 0; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .3px; }
.login-title .gold-line { width: 54px; height: 3px; border-radius: 4px; margin: 12px auto 0; background: linear-gradient(90deg, transparent, var(--gold), transparent); }

.glass-card {
  position: relative; z-index: 1; width: 100%; max-width: 420px;
  background: linear-gradient(165deg, rgba(255,255,255,.10), rgba(255,255,255,.035));
  border: 1px solid var(--stroke-2);
  border-radius: 26px;
  padding: 24px 22px;
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.18);
  animation: fadeUp .6s .14s both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.field { margin-bottom: 15px; }
.field label {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.field label i { color: var(--gold); font-size: 11px; }
.input-shell {
  display: flex; align-items: center; gap: 11px;
  background: rgba(4, 8, 18, 0.55);
  border: 1.5px solid var(--stroke);
  border-radius: 15px; padding: 0 14px; height: 54px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input-shell:focus-within {
  border-color: rgba(124, 107, 255, .85);
  box-shadow: 0 0 0 4px rgba(109, 94, 252, .18), 0 8px 24px rgba(0,0,0,.35);
  background: rgba(4, 8, 18, 0.75);
}
.input-shell > i { color: var(--muted-2); font-size: 15px; width: 18px; text-align: center; }
.input-shell input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-size: 15px; font-weight: 600; height: 100%; min-width: 0;
}
.input-shell input::placeholder { color: var(--muted-2); font-weight: 500; }
.eye-btn { background: transparent; color: var(--muted); font-size: 15px; padding: 6px; }

.btn-primary {
  width: 100%; height: 54px; border-radius: 15px;
  background: linear-gradient(120deg, #6d5efc 0%, #8b5cf6 45%, #a855f7 100%);
  color: #fff; font-size: 15px; font-weight: 800; letter-spacing: .4px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 14px 30px rgba(109, 94, 252, 0.38), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform .12s, box-shadow .2s, filter .2s;
  position: relative; overflow: hidden;
}
.btn-primary:active { transform: scale(.98); }
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg); animation: shine 3.4s infinite;
}
@keyframes shine { 0% { left: -60%; } 55%, 100% { left: 130%; } }

.login-foot { position: relative; z-index: 1; margin-top: 22px; text-align: center; color: var(--muted-2); font-size: 11px; font-weight: 600; letter-spacing: .4px; }
.login-foot b { color: var(--muted); }
.login-error {
  display: none; align-items: center; gap: 8px;
  background: rgba(244, 63, 94, .12); border: 1px solid rgba(244, 63, 94, .35);
  color: #ffb3c0; font-size: 12.5px; font-weight: 700;
  padding: 10px 13px; border-radius: 12px; margin-bottom: 14px;
}
.login-error.show { display: flex; animation: shake .35s; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ============================================================
   APP SHELL
   ============================================================ */
.app-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px 12px;
  background: linear-gradient(180deg, rgba(6,10,20,.92), rgba(6,10,20,.72) 70%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.topbar .hello { flex: 1; min-width: 0; }
.topbar .hello small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted-2); }
.topbar .hello h2 { margin: 2px 0 0; font-size: 17px; font-weight: 800; letter-spacing: -0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.company-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, rgba(245,185,66,.16), rgba(245,185,66,.05));
  border: 1px solid rgba(245,185,66,.4);
  color: #f7d488; font-size: 10.5px; font-weight: 800; letter-spacing: .6px;
  padding: 6px 11px; border-radius: 30px; margin-top: 5px; max-width: 100%;
}
.company-chip i { font-size: 9px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 14px; flex-shrink: 0;
  background: var(--card); border: 1px solid var(--stroke);
  color: var(--text); font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(10px);
  transition: background .2s, transform .12s;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn.gold { color: var(--gold); border-color: rgba(245,185,66,.35); background: rgba(245,185,66,.10); }

.view { flex: 1; padding: 4px 16px calc(var(--nav-h) + 34px + var(--safe-b)); max-width: 760px; width: 100%; margin: 0 auto; }

/* Page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 6px 0 16px; }
.page-head h1 { margin: 0; font-size: 22px; font-weight: 900; letter-spacing: -0.5px; }
.page-head p { margin: 4px 0 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.page-head .head-icon {
  width: 46px; height: 46px; border-radius: 16px; flex-shrink: 0;
  background: linear-gradient(140deg, rgba(109,94,252,.35), rgba(168,85,247,.15));
  border: 1px solid rgba(124,107,255,.4); color: #c9c2ff;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  box-shadow: 0 10px 24px rgba(109,94,252,.22);
}

/* Cards */
.card {
  background: linear-gradient(160deg, rgba(255,255,255,.075), rgba(255,255,255,.03));
  border: 1px solid var(--stroke); border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(14px);
}
.card-pad { padding: 16px; }
.section-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 900; letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted);
  margin: 22px 2px 11px;
}
.section-label i { color: var(--gold); }
.section-label .line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--stroke), transparent); }
.section-label .link { color: #a99fff; font-size: 11px; letter-spacing: .4px; text-transform: none; font-weight: 800; }

/* Stat grid */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.stat {
  position: relative; overflow: hidden;
  padding: 15px 14px; border-radius: 18px;
  background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.025));
  border: 1px solid var(--stroke);
  box-shadow: 0 10px 26px rgba(0,0,0,.25);
}
.stat::after {
  content: ''; position: absolute; width: 90px; height: 90px; border-radius: 50%;
  right: -35px; top: -35px; background: var(--glow, rgba(109,94,252,.28)); filter: blur(8px);
}
.stat .s-icon {
  width: 36px; height: 36px; border-radius: 12px; font-size: 15px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
  background: var(--chip, rgba(109,94,252,.18)); color: var(--chip-fg, #b9b2ff);
  border: 1px solid var(--chip-bd, rgba(124,107,255,.35));
}
.stat .s-label { font-size: 10.5px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase; color: var(--muted); }
.stat .s-value { font-size: 18px; font-weight: 900; margin-top: 4px; letter-spacing: -0.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .s-sub { font-size: 10.5px; font-weight: 700; color: var(--muted-2); margin-top: 3px; }
.stat.green { --glow: rgba(34,197,94,.28); --chip: rgba(34,197,94,.16); --chip-fg: #86efac; --chip-bd: rgba(34,197,94,.35); }
.stat.gold { --glow: rgba(245,185,66,.28); --chip: rgba(245,185,66,.16); --chip-fg: #fcd879; --chip-bd: rgba(245,185,66,.35); }
.stat.blue { --glow: rgba(56,189,248,.28); --chip: rgba(56,189,248,.16); --chip-fg: #7dd3fc; --chip-bd: rgba(56,189,248,.35); }
.stat.red { --glow: rgba(244,63,94,.26); --chip: rgba(244,63,94,.16); --chip-fg: #fda4af; --chip-bd: rgba(244,63,94,.35); }

/* Quick actions */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 6px 11px; border-radius: 17px;
  background: linear-gradient(160deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  border: 1px solid var(--stroke); color: var(--text);
  transition: transform .12s, border-color .2s, background .2s;
}
.quick:active { transform: scale(.95); border-color: var(--stroke-2); }
.quick .q-icon {
  width: 42px; height: 42px; border-radius: 14px; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, var(--q1, #6d5efc), var(--q2, #a855f7));
  box-shadow: 0 8px 18px var(--qsh, rgba(109,94,252,.35));
  color: #fff;
}
.quick span { font-size: 10.5px; font-weight: 800; letter-spacing: .2px; color: #cfd6ea; text-align: center; line-height: 1.15; }
.quick.green { --q1: #16a34a; --q2: #22c55e; --qsh: rgba(34,197,94,.3); }
.quick.gold { --q1: #d99a1f; --q2: #f5b942; --qsh: rgba(245,185,66,.3); }
.quick.blue { --q1: #0284c7; --q2: #38bdf8; --qsh: rgba(56,189,248,.3); }
.quick.red { --q1: #be123c; --q2: #f43f5e; --qsh: rgba(244,63,94,.3); }
.quick.cyan { --q1: #0e7490; --q2: #22d3ee; --qsh: rgba(34,211,238,.3); }
.quick.violet { --q1: #6d28d9; --q2: #a78bfa; --qsh: rgba(167,139,250,.3); }
.quick.orange { --q1: #c2410c; --q2: #fb923c; --qsh: rgba(251,146,60,.3); }
.quick.pink { --q1: #be185d; --q2: #f472b6; --qsh: rgba(244,114,182,.3); }

/* Sales / list cards */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.06); border: 1px solid var(--stroke);
  border-radius: 15px; padding: 0 14px; height: 48px; margin-bottom: 13px;
}
.search-bar i { color: var(--muted-2); }
.search-bar input { flex: 1; background: transparent; border: none; outline: none; color: var(--text); font-size: 14px; font-weight: 600; }
.search-bar input::placeholder { color: var(--muted-2); }

.chip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.chip {
  flex-shrink: 0; padding: 8px 14px; border-radius: 30px;
  background: rgba(255,255,255,.055); border: 1px solid var(--stroke);
  color: var(--muted); font-size: 11.5px; font-weight: 800; letter-spacing: .3px;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip.active {
  background: linear-gradient(120deg, rgba(109,94,252,.85), rgba(168,85,247,.85));
  border-color: transparent; color: #fff; box-shadow: 0 8px 18px rgba(109,94,252,.3);
}

.bill-card {
  display: flex; align-items: center; gap: 13px;
  padding: 14px; margin-bottom: 10px; border-radius: 18px;
  background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  border: 1px solid var(--stroke);
  transition: transform .12s, border-color .2s;
}
.bill-card:active { transform: scale(.99); border-color: var(--stroke-2); }
.bill-avatar {
  width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
  background: linear-gradient(145deg, rgba(109,94,252,.3), rgba(168,85,247,.12));
  border: 1px solid rgba(124,107,255,.35); color: #c9c2ff;
}
.bill-main { flex: 1; min-width: 0; }
.bill-main .b-no { font-size: 13px; font-weight: 900; letter-spacing: .3px; display: flex; align-items: center; gap: 7px; }
.bill-main .b-party { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bill-main .b-date { font-size: 10.5px; font-weight: 700; color: var(--muted-2); margin-top: 3px; }
.bill-amt { text-align: right; flex-shrink: 0; }
.bill-amt .amt { font-size: 14.5px; font-weight: 900; letter-spacing: -0.2px; }
.bill-amt .badge { margin-top: 5px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9px; font-weight: 900; letter-spacing: .7px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 20px;
  background: rgba(34,197,94,.14); border: 1px solid rgba(34,197,94,.35); color: #86efac;
}
.badge.gold { background: rgba(245,185,66,.13); border-color: rgba(245,185,66,.4); color: #fcd879; }
.badge.blue { background: rgba(56,189,248,.13); border-color: rgba(56,189,248,.35); color: #7dd3fc; }

/* Empty / skeleton */
.empty { text-align: center; padding: 46px 20px; color: var(--muted-2); }
.empty .e-icon {
  width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 24px;
  background: rgba(255,255,255,.05); border: 1px solid var(--stroke);
  display: flex; align-items: center; justify-content: center; font-size: 30px; color: var(--muted-2);
}
.empty h3 { margin: 0 0 5px; font-size: 15px; color: var(--muted); font-weight: 800; }
.empty p { margin: 0; font-size: 12px; font-weight: 600; }
.skeleton { border-radius: 16px; height: 74px; margin-bottom: 10px; background: linear-gradient(100deg, rgba(255,255,255,.045) 30%, rgba(255,255,255,.10) 50%, rgba(255,255,255,.045) 70%); background-size: 220% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -120% 0; } }

/* FAB */
.fab {
  position: fixed; right: 18px; bottom: calc(var(--nav-h) + 18px + var(--safe-b)); z-index: 45;
  width: 58px; height: 58px; border-radius: 20px;
  background: linear-gradient(140deg, #6d5efc, #a855f7);
  color: #fff; font-size: 21px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 16px 34px rgba(109,94,252,.48), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .14s;
}
.fab:active { transform: scale(.92) rotate(90deg); }

/* Bottom nav */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  height: calc(var(--nav-h) + var(--safe-b)); padding: 8px 10px var(--safe-b);
  display: flex; align-items: stretch; justify-content: space-around; gap: 2px;
  background: linear-gradient(180deg, rgba(11,17,32,.72), rgba(6,10,20,.97));
  border-top: 1px solid var(--stroke);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}
.nav-item {
  flex: 1; max-width: 92px; border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: transparent; color: var(--muted-2); font-size: 9.5px; font-weight: 800; letter-spacing: .3px;
  position: relative; transition: color .2s;
}
.nav-item i { font-size: 17px; transition: transform .2s; }
.nav-item.active { color: #fff; }
.nav-item.active i { transform: translateY(-1px); }
.nav-item.active::before {
  content: ''; position: absolute; inset: 2px 6px;
  border-radius: 14px; z-index: -1;
  background: linear-gradient(140deg, rgba(109,94,252,.30), rgba(168,85,247,.12));
  border: 1px solid rgba(124,107,255,.32);
  box-shadow: 0 8px 20px rgba(109,94,252,.22);
}
.nav-item.active i { color: #b9b2ff; }

/* Immersive pages (e.g. new sale) hide the bottom nav */
.app-shell.no-nav .bottom-nav { display: none; }
.app-shell.no-nav .view { padding-bottom: calc(104px + var(--safe-b)); }
.app-shell.no-nav .topbar { padding-bottom: 6px; }

/* Details / accordion polish */
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary i.fa-chevron-down { transition: transform .22s; }
details.card[open] > summary i.fa-chevron-down { transform: rotate(180deg); }

/* ============================================================
   SALE FORM
   ============================================================ */
.form-card { padding: 15px; margin-bottom: 12px; }
.form-row { display: flex; gap: 10px; }
.form-row > * { flex: 1; min-width: 0; }
.field-sm { margin-bottom: 12px; }
.field-sm label {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 6px;
}
.field-sm label i { color: var(--gold); font-size: 9.5px; }
.inp {
  width: 100%; height: 46px; border-radius: 13px; padding: 0 12px;
  background: rgba(4,8,18,.55); border: 1.5px solid var(--stroke);
  color: var(--text); font-size: 14px; font-weight: 700; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.inp:focus { border-color: rgba(124,107,255,.85); box-shadow: 0 0 0 3px rgba(109,94,252,.16); }
.inp::placeholder { color: var(--muted-2); font-weight: 500; }
.inp[readonly] { color: var(--muted); }
select.inp { appearance: none; }
.picker-btn {
  width: 100%; min-height: 46px; border-radius: 13px; padding: 8px 12px;
  background: rgba(4,8,18,.55); border: 1.5px solid var(--stroke);
  color: var(--text); text-align: left; display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 700;
}
.picker-btn .ph { color: var(--muted-2); font-weight: 500; }
.picker-btn i.lead { color: var(--gold); font-size: 13px; }
.picker-btn .chev { margin-left: auto; color: var(--muted-2); font-size: 12px; }

.item-card {
  border-radius: 17px; padding: 13px; margin-bottom: 10px;
  background: linear-gradient(160deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  border: 1px solid var(--stroke);
  animation: fadeUp .25s both;
}
.item-card .ic-top { display: flex; align-items: flex-start; gap: 10px; }
.item-card .ic-idx {
  width: 26px; height: 26px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(145deg, rgba(109,94,252,.4), rgba(168,85,247,.15));
  border: 1px solid rgba(124,107,255,.4); color: #d5d0ff;
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900;
}
.item-card .ic-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 900; letter-spacing: .1px; }
.item-card .ic-name small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-card .ic-rm {
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  background: rgba(244,63,94,.12); border: 1px solid rgba(244,63,94,.3); color: #fda4af; font-size: 12px;
}
.item-card .ic-grid { display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: 8px; margin-top: 11px; }
.item-card .ic-grid .lbl { font-size: 9px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; color: var(--muted-2); margin-bottom: 4px; }
.item-card .mini {
  width: 100%; height: 40px; border-radius: 11px; padding: 0 10px;
  background: rgba(4,8,18,.6); border: 1.5px solid var(--stroke);
  color: var(--text); font-size: 13px; font-weight: 800; outline: none; text-align: right;
}
.item-card .mini:focus { border-color: rgba(124,107,255,.85); }
.item-card .amt-box {
  height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: flex-end;
  padding: 0 10px; font-size: 13px; font-weight: 900;
  background: linear-gradient(135deg, rgba(34,197,94,.12), rgba(34,197,94,.04));
  border: 1px solid rgba(34,197,94,.3); color: #86efac;
  white-space: nowrap; overflow: hidden;
}
.orig-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.orig-row .o-lbl { font-size: 10px; font-weight: 800; color: var(--muted-2); letter-spacing: .5px; text-transform: uppercase; }
.orig-row .o-inp {
  flex: 1; height: 36px; border-radius: 10px; padding: 0 10px; text-align: right;
  background: rgba(4,8,18,.55); border: 1.5px dashed rgba(245,185,66,.35);
  color: #fcd879; font-size: 12.5px; font-weight: 800; outline: none;
}
.add-item-btn {
  width: 100%; height: 46px; border-radius: 14px;
  background: rgba(109,94,252,.10); border: 1.5px dashed rgba(124,107,255,.45);
  color: #b9b2ff; font-size: 12.5px; font-weight: 900; letter-spacing: .5px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 4px;
}
.add-item-btn:active { background: rgba(109,94,252,.18); }

.totals-card { padding: 15px; }
.tot-line { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 5px 0; }
.tot-line b { color: var(--text); font-weight: 800; }
.tot-line.green b { color: #86efac; }
.tot-line.red b { color: #fda4af; }
.tot-divider { height: 1px; background: linear-gradient(90deg, var(--stroke), transparent); margin: 8px 0; }
.grand-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; padding: 13px 15px; border-radius: 16px;
  background: linear-gradient(120deg, rgba(109,94,252,.28), rgba(168,85,247,.12));
  border: 1px solid rgba(124,107,255,.4);
  box-shadow: 0 10px 26px rgba(109,94,252,.18);
}
.grand-bar .g-lbl { font-size: 10.5px; font-weight: 900; letter-spacing: 1.2px; text-transform: uppercase; color: #cfc9ff; }
.grand-bar .g-val { font-size: 21px; font-weight: 900; letter-spacing: -0.6px; }

.sticky-save {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: 11px 16px calc(11px + var(--safe-b));
  background: linear-gradient(180deg, rgba(6,10,20,.55), rgba(6,10,20,.98) 45%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--stroke);
  display: flex; align-items: center; gap: 12px;
}
.sticky-save .ss-total { flex: 1; min-width: 0; }
.sticky-save .ss-total small { display: block; font-size: 9.5px; font-weight: 900; letter-spacing: 1.1px; text-transform: uppercase; color: var(--muted-2); }
.sticky-save .ss-total div { font-size: 19px; font-weight: 900; letter-spacing: -0.4px; white-space: nowrap; }
.sticky-save .btn-primary { width: auto; padding: 0 22px; height: 50px; flex-shrink: 0; }

/* ============================================================
   BOTTOM SHEET / MODALS
   ============================================================ */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(2, 5, 12, .68); backdrop-filter: blur(5px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .18s both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; max-width: 720px; max-height: 86vh; max-height: 86dvh;
  background: linear-gradient(180deg, #101a2e, #0a101f);
  border: 1px solid var(--stroke-2); border-bottom: none;
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -20px 60px rgba(0,0,0,.6);
  display: flex; flex-direction: column;
  animation: sheetUp .28s cubic-bezier(.2,.9,.3,1.05) both;
  padding-bottom: var(--safe-b);
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-grip { width: 44px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.22); margin: 10px auto 4px; }
.sheet-head { display: flex; align-items: center; gap: 11px; padding: 8px 18px 12px; border-bottom: 1px solid var(--stroke); }
.sheet-head h3 { margin: 0; font-size: 16px; font-weight: 900; flex: 1; letter-spacing: -0.2px; }
.sheet-head .sh-icon {
  width: 36px; height: 36px; border-radius: 12px; font-size: 14px;
  background: linear-gradient(145deg, rgba(109,94,252,.35), rgba(168,85,247,.12));
  border: 1px solid rgba(124,107,255,.4); color: #c9c2ff;
  display: flex; align-items: center; justify-content: center;
}
.sheet-body { padding: 14px 18px 20px; overflow-y: auto; }
.sheet-close { width: 34px; height: 34px; border-radius: 11px; background: rgba(255,255,255,.07); border: 1px solid var(--stroke); color: var(--muted); font-size: 13px; }

.pick-list { display: flex; flex-direction: column; gap: 8px; }
.pick-item {
  display: flex; align-items: center; gap: 14px; padding: 16px 14px; min-height: 72px; border-radius: 16px;
  background: rgba(255,255,255,.045); border: 1px solid var(--stroke);
  color: var(--text); text-align: left; width: 100%;
  transition: background .18s, border-color .18s;
}
.pick-item:active { background: rgba(255,255,255,.09); border-color: var(--stroke-2); }
.pick-item .pi-icon {
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  background: rgba(109,94,252,.16); border: 1px solid rgba(124,107,255,.3); color: #b9b2ff;
}
.pick-item .pi-main { flex: 1; min-width: 0; }
.pick-item .pi-main b { display: block; font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-item .pi-main small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-item .pi-right { font-size: 12px; font-weight: 900; color: #86efac; flex-shrink: 0; }
.pick-step {
  display: flex; align-items: center; gap: 8px; margin-bottom: 11px;
  font-size: 10.5px; font-weight: 800; color: var(--muted-2); letter-spacing: .5px; text-transform: uppercase;
}
.pick-step .ps-chip {
  padding: 4px 10px; border-radius: 20px; background: rgba(109,94,252,.14);
  border: 1px solid rgba(124,107,255,.3); color: #c9c2ff;
}
.pick-step .ps-chip.done { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.3); color: #86efac; }

/* Toast */
.toast-wrap { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 26px + var(--safe-b)); transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; width: calc(100% - 32px); max-width: 420px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 15px;
  background: linear-gradient(135deg, #0f2e1d, #0b1f16); border: 1px solid rgba(34,197,94,.45);
  color: #d7ffe4; font-size: 12.5px; font-weight: 700;
  box-shadow: 0 16px 36px rgba(0,0,0,.5);
  animation: toastIn .28s cubic-bezier(.2,.9,.3,1.1) both;
}
.toast i { color: #4ade80; font-size: 15px; }
.toast.error { background: linear-gradient(135deg, #33101a, #1f0a11); border-color: rgba(244,63,94,.5); color: #ffdbe2; }
.toast.error i { color: #fb7185; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }

/* Confirm dialog */
.dialog-backdrop { position: fixed; inset: 0; z-index: 130; background: rgba(2,5,12,.72); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 22px; animation: fadeIn .18s both; }
.dialog {
  width: 100%; max-width: 360px; border-radius: 24px; padding: 22px;
  background: linear-gradient(170deg, #141f36, #0b1120);
  border: 1px solid var(--stroke-2); box-shadow: 0 24px 60px rgba(0,0,0,.6);
  text-align: center; animation: popIn .25s both;
}
.dialog .d-icon { width: 54px; height: 54px; border-radius: 18px; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; font-size: 21px; background: rgba(109,94,252,.16); border: 1px solid rgba(124,107,255,.35); color: #c9c2ff; }
.dialog h3 { margin: 0 0 7px; font-size: 16px; font-weight: 900; }
.dialog p { margin: 0 0 18px; font-size: 12.5px; font-weight: 600; color: var(--muted); line-height: 1.45; }
.dialog .d-actions { display: flex; gap: 10px; }
.dialog .d-actions button { flex: 1; height: 46px; border-radius: 13px; font-size: 12.5px; font-weight: 900; letter-spacing: .3px; }
.dialog .d-cancel { background: rgba(255,255,255,.07); border: 1px solid var(--stroke); color: var(--muted); }
.dialog .d-ok { background: linear-gradient(120deg, #6d5efc, #a855f7); color: #fff; box-shadow: 0 10px 22px rgba(109,94,252,.3); }

/* Print modal */
.print-backdrop { position: fixed; inset: 0; z-index: 140; background: rgba(2,5,12,.9); display: flex; flex-direction: column; animation: fadeIn .2s both; }
.print-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--stroke); background: rgba(10,16,31,.9); }
.print-top h3 { margin: 0; flex: 1; font-size: 14px; font-weight: 900; }
.print-top .icon-btn { width: 38px; height: 38px; border-radius: 12px; }
.print-frame-wrap { flex: 1; background: #525659; overflow: hidden; }
.print-frame-wrap iframe { width: 100%; height: 100%; border: none; background: #fff; }
.print-copies { display: flex; gap: 6px; padding: 9px 14px calc(9px + var(--safe-b)); overflow-x: auto; background: rgba(10,16,31,.95); border-top: 1px solid var(--stroke); }
.print-copies .chip { font-size: 10.5px; padding: 7px 11px; }

/* More page tiles */
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.more-tile {
  padding: 15px 8px 12px; border-radius: 17px; text-align: center;
  background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  border: 1px solid var(--stroke); color: var(--text);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.more-tile:active { transform: scale(.96); }
.more-tile .mt-icon {
  width: 42px; height: 42px; border-radius: 14px; font-size: 16px; color: #fff;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, var(--q1, #6d5efc), var(--q2, #a855f7));
  box-shadow: 0 8px 18px var(--qsh, rgba(109,94,252,.3));
}
.more-tile span { font-size: 10.5px; font-weight: 800; color: #cfd6ea; line-height: 1.2; }

/* Utility */
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mt-6 { margin-top: 6px; } .mt-10 { margin-top: 10px; } .mt-14 { margin-top: 14px; } .mt-20 { margin-top: 20px; }
.muted { color: var(--muted); } .tiny { font-size: 11px; font-weight: 600; }
.center { text-align: center; }
.loading-inline { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 620px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .quick-grid { grid-template-columns: repeat(8, 1fr); }
}


/* Premium form system */
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 420px) { .form-grid { grid-template-columns: 1fr; } .form-grid .full { grid-column: auto; } }
label.field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
label.field > span.lbl, label.field { font-size: 11px; font-weight: 800; color: #aeb9d6; letter-spacing: .2px; }
label.field { font-size: 11px; font-weight: 800; color: #aeb9d6; }
label.field input, label.field select, label.field textarea,
.field-input {
  width: 100%; padding: 12px 13px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: var(--text); font-size: 14px; font-weight: 600;
  outline: none; transition: border-color .18s, box-shadow .18s, background .18s;
}
label.field input::placeholder, label.field textarea::placeholder { color: var(--muted-2); font-weight: 500; }
label.field input:focus, label.field select:focus, label.field textarea:focus {
  border-color: rgba(109,94,252,.65);
  box-shadow: 0 0 0 3px rgba(109,94,252,.18);
  background: rgba(255,255,255,.07);
}
label.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8e9bbd 50%), linear-gradient(135deg, #8e9bbd 50%, transparent 50%); background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px); background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 34px; }
.form-section { margin: 14px 0 8px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); display:flex; align-items:center; gap:8px; font-size:11px; font-weight:900; letter-spacing:.5px; text-transform:uppercase; color:#cfd6ea; }
.form-section i { color: var(--gold); }
.sheet-body .btn-primary { width: 100%; justify-content: center; padding: 14px 16px; font-size: 15px; border-radius: 16px; }
.form-hint { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 2px; }

/* Buttons */
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px; border-radius: 14px; border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06); color: var(--text); font-weight: 800; font-size: 13px;
}
.btn-secondary:active { transform: scale(.98); background: rgba(255,255,255,.1); }
.btn-secondary.sm { padding: 8px 12px; border-radius: 12px; font-size: 12px; gap: 6px; }
.btn-add-premium {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px; border-radius: 14px; border: none; color: #fff;
  font-weight: 900; font-size: 13px; letter-spacing: .1px;
  background: linear-gradient(135deg, #6d5efc 0%, #a855f7 55%, #f5b942 140%);
  box-shadow: 0 10px 22px rgba(109,94,252,.35), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-add-premium:active { transform: scale(.97); }
.btn-add-premium i { font-size: 12px; }
.page-head-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
