/* ============================================================
   🛡️ ESTILOS DEL PANEL DE ADMINISTRACIÓN Y LOGIN
   ============================================================ */

:root {
  --admin-bg: #0d120d;
  --admin-sidebar: #131a13;
  --admin-surface: #182217;
  --admin-card: #1d291c;
  --admin-border: #2a3b29;
  --admin-primary: #d4a359;
  --admin-primary-hover: #e5be7d;
  --admin-danger: #ef5350;
  --admin-danger-bg: rgba(239, 83, 80, 0.15);
  --admin-success: #66bb6a;
  --admin-success-bg: rgba(102, 187, 106, 0.15);
  --admin-warning: #ffa726;
  --admin-text: #f0f4ef;
  --admin-muted: #95a593;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --font-main: 'Plus Jakarta Sans', sans-serif;
  --font-heading: 'Outfit', sans-serif;
}

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

body {
  font-family: var(--font-main);
  background: var(--admin-bg);
  color: var(--admin-text);
  line-height: 1.5;
}

/* ============================================================
   🔑 LOGIN CONTAINER
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: radial-gradient(circle at top, #1a2618 0%, #0d120d 80%);
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo {
  width: 68px;
  height: 68px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 2px solid var(--admin-primary);
  display: block;
}

.login-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}

.login-sub {
  color: var(--admin-muted);
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--admin-muted);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-wrapper i.prefix-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--admin-muted);
  pointer-events: none;
  font-size: 0.85rem;
  z-index: 2;
  line-height: 1;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem 0.65rem 2.4rem;
  background: var(--admin-bg);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.form-input.no-icon, .form-select, .form-textarea {
  padding-left: 0.85rem;
}

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

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(212, 163, 89, 0.2);
}

.toggle-password {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--admin-muted);
  cursor: pointer;
}

.btn-admin {
  width: 100%;
  padding: 0.8rem 1.25rem;
  background: var(--admin-primary);
  color: #121811;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-admin:hover {
  background: var(--admin-primary-hover);
  transform: translateY(-1px);
}

.btn-admin:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--admin-card);
  color: var(--admin-text);
  border: 1px solid var(--admin-border);
}
.btn-secondary:hover {
  background: var(--admin-border);
}

.btn-danger {
  background: var(--admin-danger-bg);
  color: var(--admin-danger);
  border: 1px solid var(--admin-danger);
}
.btn-danger:hover {
  background: var(--admin-danger);
  color: #fff;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-danger {
  background: var(--admin-danger-bg);
  border: 1px solid var(--admin-danger);
  color: var(--admin-danger);
}

.alert-success {
  background: var(--admin-success-bg);
  border: 1px solid var(--admin-success);
  color: var(--admin-success);
}

/* ============================================================
   📋 ADMIN DASHBOARD LAYOUT
   ============================================================ */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 260px;
  background: var(--admin-sidebar);
  border-right: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--admin-border);
  margin-bottom: 1.5rem;
}

.admin-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--admin-primary);
}

.admin-brand-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--admin-muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.admin-nav-item:hover {
  background: var(--admin-surface);
  color: #fff;
}

.admin-nav-item.active {
  background: rgba(212, 163, 89, 0.15);
  color: var(--admin-primary);
  border-color: rgba(212, 163, 89, 0.3);
}

.admin-sidebar-footer {
  border-top: 1px solid var(--admin-border);
  padding-top: 1rem;
}

.admin-main {
  flex: 1;
  background: var(--admin-bg);
  padding: 1.5rem 2rem 3rem;
  min-width: 0;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(13, 18, 13, 0.95);
  backdrop-filter: blur(12px);
  padding: 1rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--admin-border);
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
}

.topbar-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.topbar-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
}

/* Barra Sutil de Métricas */
.metrics-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--admin-muted);
  padding: 0.35rem 0.75rem;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
}

.metric-pill:hover {
  border-color: rgba(212, 163, 89, 0.4);
}

.metric-pill-label {
  color: var(--admin-muted);
}

.metric-pill-val {
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}

.metric-pill-val.text-success {
  color: var(--admin-success);
}

.metric-pill-val.text-danger {
  color: var(--admin-danger);
}

/* Tabla de Platos */
.admin-card-container {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header-bar {
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 1px solid var(--admin-border);
}

.dishes-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--admin-border);
}

.dishes-search-container {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
  min-width: 0;
}

.search-input-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 240px;
  min-width: 180px;
  height: 42px;
}

.search-input-box .form-input {
  width: 100%;
  height: 42px;
  padding: 0 0.85rem 0 2.4rem;
}

.dishes-filters-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.dishes-filters-group .form-select {
  width: auto;
  min-width: 160px;
  height: 42px;
}

