/* ============================================================
   BAR LO GÜENO — Sistema de Estilos
   Diseño: Editorial oscuro y cálido. Auténtico, sin excesos.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  /* Fondo */
  --bg:          #0E0C0B;
  --bg-card:     #171412;
  --bg-raised:   #1E1B19;
  --bg-input:    #252220;

  /* Texto */
  --txt:         #EDE8E1;
  --txt-soft:    #9A9086;
  --txt-dim:     #5C5650;

  /* Acento dorado — cálido, sin florituras */
  --gold:        #C4912A;
  --gold-light:  #E2B458;
  --gold-dim:    rgba(196, 145, 42, 0.18);
  --gold-border: rgba(196, 145, 42, 0.28);

  /* Estados */
  --ok:          #4A9B6F;
  --ok-dim:      rgba(74, 155, 111, 0.15);
  --err:         #B85450;
  --err-dim:     rgba(184, 84, 80, 0.14);

  /* Bordes */
  --border:      rgba(255, 255, 255, 0.07);
  --border-md:   rgba(255, 255, 255, 0.12);

  /* Tipografías */
  --f-display:   'Cormorant Garamond', Georgia, serif;
  --f-body:      'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Radio */
  --r:    6px;
  --r-lg: 12px;

  /* Sombra */
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  --shadow-heavy: 0 16px 48px rgba(0, 0, 0, 0.65);
}

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow-x: hidden;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a { color: inherit; }

.hidden { display: none !important; }

/* ── CABECERA DEL RESTAURANTE ────────────────────────── */
.site-header {
  padding: 32px 20px 24px;
  border-bottom: 1px solid var(--border);
  position: relative;
  background: var(--bg);
}

.header-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.open-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ok);
  letter-spacing: 0.04em;
}

.open-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}

.header-quick-actions {
  display: flex;
  gap: 6px;
}

.btn-quick {
  padding: 5px 11px;
  background: transparent;
  border: 1px solid var(--border-md);
  border-radius: 20px;
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--txt-soft);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn-quick:hover {
  border-color: var(--gold-border);
  color: var(--gold-light);
}

/* Nombre e identidad del local */
.restaurant-name {
  font-family: var(--f-display);
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.restaurant-type {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.restaurant-sub {
  font-size: 0.82rem;
  color: var(--txt-dim);
  font-weight: 300;
}

/* ── BARRA DE BÚSQUEDA Y CATEGORÍAS (FIJA AL HACER SCROLL) ── */
.sticky-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(14, 12, 11, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
}

.search-field {
  position: relative;
  margin-bottom: 10px;
}

.search-field svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--txt-dim);
  pointer-events: none;
}

.search-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  padding: 9px 40px 9px 38px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 0.88rem;
  color: var(--txt);
  outline: none;
  transition: border-color 0.15s;
}

.search-input:focus {
  border-color: var(--gold-border);
}

.search-input::placeholder {
  color: var(--txt-dim);
}

.search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--txt-dim);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 4px;
  line-height: 1;
}

/* Pestañas de categorías — estilo texto con indicador de línea */
.category-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
  flex-shrink: 0;
  padding: 6px 14px;
  background: none;
  border: none;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--txt-dim);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.cat-tab:hover {
  color: var(--txt-soft);
}

.cat-tab.active {
  color: var(--gold-light);
  border-bottom-color: var(--gold);
  font-weight: 600;
}

/* Filtros rápidos de dieta */
.diet-filters {
  display: flex;
  gap: 6px;
  padding: 8px 20px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.diet-filters::-webkit-scrollbar { display: none; }

.diet-pill {
  flex-shrink: 0;
  padding: 3px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--txt-dim);
  cursor: pointer;
  transition: all 0.15s;
}

.diet-pill.active {
  background: var(--gold-dim);
  border-color: var(--gold-border);
  color: var(--gold-light);
}

/* ── CONTENEDOR PRINCIPAL DE LA CARTA ───────────────── */
.menu-main {
  flex: 1;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 32px;
}

/* Sección de categoría */
.menu-section {
  margin-bottom: 36px;
}

.section-heading {
  font-family: var(--f-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--txt);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── TARJETA DE PLATO ────────────────────────────────── */
.dish-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.dish-card {
  display: grid;
  grid-template-columns: 1fr 88px;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: opacity 0.2s;
}

.dish-card:last-child {
  border-bottom: none;
}

.dish-card.is-unavailable {
  opacity: 0.45;
}

.dish-info { min-width: 0; }

.dish-name-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.dish-name {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--txt);
  line-height: 1.3;
}

