:root {
  /* Diseno limpio tipo Uber: blanco, gris y un solo azul de accion. */
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #eff6ff;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

/* Modo oscuro opcional: se activa con la clase .tema-oscuro en <html>
   (switch por pantalla, guardado en el navegador). */
html.tema-oscuro {
  --bg: #0f1115;
  --surface: #171a21;
  --surface-2: #1e222b;
  --border: #2a2f3a;
  --text: #eef1f6;
  --muted: #98a2b3;
  --accent: #3b82f6;
  --accent-dark: #1d4ed8;
  --accent-soft: rgba(59, 130, 246, 0.16);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-size: 15px;
}

a {
  color: var(--accent);
}

code {
  font-family: Consolas, "Courier New", monospace;
  background: var(--surface-2);
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  font-size: 0.9em;
}

h1,
h2,
h3 {
  margin: 0 0 0.4rem;
  line-height: 1.2;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 0.5rem 0.9rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-dark);
  text-decoration: none;
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.btn--danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.38);
  color: var(--danger);
}

.btn--danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--danger);
  color: var(--danger);
}

.btn--sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.83rem;
}

.btn--block {
  width: 100%;
}

input,
select,
textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.5rem 0.6rem;
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.admin-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 700;
}

.admin-brand:hover {
  text-decoration: none;
}

.admin-brand__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(140deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
}

img.admin-brand__mark {
  display: block;
  object-fit: contain;
  background: transparent;
}

.admin-brand small {
  color: var(--muted);
  font-weight: 500;
}

.admin-nav {
  display: flex;
  gap: 0.25rem;
  flex: 1;
  flex-wrap: wrap;
}

.admin-nav a {
  color: var(--muted);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.92rem;
}

.admin-nav a:hover {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

.admin-nav a.is-active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

/* navegacion agrupada (desplegables) */
.admin-grupo { position: relative; }
.admin-grupo > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}
.admin-grupo > summary::-webkit-details-marker { display: none; }
.admin-grupo > summary::after { content: "\25BE"; font-size: 0.6rem; opacity: 0.8; }
.admin-grupo > summary:hover { background: var(--surface-2); color: var(--text); }
.admin-grupo > summary.is-active { background: var(--accent-soft); color: var(--accent-dark); }
.admin-grupo[open] > summary { background: var(--surface-2); color: var(--text); }
.admin-grupo__panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 60;
  min-width: 215px;
  display: grid;
  gap: 2px;
  padding: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.admin-grupo__panel a { display: block; padding: 0.45rem 0.65rem; border-radius: 8px; color: var(--muted); font-size: 0.9rem; }
.admin-grupo__panel a:hover { background: rgba(148, 163, 184, 0.14); color: var(--text); text-decoration: none; }
.admin-grupo__panel a.is-active { background: var(--accent-soft); color: var(--accent-dark); }

/* formularios colapsables de Operacion (Registrar X) */
details.panel > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::after { content: "\002B"; font-size: 1.15rem; color: var(--muted); line-height: 1; }
details.panel[open] > summary::after { content: "\2212"; }

.admin-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  cursor: pointer;
}

.admin-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.admin-header__right {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.9rem;
}

.admin-header__right form {
  margin: 0;
}

/* Barra de progreso de la navegacion instantanea (admin-spa.js). */
.spa-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
}