.header-action-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.header-action-buttons .btn-admin {
  width: auto;
  height: 38px;
  padding: 0 0.85rem;
  font-size: 0.82rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.card-footer-toolbar {
  padding: 0.85rem 1.25rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--admin-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-note {
  font-size: 0.8rem;
  color: var(--admin-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
}

.categories-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--admin-border);
}

.categories-header-title {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.table-search-box {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex: 1;
  max-width: 500px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.admin-table th {
  background: var(--admin-card);
  padding: 0.85rem 1.25rem;
  color: var(--admin-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--admin-border);
}

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.dish-table-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.dish-table-row:hover td {
  background: rgba(212, 163, 89, 0.06) !important;
}

.dish-cell {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dish-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--admin-bg);
}

.dish-meta h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.dish-meta p {
  font-size: 0.8rem;
  color: var(--admin-muted);
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Switch de Disponibilidad */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #3e4a3c;
  transition: 0.3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--admin-success);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-gold {
  background: rgba(212, 163, 89, 0.2);
  color: var(--admin-primary);
  border: 1px solid rgba(212, 163, 89, 0.4);
}

.badge-green {
  background: var(--admin-success-bg);
  color: var(--admin-success);
}

.badge-red {
  background: var(--admin-danger-bg);
  color: var(--admin-danger);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal-box {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

.modal-box form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.modal-body {
  padding: 1.5rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--admin-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  background: var(--admin-surface);
  z-index: 5;
}

.modal-footer-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.btn-save-dish {
  width: auto;
  white-space: nowrap;
}

.allergen-checkbox-grid, .allergens-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.6rem;
  background: var(--admin-bg);
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--admin-border);
}

.allergen-check-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--admin-muted);
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.allergen-check-item:hover {
  border-color: var(--admin-primary);
  color: #fff;
  background: rgba(212, 163, 89, 0.08);
}

.allergen-check-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--admin-primary);
  flex-shrink: 0;
}

.allergen-check-item:has(input[type="checkbox"]:checked) {
  background: rgba(212, 163, 89, 0.18);
  border-color: var(--admin-primary);
  color: #ffffff;
  box-shadow: 0 0 0 1px var(--admin-primary);
}

/* ============================================================
   📸 PLANTILLAS DE IMÁGENES PARA CATEGORÍAS
   ============================================================ */
.category-image-preview-wrap {
  position: relative;
  width: 100%;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--admin-border);
}

.category-img-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-badge {
  position: absolute;
  bottom: 6px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: var(--admin-primary);
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
  gap: 0.5rem;
  max-height: 190px;
  overflow-y: auto;
  padding: 0.5rem;
  background: var(--admin-bg);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-sm);
}

.template-item {
  position: relative;
  height: 54px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--admin-border);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.template-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6);
  transition: transform 0.3s ease;
}

.template-item:hover img, .template-item.selected img {
  filter: brightness(0.85);
  transform: scale(1.08);
}

.template-item:hover, .template-item.selected {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 2px rgba(212, 163, 89, 0.45);
}

.template-item span {
  position: relative;
  z-index: 2;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
  text-align: center;
  padding: 0 4px;
  line-height: 1.1;
  text-transform: uppercase;
}

.category-thumb-img {
  width: 55px;
  height: 34px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid var(--admin-border);
  display: block;
}

.cat-mobile-sub {
  display: none;
}

/* ============================================================
   🎨 SELECTOR VISUAL DE ICONOS FONTAWESOME
   ============================================================ */
.icon-trigger-box {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.65rem 0.35rem 0.4rem;
  background: var(--admin-bg);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-trigger-box:hover {
  border-color: var(--admin-primary);
  background: rgba(212, 163, 89, 0.06);
}

.icon-trigger-preview {
  width: 38px;
  height: 38px;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--admin-primary);
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.icon-trigger-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.icon-trigger-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-icon-picker-btn {
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  white-space: nowrap;
  pointer-events: none;
}

.icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
  gap: 0.6rem;
  max-height: 380px;
  overflow-y: auto;
  padding: 0.65rem;
  background: var(--admin-bg);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-sm);
  scrollbar-width: thin;
}

.icon-picker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.75rem 0.35rem;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
}

.icon-picker-item i {
  font-size: 1.35rem;
  color: var(--admin-muted);
  transition: all 0.18s ease;
}

