* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: #f5f5f0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #1a1a1a; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* LOGIN */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a2e;
}
.login-box {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  width: 340px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-logo { font-family: Georgia, serif; font-size: 2rem; letter-spacing: 3px; text-align: center; color: #1a1a2e; }
.login-sub { text-align: center; color: #888; font-size: 0.9rem; }
.login-error { color: #ef4444; font-size: 0.85rem; text-align: center; min-height: 1rem; }

/* LAYOUT */
#main-app { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px;
  background: #1a1a2e;
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar-logo { font-family: Georgia, serif; letter-spacing: 3px; font-size: 1.2rem; padding: 1.5rem 1.2rem 1rem; border-bottom: 1px solid #2a2a4a; display:flex; flex-direction:column; align-items:center; text-align:center; }
.sidebar-nav { display: flex; flex-direction: column; padding: 0.8rem 0; flex: 1; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #a0a0c0;
  text-decoration: none;
  padding: 0.85rem 1.2rem;
  font-size: 0.9rem;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s;
  min-height: 48px;
}
.nav-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.nav-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.nav-link:hover { background: #2a2a4a; color: #fff; }
.nav-link.active { background: #2a2a4a; color: #fff; border-left-color: #6366f1; }
.logout-btn { margin-top: auto; color: #f87171; border-top: 1px solid #2a2a4a; }

.main-content { margin-left: 220px; padding: 2rem; flex: 1; }
.section { display: none; }
.section.active { display: block; }
.section-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 1.5rem; color: #1a1a2e; }

/* FORMS */
.form-input, .form-select, .form-textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0.55rem 0.8rem;
  font-size: 0.9rem;
  outline: none;
  background: #fff;
  color: #1a1a1a;
  transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: #6366f1; }
.form-textarea { resize: vertical; min-height: 80px; }
.form-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.form-label { font-size: 0.82rem; font-weight: 600; color: #555; }

/* BUTTONS */
.btn-primary {
  background: #1a1a2e;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 1rem;
}
.btn-primary:hover { background: #2a2a4a; }
.btn-sm {
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 9px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-danger  { background: #ef4444; }
.btn-success { background: #22c55e; }
.btn-sm.btn-green { background: #22c55e; }
.btn-sm.btn-red   { background: #ef4444; }

/* KPIs */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.kpi-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.2rem;
  border-left: 4px solid #6366f1;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.kpi-label { font-size: 0.78rem; color: #888; margin-bottom: 6px; }
.kpi-value { font-size: 1.8rem; font-weight: 700; color: #1a1a2e; }

/* MESAS */
.mesas-filtros {
  display: flex;
  gap: 6px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.mesa-filtro-btn {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  color: #374151;
  transition: all .15s;
}
.mesa-filtro-btn:hover { background: #f1f5f9; }
.mesa-filtro-btn.active                    { background:#1a1a2e; color:#fff; border-color:#1a1a2e; }
.mesa-filtro-btn.active[data-estado="libre"]     { background:#16a34a; border-color:#16a34a; }
.mesa-filtro-btn.active[data-estado="ocupada"]   { background:#d97706; border-color:#d97706; }
.mesa-filtro-btn.active[data-estado="con_pedido"]{ background:#7c3aed; border-color:#7c3aed; }

.mesa-filtro-badge {
  display: inline-block;
  background: rgba(255,255,255,0.25);
  color: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 5px;
  vertical-align: middle;
}
.mesa-filtro-btn:not(.active) .mesa-filtro-badge {
  background: #e2e8f0;
  color: #374151;
}

/* ── Pacing badge (tiempo en mesa) ─────────────────────────────────────────── */
.mesa-pacing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 8px;
  border-radius: 10px;
  margin-top: 5px;
  width: 100%;
}
.mesa-pacing-hora {
  font-size: 0.72rem;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 3px;
  opacity: 0.85;
}
.mesa-pacing-tiempo {
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 3px;
}
.mesa-pacing.verde { background: #dcfce7; color: #166534; }
.mesa-pacing.ambar { background: #fef3c7; color: #92400e; }
.mesa-pacing.rojo  { background: #dc2626; color: #ffffff; }

/* ── Modal items estado ─────────────────────────────────────────────────────── */
#modal-items-estado .modal-body { padding: 0; }
.items-estado-list { list-style: none; margin: 0; padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.items-estado-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #f9fafb; border-radius: 8px; }
.items-estado-nombre { flex: 1; font-size: 0.85rem; font-weight: 500; display: flex; flex-direction: column; gap: 2px; }
.ie-extras { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.ie-sin   { font-size: 0.72rem; color: #ef4444; }
.ie-mod   { font-size: 0.72rem; color: #16a34a; }
.ie-punto { font-size: 0.72rem; color: #d97706; }
.ie-nota  { font-size: 0.72rem; color: #6b7280; font-style: italic; }
.items-estado-qty { font-size: 0.78rem; color: #6b7280; min-width: 28px; }
.item-estado-btn {
  font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 20px;
  border: none; cursor: pointer; transition: all .15s; white-space: nowrap;
}
.item-estado-btn.enviado   { background: #e0e7ff; color: #3730a3; }
.item-estado-btn.preparando { background: #fef3c7; color: #92400e; }
.item-estado-btn.listo     { background: #dcfce7; color: #166534; }
.item-estado-btn:hover { filter: brightness(0.92); }

/* ── Food Cost badges ───────────────────────────────────────────────────────── */
.fc-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  vertical-align: middle;
}
.fc-verde { background: #dcfce7; color: #166534; }
.fc-ambar { background: #fef3c7; color: #92400e; }
.fc-rojo  { background: #fee2e2; color: #991b1b; }
.fc-resultado {
  margin-top: 6px;
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.mesas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
/* ── Tabs de Salón ─────────────────────────────────────────────────────────── */
#salones-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.salon-tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  border: 2px solid #e2e8f0;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  color: #374151;
  transition: all .15s;
}
.salon-tab-btn .salon-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.salon-tab-btn:hover { background: #f1f5f9; }
.salon-tab-btn.active {
  color: #fff;
  border-color: transparent;
}
/* badge de salón en mesa card */
.mesa-salon-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 10px;
  color: #fff;
  margin-top: 4px;
  display: inline-block;
}
/* Config mesas: lista de mesas con asignación */
.cfg-mesa-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  margin-bottom: 6px;
}
.cfg-mesa-row .mesa-num-badge {
  font-weight: 700;
  min-width: 32px;
  text-align: center;
}
/* ─── MOSTRADOR ─────────────────────────────────────────────────────────────── */
.btn-mostrador {
  background: transparent;
  color: #64748b;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  padding: 5px 14px;
  font-weight: 500;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-mostrador:hover { background: #cbd5e1; color: #1a1a2e; }
.most-pago-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  background: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.most-pago-btn.active {
  background: #1e1e2e;
  color: #fff;
  border-color: #1e1e2e;
}
/* ─────────────────────────────────────────────────────────────────────────── */

/* ─── KDS — Pantalla de Producción ─────────────────────────────────────────── */
.kds-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.kds-tab-btn {
  padding: 8px 20px;
  border-radius: 20px;
  border: 2px solid #e5e7eb;
  background: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
}
.kds-tab-btn.active {
  background: #1e1e2e;
  color: #fff;
  border-color: #1e1e2e;
}
.kds-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
#exp-container {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.kds-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 60px 20px;
  font-size: 1.1rem;
  color: #6b7280;
  font-weight: 600;
}
.kds-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  overflow: hidden;
  border: 2px solid #e5e7eb;
  transition: opacity 0.3s;
}
.kds-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #1e1e2e;
  color: #fff;
}
.kds-mesa {
  font-size: 1.1rem;
  font-weight: 700;
  flex: 1;
}
.kds-tiempo {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.15);
}
.kds-tiempo-ok     { background: rgba(34,197,94,0.25); }
.kds-tiempo-medio  { background: rgba(245,158,11,0.35); }
.kds-tiempo-urgente{ background: rgba(239,68,68,0.35); animation: kds-pulse 1s infinite; }
@keyframes kds-pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.6; }
}
.kds-todo-listo {
  background: #22c55e;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.kds-todo-listo:hover { background: #16a34a; }
.kds-obs {
  padding: 6px 14px;
  background: #fef9c3;
  font-size: 0.82rem;
  color: #854d0e;
  border-bottom: 1px solid #fde68a;
}
.kds-items { padding: 8px 0; }
.kds-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-bottom: 1px solid #f1f5f9;
  transition: opacity 0.3s;
}
.kds-item:last-child { border-bottom: none; }
.kds-item-qty {
  font-weight: 700;
  font-size: 1rem;
  min-width: 28px;
  color: #6366f1;
}
.kds-item-nombre {
  flex: 1;
  font-size: 0.9rem;
}
.kds-item-nota {
  font-size: 0.78rem;
  color: #9ca3af;
  font-style: italic;
}
.kds-item-listo-btn {
  background: #f0fdf4;
  border: 2px solid #22c55e;
  color: #16a34a;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}
.kds-item-listo-btn:hover { background: #22c55e; color: #fff; }
/* ─────────────────────────────────────────────────────────────────────────── */

/* Traslado de consumos */
.btn-traslado {
  background: #f59e0b;
  color: #fff;
  border: none;
}
.btn-traslado:hover { background: #d97706; }
.traslado-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
}
.traslado-item-row:last-child { border-bottom: none; }
.traslado-item-nombre { flex: 1; font-size: 0.88rem; }
.traslado-item-precio { font-size: 0.82rem; color: #6b7280; white-space: nowrap; }
/* ─────────────────────────────────────────────────────────────────────────── */

/* POS — buscador de productos */
.pos-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}
.pos-search-icon { font-size: 0.9rem; color: #9ca3af; flex-shrink: 0; }
.pos-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.88rem;
  color: #1a1a2e;
  background: transparent;
  padding: 2px 0;
}
.pos-search-input::placeholder { color: #9ca3af; }
.pos-search-clear {
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 0.85rem;
  padding: 2px 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pos-search-clear:hover { color: #ef4444; background: #fee2e2; }

/* ── PLANO DEL SALÓN ──────────────────────────────────────────── */
.plano-canvas {
  position: relative;
  width: 100%;
  padding-bottom: 58%;   /* aspect ratio 1.72:1 — salón rectangular */
  background: #f9fafb;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  cursor: default;
  /* Patrón de cuadrícula sutil */
  background-image:
    linear-gradient(rgba(0,0,0,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.04) 1px, transparent 1px);
  background-size: 40px 40px;
}
.plano-canvas.modo-edicion {
  cursor: move;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.plano-mesa {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  user-select: none;
  transition: transform 0.1s, box-shadow 0.1s;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
  width: 70px;
  height: 70px;
  transform: translate(-50%, -50%);  /* centrado en pos_x/pos_y */
}
.plano-mesa:hover { transform: translate(-50%, -50%) scale(1.08); box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.plano-mesa.cuadrada { border-radius: 10px; }
.plano-mesa.redonda  { border-radius: 50%; }
.plano-mesa.libre    { background: #22c55e; }
.plano-mesa.ocupada  { background: #f97316; }
.plano-mesa.con_pedido { background: #ef4444; }
.plano-mesa.libre:hover    { background: #16a34a; }
.plano-mesa.ocupada:hover  { background: #ea6c00; }
.plano-mesa.con_pedido:hover { background: #dc2626; }

/* En modo edición: cursor de arrastre */
.plano-canvas.modo-edicion .plano-mesa { cursor: grab; }
.plano-canvas.modo-edicion .plano-mesa:active { cursor: grabbing; transform: translate(-50%, -50%) scale(1.12); z-index: 10; }

.plano-mesa-num   { font-size: 1.1rem; font-weight: 800; line-height: 1; }
.plano-mesa-cap   { font-size: 0.62rem; opacity: 0.85; line-height: 1; margin-top: 2px; }
.plano-mesa-reserva {
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  background: rgba(99,102,241,.82);
  border-radius: 0 0 8px 8px;
  padding: 2px 4px;
  text-align: center;
  pointer-events: none;
}
.plano-mesa-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: #1a1a2e;
  color: #fff;
  border-radius: 50%;
  width: 18px; height: 18px;
  font-size: 0.6rem;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}

/* Panel de acciones al hacer click en una mesa del plano */
.plano-panel {
  position: absolute;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  z-index: 100;
  min-width: 180px;
  max-width: 240px;
}
.plano-panel-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: #1a1a2e;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 6px;
}
.plano-panel-estado {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 8px;
  font-weight: 600;
}
.plano-panel-btns { display: flex; flex-direction: column; gap: 5px; }
.plano-panel-btns .btn-sm { justify-content: center; text-align: center; }

/* Selector de forma en modo edición */
.forma-toggle {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}
.forma-btn {
  flex: 1;
  padding: 4px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.forma-btn.active {
  border-color: #6366f1;
  background: #eef2ff;
  color: #4338ca;
  font-weight: 600;
}
/* ── fin plano ────────────────────────────────────────────────── */
.mesa-card {
  background: #fff;
  border-radius: 14px;
  padding: 1.3rem 1rem;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: transform 0.1s;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.mesa-card:active { transform: scale(0.97); }
.mesa-card:hover { transform: scale(1.02); }
.mesa-card.libre { border-color: #22c55e; }
.mesa-card.ocupada { border-color: #f97316; }
.mesa-card.con_pedido { border-color: #ef4444; }
.mesa-numero { font-size: 1.8rem; font-weight: 700; }
.mesa-estado { font-size: 0.8rem; color: #888; }
.estado-badge {
  display: inline-block;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 0.72rem;
  font-weight: 600;
}
.estado-nuevo      { background: #fef3c7; color: #92400e; }
.estado-en_cocina  { background: #dbeafe; color: #1e40af; }
.estado-preparando { background: #ede9fe; color: #5b21b6; }
.estado-listo      { background: #dcfce7; color: #166534; }
.estado-entregado  { background: #d1fae5; color: #065f46; }
.estado-pagado     { background: #f3f4f6; color: #6b7280; }
.estado-cancelado  { background: #fee2e2; color: #dc2626; }
.estado-pendiente_aprobacion { background: #fed7aa; color: #9a3412; }

/* TABLES */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th { background: #f8f8ff; padding: 12px 14px; text-align: left; font-weight: 600; color: #1a1a2e; border-bottom: 1px solid #e5e7eb; }
.data-table td { padding: 14px 14px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafafa; }

/* CATS */
.cats-list { display: flex; flex-direction: column; gap: 10px; }
.cat-row {
  background: #fff;
  border-radius: 8px;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.cat-color-dot { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; }
.cat-nombre { flex: 1; font-weight: 600; }

/* MOZOS */
.mozos-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.mozo-card {
  background: #1e2240;
  border: 1px solid #3b3f5c;
  border-radius: 12px;
  padding: 1.2rem;
}
.mozo-nombre { font-size: 1rem; font-weight: 700; color: #f1f5f9; }
.mozo-cargo { font-size: 0.8rem; color: #a5b4fc; margin-bottom: 8px; }
.mozo-detail { font-size: 0.8rem; color: #94a3b8; margin-top: 4px; }

/* IMAGEN DRAG & DROP */
.img-dropzone {
  width: 100%;
  min-height: 180px;
  border: 2px dashed #ccc;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: #fafafa;
  overflow: hidden;
  position: relative;
}
.img-dropzone:hover { border-color: #6366f1; background: #f5f5ff; }
.img-dropzone-drag { border-color: #6366f1 !important; background: #ede9fe !important; }
.img-dropzone-tiene { border-style: solid; border-color: #d1d5db; min-height: 200px; }
.img-dropzone-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #aaa;
  font-size: 0.85rem;
  pointer-events: none;
  text-align: center;
  padding: 1rem;
}
.img-dropzone-icon { font-size: 2.5rem; }
.img-dropzone-sub { font-size: 0.75rem; color: #ccc; }
.img-dropzone-preview {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

/* STATS */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.stat-card { background: #fff; border-radius: 12px; padding: 1.2rem; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.stat-card h3 { font-size: 1rem; margin-bottom: 1rem; color: #1a1a2e; }
.bar-chart { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-label { font-size: 0.8rem; width: 100px; color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; background: #f0f0f0; border-radius: 4px; height: 16px; overflow: hidden; }
.bar-fill { height: 100%; background: #6366f1; border-radius: 4px; transition: width 0.5s; }
.bar-value { font-size: 0.8rem; color: #555; width: 60px; text-align: right; }

/* REPORTES GRID */
.reporte-filtro-card {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
}
.reportes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 0;
}
@media (max-width: 1300px) {
  .reportes-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .reportes-grid { grid-template-columns: 1fr; }
  #dash-lower { grid-template-columns: 1fr !important; }
  #bi-canal-grid { grid-template-columns: 1fr !important; }
}

/* REPORTE MOZOS */
.reporte-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
}
.reporte-rango {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.btn-periodo {
  background: #f0f0f0;
  color: #444;
  border: 1px solid #ddd;
}
.btn-periodo.active {
  background: #1a1a2e;
  color: #fff;
  border-color: #1a1a2e;
}
.reporte-mozo-tabla { margin-top: 4px; }
.reporte-mozo-tabla tfoot td {
  padding-top: 8px;
  font-size: 0.95rem;
}

/* HISTORIAL DE REAPERTURAS */
.reabrir-log-seccion {
  margin-top: 14px;
  border-top: 1px solid #f0e6e6;
  padding-top: 10px;
}
.reabrir-log-titulo {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #c2410c;
  margin-bottom: 8px;
}
.reabrir-log-entry {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 0.82rem;
}
.reabrir-log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.reabrir-log-fecha {
  font-size: 0.75rem;
  color: #888;
}
.reabrir-log-motivo {
  color: #78350f;
  line-height: 1.5;
}

/* BOTÓN REABRIR PEDIDO */
.btn-reabrir {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.btn-reabrir:hover {
  background: #ffedd5;
  border-color: #c2410c;
}

/* CERRAR CUENTA MODAL */
.cc-modal { max-width: 420px; }
.cc-titulo { font-size: 1.1rem; margin-bottom: 4px; }
.cc-hora { font-size: 0.78rem; color: #aaa; margin-bottom: 12px; }
.cc-items { border-top: 1px solid #eee; margin: 10px 0 4px; }
.cc-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 4px 0;
  border-bottom: 1px solid #f5f5f5;
  color: #555;
}
.cc-total-linea {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
  padding: 8px 0 4px;
  border-top: 2px solid #eee;
  margin-top: 4px;
}
.cc-total-final {
  border-top: 1px dashed #ddd;
  margin-top: 6px;
  font-size: 1.1rem;
  color: #22c55e;
}
.cc-seccion-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #aaa;
  margin: 14px 0 8px;
}
.cc-pago-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cc-pago-btn {
  flex: 1;
  min-width: 100px;
  min-height: 52px;
  padding: 0.75rem 0.5rem;
  border: 2px solid #ddd;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 0.95rem;
  text-align: center;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cc-pago-btn:hover { border-color: #6366f1; background: #f5f3ff; }
.cc-pago-btn:active { transform: scale(0.97); }
.cc-pago-btn.active { border-color: #1a1a2e; background: #1a1a2e; color: #fff; }
.cc-pago-btn--mp { border-color: #009ee3; color: #009ee3; }
.cc-pago-btn--mp:hover { background: #e0f4ff; border-color: #0077b5; }
.cc-pago-btn--mp.active { background: #009ee3; border-color: #009ee3; color: #fff; }
.cc-propina-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cc-prop-btn {
  min-height: 44px;
  padding: 0.6rem 1rem;
  border: 2px solid #ddd;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
}
.cc-prop-btn:hover { border-color: #f59e0b; }
.cc-prop-btn:active { transform: scale(0.97); }
.cc-prop-btn.active { border-color: #f59e0b; background: #fef3c7; color: #92400e; }
/* Descuento */
.cc-descuento-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.cc-desc-btn {
  min-height: 38px;
  padding: 0.45rem 0.9rem;
  border: 2px solid #ddd;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 0.88rem;
  transition: all 0.15s;
}
.cc-desc-btn:hover  { border-color: #10b981; }
.cc-desc-btn.active { border-color: #10b981; background: #d1fae5; color: #065f46; }
.cc-prop-libre { color: #6366f1; border-color: #e0e7ff; }
.cc-propina-resumen {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #f59e0b;
  margin-top: 8px;
  padding: 4px 0;
}
.cc-confirmar { font-size: 1.05rem; padding: 1rem; min-height: 52px; }

/* NAV GROUPS */
.nav-group-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #4a4a6a;
  padding: 1rem 1.2rem 0.3rem;
  margin-top: 0.2rem;
  user-select: none;
}
.nav-group-label:first-child { padding-top: 0.5rem; }

/* ── Badge de plan en sidebar ───────────────────────────────────────────── */
.sidebar-plan-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  padding: 5px 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  width: 100%;
}

/* ── Items de nav bloqueados por plan ───────────────────────────────────── */
.nav-link.plan-locked {
  opacity: 0.42;
  cursor: not-allowed !important;
}
.nav-link.plan-locked:hover {
  background: transparent !important;
  color: inherit !important;
}
.plan-lock-badge {
  margin-left: auto;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

/* ── Modal de planes ─────────────────────────────────────────────────────── */
.plan-modal-box {
  position: relative;
  background: #16162a;
  border: 1px solid #2d2d4e;
  border-radius: 18px;
  padding: 2.2rem;
  max-width: 900px;
  width: 96%;
  z-index: 1;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  max-height: 92vh;
  overflow-y: auto;
}
.plan-modal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 700px) {
  .plan-modal-grid { grid-template-columns: repeat(2, 1fr); }
}
.plan-card {
  background: #1e2240;
  border: 1px solid #3b3f5c;
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
  transition: border-color 0.2s;
  display: flex;
  flex-direction: column;
}
.plan-card-highlight {
  border-color: #6366f1;
  box-shadow: 0 0 0 1px #6366f1;
}
.plan-card-current {
  background: #1e2240;
}
.plan-card-name {
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.plan-card-price {
  font-size: .8rem;
  color: #94a3b8;
  margin-bottom: 14px;
  font-weight: 600;
  padding-bottom: 12px;
  border-bottom: 1px solid #3b3f5c;
}
.plan-card-features {
  font-size: .78rem;
  color: #cbd5e1;
  text-align: left;
  line-height: 1.9;
  flex: 1;
}
.plan-card-features li { list-style: none; }
.plan-card-features li::before { content: ''; margin-right: 5px; }
.plan-card-features .feat-yes::before { content: '✓'; color: #4ade80; }
.plan-card-features .feat-no::before  { content: '—'; color: #444; }
.plan-card-tag {
  display: inline-block;
  margin-top: 12px;
  font-size: .68rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 10px;
  background: #2d2d4e;
  color: #a5b4fc;
}

/* ── Módulos Premium ─────────────────────────────────────────────────────── */
.nav-link-premium { color: #fbbf24; }
.nav-link-premium:hover { background: #2a2010; color: #fcd34d; }
.nav-link-premium.active { background: #2a2010; color: #fcd34d; border-left-color: #f59e0b; }
.nav-pro-badge {
  margin-left: auto;
  background: #f59e0b;
  color: #1a1a1a;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 8px;
  flex-shrink: 0;
}
.nav-link-premium.modulo-activo { color: #4ade80; }
.nav-link-premium.modulo-activo:hover { background: #0a2010; color: #4ade80; }
.nav-link-premium.modulo-activo.active { background: #0a2010; border-left-color: #22c55e; }
.nav-pro-badge.activo { background: #22c55e; color: #fff; }

/* CONFIG TABS */
.config-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.config-tabs::-webkit-scrollbar { display: none; }
.config-tab {
  padding: 0.5rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: #6b7280;
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.config-tab:hover { color: #1a1a2e; }
.config-tab.active { color: #4f46e5; border-bottom-color: #4f46e5; }
.config-tab-panel { display: none; }
.config-tab-panel.active { display: block; }

/* CONFIG */
.config-form { background: #fff; border-radius: 12px; padding: 1.5rem; max-width: 600px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.config-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #1a1a2e;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 4px;
  margin: 1.4rem 0 0.8rem;
}
.config-section-title:first-child { margin-top: 0; }

#sidebar-rest-nombre {
  font-family: Georgia, serif;
  letter-spacing: 2px;
  font-size: 1.05rem;
  color: #fff;
}
.sidebar-by-cardeus {
  font-size: 0.58rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #4a4a6a;
  margin-top: 3px;
}

/* NOTIFICACIONES CUENTA */
#notif-cuenta-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.notif-cuenta {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: 12px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(245,158,11,0.45);
  animation: notifSlideIn 0.3s ease, notifPulse 1.5s ease-in-out 3;
  color: #1a1a1a;
}
@keyframes notifSlideIn {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes notifPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(245,158,11,0.45); }
  50%       { box-shadow: 0 4px 36px rgba(245,158,11,0.85); }
}
.notif-cuenta-icono { font-size: 2.4rem; flex-shrink: 0; }
.notif-cuenta-texto {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.notif-cuenta-texto strong { font-size: 1.25rem; font-weight: 800; color: #1a1a1a; }
.notif-cuenta-texto span   { font-size: 1.1rem; font-weight: 500; color: #292524; }
.notif-cuenta-aviso { display: block; font-size: 0.82rem !important; font-weight: 700 !important; color: #92400e !important; margin-top: 2px; }
.notif-cuenta-cerrar {
  background: rgba(0,0,0,0.15);
  border: none;
  color: #1a1a1a;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 8px;
  transition: background 0.15s;
}
.notif-cuenta-cerrar:hover { background: rgba(0,0,0,0.25); }
/* DETALLE PEDIDO */
.btn-detalle-pedido {
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 8px 12px;
  min-height: 44px;
  transition: background 0.15s;
  display: inline-flex;
  align-items: center;
}
.btn-detalle-pedido:hover { background: #f3f4f6; }
.detalle-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.9rem;
}
.detalle-item:last-child { border-bottom: none; }
.detalle-item-qty  { font-weight: 700; color: #6366f1; min-width: 28px; }
.detalle-item-nombre { flex: 1; }
.detalle-item-precio { color: #6b7280; min-width: 50px; text-align: right; }
.btn-cancelar-item {
  background: none;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  color: #ef4444;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 12px;
  min-height: 44px;
  transition: background 0.15s;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}
.btn-cancelar-item:hover { background: #fee2e2; }
.detalle-total {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 2px solid #e5e7eb;
  font-weight: 700;
  font-size: 1.05rem;
  text-align: right;
}

.notif-mozo {
  background: linear-gradient(135deg, #16a34a, #15803d);
  box-shadow: 0 4px 20px rgba(22,163,74,0.45);
  animation: notifSlideIn 0.3s ease, notifPulsoVerde 1.5s ease-in-out 3;
}
@keyframes notifPulsoVerde {
  0%, 100% { box-shadow: 0 4px 20px rgba(22,163,74,0.45); }
  50%       { box-shadow: 0 4px 36px rgba(22,163,74,0.85); }
}

.notif-reserva {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  box-shadow: 0 4px 20px rgba(14,165,233,0.45);
  animation: notifSlideIn 0.3s ease, notifPulsoAzul 1.5s ease-in-out 3;
}
@keyframes notifPulsoAzul {
  0%, 100% { box-shadow: 0 4px 20px rgba(14,165,233,0.45); }
  50%       { box-shadow: 0 4px 36px rgba(14,165,233,0.85); }
}
.notif-espera {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 4px 20px rgba(220,38,38,0.45);
  animation: notifSlideIn 0.3s ease, notifPulsoRojo 1.5s ease-in-out 3;
}
@keyframes notifPulsoRojo {
  0%, 100% { box-shadow: 0 4px 20px rgba(220,38,38,0.45); }
  50%       { box-shadow: 0 4px 36px rgba(220,38,38,0.85); }
}

/* Badge de alertas en nav */
.nav-alerta-badge {
  display: inline-block; background: #dc2626; color: #fff;
  font-size: 0.65rem; font-weight: 800; border-radius: 10px;
  padding: 1px 6px; margin-left: 6px; vertical-align: middle; line-height: 1.4;
  animation: notifPulsoRojo 1s ease-in-out infinite;
}

/* MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #fff;
  border-radius: 14px;
  padding: 1.8rem;
  width: 560px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.modal-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 1rem; }

/* TOOLBAR */
.toolbar { display: flex; gap: 10px; margin-bottom: 1rem; align-items: center; flex-wrap: wrap; }
.toolbar .form-select { width: auto; }

/* QR */
.qr-img { border: 8px solid #fff; border-radius: 8px; display: block; margin: 1rem auto; }

/* COBRAR MESA: botón en mesa-card */
.btn-cobrar-mesa {
  background: #1d4ed8;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.btn-cobrar-mesa:hover { background: #1e40af; }
.btn-cobrar-mesa:active { background: #1e3a8a; }

/* COBRAR MESA: modal lista de pedidos */
.cob-lista {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
  /* Sin max-height: el modal-box ya tiene 90vh overflow-y:auto.
     Un scroll anidado cortaba los ítems cuando había muchas rondas. */
}
.cob-pedido {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}
.cob-pedido-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #f9fafb;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  min-height: 52px;
}
.cob-pedido-header input[type="checkbox"] {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #1d4ed8;
}
.cob-hora {
  font-size: 0.8rem;
  color: #6b7280;
  font-weight: 400;
}
.cob-subtotal {
  margin-left: auto;
  font-weight: 700;
  color: #111;
  font-size: 1rem;
}
.cob-items-det {
  padding: 8px 14px 12px 48px;
  background: #fff;
}
.cob-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #374151;
  padding: 3px 0;
}

/* ── TICKET CAJERO PREVIEW ───────────────────────────────── */
.btn-secondary {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: #374151;
  transition: background 0.15s;
}
.btn-secondary:hover { background: #e5e7eb; }

.tck-preview {
  background: #fff;
  border: 1px dashed #aaa;
  border-radius: 10px;
  padding: 16px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  color: #111;
  max-height: 52vh;
  overflow-y: auto;
}
.tck-header { text-align: center; margin-bottom: 6px; }
.tck-rest-nombre { font-size: 15px; font-weight: bold; }
.tck-rest-dato   { font-size: 10px; color: #444; margin-top: 1px; }
.tck-sep  { text-align: center; color: #888; margin: 5px 0; letter-spacing: 1px; font-size: 10px; }
.tck-meta { text-align: center; font-size: 11px; margin: 3px 0; }
.tck-ronda {
  font-size: 10px;
  color: #6b7280;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 6px 0 2px;
}
.tck-item {
  display: flex;
  gap: 4px;
  margin: 2px 0;
  font-size: 12px;
}
.tck-item-cant  { flex-shrink: 0; color: #555; }
.tck-item-nombre { flex: 1; }
.tck-item-precio { flex-shrink: 0; text-align: right; }
.tck-linea {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #555;
  margin: 2px 0;
}
.tck-total {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  font-weight: bold;
  margin: 5px 0 3px;
}
.tck-pago   { text-align: center; font-size: 11px; margin: 4px 0; }
.tck-footer { text-align: center; font-size: 10px; color: #888; margin-top: 6px; }

/* ── PAGO DIVIDIDO ─────────────────────────────────────────── */
.cc-split-toggle {
  background: #f9fafb;
  border: 1px dashed #9ca3af;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s;
}
.cc-split-toggle:hover { background: #f3f4f6; border-color: #6366f1; color: #6366f1; }

.split-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.split-row {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  background: #fafafa;
}
.split-row-header {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6b7280;
  margin-bottom: 8px;
}
.split-monto-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.split-ctrl-btn {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  color: #374151;
}
.split-ctrl-btn:hover { background: #e5e7eb; }
.split-ctrl-btn.danger { color: #ef4444; border-color: #fca5a5; }
.split-ctrl-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.cob-items-ronda {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #6b7280;
  text-transform: uppercase;
  margin: 6px 0 2px;
}

.tck-pago-resumen {
  font-size: 0.88rem;
  padding: 4px 0;
  border-bottom: 1px solid #f3f4f6;
}
.tck-pago-resumen:last-child { border-bottom: none; }

/* ── NOTIFICACIÓN TICKET DESDE MOZO ──────────────────────── */
.notif-ticket {
  border-left: 4px solid #7c3aed;
  background: #faf5ff;
}
.notif-ticket-print {
  background: #7c3aed;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s;
}
.notif-ticket-print:hover { background: #6d28d9; }

/* ── CAJA ────────────────────────────────────────────────── */
.caja-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.caja-kpi {
  background: #f8fafc;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  border-left: 3px solid #e2e8f0;
}
.caja-kpi--total {
  border-left-color: #6366f1;
  background: #eef2ff;
}
.caja-kpi-label {
  font-size: 0.72rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}
.caja-kpi-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a2e;
}

/* ── ALÉRGENOS ───────────────────────────────────────────── */
.alerg-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.alerg-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  font-size: 0.8rem;
  color: #64748b;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
}
.alerg-pill:hover { border-color: #94a3b8; }
/* ── AGENDA DE RESERVAS ─────────────────────────────────────────────── */
.agenda-vista-btns {
  display: flex;
  gap: 3px;
  background: #e2e8f0;
  padding: 3px;
  border-radius: 8px;
}
.agenda-vista-btn {
  padding: 5px 14px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.agenda-vista-btn:hover { background: #cbd5e1; color: #1a1a2e; }
.agenda-vista-btn.active {
  background: #fff;
  color: #1a1a2e;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
  font-weight: 600;
}

/* ── Día view ─────────────────────── */
.agenda-dia-container {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}
.agenda-slot {
  display: flex;
  min-height: 48px;
  border-bottom: 1px solid #f1f5f9;
}
.agenda-slot:last-child { border-bottom: none; }
.agenda-slot:hover { background: #fafafa; }
.agenda-slot-time {
  width: 62px;
  flex-shrink: 0;
  padding: 12px 8px 12px 14px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #94a3b8;
  border-right: 1px solid #f1f5f9;
  display: flex;
  align-items: flex-start;
}
.agenda-slot-cards {
  flex: 1;
  padding: 6px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: flex-start;
}
.agenda-res-card {
  border-radius: 8px;
  padding: 7px 11px;
  cursor: pointer;
  min-width: 170px;
  max-width: 310px;
  transition: transform 0.1s, box-shadow 0.1s;
}
.agenda-res-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,.14);
}
.agenda-card-hora {
  font-size: 0.68rem;
  font-weight: 700;
  opacity: 0.6;
  margin-bottom: 1px;
}
.agenda-card-nombre {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.agenda-card-info { font-size: 0.76rem; opacity: 0.8; }
.agenda-card-notas {
  font-size: 0.71rem;
  opacity: 0.6;
  margin-top: 2px;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 270px;
}
.agenda-card-estado {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 4px;
  opacity: 0.65;
  letter-spacing: 0.03em;
}
.agenda-dia-vacia {
  padding: 3rem 1rem;
  text-align: center;
  color: #94a3b8;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  font-size: 0.95rem;
}

/* ── Semana view ──────────────────── */
.semana-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}
.semana-col {
  border-right: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.1s;
  min-height: 140px;
}
.semana-col:last-child { border-right: none; }
.semana-col:hover { background: #f8fafc; }
.semana-col-header {
  padding: 8px 4px;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
  background: #f8fafc;
}
.semana-hoy-header {
  background: #1a1a2e !important;
}
.semana-dow {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.04em;
}
.semana-hoy-header .semana-dow { color: #8080a0; }
.semana-dnum {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.2;
  margin-top: 1px;
}
.semana-hoy-header .semana-dnum { color: #fff; }
.semana-col-body {
  padding: 5px 3px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.semana-res-chip {
  border-radius: 4px;
  padding: 3px 5px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.1s;
}
.semana-res-chip:hover { opacity: 0.8; }
.chip-hora {
  font-size: 0.65rem;
  font-weight: 700;
  opacity: 0.7;
  line-height: 1;
}
.chip-nombre {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
}
.semana-empty {
  text-align: center;
  color: #e2e8f0;
  font-size: 1.2rem;
  padding: 1rem 0;
}

/* ── fin agenda ─────────────────── */

.alerg-pill-on {
  border-color: #f97316;
  background: #fff7ed;
  color: #c2410c;
  font-weight: 600;
}

/* ── POS OVERLAY ───────────────────────────────────────────────────── */
#pos-overlay {
  position: fixed;
  inset: 0;
  background: #f1f5f9;
  z-index: 900;
  display: flex;
  flex-direction: column;
}
.pos-header {
  background: #1a1a2e;
  color: #fff;
  padding: .9rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}
.pos-back-btn {
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  flex-shrink: 0;
}
.pos-back-btn:hover { background: rgba(255,255,255,.22); }
.pos-header-title {
  flex: 1;
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pos-cart-badge {
  background: #6366f1;
  color: #fff;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  flex-shrink: 0;
}
.pos-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Menú izquierdo */
.pos-menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  position: relative;
  border-right: 1px solid #e2e8f0;
  min-width: 0;
}
.pos-cats {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.pos-cats::-webkit-scrollbar { display: none; }
/* Wrapper de tabs con flechas */
.pos-cats-wrap {
  position: relative;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}
.pos-cats-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 2px 6px #0001;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: none; /* ocultas por defecto, JS las muestra */
  align-items: center;
  justify-content: center;
  color: #374151;
  padding: 0;
  transition: opacity .15s;
}
.pos-cats-arrow:hover { background: #f1f5f9; }
.pos-cats-arrow-l { left: 4px; }
.pos-cats-arrow-r { right: 4px; }
.pos-cat-btn {
  padding: 7px 18px;
  border-radius: 20px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
  flex-shrink: 0;
}
.pos-cat-btn:hover { border-color: #6366f1; color: #4338ca; }
.pos-cat-btn.active {
  background: #1a1a2e;
  color: #fff;
  border-color: #1a1a2e;
  font-weight: 600;
}
.pos-products {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  align-content: start;
}
.pos-prod-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 8px;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}
.pos-prod-card:hover {
  border-color: #6366f1;
  box-shadow: 0 2px 10px rgba(99,102,241,.18);
  transform: translateY(-1px);
}
.pos-prod-card.agotado {
  opacity: .4;
  cursor: not-allowed;
  pointer-events: none;
}
.pos-prod-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: #f1f5f9;
  margin-bottom: 4px;
}
.pos-prod-img-placeholder {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 4px;
}
.pos-prod-nombre {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1a1a2e;
  line-height: 1.2;
}
.pos-prod-precio {
  font-size: 0.88rem;
  font-weight: 700;
  color: #6366f1;
}
.pos-prod-agotado-badge {
  position: absolute;
  top: 6px; right: 6px;
  background: #ef4444;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
}
.pos-prod-en-carrito {
  position: absolute;
  top: 6px; left: 6px;
  background: #6366f1;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
}

/* Carrito derecho */
.pos-cart {
  width: 310px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.pos-cart-header {
  padding: .8rem 1rem;
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: 1px solid #f1f5f9;
  color: #1a1a2e;
  flex-shrink: 0;
}
.pos-cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
}
.pos-cart-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 0;
  border-bottom: 1px solid #f8fafc;
}
.pos-cart-item-nombre {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pos-qty-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.pos-qty-btn {
  width: 24px;
  height: 24px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}
.pos-qty-btn:hover { border-color: #6366f1; color: #4338ca; }
.pos-qty-num {
  font-size: 0.88rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}
.pos-cart-item-precio {
  font-size: 0.82rem;
  font-weight: 600;
  color: #6366f1;
  min-width: 55px;
  text-align: right;
  flex-shrink: 0;
}
.pos-cart-item-del {
  border: none;
  background: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: 0.9rem;
  padding: 2px 4px;
  border-radius: 4px;
}
.pos-cart-item-del:hover { color: #ef4444; background: #fee2e2; }
.pos-cart-item-edit {
  border: none; background: none; cursor: pointer;
  color: #6366f1; font-size: 0.9rem; padding: 2px 4px; border-radius: 4px;
}
.pos-cart-item-edit:hover { background: #eef2ff; }

/* Tags de personalización en carrito */
.pos-custom-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.pos-custom-tag {
  font-size: 0.68rem; padding: 1px 6px; border-radius: 10px; font-weight: 600;
}
.pos-custom-tag.sin   { background: #fee2e2; color: #dc2626; }
.pos-custom-tag.mas   { background: #dcfce7; color: #16a34a; }
.pos-custom-tag.punto { background: #fef3c7; color: #92400e; }
.pos-custom-tag.nota  { background: #f0f9ff; color: #0369a1; }

/* Modal personalización POS */
.pos-personal-group { margin-bottom: 14px; }
.pos-personal-label { font-size: 0.8rem; font-weight: 700; color: #374151; margin-bottom: 6px; }
.pos-personal-check {
  display: flex; align-items: center; gap: 8px; padding: 5px 0;
  font-size: 0.84rem; cursor: pointer;
}
.pos-personal-check input { accent-color: #6366f1; width: 15px; height: 15px; }
.pos-punto-btn {
  padding: 5px 12px; border-radius: 20px; border: 1.5px solid #e2e8f0;
  background: #f9fafb; font-size: 0.78rem; font-weight: 600; cursor: pointer;
}
.pos-punto-btn.active { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.pos-punto-btn:hover { border-color: #6366f1; }

.pos-cart-footer {
  padding: 12px;
  border-top: 1.5px solid #e2e8f0;
  flex-shrink: 0;
}
.pos-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
}
#pos-total { font-size: 1.2rem; color: #6366f1; }

/* Responsive: en pantallas angostas, el carrito va abajo */
@media (max-width: 700px) {
  .pos-body { flex-direction: column; }
  .pos-cart { width: 100%; max-height: 45vh; border-top: 2px solid #e2e8f0; }
  .pos-menu { flex: 1; }
  .pos-products { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
/* ── Menú del Día en POS ─────────────────────────────────────────── */
/* Tab especial del menú del día */
.pos-cat-menu-dia {
  background: linear-gradient(135deg, #f59e0b22, #6366f122) !important;
  border: 1.5px solid #f59e0b66 !important;
  color: #92400e !important;
}
.pos-cat-menu-dia.active {
  background: linear-gradient(135deg, #f59e0b, #6366f1) !important;
  color: #fff !important;
  border-color: transparent !important;
}
/* Tarjeta de menú del día en el grid de productos */
.pos-menu-dia-card {
  border: 2px solid #f59e0b55 !important;
  background: linear-gradient(160deg, #fffbeb, #f5f3ff) !important;
  cursor: pointer;
}
.pos-menu-dia-card:hover {
  border-color: #f59e0b !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px #f59e0b33 !important;
}
/* Modal selector de secciones */
.pos-seccion-wrap {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
}
.pos-seccion-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: #374151;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pos-seccion-platos {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pos-seccion-plato {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  color: #374151;
  transition: background .15s;
}
.pos-seccion-plato:hover { background: #e0e7ff; }
.pos-seccion-plato input { accent-color: #6366f1; width: 16px; height: 16px; flex-shrink: 0; }
/* Item de menú del día en el carrito */
.pos-cart-item-menu {
  align-items: flex-start !important;
  padding: 8px 6px !important;
}
.pos-cart-sec-line {
  font-size: 0.7rem;
  color: #9ca3af;
  padding-left: 4px;
  line-height: 1.4;
}
/* ── Variantes en form backoffice ─────────────────────────────────── */
.variante-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  padding: 8px 10px;
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}
.variante-row .form-input { margin-bottom: 0; }
.variante-row .var-activo-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  color: #6b7280;
  white-space: nowrap;
}
/* ── Selector de variante en POS ──────────────────────────────────── */
.pos-variante-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  max-height: 60vh;
  overflow-y: auto;
}
.pos-variante-opcion {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.pos-variante-opcion:has(input:checked) {
  border-color: #22c55e;
  background: #f0fdf4;
}
.pos-variante-opcion input[type="radio"] {
  accent-color: #22c55e;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.pos-variante-nombre {
  flex: 1;
  font-weight: 600;
  font-size: 1rem;
}
.pos-variante-precio {
  font-weight: 700;
  font-size: 1rem;
  color: #22c55e;
}
/* ── fin POS ──────────────────────────────────────────────────────── */

/* ── Costos Operativos ────────────────────────────────────────────── */
.op-seccion { border:1px solid #e5e7eb; border-radius:10px; margin-bottom:12px; overflow:hidden; }
.op-seccion-header {
  display:flex; justify-content:space-between; align-items:center;
  padding:12px 16px; background:#f9fafb; cursor:pointer; font-weight:600;
  font-size:0.95rem; user-select:none;
}
.op-seccion-header:hover { background:#f3f4f6; }
.op-seccion-body { padding:14px 16px; border-top:1px solid #e5e7eb; }
.op-seccion-body.cerrado { display:none; }
.op-chevron { color:#9ca3af; transition:transform .2s; flex-shrink:0; }
.op-chevron.rotado { transform:rotate(-90deg); }
.op-item-row {
  display:grid; grid-template-columns:1fr auto auto auto;
  gap:8px; align-items:center; padding:6px 0;
  border-bottom:1px solid #f3f4f6; font-size:0.85rem;
}
.op-item-row:last-child { border-bottom:none; }
.op-item-nombre { font-weight:500; }
.op-item-tipo { color:#9ca3af; font-size:0.75rem; }
.op-item-monto { font-weight:700; color:#1f2937; text-align:right; white-space:nowrap; }
.op-kpi-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-bottom:1rem; }
@media(min-width:900px){.op-kpi-grid{grid-template-columns:repeat(4,1fr);}}
.op-kpi { border-radius:10px; padding:14px 18px; display:flex; flex-direction:column; gap:4px; }
.op-kpi-icon { display:flex; align-items:center; gap:6px; font-size:0.78rem; font-weight:600; margin-bottom:2px; }
.op-kpi-val { font-size:1.1rem; font-weight:800; }
.op-kpi-sub { font-size:0.72rem; opacity:.75; }
.op-equilibrio { background:#fef3c7; border:1px solid #fde68a; border-radius:10px; padding:16px 20px; margin-bottom:1rem; }
.op-eq-grid { display:grid; grid-template-columns:1fr auto 1fr auto 1fr; gap:8px 12px; align-items:center; margin-top:10px; }
@media(max-width:700px){.op-eq-grid{grid-template-columns:1fr;}}
.op-eq-sep { font-size:1.4rem; color:#d97706; text-align:center; font-weight:300; }
.op-sug-chip {
  background:#f3f4f6; border:1px solid #e5e7eb; border-radius:20px;
  padding:4px 12px; font-size:0.78rem; cursor:pointer; color:#374151;
  transition: all .15s; white-space:nowrap;
}
.op-sug-chip:hover { background:#e0e7ff; border-color:#a5b4fc; color:#3730a3; }
.op-sug-chip.op-sug-activo { background:#4f46e5; border-color:#4f46e5; color:#fff; }

/* ── Informe Consolidado ───────────────────────────────────────────── */
.inf-kpi {
  background:#fff; border:1px solid #e5e7eb; border-radius:10px;
  padding:12px 16px;
}
.inf-kpi-label { font-size:0.72rem; color:#666; margin-bottom:4px; }
.inf-kpi-val   { font-size:1.05rem; font-weight:700; margin-bottom:3px; }
.inf-kpi-sub   { font-size:0.72rem; color:#9ca3af; }

/* ── Delivery Kanban ───────────────────────────────────────────────── */
.dv-col {
  display:flex; flex-direction:column; gap:0;
  background:#f9fafb; border-radius:12px; overflow:hidden;
  border:1px solid #e5e7eb; min-height:350px;
}
.dv-col-header {
  display:flex; align-items:center; gap:8px;
  padding:10px 14px; font-size:0.82rem; font-weight:700;
  letter-spacing:.03em; text-transform:uppercase; color:#fff;
}
.dv-col-nuevo     { background:#6366f1; }
.dv-col-preparando{ background:#f59e0b; }
.dv-col-listo     { background:#22c55e; }
.dv-col-entregado { background:#64748b; }
.dv-col-dot {
  width:8px; height:8px; border-radius:50%; background:rgba(255,255,255,0.6);
  flex-shrink:0;
}
.dv-col-count {
  margin-left:auto; background:rgba(255,255,255,0.25);
  border-radius:10px; padding:1px 8px; font-size:0.78rem;
}
.dv-col-body {
  flex:1; padding:10px; display:flex; flex-direction:column; gap:8px;
}
.dv-card {
  background:#fff; border-radius:8px; border:1px solid #e5e7eb;
  padding:10px 12px; cursor:default; transition:box-shadow .15s;
}
.dv-card:hover { box-shadow:0 2px 8px rgba(0,0,0,.1); }
.dv-card-header {
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:6px;
}
.dv-card-orden {
  font-size:0.78rem; font-weight:700; color:#6366f1;
}
.dv-card-tipo {
  font-size:0.72rem; padding:2px 7px; border-radius:10px;
  background:#f3f4f6; color:#374151;
}
.dv-card-cliente { font-size:0.88rem; font-weight:600; color:#111; margin-bottom:2px; }
.dv-card-tel     { font-size:0.76rem; color:#6b7280; margin-bottom:4px; }
.dv-card-dir     { font-size:0.75rem; color:#6b7280; margin-bottom:6px; font-style:italic; }
.dv-card-items   { font-size:0.76rem; color:#374151; margin-bottom:6px; }
.dv-card-footer  {
  display:flex; justify-content:space-between; align-items:center;
  border-top:1px solid #f3f4f6; padding-top:6px; margin-top:4px;
}
.dv-card-total   { font-size:0.88rem; font-weight:700; color:#111; }
.dv-card-tiempo  { font-size:0.72rem; color:#9ca3af; }
.dv-card-btns    { display:flex; gap:4px; margin-top:6px; }
.dv-btn-avanzar  {
  flex:1; padding:4px 0; border:none; border-radius:6px;
  background:#6366f1; color:#fff; font-size:0.76rem; cursor:pointer;
  transition:background .15s;
}
.dv-btn-avanzar:hover  { background:#4f46e5; }
.dv-btn-cancelar {
  padding:4px 8px; border:none; border-radius:6px;
  background:#fee2e2; color:#dc2626; font-size:0.76rem; cursor:pointer;
}
.dv-btn-cancelar:hover { background:#fecaca; }
.dv-empty {
  text-align:center; color:#9ca3af; font-size:0.8rem;
  padding:24px 8px; flex:1; display:flex; align-items:center;
  justify-content:center;
}

/* Historial delivery */
.dv-hist-row {
  display:flex; align-items:center; gap:12px; padding:8px 12px;
  border-bottom:1px solid #f3f4f6; font-size:0.83rem;
}
.dv-hist-row:last-child { border-bottom:none; }
.dv-hist-badge {
  font-size:0.72rem; padding:2px 8px; border-radius:10px; white-space:nowrap;
  font-weight:600;
}
.dv-badge-entregado { background:#dcfce7; color:#166534; }
.dv-badge-cancelado { background:#fee2e2; color:#991b1b; }

@media (max-width:768px) {
  #delivery-kanban { grid-template-columns:1fr 1fr; }
}
@media (max-width:480px) {
  #delivery-kanban { grid-template-columns:1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   TEMAS BACKOFFICE
   ─────────────────────────────────────────────────────────────────────────── */

/* ── TEMA CLARO ────────────────────────────────────────────────────────────── */
body.bo-claro { background: #ffffff; color: #111; }
body.bo-claro .sidebar { background: #1e293b; }
body.bo-claro .sidebar-logo { border-bottom-color: #334155; color: #fff; }
body.bo-claro .nav-link { color: #94a3b8; }
body.bo-claro .nav-link:hover { background: #334155; color: #fff; }
body.bo-claro .nav-link.active { background: #334155; color: #fff; }
body.bo-claro .logout-btn { border-top-color: #334155; }
body.bo-claro .section-title { color: #0f172a; }
body.bo-claro .form-label { color: #444; }
body.bo-claro .form-input,
body.bo-claro .form-select,
body.bo-claro .form-textarea { background: #f8fafc; border-color: #cbd5e1; color: #111; }
body.bo-claro .kpi-card { background: #f8fafc; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
body.bo-claro .kpi-value { color: #0f172a; }
body.bo-claro .kpi-label { color: #64748b; }
body.bo-claro .table-wrap { background: #f8fafc; }
body.bo-claro .data-table th { background: #f1f5f9; color: #0f172a; border-bottom-color: #e2e8f0; }
body.bo-claro .data-table td { border-bottom-color: #f1f5f9; }
body.bo-claro .data-table tr:hover td { background: #f8fafc; }
body.bo-claro .mesa-filtro-btn { background: #f8fafc; border-color: #e2e8f0; color: #374151; }
body.bo-claro .mesa-filtro-btn:hover { background: #f1f5f9; }
body.bo-claro .cfg-mesa-row { background: #f8fafc; border-color: #e2e8f0; }
body.bo-claro .config-tabs { border-bottom-color: #e2e8f0; }
body.bo-claro .config-tab { color: #555; }
body.bo-claro .config-tab.active { color: #6366f1; border-bottom-color: #6366f1; }
body.bo-claro .config-section-title { color: #374151; border-bottom-color: #e2e8f0; }
body.bo-claro .salon-tab-btn { background: #f8fafc; border-color: #e2e8f0; color: #374151; }
body.bo-claro .salon-tab-btn:hover { background: #f1f5f9; }
body.bo-claro .login-screen { background: #1e293b; }

/* ── TEMA MIDNIGHT ─────────────────────────────────────────────────────────── */
body.bo-midnight { background: #0d0e1c; color: #e2e8f0; }
body.bo-midnight .sidebar { background: #07080f; }
body.bo-midnight .sidebar-logo { border-bottom-color: #1a1b35; color: #e2e8f0; }
body.bo-midnight .nav-link { color: #8888b0; }
body.bo-midnight .nav-link:hover { background: #1a1b35; color: #e2e8f0; }
body.bo-midnight .nav-link.active { background: #1a1b35; color: #e2e8f0; }
body.bo-midnight .logout-btn { border-top-color: #1a1b35; color: #f87171; }
body.bo-midnight .section-title { color: #c0c0e0; }
body.bo-midnight .form-label { color: #94a3b8; }
body.bo-midnight .form-input,
body.bo-midnight .form-select,
body.bo-midnight .form-textarea { background: #13142b; border-color: #2d2f5a; color: #e2e8f0; }
body.bo-midnight .form-input:focus,
body.bo-midnight .form-select:focus,
body.bo-midnight .form-textarea:focus { border-color: #6366f1; }
body.bo-midnight .kpi-card { background: #13142b; box-shadow: none; border-left-color: #6366f1; }
body.bo-midnight .kpi-value { color: #e2e8f0; }
body.bo-midnight .kpi-label { color: #8888b0; }
body.bo-midnight .table-wrap { background: #13142b; box-shadow: none; }
body.bo-midnight .data-table th { background: #0d0e1c; color: #a0a0d0; border-bottom-color: #2d2f5a; }
body.bo-midnight .data-table td { border-bottom-color: #1a1b35; color: #e2e8f0; }
body.bo-midnight .data-table tr:hover td { background: #1a1b35; }
body.bo-midnight .mesa-filtro-btn { background: #13142b; border-color: #2d2f5a; color: #e2e8f0; }
body.bo-midnight .mesa-filtro-btn:hover { background: #1a1b35; }
body.bo-midnight .cfg-mesa-row { background: #13142b; border-color: #2d2f5a; }
body.bo-midnight .config-tabs { border-bottom-color: #2d2f5a; }
body.bo-midnight .config-tab { color: #8888b0; }
body.bo-midnight .config-tab:hover { color: #e2e8f0; }
body.bo-midnight .config-tab.active { color: #c4b5fd; border-bottom-color: #6366f1; }
body.bo-midnight .config-section-title { color: #a0a0d0; border-bottom-color: #2d2f5a; }
body.bo-midnight .salon-tab-btn { background: #13142b; border-color: #2d2f5a; color: #e2e8f0; }
body.bo-midnight .salon-tab-btn:hover { background: #1a1b35; }
body.bo-midnight .login-screen { background: #07080f; }
body.bo-midnight .login-box { background: #13142b; }
body.bo-midnight .login-logo { color: #e2e8f0; }
body.bo-midnight .login-sub { color: #8888b0; }

/* MODO DE ATENCIÓN */
.ma-intro { color: #666; font-size: 0.88rem; line-height: 1.5; max-width: 620px; margin-bottom: 1.25rem; }
.ma-tablet-qr-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  max-width: 620px;
  background: #f8f8fb;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 1.5rem;
}
.ma-tablet-qr-box img { border-radius: 8px; flex-shrink: 0; background: #fff; padding: 6px; }
.ma-tablet-qr-titulo { font-size: 0.92rem; font-weight: 700; color: #1a1a2e; }
.ma-tablet-qr-hint { font-size: 0.8rem; color: #666; margin-top: 4px; line-height: 1.4; }
.ma-tablet-qr-url { font-size: 0.75rem; color: #6366f1; margin-top: 8px; word-break: break-all; font-family: monospace; }
.ma-tablet-qr-nota { font-size: 0.72rem; color: #b45309; margin-top: 8px; line-height: 1.4; }
body.bo-midnight .ma-tablet-qr-box { background: #13142b; border-color: #2d2f5a; }
body.bo-midnight .ma-tablet-qr-titulo { color: #e2e8f0; }
body.bo-midnight .ma-tablet-qr-hint { color: #94a3b8; }
.ma-grid { display: flex; flex-direction: column; gap: 12px; max-width: 620px; }
.ma-card {
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  transition: opacity 0.2s;
}
.ma-card--disabled { opacity: 0.45; }
.ma-card-top { display: flex; justify-content: space-between; align-items: center; }
.ma-nivel-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #f59e0b;
  background: #f59e0b1a;
  padding: 3px 9px;
  border-radius: 20px;
}
.ma-card-label { font-size: 0.95rem; font-weight: 700; color: #1a1a2e; margin-top: 10px; }
.ma-card-hint { font-size: 0.8rem; color: #777; margin-top: 4px; line-height: 1.45; }
/* Switch (toggle) */
.ma-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.ma-switch input { opacity: 0; width: 0; height: 0; }
.ma-switch-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #d1d5db; border-radius: 24px; transition: background 0.2s;
}
.ma-switch-slider::before {
  content: ''; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.ma-switch input:checked + .ma-switch-slider { background: #22c55e; }
.ma-switch input:checked + .ma-switch-slider::before { transform: translateX(18px); }
.ma-switch input:disabled + .ma-switch-slider { cursor: not-allowed; opacity: 0.6; }

.ma-metodo-wrap {
  max-width: 620px;
  margin-top: 12px;
  padding: 12px 16px 14px;
  border: 1.5px dashed #d1d5db;
  border-radius: 12px;
  transition: opacity 0.2s;
}
.ma-metodo-wrap--disabled { opacity: 0.4; }
.ma-metodo-titulo { font-size: 0.78rem; font-weight: 700; color: #666; margin-bottom: 8px; }
.ma-metodo-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 4px;
  cursor: pointer;
}
.ma-metodo-opt input[type="radio"] { margin-top: 3px; flex-shrink: 0; cursor: pointer; }
.ma-metodo-opt-label { font-size: 0.88rem; font-weight: 700; color: #1a1a2e; }
.ma-metodo-opt-hint { font-size: 0.78rem; color: #777; margin-top: 2px; line-height: 1.4; }

body.bo-midnight .ma-metodo-wrap { border-color: #3a3c66; }
body.bo-midnight .ma-metodo-titulo { color: #94a3b8; }
body.bo-midnight .ma-metodo-opt-label { color: #e2e8f0; }
body.bo-midnight .ma-metodo-opt-hint { color: #94a3b8; }
body.bo-midnight .ma-card { border-color: #2d2f5a; }
body.bo-midnight .ma-card-label { color: #e2e8f0; }
body.bo-midnight .ma-card-hint { color: #94a3b8; }
body.bo-midnight .ma-intro { color: #94a3b8; }
body.bo-midnight .ma-switch-slider { background: #3a3c66; }
.ma-geo-input-label { display: block; font-size: 0.7rem; color: #888; margin-bottom: 3px; }
.ma-geo-input {
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.85rem;
  width: 130px;
}
.ma-geo-nota { font-size: 0.76rem; color: #888; margin-top: 8px; line-height: 1.4; }
body.bo-midnight .ma-geo-input { background: #0f0f1a; border-color: #3a3c66; color: #e2e8f0; }
body.bo-midnight .ma-geo-input-label { color: #94a3b8; }
body.bo-midnight .ma-geo-nota { color: #94a3b8; }

/* Sub-pestañas de Caja (Resumen / Historial de cobros) */
.caja-subtab-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #555;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.caja-subtab-btn-activo {
  background: #111;
  border-color: #111;
  color: #fff;
}
body.bo-midnight .caja-subtab-btn { background: #1a1c2e; border-color: #2a2c4a; color: #94a3b8; }
body.bo-midnight .caja-subtab-btn-activo { background: #6366f1; border-color: #6366f1; color: #fff; }
