/* ==========================================================
   Pizza Nova QR Menu - Luxury Dark & Gold Theme
   ========================================================== */

:root {
  --bg: #0a1214;
  --bg-2: #0f1b1e;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.09);
  --border-gold: rgba(230, 184, 90, 0.35);
  --text: #f4efe6;
  --muted: #9fb0b2;
  --gold: #e6b85a;
  --gold-2: #f7d98b;
  --gold-3: #b8852a;
  --danger: #e5604d;
  --ok: #4fc58a;
  --radius: 20px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(.22, .8, .26, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Vazirmatn', system-ui, sans-serif;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(230, 184, 90, 0.12), transparent 60%),
    radial-gradient(700px 500px at -10% 30%, rgba(30, 110, 120, 0.20), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(env(safe-area-inset-top) + 28px) 20px 28px;
  text-align: center;
  overflow: hidden;
}
.hero-glow {
  position: absolute; inset: -40% -20% auto -20%; height: 120%;
  background: radial-gradient(closest-side, rgba(230, 184, 90, 0.18), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 580px; margin: 0 auto; animation: rise .8s var(--ease) both; }

.hero-status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 15px; margin-bottom: 16px; border-radius: 999px;
  font-size: .8rem; font-weight: 600; color: var(--gold-2);
  background: rgba(230, 184, 90, .09); border: 1px solid var(--border-gold);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background .3s, border-color .3s, color .3s;
}
.hero-status.is-closed {
  color: #ffb4a8;
  background: rgba(229, 96, 77, .14);
  border-color: rgba(229, 96, 77, .45);
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: 0 0 auto;
  box-shadow: 0 0 0 0 rgba(79, 197, 138, .7);
  animation: pulseDot 2s infinite;
}
.hero-status.is-closed .status-dot {
  background: var(--danger);
  box-shadow: 0 0 0 0 rgba(229, 96, 77, .7);
  animation: pulseDotClosed 2s infinite;
}

.hero-mark {
  width: 64px; height: 64px; margin: 0 auto 12px;
  display: grid; place-items: center; border-radius: 50%;
  color: var(--gold);
  background: var(--surface);
  border: 1px solid var(--border-gold);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0 40px rgba(230, 184, 90, 0.22);
}
.hero-title {
  font-size: clamp(2.3rem, 9vw, 3.3rem);
  font-weight: 800; letter-spacing: .5px; line-height: 1.2;
}
.hero-title span {
  background: linear-gradient(135deg, var(--gold-2), var(--gold) 45%, var(--gold-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { margin-top: 6px; color: var(--muted); font-size: .98rem; font-weight: 400; }

/* Address, Phone & Free Delivery Pills */
.hero-info {
  margin-top: 16px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px;
}
.info-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 999px; font-size: .82rem; font-weight: 500;
  color: var(--text); background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.info-pill svg { color: var(--gold); flex: 0 0 auto; }
.info-link { transition: border-color .25s, background .25s, transform .2s; }
.info-link:hover { border-color: var(--border-gold); background: var(--surface-strong); transform: translateY(-1px); }
.info-free {
  color: #bcefd3;
  background: rgba(79, 197, 138, .09);
  border-color: rgba(79, 197, 138, .35);
}
.info-free svg { color: var(--ok); }

/* Restaurant Social Icons */
.hero-socials {
  margin-top: 14px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.social-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--gold-2); background: var(--surface); border: 1px solid var(--border-gold);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .25s var(--ease), background .25s, color .25s, box-shadow .25s;
}
.social-btn:hover {
  transform: translateY(-3px);
  color: #1a1204;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 8px 20px rgba(230, 184, 90, .32);
}
.social-btn:active { transform: scale(.93); }

.search {
  margin-top: 20px; display: flex; align-items: center; gap: 10px;
  padding: 0 16px; height: 52px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--muted);
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.search:focus-within { border-color: var(--border-gold); box-shadow: 0 0 0 4px rgba(230, 184, 90, .10); background: var(--surface-strong); color: var(--gold); }
.search input {
  flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 1rem; color: var(--text);
}
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-strong); color: var(--text); font-size: 1.1rem; line-height: 1; }

/* ---------- Category pills ---------- */
.cats-wrap {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(to bottom, rgba(10, 18, 20, .94), rgba(10, 18, 20, .82));
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-block: 1px solid var(--border);
}
.cats {
  display: flex; gap: 10px; overflow-x: auto; padding: 12px 16px;
  max-width: 1100px; margin: 0 auto; scrollbar-width: none; scroll-snap-type: x proximity;
}
.cats::-webkit-scrollbar { display: none; }
.pill {
  flex: 0 0 auto; scroll-snap-align: center;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 999px; font-size: .92rem; font-weight: 500; white-space: nowrap;
  color: var(--muted); background: var(--surface); border: 1px solid var(--border);
  transition: color .25s, background .25s, border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.pill-count {
  font-size: .76rem; padding: 1px 7px; border-radius: 999px;
  background: rgba(255, 255, 255, .07); color: var(--muted);
}
.pill:active { transform: scale(.94); }
.pill.active {
  color: #1a1204; font-weight: 700;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  border-color: transparent; box-shadow: 0 6px 20px rgba(230, 184, 90, .3);
  transform: translateY(-1px);
}
.pill.active .pill-count {
  background: rgba(26, 18, 4, .16); color: #1a1204;
}

/* ---------- Grid & cards ---------- */
.container { max-width: 1100px; margin: 0 auto; padding: 18px 14px 40px; }
.section-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; padding-inline: 4px;
  font-size: .86rem; color: var(--muted);
}
.section-meta strong { color: var(--gold); font-weight: 700; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } .container { padding-inline: 24px; } }
@media (min-width: 1020px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card {
  position: relative; display: flex; flex-direction: column; text-align: start; width: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .35s var(--ease), border-color .3s, box-shadow .3s;
  animation: rise .5s var(--ease) both;
}
.card:nth-child(1) { animation-delay: 20ms; }
.card:nth-child(2) { animation-delay: 55ms; }
.card:nth-child(3) { animation-delay: 90ms; }
.card:nth-child(4) { animation-delay: 125ms; }
.card:nth-child(5) { animation-delay: 160ms; }
.card:nth-child(6) { animation-delay: 195ms; }
.card:nth-child(7) { animation-delay: 230ms; }
.card:nth-child(8) { animation-delay: 265ms; }

.card:hover { transform: translateY(-4px); border-color: var(--border-gold); box-shadow: var(--shadow); }
.card:active { transform: scale(.98); }
.card-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-img img { transform: scale(1.07); }
.card-img::after { content: ""; position: absolute; inset: auto 0 0 0; height: 48%; background: linear-gradient(to top, rgba(10, 18, 20, .78), transparent); }

.card-cat-tag {
  position: absolute; bottom: 8px; inset-inline-start: 10px; z-index: 2;
  padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 500;
  color: var(--gold-2); background: rgba(10, 18, 20, .72); border: 1px solid rgba(230, 184, 90, .28);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}

.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-title { font-size: 1rem; font-weight: 700; line-height: 1.45; }
.card-desc {
  font-size: .82rem; color: var(--muted); font-weight: 300;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-price { margin-top: auto; padding-top: 8px; font-weight: 800; color: var(--gold); font-size: 1.05rem; }
.card-price small { font-weight: 400; font-size: .75rem; color: var(--muted); margin-inline-start: 4px; }

.card.sold { opacity: .6; }
.card.sold .card-img img { filter: grayscale(.85) brightness(.7); }
.card.sold .card-price { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .3); }

.badge {
  position: absolute; top: 10px; inset-inline-start: 10px; z-index: 2;
  padding: 3px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700;
  color: #fff; background: rgba(229, 96, 77, .9); border: 1px solid rgba(255, 255, 255, .25);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.badge-vip {
  inset-inline-start: auto; inset-inline-end: 10px;
  color: #1a1204; background: linear-gradient(135deg, var(--gold-2), var(--gold));
  border-color: rgba(255, 255, 255, .4); box-shadow: 0 4px 14px rgba(230, 184, 90, .4);
  letter-spacing: .5px;
}

.empty { text-align: center; color: var(--muted); padding: 60px 0; }
.empty svg { color: var(--gold); opacity: .8; margin-bottom: 10px; }

/* ---------- Footer & Developer Signature ---------- */
.footer {
  position: relative; text-align: center; padding: 30px 20px calc(env(safe-area-inset-bottom) + 34px);
  color: var(--muted); font-size: .85rem;
}
.footer-line { height: 1px; max-width: 260px; margin: 0 auto 16px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .6; }
.footer-tagline { color: var(--gold-2); font-size: .92rem; margin-bottom: 4px; opacity: .92; }
.footer-copy { font-size: .8rem; opacity: .75; margin-bottom: 20px; }

.dev-card {
  display: inline-flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 16px 26px; border-radius: 22px;
  background: var(--surface); border: 1px solid var(--border-gold);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
}
.dev-credit {
  font-size: .9rem; font-weight: 500; color: var(--text);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px;
}
.dev-credit span {
  font-weight: 800; letter-spacing: .4px;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.dev-socials { display: flex; align-items: center; justify-content: center; gap: 14px; }
.dev-social-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text); background: var(--surface-strong); border: 1px solid var(--border);
  transition: transform .25s var(--ease), background .25s, border-color .25s, color .25s, box-shadow .25s;
}
.dev-social-btn:hover { transform: translateY(-3px); color: #fff; }
.dev-social-btn:active { transform: scale(.93); }
.dev-social-btn.ig:hover {
  background: linear-gradient(135deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888);
  border-color: transparent; box-shadow: 0 8px 20px rgba(220, 39, 67, .35);
}
.dev-social-btn.fb:hover {
  background: #1877f2;
  border-color: transparent; box-shadow: 0 8px 20px rgba(24, 119, 242, .38);
}
.dev-social-btn.wa:hover {
  background: #25d366; color: #091c10;
  border-color: transparent; box-shadow: 0 8px 20px rgba(37, 211, 102, .38);
}

.lock-btn {
  position: absolute; inset-inline-end: 16px; bottom: calc(env(safe-area-inset-bottom) + 18px);
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  color: var(--muted); opacity: .35; transition: opacity .25s, color .25s;
}
.lock-btn:hover, .lock-btn:focus-visible { opacity: 1; color: var(--gold); }

/* ---------- Overlays & sheets ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(3, 8, 9, .75); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.overlay.open { opacity: 1; visibility: visible; }
.overlay-top { z-index: 120; }
.sheet {
  position: relative; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto;
  background: linear-gradient(180deg, rgba(24, 38, 41, .97), rgba(12, 22, 24, .99));
  border: 1px solid var(--border-gold); border-bottom: 0;
  border-radius: 28px 28px 0 0; box-shadow: var(--shadow);
  transform: translateY(40px) scale(.98); transition: transform .4s var(--ease);
}
.overlay.open .sheet { transform: none; }
@media (min-width: 640px) {
  .overlay { align-items: center; padding: 20px; }
  .sheet { border-radius: 28px; border-bottom: 1px solid var(--border-gold); }
}
.close-btn {
  position: absolute; top: 12px; inset-inline-start: 12px; z-index: 5;
  width: 36px; height: 36px; border-radius: 50%; font-size: 1.4rem; line-height: 1;
  background: rgba(10, 18, 20, .65); border: 1px solid var(--border); color: var(--text);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .2s, transform .2s;
}
.close-btn:hover { background: rgba(230, 184, 90, .25); transform: rotate(90deg); }

/* Item detail */
.item-img-wrap { position: relative; aspect-ratio: 16 / 11; background: var(--bg-2); }
.item-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.item-img-wrap::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(to top, rgba(12, 22, 24, 1), transparent); }
.item-img-wrap .badge { top: 14px; inset-inline-start: auto; inset-inline-end: 14px; font-size: .85rem; }
.item-body { padding: 4px 22px 26px; position: relative; z-index: 1; }
.item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.item-head h2 { font-size: 1.4rem; line-height: 1.45; }
.chip { flex: 0 0 auto; margin-top: 4px; padding: 2px 12px; border-radius: 999px; font-size: .78rem; color: var(--gold); border: 1px solid var(--border-gold); background: rgba(230, 184, 90, .08); }
.item-desc { margin-top: 10px; color: var(--muted); font-weight: 300; }
.item-price {
  margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border-gold);
  font-size: 1.75rem; font-weight: 800; color: var(--gold);
}
.item-price small { font-size: .95rem; font-weight: 500; color: var(--muted); margin-inline-start: 6px; }