.icon-picker-item span {
  font-size: 0.68rem;
  color: var(--admin-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.icon-picker-item:hover, .icon-picker-item.selected {
  border-color: var(--admin-primary);
  background: rgba(212, 163, 89, 0.16);
}

.icon-picker-item:hover i, .icon-picker-item.selected i {
  color: var(--admin-primary);
  transform: scale(1.15);
}

.icon-picker-item:hover span, .icon-picker-item.selected span {
  color: #fff;
  font-weight: 700;
}

/* ============================================================
   📊 PANEL DE ANALYTICS & TELEMETRÍA QR
   ============================================================ */
.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.analytics-kpi-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.25s ease;
}

.analytics-kpi-card:hover {
  border-color: rgba(212, 163, 89, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.analytics-kpi-card.highlight-card {
  background: linear-gradient(145deg, rgba(27, 71, 32, 0.2), rgba(18, 24, 17, 0.8));
  border-color: rgba(46, 125, 50, 0.4);
}

.kpi-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.kpi-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--admin-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  position: relative;
}

.bg-primary-soft { background: rgba(212, 163, 89, 0.15); color: var(--admin-primary); }
.bg-success-soft { background: rgba(46, 125, 50, 0.2); color: #4ade80; }
.bg-warning-soft { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.bg-info-soft { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }

.live-ping-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: livePing 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
  margin-right: 4px;
}

@keyframes livePing {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.kpi-value-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.25rem;
}

.kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  font-family: var(--font-title);
}

.kpi-unit {
  font-size: 0.85rem;
  color: var(--admin-muted);
}

.kpi-subval {
  font-size: 0.95rem;
  color: var(--admin-muted);
  font-weight: 600;
}

.kpi-subtitle {
  font-size: 0.78rem;
  color: var(--admin-muted);
}

/* Gráficos Grid */
.analytics-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.analytics-box {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.analytics-box-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.analytics-box-title {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.analytics-box-desc {
  color: var(--admin-muted);
  font-size: 0.8rem;
}

/* Timeline Horizontal Bars (Responsive & Mobile-Safe) */
.timeline-bars-wrap {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  height: 190px;
  padding-top: 1.25rem;
  border-bottom: 1px solid var(--admin-border);
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.timeline-bar-col {
  flex: 1;
  min-width: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}

.timeline-bar-fill {
  width: 100%;
  max-width: 20px;
  background: linear-gradient(180deg, var(--admin-primary) 0%, rgba(212, 175, 55, 0.2) 100%);
  border-radius: 4px 4px 0 0;
  transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 4px;
  position: relative;
  cursor: pointer;
}

.timeline-bar-fill:hover {
  background: linear-gradient(180deg, #fcd34d 0%, var(--admin-primary) 100%);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
}

.timeline-bar-count {
  font-size: 0.68rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.timeline-bar-label {
  font-size: 0.65rem;
  color: var(--admin-muted);
  margin-top: 0.45rem;
  white-space: nowrap;
  letter-spacing: -0.3px;
}

@media (max-width: 600px) {
  .timeline-bars-wrap {
    gap: 0.25rem;
    height: 165px;
    padding-top: 1rem;
  }

  .timeline-bar-col {
    min-width: 18px;
  }

  .timeline-bar-fill {
    max-width: 14px;
    border-radius: 3px 3px 0 0;
  }

  .timeline-bar-count {
    font-size: 0.6rem;
  }

  .timeline-bar-label {
    font-size: 0.58rem;
  }

  .peak-hours-bars-wrap {
    gap: 2px;
  }

  .peak-hour-label {
    font-size: 0.55rem;
  }
}

/* Horas Pico Chart */
.service-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.service-tag {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  font-weight: 600;
}

.tag-desayuno { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.tag-almuerzo { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }
.tag-comida { background: rgba(34, 197, 94, 0.15); color: #86efac; }
.tag-merienda { background: rgba(236, 72, 153, 0.15); color: #f472b6; }
.tag-cena { background: rgba(168, 85, 247, 0.15); color: #d8b4fe; }

.peak-hours-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 140px;
  border-bottom: 1px solid var(--admin-border);
  padding-top: 0.5rem;
}

.peak-hour-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.peak-hour-bar {
  width: 100%;
  border-radius: 2px 2px 0 0;
  transition: height 0.5s ease;
  min-height: 2px;
  cursor: pointer;
}

.peak-hour-label {
  font-size: 0.62rem;
  color: var(--admin-muted);
  margin-top: 0.3rem;
}

/* Desgloses Grid */
.analytics-breakdowns-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.breakdown-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.breakdown-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.breakdown-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #fff;
}

.breakdown-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--admin-bg);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.breakdown-bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.6s ease;
}

/* Generador de Códigos QR */
.qr-generator-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.qr-generator-left {
  flex: 1;
}

.qr-generator-right {
  width: 220px;
  flex-shrink: 0;
}

.admin-qr-preview-box {
  background: var(--admin-bg);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
}

.qr-canvas-holder {
  background: #fff;
  padding: 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}

.qr-canvas-holder img, .qr-canvas-holder canvas {
  width: 130px !important;
  height: 130px !important;
}

.admin-qr-url-text {
  font-size: 0.72rem;
  color: var(--admin-primary);
  font-family: monospace;
  word-break: break-all;
  max-width: 100%;
}

.btn-quick-qr {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  color: var(--admin-muted);
  padding: 0.35rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-quick-qr:hover, .btn-quick-qr.active {
  background: rgba(212, 163, 89, 0.15);
  border-color: var(--admin-primary);
  color: #fff;
}

.live-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: #4ade80;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-weight: 600;
}

/* Plantilla Imprimible de Códigos QR */
.printable-qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1.25rem;
}

.print-qr-card {
  position: relative;
  background: #fff;
  color: #121811;
  border: 2px dashed #94a3b8;
  border-radius: 8px;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.print-qr-card:hover {
  border-color: var(--admin-primary);
}

.delete-qr-card-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  background: #fee2e2;
  color: #ef4444;
  border: 1px solid #fca5a5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.delete-qr-card-btn:hover {
  background: #ef4444;
  color: #fff;
}

.print-qr-brand {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 0.95rem;
  color: #1b4720;
  margin-bottom: 0.2rem;
}

.print-qr-table-tag {
  font-size: 0.82rem;
  font-weight: 700;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 0.15rem 0.6rem;
  border-radius: 12px;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.print-qr-holder {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.35rem;
}

.print-qr-holder img, .print-qr-holder canvas {
  width: 115px !important;
  height: 115px !important;
}

.print-qr-cta {
  font-size: 0.7rem;
  font-weight: 600;
  color: #475569;
}

/* Controles del Creador de Plantilla */
.print-builder-controls {
  background: var(--admin-bg);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.print-preset-pill {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.print-preset-pill:hover {
  background: var(--admin-primary);
  color: #000;
  border-color: var(--admin-primary);
}

@media print {
  @page {
    size: A4 portrait;
    margin: 1cm;
  }

  html, body {
    background: #fff !important;
    color: #000 !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
  }

  /* Ocultar TODO el layout de la app para no generar páginas previas vacías */
  .admin-layout,
  .admin-sidebar,
  .admin-topbar,
  .admin-main,
  .admin-kpi-bar,
  .admin-mobile-brand,
  .admin-mobile-toggle,
  .admin-mobile-drawer,
  .admin-mobile-overlay,
  .modal-backdrop:not(#printSheetModal),
  .toast-container,
  .no-print,
  #printSheetModal .modal-header,
  #printSheetModal .modal-footer,
  #printSheetModal .print-builder-controls,
  #printSheetModal p,
  .delete-qr-card-btn {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
  }

  #printSheetModal {
    position: static !important;
    display: block !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    z-index: auto !important;
  }

  #printSheetModal .modal-box {
    position: static !important;
    display: block !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    max-width: 100% !important;
    max-height: none !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #printSheetModal .modal-body {
    padding: 0 !important;
    margin: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    height: auto !important;
  }

  .printable-qr-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.8cm !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }

  .print-qr-card {
    border: 1.5px dashed #000 !important;
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    padding: 0.6cm 0.4cm !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  .print-qr-brand {
    color: #000 !important;
    font-weight: 800 !important;
    font-size: 1rem !important;
  }

  .print-qr-table-tag {
    background: #f1f5f9 !important;
    color: #000 !important;
    border: 1px solid #000 !important;
    font-weight: 700 !important;
  }

  .print-qr-holder canvas,
  .print-qr-holder img {
    width: 110px !important;
    height: 110px !important;
  }

  .print-qr-cta {
    color: #333 !important;
    font-size: 0.75rem !important;
  }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast-success {
  background: #1b4720;
  border: 1px solid var(--admin-success);
}

.toast-error {
  background: #4a1515;
  border: 1px solid var(--admin-danger);
}

/* Componentes Móviles (Ocultos en Escritorio) */
.admin-mobile-brand {
  display: none;
}

.admin-mobile-toggle {
  display: none;
}

.admin-mobile-drawer {
  display: none;
}

.admin-mobile-overlay {
  display: none;
}

/* ============================================================
   📱 RESPONSIVE ADMIN DASHBOARD & LOGIN (TABLET & MÓVIL)
   ============================================================ */

@media (max-width: 1024px) {
  .admin-sidebar {
    width: 220px;
    padding: 1.25rem 0.75rem;
  }

  .admin-main {
    padding: 1.25rem 1.5rem 2.5rem;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column;
  }

  /* Ocultar barra lateral en móvil (se traslada al menú hamburguesa) */
  .admin-sidebar {
    display: none !important;
  }

  .desktop-only {
    display: none !important;
  }

  .admin-main {
    padding: 1rem 0.85rem 3rem;
  }

  /* Topbar Móvil */
  .admin-topbar {
    padding: 0.6rem 0;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .topbar-left-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
  }

  .admin-mobile-brand {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
  }

  .admin-logo-mobile {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1.5px solid var(--admin-primary);
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  }

  /* Ocultar título del negocio en móvil para evitar descuadres */
  .admin-brand-mobile-title {
    display: none !important;
  }

  .topbar-left-content > div:not(.admin-mobile-brand) {
    display: none !important;
  }

  .page-title {
    display: none !important;
  }

  #pageHeadingSubtitle {
    display: none !important;
  }

  .topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: flex-end;
    width: auto;
    flex-wrap: nowrap;
  }

  .btn-add-top {
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
    white-space: nowrap;
    border-radius: var(--radius-sm);
  }

  .admin-mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .admin-mobile-toggle:hover {
    border-color: var(--admin-primary);
    color: var(--admin-primary);
  }

  /* Drawer Menú Hamburguesa */
  .admin-mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -320px;
    width: 290px;
    height: 100vh;
    background: var(--admin-surface);
    border-left: 1px solid var(--admin-border);
    z-index: 2500;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.85);
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 1.5rem 1rem;
  }

  .admin-mobile-drawer.open {
    right: 0;
  }

  .admin-mobile-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 2400;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .admin-mobile-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }

  .admin-mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--admin-border);
    margin-bottom: 1.25rem;
  }

  .mobile-user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .user-avatar-icon {
    font-size: 2.2rem;
    color: var(--admin-primary);
  }

  .mobile-user-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    display: block;
  }

  .mobile-user-role {
    font-size: 0.72rem;
    color: var(--admin-success);
    font-weight: 600;
  }

  .btn-close-mobile-drawer {
    background: none;
    border: none;
    color: var(--admin-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.5rem;
  }

  .admin-mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
  }

  .admin-mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--admin-muted);
    background: var(--admin-bg);
    border: 1px solid var(--admin-border);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
  }

  .admin-mobile-nav-item:hover, .admin-mobile-nav-item.active {
    background: rgba(212, 163, 89, 0.15);
    color: var(--admin-primary);
    border-color: rgba(212, 163, 89, 0.4);
  }

  .admin-mobile-drawer-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--admin-border);
  }

  .dishes-header-bar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
    padding: 0.75rem 0.85rem !important;
    margin: 0 !important;
    border-bottom: 1px solid var(--admin-border) !important;
  }

  .dishes-search-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .search-input-box {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    margin: 0 !important;
  }

  .search-input-box .form-input {
    width: 100% !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    margin: 0 !important;
    padding: 0 0.75rem 0 2.2rem !important;
    font-size: 0.85rem !important;
    box-sizing: border-box !important;
  }

  .search-input-box i.prefix-icon {
    position: absolute !important;
    left: 0.75rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 0.8rem !important;
    color: var(--admin-muted) !important;
    pointer-events: none !important;
    z-index: 2 !important;
    line-height: 1 !important;
    margin: 0 !important;
  }

  .dishes-filters-group {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .dishes-filters-group .form-select {
    width: 100% !important;
    min-width: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    margin: 0 !important;
    font-size: 0.78rem !important;
    padding: 0 1.4rem 0 0.55rem !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .card-footer-toolbar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.6rem !important;
    padding: 0.75rem 0.85rem !important;
  }

  .footer-note {
    font-size: 0.75rem !important;
    text-align: center !important;
    justify-content: center !important;
  }

  .header-action-buttons {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .header-action-buttons .btn-admin {
    width: 100% !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    margin: 0 !important;
    justify-content: center !important;
    padding: 0 0.5rem !important;
    font-size: 0.82rem !important;
    box-sizing: border-box !important;
  }

  .categories-header-bar {
    display: flex !important;
    align-items: center !important;
    padding: 0.75rem 0.85rem !important;
  }

  .categories-header-title {
    font-size: 1rem !important;
  }

  .table-search-box {
    flex-direction: column;
    max-width: 100%;
    width: 100%;
  }

  .table-search-box .input-wrapper,
  .table-search-box .form-select {
    width: 100%;
    max-width: 100%;
  }

  /* En móvil: mostrar únicamente Plato y Precio (el resto se consulta/edita al abrir el plato) */
  .col-category,
  .col-allergens,
  .col-available,
  .col-actions {
    display: none !important;
  }

  /* En móvil: mostrar únicamente Imagen, Nombre y Estado de la Categoría */
  .col-cat-icon,
  .col-cat-slug,
  .col-cat-sub,
  .col-cat-order,
  .col-cat-actions {
    display: none !important;
  }

  .cat-mobile-sub {
    display: block !important;
  }

  .col-cat-thumb {
    width: 52px;
    padding-right: 0.25rem !important;
  }

  .category-thumb-img {
    width: 46px;
    height: 30px;
  }

  .col-cat-status {
    text-align: right !important;
    white-space: nowrap;
  }

  /* Analytics Móvil */
  .analytics-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
  }

  .analytics-charts-grid {
    grid-template-columns: 1fr !important;
  }

  .analytics-breakdowns-grid {
    grid-template-columns: 1fr !important;
  }

  .qr-generator-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .qr-generator-right {
    width: 100% !important;
  }

  .admin-qr-preview-box {
    margin-top: 1rem !important;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.75rem 0.65rem;
  }

  .col-price, .col-price-th {
    text-align: right !important;
    white-space: nowrap;
  }

  .dish-desc-text {
    display: none !important;
  }

  .dish-meta h4 {
    font-size: 0.88rem;
    margin-bottom: 0;
    line-height: 1.25;
  }

  .dish-cell {
    gap: 0.65rem;
  }

  .dish-thumb {
    width: 40px;
    height: 40px;
    border-radius: 4px;
  }

  /* Modales en Móvil */
  .modal-backdrop {
    padding: 0.5rem;
  }

  .modal-box {
    max-width: 100%;
    max-height: 94vh;
    border-radius: var(--radius-md);
  }

  .modal-header {
    padding: 1rem 1.25rem;
  }

  .modal-body {
    padding: 1.25rem;
  }

  .modal-body div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }

  .allergen-checkbox-grid, .allergens-picker {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding: 0.65rem;
  }

  .allergen-check-item {
    padding: 0.65rem 0.75rem;
    font-size: 0.85rem;
  }

  .allergen-check-item input[type="checkbox"] {
    width: 22px;
    height: 22px;
  }

  .modal-footer {
    padding: 0.85rem 1rem;
    flex-direction: column-reverse;
    gap: 0.6rem;
    width: 100%;
  }

  .modal-footer-actions {
    display: flex;
    width: 100%;
    gap: 0.5rem;
    margin-left: 0;
  }

  .modal-footer-actions .btn-admin {
    flex: 1;
    justify-content: center;
    padding: 0.65rem 0.75rem;
    font-size: 0.85rem;
    min-width: 0;
    white-space: nowrap;
  }

  .btn-modal-delete {
    width: 100% !important;
    justify-content: center;
    padding: 0.55rem 0.75rem;
    font-size: 0.82rem;
  }

  .print-sheet-footer {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    padding: 0.75rem 1rem !important;
    background: var(--admin-surface) !important;
  }

  .print-sheet-footer #saveTemplateBtn {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.6rem 0.75rem !important;
  }

  .print-sheet-footer-actions {
    display: flex !important;
    width: 100% !important;
    gap: 0.5rem !important;
  }

  .print-sheet-footer-actions .btn-admin {
    flex: 1 !important;
    justify-content: center !important;
    padding: 0.6rem 0.75rem !important;
    font-size: 0.82rem !important;
  }

  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }

  .login-card {
    padding: 1.75rem 1.25rem;
  }
}

