/* ═══════════════════════════════════════════════════════
   ROTA 88 BARREIRO - Estilos PWA
   Paleta: Preto #1a1a1a | Dourado #F5B841 | Branco #FAFAFA
══════════════════════════════════════════════════════ */

/* ─── RESET & BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --gold: #F5B841;
  --gold-dark: #D4960A;
  --gold-light: #FFD97D;
  --black: #1a1a1a;
  --black-soft: #252525;
  --black-card: #2a2a2a;
  --white: #FAFAFA;
  --white-muted: #c0c0c0;
  --red: #e74c3c;
  --green: #27ae60;
  --radius: 16px;
  --shadow-gold: 0 4px 20px rgba(245,184,65,0.35);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.4);
  --transition: 0.25s ease;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--black);
  color: var(--white);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── TELAS ─── */
.screen { display: none; min-height: 100dvh; }
.screen.active { display: flex; flex-direction: column; }

/* ════════════════════════════════════
   HOME - PIZZA PANIC
════════════════════════════════════ */
.home-container {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: calc(var(--safe-top) + 12px) 20px calc(var(--safe-bottom) + 16px);
  gap: 20px;
  background: linear-gradient(180deg, #111 0%, #1a1a1a 100%);
}

/* Header */
.home-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 4px;
}

.logo-wrapper {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
}

.brand-logo {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 50%;
  border: 2.5px solid var(--gold);
  box-shadow: 0 0 12px rgba(245,184,65,0.3);
}

.brand-logo-fallback {
  width: 58px;
  height: 58px;
  background: var(--gold);
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-weight: 900;
  font-size: 1.2rem;
}

.brand-r { color: var(--black); }
.brand-88 { color: var(--black); }

.header-info { flex: 1; }
.brand-name {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 1px;
  line-height: 1.1;
}
.brand-sub {
  font-size: 0.78rem;
  color: var(--white-muted);
  margin-top: 2px;
}

/* API Status Badge */
.api-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 600;
  margin-top: 4px;
}
.api-badge.connecting { background: rgba(255,255,255,0.08); color: var(--white-muted); }
.api-badge.online { background: rgba(39,174,96,0.2); color: #4ade80; }
.api-badge.demo { background: rgba(245,184,65,0.15); color: var(--gold); }
.api-badge.offline { background: rgba(231,76,60,0.2); color: #f87171; }

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.api-badge.connecting .badge-dot { animation: pulse 1s infinite; }

/* Cart button */
.cart-btn {
  position: relative;
  background: var(--black-card);
  border: 1.5px solid rgba(245,184,65,0.3);
  border-radius: 14px;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.cart-btn:active { transform: scale(0.92); background: var(--black-soft); }
.cart-icon { font-size: 1.25rem; }
.cart-count {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--gold);
  color: var(--black);
  font-size: 0.65rem;
  font-weight: 800;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.cart-count.hidden { display: none; }

/* ─── SEÇÃO PANIC ─── */
.panic-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  flex: 1;
  justify-content: center;
  padding: 12px 0;
}

/* Preview do favorito */
.favorite-preview {
  width: 100%;
  background: rgba(245,184,65,0.08);
  border: 1px solid rgba(245,184,65,0.25);
  border-radius: 14px;
  padding: 12px 16px;
  text-align: center;
}
.favorite-preview.hidden { display: none; }
.favorite-label { font-size: 0.78rem; color: var(--gold); font-weight: 700; margin-bottom: 4px; }
.favorite-items { font-size: 0.82rem; color: var(--white-muted); margin-bottom: 4px; }
.favorite-total { font-size: 0.9rem; color: var(--gold); font-weight: 700; }

/* BOTÃO PRINCIPAL PIZZA PANIC */
.panic-button {
  position: relative;
  width: min(300px, 82vw);
  height: min(300px, 82vw);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFD97D, var(--gold) 55%, var(--gold-dark));
  border: 4px solid var(--gold-light);
  box-shadow: var(--shadow-gold), 0 0 60px rgba(245,184,65,0.25), inset 0 2px 6px rgba(255,255,255,0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  animation: panicPulse 2.8s ease-in-out infinite;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.panic-button:active {
  transform: scale(0.92);
  box-shadow: 0 2px 10px rgba(245,184,65,0.4);
  animation: none;
}

@keyframes panicPulse {
  0%, 100% { box-shadow: var(--shadow-gold), 0 0 40px rgba(245,184,65,0.2); }
  50% { box-shadow: var(--shadow-gold), 0 0 80px rgba(245,184,65,0.5), 0 0 120px rgba(245,184,65,0.15); }
}

.panic-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
  pointer-events: none;
}

.panic-logo {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 50%;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
  border: 2px solid rgba(0,0,0,0.15);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.panic-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.panic-title {
  font-size: clamp(1.2rem, 5vw, 1.5rem);
  font-weight: 900;
  color: var(--black);
  letter-spacing: 2px;
  text-shadow: 0 1px 2px rgba(255,255,255,0.3);
}

.panic-subtitle {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--black);
  opacity: 0.75;
}

.panic-ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0);
  animation: rippleOut 2.8s ease-out infinite;
}

@keyframes rippleOut {
  0% { box-shadow: 0 0 0 0 rgba(245,184,65,0.6); }
  70% { box-shadow: 0 0 0 24px rgba(245,184,65,0); }
  100% { box-shadow: 0 0 0 0 rgba(245,184,65,0); }
}

.panic-hint {
  font-size: 0.78rem;
  color: var(--white-muted);
  text-align: center;
  max-width: 260px;
  line-height: 1.4;
}

/* ─── QUICK NAV ─── */
.quick-nav {
  display: flex;
  gap: 12px;
}

.nav-card {
  flex: 1;
  background: var(--black-card);
  border: 1.5px solid rgba(245,184,65,0.2);
  border-radius: var(--radius);
  padding: 16px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--white);
}
.nav-card:active { transform: scale(0.96); border-color: var(--gold); }

.nav-icon { font-size: 1.3rem; }
.nav-label { flex: 1; font-size: 0.88rem; font-weight: 600; text-align: left; }
.nav-arrow { color: var(--gold); font-size: 1.2rem; font-weight: 700; }

/* ─── FOOTER ─── */
.home-footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 14px;
}
.footer-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--white-muted);
  text-align: center;
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.footer-icon {
  flex-shrink: 0;
}

/* ════════════════════════════════════
   CARDÁPIO
════════════════════════════════════ */
.menu-container {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

.menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(var(--safe-top) + 12px) 16px 12px;
  background: var(--black-soft);
  border-bottom: 1px solid rgba(245,184,65,0.15);
  flex-shrink: 0;
}

.menu-header h2 {
  flex: 1;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
}

.back-btn {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: var(--transition);
  flex-shrink: 0;
}
.back-btn:active { background: rgba(245,184,65,0.1); }

/* Search */
.search-bar {
  padding: 10px 16px;
  background: var(--black-soft);
  flex-shrink: 0;
}
.search-bar input {
  width: 100%;
  background: var(--black-card);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 10px 16px;
  color: var(--white);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}
.search-bar input:focus { border-color: var(--gold); }
.search-bar input::placeholder { color: rgba(255,255,255,0.3); }

/* Category Tabs */
.category-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-shrink: 0;
  background: var(--black-soft);
}
.category-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 20px;
  border: 1.5px solid rgba(255,255,255,0.15);
  background: transparent;
  color: var(--white-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  scroll-snap-align: start;
  white-space: nowrap;
}
.cat-tab.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--black);
}

/* Menu Items */
.menu-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px calc(var(--safe-bottom) + 16px);
  -webkit-overflow-scrolling: touch;
}

.category-group { margin-bottom: 24px; }
.category-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--gold);
  padding: 8px 0 10px;
  border-bottom: 1px solid rgba(245,184,65,0.15);
  margin-bottom: 12px;
}

/* Item Card - with product image */
.item-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--black-card);
  border: 1.5px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 0;
  margin-bottom: 12px;
  transition: var(--transition);
  overflow: hidden;
}
.item-card:active { border-color: var(--gold); transform: scale(0.99); }

.item-thumb {
  width: 110px;
  min-height: 110px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  background: var(--black-soft);
}
.item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.item-card:active .item-thumb img { transform: scale(1.05); }
.item-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  background: linear-gradient(135deg, var(--black-soft), var(--black-card));
  color: var(--white-muted);
  opacity: 0.5;
}

.item-body {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.item-info { flex: 1; min-width: 0; }
.item-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 3px;
}
.item-desc {
  font-size: 0.75rem;
  color: var(--white-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}
.item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}
.item-price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gold);
}

.item-add-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gold);
  border: none;
  color: var(--black);
  font-size: 1.3rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.item-add-btn:active { transform: scale(0.88); background: var(--gold-dark); }

/* Loading / empty */
.loading-state, .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--white-muted);
  font-size: 0.9rem;
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(245,184,65,0.15);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ════════════════════════════════════
   CARRINHO
════════════════════════════════════ */
.cart-container {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding-bottom: calc(var(--safe-bottom) + 16px);
}

.cart-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(var(--safe-top) + 12px) 16px 12px;
  background: var(--black-soft);
  border-bottom: 1px solid rgba(245,184,65,0.15);
}
.cart-header h2 {
  flex: 1;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
}
.clear-cart-btn {
  background: none;
  border: none;
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
}

.cart-items { flex: 1; padding: 12px 16px; }

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--black-card);
  border-radius: 14px;
  margin-bottom: 10px;
  border: 1.5px solid rgba(255,255,255,0.06);
}

.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 2px;
}
.cart-item-price {
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 700;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--black-soft);
  border-radius: 10px;
  padding: 4px;
}
.qty-btn {
  width: 28px; height: 28px;
  border-radius: 8px;
  border: none;
  background: rgba(245,184,65,0.15);
  color: var(--gold);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.qty-btn:active { background: var(--gold); color: var(--black); }
.qty-display {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
  min-width: 20px;
  text-align: center;
}

.remove-btn {
  background: none;
  border: none;
  color: rgba(231,76,60,0.6);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: var(--transition);
}
.remove-btn:active { color: var(--red); background: rgba(231,76,60,0.1); }

/* Cart Empty */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 60px 20px;
  text-align: center;
  color: var(--white-muted);
}
.cart-empty.hidden { display: none; }
.empty-icon { font-size: 3rem; }
.cart-empty h3 { font-size: 1.1rem; color: var(--white); }
.cart-empty p { font-size: 0.85rem; }

/* Cart Summary */
.cart-summary {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cart-summary.hidden { display: none; }

.summary-rows {
  background: var(--black-card);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid rgba(255,255,255,0.06);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--white-muted);
}
.total-row {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 10px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
}
.total-row span:last-child { color: var(--gold); }

/* ════════════════════════════════════
   CHECKOUT
════════════════════════════════════ */
.checkout-container {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  overflow-y: auto;
  padding-bottom: calc(var(--safe-bottom) + 20px);
}

.checkout-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(var(--safe-top) + 12px) 16px 12px;
  background: var(--black-soft);
  border-bottom: 1px solid rgba(245,184,65,0.15);
  position: sticky;
  top: 0;
  z-index: 10;
}
.checkout-header h2 {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
}

.checkout-form {
  padding: 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-section {
  background: var(--black-card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  border: 1.5px solid rgba(255,255,255,0.06);
}
.form-section h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 14px;
}

.form-group { margin-bottom: 12px; }
.form-group:last-child { margin-bottom: 0; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--white-muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--black-soft);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--white);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--gold); }
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,0.25); }

.form-row { display: flex; gap: 10px; }
.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

/* Payment Options */
.payment-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.payment-option {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--black-soft);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: var(--transition);
}
.payment-option:has(input:checked) {
  border-color: var(--gold);
  background: rgba(245,184,65,0.08);
}
.payment-option input { width: 14px; height: 14px; accent-color: var(--gold); }
.payment-label { font-size: 0.82rem; font-weight: 500; color: var(--white); }

/* Order Summary */
.summary-items { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.summary-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--white-muted);
}
.summary-totals { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 10px; }

/* ════════════════════════════════════
   BOTÕES
════════════════════════════════════ */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--gold);
  color: var(--black);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}
.btn-primary:active { transform: scale(0.97); background: var(--gold-dark); }

.btn-secondary {
  width: 100%;
  padding: 13px;
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-secondary:active { background: rgba(255,255,255,0.05); }

.btn-favorite {
  width: 100%;
  padding: 13px;
  background: rgba(245,184,65,0.1);
  color: var(--gold);
  border: 1.5px solid rgba(245,184,65,0.35);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.btn-favorite:active { background: rgba(245,184,65,0.2); }

.btn-order {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--black);
  border: none;
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-gold);
}
.btn-order:active { transform: scale(0.97); }

.btn-submit-order {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--black);
  border: none;
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-gold);
  margin-top: 6px;
  letter-spacing: 0.5px;
}
.btn-submit-order:active { transform: scale(0.97); }
.btn-submit-order:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-whatsapp {
  width: 100%;
  padding: 13px;
  background: #25D366;
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.btn-whatsapp:active { background: #1ebe57; }

/* ════════════════════════════════════
   MODALS
════════════════════════════════════ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 var(--safe-bottom);
}
.modal.hidden { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  background: var(--black-card);
  border-radius: 24px 24px 0 0;
  padding: 32px 24px calc(var(--safe-bottom) + 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  border-top: 2px solid rgba(255,255,255,0.08);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(60px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.success-icon { font-size: 3.5rem; }
.error-icon { font-size: 3.5rem; }

.modal-card h2 { font-size: 1.3rem; font-weight: 800; color: var(--white); }
.modal-card p { font-size: 0.9rem; color: var(--white-muted); text-align: center; line-height: 1.5; }

.order-id {
  background: rgba(245,184,65,0.1);
  border: 1px solid rgba(245,184,65,0.3);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 0.82rem;
  color: var(--gold);
  font-weight: 700;
}

.success-actions, .error-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

/* ════════════════════════════════════
   TOAST
════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: calc(var(--safe-bottom) + 20px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--black-card);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  z-index: 200;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  animation: toastIn 0.2s ease;
  border: 1px solid rgba(255,255,255,0.08);
}
.toast.hidden { display: none; }
.toast.success { border-color: rgba(39,174,96,0.4); }
.toast.error { border-color: rgba(231,76,60,0.4); }
.toast.gold { border-color: var(--gold); color: var(--gold); }

@keyframes toastIn {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ════════════════════════════════════
   INSTALL OVERLAY
════════════════════════════════════ */
.install-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 24px;
  animation: fadeIn 0.4s ease;
}
.install-overlay.hidden { display: none; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.install-card {
  width: 100%;
  max-width: 360px;
  background: var(--black-card);
  border-radius: 24px;
  padding: 40px 28px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  border: 1.5px solid rgba(245,184,65,0.25);
  box-shadow: 0 8px 40px rgba(0,0,0,0.6), 0 0 60px rgba(245,184,65,0.1);
  animation: slideUp 0.4s ease;
}

.install-logo {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 22px;
  border: 3px solid var(--gold);
  box-shadow: 0 0 24px rgba(245,184,65,0.35);
}

.install-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 1px;
}

.install-subtitle {
  font-size: 0.9rem;
  color: var(--white-muted);
  text-align: center;
  line-height: 1.5;
  max-width: 280px;
}

.install-btn-primary {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--black);
  border: none;
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-gold);
  margin-top: 8px;
}
.install-btn-primary:active { transform: scale(0.97); background: var(--gold-dark); }
.install-btn-primary.hidden { display: none; }

.install-btn-skip {
  width: 100%;
  padding: 13px;
  background: transparent;
  color: var(--white-muted);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.install-btn-skip:active { background: rgba(255,255,255,0.05); color: var(--white); }

.install-ios, .install-generic {
  width: 100%;
  background: rgba(245,184,65,0.06);
  border: 1px solid rgba(245,184,65,0.2);
  border-radius: 14px;
  padding: 16px 18px;
  margin-top: 4px;
}
.install-ios.hidden, .install-generic.hidden { display: none; }

.ios-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--white);
  padding: 6px 0;
  line-height: 1.4;
}
.ios-step strong { color: var(--gold); }
.ios-icon { font-size: 1.2rem; flex-shrink: 0; }

.install-generic p {
  font-size: 0.88rem;
  color: var(--white-muted);
  text-align: center;
  line-height: 1.5;
}
.install-generic strong { color: var(--gold); }

/* ─── UTILS ─── */
.hidden { display: none !important; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(245,184,65,0.3); border-radius: 4px; }