/* ---------- Buttons & form controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 14px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; transition: transform .2s var(--ease), box-shadow .25s, background .25s, border-color .25s;
}
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn:active:not(:disabled) { transform: scale(.96); }
.btn-gold { color: #1a1204; background: linear-gradient(135deg, var(--gold-2), var(--gold)); box-shadow: 0 8px 22px rgba(230, 184, 90, .25); }
.btn-gold:hover:not(:disabled) { box-shadow: 0 10px 28px rgba(230, 184, 90, .4); }
.btn-outline { color: var(--gold); border-color: var(--border-gold); background: rgba(230, 184, 90, .06); }
.btn-outline:hover:not(:disabled) { background: rgba(230, 184, 90, .14); }
.btn-ghost { color: var(--text); background: var(--surface); border-color: var(--border); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-strong); }
.btn-danger { color: #fff; background: var(--danger); }
.btn-block { width: 100%; }
.icon-only { width: 42px; padding: 0; font-size: 1.3rem; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; flex: 1; min-width: 0; }
.field > span { font-size: .85rem; color: var(--muted); font-weight: 500; }
.field input, .field textarea {
  width: 100%; padding: 11px 14px; border-radius: 12px; outline: 0; resize: vertical;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--border); color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(230, 184, 90, .14); }
.field-row { display: flex; gap: 12px; }
.form-error { color: var(--danger); font-size: .88rem; margin-bottom: 12px; animation: shake .4s; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }
.form-actions .btn { flex: 1; }

/* Password Input Wrapper & Eye Toggle */
.pass-wrap { position: relative; display: flex; align-items: center; }
.pass-wrap input { padding-inline-end: 42px; }
.eye-btn {
  position: absolute; inset-inline-end: 8px; width: 32px; height: 32px;
  border-radius: 8px; display: grid; place-items: center; font-size: 1rem;
  color: var(--muted); transition: color .2s, background .2s;
}
.eye-btn:hover { color: var(--gold); background: rgba(255, 255, 255, .06); }