/* ============================================================ */
/* 🖼️ GESTOR DE MEDIOS Y GALERÍA MULTIMEDIA                    */
/* ============================================================ */
.media-input-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  width: 100%;
}

.media-input-group .form-input {
  flex: 1;
  min-width: 0;
}

.media-input-group .btn-admin,
.media-input-group .btn-quick-upload-label {
  flex-shrink: 0;
  width: auto;
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.media-dropzone {
  border: 2px dashed var(--admin-border);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  padding: 2.25rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.media-dropzone:hover, .media-dropzone.dragover {
  border-color: var(--admin-primary);
  background: rgba(212, 163, 89, 0.06);
}

.media-dropzone i {
  font-size: 2.6rem;
  color: var(--admin-primary);
}

.media-dropzone h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.media-dropzone p {
  color: var(--admin-muted);
  font-size: 0.82rem;
  margin: 0;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.25rem;
}

.media-card {
  background: var(--admin-bg);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.media-card:hover {
  border-color: var(--admin-primary);
  transform: translateY(-2px);
}

.media-thumb-wrap {
  width: 100%;
  height: 140px;
  background: #050805;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.media-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.media-card:hover .media-thumb-wrap img {
  transform: scale(1.05);
}

.media-card-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.media-filename {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--admin-muted);
}

.media-card-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--admin-border);
}