.dish-card.is-unavailable .dish-name {
  text-decoration: line-through;
  color: var(--txt-dim);
}

.tag-badge {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--gold-dim);
  color: var(--gold-light);
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid var(--gold-border);
  margin-top: 2px;
}

.sold-out-badge {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--err-dim);
  color: #E07070;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid rgba(184, 84, 80, 0.25);
  margin-top: 2px;
}

.dish-desc {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--txt-soft);
  font-weight: 300;
  margin-bottom: 8px;
}

.dish-bullet-list {
  margin: 0 0 8px 16px;
  padding: 0;
  color: var(--txt-soft);
  font-size: 0.8rem;
  line-height: 1.55;
  font-weight: 300;
}

/* Alérgenos como iconos compactos */
.allergen-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.allergen-dot {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  color: var(--txt-dim);
  background: var(--bg-raised);
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
  transition: color 0.15s;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.allergen-dot:hover {
  color: var(--gold-light);
  border-color: var(--gold-border);
}

.allergen-icon { font-size: 0.75rem; }

/* Panel derecho: imagen y precio */
.dish-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.dish-price {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
}

.dish-img-wrap {
  width: 80px;
  height: 72px;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg-raised);
  flex-shrink: 0;
}

.dish-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.dish-card:hover .dish-img {
  transform: scale(1.05);
}

/* Estado "Sin resultados" */
.empty-state {
  text-align: center;
  padding: 48px 0;
}

.empty-state p {
  font-size: 0.88rem;
  color: var(--txt-dim);
  margin-top: 8px;
}

/* ── SECCIÓN DE VALORACIÓN GOOGLE ─────────────────────── */
.review-section {
  max-width: 560px;
  width: 100%;
  margin: 0 auto 40px;
  padding: 0 20px;
}

.review-inner {
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  background: var(--bg-card);
}

.review-stars {
  font-size: 1.1rem;
  letter-spacing: 2px;
}

.review-heading {
  font-family: var(--f-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--txt);
}

.review-sub {
  font-size: 0.8rem;
  color: var(--txt-soft);
  font-weight: 300;
  max-width: 340px;
  line-height: 1.45;
}

.btn-google-review {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #fff;
  color: #1F1F1F;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  transition: box-shadow 0.2s, transform 0.15s;
  margin-top: 4px;
}

.btn-google-review:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transform: translateY(-1px);
}

.btn-google-review svg {
  flex-shrink: 0;
}

/* ── PIE DE PÁGINA ──────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 24px 20px;
  border-top: 1px solid var(--border);
}

.footer-name {
  font-family: var(--f-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 4px;
}

.footer-address {
  font-size: 0.75rem;
  color: var(--txt-dim);
  margin-bottom: 8px;
}

.footer-allergen-note {
  font-size: 0.7rem;
  color: var(--txt-dim);
  line-height: 1.4;
  max-width: 400px;
  margin: 0 auto 8px;
}

.btn-link {
  background: none;
  border: none;
  font-size: 0.72rem;
  color: var(--txt-dim);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn-link:hover {
  color: var(--txt-soft);
}

/* ── MODALES ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 4, 3, 0.8);
  backdrop-filter: blur(8px);
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  transition: opacity 0.2s;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.modal-sheet {
  width: 100%;
  max-width: 560px;
  background: var(--bg-raised);
  border-radius: 14px 14px 0 0;
  border-top: 1px solid var(--border-md);
  padding: 20px 20px 32px;
  display: flex;
  flex-direction: column;
  max-height: 82vh;
  overflow: hidden;
  animation: slideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#wifiModal,
#allergensModal,
#qrModal {
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

#wifiModal .modal-sheet,
#allergensModal .modal-sheet,
#qrModal .modal-sheet {
  width: min(100%, 460px);
  max-height: calc(100dvh - 48px);
  padding: 22px;
  border: 1px solid var(--border-md);
  border-radius: 16px;
  animation: none;
}

#wifiModal .modal-handle,
#allergensModal .modal-handle,
#qrModal .modal-handle { display: none; }
#wifiModal .modal-body,
#allergensModal .modal-body,
#qrModal .modal-body { flex: 0 1 auto; }

#categoryModal, #dishModal {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

#categoryModal .modal-card, #dishModal .modal-card {
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100dvh - 48px);
  margin: auto;
  display: block;
}

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

.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--border-md);
  border-radius: 2px;
  margin: 0 auto 16px;
}

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

.modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--txt);
}

.btn-modal-close {
  width: 28px;
  height: 28px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--txt-soft);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s;
}

.btn-modal-close:hover {
  background: var(--bg-raised);
  color: var(--txt);
}

.modal-body {
  overflow-y: auto;
  flex: 1;
}

.modal-desc {
  font-size: 0.82rem;
  color: var(--txt-soft);
  line-height: 1.5;
  margin-bottom: 16px;
  font-weight: 300;
}

/* Cuadrícula de leyenda de alérgenos */
.allergens-legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.legend-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.legend-icon { font-size: 1.2rem; flex-shrink: 0; }