/* Security Modal Status Banner & Password Strength Meter */
.auth-status-banner {
  padding: 10px 14px; margin-bottom: 16px; border-radius: 12px;
  font-size: .82rem; font-weight: 500; line-height: 1.55;
  color: var(--gold-2); background: rgba(230, 184, 90, .09); border: 1px solid var(--border-gold);
}
.auth-status-banner.is-server {
  color: #bcefd3; background: rgba(79, 197, 138, .1); border-color: rgba(79, 197, 138, .35);
}
.strength-meter { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.strength-track {
  flex: 1; height: 6px; border-radius: 999px; overflow: hidden;
  background: rgba(255, 255, 255, .08);
}
.strength-bar {
  height: 100%; width: 0%; border-radius: 999px;
  background: var(--danger); transition: width .3s var(--ease), background .3s;
}
.strength-bar.s-1 { width: 25%; background: var(--danger); }
.strength-bar.s-2 { width: 50%; background: #e89b3c; }
.strength-bar.s-3 { width: 75%; background: var(--gold); }
.strength-bar.s-4 { width: 100%; background: var(--ok); }
.strength-label { font-size: .76rem; color: var(--muted); white-space: nowrap; }
.reset-auth-btn { margin-top: 12px; font-size: .84rem; color: var(--muted); }

/* Upload Box & Image Preview */
.upload-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 20px 16px; border-radius: 16px; text-align: center;
  background: rgba(230, 184, 90, .06); border: 1.5px dashed var(--border-gold);
  color: var(--gold); transition: background .25s, border-color .25s, transform .2s;
}
.upload-box:hover, .upload-box:active {
  background: rgba(230, 184, 90, .13); border-color: var(--gold);
}
.upload-box strong { font-size: .92rem; color: var(--text); font-weight: 600; }
.upload-box small { font-size: .78rem; color: var(--muted); }

.img-preview-box {
  position: relative; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border-gold); aspect-ratio: 16 / 10; background: var(--bg-2);
}
.img-preview-box img { width: 100%; height: 100%; object-fit: cover; }
.preview-actions {
  position: absolute; inset: auto 10px 10px 10px;
  display: flex; gap: 8px; justify-content: flex-end;
}
.preview-btn {
  padding: 6px 14px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  color: var(--text); background: rgba(10, 18, 20, .82); border: 1px solid var(--border-gold);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.preview-btn:hover { background: rgba(230, 184, 90, .25); }
.preview-btn.danger { color: #ffb4a8; border-color: rgba(229, 96, 77, .5); }
.preview-btn.danger:hover { background: rgba(229, 96, 77, .35); }

.url-fallback { margin-top: 6px; font-size: .8rem; color: var(--muted); }
.url-fallback summary { cursor: pointer; user-select: none; padding: 4px 2px; }
.url-fallback summary:hover { color: var(--gold); }
.url-fallback input { margin-top: 6px; font-size: .85rem; padding: 9px 12px; }

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 50px; height: 28px; flex: 0 0 auto; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2; margin: 0; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid var(--border); transition: background .25s, border-color .25s; }
.switch i::before {
  content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); transition: transform .3s var(--ease);
}
.switch input:checked + i { background: var(--ok); border-color: transparent; }
.switch input:checked + i::before { transform: translateX(-22px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px rgba(230, 184, 90, .35); }
.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 2px 6px; font-weight: 500; }