.media-card-actions .btn-admin {
  flex: 1;
  padding: 0.35rem 0.5rem;
  font-size: 0.75rem;
  justify-content: center;
}

.media-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  max-height: 380px;
  overflow-y: auto;
  padding: 0.5rem;
}

.media-picker-item {
  border: 2px solid var(--admin-border);
  border-radius: var(--radius-sm);
  background: var(--admin-bg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.media-picker-item:hover {
  border-color: var(--admin-primary);
  transform: scale(1.03);
}

.media-picker-item.selected {
  border-color: var(--admin-primary);
  box-shadow: 0 0 12px rgba(212, 163, 89, 0.4);
}

.media-picker-thumb {
  width: 100%;
  height: 90px;
  object-fit: cover;
  display: block;
}

.media-picker-name {
  padding: 0.3rem 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* Cuadrícula de Configuración del Negocio (Marca Blanca) */
.business-settings-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: stretch;
}

.business-settings-grid > div {
  background: var(--admin-bg);
  border: 1px solid var(--admin-border);
  padding: 1.15rem 1rem;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
}

@media (max-width: 1400px) {
  .business-settings-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .business-settings-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ============================================================
   🕒 BANNER DE MODO DEMO (CUENTA ATRÁS)
   ============================================================ */
.demo-mode-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(212, 163, 89, 0.15) 0%, rgba(26, 38, 24, 0.95) 100%);
  border: 1px solid rgba(212, 163, 89, 0.45);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin: 1.25rem 1.5rem 0.5rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  gap: 1rem;
  flex-wrap: wrap;
  transition: all 0.3s ease;
}

.demo-mode-banner.expired {
  background: linear-gradient(135deg, rgba(239, 83, 80, 0.2) 0%, rgba(40, 15, 15, 0.98) 100%);
  border-color: rgba(239, 83, 80, 0.55);
}

.demo-mode-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.demo-mode-icon-pulse {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  background: rgba(212, 163, 89, 0.2);
  color: var(--admin-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  animation: pulseDemo 2.5s infinite ease-in-out;
}

.demo-mode-banner.expired .demo-mode-icon-pulse {
  background: rgba(239, 83, 80, 0.2);
  color: var(--admin-danger);
  animation: none;
}

@keyframes pulseDemo {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 163, 89, 0.4); }
  50% { transform: scale(1.04); box-shadow: 0 0 0 6px rgba(212, 163, 89, 0); }
}