.legend-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--txt);
  display: block;
  margin-bottom: 2px;
}

.legend-desc {
  font-size: 0.67rem;
  color: var(--txt-dim);
  line-height: 1.3;
}

/* Caja de WiFi */
.wifi-box {
  background: linear-gradient(145deg, var(--bg-card), var(--bg-raised));
  border: 1px solid var(--border-md);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.wifi-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.wifi-symbol {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--gold-border);
  border-radius: 12px;
  background: var(--gold-dim);
  color: var(--gold-light);
}

.wifi-symbol svg { width: 24px; height: 24px; }

.wifi-intro-copy { display: grid; gap: 3px; }
.wifi-intro-copy strong { color: var(--txt); font-size: 0.92rem; }
.wifi-intro-copy span { color: var(--txt-dim); font-size: 0.75rem; }

.wifi-credential {
  display: grid;
  gap: 7px;
  padding-top: 14px;
}

.wifi-credential + .wifi-credential { padding-top: 12px; }
.wifi-credential-label { color: var(--txt-dim); font-size: 0.7rem; }

.wifi-credential-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.wifi-credential-value strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--gold-light);
  font-size: 0.92rem;
  font-weight: 600;
}

.wifi-copy {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-md);
  border-radius: 9px;
  background: var(--bg-input);
  color: var(--txt-soft);
  cursor: pointer;
}

.wifi-copy:hover, .wifi-copy:focus-visible {
  border-color: var(--gold-border);
  color: var(--gold-light);
}

.wifi-copy svg { width: 17px; height: 17px; }

@media (max-width: 380px) {
  .wifi-box { padding: 15px; }
  .wifi-credential-value strong { font-size: 0.84rem; }
}

/* ── MODAL QR ────────────────────────────────────────── */
.qr-frame {
  background: #fff;
  border-radius: 10px;
  padding: 18px 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 240px;
  margin: 0 auto 14px;
  border: 3px solid var(--gold);
}

#qrCanvas {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

#qrCanvas img, #qrCanvas canvas {
  display: block;
  margin: 0 auto;
}

.qr-local-label {
  font-family: var(--f-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: #111;
  margin-top: 8px;
  text-align: center;
}

.qr-scan-label {
  font-size: 0.62rem;
  color: #888;
  letter-spacing: 0.08em;
  text-align: center;
}

.url-display {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 8px 12px;
  font-size: 0.72rem;
  color: var(--gold-light);
  font-family: monospace;
  word-break: break-all;
  margin-bottom: 12px;
}

/* ── BOTONES GENÉRICOS ──────────────────────────────── */
.btn-row {
  display: flex;
  gap: 8px;
}

.btn-primary {
  padding: 9px 16px;
  background: var(--gold);
  border: none;
  border-radius: var(--r);
  color: #0E0C0B;
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn-primary:hover { background: var(--gold-light); }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  padding: 9px 16px;
  background: transparent;
  border: 1px solid var(--border-md);
  border-radius: var(--r);
  color: var(--txt-soft);
  font-weight: 500;
  font-size: 0.84rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn-secondary:hover {
  border-color: var(--border-md);
  color: var(--txt);
}

/* ── TOAST ───────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: var(--bg-raised);
  color: var(--txt);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 6px;
  border: 1px solid var(--border-md);
  box-shadow: var(--shadow-heavy);
  pointer-events: none;
  z-index: 100;
  transition: opacity 0.25s, transform 0.25s;
  white-space: nowrap;
}

.toast.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
}

/* ══════════════════════════════════════════════════════
   PANEL DE ADMINISTRACIÓN — admin.html
   ══════════════════════════════════════════════════════ */

body.admin-body {
  background: var(--bg);
  padding-bottom: 0;
}

/* Pantalla de PIN */
.pin-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.pin-card {
  width: 100%;
  max-width: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-heavy);
}

.pin-logo {
  font-family: var(--f-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--txt);
  margin-bottom: 4px;
}

.pin-subtitle {
  font-size: 0.78rem;
  color: var(--txt-dim);
  margin-bottom: 28px;
  line-height: 1.4;
}

.pin-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--txt-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.pin-inputs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.pin-digit {
  flex: 1;
  height: 48px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r);
  text-align: center;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--gold-light);
  outline: none;
  transition: border-color 0.15s;
  min-width: 0;
}

