/* ACID / TECH-BRUTALIST — тёмная тема, лаймовый акцент, острые углы, моно-типографика.
   Имена переменных сохранены (--cyan = основной акцент, --pink = второй акцент), чтобы JS не менялся. */
:root {
  --bg: #050605;
  --bg2: #101013;
  --glass: rgba(255, 255, 255, .035);
  --glass-strong: rgba(10, 10, 12, .82);
  --line: rgba(255, 255, 255, .14);
  --text: #f2f2ee;
  --muted: #84848c;
  --cyan: #90fc06;      /* VapeHub lime — основной акцент */
  --pink: #ff4d00;      /* signal orange — второй акцент */
  --violet: #9d9da6;
  --lime: #90fc06;
  --red: #ff4d4d;
  --amber: #ffc400;
  --grad: linear-gradient(180deg, #a6ff3a, #90fc06);
  --radius: 10px;
  --sab: env(safe-area-inset-bottom, 0px);
  --sat: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(.2, .9, .2, 1);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body { font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 15px; line-height: 1.4; overflow-x: hidden; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
h1, h2, h3, p { margin: 0; }
.hidden { display: none !important; }

/* ---------- Background: техно-сетка + одно акцентное пятно ---------- */
.ambient { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.ambient::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 32px 32px; -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 75%); mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 75%); }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); will-change: transform; }
.o1 { width: 320px; height: 220px; background: var(--cyan); top: -140px; right: -100px; opacity: .22; animation: drift 18s ease-in-out infinite; }
.o2 { width: 240px; height: 240px; background: var(--pink); bottom: -130px; left: -110px; opacity: .16; animation: drift 22s ease-in-out infinite reverse; }
@keyframes drift { 50% { transform: translate(-40px, 40px) scale(1.15); } }

/* ---------- Glass (сохранён blur, но строгий) ---------- */
.glass { background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }

/* ---------- Boot ---------- */
.boot { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-content: center; gap: 18px; justify-items: center; transition: opacity .4s, visibility .4s; }
.boot.done { opacity: 0; visibility: hidden; }
.boot-bar { width: 140px; height: 2px; background: var(--line); overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 40%; background: var(--cyan); animation: slide .9s linear infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(350%); } }