/* ---------- Form sheet ---------- */
.form-sheet { padding: 56px 22px 24px; }
.form-sheet h2 { margin-bottom: 16px; font-size: 1.25rem; }

/* ---------- Confirm ---------- */
.confirm-sheet { max-width: 380px; padding: 28px 22px 22px; text-align: center; border-radius: 24px; border-bottom: 1px solid var(--border-gold); }
.overlay-top { align-items: center; padding: 20px; }
.confirm-icon { width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; color: var(--danger); background: rgba(229, 96, 77, .12); border: 1px solid rgba(229, 96, 77, .4); }

/* ---------- Admin ---------- */
.admin-overlay { align-items: stretch; padding: 0; background: rgba(5, 11, 12, .96); }
.admin-shell { width: 100%; max-width: 900px; margin: 0 auto; overflow-y: auto; padding: calc(env(safe-area-inset-top) + 18px) 16px 40px; display: flex; flex-direction: column; }
.login-card {
  position: relative; margin: auto; width: 100%; max-width: 400px; padding: 40px 24px 26px; text-align: center;
  background: var(--surface); border: 1px solid var(--border-gold); border-radius: 26px; box-shadow: var(--shadow);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); animation: rise .6s var(--ease) both;
}
.login-card h2 { font-size: 1.2rem; margin-bottom: 22px; }
.login-card form { text-align: start; }
.login-icon { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; color: var(--gold); background: rgba(230, 184, 90, .1); border: 1px solid var(--border-gold); }