.demo-mode-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.demo-mode-subtitle {
  font-size: 0.8rem;
  color: var(--admin-muted);
  margin-top: 0.1rem;
}

.demo-mode-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.demo-countdown-box {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(212, 163, 89, 0.35);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--admin-primary);
  letter-spacing: 0.5px;
}

.demo-mode-banner.expired .demo-countdown-box {
  border-color: rgba(239, 83, 80, 0.4);
  color: var(--admin-danger);
}

.demo-mode-badge {
  background: var(--admin-primary);
  color: #0d120d;
  font-weight: 800;
  font-size: 0.7rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.demo-mode-banner.expired .demo-mode-badge {
  background: var(--admin-danger);
  color: #fff;
}

@media (max-width: 768px) {
  .demo-mode-banner {
    margin: 1rem 1rem 0.5rem 1rem;
    flex-direction: column;
    align-items: flex-start;
  }
  .demo-mode-right {
    width: 100%;
    justify-content: space-between;
  }
}



/* ============================================================
   🎨 THEME CUSTOMIZER & PRESETS STYLES
   ============================================================ */
.theme-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.theme-preset-card {
  background: var(--admin-surface);
  border: 2px solid var(--admin-border);
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transition: var(--transition);
  user-select: none;
}

.theme-preset-card:hover {
  border-color: var(--admin-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.theme-preset-card.active {
  border-color: var(--admin-primary);
  background: rgba(212, 163, 89, 0.12);
  box-shadow: 0 0 0 1px var(--admin-primary);
}

.preset-color-dots {
  display: flex;
  gap: 3px;
  align-items: center;
}

.preset-color-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.preset-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.color-picker-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.color-picker-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.5rem;
}

.color-swatch-input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: none;
  padding: 0;
}

.color-swatch-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-swatch-input::-webkit-color-swatch {
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.color-hex-text {
  height: 32px;
  font-family: monospace;
  font-size: 0.85rem;
  text-transform: uppercase;
}

/* ============================================================
   🖨️ PRINTABLE MENU PAPER SHEET (ESTILO EDITORIAL A4)
   ============================================================ */
.printable-paper-sheet {
  background: #ffffff;
  color: #1a1a1a;
  padding: 2.5rem 3rem;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-family: 'Plus Jakarta Sans', Georgia, serif;
  min-height: 800px;
}

.print-sheet-header {
  text-align: center;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #222;
  margin-bottom: 2rem;
}

.print-sheet-logo {
  max-height: 60px;
  margin-bottom: 0.5rem;
}

.print-sheet-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #111;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.print-sheet-tagline {
  font-size: 0.95rem;
  color: #666;
  font-style: italic;
  letter-spacing: 0.5px;
}

.print-content-columns {
  column-count: 2;
  column-gap: 2.2rem;
  column-fill: auto;
}
.print-categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 2.5rem;
}

.print-category-box {
  break-inside: avoid;
}

.print-category-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid #d4a359;
  padding-bottom: 0.35rem;
  margin-bottom: 0.85rem;
}

.print-category-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #111;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.print-dishes-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.print-dish-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  break-inside: avoid;
}

.print-dish-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.print-dish-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #222;
}