/* ---------- Layout ---------- */
.view { position: relative; z-index: 1; min-height: 100%; padding: calc(var(--sat) + 16px) 16px calc(92px + var(--sab)); max-width: 640px; margin: 0 auto; animation: viewIn .3s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateX(14px); } }
.page-title { font-size: 28px; font-weight: 900; letter-spacing: -.03em; text-transform: uppercase; margin: 2px 0 16px; display: flex; align-items: baseline; gap: 10px; }
.page-title small { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.muted { color: var(--muted); }
.row { display: flex; align-items: center; gap: 10px; }
.spread { justify-content: space-between; }
.stack { display: grid; gap: 12px; }

/* ---------- Nav: плоская панель, индикатор сверху ---------- */
.nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; max-width: 640px; margin: 0 auto; padding: 0 0 var(--sab); border-radius: 0; border-width: 1px 1px 0; display: grid; grid-template-columns: repeat(6, 1fr); background: var(--glass-strong); }
.nav button { position: relative; display: grid; justify-items: center; gap: 4px; padding: 11px 0 10px; color: var(--muted); font-family: var(--mono); font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; transition: color .2s; }
.nav button::before { content: ""; position: absolute; top: -1px; left: 22%; right: 22%; height: 2px; background: var(--cyan); transform: scaleX(0); transition: transform .3s var(--ease); }
.nav button svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: square; stroke-linejoin: miter; }
.nav button:active { opacity: .6; }
.nav button.active { color: var(--cyan); }
.nav button.active::before { transform: scaleX(1); }
.badge { position: absolute; top: 5px; left: 50%; margin-left: 7px; min-width: 17px; height: 17px; padding: 0 4px; background: var(--pink); color: #000; font-family: var(--mono); font-size: 10px; font-weight: 800; display: grid; place-items: center; border-radius: 2px; }
.badge.bump { animation: bump .35s var(--ease); }
@keyframes bump { 40% { transform: scale(1.5); } }

/* ---------- Inputs ---------- */
.field { display: grid; gap: 6px; }
.field > span { font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.input, .select, .textarea { width: 100%; padding: 13px 14px; border-radius: 6px; background: rgba(255,255,255,.04); border: 1px solid var(--line); outline: none; transition: border-color .15s, background .15s; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--cyan); background: rgba(144,252,6,.05); }
.textarea { min-height: 84px; resize: none; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.select option { background: #141417; }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 2; }
.search .input { padding-left: 42px; font-family: var(--mono); font-size: 13.5px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 18px; border-radius: 6px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: 13.5px; transition: transform .12s, box-shadow .2s, opacity .2s; user-select: none; }
.btn:active { transform: translate(2px, 2px); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn-primary { background: var(--cyan); color: #0a0a0a; box-shadow: 3px 3px 0 rgba(144,252,6,.28); }
.btn-primary:active { box-shadow: 1px 1px 0 rgba(144,252,6,.28); }
.btn-ghost { background: transparent; border: 1px solid var(--line); }
.btn-ghost:active { border-color: var(--cyan); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 12px; border-radius: 5px; font-size: 11.5px; }
.icon-btn { width: 44px; height: 44px; border-radius: 6px; display: grid; place-items: center; background: transparent; border: 1px solid var(--line); transition: border-color .15s, transform .1s; }
.icon-btn:active { transform: scale(.92); border-color: var(--cyan); }
.icon-btn svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; }

/* ---------- Chips ---------- */
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 16px 12px; margin: 0 -16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 13px; border-radius: 4px; background: transparent; border: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; transition: all .2s; }
.chip:active { transform: scale(.95); }
.chip.active { color: #0a0a0a; background: var(--cyan); border-color: var(--cyan); }

/* ---------- Product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.card { border-radius: var(--radius); overflow: hidden; position: relative; transition: transform .15s var(--ease), border-color .2s; animation: cardIn .4s var(--ease) backwards; }
.card::after { content: ""; position: absolute; left: 0; top: 0; width: 0; height: 2px; background: var(--cyan); transition: width .35s var(--ease); }
.card:active { transform: scale(.98); }
.card:hover { border-color: rgba(144,252,6,.5); }
.card:hover::after { width: 100%; }
@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } }
.thumb { position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; font-size: 54px; overflow: hidden; background: repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 8px, transparent 8px 16px), #111114; border-bottom: 1px solid var(--line); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; top: 0; left: 0; padding: 4px 8px; border-radius: 0 0 6px 0; font-family: var(--mono); font-size: 11px; font-weight: 800; background: var(--pink); color: #000; }
.tag.out { background: #000; color: var(--muted); border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: none; }
.card-body { padding: 11px 12px 12px; display: grid; gap: 4px; }
.brand { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }
.pname { font-weight: 700; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.price { font-family: var(--mono); font-weight: 800; font-size: 16px; letter-spacing: -.02em; }
.price s { color: var(--muted); font-weight: 500; font-size: 11.5px; margin-left: 6px; }
.stars { color: var(--amber); font-size: 12px; letter-spacing: 1px; }
.add { margin-top: 6px; }
.stepper { display: flex; align-items: center; justify-content: space-between; background: transparent; border: 1px solid var(--cyan); border-radius: 6px; }
.stepper button { width: 38px; height: 38px; display: grid; place-items: center; font-size: 20px; font-weight: 700; color: var(--cyan); transition: background .12s; }
.stepper button:active { background: var(--cyan); color: #000; }
.stepper b { min-width: 28px; text-align: center; font-family: var(--mono); }

.empty { text-align: center; padding: 56px 20px; color: var(--muted); display: grid; gap: 8px; justify-items: center; }
.empty .big { font-size: 48px; filter: grayscale(1) contrast(1.2); }
.empty b { color: var(--text); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Panels ---------- */
.panel { border-radius: var(--radius); padding: 14px; }
.line-item { display: grid; grid-template-columns: 62px 1fr auto; gap: 12px; align-items: center; padding: 10px; border-radius: var(--radius); animation: cardIn .35s var(--ease) backwards; }
.line-item .thumb { aspect-ratio: 1; border-radius: 6px; border: 1px solid var(--line); font-size: 28px; }
.line-item .stepper { border-color: var(--line); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg button { padding: 13px; font-family: var(--mono); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); transition: all .2s; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.active { color: #0a0a0a; background: var(--cyan); }
.sum { display: grid; gap: 8px; }
.sum .r { display: flex; justify-content: space-between; color: var(--muted); font-family: var(--mono); font-size: 13.5px; }
.sum .r.total { color: var(--text); font-size: 18px; font-weight: 800; padding-top: 10px; border-top: 1px dashed var(--line); }
.sum .r.total b { color: var(--cyan); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toggle { position: relative; width: 46px; height: 26px; border-radius: 3px; background: transparent; border: 1px solid var(--line); transition: all .2s; flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 2px; background: var(--muted); transition: transform .25s var(--ease), background .2s; }
.toggle.on { border-color: var(--cyan); background: rgba(144,252,6,.12); }
.toggle.on::after { transform: translateX(20px); background: var(--cyan); }

.status { display: inline-block; padding: 3px 9px; border-radius: 3px; font-family: var(--mono); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; border: 1px solid currentColor; }
.st-new { color: #7ad7ff; } .st-confirmed { color: #c9a8ff; } .st-shipped { color: var(--amber); } .st-done { color: var(--cyan); } .st-cancelled { color: var(--red); }
.order-items { display: grid; gap: 4px; font-size: 13.5px; color: var(--muted); margin: 10px 0; padding: 10px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.order-items div { display: flex; justify-content: space-between; gap: 10px; }

.review { display: grid; gap: 8px; }
.avatar { width: 64px; height: 64px; border-radius: 8px; display: grid; place-items: center; font-size: 26px; font-weight: 900; background: var(--cyan); color: #000; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 34px; height: 34px; font-size: 15px; border-radius: 5px; }
.bonus-card { position: relative; overflow: hidden; border-radius: var(--radius); padding: 20px; background: var(--cyan); color: #0a0a0a; }
.bonus-card::after { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(135deg, rgba(0,0,0,.07) 0 2px, transparent 2px 12px); pointer-events: none; }
.bonus-card .muted { color: rgba(0,0,0,.65) !important; }
.bonus-card .val { font-family: var(--mono); font-size: 40px; font-weight: 900; letter-spacing: -.04em; }
.star-pick { display: flex; gap: 6px; font-size: 32px; }
.star-pick button { color: rgba(255,255,255,.18); transition: transform .12s, color .15s; }
.star-pick button.on { color: var(--amber); }
.star-pick button:active { transform: scale(1.25); }

/* ---------- Admin ---------- */
.admin-hero { background: var(--pink) !important; box-shadow: 3px 3px 0 rgba(255,77,0,.3) !important; }
.admin-row { display: grid; gap: 10px; padding: 12px; border-radius: var(--radius); }
.admin-row.off { opacity: .5; }
.admin-row .thumb { font-size: 26px; border-radius: 6px; border: 1px solid var(--line); }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Sheet ---------- */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.overlay.open { opacity: 1; visibility: visible; }
.sheet { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; max-width: 640px; margin: 0 auto; max-height: 90vh; overflow-y: auto; border-radius: 0; border-width: 2px 0 0; border-top-color: var(--cyan); padding: 12px 18px calc(24px + var(--sab)); background: rgba(12,12,14,.94); transform: translateY(105%); transition: transform .35s var(--ease); overscroll-behavior: contain; }
.sheet.open { transform: translateY(0); }
.grab { width: 36px; height: 3px; background: var(--line); margin: 0 auto 14px; }
.sheet h2 { font-size: 22px; font-weight: 900; text-transform: uppercase; letter-spacing: -.02em; margin-bottom: 12px; }
.sheet-hero { aspect-ratio: 16 / 10; border-radius: 8px; margin-bottom: 14px; font-size: 80px; border: 1px solid var(--line); }

/* ---------- Toast ---------- */
.toast { position: fixed; z-index: 70; left: 50%; top: calc(var(--sat) + 12px); transform: translate(-50%, -150%); padding: 12px 18px; border-radius: 6px; font-family: var(--mono); font-size: 13px; font-weight: 700; max-width: 90vw; text-align: center; background: rgba(12,12,14,.96); transition: transform .35s var(--ease); }
.toast.show { transform: translate(-50%, 0); }
.toast.ok { border-color: var(--cyan); color: var(--cyan); }
.toast.err { border-color: var(--red); color: var(--red); }

.skeleton { border-radius: var(--radius); aspect-ratio: 3 / 4; background: linear-gradient(100deg, rgba(255,255,255,.03) 30%, rgba(255,255,255,.09) 50%, rgba(255,255,255,.03) 70%); background-size: 300% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ============ VapeHub: бренд, hero, гейт, вкусы, акции ============ */
.wm { display: inline-flex; align-items: center; font-weight: 900; letter-spacing: -.045em; line-height: 1; font-size: 26px; }
.wm b { color: #fff; font-weight: 900; }
.wm i { font-style: normal; margin-left: 2px; padding: .06em .24em .1em; background: var(--cyan); color: #000; border-radius: .22em; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.topbar .hello-sm { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.hero { position: relative; border-radius: 14px; overflow: hidden; margin-bottom: 14px; border: 1px solid var(--line); aspect-ratio: 2 / 1; background: #000; }
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; animation: heroZoom 14s ease-in-out infinite alternate; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(5,6,5,.55)); pointer-events: none; }
@keyframes heroZoom { to { transform: scale(1.06); } }
.back-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.back-row .page-title { margin: 0; }
.sub-title { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: -8px 0 14px; letter-spacing: .02em; }

/* boot + gate */
.boot-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.boot { place-content: end center; padding-bottom: 18vh; }
.boot-bar { position: relative; z-index: 1; }
.gate { position: fixed; inset: 0; z-index: 95; background: var(--bg); overflow-y: auto; display: flex; flex-direction: column; }
.gate.hidden { display: none; }
.gate-img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; flex: none; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.gate-body { padding: 8px 20px calc(28px + var(--sab)); display: grid; gap: 12px; max-width: 520px; width: 100%; margin: 0 auto; }
.gate-body h2 { font-size: 26px; font-weight: 900; text-transform: uppercase; letter-spacing: -.03em; line-height: 1.05; }
.gate-body p { color: var(--muted); }
.gate-lost { color: var(--pink) !important; font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; }

/* flavors */
.flv-list { display: grid; gap: 8px; }
.flv { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; transition: border-color .2s, background .2s; }
.flv.sel { border-color: var(--cyan); background: rgba(144,252,6,.06); }
.flv .nm { font-weight: 700; }
.flv .left { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.flv .stepper { min-width: 118px; }
.flv .btn { min-width: 118px; }
.lbl { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.fl-count { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.line-flavor { font-family: var(--mono); font-size: 11.5px; color: var(--cyan); }
.flrow { display: grid; grid-template-columns: 1fr 84px 44px; gap: 8px; margin-bottom: 8px; }

/* promos */
.promo { position: relative; overflow: hidden; border-radius: var(--radius); display: grid; animation: cardIn .4s var(--ease) backwards; }
.promo::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cyan); }
.promo img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; display: block; }
.promo .pb { padding: 14px 16px 16px 20px; display: grid; gap: 6px; }
.promo h3 { font-size: 19px; font-weight: 900; letter-spacing: -.02em; text-transform: uppercase; line-height: 1.1; }
.promo .tagline { font-family: var(--mono); font-size: 10.5px; color: var(--cyan); letter-spacing: .12em; text-transform: uppercase; }
.section-h { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 18px 0 10px; display: flex; align-items: center; gap: 10px; }
.section-h::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* misc */
.tag.combo { background: var(--cyan); color: #000; }
.menu-row { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px; border-radius: var(--radius); font-weight: 700; }
.menu-row span:last-child { color: var(--cyan); font-family: var(--mono); }
.field-prefix { display: flex; align-items: stretch; }
.field-prefix .pre { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line); border-right: 0; border-radius: 6px 0 0 6px; background: rgba(255,255,255,.04); font-family: var(--mono); font-size: 12px; color: var(--cyan); white-space: nowrap; }
.field-prefix .input { border-radius: 0 6px 6px 0; }
.note { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.thumb img { z-index: 0; }
.imgpick { display: grid; gap: 8px; }
.imgpick-prev { aspect-ratio: 16 / 9; border: 1px dashed var(--line); border-radius: 8px; overflow: hidden; display: grid; place-items: center; font-size: 13px; background: rgba(255,255,255,.03); }
.imgpick-prev img { width: 100%; height: 100%; object-fit: cover; }