.dash { animation: rise .5s var(--ease) both; }
.dash-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dash-top h2 { font-size: 1.3rem; }
.dash-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.muted { color: var(--muted); font-size: .85rem; }
.dash-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.dash-toolbar .btn { flex: 1 1 200px; }

.admin-search-wrap { margin-bottom: 12px; }
.admin-search-wrap input {
  width: 100%; padding: 11px 16px; border-radius: 14px; outline: 0;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  transition: border-color .2s;
}
.admin-search-wrap input:focus { border-color: var(--gold); }

.hint { font-size: .8rem; color: var(--muted); margin-bottom: 18px; padding: 10px 14px; border-radius: 12px; background: rgba(230, 184, 90, .06); border: 1px dashed var(--border-gold); }

.admin-list { display: flex; flex-direction: column; gap: 10px; }
.arow {
  display: grid; grid-template-columns: 60px 1fr; gap: 12px; align-items: center;
  padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border);
  animation: rise .35s var(--ease) both;
}
.arow.off { opacity: .8; }
.arow img { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; background: var(--bg-2); }
.arow-info { min-width: 0; }
.arow-name { font-weight: 700; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arow-cat { font-size: .78rem; color: var(--gold); }
.arow-controls { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.price-edit { display: flex; align-items: center; gap: 6px; flex: 1 1 150px; }
.price-edit input {
  width: 100%; min-width: 0; padding: 7px 10px; border-radius: 10px; text-align: end; font-weight: 700; color: var(--gold);
  background: rgba(255, 255, 255, .05); border: 1px solid var(--border); outline: 0;
}
.price-edit input:focus { border-color: var(--gold); }
.price-edit span { font-size: .8rem; color: var(--muted); }
.avail { display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 500; }
.avail em { font-style: normal; min-width: 52px; }
.avail.is-on em { color: var(--ok); }
.avail.is-off em { color: var(--danger); }
.icon-btn { padding: 7px 14px; border-radius: 10px; font-size: .85rem; font-weight: 500; background: var(--surface-strong); border: 1px solid var(--border); transition: background .2s; }
.icon-btn:hover { background: rgba(230, 184, 90, .16); }
.icon-btn.del { color: var(--danger); }
.icon-btn.del:hover { background: rgba(229, 96, 77, .16); }
@media (min-width: 720px) {
  .arow { grid-template-columns: 60px 1fr auto; }
  .arow-controls { grid-column: auto; border-top: 0; padding-top: 0; flex-wrap: nowrap; }
  .price-edit { flex: 0 0 150px; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; z-index: 200; inset-inline: 0; margin-inline: auto; width: max-content; max-width: 90vw;
  bottom: calc(env(safe-area-inset-bottom) + 24px); padding: 11px 22px; border-radius: 999px; font-size: .9rem; font-weight: 500;
  background: rgba(20, 34, 37, .95); border: 1px solid var(--border-gold); color: var(--text); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(20px); pointer-events: none; transition: opacity .3s, transform .35s var(--ease);
}
.toast.show { opacity: 1; transform: none; }

/* ---------- Animations ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(79, 197, 138, .65); }
  70% { box-shadow: 0 0 0 7px rgba(79, 197, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 197, 138, 0); }
}
@keyframes pulseDotClosed {
  0% { box-shadow: 0 0 0 0 rgba(229, 96, 77, .65); }
  70% { box-shadow: 0 0 0 7px rgba(229, 96, 77, 0); }
  100% { box-shadow: 0 0 0 0 rgba(229, 96, 77, 0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }