/* ===================================
   LA GIN TAVERNA - Neon Bar Aesthetic
   =================================== */
@import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #050508;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.08);
  --text: #f0f0f0;
  --text-dim: #888;
  --text-muted: #555;
  --neon-pink: #ff2d7b;
  --neon-cyan: #00e5ff;
  --neon-green: #39ff14;
  --neon-amber: #ffaa00;
  --neon-purple: #c77dff;
  --glow-pink: 0 0 10px rgba(255,45,123,0.5), 0 0 40px rgba(255,45,123,0.2);
  --glow-cyan: 0 0 10px rgba(0,229,255,0.5), 0 0 40px rgba(0,229,255,0.2);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-height: 70px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-primary);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Subtle noise overlay */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ===== LAYOUT ===== */
.page { display: none; padding: 24px 16px calc(var(--nav-height) + 24px); position: relative; z-index: 1; max-width: 600px; margin: 0 auto; }
.page.active { display: block; animation: fadeUp 0.4s ease; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
@keyframes neonFlicker {
  0%, 100% { opacity: 1; text-shadow: 0 0 10px rgba(255,45,123,0.8), 0 0 40px rgba(255,45,123,0.4), 0 0 80px rgba(255,45,123,0.2); }
  5% { opacity: 0.8; text-shadow: none; }
  6% { opacity: 1; text-shadow: 0 0 10px rgba(255,45,123,0.8), 0 0 40px rgba(255,45,123,0.4); }
  10% { opacity: 0.9; }
  55% { opacity: 1; }
  56% { opacity: 0.7; text-shadow: 0 0 5px rgba(255,45,123,0.4); }
  57% { opacity: 1; text-shadow: 0 0 10px rgba(255,45,123,0.8), 0 0 40px rgba(255,45,123,0.4), 0 0 80px rgba(255,45,123,0.2); }
}

/* ===== NEON SIGN ===== */
.neon-sign {
  font-family: 'Pacifico', cursive;
  text-align: center;
  padding: 40px 0 20px;
}
.neon-sign h1 {
  font-size: clamp(2.2rem, 8vw, 3.5rem);
  color: var(--neon-pink);
  animation: neonFlicker 4s infinite;
  line-height: 1.2;
  letter-spacing: 2px;
}
.neon-sign .subtitle {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-top: 8px;
  font-weight: 300;
}

/* ===== NAVIGATION ===== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(5,5,8,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: var(--transition);
  cursor: pointer;
  padding: 8px 12px;
  border: none;
  background: none;
  -webkit-tap-highlight-color: transparent;
}
.nav-item svg { width: 22px; height: 22px; transition: var(--transition); }
.nav-item.active { color: var(--neon-pink); }
.nav-item.active svg { filter: drop-shadow(0 0 6px rgba(255,45,123,0.6)); }

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
  transition: var(--transition);
  animation: fadeUp 0.5s ease backwards;
}
.card:hover { background: var(--bg-card-hover); border-color: rgba(255,255,255,0.12); }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.card-title { font-size: 1.1rem; font-weight: 600; }
.card-subtitle { font-size: 0.8rem; color: var(--text-dim); margin-top: 2px; }
.card-body { font-size: 0.88rem; color: var(--text-dim); line-height: 1.5; }
.card-img {
  width: 100%; height: 180px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  background: rgba(255,255,255,0.03);
}
.card-img.placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  color: var(--text-muted);
}

/* Catalog card with left thumbnail */
.catalog-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.catalog-thumb {
  width: 80px;
  height: 80px;
  min-width: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
}
.catalog-thumb.placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  color: var(--text-muted);
}
.catalog-info {
  flex: 1;
  min-width: 0;
}

/* Delay stagger for cards */
.card:nth-child(1) { animation-delay: 0s; }
.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.1s; }
.card:nth-child(4) { animation-delay: 0.15s; }
.card:nth-child(5) { animation-delay: 0.2s; }
.card:nth-child(6) { animation-delay: 0.25s; }

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-gin { background: rgba(0,229,255,0.12); color: var(--neon-cyan); }
.badge-cyan { background: rgba(0,229,255,0.12); color: var(--neon-cyan); }
.badge-rum { background: rgba(255,170,0,0.12); color: var(--neon-amber); }
.badge-vodka { background: rgba(199,125,255,0.12); color: var(--neon-purple); }
.badge-whiskey, .badge-whisky { background: rgba(255,170,0,0.15); color: #d4a043; }
.badge-vermouth { background: rgba(255,45,123,0.12); color: var(--neon-pink); }
.badge-bitter { background: rgba(255,80,50,0.12); color: #ff5032; }
.badge-tequila { background: rgba(57,255,20,0.12); color: var(--neon-green); }
.badge-aperitivo { background: rgba(255,130,50,0.12); color: #ff8232; }
.badge-default { background: rgba(255,255,255,0.08); color: var(--text-dim); }

.badge-available { background: rgba(57,255,20,0.12); color: var(--neon-green); }
.badge-unavailable { background: rgba(255,60,60,0.12); color: #ff3c3c; }

.badge-pending { background: rgba(255,170,0,0.12); color: var(--neon-amber); animation: pulse 2s infinite; }
.badge-preparing { background: rgba(0,229,255,0.12); color: var(--neon-cyan); animation: pulse 1.5s infinite; }
.badge-ready { background: rgba(57,255,20,0.15); color: var(--neon-green); }
.badge-delivered { background: rgba(255,255,255,0.06); color: var(--text-dim); }
.badge-cancelled { background: rgba(255,60,60,0.12); color: #ff3c3c; }

/* ===== ABV bar ===== */
.abv-bar {
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.06);
  margin-top: 10px;
  overflow: hidden;
}
.abv-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.8s ease;
}

/* ===== FORMS ===== */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--neon-pink);
  box-shadow: 0 0 0 3px rgba(255,45,123,0.1);
}
.form-input::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-select { appearance: none; cursor: pointer; }
.form-select option { background: #1a1a1a; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px;
  border: none; border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary {
  background: var(--neon-pink);
  color: #fff;
  box-shadow: 0 4px 20px rgba(255,45,123,0.3);
}
.btn-primary:hover { box-shadow: 0 4px 30px rgba(255,45,123,0.5); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); }

.btn-cyan {
  background: rgba(0,229,255,0.15);
  color: var(--neon-cyan);
  border: 1px solid rgba(0,229,255,0.2);
}
.btn-cyan:hover { background: rgba(0,229,255,0.25); }

.btn-green {
  background: rgba(57,255,20,0.15);
  color: var(--neon-green);
  border: 1px solid rgba(57,255,20,0.2);
}

.btn-danger {
  background: rgba(255,60,60,0.12);
  color: #ff3c3c;
  border: 1px solid rgba(255,60,60,0.15);
}

.btn-sm { padding: 8px 16px; font-size: 0.75rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

/* ===== SECTION HEADERS ===== */
.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.section-title .icon { font-size: 1.4rem; }

.page-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}

/* ===== TABS ===== */
.tabs {
  display: flex; gap: 4px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tab {
  flex: 1; min-width: fit-content;
  padding: 10px 16px;
  background: none; border: none;
  color: var(--text-dim);
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem; font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.tab.active {
  background: rgba(255,45,123,0.15);
  color: var(--neon-pink);
}

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.active { display: flex; animation: fadeIn 0.2s ease; }
.modal {
  background: #111114;
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%; max-width: 600px;
  max-height: 85dvh;
  overflow-y: auto;
  padding: 24px;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 1.15rem; font-weight: 700; }
.modal-close {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
}
.modal-close:hover { background: rgba(255,60,60,0.15); color: #ff3c3c; }

/* ===== SELECTION GRID ===== */
.select-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 14px 0; }
.select-option {
  padding: 14px 16px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; gap: 12px;
}
.select-option:hover { border-color: rgba(255,255,255,0.2); }
.select-option.selected { border-color: var(--neon-cyan); background: rgba(0,229,255,0.06); }
.select-option .opt-name { font-weight: 500; font-size: 0.95rem; }
.select-option .opt-detail { font-size: 0.78rem; color: var(--text-dim); }
.select-option .opt-radio {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  transition: var(--transition);
  position: relative;
}
.select-option.selected .opt-radio {
  border-color: var(--neon-cyan);
}
.select-option.selected .opt-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--neon-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0,229,255,0.5);
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex; flex-direction: column;
  gap: 8px; width: calc(100% - 32px); max-width: 400px;
}
.toast {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  animation: slideDown 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  backdrop-filter: blur(10px);
}
@keyframes slideDown { from { transform: translateY(-20px); opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; transform: translateY(-10px); } }
.toast-success { background: rgba(57,255,20,0.15); border: 1px solid rgba(57,255,20,0.2); color: var(--neon-green); }
.toast-error { background: rgba(255,60,60,0.15); border: 1px solid rgba(255,60,60,0.2); color: #ff6060; }
.toast-info { background: rgba(0,229,255,0.12); border: 1px solid rgba(0,229,255,0.2); color: var(--neon-cyan); }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 14px; display: block; }
.empty-state p { font-size: 0.9rem; }

/* ===== DETAILS ROW ===== */
.detail-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.88rem;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--text-dim); }
.detail-value { font-weight: 500; }

/* ===== TOGGLE ===== */
.toggle {
  position: relative;
  width: 48px; height: 26px;
  background: rgba(255,255,255,0.1);
  border-radius: 13px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}
.toggle.on { background: rgba(57,255,20,0.3); }
.toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  background: var(--text);
  border-radius: 50%;
  transition: var(--transition);
}
.toggle.on::after { left: 25px; background: var(--neon-green); box-shadow: 0 0 8px rgba(57,255,20,0.5); }

/* ===== WATER RANDOM IMAGE ===== */
.water-img-container {
  text-align: center;
  padding: 30px;
}
.water-img-container img {
  max-width: 100%;
  max-height: 300px;
  border-radius: var(--radius);
  margin: 16px 0;
}
.water-img-container p {
  color: var(--neon-cyan);
  font-size: 1.1rem;
  font-weight: 500;
}

/* ===== SEARCH ===== */
.search-bar {
  position: relative;
  margin-bottom: 20px;
}
.search-bar input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}
.search-bar input:focus { border-color: rgba(255,45,123,0.4); }
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar svg {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--text-muted);
}

/* ===== CHIP FILTERS ===== */
.chip-row {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 18px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  padding: 7px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Outfit', sans-serif;
}
.chip.active { background: rgba(255,45,123,0.12); border-color: rgba(255,45,123,0.3); color: var(--neon-pink); }

/* ===== ORDER CARD (admin) ===== */
.order-admin-card {
  border-left: 3px solid var(--neon-amber);
  padding-left: 16px;
}
.order-admin-card.status-preparing { border-left-color: var(--neon-cyan); }
.order-admin-card.status-ready { border-left-color: var(--neon-green); }
.order-admin-card.status-delivered { border-left-color: var(--text-muted); }

/* ===== USER TABLE (admin) ===== */
.user-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap;
}
.user-info { flex: 1; min-width: 0; }
.user-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ===== LOADING ===== */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--neon-pink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== HOME MENU GRID ===== */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 30px;
}
.home-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text);
}
.home-card:hover { background: var(--bg-card-hover); transform: translateY(-2px); }
.home-card .hc-icon { font-size: 2rem; margin-bottom: 10px; display: block; }
.home-card .hc-label { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.home-card .hc-sub { font-size: 0.72rem; color: var(--text-dim); margin-top: 4px; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* ===== UTILITY ===== */
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.gap-2 { gap: 8px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.text-pink { color: var(--neon-pink); }
.text-cyan { color: var(--neon-cyan); }
.text-green { color: var(--neon-green); }
.text-dim { color: var(--text-dim); }
.text-sm { font-size: 0.8rem; }
.font-bold { font-weight: 700; }