.spa-bar.is-on {
  opacity: 1;
  background: var(--brand, #2563eb);
  transform-origin: left center;
  animation: spaBar 0.8s ease-out forwards;
}

@keyframes spaBar {
  0% { transform: scaleX(0); }
  60% { transform: scaleX(0.85); }
  100% { transform: scaleX(1); opacity: 0.85; }
}

.admin-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.admin-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
  font-size: 0.85rem;
  padding: 1.2rem;
}
.admin-footer__install {
  border: 0; background: none; color: inherit; font: inherit; text-decoration: underline;
  cursor: pointer; padding: 0;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.page-head__actions {
  display: flex;
  gap: 0.6rem;
}

.accion-impresion {
  display: contents;
}

.app-qr {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0;
}

/* Misma altura de texto en los dos pasos para que los QR queden alineados. */
.app-paso__texto {
  min-height: 4.8em;
}

.app-qr img {
  display: block;
  width: 260px;
  height: 260px;
  max-width: 100%;
  margin: 0 auto;
  border: 1px solid var(--borde, #d7dbe7);
  border-radius: 10px;
  background: #fff;
  padding: 0.5rem;
}

.token-negocio {
  word-break: break-all;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.6rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: grid;
  gap: 0.3rem;
}

.card span {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card strong {
  font-size: 1.7rem;
}

.card--status.status-pendiente strong {
  color: var(--warning);
}

.card--status.status-listo strong,
.card--status.status-entregado strong {
  color: var(--success);
}

.card--status.status-cancelado strong {
  color: var(--danger);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.3rem;
  margin-bottom: 1.4rem;
}

.panel--narrow {
  max-width: 720px;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.panel__head h2 {
  font-size: 1.08rem;
}

.table-wrap {
  overflow-x: auto;
}

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

.table th,
.table td {
  text-align: left;
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table thead th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.table tfoot td {
  font-weight: 600;
}

.table .total td {
  color: var(--accent);
}

.table__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.table__actions form {
  margin: 0;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.16rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--muted);
  white-space: nowrap;
}

.badge-premium {
  display: inline-block;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  margin-left: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #1a1206;
  vertical-align: middle;
}

.status-pendiente {
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
}

.status-confirmado {
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
}

.status-en_preparacion {
  background: rgba(168, 85, 247, 0.16);
  color: #d8b4fe;
}

.status-listo {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

.status-entregado {
  background: rgba(34, 197, 94, 0.22);
  color: #4ade80;
}

.status-cancelado {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
}

.tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tabs a {
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.86rem;
}

.tabs a:hover {
  color: var(--text);
  text-decoration: none;
}

.tabs a.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.form {
  display: grid;
  gap: 0.9rem;
}

.form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.form--inline {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
  gap: 0.8rem;
}

.form--inline .btn {
  align-self: end;
  height: fit-content;
}

.form__actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.checkbox {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.5rem;
}

.checkbox input {
  width: auto;
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}

.inline-form select {
  width: auto;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.2rem;
}

.detail {
  display: grid;
  gap: 0.7rem;
  margin: 0 0 1.2rem;
}

.detail dt {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.detail dd {
  margin: 0.1rem 0 0;
}

.muted {
  color: var(--muted);
}

.flash {
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.flash ul {
  margin: 0;
  padding-left: 1.1rem;
}

.flash-success {
  background: #ecfdf5;
  border: 1px solid #86efac;
  color: #166534;
}

.flash-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #b42318;
}

html.tema-oscuro .flash-success {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.45);
  color: #86efac;
}

html.tema-oscuro .flash-error {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.soporte-aviso {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fcd34d;
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.soporte-aviso a {
  color: #fde68a;
  font-weight: 600;
  text-decoration: underline;
}

.admin-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
}

.admin-login__card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
}

.admin-login__card h1 {
  font-size: 1.4rem;
}

.admin-login__sub {
  color: var(--muted);
  margin: 0 0 1.2rem;
  font-size: 0.9rem;
}

.admin-login__back {
  text-align: center;
  margin: 1.2rem 0 0;
  font-size: 0.86rem;
}

/* --- Modulo de codigos QR --- */

.qr-thumb {
  background: #fff;
  border-radius: 8px;
  padding: 2px;
  display: block;
}

.qr-cell {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.qr-thumb--photo {
  padding: 0;
  object-fit: cover;
}

.share-actions {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.share-actions .btn {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
  text-decoration: none;
}

.share-actions .btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.form-field {
  display: grid;
  gap: 0.4rem;
}

.form-field__label {
  font-size: 0.88rem;
  color: var(--muted);
}

.dropzone {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 1.1rem;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone.is-over {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
}

.dropzone__hint {
  margin: 0 0 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dropzone__preview {
  margin-top: 0.9rem;
  display: grid;
  justify-items: center;
  gap: 0.5rem;
}

.dropzone__preview[hidden] {
  display: none;
}

.dropzone__preview img {
  max-width: 220px;
  max-height: 220px;
  border-radius: 10px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.current-image {
  display: grid;
  justify-items: start;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.current-image img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 10px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.form small.muted {
  font-size: 0.8rem;
}

/* --- Fotos de platillos --- */

.menu-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: cover;
  display: block;
}

/* Foto del platillo en el detalle del pedido */

.order-prod {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.order-thumb {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: cover;
  display: block;
}

/* --- Inventario --- */

.inv-resumen {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.inv-cantidad {
  width: 110px;
}

.panel--alerta {
  border-color: rgba(239, 68, 68, 0.55);
}

/* --- Vista previa de tickets --- */

.ticket-preview {
  margin: 0;
  padding: 1rem;
  background: #fff;
  color: #111;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.35;
  white-space: pre;
  overflow-x: auto;
}

/* --- Captura rapida de pedidos (POS) --- */

.pos {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.2rem;
  align-items: start;
}

.pos__menu {
  min-width: 0;
}

.pos__buscar {
  margin-bottom: 1rem;
}

.pos__buscar input {
  font-size: 1.15rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
}

/* Pestanas de categoria mas grandes, para tocar sin apuntar */
.pos__menu .tabs {
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.pos__menu .tabs a {
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  border-radius: 10px;
}

.pos__grupo {
  margin-bottom: 2rem;
}

.pos__titulo {
  font-size: 1.15rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.9rem;
}

/* Botones grandotes, tipo restaurante de comida rapida: se tocan sin apuntar */
.pos__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.9rem;
}

.pos-boton {
  position: relative;
  display: grid;
  gap: 0.45rem;
  align-content: space-between;
  min-height: 132px;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.06s ease, border-color 0.15s ease, background 0.15s ease;
}

.pos-boton:hover,
.pos-boton:focus {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
}

.pos-boton:active {
  transform: scale(0.97);
}

/* Ya esta en el pedido: se marca en verde */
.pos-boton.is-en-pedido {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
}

.pos-boton__foto {
  width: 100%;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.pos-boton__nombre {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.25;
}

.pos-boton__precio {
  color: #93c5fd;
  font-weight: 700;
  font-size: 1.15rem;
}

/* Cuantas piezas lleva el pedido, arriba a la derecha */
.pos-boton__cantidad {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  min-width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: #22c55e;
  color: #052e16;
  font-size: 1rem;
  font-weight: 800;
}

.pos-boton__cantidad[hidden] {
  display: none;
}

.pos__lado {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 76px;
}

.pos__panel {
  margin-bottom: 0;
}

.pos__panel .btn--block {
  margin-top: 0.9rem;
  font-size: 1.1rem;
  padding: 1rem;
}

/* Campos mas comodos de tocar */
.pos__panel .form input,
.pos__panel .form select,
.pos__panel .form textarea {
  font-size: 1.02rem;
  padding: 0.7rem 0.8rem;
}

.pos__lineas {
  display: grid;
  gap: 0.5rem;
}

.pos__linea {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.pos__linea-datos {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.pos__linea-datos strong {
  font-size: 1rem;
}

.pos__controles {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.pos__paso,
.pos__quitar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
}

.pos__paso:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pos__quitar {
  color: #fca5a5;
}

.pos__quitar:hover {
  border-color: var(--danger);
}

.pos__cantidad {
  min-width: 30px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
}

.pos__totales {
  display: grid;
  gap: 0.3rem;
  border-top: 1px solid var(--border);
  margin-top: 0.8rem;
  padding-top: 0.7rem;
}

.pos__fila {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
}

.pos__fila--total {
  font-size: 1.25rem;
  color: var(--accent);
}

.pos__nota {
  font-size: 0.82rem;
  margin: 0.6rem 0 0;
}

/* Solo en pantallas chicas (tablet vertical o celular) se apila */
@media (max-width: 900px) {
  html,
  body {
    overflow-x: hidden;
  }

  .admin-header__inner {
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
  }

  .admin-brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .admin-brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 48vw;
  }

  .admin-header__right {
    order: 3;
    gap: 0.5rem;
  }

  /* "Ver sitio" estorba en pantallas chicas */
  .admin-header__right a[href="/"] {
    display: none;
  }

  .admin-nav-toggle {
    display: inline-flex;
    order: 2;
  }

  .admin-nav {
    display: none;
    order: 4;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0.15rem;
  }

  .admin-header.nav-abierto .admin-nav {
    display: flex;
  }

  .admin-grupo { width: 100%; }
  .admin-grupo > summary { width: 100%; justify-content: space-between; }
  .admin-grupo__panel { position: static; box-shadow: none; border: 0; padding: 0 0 0 0.8rem; min-width: 0; background: transparent; }

  .admin-main {
    padding: 1rem 0.75rem 2.5rem;
  }

  .page-head {
    align-items: flex-start;
  }

  .page-head__actions {
    flex-wrap: wrap;
    width: 100%;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 1.45rem;
  }

  .table th,
  .table td {
    /* En tablas que no se convierten en tarjetas, se conserva el ancho y se
       desliza en horizontal en vez de partir las palabras. */
    white-space: nowrap;
  }

  img,
  video,
  canvas {
    max-width: 100%;
    height: auto;
  }

  .pos {
    grid-template-columns: 1fr;
  }

  .pos__lado {
    position: static;
  }

  .pos__grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

/* --- Tablas como tarjetas en el celular ---
   Un script les pone data-label a las celdas con el encabezado de su columna. */
@media (max-width: 760px) {
  .table--cards thead {
    display: none;
  }

  .table--cards,
  .table--cards tbody,
  .table--cards tr,
  .table--cards td {
    display: block;
    width: auto;
  }

  .table--cards tbody tr {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.55rem 0.8rem;
    margin-bottom: 0.7rem;
  }

  .table--cards td {
    border: 0;
    padding: 0.32rem 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.9rem;
    white-space: normal;
    overflow-wrap: break-word;
    text-align: right;
  }

  .table--cards td.celda--control {
    display: block;
    text-align: left;
  }

  .table--cards td.celda--control::before {
    display: block;
    margin-bottom: 0.35rem;
  }

  .table--cards td.celda--control form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
  }

  .table--cards td.celda--control select {
    flex: 1 1 140px;
  }

  .table--cards td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    text-align: left;
  }

  .table--cards td:not([data-label])::before,
  .table--cards td[data-label=""]::before {
    content: none;
  }

  .table--cards td.table__actions {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding-top: 0.5rem;
  }

  .table--cards td.table__actions::before {
    content: none;
  }

  .table--cards tfoot {
    display: block;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border);
    padding-top: 0.5rem;
  }

  .table--cards tfoot tr {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
  }

  .table--cards tfoot td {
    padding: 0.2rem 0;
  }

  .table--cards tfoot td:first-child {
    color: var(--muted);
  }

  .table--cards tfoot tr.total td {
    color: var(--text);
    font-weight: 700;
  }
}

/* --- Avisos de pedidos nuevos --- */

.avisos {
  position: sticky;
  top: 56px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 0.7rem 0.9rem;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.5);
  border-radius: var(--radius);
  color: #bbf7d0;
  font-weight: 600;
}

.avisos[hidden] {
  display: none;
}

.avisos__texto {
  flex: 1;
}

.avisos__cerrar {
  background: transparent;
  border: 0;
  color: #bbf7d0;
  font: inherit;
  font-size: 1.05rem;
  cursor: pointer;
  padding: 0 0.3rem;
}

.checkbox--inline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}

.checkbox--inline input {
  width: auto;
}

/* Iframe oculto: imprime sin salir del panel */
.marco-impresion {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
}

/* --- Recorte del logo --- */

.recorte-campos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.6rem;
}

.recorte-campos label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.recorte {
  position: relative;
  display: block;
  margin-top: 0.6rem;
  max-width: 520px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.recorte img {
  display: block;
  width: 100%;
  height: auto;
}

.recorte__marco {
  position: absolute;
  border: 2px solid var(--accent);
  background: rgba(59, 130, 246, 0.18);
  pointer-events: none;
}

.logo-lienzo {
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  image-rendering: pixelated;
}

/* --- Buscador de clientes (captura de pedidos) --- */

.cliente-picker {
  position: relative;
  display: grid;
  gap: 0.3rem;
}

.cliente-picker__resultados {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 0.15rem;
  max-height: 260px;
  overflow-y: auto;
  padding: 0.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.cliente-opcion {
  display: grid;
  gap: 0.1rem;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.cliente-opcion:hover {
  background: rgba(255, 255, 255, 0.06);
}

.cliente-opcion small {
  color: var(--muted);
}

.cliente-picker__resumen {
  margin: 0;
  font-size: 0.82rem;
}

/* --- Analiticas --- */

.filtros {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 1.2rem;
}

.filtros__presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filtros__fechas {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.6rem;
}

.filtros__campo {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.filtros__campo input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  padding: 0.4rem 0.55rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.kpi__label {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kpi__value {
  font-size: 1.45rem;
  line-height: 1.15;
}

.var {
  font-size: 0.8rem;
  font-weight: 600;
}

.var--up {
  color: var(--success);
}

.var--down {
  color: var(--danger);
}

.var--flat {
  color: var(--muted);
  font-weight: 500;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.chart-card--wide {
  grid-column: 1 / -1;
}

.chart-box {
  position: relative;
  height: 260px;
}

.chart-box--tall {
  height: 330px;
}

.chart-empty {
  color: var(--muted);
  margin: 0;
  padding: 2rem 0;
  text-align: center;
}

.chart-toggle {
  display: flex;
  gap: 0.35rem;
}

.mini-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.mini-kpi {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.mini-kpi span {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mini-kpi strong {
  font-size: 1.15rem;
}

.mini-kpi--alerta {
  border-color: rgba(239, 68, 68, 0.5);
}

.sub-head {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0.9rem 0 0.4rem;
}

.pills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
  font-size: 0.82rem;
}

.pill span {
  font-weight: 700;
}

.pill--danger {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.pill--warning {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

.rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.8rem;
}

.rec {
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
  background: var(--surface-2);
}

.rec h3 {
  font-size: 0.98rem;
  margin-bottom: 0.25rem;
}

.rec p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.rec--success {
  border-left-color: var(--success);
}

.rec--info {
  border-left-color: var(--accent);
}

.rec--warning {
  border-left-color: var(--warning);
}

.rec--danger {
  border-left-color: var(--danger);
}

/* --- Notificaciones (campana e historial) --- */

.campana {
  position: relative;
}

.campana__boton {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
}

.campana__boton:hover {
  color: var(--text);
  border-color: rgba(59, 130, 246, 0.55);
}

.campana--activa .campana__boton {
  color: var(--text);
}

.campana__badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.campana__panel {
  position: fixed;
  top: 72px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 90px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  z-index: 120;
  overflow: hidden;
}

.campana__panel[hidden] {
  display: none !important;
}

.campana__head,
.campana__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.65rem 0.9rem;
}

.campana__head {
  border-bottom: 1px solid var(--border);
}

.campana__foot {
  border-top: 1px solid var(--border);
}

.campana__lista {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 380px;
  overflow-y: auto;
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.campana__vacio {
  color: var(--muted);
  margin: 0.6rem;
  font-size: 0.88rem;
}

.campana__sonido {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.notif {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  background: var(--surface-2);
  text-decoration: none;
  color: inherit;
}

.notif:hover {
  border-color: rgba(59, 130, 246, 0.5);
}

.notif--nueva {
  background: rgba(59, 130, 246, 0.09);
}

.notif--info {
  border-left-color: var(--accent);
}

.notif--success {
  border-left-color: var(--success);
}

.notif--warning {
  border-left-color: var(--warning);
}

.notif--danger {
  border-left-color: var(--danger);
}

.notif__cab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.notif__tipo {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.notif__hora {
  font-size: 0.74rem;
  color: var(--muted);
}

.notif__titulo {
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.25;
}

.notif__mensaje {
  color: var(--muted);
  font-size: 0.84rem;
}

.notif-lista {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.notif-lista .notif {
  padding: 0.75rem 0.9rem;
}

.notif-dia {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin: 0.9rem 0 0.1rem;
}

.notif__acciones {
  margin-top: 0.3rem;
}

.notif__acciones form {
  margin: 0;
}

.paginado {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin: 0.5rem 0 1.5rem;
}

.filtros__campo select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  padding: 0.4rem 0.55rem;
}

.filtros__campo--check input {
  width: 18px;
  height: 18px;
}



/* ------------------------------------------------------ pantalla de cocina --- */
.kds { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.kds-card {
  background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--muted);
  border-radius: var(--radius); padding: 1rem; display: grid; gap: .5rem;
}
.kds-card--pendiente { border-left-color: var(--warning); }
.kds-card--confirmado { border-left-color: var(--accent); }
.kds-card--en_preparacion { border-left-color: #a855f7; }
.kds-card--listo { border-left-color: var(--success); }
.kds-card.is-late { outline: 1px solid rgba(245, 158, 11, .5); }
.kds-card.is-very-late { outline: 2px solid rgba(239, 68, 68, .6); }
.kds-card__head { display: flex; align-items: baseline; gap: .5rem; }
.kds-card__head strong { font-size: 1.15rem; }
.kds-card__tipo { color: var(--muted); font-size: .82rem; }
.kds-card__tiempo { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muted); }
.kds-card.is-late .kds-card__tiempo { color: var(--warning); }
.kds-card.is-very-late .kds-card__tiempo { color: var(--danger); }
.kds-card__cliente { margin: 0; font-weight: 600; }
.kds-card__prog { margin: 0; font-size: .82rem; color: var(--accent); }
.kds-card__prog.is-cerca { color: var(--warning); }
.kds-card__prog.is-tarde { color: var(--danger); }
.kds-card__items { list-style: none; margin: .2rem 0; padding: 0; display: grid; gap: .25rem; }
.kds-card__items b { color: var(--accent); }
.kds-card__nota {
  margin: 0; font-size: .85rem; color: var(--warning);
  background: rgba(245, 158, 11, .08); border-radius: 8px; padding: .35rem .5rem;
}
.kds-card__estado { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.kds-card__acciones { display: flex; gap: .35rem; flex-wrap: wrap; }

/* opciones y extras (modificadores) */
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .35rem .9rem; margin: .2rem 0; }

.kds-card__mods { display: block; font-size: .78rem; color: var(--warning); font-style: normal; }

/* mapa de mesas */
.mesas { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
.mesa {
  border: 1px solid var(--border); border-left: 5px solid var(--success);
  border-radius: var(--radius); padding: .8rem; display: grid; gap: .35rem; background: var(--surface);
}
.mesa--ocupada { border-left-color: var(--warning); }
.mesa--inactiva { opacity: .55; }
.mesa__head { display: flex; align-items: baseline; justify-content: space-between; gap: .4rem; }
.mesa__orden { margin: 0; font-size: .85rem; color: var(--muted); }
.mesa__total { margin: 0; font-weight: 800; }
.mesa__hora { margin: 0; font-size: .75rem; color: var(--muted); }
.mesa__libre { margin: 0; color: var(--success); font-weight: 600; }

/* menu de exportacion */
.exportar { position: relative; display: inline-block; }
.exportar > summary { cursor: pointer; list-style: none; }
.exportar > summary::-webkit-details-marker { display: none; }
.exportar__menu {
  position: absolute; right: 0; z-index: 20; margin-top: .3rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: .4rem; display: grid; min-width: 190px; box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
}
.exportar__menu a { padding: .4rem .55rem; border-radius: 8px; text-decoration: none; color: var(--text); font-size: .9rem; }
.exportar__menu a:hover { background: rgba(37, 99, 235, .08); }

/* QR destacado (uno por negocio) */
.qr-destacado { display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: flex-start; }
.qr-destacado__img { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem; }
.qr-destacado__datos { flex: 1; min-width: 260px; display: grid; gap: .4rem; }

/* imagen de categoria en el panel */
.categoria-foto { display: grid; gap: .25rem; justify-items: center; }
.categoria-foto img { border-radius: 8px; object-fit: cover; }
.categoria-foto input[type="file"] { font-size: .72rem; max-width: 130px; }
.categoria-foto .checkbox { font-size: .72rem; }

/* selector de tipo de negocio en Catalogo */
.form--tipo { display: flex; align-items: center; gap: .4rem; }
.form--tipo label { font-size: .8rem; }
.form--tipo select { padding: .4rem .5rem; border-radius: 8px; border: 1px solid var(--border); font: inherit; }

/* -------------------------------------------------- ayuda: widget flotante --- */
.ayuda-widget { position: fixed; right: 18px; bottom: 18px; z-index: 80; }
.ayuda-widget__boton {
  width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(140deg, #2563eb, #1d4ed8); color: #fff; font-size: 24px; font-weight: 800;
  box-shadow: 0 10px 24px rgba(29, 78, 216, .4);
}
.ayuda-widget.is-abierto .ayuda-widget__boton { display: none; }
.ayuda-widget__panel {
  width: min(360px, calc(100vw - 24px)); max-height: min(560px, 78vh);
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.28); display: flex; flex-direction: column; overflow: hidden;
}
.ayuda-widget__head { display: flex; align-items: baseline; gap: .5rem; padding: .8rem 1rem; border-bottom: 1px solid var(--border); }
.ayuda-widget__head strong { font-size: 1rem; }
.ayuda-widget__head .muted { font-size: .8rem; }
.ayuda-widget__cerrar { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 1.3rem; cursor: pointer; }
.ayuda-widget__inicio, .ayuda-widget__mensajes { padding: .9rem 1rem; overflow-y: auto; }
.ayuda-widget__mensajes { display: flex; flex-direction: column; gap: .5rem; }
.ayuda-widget__sugerencias { display: grid; gap: .4rem; margin-top: .6rem; }
.ayuda-widget__sug {
  text-align: left; padding: .5rem .6rem; border-radius: 10px; border: 1px solid var(--border);
  background: transparent; color: var(--text); cursor: pointer; font: inherit; font-size: .88rem;
}
.ayuda-widget__sug:hover { background: rgba(37,99,235,.08); }
.ayuda-widget__msg { padding: .5rem .7rem; border-radius: 12px; font-size: .9rem; line-height: 1.45; white-space: pre-wrap; }
.ayuda-widget__msg--user { background: rgba(37,99,235,.14); align-self: flex-end; }
.ayuda-widget__msg--bot { background: rgba(148,163,184,.14); align-self: flex-start; }
.ayuda-widget__msg--pensando { opacity: .7; font-style: italic; }
.ayuda-widget__form { display: flex; gap: .4rem; padding: .7rem 1rem 0; }
.ayuda-widget__texto { flex: 1; padding: .5rem .6rem; border-radius: 10px; border: 1px solid var(--border); font: inherit; }
.ayuda-widget__nota { margin: 0; padding: .5rem 1rem .8rem; font-size: .72rem; color: var(--muted); }

/* ayuda: pagina */
.faq { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .5rem; }
.faq__item { text-align: left; padding: .6rem .7rem; border-radius: 10px; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; font: inherit; font-size: .9rem; }
.faq__item:hover { background: rgba(37,99,235,.08); }
.manual { display: grid; grid-template-columns: 220px 1fr; gap: 1.4rem; }
.manual__indice ol { margin: .5rem 0 0; padding-left: 1.1rem; display: grid; gap: .25rem; }
.manual__indice a { color: var(--text); text-decoration: none; font-size: .9rem; }
.manual__indice a:hover { color: #2563eb; }
.manual__cuerpo { display: grid; gap: 1.1rem; }
.manual__seccion h3 { margin: 0 0 .4rem; }
.manual__seccion ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; }
@media (max-width: 820px) { .manual { grid-template-columns: 1fr; } }

/* el atributo hidden debe ganar aunque el elemento tenga display propio */
.ayuda-widget [hidden] { display: none !important; }

/* imprimir por bluetooth (movil) */
.bt { display: flex; gap: .5rem; flex-wrap: wrap; margin: .6rem 0; }
.bt-estado { margin: .4rem 0 0; font-weight: 600; }
.bt-estado--ok { color: var(--success, #22c55e); }
.bt-estado--error { color: var(--danger, #ef4444); }
.bt-caracteristica { display: grid; gap: .3rem; margin-top: .6rem; }
.bt-caracteristica select { padding: .45rem .5rem; border-radius: 8px; border: 1px solid var(--border); font: inherit; }

/* plan y prueba gratis */
.admin-trial { background: rgba(37, 99, 235, .16); border-bottom: 1px solid rgba(37, 99, 235, .4); color: #c7ddff; font-size: .85rem; text-align: center; padding: .5rem .8rem; }
.admin-trial--vencida { background: rgba(239, 68, 68, .16); border-bottom-color: rgba(239, 68, 68, .45); color: #fca5a5; }
.admin-trial--limitado { background: rgba(245, 158, 11, .16); border-bottom-color: rgba(245, 158, 11, .45); color: #fcd34d; }
.admin-trial a { color: inherit; text-decoration: underline; }
.admin-plan { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #c7ddff; background: rgba(37, 99, 235, .22); border: 1px solid rgba(37, 99, 235, .45); border-radius: 999px; padding: .2rem .55rem; white-space: nowrap; }

/* primeros pasos (onboarding) */
.panel--onboarding { border-color: rgba(37, 99, 235, .4); }
.pasos { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .5rem; }
.pasos li { position: relative; padding-left: 1.9rem; }
.pasos li::before { content: "\25CB"; position: absolute; left: 0; top: 0; color: var(--muted); }
.pasos li.paso--ok::before { content: "\2713"; color: var(--success, #22c55e); font-weight: 700; }
.pasos li a { font-weight: 600; }
.pasos li.paso--ok a { color: var(--muted); text-decoration: line-through; }
.pasos li .muted { display: block; font-size: .85rem; }

/* opciones: switches de modulos */
.switch-lista { display: grid; gap: .5rem; }
.switch-lista .switch-opcion {
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem .9rem; border: 1px solid var(--border); border-radius: 12px;
  cursor: pointer; color: var(--text); font-size: .9rem;
  transition: border-color .15s, background .15s;
}
.switch-lista .switch-opcion:hover { border-color: var(--accent); }
.switch-lista .switch-opcion:has(.switch:checked) { border-color: var(--accent); background: rgba(59, 130, 246, .08); }
.switch-opcion__texto { flex: 1; min-width: 0; display: grid; gap: .15rem; }
.switch-opcion__texto strong { font-size: .98rem; color: var(--text); }
.switch-opcion__texto small { font-size: .82rem; line-height: 1.35; }
.switch { position: absolute; left: -9999px; opacity: 0; width: 1px; height: 1px; }
.switch__control {
  position: relative; flex: none; width: 52px; height: 30px; border-radius: 999px;
  background: #94a3b8; transition: background .18s; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .08);
}
.switch__control::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .35); transition: transform .18s;
}
.switch:checked + .switch__control { background: var(--accent); }
.switch:checked + .switch__control::after { transform: translateX(22px); }
.switch:focus-visible + .switch__control { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 520px) {
  .switch-lista .switch-opcion { gap: .7rem; padding: .6rem .7rem; }
  .switch-opcion__texto small { font-size: .78rem; }
}

/* operacion: tarjetas de modulos */
.op-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; }
.op-card {
  position: relative; display: flex; flex-direction: column; gap: .35rem;
  padding: 1rem 1.05rem; border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); color: var(--text); text-decoration: none;
  transition: border-color .15s, transform .15s, background .15s;
}
.op-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.op-card__top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.op-card__top strong { font-size: 1rem; }
.op-card small { font-size: .84rem; }
.op-card__arrow { margin-top: .35rem; font-size: .82rem; font-weight: 600; color: var(--accent); }
.op-card--lock { opacity: .85; }
.op-card--ia { border-color: rgba(59, 130, 246, .55); background: linear-gradient(150deg, rgba(59, 130, 246, .16), rgba(59, 130, 246, .03)); }
@media (max-width: 520px) { .op-grid { grid-template-columns: 1fr; } }

/* selector segmentado (avisos: resumen por correo) */
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.segmented label { display: block; margin: 0; }
.segmented input { position: absolute; left: -9999px; opacity: 0; }
.segmented span { display: block; padding: .5rem .95rem; font-size: .88rem; cursor: pointer; color: var(--muted); transition: background .15s, color .15s; }
.segmented label + label span { border-left: 1px solid var(--border); }
.segmented input:checked + span { background: var(--accent); color: #fff; }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (max-width: 480px) { .segmented span { padding: .45rem .6rem; font-size: .82rem; } }

/* tienda */
.tienda-hero { display: grid; grid-template-columns: 1fr minmax(200px, 260px); gap: 1.4rem; align-items: center; }
.tienda-hero__info h2 { margin: 0 0 .3rem; }
.tienda-hero__info img { display: block; width: 100%; max-width: 340px; max-height: 300px; object-fit: cover; border-radius: 12px; margin: 0 0 .7rem; }
.tienda-hero__info > p { margin: 0; }
.tienda-hero__precio { text-align: right; border-left: 1px solid var(--border); padding-left: 1.4rem; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: .2rem; }
.tienda-hero__monto { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; }
.tienda-hero__precio p { margin: .4rem 0 0; font-size: .8rem; }
.tienda-incluye { list-style: none; padding: 0; margin: .7rem 0 0; display: grid; gap: .4rem; }
.tienda-incluye li { position: relative; padding-left: 1.5rem; color: var(--muted); font-size: .9rem; }
.tienda-incluye li::before { content: "\2713"; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.form-grid--3 { grid-template-columns: repeat(3, 1fr); }
.tienda-pedidos { display: grid; gap: .6rem; }
.tienda-pedido { border: 1px solid var(--border); border-radius: 12px; padding: .8rem .95rem; display: grid; gap: .25rem; }
.tienda-pedido__top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.tienda-pedido p { margin: 0; font-size: .88rem; }
.pill--info { background: rgba(59, 130, 246, .16); border-color: rgba(59, 130, 246, .4); color: #93c5fd; }
.pill--success { background: rgba(34, 197, 94, .16); border-color: rgba(34, 197, 94, .4); color: #86efac; }

/* tienda: promocion de zona (Monterrey y area metropolitana) */
.tienda-zona {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  margin-top: .9rem;
  padding: .85rem 1rem;
  border: 1px solid rgba(34, 197, 94, .45);
  background: rgba(34, 197, 94, .10);
  border-radius: 12px;
}

.tienda-zona__icono { color: var(--success); font-size: 1.1rem; line-height: 1.3; }
.tienda-zona p { margin: 0; font-size: .9rem; }
@media (max-width: 640px) {
  .tienda-hero { grid-template-columns: 1fr; }
  .tienda-hero__precio { text-align: left; border-left: 0; border-top: 1px solid var(--border); padding-left: 0; padding-top: 1rem; }
  .form-grid, .form-grid--3 { grid-template-columns: 1fr; }
}

/* contacto: logo del negocio */
.marca-logo { display: flex; gap: 1.2rem; align-items: flex-start; flex-wrap: wrap; }
.marca-logo__vista { width: 120px; height: 120px; border: 1px dashed var(--border); border-radius: 12px; display: flex; align-items: center; justify-content: center; padding: .6rem; background: var(--surface-2); }
.marca-logo__vista img { max-width: 100%; max-height: 100%; object-fit: contain; }
.marca-logo__acciones { flex: 1; min-width: 220px; display: grid; gap: .6rem; }
.marca-ia { display: grid; gap: .5rem; margin-top: .4rem; padding-top: .7rem; border-top: 1px dashed var(--border); }

/* inputs de archivo: boton "seleccionar archivo" con el tema */
input[type="file"] {
  max-width: 100%;
  font-size: .82rem;
  color: var(--muted);
}

input[type="file"]::file-selector-button {
  margin-right: .7rem;
  padding: .45rem .85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

input[type="file"]::file-selector-button:hover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, .12);
}

input[type="file"]::-webkit-file-upload-button {
  margin-right: .7rem;
  padding: .45rem .85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
}

input[type="file"]::-webkit-file-upload-button:hover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, .12);
}

/* categorias: celda de la foto */
.categoria-foto { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.categoria-foto img { width: 44px; height: 44px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.categoria-foto input[type="file"] { max-width: 200px; }
.categoria-foto .checkbox { display: flex; align-items: center; gap: .3rem; font-size: .8rem; }

/* asistente (chat con acciones) */
.ag-chat { display: grid; gap: .5rem; max-height: 340px; overflow-y: auto; padding: .6rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); margin-bottom: .7rem; }
.ag-msg { padding: .5rem .75rem; border-radius: 12px; font-size: .9rem; white-space: pre-wrap; max-width: 90%; }
.ag-msg--user { justify-self: end; background: var(--accent); color: #ffffff; }
.ag-msg--bot { justify-self: start; background: var(--surface); border: 1px solid var(--border); }
.ag-form { display: flex; gap: .5rem; }
.ag-form input { flex: 1; }
.ag-pendiente { margin-top: .7rem; padding: .7rem .9rem; border: 1px solid rgba(59, 130, 246, .45); background: rgba(59, 130, 246, .1); border-radius: 12px; }
.ag-pendiente p { margin: 0 0 .5rem; }

/* checador */
.checador { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .7rem; }
.checador-card { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; border: 1px solid var(--border); border-radius: 12px; }
.checador-card__info { flex: 1; min-width: 0; display: grid; gap: .1rem; }
.checador-card__info small { font-size: .82rem; }

/* reservaciones */
.reservas { display: grid; gap: .55rem; }
.reserva { display: flex; align-items: center; gap: .9rem; padding: .7rem .9rem; border: 1px solid var(--border); border-radius: 12px; }
.reserva__cuando { display: grid; text-align: center; min-width: 64px; }
.reserva__cuando strong { font-size: 1.1rem; }
.reserva__info { flex: 1; min-width: 0; display: grid; gap: .1rem; }
.reserva__info small { font-size: .82rem; }
.reserva__acciones { display: flex; gap: .35rem; flex-wrap: wrap; }
.reserva--cancelada, .reserva--no_asistio { opacity: .55; }
@media (max-width: 640px) { .reserva { flex-wrap: wrap; } }

/* KDS: pestanas por estacion y boton agotar */
.kds-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; }
.kds-tab { padding: .35rem .85rem; border: 1px solid var(--border); border-radius: 999px; font-size: .85rem; color: var(--muted); text-decoration: none; }
.kds-tab:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
.kds-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.kds-card__agotar { margin-left: .5rem; border: 0; background: transparent; color: #fca5a5; font-size: .72rem; font-weight: 700; cursor: pointer; text-decoration: underline; }

/* Pagina de venta: horarios de citas */
.horario-grid { display: grid; gap: 8px; margin: 8px 0 4px; }
.horario-row { display: grid; grid-template-columns: 110px auto 1fr 1fr; gap: 10px; align-items: center; }
.horario-dia { font-weight: 600; }
@media (max-width: 640px) {
  .horario-row { grid-template-columns: 1fr 1fr; }
  .horario-dia { grid-column: 1 / -1; }
}

/* Agenda: acciones y lista de espera */
.accion-cita { display: inline-flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.accion-cita input[type="datetime-local"] { max-width: 210px; }

/* ---------------------------------------------------------------- Formularios */
/* Selectores más claros: checkboxes, color, fecha/hora y filas de horario. */
.check {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.5rem;
}
.form input[type="checkbox"],
.check input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  min-width: 1.1rem;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.form input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  width: 64px;
  min-width: 64px;
  height: 42px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  cursor: pointer;
}
.form input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.form input[type="color"]::-webkit-color-swatch { border: none; border-radius: 6px; }
.form input[type="color"]::-moz-color-swatch { border: none; border-radius: 6px; }
.form input[type="time"],
.form input[type="date"],
.form input[type="datetime-local"] {
  min-height: 42px;
}
.form input[type="time"]::-webkit-calendar-picker-indicator,
.form input[type="date"]::-webkit-calendar-picker-indicator,
.form input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(0.7);
  cursor: pointer;
}
.form select,
.form input[type="text"],
.form input[type="number"],
.form input[type="email"],
.form input[type="tel"],
.form textarea {
  min-height: 42px;
  border-radius: 10px;
}
.horario-grid { gap: 10px; }
.horario-row {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
}
.horario-dia { color: var(--text); }

/* Campo de color: recuadro angosto alineado a la izquierda */
.campo-color { justify-items: start; }
.campo-color input[type="color"] { justify-self: start; }
/* Switch compacto (p. ej. "Cerrado" en horarios) */
.horario-cerrado,
.switch-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}
.switch--sm + .switch__control { width: 42px; height: 24px; }
.switch--sm + .switch__control::after { width: 18px; height: 18px; top: 3px; left: 3px; }
.switch--sm:checked + .switch__control::after { transform: translateX(18px); }

/* Rejilla de campos y tarjetas de configuración */
.rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.9rem; align-items: start; }
.rejilla--3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.op-card__title { font-weight: 700; font-size: 0.98rem; color: var(--text); }
.op-card__desc { font-size: 0.84rem; color: var(--muted); line-height: 1.38; }
.panel > h2 { margin: 0 0 0.35rem; }
.panel > h3 { margin: 1.1rem 0 0.4rem; }
.panel + .panel { margin-top: 1rem; }
.ajustes-form__acciones {
  position: sticky; bottom: 0; z-index: 4;
  display: flex; justify-content: flex-end; gap: 0.6rem;
  padding: 0.8rem 0; margin-top: 0.5rem;
  background: linear-gradient(to top, var(--bg) 55%, transparent);
}
/* Agenda: mejor lectura */
.citas-dia { margin: 0 0 .35rem; font-weight: 700; color: var(--text); }
.citas-hora { font-variant-numeric: tabular-nums; font-weight: 700; }
.accion-cita { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; }
.accion-cita input[type="datetime-local"] { max-width: 220px; }

/* Select multiple de servicios */
.form select[multiple] { min-height: 132px; padding: 0.4rem; }
.form select[multiple] option { padding: 0.25rem 0.4rem; }

/* Variantes del producto (form de catalogo). */
.variantes { border:1px solid var(--border); border-radius:var(--radius); padding:.7rem .8rem; }
.variante-fila { display:flex; gap:.5rem; margin-bottom:.4rem; align-items:center; }
.variante-fila input[type="text"] { flex:2 1 160px; }
.variante-fila input[type="number"] { flex:1 1 90px; }

/* Division de cuenta (detalle de pedido). */
.dc-grande { font-size: 1.1rem; margin: .3rem 0 .7rem; }
.dc-grande strong { font-size: 1.4rem; }

/* Modal en la pagina (para prompts de IA, etc.) */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: rgba(4, 10, 22, 0.62); padding: 18px; }
.modal[hidden] { display: none; }
.modal__box { width: min(560px, 100%); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.modal__box h3 { margin: 0 0 6px; }
.modal__box textarea { width: 100%; min-height: 96px; resize: vertical; margin-top: 8px; }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

/* Selector de ubicacion en el mapa (Contacto). */
.mapa-campo { margin-top: 1rem; }
.mapa-campo__buscar { display: flex; gap: 0.5rem; margin-top: 0.35rem; }
.mapa-campo__buscar input { flex: 1 1 auto; }
.mapa-negocio { height: 320px; margin-top: 0.6rem; border: 1px solid var(--border, #24333f); border-radius: 12px; overflow: hidden; background: #eef1f4; }
.mapa-campo__estado { margin: 0.4rem 0 0; font-size: 0.85rem; }

/* Detectar productos de un volante (Estudio IA). */
.det-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 1rem; }
.det-item { display: grid; gap: 6px; padding: .6rem; border: 1px solid var(--border, #24333f); border-radius: 12px; }
.det-item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; background: #fff; }
.det-item input, .det-item select { width: 100%; }

/* Vista previa de la foto del asesor comercial (ajustes). */
.asesor-preview { margin: 6px 0 14px; }
.asesor-preview img { width: 120px; height: 120px; object-fit: cover; object-position: top center; border-radius: 50%; border: 3px solid var(--ember, #b45309); }

/* Resultados de busqueda de lugares (mapa de ubicacion). */
.mapa-resultados { margin-top: 6px; display: grid; gap: 4px; }
.mapa-resultado { text-align: left; padding: .5rem .7rem; border: 1px solid var(--border, #24333f); border-radius: 8px; background: transparent; color: inherit; cursor: pointer; font-size: .9rem; }
.mapa-resultado:hover { background: rgba(37,99,235,.12); }

/* --------------------------------------------------------------------------
   Facturacion (docs/41): semaforo, guia de dos flujos y formulario guiado.
   -------------------------------------------------------------------------- */
.cfdi-estado__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .65rem;
}
.cfdi-paso {
  display: flex;
  align-items: center;
  gap: .65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .7rem .8rem;
  background: var(--surface-2);
}
.cfdi-paso__luz {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .16);
}
.cfdi-paso.is-ok .cfdi-paso__luz { background: var(--success); box-shadow: 0 0 0 4px rgba(22, 163, 74, .14); }
.cfdi-paso.is-falta .cfdi-paso__luz { background: var(--danger); box-shadow: 0 0 0 4px rgba(239, 68, 68, .14); }
.cfdi-paso strong { display: block; font-size: .9rem; }
.cfdi-paso small { color: var(--muted); font-size: .78rem; }

.cfdi-mini { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0 .9rem; }
.cfdi-mini__item {
  border-radius: 999px;
  padding: .2rem .65rem;
  font-size: .78rem;
  font-weight: 700;
  background: rgba(239, 68, 68, .12);
  color: #b42318;
}
.cfdi-mini__item.is-ok { background: rgba(22, 163, 74, .12); color: #067647; }

.cfdi-form summary { list-style: none; display: inline-flex; cursor: pointer; }
.cfdi-form summary::-webkit-details-marker { display: none; }
.cfdi-form[open] summary { margin-bottom: .6rem; }
.cfdi-form__campos {
  display: grid;
  gap: .55rem;
  min-width: 320px;
  max-width: 420px;
  padding: .8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}
.cfdi-form__campos label { display: grid; gap: .22rem; font-size: .82rem; font-weight: 600; }
.cfdi-form__campos input,
.cfdi-form__campos select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: .45rem .55rem;
  font: inherit;
}
.cfdi-form__campos .btn { justify-self: start; margin-top: .2rem; }

.cfdi-flujos { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.cfdi-flujo {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  background: var(--surface-2);
}
.cfdi-flujo--negocio { border-color: rgba(37, 99, 235, .45); box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .1); }
.cfdi-flujo__tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .35rem;
}
.cfdi-flujo h3 { margin: 0 0 .35rem; }
.cfdi-flujo ul { margin: .5rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: .88rem; }
.cfdi-aviso {
  margin-top: .9rem;
  padding: .7rem .85rem;
  border-left: 3px solid var(--accent);
  background: rgba(37, 99, 235, .07);
  border-radius: 8px;
  font-size: .9rem;
}
.cfdi-requisitos { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.cfdi-requisitos li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--danger);
  border-radius: 8px;
  padding: .6rem .8rem;
}
.cfdi-requisitos li.is-ok { border-left-color: var(--success); }
.cfdi-requisitos strong { font-size: .9rem; }
.cfdi-requisitos span { color: var(--muted); font-size: .84rem; text-align: right; }
.cfdi-pasos { margin: 0; padding-left: 1.25rem; display: grid; gap: .55rem; }
.cfdi-pasos li { font-size: .92rem; }
.cfdi-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.cfdi-grid2 h3 { margin: 0 0 .25rem; font-size: .98rem; }

@media (max-width: 860px) {
  .cfdi-flujos, .cfdi-grid2 { grid-template-columns: 1fr; }
  .cfdi-form__campos { min-width: 0; width: 100%; }
  .cfdi-requisitos li { flex-direction: column; align-items: flex-start; gap: .15rem; }
  .cfdi-requisitos span { text-align: left; }
}

.cfdi-error { color: var(--danger); font-size: .78rem; display: inline-block; max-width: 360px; }

/* --------------------------------------------------------------------------
   Dashboard limpio (2026-10-20): blanco, gris y azul solo para accion.
   -------------------------------------------------------------------------- */
body { -webkit-font-smoothing: antialiased; }

.page-head--dash { align-items: flex-end; margin-bottom: 1.4rem; }
.eyebrow {
  margin: 0 0 .35rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.page-head--dash h1 { font-size: 1.9rem; letter-spacing: -.02em; }
.page-head--dash p { max-width: 560px; }

.kpi-grid--dash {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem;
  margin-bottom: 1.1rem;
}
.kpi-grid--dash .kpi { padding: 1rem 1.1rem; gap: .3rem; }
.kpi-grid--dash .kpi__label {
  text-transform: none;
  letter-spacing: 0;
  font-size: .82rem;
  font-weight: 500;
}
.kpi__value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.kpi-grid--dash .var { font-size: .78rem; }

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
.dash-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash-grid .panel { margin-bottom: 0; }
.chart-box--dash { height: 235px; }
.chart-leyenda {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  margin-top: .7rem;
  color: var(--muted);
  font-size: .78rem;
}
.punto { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .35rem; }
.punto--azul { background: var(--accent); }
.punto--gris { background: #d1d5db; }
.link-quiet { color: var(--muted); font-size: .82rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.link-quiet:hover { color: var(--accent); text-decoration: none; }

.dash-live { display: flex; flex-direction: column; }
.live-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.live-list li {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .58rem 0;
  border-bottom: 1px solid var(--surface-2);
}
.live-list li:last-child { border-bottom: 0; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--muted); }
.live-dot.status-pendiente { background: var(--warning); }
.live-dot.status-confirmado { background: var(--accent); }
.live-dot.status-en_preparacion { background: #7c3aed; }
.live-dot.status-listo { background: var(--success); }
.live-info { min-width: 0; flex: 1; display: grid; gap: .08rem; }
.live-info strong { font-size: .86rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-info span { font-size: .76rem; }
.live-total { font-size: .86rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.live-open { font-size: .78rem; font-weight: 600; }
.dash-empty { color: var(--muted); font-size: .88rem; margin: .4rem 0; }

.insight-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.insight {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--surface-2);
}
.insight:last-child { border-bottom: 0; }
.insight__dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--muted); }
.insight--danger .insight__dot { background: var(--danger); }
.insight--warning .insight__dot { background: var(--warning); }
.insight--info .insight__dot { background: var(--accent); }
.insight--ok .insight__dot { background: var(--success); }
.insight__texto { flex: 1; min-width: 0; display: grid; gap: .08rem; }
.insight__texto strong { font-size: .88rem; font-weight: 600; }
.insight__texto span { font-size: .8rem; }

.top-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.top-list li { display: flex; align-items: center; gap: .65rem; padding: .55rem 0; border-bottom: 1px solid var(--surface-2); }
.top-list li:last-child { border-bottom: 0; }
.top-rank { color: var(--muted); font-size: .78rem; width: 14px; text-align: right; }
.top-thumb { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; background: var(--surface-2); flex: 0 0 auto; }
.top-thumb--ph { display: grid; place-items: center; color: var(--muted); font-weight: 700; font-size: .82rem; }
.top-info { flex: 1; min-width: 0; display: grid; gap: .05rem; }
.top-info strong { font-size: .86rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-info span { font-size: .76rem; }
.top-total { font-size: .86rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.table--clean th,
.table--clean td { border-bottom: 1px solid var(--surface-2); }
.table--clean th { text-transform: none; letter-spacing: 0; font-size: .78rem; font-weight: 600; }
.table--clean td { font-size: .86rem; }

.dash-onboarding > summary,
.dash-settings > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.dash-onboarding > summary::-webkit-details-marker,
.dash-settings > summary::-webkit-details-marker { display: none; }
.dash-onboarding[open] > summary,
.dash-settings[open] > summary { margin-bottom: .8rem; }

@media (max-width: 1024px) {
  .kpi-grid--dash { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-grid--2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .page-head--dash h1 { font-size: 1.55rem; }
  .kpi-grid--dash { gap: .6rem; }
  .kpi-grid--dash .kpi { padding: .8rem .85rem; }
  .kpi__value { font-size: 1.55rem; }
  .chart-box--dash { height: 190px; }
  .dash-grid { gap: .7rem; }
  .table--clean th:nth-child(3),
  .table--clean td:nth-child(3),
  .table--clean th:nth-child(6),
  .table--clean td:nth-child(6) { display: none; }
}

/* Cabecera limpia: blanca, borde fino y navegacion discreta. */
.admin-header { background: #fff; border-bottom: 1px solid var(--border); }
.admin-header__inner { max-width: 1360px; padding: .55rem 1.25rem; gap: 1rem; }
.admin-nav a, .admin-grupo > summary { font-size: .88rem; padding: .42rem .68rem; }
.admin-nav a:hover, .admin-grupo > summary:hover { background: var(--surface-2); color: var(--text); }
.admin-grupo__panel {
  box-shadow: 0 10px 30px rgba(17, 24, 39, .12);
  border-radius: 10px;
  padding: .35rem;
}
.admin-grupo__panel a:hover { background: var(--surface-2); color: var(--text); }
.admin-brand__mark { border-radius: 8px; }
.admin-plan { font-size: .76rem; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: .15rem .55rem; }

/* Avisos neutros y sin switch flotante que ensucie la pantalla. */
#tema-toggle { display: none !important; }
.admin-trial {
  background: #fff;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.admin-trial a { color: var(--accent); }
.admin-trial--vencida {
  background: #fff;
  border-bottom-color: #fca5a5;
  color: #b91c1c;
}
.admin-trial--limitado {
  background: #fffbeb;
  border-bottom-color: #fcd34d;
  color: #92400e;
}
.soporte-aviso {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  color: #1d4ed8;
}
.soporte-aviso a { color: #1d4ed8; }

/* Navegacion en una sola linea en escritorio; scroll horizontal si no cabe. */
@media (min-width: 901px) {
  .admin-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .admin-nav::-webkit-scrollbar { display: none; }
  .admin-nav > * { flex: 0 0 auto; }
}

/* Pedidos como filas legibles en movil. */
@media (max-width: 600px) {
  .page-head--dash .page-head__actions { width: 100%; }
  .page-head--dash .page-head__actions .btn { flex: 1; }
  .table--clean thead { display: none; }
  .table--clean tbody tr {
    display: block;
    padding: .7rem 0;
    border-bottom: 1px solid var(--surface-2);
  }
  .table--clean tbody tr:last-child { border-bottom: 0; }
  .table--clean td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    border: 0;
    padding: .12rem 0;
  }
  .table--clean td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: .76rem;
    font-weight: 500;
  }
  .table--clean td:nth-child(3),
  .table--clean td:nth-child(6) { display: none; }
}

.table--clean td[data-label=""]::before { content: none; }
@media (max-width: 600px) {
  .table--clean td[data-label=""] { justify-content: flex-end; }
}

.chart-vacio {
  min-height: 200px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 1rem;
}

/* --------------------------------------------------------------------------
   Sidebar lateral estilo Uber (escritorio). En movil se conserva la barra
   superior con hamburguesa.
   -------------------------------------------------------------------------- */
@media (min-width: 901px) {
  .admin-header {
    position: fixed;
    inset: 0 auto 0 0;
    width: 248px;
    height: 100dvh;
    border-right: 1px solid var(--border);
    border-bottom: 0;
    overflow: visible;
    z-index: 40;
  }
  .admin-header__inner {
    height: 100%;
    max-width: none;
    margin: 0;
    padding: 1rem .85rem;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: .55rem;
  }
  .admin-brand { padding: .15rem .45rem .55rem; }
  .admin-brand span { font-size: .98rem; }
  .admin-brand small { font-size: .72rem; }
  .admin-plan { align-self: flex-start; margin: 0 .45rem .55rem; }

  .admin-nav {
    flex: 1 1 auto;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 2px;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
    scrollbar-width: thin;
  }
  .admin-nav > a,
  .admin-grupo > summary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .52rem .7rem;
    border-radius: 8px;
    font-size: .9rem;
    text-align: left;
  }
  .admin-nav > a { justify-content: flex-start; }
  .admin-grupo { position: static; width: 100%; }
  .admin-grupo > summary::after { transition: transform .15s ease; }
  .admin-grupo[open] > summary::after { transform: rotate(180deg); }
  .admin-grupo__panel {
    position: static;
    display: none;
    min-width: 0;
    margin: .15rem 0 .35rem .55rem;
    padding: .1rem 0 .1rem .55rem;
    border: 0;
    border-left: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }
  .admin-grupo[open] > .admin-grupo__panel { display: grid; }
  .admin-grupo__panel a {
    padding: .42rem .55rem;
    border-radius: 7px;
    font-size: .85rem;
  }

  .admin-header__right {
    margin-top: auto;
    padding-top: .75rem;
    border-top: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: .35rem;
  }
  .admin-header__right > a,
  .admin-header__right form,
  .admin-header__right form .btn { width: 100%; }
  .admin-header__right > a { padding: .4rem .2rem; font-size: .84rem; }
  .campana { align-self: flex-start; }

  .admin-main {
    margin-left: 248px;
    max-width: 1400px;
    padding: 1.75rem 2rem 3rem;
  }
  .admin-footer { margin-left: 248px; }
}

@media (max-width: 900px) {
  .admin-trial { margin-bottom: .8rem; }
}

@media (min-width: 901px) {
  .admin-brand { min-width: 0; }
  .admin-brand > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* -------------------------------------------------------- caja rapida --- */
/* Modo mostrador: una pantalla, botones grandes y cobro sin datos. */
.pos--caja .pos__campo-cliente,
.pos--caja .cliente-picker {
  display: none !important;
}

.pos--caja .pos__panel--cliente .form {
  gap: 0.6rem;
}

.pos--caja .pos__grid {
  grid-template-columns: repeat(var(--pos-cols, 4), minmax(0, 1fr));
}

.pos--caja .pos-boton {
  min-height: 96px;
  padding: 0.8rem 0.9rem;
}

.pos--caja .pos-boton__nombre {
  font-size: 1.08rem;
}

.pos--caja .pos-boton__precio {
  font-size: 1.2rem;
}

[data-fotos="0"] .pos-boton__foto {
  display: none;
}

.pos-boton__variante {
  display: inline-block;
  justify-self: start;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.18);
  color: #bfdbfe;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pos-boton__cantidad {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.pos__cantidad {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.pos-multiplicador {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 0.2rem 0 0.8rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.pos-multiplicador button {
  min-width: 46px;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.pos-multiplicador button.is-active {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.18);
}

.pos-pago-rapido {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.pos-pago-rapido__btn {
  min-height: 58px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.pos-pago-rapido__btn.is-active {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.16);
}

.pos-billetes {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.pos-billetes__btn {
  min-width: 58px;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.pos-billetes__btn.is-active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.18);
}

.pos-teclado {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(2, 6, 23, 0.72);
}

.pos-teclado[hidden] {
  display: none;
}

.pos-teclado__caja {
  width: min(360px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.pos-teclado__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pos-teclado__cerrar {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.pos-teclado__valor {
  display: block;
  margin: 0.7rem 0;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  font-size: 2.6rem;
  font-weight: 800;
  text-align: right;
}

.pos-teclado__teclas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.pos-teclado__teclas button {
  min-height: 58px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2, var(--surface));
  color: var(--text);
  font: inherit;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
}

.pos-teclado__teclas .is-ok {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.pos-espera {
  margin-top: 0.8rem;
  border-top: 1px dashed var(--border);
  padding-top: 0.7rem;
}

.pos-espera__lista {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.pos-espera__item {
  display: flex;
  gap: 0.4rem;
}

.pos-espera__recuperar {
  flex: 1;
  display: grid;
  gap: 0.1rem;
  text-align: left;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.pos-espera__quitar {
  width: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: #fca5a5;
  font: inherit;
  cursor: pointer;
}

.pos-sin-red {
  margin-bottom: 0.8rem;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  background: #7c2d12;
  color: #fed7aa;
  font-weight: 600;
}

.caja-folio {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem 1.2rem;
  border: 2px solid #22c55e;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.04));
}

.caja-folio__etiqueta {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.caja-folio__numero {
  display: block;
  font-size: clamp(2.6rem, 8vw, 4.2rem);
  line-height: 1;
  color: #4ade80;
}

.caja-folio__acciones {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge--offline {
  background: #f59e0b;
  color: #111827;
}

.order-variante {
  display: block;
  color: #93c5fd;
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .pos--caja .pos__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .caja-folio {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* En caja, los datos del cliente solo aparecen si el pedido es a domicilio. */
.pos--caja.pos--domicilio .pos__campo-datos,
.pos--caja.pos--domicilio #pos-campo-direccion {
  display: block !important;
}

/* Total y Cobrar siempre a la vista en caja rapida. */
.pos-resumen {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.6rem 0.8rem;
  border: 2px solid #22c55e;
  border-radius: 14px;
  background: rgba(34, 197, 94, 0.1);
}

.pos-resumen span {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.pos-resumen strong {
  font-size: 1.6rem;
  color: #4ade80;
  line-height: 1.1;
}

/* La columna de cobro se queda a la vista y hace scroll propio: el total y el
   boton Cobrar no se pierden al bajar por el menu. */
.pos--caja .pos__lado {
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  align-content: start;
  padding-right: 4px;
}

.pos--caja .pos-resumen {
  position: sticky;
  top: 0;
  z-index: 8;
  background: var(--surface);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* Ventas que quedaron sin enviar (offline) y requieren decision del cajero. */
.pos-pendientes {
  margin-top: 0.9rem;
  border-top: 1px dashed var(--border);
  padding-top: 0.7rem;
}

.pos-pendientes h3 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
}

.pos-pendientes__lista {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.pos-pendientes__item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.55rem 0.6rem;
  border: 1px solid #f59e0b;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.08);
}

.pos-pendientes__datos {
  display: grid;
  gap: 0.1rem;
}

.pos-pendientes__error {
  color: #fca5a5;
}

.pos-pendientes__acciones {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
}

.pos-pendientes__quitar {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: #fca5a5;
  cursor: pointer;
  font: inherit;
}


/* ------------------------------------------------- panel de instalacion --- */
/* El banner se muestra solo cuando hay aviso nativo o instrucciones manuales. */
.panel-install {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  background: #eef2ff;
  color: #1e3a8a;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid #c7d2fe;
}

#panel-install[hidden] {
  display: none !important;
}

#panel-install-hint {
  flex-basis: 100%;
  text-align: center;
  font-size: 0.82rem;
}

.install-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(2, 6, 23, 0.72);
}

.install-modal[hidden] {
  display: none !important;
}

.install-modal__card {
  position: relative;
  width: min(430px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.install-modal__card h2 {
  margin: 0 0 0.5rem;
  padding-right: 2rem;
  font-size: 1.15rem;
}

.install-modal__close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.install-modal__pasos {
  display: grid;
  gap: 0.5rem;
  margin: 0.8rem 0 1rem;
  padding-left: 1.2rem;
}

.install-modal__acciones {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .campana__panel {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    max-height: 82vh;
    border-radius: 16px 16px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .campana__lista {
    max-height: calc(82vh - 200px);
  }
}

/* Explicacion de Mercado Pago antes de conectar la cuenta del negocio. */
.mp-explica {
  display: grid;
  gap: 0.45rem;
  margin: 0.6rem 0 0.9rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.08);
  font-size: 0.88rem;
  line-height: 1.45;
}

.mp-explica p {
  margin: 0;
}

/* La etiqueta de sonido no debe partirse en tres lineas en movil. */
.campana__sonido {
  white-space: nowrap;
  flex-shrink: 0;
}

/* Aviso de copia de menú en segundo plano. */
.admin-clon {
  margin: 0.6rem 1rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.12);
  color: #bfdbfe;
  font-size: 0.86rem;
}

.admin-clon--error {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
}

.admin-clon form {
  display: inline;
  margin-left: 0.4rem;
}

/* Galería de portadas (Marketing → Portada y banner). */
.banner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.8rem;
}

.banner-opcion {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.5rem;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
}

.banner-opcion.is-actual,
.banner-opcion:has(input:checked) {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.08);
}

.banner-opcion input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.banner-opcion input:disabled + .banner-thumb {
  opacity: 0.55;
}

.banner-thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.12rem;
  min-height: 122px;
  padding: 0.7rem;
  border-radius: 10px;
  overflow: hidden;
  color: #fff;
  background: #0b1220;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.banner-thumb strong,
.banner-thumb small {
  position: relative;
  z-index: 1;
}

.banner-thumb strong {
  font-size: 0.95rem;
  line-height: 1.2;
}

.banner-thumb small {
  font-size: 0.7rem;
  line-height: 1.25;
  opacity: 0.86;
}

.banner-thumb__inicial {
  position: absolute;
  right: 0.45rem;
  top: -0.1rem;
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  opacity: 0.16;
  z-index: 0;
}

.banner-thumb__logo {
  position: absolute;
  right: 0.5rem;
  top: 0.5rem;
  width: 36px;
  height: 36px;
  object-fit: contain;
  padding: 2px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  z-index: 2;
}

.banner-thumb__badge {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  margin-bottom: 0.15rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.banner-thumb__badge--cerrado {
  background: #475569;
  color: #fff;
}

/* Vista previa y punto focal del banner (1600x700). */
.banner-recorte[hidden],
.banner-foco[hidden] {
  display: none !important;
}

.banner-recorte {
  position: relative;
  width: 100%;
  aspect-ratio: 1600 / 700;
  margin: 0.6rem 0;
  overflow: hidden;
  border-radius: 12px;
  background: #0b1220;
}

.banner-recorte img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.banner-recorte__guia {
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  pointer-events: none;
}

.banner-foco {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 0.8rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}

.banner-foco label {
  display: grid;
  gap: 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.banner-foco input[type="range"] {
  width: 100%;
  accent-color: var(--ember);
}

.banner-foco p {
  margin: 0;
  font-size: 0.75rem;
}

/* Propuestas IA y prueba A/B. */
.banner-propuestas,
.banner-ab-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.banner-propuesta,
.banner-ab-card {
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.banner-propuesta img,
.banner-ab-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.45rem;
  background: var(--surface-2);
}

.banner-propuesta__ab {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.banner-ab-card p {
  margin: 0.2rem 0 0.6rem;
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .banner-propuestas,
  .banner-ab-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .banner-propuestas,
  .banner-ab-grid {
    grid-template-columns: 1fr;
  }
}

.banner-thumb--marca {
  background-image: linear-gradient(90deg, #0b1220 0%, #172c4a 100%);
}

.banner-thumb--claro {
  background: #f6f1e7;
  color: #0f172a;
}

.banner-thumb--claro .banner-thumb__badge {
  background: #166534;
}

.banner-thumb--premium {
  background-image: radial-gradient(circle at 88% 0%, #493a16 0%, #0b0b0d 62%);
}

.banner-thumb--premium .banner-thumb__badge {
  background: #d4af37;
  color: #111;
}

.banner-thumb--monograma {
  background-image: radial-gradient(circle at 88% 0%, #1e3a5f 0%, #0b1220 62%);
}

.banner-thumb--foto::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 15, 28, 0.88) 0%, rgba(8, 15, 28, 0.35) 100%);
  z-index: 0;
}

.banner-opcion__texto {
  display: grid;
  gap: 0.1rem;
  padding: 0 0.2rem 0.15rem;
}

.banner-opcion__texto strong {
  font-size: 0.86rem;
}

.banner-opcion__texto small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

#hero-badge-texto-label[hidden] {
  display: none !important;
}

/* ==========================================================================
   Navegacion facil (2026-11-05)
   - Buscador de pantallas (Ctrl+K), barra inferior del celular, barra de
     total en el punto de venta, accesos rapidos en Inicio y toques de 44 px.
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Boton de busqueda en la cabecera */
.admin-buscar-boton {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}
.admin-buscar-boton kbd {
  font-family: inherit;
  font-size: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 0.3rem;
}

/* Ventana de busqueda */
.admin-buscar {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(7, 12, 20, 0.55);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 10vh 1rem 1rem;
}
.admin-buscar[hidden] { display: none; }
.admin-buscar__caja {
  width: min(560px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  padding: 0.9rem;
}
.admin-buscar__campo {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  min-height: 48px;
}
.admin-buscar__lista {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  max-height: 55vh;
  overflow-y: auto;
}
.admin-buscar__item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  min-height: 44px;
  justify-content: center;
}
.admin-buscar__item span { font-size: 0.8rem; }
.admin-buscar__item.is-sel,
.admin-buscar__item:hover { background: var(--surface-2); outline: 2px solid var(--accent); outline-offset: -2px; }
.admin-buscar__vacio { padding: 0.8rem; color: var(--muted); }
.admin-buscar__ayuda { font-size: 0.78rem; margin: 0.6rem 0 0; }

/* Accesos rapidos de Inicio */
.inicio-rapido {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}
.inicio-rapido__item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  min-height: 84px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
.inicio-rapido__item strong { font-size: 1.05rem; }
.inicio-rapido__item span { color: var(--muted); font-size: 0.82rem; }
.inicio-rapido__item:hover { border-color: var(--accent); text-decoration: none; }
.inicio-rapido__item--primario { background: var(--accent); border-color: var(--accent); color: #fff; }
.inicio-rapido__item--primario span { color: rgba(255, 255, 255, 0.85); }

/* Barra de total del punto de venta: solo en celular */
.pos-barra-movil { display: none; }

/* Escritorio: sin barra inferior ni barra de total */
@media (min-width: 901px) {
  .admin-tabbar { display: none !important; }
}

@media (max-width: 900px) {
  /* Barra inferior fija con lo mas usado */
  .admin-tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 0.25rem 0.25rem calc(0.25rem + env(safe-area-inset-bottom));
  }
  .admin-tabbar a,
  .admin-tabbar button {
    flex: 1 1 0;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.4rem 0.2rem;
    font: inherit;
    font-size: 0.8rem;
    color: var(--muted);
    background: none;
    border: 0;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
  }
  .admin-tabbar .is-active { color: var(--accent); font-weight: 700; }

  /* Deja espacio para que la barra no tape el contenido */
  .admin-main { padding-bottom: 5.5rem; }

  /* El menu completo baja desde la cabecera y se puede recorrer */
  .admin-header.nav-abierto .admin-nav {
    max-height: 70vh;
    overflow-y: auto;
    padding-bottom: 0.5rem;
  }

  /* Tabs horizontales: se deslizan con el dedo en vez de partirse en varias lineas */
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
  }
  .tabs a { flex: 0 0 auto; min-height: 40px; display: inline-flex; align-items: center; }

  /* Punto de venta: barra fija con el total, arriba de la barra inferior */
  .pos-barra-movil {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    position: fixed;
    left: 0.5rem;
    right: 0.5rem;
    bottom: calc(4.4rem + env(safe-area-inset-bottom));
    z-index: 55;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.5rem 0.6rem 0.5rem 0.9rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  }
  .pos-barra-movil > div { display: flex; flex-direction: column; min-width: 0; }
  .pos-barra-movil span { font-size: 0.78rem; color: var(--muted); }
  .pos-barra-movil strong { font-size: 1.25rem; }
  .pos-barra-movil .btn { min-height: 44px; }
  .pos__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
  .pos__lado .pos__panel { scroll-margin-top: 5rem; }

  /* Mas espacio cuando el punto de venta esta abierto */
  body:has(.pos-barra-movil) .admin-main { padding-bottom: 9.5rem; }
}

/* Dedos, no mouse: los controles principales miden al menos 44 px */
@media (pointer: coarse) {
  .admin-nav > a,
  .admin-grupo > summary,
  .admin-grupo__panel > a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .admin-nav-toggle { min-width: 44px; min-height: 44px; justify-content: center; }
  .admin-buscar-boton { min-height: 44px; }
}

/* En celular el boton de busqueda queda solo como lupa */
@media (max-width: 900px) {
  .admin-buscar-boton__texto,
  .admin-buscar-boton kbd { display: none; }
  .admin-buscar-boton { padding: 0.4rem 0.6rem; }
}

/* ==========================================================================
   Menu agrupado, personalizable, hoja de opciones y valores visibles (2026-11-05)
   ========================================================================== */

/* Los enlaces ocultos por el usuario no deben volver a aparecer por display */
.admin-nav [hidden] { display: none !important; }

.admin-personalizar {
  margin-top: 0.6rem;
  border-top: 1px dashed var(--border);
  padding-top: 0.5rem;
}
.admin-personalizar > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.88rem;
  padding: 0.45rem 0.6rem;
  min-height: 40px;
  display: flex;
  align-items: center;
}
.admin-personalizar > p { font-size: 0.8rem; margin: 0.3rem 0.6rem 0.5rem; }
.admin-personalizar__lista { max-height: 50vh; overflow-y: auto; padding: 0 0.6rem; }
.admin-personalizar__grupo { margin: 0.5rem 0; }
.admin-personalizar__grupo > strong { font-size: 0.82rem; color: var(--muted); }
.admin-personalizar__opcion {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 36px;
  font-size: 0.9rem;
  cursor: pointer;
}
.admin-personalizar__opcion input { width: 18px; height: 18px; flex: 0 0 auto; }
.admin-personalizar > button { margin: 0.4rem 0.6rem 0.2rem; }

/* Valores visibles bajo las barras (antes solo aparecian con el mouse) */
.dia-valores { display: block; font-size: 0.66rem; color: var(--muted); white-space: nowrap; }

/* Hoja de opciones del punto de venta */
.pos-hoja {
  position: fixed;
  inset: 0;
  z-index: 180;
  background: rgba(7, 12, 20, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.pos-hoja[hidden] { display: none; }
.pos-hoja__caja {
  width: min(520px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.pos-hoja__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1rem 0.4rem;
}
.pos-hoja__head h2 { margin: 0; font-size: 1.15rem; }
.pos-hoja__cerrar {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}
.pos-hoja__cuerpo { overflow-y: auto; padding: 0 1rem; flex: 1 1 auto; }
.pos-hoja__grupo {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  margin: 0.6rem 0;
}
.pos-hoja__grupo legend { font-weight: 700; padding: 0 0.3rem; }
.pos-hoja__ayuda { margin: 0.1rem 0 0.2rem; font-size: 0.82rem; }
.pos-hoja__pista { margin: 0.1rem 0 0.4rem; font-size: 0.8rem; color: var(--muted); }
.pos-hoja__opcion {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 48px;
  padding: 0.35rem 0.2rem;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
}
.pos-hoja__opcion input { width: 22px; height: 22px; flex: 0 0 auto; }
.pos-hoja__aviso {
  margin: 0.2rem 1rem 0;
  color: #b45309;
  font-size: 0.9rem;
  font-weight: 600;
}
.pos-hoja__pie {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem calc(0.8rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.pos-hoja__pie > div { display: flex; flex-direction: column; }
.pos-hoja__pie span { font-size: 0.8rem; color: var(--muted); }
.pos-hoja__pie strong { font-size: 1.3rem; }
.pos-hoja__pie .btn { min-height: 48px; }
.pos-hoja__pie .btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* En celular la hoja sube desde abajo, como en las apps de pedidos */
@media (max-width: 640px) {
  .pos-hoja { align-items: flex-end; padding: 0; }
  .pos-hoja__caja { width: 100%; max-height: 85vh; border-radius: 18px 18px 0 0; }
}
.admin-personalizar__estado { color: #b45309; font-size: .8rem; margin: .3rem .6rem; }