.print-dish-dots {
  flex: 1;
  border-bottom: 1px dotted #ccc;
  margin: 0 0.3rem;
}

.print-dish-price {
  font-weight: 700;
  font-size: 0.95rem;
  color: #000;
  white-space: nowrap;
}

.print-dish-desc {
  font-size: 0.8rem;
  color: #555;
  line-height: 1.35;
}

.print-dish-allergens {
  font-size: 0.72rem;
  color: #777;
  margin-top: 0.1rem;
}

.print-sheet-footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #666;
}

.print-sheet-qr-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.print-sheet-qr-img {
  width: 65px;
  height: 65px;
}

.print-allergens-legend {
  margin-top: 2rem;
  padding: 0.85rem 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.72rem;
  color: #475569;
  break-inside: avoid;
}

.print-allergens-legend-title {
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.print-allergens-legend-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
}

.print-allergens-legend-grid span {
  white-space: nowrap;
}

/* Reglas de Impresión Nativa (Ctrl+P / window.print) */
@media print {
  body * {
    visibility: hidden;
  }
  #printableMenuSheet, #printableMenuSheet * {
    visibility: visible;
  }
  #printableMenuSheet {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 1.5cm 1.5cm;
    box-shadow: none;
    border: none;
  }
  @page {
    size: A4;
    margin: 1cm;
  }
}


/* ============================================================
   📊 INFORME DE VENTAS & COMANDAS TPV (ADMIN STYLES)
   ============================================================ */
.sales-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.sales-period-tabs {
  display: flex;
  gap: 0.4rem;
  background: var(--admin-surface);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--admin-border);
  overflow-x: auto;
}

.sales-period-btn {
  background: none;
  border: none;
  color: var(--admin-muted);
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.sales-period-btn:hover { color: #fff; }
.sales-period-btn.active {
  background: var(--admin-primary);
  color: #080c08;
  font-weight: 800;
}

.sales-charts-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .sales-charts-grid { grid-template-columns: 1fr; }
}

.top-dishes-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.top-dish-row {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.top-dish-rank {
  width: 28px;
  height: 28px;
  background: rgba(212, 175, 55, 0.15);
  color: var(--admin-primary);
  border-radius: 50%;
  font-weight: 900;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.top-dish-info { flex: 1; }
.top-dish-name { font-weight: 700; font-size: 0.92rem; color: #fff; }
.top-dish-sub { font-size: 0.75rem; color: var(--admin-muted); }

.top-dish-stats { text-align: right; }
.top-dish-qty { font-weight: 800; font-size: 0.95rem; color: #fff; }
.top-dish-rev { font-size: 0.78rem; color: var(--admin-primary); font-weight: 700; }

/* Zone Breakdown */
.zone-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
}

.zone-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.zone-header-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
}

.zone-progress-bg {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  overflow: hidden;
}

.zone-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.history-search-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
}

.history-search-wrap input {
  background: none;
  border: none;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
  width: 180px;
}


/* ============================================================
   📋 RESPONSIVE ORDERS HISTORY (TABLE -> CARDS ON MOBILE)
   ============================================================ */
.orders-history-table {
  width: 100%;
  border-collapse: collapse;
}

.orders-history-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--admin-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 800;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--admin-border);
  text-align: left;
}

.orders-history-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: top;
}

.orders-history-table tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

@media (max-width: 768px) {
  /* En pantallas móviles y tablets pequeñas, transformar tabla en tarjetas táctiles */
  .orders-history-table,
  .orders-history-table thead,
  .orders-history-table tbody,
  .orders-history-table th,
  .orders-history-table td,
  .orders-history-table tr {
    display: block;
    width: 100%;
  }

  .orders-history-table thead {
    display: none; /* Ocultar cabecera tradicional en móvil */
  }

  .orders-history-table tr {
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.85rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  }

  .orders-history-table td {
    padding: 0.35rem 0;
    border-bottom: none;
  }

  .order-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .order-mobile-table-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--admin-primary);
  }

  .order-mobile-time {
    font-size: 0.75rem;
    color: var(--admin-muted);
  }

  .order-mobile-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
  }
}


/* ============================================================
   📊 MÓDULOS VISUALES - VENTAS & FACTURACIÓN TPV
   ============================================================ */