.pin-digit:focus {
  border-color: var(--gold-border);
}

.pin-error {
  font-size: 0.75rem;
  color: #E07070;
  min-height: 18px;
  margin-bottom: 12px;
}

.pin-submit {
  width: 100%;
  padding: 11px;
  background: var(--gold);
  border: none;
  border-radius: var(--r);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s;
}

.pin-submit:hover { background: var(--gold-light); }

/* Barra de navegación del Admin */
.admin-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.admin-nav-left {
  display: flex;
  flex-direction: column;
}

.admin-nav-name {
  font-family: var(--f-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--txt);
}

.admin-nav-label {
  font-size: 0.68rem;
  color: var(--txt-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-nav-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Contenido del Admin */
.admin-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 20px 60px;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-section-title {
  font-family: var(--f-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--txt);
}

.admin-section-sub {
  font-size: 0.78rem;
  color: var(--txt-dim);
  margin-top: 2px;
}

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--ok);
  border: none;
  border-radius: var(--r);
  color: #fff;
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn-add:hover { background: #5AAE7E; }
.btn-add:active { transform: scale(0.98); }

/* Campo de búsqueda admin */
.admin-search {
  width: 100%;
  padding: 9px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 0.84rem;
  color: var(--txt);
  outline: none;
  margin-bottom: 20px;
  transition: border-color 0.15s;
}

.admin-search:focus { border-color: var(--gold-border); }
.admin-search::placeholder { color: var(--txt-dim); }

/* Bloque de categoría en admin */
.admin-block {
  margin-bottom: 28px;
}

.admin-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border-md);
}

.admin-block-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--txt-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-block-count {
  font-size: 0.72rem;
  color: var(--txt-dim);
}

/* Fila de plato en admin */
.admin-dish-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: opacity 0.2s;
}

.admin-dish-row:last-child {
  border-bottom: none;
}

.admin-dish-row.is-off {
  opacity: 0.5;
}

.admin-dish-thumb {
  width: 48px;
  height: 44px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-raised);
}

.admin-dish-info {
  flex: 1;
  min-width: 0;
}

.admin-dish-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--txt);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-dish-meta {
  font-size: 0.74rem;
  color: var(--txt-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
}

.admin-dish-price {
  font-weight: 600;
  color: var(--gold-light);
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Toggle switch limpio */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.toggle-label {
  font-size: 0.72rem;
  font-weight: 500;
  min-width: 50px;
  text-align: right;
}

.toggle-label.on  { color: var(--ok); }
.toggle-label.off { color: var(--err); }

.toggle {
  position: relative;
  width: 38px;
  height: 22px;
  cursor: pointer;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--bg-input);
  border: 1px solid var(--border-md);
  border-radius: 11px;
  transition: background 0.2s, border-color 0.2s;
}

.toggle-track::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 14px;
  height: 14px;
  background: var(--txt-dim);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}

.toggle input:checked ~ .toggle-track {
  background: var(--ok-dim);
  border-color: var(--ok);
}

.toggle input:checked ~ .toggle-track::after {
  background: var(--ok);
  transform: translateX(16px);
}

.btn-edit {
  padding: 5px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--txt-soft);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-edit:hover {
  border-color: var(--gold-border);
  color: var(--gold-light);
}

.btn-del {
  padding: 5px 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r);
  font-size: 0.8rem;
  color: var(--txt-dim);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-del:hover {
  border-color: var(--err-dim);
  color: #E07070;
}

