/* ===========================================================================
   EasyTable · screens.css — estilos propios de cada pantalla
   ---------------------------------------------------------------------------
   Actividad (cocina), Productos, Categorías, Mesas, Personal/Mi perfil,
   Tickets, formulario de producto, Configuración, Promociones y Login.
   Incluye al final los media queries responsivos.
   =========================================================================== */

/* ---- Actividad / Cocina ---- */
.col-head { padding: 12px 16px; border-radius: 12px; font-weight: 800; letter-spacing: .04em; display: flex; align-items: center; gap: 9px; }
.col-head.prep { background: #fdf1e3; color: #c87f1c; }
.col-head.ready { background: #e7f7ee; color: var(--green-d); }
.col-head.delivered { background: #fdeef2; color: var(--crimson); }
[data-theme="dark"] .col-head.prep { background: rgba(245, 166, 35, .16); color: #f5c777; }
[data-theme="dark"] .col-head.ready { background: rgba(31, 191, 108, .16); }
[data-theme="dark"] .col-head.delivered { background: rgba(239, 17, 73, .16); }
.done-tag { font-size: 12px; font-weight: 700; color: var(--green-d); white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
/* Pie de la columna Entregados: "Ver más" + filtro de rango en la cabecera */
.delivered-more { cursor: pointer; color: var(--crimson); font-weight: 700; }
.delivered-more:hover { border-color: var(--crimson); }
.col-head .col-filter { margin-left: auto; width: auto; font-size: 11px; font-weight: 700; color: inherit; background: var(--card); border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 8px; cursor: pointer; }
.col-sub { font-size: 12px; color: var(--muted); margin: 6px 2px 0; }
.ticket { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: var(--shadow-sm); }
.ticket-head { align-items: flex-start; gap: 12px; }
.ticket-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ticket-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: 0 0 44px; background: var(--surface-soft); border: 1px solid var(--line-2); }
.ticket .who { font-weight: 800; color: var(--navy); line-height: 1.15; }
.ticket-table-chip { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; padding: 3px 8px; border-radius: 999px; background: #eef7ff; color: #2563eb; font-size: 12px; font-weight: 500; line-height: 1.1; }
.ticket-table-chip .ic { background: #2563eb; }
.ticket-table-chip b { font-weight: 500; }
[data-theme="dark"] .ticket-table-chip { background: rgba(37, 99, 235, .16); color: #93c5fd; }
[data-theme="dark"] .ticket-table-chip .ic { background: #93c5fd; }
.ticket .when { text-align: right; font-size: 12px; color: var(--muted); }
.ticket .when-l { display: inline-flex; align-items: center; gap: 4px; }
.dish { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); transition: background .15s; }
.dish .thumb { width: 36px; height: 36px; flex-basis: 36px; font-size: 18px; overflow: hidden; }
.dish .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dish-name { display: block; font-weight: 700; color: var(--navy); line-height: 1.15; }
.dish-note { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); line-height: 1.25; }
/* Nota de cocina (por producto): plegada por defecto; puede ser una receta larga */
.dish-knote { margin-top: 4px; font-size: 12px; }
.dish-knote summary { cursor: pointer; color: var(--crimson); font-weight: 700; list-style: none; }
.dish-knote summary::-webkit-details-marker { display: none; }
.dish-knote summary::after { content: " ›"; }
.dish-knote[open] summary::after { content: " ⌄"; }
.dish-knote p { margin: 6px 0 0; padding: 8px 10px; background: var(--surface-soft); border: 1px solid var(--line-2); border-radius: 10px; color: var(--ink); white-space: pre-wrap; line-height: 1.45; max-height: 260px; overflow-y: auto; }
.dish:first-of-type { border-top: none; }
.dish.moving { animation: dishright .36s ease forwards; pointer-events: none; }
@keyframes dishright {
  0%   { opacity: 1; transform: translateX(0); }
  60%  { opacity: 1; transform: translateX(40px); background: #e7f7ee; }
  100% { opacity: 0; transform: translateX(90px); }
}

/* ---- Productos (tabla / barra de filtros) ---- */
.prod-toolbar { display: flex; align-items: center; gap: 14px; }
.prod-toolbar .tabs-line { flex: 1; min-width: 0; }
.list-row { display: grid; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow-sm); }
.list-row .name { font-weight: 700; color: var(--navy); }
.list-row.products { grid-template-columns: 1fr 120px 90px 90px 50px 44px; }
.cell { text-align: center; } .cell .v { font-weight: 700; font-size: 18px; } .cell .v.green { color: var(--green-d); } .cell .t { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.add-bar { width: 100%; padding: 16px; text-align: center; }

/* Sub-pestañas Productos/Categorías (sección fusionada) */
.sub-tabs { display: inline-flex; gap: 4px; background: var(--surface-soft); border: 1px solid var(--line-2); border-radius: 12px; padding: 4px; }
.sub-tabs button { border: none; background: none; padding: 8px 18px; border-radius: 9px; color: var(--muted); font-weight: 600; }
.sub-tabs button.active { background: var(--navy-solid); color: #fff; font-weight: 700; box-shadow: var(--shadow-sm); }
.sub-tabs button:hover:not(.active) { color: var(--ink); }

/* Estadísticas del encabezado: caja con fondo y celdas separadas por línea */
.head-stats { display: flex; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 4px; box-shadow: var(--shadow-sm); }
.head-stats .cell { padding: 0 18px; }
.head-stats .cell + .cell { border-left: 1px solid var(--line-2); }

/* Conmutador de vista del listado (lista / cards) */
.view-toggle { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.view-toggle button { border: none; background: var(--surface-soft); padding: 8px 12px; display: grid; place-items: center; color: var(--muted); border-radius: 0; }
.view-toggle button.active { background: var(--card); color: var(--crimson); }
.view-toggle button:hover:not(.active) { color: var(--ink); }

/* Vista de cards de productos — mismo look que las tarjetas del comensal
   (.pcard en comensal.css): imagen 1:1 redondeada con sombra, sin caja,
   nombre en mayúsculas y precio bold; el lápiz flota como el "+" de allá. */
.prod-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.prod-card { position: relative; display: flex; flex-direction: column; }
.prod-card .pc-img { position: relative; aspect-ratio: 1 / 1; border-radius: 18px; background: var(--surface-soft); display: grid; place-items: center; overflow: hidden; box-shadow: 0 3px 10px rgba(25, 28, 60, .08); }
.prod-card .pc-img img { width: 100%; height: 100%; object-fit: cover; }
.prod-card .pc-img img.default-icon { width: 46px; height: 46px; object-fit: contain; opacity: .5; }
.prod-card .pc-edit { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(15, 15, 25, .85); color: #fff; display: grid; place-items: center; padding: 0; font-size: 15px; transition: background .15s, transform .1s; }
.prod-card .pc-edit:hover { background: var(--crimson); transform: scale(1.08); }
.prod-card .pc-edit:active { transform: scale(.92); }
/* Filas y cards clicables (abren el detalle) + hover del botón editar en listas */
.prod-card.clickable, .list-row.clickable { cursor: pointer; }
.list-row.clickable:hover { border-color: var(--navy); }
.list-row button:hover, .cat-row button:hover { border-color: var(--navy); color: var(--navy); }
/* Miniaturas del listado siempre cuadradas y recortadas */
.list-row .thumb, .cat-thumb { overflow: hidden; }
.prod-card .pc-body { padding: 10px 2px 0; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.prod-card .pc-body .name { font-weight: 800; color: var(--navy); line-height: 1.3; font-size: 12.5px; text-transform: uppercase; letter-spacing: .01em; }
.prod-card .pc-cats { color: var(--muted); font-size: 12px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.prod-card .pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }
.prod-card .pc-price { font-weight: 800; color: var(--navy); font-size: 15.5px; white-space: nowrap; }

/* Modal de detalle de producto. La imagen se muestra completa (contain):
   encaja vertical u horizontal sin recortarse, sobre fondo suave. */
.modal.pd-modal { width: min(680px, 100%); }
.pd-img { aspect-ratio: 16 / 10; border-radius: 14px; background: var(--surface-soft); display: grid; place-items: center; overflow: hidden; }
.pd-img img { width: 100%; height: 100%; object-fit: contain; }
.pd-img img.default-icon { width: 56px; height: 56px; object-fit: contain; opacity: .5; }
.pd-thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pd-badge { font-size: 11px; font-weight: 800; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--surface-soft); color: var(--muted); white-space: nowrap; }
.pd-badge.on { background: #e7f7ee; color: var(--green-d); }
[data-theme="dark"] .pd-badge.on { background: rgba(31, 191, 108, .18); }
.pd-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.pd-row:last-of-type { border-bottom: none; }
.pd-row b { color: var(--navy); }
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.pd-grid .t { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.pd-grid .v { font-weight: 600; color: var(--ink); margin-top: 2px; }
/* Nota para cocina dentro del detalle del producto */
.pd-knote p { margin: 6px 0 0; padding: 10px 12px; background: var(--surface-soft); border: 1px solid var(--line-2); border-radius: 10px; font-size: 13px; white-space: pre-wrap; line-height: 1.5; max-height: 220px; overflow-y: auto; }

/* ---- Mesas ---- */
.area-block { padding: 6px 0 18px; border-bottom: 1px solid var(--line-2); }
.area-block:last-child { border-bottom: none; padding-bottom: 0; }
.area-title { font-size: 22px; color: var(--navy); margin: 10px 0 18px; }
.area-title.dim { opacity: .5; }
.tables-grid { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.table-cell { width: 92px; text-align: center; position: relative; }
.table-node { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--line-2);
  background: var(--card); color: var(--ink); font-size: 20px; font-weight: 600; margin: 0 auto; padding: 0;
  display: grid; place-items: center; }
.table-node.occ { background: var(--green); border-color: var(--green); color: #fff; }
/* Mesa pendiente de habilitar (comensales esperando que el personal la abra) */
.table-node.pending { background: #ffb020; border-color: #ffb020; color: #fff; animation: pendPulse 1.6s ease-in-out infinite; }
@keyframes pendPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 176, 32, .45); } 50% { box-shadow: 0 0 0 6px rgba(255, 176, 32, 0); } }
.t-cap { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.3; }
.t-cap.occ { color: var(--green-d); }
.t-cap.pending { color: #b5740a; font-weight: 700; }
.t-enable { margin-top: 6px; padding: 4px 12px; font-size: 12px; font-weight: 700; color: #fff;
  background: #ffb020; border: none; border-radius: 8px; cursor: pointer; }
.t-enable:hover { filter: brightness(1.05); }
/* Tipo de mesa bajo cada mesa */
.t-type { display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 11px; font-weight: 600; color: var(--navy); margin-top: 6px; }
.t-type .ic { background: var(--navy); }
/* Arrastre propio para mover/reordenar mesas (pointer events) */
.table-cell.mesa { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  border-radius: 12px; transition: opacity .12s; }
.table-cell.mesa .table-node { cursor: inherit; }
.table-cell.mesa img, .mesa-clone img { -webkit-user-drag: none; user-select: none; }
/* Mientras se arrastra: sin selección de texto ni cursor de "seleccionar" */
body.mesa-dragging { user-select: none; -webkit-user-select: none; cursor: grabbing; }
body.mesa-dragging * { cursor: grabbing !important; }
/* Clon que sigue al cursor */
.mesa-clone { position: fixed; left: 0; top: 0; z-index: 1200; pointer-events: none;
  width: 64px; opacity: .92; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .28)); }
.mesa-clone .table-node { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--green);
  background: var(--card); color: var(--ink); font-size: 20px; font-weight: 600;
  display: grid; place-items: center; }
.mesa-clone.swapping .table-node { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59, 130, 246, .35); }
/* Aviso "intercambiar" bajo el clon (absoluto: no descentra la mesa), en azul */
.clone-swap { position: absolute; top: 70px; left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: 11px; font-weight: 800; color: #fff; background: var(--blue);
  border-radius: 999px; padding: 3px 10px; }
.crear-mesa { width: 64px; height: 64px; border-radius: 50%; border: 2px dashed var(--green);
  background: var(--card); color: var(--green); font-size: 26px; margin: 0 auto; padding: 0;
  display: grid; place-items: center; }

/* Al empezar a arrastrar: mesas libres = destino válido de intercambio */
.table-cell.mesa.swap-ok .table-node { border-color: var(--green); border-style: dashed; }
/* Mesas ocupadas: deshabilitadas durante el arrastre (no se tocan) */
.table-cell.mesa.locked { opacity: .38; }
body.mesa-dragging .table-cell.locked, body.mesa-dragging .table-cell.locked * { cursor: not-allowed !important; }
/* Apuntada para intercambiar → se resalta con un anillo azul (swap = azul) */
.table-cell.drop-onto .table-node { box-shadow: 0 0 0 3px var(--blue); border-color: var(--blue); border-style: solid; }

/* Hueco de inserción: círculo punteado (como una mesa) que empuja a las demás */
.table-cell.ph { animation: phPop .12s ease; pointer-events: none; }
.ph-node { width: 64px; height: 64px; border-radius: 50%; border: 2px dashed var(--green);
  background: rgba(31, 191, 108, .10); margin: 0 auto; }
.table-cell.ph .t-cap { color: var(--green); font-weight: 700; }
@keyframes phPop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Barra "Deshacer" ARRIBA (para no traslaparse con los toasts, que van abajo) */
.undo-bar { position: fixed; left: 50%; top: 24px; transform: translateX(-50%); z-index: 9900;
  display: flex; align-items: center; gap: 14px; background: var(--navy-solid, #1a2233); color: #fff;
  padding: 10px 12px 10px 18px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  font-size: 14px; animation: undoIn .16s ease; }
.undo-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: none;
  color: var(--green); font-weight: 800; cursor: pointer; padding: 4px 10px; border-radius: 8px; font-size: 14px; }
.undo-btn:hover { background: rgba(255, 255, 255, .10); }
.undo-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: rgba(255, 255, 255, .16); color: #fff; font-size: 12px; font-weight: 800; }
@keyframes undoIn { from { transform: translate(-50%, -12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* Crear/editar mesa: tipos + previsualización */
.mesa-create { display: grid; grid-template-columns: 1fr 180px; gap: 18px; align-items: start; }
.mesa-preview { background: var(--surface-soft); border: 1px solid var(--line-2); border-radius: 14px; padding: 14px; text-align: center; }
.tprev { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.tprev-table { width: 90px; height: 70px; background: #cdb89a; border: 3px solid #b89e78; display: grid; place-items: center; color: #5a4a2f; font-weight: 800; }
.tprev-table.cuadrada { border-radius: 12px; }
.tprev-table.redonda { border-radius: 50%; width: 80px; height: 80px; }
.tprev-table.alta { border-radius: 12px; width: 60px; height: 86px; }
.tprev-table.sala { border-radius: 18px; width: 110px; height: 64px; background: #8aa0c8; border-color: #7388b0; color: #fff; }
.tprev-table.barra { border-radius: 8px; width: 120px; height: 40px; }
.tprev-seats { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; max-width: 140px; font-size: 16px; }
.shape-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.shape-pick { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1.5px solid var(--line-2); border-radius: 10px; background: var(--card); font-size: 13px; cursor: pointer; }
.shape-pick.sel { border-color: var(--crimson); background: #fdeef2; }
[data-theme="dark"] .shape-pick.sel { background: rgba(239, 17, 73, .16); }
.shape-ico { width: 18px; height: 16px; background: #cdb89a; display: inline-block; }
.shape-ico.cuadrada { border-radius: 4px; }
.shape-ico.redonda { border-radius: 50%; width: 16px; height: 16px; }
.shape-ico.alta { border-radius: 4px; width: 12px; height: 18px; }
.shape-ico.sala { border-radius: 7px; width: 22px; background: #8aa0c8; }
.shape-ico.barra { border-radius: 3px; width: 24px; height: 10px; }

/* Creación de mesas (rediseño) */
.modal:has(.mc) { width: min(560px, 100%); }
.mc label { display: block; font-size: 14px; color: var(--ink-soft); font-weight: 600; margin: 0 0 6px; }
.mc h3 { margin-bottom: 18px; }
.mc-grid { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; }
.mc-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mc-type { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 6px;
  border: 1.5px solid var(--line-2); border-radius: 14px; background: var(--card); cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--ink); }
.mc-type img { width: 30px; height: 30px; }
.mc-type.sel { border-color: var(--crimson); background: #fdeef2; color: var(--crimson); }
[data-theme="dark"] .mc-type.sel { background: rgba(239, 17, 73, .16); }
[data-theme="dark"] .mc-type img, [data-theme="dark"] .mc-seats img { filter: brightness(0) invert(1); }
.mc-preview { margin-top: 18px; background: var(--surface-soft); border: 1px solid var(--line-2);
  border-radius: 16px; padding: 18px; text-align: center; }
.mc-prev-title { color: var(--navy); font-size: 14px; margin-bottom: 16px; }
.mc-prev-title b { font-weight: 800; }
.mc-prev-stage { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }
.mc-table { width: 120px; height: 96px; border-radius: 16px; background: #e7c98f; border: 2px solid #d9b66e;
  display: grid; place-items: center; font-size: 30px; font-weight: 800; color: #5a4a2f; flex: 0 0 auto; }
.mc-seats { display: flex; flex-wrap: wrap; gap: 6px; max-width: 220px; }
.mc-seats img { width: 34px; height: 34px; }
.mc-prev-cap { color: var(--muted); font-size: 12px; margin-top: 14px; }

/* ---- Categorías (tabla) ---- */
.cat-table { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.cat-row { display: grid; grid-template-columns: 64px 1.6fr 210px 90px 72px 92px; align-items: center; gap: 12px; padding: 13px 18px; border-top: 1px solid var(--line); }
.cat-row.head { border-top: none; background: var(--surface-soft); color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.c-center { text-align: center; justify-self: center; }
.cat-order { font-weight: 800; color: var(--crimson); font-size: 18px; text-align: center; }
.cat-abbr { color: var(--crimson); font-weight: 700; font-size: 12px; }
.cat-name { color: var(--navy); font-weight: 600; }
.cat-thumb { width: 42px; height: 42px; border-radius: 10px; background: var(--surface-soft); border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 20px; overflow: hidden; flex: 0 0 42px; }
.cat-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cat-thumb.big { width: 64px; height: 64px; flex: 0 0 64px; font-size: 30px; }

/* ---- Personal / Mi perfil ---- */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.staff-card { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-sm); }
.staff-av { width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--line-2); background: var(--surface-soft); display: grid; place-items: center; font-size: 22px; overflow: hidden; flex: 0 0 48px; }
.staff-av img { width: 100%; height: 100%; object-fit: cover; }
.staff-av.big { width: 84px; height: 84px; flex: 0 0 84px; font-size: 36px; }
/* Mi perfil */
.profile-head { display: flex; align-items: center; gap: 18px; }
.profile-actions { display: flex; flex-direction: column; gap: 8px; align-self: center; flex: 0 0 auto; }
.profile-actions button { white-space: nowrap; }
.profile-name { font-size: 22px; font-weight: 800; color: var(--navy); }
.profile-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px 24px; }
.perm-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px 24px; }
.perm-title { font-weight: 700; color: var(--navy); margin-bottom: 8px; font-size: 14px; }
.perm-row { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 3px 0; color: var(--ink); }
.perm-row.off { color: var(--muted); }
.perm-check { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: var(--surface-soft); color: var(--muted); flex: 0 0 18px; }
.perm-row.on .perm-check { background: #e6f7ee; color: var(--green-d); }
[data-theme="dark"] .perm-row.on .perm-check { background: rgba(31, 191, 108, .18); }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.perm-group { border: 1px solid var(--line-2); border-radius: 12px; padding: 12px; }
.perm-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; font-size: 14px; color: var(--ink-soft); }
.staff-av.huge { width: 110px; height: 110px; flex: 0 0 110px; font-size: 48px; border-width: 4px; }

/* Nuevo perfil de personal: slider de avatar a la izquierda, campos (nombre
   arriba, rol abajo) a la derecha; al apilarlos quedan del mismo ancho. */
.staff-id-row { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; align-items: center; }
.staff-id-avatar { min-width: 0; }
.staff-id-fields { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 860px) {
  .staff-id-row { grid-template-columns: 1fr; gap: 18px; }
}

/* ---- Tickets ---- */
.tk-row { display: grid; grid-template-columns: 70px 1.5fr 1.1fr 1fr 1fr 1.3fr 132px;
  align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.tk-row:last-child { border-bottom: none; }
.tk-head { background: var(--surface-soft); color: var(--muted); font-size: 12px; letter-spacing: .05em;
  font-weight: 700; text-transform: uppercase; }
.tk-mesa { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2);
  display: grid; place-items: center; font-weight: 600; }
.tk-row button { padding: 8px 12px; font-size: 13px; font-weight: 600; }

/* Detalle del ticket (modal) */
.tkd-tax { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 0;
  border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); margin-top: 8px; }
.tkd-line { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.tkd-times { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.tkd-guests { padding: 6px 0; }
.tkd-guest { padding: 10px 0; border-bottom: 1px dashed var(--line-2); }
.tkd-guest-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tkd-av { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-soft); flex: 0 0 28px; }
.tkd-item { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ink-soft); padding: 3px 0; }
.tkd-folio { margin: 14px 0 4px; }
.tkd-qr { width: 220px; max-width: 100%; border-radius: 12px; background: #fff; margin: 6px auto 0; display: block; }

/* Selector de método de pago */
.pay-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 8px; }
.pay-method { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px;
  border: 1.5px solid var(--line-2); border-radius: 14px; background: var(--card); cursor: pointer; font-weight: 600; color: var(--navy); }
.pay-method:hover:not(:disabled) { border-color: var(--green); background: #f3fbf6; }
[data-theme="dark"] .pay-method:hover:not(:disabled) { background: rgba(31, 191, 108, .14); }

/* ---- Formulario Agregar producto (layout + vista previa) ---- */
.prod-layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: stretch; }
/* Sin scroll horizontal: permite que la columna 1fr (y las celdas del form-grid)
   encojan por debajo de su contenido mínimo; por defecto min-width:auto lo impide
   y empuja la columna fija de vista previa fuera del viewport. */
.prod-layout > *, .form-grid > * { min-width: 0; }
.split-row { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.triple-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.preview-sticky { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: 20px; }
.price-field { padding: 12px 14px; border: 1.5px solid #ffd7e0; border-radius: 12px; background: #fff5f7; }
.price-field .flabel { color: var(--crimson); font-weight: 700; }
.price-field input { border-color: #ffc2ce; }
[data-theme="dark"] .price-field { border-color: rgba(239, 17, 73, .35); background: rgba(239, 17, 73, .08); }
[data-theme="dark"] .price-field input { border-color: rgba(239, 17, 73, .45); }
.preview-card.highlight { border-color: #ffd7e0; box-shadow: 0 16px 40px rgba(239, 17, 73, .16); }
[data-theme="dark"] .preview-card.highlight { border-color: rgba(239, 17, 73, .35); }
.prev-img { position: relative; width: 100%; height: 170px; border-radius: 12px; background: var(--surface-soft); border: 1px solid var(--line-2);
  display: grid; place-items: center; font-size: 48px; overflow: hidden; cursor: pointer; }
.prev-img img { width: 100%; height: 100%; object-fit: cover; }
/* Sin imagen aún: caja punteada, ícono default centrado (chico) y "+" al centro */
.prev-img.empty { border: 2px dashed var(--line-2); }
.prev-img.empty img.default-icon { width: 64px; height: 64px; object-fit: contain; opacity: .35; }
.prev-plus { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 38px; height: 38px;
  border-radius: 50%; background: var(--crimson); color: #fff; font-size: 24px; font-weight: 700; line-height: 1;
  display: grid; place-items: center; box-shadow: 0 4px 12px rgba(239, 17, 73, .35); }

/* ---- Configuración: negocio ---- */
.cover-edit { height: 150px; border-radius: 14px; background: var(--surface-soft) center/cover no-repeat;
  display: flex; align-items: flex-end; justify-content: flex-end; padding: 12px; }
.cover-edit button { background: rgba(255,255,255,.92); }
.logo-row { display: flex; align-items: center; gap: 14px; margin-top: -36px; padding-left: 12px; }
.logo-box { width: 84px; height: 84px; border-radius: 18px; background: var(--card); border: 3px solid var(--card);
  box-shadow: var(--shadow); display: grid; place-items: center; font-size: 34px; overflow: hidden; }
.logo-box img { width: 100%; height: 100%; object-fit: cover; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.info-grid > div .tiny { margin-bottom: 2px; }

/* Delivery: selector de tarifa (única / por zona) + chips de zonas de reparto */
.seg { display: inline-flex; background: var(--surface-soft); border-radius: 12px; padding: 4px; gap: 4px; }
.seg-btn { border: none; background: transparent; padding: 9px 18px; border-radius: 9px; font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg-btn.sel { background: var(--card); color: var(--crimson); box-shadow: var(--shadow); }
.zone-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border: 1.5px solid var(--line-2);
  border-radius: 999px; background: var(--card); cursor: pointer; font-weight: 600; color: var(--navy); }
.zone-chip:hover { border-color: var(--crimson); }
.chip-x { border: none; background: var(--surface-soft); color: var(--muted); width: 20px; height: 20px; border-radius: 50%;
  padding: 0; box-sizing: border-box; font-size: 11px; line-height: 1; cursor: pointer; display: grid; place-items: center; flex: 0 0 auto; }
.chip-x:hover { background: var(--crimson); color: #fff; }

/* Enlace de acción discreto dentro de una celda tipo "dato de cuenta" (p.ej.
   "+ Agregar teléfono" cuando falta un dato en Mi perfil). */
.link-add { border: none; background: none; padding: 0; color: var(--green-d); font-weight: 700; font-size: 14px; cursor: pointer; }
.link-add:hover { text-decoration: underline; }

/* Redes y enlaces */
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.link-card { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; }
.link-card img { width: 34px; height: 34px; flex: 0 0 34px; }
.link-del { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 14px; }
.link-del:hover { color: var(--crimson); }
.link-type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.link-type { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px;
  border: 2px solid var(--line-2); border-radius: 12px; background: var(--card); cursor: pointer; }
.link-type img { width: 30px; height: 30px; }
.link-type.sel { border-color: var(--crimson); background: #fdeef2; }
[data-theme="dark"] .link-type.sel { background: rgba(239, 17, 73, .16); }
.link-type:disabled { opacity: .5; cursor: not-allowed; }
.url-input { display: flex; align-items: stretch; }
.url-prefix { display: flex; align-items: center; padding: 0 10px; background: var(--surface-soft); border: 1px solid var(--line-2);
  border-right: none; border-radius: 10px 0 0 10px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.url-input input { border-radius: 0 10px 10px 0; }

/* Planes */
.plan-banner { background: linear-gradient(110deg, #3b53d6, #5468e6); color: #fff; border-radius: 12px;
  padding: 14px 18px; font-size: 14px; margin-bottom: 16px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plan-card { position: relative; border: 1px solid var(--line-2); border-radius: 16px; padding: 18px; }
.plan-card.current { border-color: var(--crimson); box-shadow: 0 0 0 3px rgba(239,17,73,.12); }
.plan-card h4 { color: var(--navy); font-size: 18px; }
.plan-price { font-size: 24px; font-weight: 800; color: var(--navy); margin: 4px 0 12px; }
.plan-card ul { list-style: none; padding: 0; margin: 0 0 16px; }
.plan-card li { font-size: 13px; color: var(--ink-soft); padding: 4px 0; }
.plan-badge { position: absolute; top: 14px; right: 14px; background: var(--crimson); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }

/* ---- Promociones / Up-seller / Cross-seller ---- */
.promo-hero { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm);
  padding: 22px 28px; display: flex; align-items: center; gap: 20px; margin-bottom: 18px; overflow: hidden; }
.promo-hero h2 { font-size: 22px; color: var(--navy); margin-bottom: 8px; max-width: 540px; line-height: 1.25; }
.promo-hero h2 span { color: var(--crimson); }
.promo-hero p { margin: 0; color: var(--muted); font-size: 14px; max-width: 540px; line-height: 1.45; }
.promo-hero img { height: 150px; margin-left: auto; }
.promo-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.promo-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm);
  padding: 22px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.promo-card .pc-ill { height: 92px; margin-bottom: 6px; }
.promo-card h4 { color: var(--navy); font-size: 15px; letter-spacing: .04em; }
.promo-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.promo-card .pc-eg { color: var(--muted); font-size: 12px; font-style: italic; margin-bottom: 6px; }
.promo-card .btn-outline-green { margin-top: auto; width: 100%; padding: 11px; }
.promo-list { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); overflow: hidden; }
.promo-tabs { padding: 6px 18px 0; border-bottom: 1px solid var(--line-2); }
.promo-row { display: grid; grid-template-columns: 1.6fr 1.3fr 1.2fr 116px 70px 44px; gap: 14px; align-items: center;
  padding: 14px 18px; border-top: 1px solid var(--line); }
.promo-row:first-of-type { border-top: none; }
.promo-row .sub { font-size: 12px; color: var(--muted); }
.promo-dots { border: none; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 4px; }
.promo-dots:hover { color: var(--navy); }
/* Banner del comensal: miniatura/selector de imagen + estrella de banner de entrada */
.pb-btn { width: 34px; height: 34px; border-radius: 10px; border: 1.5px dashed var(--line-2); background: var(--card);
  display: grid; place-items: center; cursor: pointer; overflow: hidden; color: var(--muted); padding: 0; }
.pb-btn.has { border-style: solid; }
.pb-btn img { width: 100%; height: 100%; object-fit: cover; }
.pb-star { width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--card);
  color: #cfd4de; font-size: 17px; line-height: 1; cursor: pointer; padding: 0; }
.pb-star.on { color: #f5a623; border-color: #f5a623; background: #fff7e8; }
[data-theme="dark"] .pb-star.on { background: rgba(245, 166, 35, .14); }
@media (max-width: 720px) {
  .promo-cards { grid-template-columns: 1fr; }
  .promo-hero img { display: none; }
  .promo-row { grid-template-columns: 1.4fr 1fr 60px; }
  .promo-row > :nth-child(3), .promo-row > :nth-child(4), .promo-row > :nth-child(6) { display: none; }
}

/* ---- Comensales: clientes registrados y recientes ---- */
.cust-table { overflow-x: auto; }
.cust-row { display: grid; grid-template-columns: 42px 1.3fr 1.6fr 1fr 70px 1fr; gap: 10px; align-items: center;
  padding: 10px 4px; border-top: 1px solid var(--line); }
.cust-row:first-child { border-top: none; }
.cust-row.cust-head { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cust-row.recent { grid-template-columns: 42px 1.4fr 1fr 1fr 110px; }
.cust-av { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-soft); }
.cust-row .pill-ok { background: #e7f7ee; color: var(--green-d); }
[data-theme="dark"] .cust-row .pill-ok { background: rgba(31, 191, 108, .16); }
.cust-row .pill-warn { background: #fdf1e3; color: #c87f1c; }
[data-theme="dark"] .cust-row .pill-warn { background: rgba(200, 127, 28, .16); }
.cust-row .pill-mixed { background: #eef0f6; color: var(--navy); }
[data-theme="dark"] .cust-row .pill-mixed { background: rgba(117, 124, 148, .16); }
.guest-table { display: grid; gap: 10px; }
/* Encabezado alineado con las filas: mismas columnas y sangría (borde 1px del
   item + 12px de padding de la fila = 13px). Especificidad de 4 clases para
   ganarle a .cust-row.recent.guest-row. */
.cust-row.recent.guest-row.guest-head { position: sticky; top: 0; z-index: 1; background: var(--card);
  padding: 2px 13px 8px; border-top: none;
  font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.guest-item { border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; }
.guest-item.on { box-shadow: 0 8px 24px rgba(20, 20, 45, .08); }
.cust-row.recent.guest-row { border-top: none; padding: 12px 12px 10px; grid-template-columns: 42px 1.5fr 1fr 1.25fr 1.15fr 120px 1.35fr 120px; }
.cust-row.recent.guest-row .pill.c-center { justify-self: center; text-align: center; }
.guest-name { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
/* Pares de botones (pedidos / ticket): uno transparente con borde y otro sólido
   oscuro con texto blanco. --navy-solid no cambia con el tema, así el botón
   oscuro se ve bien en claro y oscuro; el outline usa tokens que sí responden. */
.orders-btn, .ticket-btn { border-radius: 14px; padding: 9px 12px; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: border-color .12s, background .12s, color .12s, transform .12s, box-shadow .12s; }
.orders-btn b { font-size: 13px; }
/* Pedidos: transparente con borde */
.orders-btn { background: transparent; border: 1px solid var(--line-2); color: var(--navy); }
.orders-btn:hover:not(:disabled) { border-color: var(--navy); background: var(--surface-soft);
  transform: translateY(-1px); box-shadow: 0 5px 14px rgba(20, 20, 50, .12); }
.orders-btn:active:not(:disabled) { transform: translateY(0) scale(.98); }
.orders-btn:disabled { opacity: .5; cursor: not-allowed; }
/* Ticket: sólido oscuro con texto blanco */
.ticket-btn { background: var(--navy-solid); border: 1px solid var(--navy-solid); color: #fff; }
.ticket-btn:hover:not(:disabled) { filter: brightness(1.12);
  transform: translateY(-1px); box-shadow: 0 5px 16px rgba(20, 20, 50, .2); }
.ticket-btn:active:not(:disabled) { transform: translateY(0) scale(.98); }
.ticket-btn:disabled { opacity: .5; cursor: not-allowed; }
[data-theme="dark"] .ticket-btn:disabled { opacity: .4; }

/* Vista de cuadrícula de últimos comensales */
.guest-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 14px; }
.guest-card { border: 1px solid var(--line); border-radius: 18px; background: var(--card); padding: 16px;
  display: flex; flex-direction: column; gap: 14px; transition: border-color .12s, box-shadow .12s, transform .12s; }
.guest-card:hover { border-color: var(--line-2); box-shadow: 0 10px 26px rgba(20, 20, 45, .10); transform: translateY(-2px); }
.guest-card .gc-top { display: flex; align-items: center; gap: 11px; }
.guest-card .gc-top .cust-av { width: 40px; height: 40px; flex: 0 0 40px; }
.guest-card .gc-top .guest-name { flex: 1; }
.guest-card .gc-table { flex: 0 0 auto; align-self: flex-start; font-size: 11px; font-weight: 700; color: var(--navy);
  background: var(--surface-soft); border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.guest-card .gc-status { display: flex; }
.guest-card .gc-status .pill { font-size: 12px; }
.guest-card .gc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; }
.guest-card .gc-meta .t { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.guest-card .gc-meta .v { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-top: 3px; line-height: 1.25; }
.guest-card .gc-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.guest-card .gc-foot .orders-btn, .guest-card .gc-foot .ticket-btn { width: 100%; }

/* Modal de pedidos de un comensal */
.orders-modal .modal-pad { max-height: 82vh; overflow: auto; }
.om-head { display: flex; align-items: center; gap: 12px; padding-right: 28px; }
.om-head .cust-av { width: 44px; height: 44px; flex: 0 0 44px; }
.om-head h3 { font-size: 20px; }
.om-orders { display: grid; gap: 10px; margin-top: 16px; }
.om-orders .guest-order { grid-template-columns: 1fr auto; align-items: start; }
.om-item { padding: 3px 0; }
.cust-link { border: 1px solid var(--line-2); background: var(--surface-soft); color: var(--navy); border-radius: 14px; padding: 8px 10px; font: inherit; font-weight: 700; cursor: pointer; display: grid; gap: 1px; }
.cust-link:disabled { opacity: .45; cursor: not-allowed; }
.cust-link b { font-size: 13px; }
.guest-expand { padding: 0 12px 12px 54px; display: grid; gap: 8px; }
.guest-order { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; background: var(--surface-soft); border: 1px solid var(--line-2); border-radius: 14px; padding: 10px 12px; }
.go-main { min-width: 0; }
.go-price { font-weight: 700; color: var(--navy); white-space: nowrap; }
.empty.mini { padding: 12px; margin: 0; }
@media (max-width: 720px) {
  .cust-row { grid-template-columns: 42px 1.2fr 60px 1fr; }
  .cust-row > :nth-child(3), .cust-row > :nth-child(4) { display: none; }
  .cust-row.recent { grid-template-columns: 42px 1.2fr 1fr 96px; }
  .cust-row.recent > :nth-child(3) { display: none; }
  .cust-row.recent > :nth-child(4) { display: block; }
  .guest-head { display: none; }
  .cust-row.recent.guest-row { grid-template-columns: 42px 1.6fr 1fr 1fr; }
  .cust-row.recent.guest-row > :nth-child(3), .cust-row.recent.guest-row > :nth-child(4), .cust-row.recent.guest-row > :nth-child(5) { display: none; }
  .cust-row.recent.guest-row > :nth-child(6), .cust-row.recent.guest-row > :nth-child(7), .cust-row.recent.guest-row > :nth-child(8) { display: grid; }
  .guest-expand { padding-left: 12px; }
  .guest-order { grid-template-columns: 1fr; }
}

/* ---- Configuración: pagos y conexiones ---- */
.pay-cfg-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.pay-cfg-row:last-child { border-bottom: none; }
.pc-emoji { font-size: 18px; width: 26px; text-align: center; }
.conn-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.conn-row:last-child { border-bottom: none; }
.conn-logo { width: 34px; height: 34px; border-radius: 10px; object-fit: contain; background: var(--surface-soft);
  border: 1px solid var(--line-2); padding: 4px; }
.conn-row button:disabled { opacity: .55; cursor: not-allowed; }

/* ---- Login / autenticación ---- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(120% 120% at 80% -10%, #fde7ec 0%, var(--bg) 45%); }
[data-theme="dark"] .auth-wrap { background: radial-gradient(120% 120% at 80% -10%, #3a1a24 0%, var(--bg) 45%); }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 32px;
  width: min(520px, 100%); box-shadow: var(--shadow); }
.auth-brand { font-weight: 800; font-size: 26px; color: var(--navy); margin-bottom: 4px; }
.auth-brand span { color: var(--navy); } .auth-brand i { color: var(--crimson); font-style: normal; }
.auth-card h2 { color: var(--navy); margin-bottom: 18px; font-size: 22px; }
.auth-card label { display: block; font-size: 13px; color: var(--ink-soft); margin: 12px 0 6px; }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-submit { width: 100%; margin-top: 20px; padding: 12px; }
.auth-switch { text-align: center; color: var(--muted); font-size: 14px; margin: 16px 0 0; }
.auth-switch b { color: var(--crimson); cursor: pointer; }
.auth-error { background: #fdeaee; color: var(--crimson-d); border: 1px solid #f6c6d1;
  border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 8px; }
[data-theme="dark"] .auth-error { background: rgba(239, 17, 73, .14); color: #ff8fa8; border-color: rgba(239, 17, 73, .35); }
.auth-switch a { text-decoration: none; }

/* Botón "Continuar con Google" */
.gbtn { display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 14px; margin-top: 6px; border: 1px solid var(--line-2);
  border-radius: 10px; background: var(--card); color: var(--ink); font-weight: 600;
  text-decoration: none; cursor: pointer; transition: filter .12s; }
.gbtn:hover { filter: brightness(.98); }
.gbtn.gbtn-inline { width: auto; }

/* Tarjeta "Seguridad de acceso" (perfil) */
.sec-divider { border-top: 1px solid var(--line-2); padding-top: 16px; }
.sec-dot { color: var(--muted); font-size: 18px; line-height: 1; flex: 0 0 auto; }
.sec-warn { display: inline-grid; place-items: center; width: 20px; height: 20px; flex: 0 0 auto;
  border-radius: 50%; background: #fdeef2; color: var(--crimson); font-weight: 800; font-size: 13px; }
[data-theme="dark"] .sec-warn { background: rgba(239, 17, 73, .18); }

/* Separador "o con tu correo" */
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted);
  font-size: 13px; margin: 16px 0 4px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }

/* Campo de contraseña con ojito */
.pwd-field { position: relative; }
.pwd-field input { padding-right: 42px; }
.pwd-field .eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  border: none; background: none; cursor: pointer; font-size: 16px; padding: 4px 6px; line-height: 1; }

/* ---- Responsivo ---- */
@media (max-width: 1080px) {
  .triple-row { grid-template-columns: 1fr 1fr; }
  .triple-row > :nth-child(3) { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .banner img { display: none; }
  .auth-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .prod-layout { grid-template-columns: 1fr; }
  .split-row { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .mesa-create { grid-template-columns: 1fr; }
  .mc-types { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-2-1 { grid-template-columns: 1fr; }
  .cat-row { grid-template-columns: 38px 1fr 64px 56px 74px; }
  .cat-row > :nth-child(3) { display: none; }
  .tk-row { grid-template-columns: 50px 1fr 1fr 100px; }
  .tk-row span:nth-child(3), .tk-row span:nth-child(4) { display: none; }
  .list-row.products { grid-template-columns: 1fr 90px 50px 44px; }
  .list-row.products > :nth-child(3), .list-row.products > :nth-child(4) { display: none; }
}

/* ---- Estadísticas (dashboard de ventas, basado en el diseño de tablet) ---- */
.est-layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.est-side { position: sticky; top: 16px; }
.est-side .stat-ring { width: 180px; height: 180px; }
/* Selector de rango (select real con look de chip) */
select.est-range { display: inline-block; width: auto; font-size: 12px; font-weight: 700; color: var(--navy); background: var(--card); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 12px; cursor: pointer; }
select.est-range:hover { border-color: var(--navy); }
/* Promedios en dos columnas verticales (dato arriba, etiqueta abajo) */
.est-side-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.est-side-cols > div { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.text-left { text-align: left; }

.est-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.est-kpi .t { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.est-kpi .v { font-size: 24px; font-weight: 800; color: var(--navy); margin-top: 4px; }
.est-kpi.center { display: grid; place-items: center; }
.est-delta { font-weight: 800; font-size: 13px; }
.est-mini-bars { display: flex; align-items: flex-end; gap: 10px; height: 52px; }
.est-mini-bars span { width: 18px; border-radius: 4px 4px 0 0; }
.est-mini-bars .prev { background: var(--line-2); }
.est-mini-bars .cur { background: var(--green); }
.est-spark { width: 100%; height: 40px; margin-top: 8px; display: block; }
/* KPI con sparkline sangrado: el área llega a los bordes y al fondo del card */
.est-spark-card { display: flex; flex-direction: column; align-items: flex-start; padding-bottom: 0; overflow: hidden; }
.est-spark-card .est-spark { width: calc(100% + 36px); margin: auto -18px 0; height: 64px; }

/* Rejilla de 6 celdas de "Ventas por día": gráfica (2/3) + destacado (1/3) */
.est-grid6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.est-grid6 .span2 { grid-column: span 2; }
.est-hl { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; }

/* Animación de entrada: las barras crecen desde la base, escalonadas */
@keyframes est-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes est-pop { from { opacity: 0; transform: translateX(-50%) translateY(6px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes est-draw { to { stroke-dashoffset: 0; } }
@keyframes est-fade { from { opacity: 0; } to { opacity: 1; } }
.eb7-bar, .eh-bar, .e15-bar, .est-mini-bars span { transform-origin: bottom; animation: est-grow .5s cubic-bezier(.2, .8, .3, 1) backwards; }
.est-spark polyline { stroke-dasharray: 1; stroke-dashoffset: 1; animation: est-draw .9s ease .25s forwards; }
.est-spark polygon { animation: est-fade .6s ease .5s backwards; }

/* Barras pareadas por día (semana actual vs anterior) */
.est-bars7 { display: flex; align-items: flex-end; gap: 8px; height: 200px; padding-top: 44px; }
.eb7-col { flex: 1; min-width: 0; height: 100%; position: relative; display: flex; flex-direction: column; align-items: center; }
.eb7-bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.eb7-bar { width: 16px; border-radius: 4px 4px 0 0; transition: opacity .15s; }
.eb7-bar.prev { background: var(--line-2); }
.eb7-bar.cur { background: var(--green); }
.eb7-label { font-size: 11px; font-weight: 800; color: var(--navy); margin-top: 8px; }
.eb7-amount { font-size: 11px; color: var(--muted); }

/* Barras por hora y de 15 días (comparten columna/track/etiqueta) */
.est-hours, .est-d15 { display: flex; align-items: flex-end; gap: 4px; height: 220px; padding-top: 44px; }
.eh-col, .e15-col { flex: 1; min-width: 0; height: 100%; position: relative; display: flex; flex-direction: column; align-items: center; }
.eh-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.eh-bar, .e15-bar { width: 62%; max-width: 16px; min-width: 4px; border-radius: 4px 4px 0 0; background: var(--line-2); transition: background .12s, opacity .15s; }
.eh-col:hover .eh-bar, .e15-col:hover .e15-bar { background: var(--muted); }
.eh-col.peak .eh-bar, .e15-col.hoy .e15-bar { background: var(--green); }
.e15-col.max .e15-bar { background: var(--navy); }
.eh-col.peak:hover .eh-bar, .e15-col.hoy:hover .e15-bar { background: var(--green); }
.e15-col.max:hover .e15-bar { background: var(--navy); }
.eh-label { font-size: 9px; color: var(--muted); margin-top: 6px; text-align: center; }
.e15-mes { display: block; color: #2563eb; font-weight: 800; }
[data-theme="dark"] .e15-mes { color: #93c5fd; }

/* Al pasar por una gráfica, las barras hermanas se atenúan (foco en la actual) */
.est-bars7:hover .eb7-col:not(:hover) .eb7-bar,
.est-hours:hover .eh-col:not(:hover) .eh-bar,
.est-d15:hover .e15-col:not(:hover) .e15-bar { opacity: .45; }

/* Burbuja flotante: fija (pin, sobre la barra destacada) o al hover */
.est-tip { position: absolute; top: 0; left: 50%; transform: translateX(-50%); color: #fff; font-size: 9px; font-weight: 700; text-transform: uppercase; padding: 4px 9px; border-radius: 8px; white-space: nowrap; text-align: center; z-index: 2; }
.est-tip b { display: block; font-size: 12px; }
.est-tip i { display: block; font-style: normal; font-size: 8px; opacity: .85; text-transform: none; }
.est-tip.green { background: var(--green); }
.est-tip.navy { background: var(--navy); }
.est-tip::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; }
.est-tip.green::after { border-top-color: var(--green); }
.est-tip.navy::after { border-top-color: var(--navy); }
.est-tip.pin { animation: est-pop .35s ease .55s backwards; transition: opacity .15s; }
.est-tip.hovertip { display: none; }
.eb7-col:hover .hovertip, .eh-col:hover .hovertip, .e15-col:hover .hovertip { display: block; animation: est-pop .18s ease; }
/* La burbuja fija cede el foco mientras exploras otras barras */
.est-hours:hover .eh-col:not(:hover) .est-tip.pin,
.est-d15:hover .e15-col:not(:hover) .est-tip.pin { opacity: 0; }

/* Rankings en cards verticales (3-4 columnas según el ancho) */
.est-cards4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
/* Acento superior como pestaña (::before), recto y con inset — no se deforma
   con el border-radius del card (mismo patrón que .stat.bar-* del dashboard). */
/* Tarjeta de ranking horizontal: imagen a la izquierda (a sangre, sin padding
   del card) y detalles a la derecha con su propio padding. La pestaña de color
   va centrada sobre la imagen, pegada a su borde superior. */
.est-rankc { position: relative; display: flex; align-items: stretch; gap: 0; padding: 0; overflow: hidden; transition: transform .15s, box-shadow .15s; }
/* Pestaña como divisor vertical: al borde derecho de la imagen, 100% de alto,
   sin border-radius. Separa imagen y detalles. */
.est-rankc::before { content: ""; position: absolute; top: 0; bottom: 0; left: 140px; width: 5px; background: var(--green); z-index: 1; }
.est-rankc.low::before { background: var(--crimson); }
.est-rankc:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(25, 28, 60, .10); }
.est-rankc-img { flex: 0 0 140px; align-self: stretch; overflow: hidden; background: var(--surface-soft); display: grid; place-items: center; }
.est-rankc-img img { width: 100%; height: 100%; object-fit: cover; }
.est-rankc-img img.default-icon { width: 40px; height: 40px; object-fit: contain; opacity: .5; }
.est-rankc-body { flex: 1; min-width: 0; padding: 16px 16px 16px 21px; display: flex; flex-direction: column; gap: 6px; }
.est-rankc-name { line-height: 1.25; }
.est-rank-rev { font-weight: 800; color: var(--navy); font-size: 18px; }
.est-count { display: flex; flex-direction: column; color: var(--green-d); line-height: 1.1; margin-top: 2px; }
.est-count .est-count-lbl { font-size: 9px; text-transform: uppercase; font-weight: 700; letter-spacing: .04em; }
.est-count b { font-size: 26px; font-weight: 800; line-height: 1.05; }
.est-count span { font-size: 9px; text-transform: uppercase; font-weight: 700; }
.est-count.low { color: var(--crimson); }

@media (max-width: 1100px) {
  .est-layout { grid-template-columns: 1fr; }
  .est-side { position: static; }
  .est-grid6 { grid-template-columns: 1fr 1fr; }
  .est-grid6 .est-hl { grid-column: span 2; align-items: center; text-align: center; }
  .eh-label { font-size: 8px; }
  .est-hours .eh-col:nth-child(even) .eh-label { visibility: hidden; }
}