.sales-module-card {
  background: linear-gradient(180deg, rgba(20, 28, 20, 0.75) 0%, rgba(12, 17, 12, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.35rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  position: relative;
}

.sales-module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.sales-module-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sales-module-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.sales-module-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.sales-module-desc {
  font-size: 0.8rem;
  color: var(--admin-muted);
  margin-top: 2px;
}

@media (max-width: 768px) {
  .sales-module-card {
    padding: 1rem 0.85rem;
    border-radius: 12px;
  }
  
  .sales-module-icon-badge {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
  }

  .sales-module-title {
    font-size: 1.02rem;
  }

  .sales-module-desc {
    font-size: 0.74rem;
  }

  .sales-actions-right {
    width: 100%;
  }

  .sales-actions-right button {
    width: 100%;
    justify-content: center;
  }
}


/* ============================================================
   🪑 GESTIÓN PERSONALIZADA DE ZONAS Y MESAS
   ============================================================ */
.custom-zones-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.zone-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.zone-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.75rem;
}

.zone-name-input {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  outline: none;
  width: 220px;
}

.zone-name-input:focus {
  border-color: var(--admin-primary);
}

.zone-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.zone-tables-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.table-chip {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  color: var(--admin-text);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.table-chip-remove {
  color: var(--admin-muted);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}

.table-chip-remove:hover {
  color: var(--admin-danger);
}

.zone-add-table-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.zone-add-table-input {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  color: #fff;
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  font-size: 0.82rem;
  outline: none;
  width: 130px;
}

.zone-add-table-input:focus {
  border-color: var(--admin-primary);
}

.btn-add-table-chip {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--admin-primary);
  color: var(--admin-primary);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-delete-zone {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--admin-danger);
  color: var(--admin-danger);
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
}


/* ============================================================
   🔒 RESTRICCIONES ESTRICTAS PARA ROL USUARIO / PERSONAL
   ============================================================ */
body.role-user [data-tab="orders-report"],
body.role-user [data-tab="tables-config"],
body.role-user [data-tab="analytics"],
body.role-user [data-tab="media"],
body.role-user [data-tab="security"],
body.role-user [data-tab="team-users"],
body.role-user #tab-orders-report,
body.role-user #tab-tables-config,
body.role-user #tab-analytics,
body.role-user #tab-media,
body.role-user #tab-security,
body.role-user #tab-team-users,
body.role-user #topAddButton,
body.role-user .btn-add-top,
body.role-user .dishes-header-actions,
body.role-user .cat-header-actions,
body.role-user .dish-card-actions,
body.role-user .category-card-actions,
body.role-user .btn-edit,
body.role-user .btn-delete,
body.role-user .admin-card-actions,
body.role-user .btn-action-edit,
body.role-user .btn-action-delete {
  display: none !important;
}

body.role-user .dish-card,
body.role-user .category-card {
  cursor: default;
}


body.role-user .admin-mobile-nav-item[data-tab="orders-report"],
body.role-user .admin-mobile-nav-item[data-tab="tables-config"],
body.role-user .admin-mobile-nav-item[data-tab="analytics"],
body.role-user .admin-mobile-nav-item[data-tab="media"],
body.role-user .admin-mobile-nav-item[data-tab="security"],
body.role-user .admin-mobile-nav-item[data-tab="team-users"],
body.role-user .admin-mobile-nav button[data-tab="orders-report"],
body.role-user .admin-mobile-nav button[data-tab="tables-config"],
body.role-user .admin-mobile-nav button[data-tab="analytics"],
body.role-user .admin-mobile-nav button[data-tab="media"],
body.role-user .admin-mobile-nav button[data-tab="security"],
body.role-user .admin-mobile-nav button[data-tab="team-users"] {
  display: none !important;
}


body.role-user .admin-only-tab,
body.role-user .admin-nav-item.admin-only-tab,
body.role-user .admin-mobile-nav-item.admin-only-tab,
body.role-user [data-tab="orders-report"],
body.role-user [data-tab="tables-config"],
body.role-user [data-tab="analytics"],
body.role-user [data-tab="media"],
body.role-user [data-tab="security"],
body.role-user [data-tab="team-users"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}


/* ============================================================
   💎 RESUMEN EJECUTIVO DE VENTAS - TARJETAS KPI MODERNAS
   ============================================================ */
.sales-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.sales-kpi-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  padding: 1.25rem 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

.sales-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}

.kpi-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kpi-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.kpi-gold .kpi-icon-box { background: rgba(212, 175, 55, 0.15); color: var(--admin-primary); border: 1px solid rgba(212, 175, 55, 0.3); }
.kpi-blue .kpi-icon-box { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.kpi-emerald .kpi-icon-box { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.kpi-amber .kpi-icon-box { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }

.kpi-status-pill {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.3px;
}

.pill-gold { background: rgba(212, 175, 55, 0.12); color: var(--admin-primary); border: 1px solid rgba(212, 175, 55, 0.25); }
.pill-blue { background: rgba(56, 189, 248, 0.12); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.25); }
.pill-emerald { background: rgba(16, 185, 129, 0.12); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.25); }
.pill-amber { background: rgba(245, 158, 11, 0.12); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.25); }

.kpi-body {
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--admin-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 0.35rem;
}

.kpi-value {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 0;
}

.text-gold { color: #fcd34d !important; }
.text-blue { color: #7dd3fc !important; }
.text-emerald { color: #6ee7b7 !important; }
.text-amber { color: #fde047 !important; }

.kpi-sublabel {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 0.35rem;
}

@media (max-width: 1024px) {
  .sales-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }
}

@media (max-width: 600px) {
  .sales-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.55rem;
  }

  .sales-kpi-card {
    padding: 0.95rem 0.85rem;
    border-radius: 10px;
    gap: 0.65rem;
  }

  .kpi-icon-box {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
    border-radius: 8px;
  }

  .kpi-status-pill {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
  }

  .kpi-label {
    font-size: 0.68rem;
    letter-spacing: 0.3px;
  }

  .kpi-value {
    font-size: 1.25rem;
  }

  .kpi-sublabel {
    font-size: 0.65rem;
  }
}


/* ============================================================
   👥 GESTIÓN DE EQUIPO Y ROLES - RESPONSIVE MOBILE CARDS
   ============================================================ */
.team-users-mobile-list {
  display: none;
  flex-direction: column;
  gap: 0.85rem;
}

.team-user-mobile-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 1.15rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.team-user-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.team-user-card-avatar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.team-user-card-avatar i {
  font-size: 1.8rem;
  color: var(--admin-primary);
}

.team-user-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.team-user-email {
  font-size: 0.78rem;
  color: var(--admin-muted);
  margin-top: 2px;
}

.team-user-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  color: var(--admin-muted);
}

@media (max-width: 768px) {
  .team-users-desktop-wrap {
    display: none !important;
  }

  .team-users-mobile-list {
    display: flex !important;
  }
}