/* ── FORMULARIO (MODAL ADMIN) ──────────────────────── */
.modal-sheet.wide {
  max-height: 90vh;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-group { display: flex; flex-direction: column; flex: 1; }

.form-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--txt-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  padding: 9px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--txt);
  font-size: 0.86rem;
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold-border);
}

.form-textarea { resize: vertical; min-height: 68px; }

.allergen-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 140px;
  overflow-y: auto;
  padding: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r);
}

.allergen-chk-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--txt-soft);
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  transition: background 0.1s;
}

.allergen-chk-label:hover { background: var(--bg-raised); }

.allergen-chk-label input { accent-color: var(--gold); }

.modal-footer-btns {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

/* Zona de reset */
.admin-danger-zone {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
  text-align: center;
}

.admin-danger-label {
  font-size: 0.72rem;
  color: var(--txt-dim);
  margin-bottom: 10px;
}

.btn-danger {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid rgba(184, 84, 80, 0.3);
  border-radius: var(--r);
  color: #C07070;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-danger:hover {
  background: var(--err-dim);
  color: #E07070;
}

/* Responsive: 2 columnas en pantallas grandes */
@media (min-width: 600px) {
  .dish-list {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* Panel privado: componentes usados por admin.html */
.pin-screen-container {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #100e0d;
}

.pin-icon { display: block; text-align: center; font-size: 1.65rem; margin-bottom: 12px; }
.pin-title { font-family: var(--f-display); color: var(--txt); font-size: 1.55rem; text-align: center; margin-bottom: 8px; }
.pin-input-group { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
.pin-code-input { grid-column: 1 / -1; width: 100%; height: 48px; border: 1px solid var(--border-md); border-radius: var(--r); background: var(--bg-input); text-align: center; font-size: 1.5rem; letter-spacing: 0.45em; color: var(--gold-light); outline: none; }
.pin-code-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.pin-digit-input { width: 100%; height: 48px; border: 1px solid var(--border-md); border-radius: var(--r); background: var(--bg-input); text-align: center; font-size: 1.25rem; color: var(--gold-light); outline: none; }
.pin-digit-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.pin-error-msg { min-height: 20px; margin-top: 9px; color: #e07070; font-size: 0.76rem; text-align: center; }

.admin-navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px max(16px, calc((100vw - 920px) / 2));
  background: rgba(23, 20, 18, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}
.admin-nav-title { display: flex; align-items: center; gap: 8px; color: var(--txt); font-weight: 600; font-size: 0.9rem; }
.admin-nav-actions { display: flex; align-items: center; gap: 8px; }
.admin-content { max-width: 920px; padding-top: 28px; }
.admin-search-wrap {
  width: 100%;
  margin-bottom: 22px;
}

.admin-search-wrap .form-input {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  margin: 0;
  text-align: left;
  background: linear-gradient(180deg, rgba(28, 24, 21, 0.96), rgba(18, 16, 15, 0.96));
  border: 1px solid var(--border-md);
  border-radius: 14px;
  padding: 13px 16px;
  font-size: 0.9rem;
  color: var(--txt);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.admin-search-wrap .form-input:focus {
  border-color: var(--gold-border);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.btn-add-dish { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 0; border-radius: var(--r); background: var(--ok); color: #fff; font-size: 0.84rem; font-weight: 600; cursor: pointer; }
.btn-add-dish:hover { background: #5aae7e; }
.admin-page-heading { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-bottom: 22px; text-align: center; }
.admin-primary-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.btn-add-category { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--gold-border); border-radius: var(--r); background: transparent; color: var(--gold-light); font-size: 0.84rem; font-weight: 600; cursor: pointer; }
.btn-add-category:hover { background: var(--gold-dim); }
.btn-add-category span:first-child, .btn-add-dish span:first-child { font-size: 1.2rem; font-weight: 700; line-height: 1; }
.empty-category-message { padding: 18px 8px; color: var(--text-dim); font-size: 0.82rem; text-align: center; }
.category-modal-card { max-width: 420px; }
.category-icon-input { font-size: 1.35rem; text-align: center; }
.admin-category-block { margin-bottom: 30px; }
.admin-category-header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 0 9px; border-bottom: 1px solid var(--border-md); }
.admin-category-heading-actions { display: flex; align-items: center; gap: 10px; }
.btn-edit-category { border: 1px solid var(--border); border-radius: var(--r); background: transparent; color: var(--txt-soft); padding: 5px 8px; cursor: pointer; font-size: 0.72rem; }
.btn-edit-category:hover, .btn-edit-category:focus-visible { border-color: var(--gold-border); color: var(--gold-light); }
.admin-category-name { color: var(--txt); font-family: var(--f-display); font-size: 1.3rem; font-weight: 600; }
.admin-dishes-list { background: var(--bg-card); border: 1px solid var(--border); border-top: 0; padding: 0 14px; }
.admin-dish-row { min-height: 76px; }
.admin-dish-row.is-unavailable { opacity: 0.5; }
.admin-dish-name { color: var(--txt); font-size: 0.9rem; font-weight: 600; }
.admin-dish-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.switch-group { display: flex; align-items: center; gap: 6px; }
.switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.switch input { width: 0; height: 0; opacity: 0; }
.slider { position: absolute; inset: 0; border: 1px solid var(--border-md); border-radius: 20px; background: var(--bg-input); cursor: pointer; }
.slider::before { content: ''; position: absolute; width: 14px; height: 14px; left: 2px; top: 2px; border-radius: 50%; background: var(--txt-dim); transition: transform .18s, background .18s; }
.switch input:checked + .slider { border-color: var(--ok); background: var(--ok-dim); }
.switch input:checked + .slider::before { background: var(--ok); transform: translateX(16px); }
.switch-label { min-width: 60px; font-size: 0.68rem; color: var(--txt-dim); }
.switch-label.available { color: var(--ok); }
.switch-label.sold-out { color: var(--err); }
.btn-action-edit, .btn-action-delete { border: 1px solid var(--border); border-radius: var(--r); background: transparent; color: var(--txt-soft); padding: 7px 9px; cursor: pointer; font-size: 0.75rem; }
.btn-action-edit:hover { border-color: var(--gold-border); color: var(--gold-light); }
.btn-action-delete:hover { border-color: var(--err); color: #e07070; }
.modal-card {
  width: min(520px, calc(100vw - 24px));
  max-height: 90svh;
  overflow: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-heavy);
  margin: auto;
}
.btn-close-modal { border: 0; background: transparent; color: var(--txt-soft); font-size: 1.5rem; cursor: pointer; }
.allergens-checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-height: 150px; overflow: auto; padding: 8px; border: 1px solid var(--border); border-radius: var(--r); }
.allergen-check-label { display: flex; align-items: center; gap: 5px; min-width: 0; padding: 5px; color: var(--txt-soft); font-size: 0.74rem; }

@media (max-width: 600px) {
  .site-header { padding: 24px 16px 20px; }
  .restaurant-name { font-size: 2.25rem; }
  .sticky-bar { padding: 9px 12px; }
  .menu-main { padding: 20px 16px 28px; }
  .review-section { padding: 0 16px; }
  .admin-navbar { align-items: flex-start; padding: 11px 14px; }
  .admin-nav-title span:last-child { max-width: 100px; line-height: 1.1; }
  .admin-nav-actions { gap: 5px; }
  .admin-nav-actions .btn-secondary { padding: 7px 8px !important; font-size: 0.69rem !important; }
  .admin-content { padding: 20px 12px 48px; }
  .admin-page-heading > div:first-child h1 { font-size: 1.45rem !important; }
  .admin-primary-actions { width: 100%; }
  .admin-primary-actions button { flex: 1; min-width: 145px; }
  .admin-dishes-list { padding: 0 10px; }
  .admin-dish-row { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 9px; align-items: start; padding: 12px 0; }
  .admin-dish-thumb { width: 46px; height: 46px; }
  .admin-dish-info { min-width: 0; }
  .admin-dish-actions { grid-column: 2; justify-content: flex-start; flex-wrap: wrap; }
  .switch-label { min-width: 52px; }
  .modal-card { padding: 16px; }
  #wifiModal { padding: max(16px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom)); }
  #wifiModal .modal-sheet { max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 32px); padding: 18px; }
  #categoryModal, #dishModal { padding: max(16px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom)); }
  #categoryModal .modal-card, #dishModal .modal-card { max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 32px); }
  .admin-search-wrap { margin-bottom: 20px; }
  .form-row { flex-direction: column; gap: 0; }
  .modal-footer { display: flex; gap: 8px; }
  .modal-footer > * { flex: 1; }
}
