/* ============================================================
   TITANS BURGER - SISTEMA DE MENÚ DIGITAL Y ADMIN
   Estilos CSS inspirados en fuego, carbón y glassmorphism
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800;900&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  --bg-main: #09090c;
  --bg-card: #121218;
  --bg-card-glass: rgba(18, 18, 24, 0.85);
  --bg-card-border: rgba(255, 140, 0, 0.15);

  --fire-primary: #ff4500;
  --fire-gradient: linear-gradient(135deg, #ff4500 0%, #ff8c00 50%, #ffa500 100%);
  --fire-gradient-hover: linear-gradient(135deg, #ff5714 0%, #ffa014 100%);
  --fire-glow: 0 4px 20px rgba(255, 69, 0, 0.35);

  --emerald: #10b981;
  --emerald-glow: 0 4px 15px rgba(16, 185, 129, 0.3);

  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-dark: #111827;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', 'Montserrat', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ================= HEADER CLIENTE ================= */
.client-header {
  background: rgba(9, 9, 12, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 140, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 16px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
}

.brand-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1000px;
  margin: 0 auto;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fire-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--fire-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: var(--fire-glow);
}

.brand-info h1 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #fff 30%, #ffd700 70%, #ff4500 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
}

.brand-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--emerald);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--emerald);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* ================= NAV PESTAÑAS Y NAVEGACIÓN MULTI-MENÚ ================= */
.menu-tabs-wrapper {
  max-width: 1000px;
  margin: 10px auto 0 auto;
  overflow-x: auto;
  padding: 4px 0 8px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.menu-tabs-wrapper::-webkit-scrollbar {
  display: none;
}

.menu-tabs {
  display: flex;
  gap: 8px;
  padding: 0 16px;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.tab-btn.active {
  background: var(--fire-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--fire-glow);
}

/* BARRA DE NAVEGACIÓN / SELECTOR DESPLEGABLE */
.menu-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-bottom: 12px;
}

.menu-select-dropdown {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}

.menu-select-dropdown:focus {
  border-color: var(--fire-primary);
  box-shadow: 0 0 0 2px rgba(255, 69, 0, 0.3);
}

.menu-select-dropdown option {
  background: #121218;
  color: #fff;
}

.page-counter-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

/* BOTONES DE FLECHAS NAVEGACIÓN ANTERIOR / SIGUIENTE */
.nav-arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(9, 9, 12, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
  backdrop-filter: blur(6px);
}

.nav-arrow-btn:hover {
  background: var(--fire-gradient);
  border-color: transparent;
  box-shadow: var(--fire-glow);
}

.nav-arrow-btn.prev { left: 12px; }
.nav-arrow-btn.next { right: 12px; }

/* ================= CONTENEDOR VISOR ================= */
.viewer-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
}

.image-card-container {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.image-wrapper {
  width: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 350px;
  background: #050507;
  touch-action: pan-x pan-y;
}

.menu-img {
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease-out;
  cursor: zoom-in;
  user-select: none;
}

.zoom-overlay-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

/* ================= BOTONES ACCIÓN CLIENTE ================= */
.action-bar {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
}

.btn-action {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-whatsapp {
  background: #25d366;
  color: #fff;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  background: #20ba5a;
  transform: translateY(-2px);
}

.btn-secondary-action {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-secondary-action:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* ================= MODAL FULLSCREEN ZOOM ================= */
.modal-zoom {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  flex-direction: column;
}

.modal-zoom.open {
  display: flex;
}

.modal-zoom-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: rgba(10, 10, 14, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-zoom-controls {
  display: flex;
  gap: 10px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--fire-gradient);
  border-color: transparent;
}

.modal-zoom-body {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  touch-action: pan-x pan-y;
}

.modal-zoom-img {
  max-width: none;
  width: 100%;
  height: auto;
  transition: transform 0.1s linear;
}

/* ================= ADMIN & LOGIN ================= */
.admin-container {
  max-width: 950px;
  margin: 30px auto;
  padding: 0 16px;
  width: 100%;
}

.login-card {
  max-width: 420px;
  margin: 60px auto;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-header .fire-badge-icon {
  margin: 0 auto 12px auto;
  width: 56px;
  height: 56px;
  font-size: 28px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--fire-primary);
  box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.btn-submit {
  width: 100%;
  padding: 13px;
  background: var(--fire-gradient);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--fire-glow);
  transition: var(--transition);
}

.btn-submit:hover {
  background: var(--fire-gradient-hover);
  transform: translateY(-1px);
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

/* ================= DASHBOARD ADMIN TABS ================= */
.admin-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.admin-nav-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.admin-tab-link {
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-tab-link.active,
.admin-tab-link:hover {
  background: rgba(255, 69, 0, 0.15);
  border-color: var(--fire-primary);
  color: #fff;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.admin-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

/* LISTA DE MENÚS EN ADMIN */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.menu-item-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.menu-item-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #000;
}

.menu-item-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-item-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: #ef4444;
  color: #fff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* QR SECTION */
.qr-preview-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 320px;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.qr-code-box {
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0;
  box-sizing: border-box;
  overflow: hidden;
}

.qr-code-box canvas {
  display: none !important;
}

.qr-code-box img {
  display: block !important;
  width: 200px !important;
  height: 200px !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  margin: 0 auto;
}

/* FOOTER */
.site-footer {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* RESPONSIVE */
@media (max-width: 640px) {
  .brand-info h1 { font-size: 1.05rem; }
  .action-bar { flex-direction: column; }
  .admin-navbar { flex-direction: column; gap: 12px; align-items: flex-start; }
  .admin-nav-tabs { flex-wrap: wrap; }
}

/* ================= REGLAS DE IMPRESIÓN (LETRERO / HABLADOR DE MESA) ================= */
.printable-standee-container {
  display: none;
}

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  body * {
    visibility: hidden;
  }
  
  .printable-standee-container,
  .printable-standee-container * {
    visibility: visible !important;
  }
  
  .printable-standee-container {
    display: flex !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
  }
  
  .standee-card {
    border: 3px dashed #111111 !important;
    border-radius: 20px !important;
    padding: 40px 30px !important;
    width: 360px !important;
    text-align: center !important;
    background: #ffffff !important;
    box-shadow: none !important;
    margin: 0 auto !important;
  }
  
  .standee-flame {
    font-size: 48px !important;
    margin-bottom: 8px !important;
  }
  
  .standee-title {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 900 !important;
    font-size: 28px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin-bottom: 4px !important;
    color: #000000 !important;
  }
  
  .standee-subtitle {
    font-size: 13px !important;
    color: #444444 !important;
    margin-bottom: 24px !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
  }
  
  .standee-qr-box {
    width: 200px !important;
    height: 200px !important;
    min-width: 200px !important;
    min-height: 200px !important;
    max-width: 200px !important;
    max-height: 200px !important;
    margin: 0 auto 24px auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid #000000 !important;
    border-radius: 14px !important;
    padding: 10px !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  
  .standee-qr-box canvas {
    display: none !important;
  }
  
  .standee-qr-box img {
    display: block !important;
    width: 178px !important;
    height: 178px !important;
    min-width: 178px !important;
    min-height: 178px !important;
    max-width: 178px !important;
    max-height: 178px !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: contain !important;
    margin: 0 auto !important;
  }
  
  .standee-callout {
    font-size: 15px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    background: #000000 !important;
    color: #ffffff !important;
    padding: 8px 20px !important;
    border-radius: 30px !important;
    display: inline-block !important;
    margin-bottom: 12px !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  .standee-instruction {
    font-size: 12px !important;
    color: #444444 !important;
    font-weight: 500 !important;
  }
}

