/* POS Caja — Navy + Coral + Green */
@import url('paleta.css?v=4');

/* ==========================================================================
   BASE
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
}

body {
    display: flex;
    height: 100vh;
    background: var(--bg-app);
    color: var(--text-primary);
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button,
input,
select {
    font-family: inherit;
}

.icon-sm {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    flex-shrink: 0;
}

.icon-xs {
    width: 13px;
    height: 13px;
    stroke-width: 2;
    flex-shrink: 0;
}

.icon-empty {
    width: 32px;
    height: 32px;
    stroke-width: 1.5;
    color: var(--gold-muted);
    margin-bottom: 12px;
}

.field-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: block;
    margin-bottom: 8px;
}

/* ==========================================================================
   MAPA — LAYOUT
   ========================================================================== */
#seccion-mesas {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    padding: 28px 32px;
    background: var(--bg-app);
    gap: 4px;
}

.mapa-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 16px;
}

.titulo {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-heading);
    letter-spacing: -0.025em;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-menu {
    position: relative;
    flex-shrink: 0;
}

.btn-administrar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 13px;
    padding: 8px 14px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid #262626;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.btn-administrar:hover,
.btn-administrar[aria-expanded="true"] {
    background: var(--bg-hover);
    border-color: var(--border-soft);
}

.admin-menu-chevron {
    opacity: 0.7;
    transition: transform var(--transition);
}

.btn-administrar[aria-expanded="true"] .admin-menu-chevron {
    transform: rotate(180deg);
}

.admin-menu-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 50;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px;
    background: var(--bg-card);
    border: 1px solid #262626;
    border-radius: var(--radius-sm);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.admin-menu-panel[hidden] {
    display: none;
}

.admin-menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-weight: 500;
    text-decoration: none;
    font-size: 13px;
    padding: 10px 12px;
    border-radius: calc(var(--radius-sm) - 2px);
    transition: background var(--transition);
}

.admin-menu-link:hover {
    background: var(--bg-hover);
}

.mapa-mesas-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding-right: 8px;
}

.mapa-mesas-dual {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: stretch;
    min-height: 0;
    width: 100%;
}

.mapa-zona-columna {
    flex: 1 1 300px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.mapa-zona-titulo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 0 10px;
    padding: 8px 12px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: #FFFFFF;
    background: var(--bg-sidebar);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
}

.mapa-zona-columna .grid-mesas-zona {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    justify-items: stretch;
}

.grid-mesas-zona .tarjeta-mesa {
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 5px 4px 4px;
    border-width: 1.5px;
    border-radius: 8px;
    min-height: 0;
}

.grid-mesas-zona .tarjeta-mesa .numero {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 1px;
    line-height: 1.1;
}

.grid-mesas-zona .tarjeta-mesa .estado {
    font-size: 7px;
    letter-spacing: 0.01em;
    font-weight: 500;
    line-height: 1.1;
}

.sin-mesas-zona {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    padding: 24px 8px;
}

@media (max-width: 1300px) {
    .mapa-zona-columna .grid-mesas-zona {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .mapa-mesas-dual { flex-direction: column; }
    .mapa-zona-columna { max-width: 100%; }
    #seccion-mesas { padding: 20px; }
}

/* ==========================================================================
   MESAS — ESTADOS
   ========================================================================== */
.tarjeta-mesa {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
    box-shadow: var(--shadow-sm);
    min-height: 76px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tarjeta-mesa:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.tarjeta-mesa .numero {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.2;
}

.tarjeta-mesa .estado {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.disponible {
    border-color: var(--mesa-disponible-border);
    background: var(--mesa-disponible-bg);
    color: var(--mesa-disponible-text);
}

.disponible:hover { background: #ECFDF5; }

.ocupada {
    border-color: var(--mesa-ocupada-border);
    background: var(--mesa-ocupada-bg);
    color: var(--mesa-ocupada-text);
}

.ocupada:hover { background: #178A5C; }

.cuenta_pedida,
.reservada {
    border-color: var(--mesa-reservada-border);
    background: var(--mesa-reservada-bg);
    color: var(--mesa-reservada-text);
}

.tarjeta-mesa.seleccionada {
    outline: none;
    transform: none;
    z-index: 1;
    border-color: var(--primary);
    box-shadow: var(--shadow-gold);
}

.grid-mesas-zona .tarjeta-mesa.seleccionada {
    border-color: var(--primary);
    box-shadow: var(--shadow-gold);
}

/* ==========================================================================
   STRIPS — LLEVAR / DELIVERY (2 filas anchas, bajas)
   ========================================================================== */
.pedidos-offpremise-row {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    min-height: 0;
}

.pedidos-offpremise-row .strip-card {
    width: 100%;
    margin-bottom: 0;
}

.strip-card {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-height: 80px;
    padding: 10px 10px 10px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: box-shadow var(--transition);
}

.strip-card--llevar {
    border-left: 3px solid var(--accent-llevar);
}

.strip-card--delivery {
    border-left: 3px solid var(--accent-delivery);
}

.strip-card-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1px;
    flex-shrink: 0;
    width: 88px;
    margin-bottom: 0;
    padding-right: 10px;
    border-right: 1px solid var(--border);
}

.strip-card-title {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    min-width: 0;
    line-height: 1.2;
}

.strip-card-title span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.strip-card-hint {
    font-size: 9px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.grid-llevar,
.grid-delivery {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1px 0;
    min-height: 58px;
    align-items: center;
    align-self: stretch;
}

.grid-llevar::-webkit-scrollbar,
.grid-delivery::-webkit-scrollbar { height: 3px; }

.grid-llevar::-webkit-scrollbar-thumb,
.grid-delivery::-webkit-scrollbar-thumb {
    background: var(--border-soft);
    border-radius: 3px;
}

.strip-card .sin-pedidos {
    color: var(--text-secondary);
    font-size: 10px;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.sin-pedidos,
.empty-state {
    color: var(--text-secondary);
    font-size: 13px;
    padding: 12px 0;
    white-space: nowrap;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    white-space: normal;
    line-height: 1.5;
}

.tarjeta-llevar,
.tarjeta-delivery {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-chip);
    border: 1px solid var(--gold-muted);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition), color var(--transition);
    box-shadow: none;
    min-height: 52px;
}

.tarjeta-llevar {
    min-width: 0;
    max-width: none;
    text-align: left;
}

.tarjeta-delivery {
    min-width: 0;
    max-width: none;
    text-align: left;
}

.tarjeta-llevar:hover,
.tarjeta-delivery:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    border-color: var(--border-gold);
    background: var(--gold-pale);
}

.tarjeta-llevar.activo,
.tarjeta-delivery.activo {
    background: var(--gold-muted);
    color: var(--text-heading);
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.25);
}

.llevar-cliente,
.delivery-cliente {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 0;
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    flex: 1;
    min-width: 0;
}

.llevar-resumen,
.delivery-resumen,
.delivery-direccion {
    display: none;
}

.llevar-total,
.delivery-total {
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Legacy map classes */
.tarjeta-mesa.es-delivery {
    border-color: var(--mesa-reservada-border) !important;
    background: var(--mesa-reservada-bg) !important;
    color: var(--mesa-reservada-text) !important;
}

.tarjeta-mesa.es-llevar {
    border-color: var(--gold-muted) !important;
    background: var(--gold-light) !important;
    color: var(--gold-hover) !important;
}

/* ==========================================================================
   PANEL COBRO
   ========================================================================== */
#seccion-cobro {
    width: 440px;
    min-width: 380px;
    max-width: 480px;
    flex-shrink: 0;
    background: var(--bg-card);
    border-left: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    box-shadow: var(--shadow-sidebar);
}

.cobro-header {
    flex-shrink: 0;
    padding: 14px 16px 12px;
    background: var(--bg-sidebar);
}

.cobro-titulo {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 8px;
    font-size: 15px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.cobro-garzon-meta {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.78);
    letter-spacing: 0;
}

.cobro-garzon-meta::before {
    content: none;
}

.cobro-contexto {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-on-dark);
    padding: 7px 11px;
    background: var(--surface-dark);
    border-radius: 8px;
    border: 1px solid #333333;
    line-height: 1.35;
}

.cobro-contexto.ctx-llevar {
    background: #333333;
    border-color: rgba(192, 57, 43, 0.35);
}

.cobro-contexto.ctx-delivery {
    background: #333333;
    border-color: rgba(192, 57, 43, 0.35);
}

.cobro-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.btn-bandeja-caja,
.btn-anular-compacto {
    display: none;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.btn-bandeja-caja {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-bandeja-caja.is-syncing {
    opacity: 0.82;
}

.btn-bandeja-caja:hover {
    background: rgba(255, 255, 255, 0.16);
}

.btn-anular-compacto {
    color: #FCA5A5;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.28);
}

.btn-anular-compacto:hover {
    background: rgba(239, 68, 68, 0.2);
}

.cobro-items-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-card);
}

.zona-cuentas {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 0;
    border-bottom: 1px solid var(--border);
}

.tabs-cuentas {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.tab-cuenta {
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab-cuenta.activa {
    border-color: var(--primary);
    background: rgba(212, 160, 23, 0.15);
    color: var(--primary);
}

.tab-cuenta.cerrada {
    opacity: 0.55;
    text-decoration: line-through;
}

.btn-nueva-cuenta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px dashed var(--border);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.btn-nueva-cuenta:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-cerrar-cuenta-vacia {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--border);
    background: rgba(220, 80, 60, 0.12);
    color: #e8a090;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.btn-cerrar-cuenta-vacia:hover {
    border-color: #e07060;
    color: #ffb8a8;
    background: rgba(220, 80, 60, 0.2);
}

.cuenta-aviso-vacia {
    font-size: 11px;
    color: var(--text-secondary);
    padding: 0 12px 8px;
    line-height: 1.4;
}

.cuenta-aviso-vacia strong {
    color: var(--primary);
}

.btn-mover-cuenta {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 2px 4px;
    cursor: pointer;
    border-radius: 4px;
}

.btn-mover-cuenta:hover {
    color: var(--primary);
    background: rgba(212, 160, 23, 0.12);
}

.select-mover-cuenta {
    max-width: 88px;
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-secondary);
}

.cuenta-saldo-pendiente {
    font-size: 11px;
    color: var(--text-secondary);
    padding: 0 12px 8px;
}

.cuenta-saldo-pendiente strong {
    color: var(--primary);
}

.detalle-cuenta {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.detalle-vacio {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
    padding: 16px 12px;
    line-height: 1.45;
    flex: 0 0 auto;
    align-self: stretch;
}

.detalle-vacio .icon-empty {
    width: 24px;
    height: 24px;
    margin-bottom: 8px;
}

.cobro-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding: 12px 14px 16px;
    border-top: 1px solid #404040;
    background: var(--bg-cobro-footer);
}

.contenedor-totales {
    padding: 14px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
}

.fila-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.monto-secundario { font-weight: 500; }

.fila-total-final {
    align-items: center;
    background: var(--color-primario-tint-light);
    border: 1px solid var(--color-primario-tint-pale);
    padding: 12px 14px;
    border-radius: 10px;
}

.fila-subtotal {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.fila-subtotal .monto-secundario {
    font-size: 15px;
    color: var(--primary);
    font-weight: 600;
}

.total-block {
    margin-top: 10px;
}

.total-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-heading);
}

.total-monto {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.03em;
    line-height: 1;
}

.seccion-propina {
    margin-bottom: 10px;
}

.seccion-pago {
    margin-bottom: 6px;
}

.seccion-propina .field-label,
.seccion-pago .field-label {
    margin-bottom: 5px;
    font-size: 10px;
}

/* Segmented controls — compactos */
.segmented-control {
    display: flex;
    gap: 3px;
    padding: 3px;
    background: var(--bg-hover);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    max-width: 100%;
}

.segmented-control button {
    flex: 1;
    padding: 5px 6px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-primary);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
    min-height: 28px;
}

.segmented-control button:hover:not(.activo) {
    background: var(--bg-card);
}

.segmented-control button.activo {
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    outline: 1px solid var(--primary);
}

.segmented-control--pago button {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 4px;
    font-size: 10px;
    min-height: 28px;
}

.segmented-control--pago button .icon-sm {
    width: 12px;
    height: 12px;
}

.segmented-control--pago button.activo {
    background: var(--primary);
    color: #FFFFFF;
    box-shadow: var(--shadow-sm);
}

.segmented-control--pago button.activo .icon-sm {
    color: #FFFFFF;
}

#input-propina-manual,
#input-envio-manual {
    width: 100%;
    padding: 7px 10px;
    margin-top: 6px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-align: right;
    color: var(--text-heading);
    background: var(--bg-card);
    transition: border-color var(--transition), box-shadow var(--transition);
}

#input-propina-manual:focus,
#input-envio-manual:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.2);
}

.seccion-envio {
    margin-bottom: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.envio-linea {
    display: flex;
    align-items: center;
    gap: 8px;
}

.envio-linea .field-label {
    margin-bottom: 0;
    flex-shrink: 0;
    min-width: 105px;
}

.select-envio {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    text-align-last: center;
    color: var(--text-heading);
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color var(--transition);
}

.btn-envio-gratis {
    flex-shrink: 0;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 500;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.btn-envio-gratis:hover { background: var(--bg-hover); }

.btn-envio-gratis.activo {
    background: var(--primary);
    color: #FFFFFF;
    border-color: var(--primary);
}

.fila-envio-resumen {
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.seccion-vuelto {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: end;
    margin: 6px 0;
    padding: 8px;
    background: var(--bg-hover);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
}

.seccion-vuelto .field-label {
    margin-bottom: 4px;
    font-size: 10px;
}

.vuelto-input-linea {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    min-height: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
}

.vuelto-input-linea span {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.vuelto-input-linea input {
    width: 100%;
    border: 0;
    outline: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-heading);
    text-align: center;
    background: transparent;
    padding: 0;
    min-height: 0;
}

/* Resultado del vuelto: dato calculado, NO un input. Sin caja ni borde,
   solo etiqueta + monto en color (verde si hay vuelto, carmesí si falta). */
.resultado-vuelto {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 0;
    padding: 6px 2px;
    min-height: 32px;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.resultado-vuelto span {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
}

.resultado-vuelto strong {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-heading);
    line-height: 1;
}

/* Hay vuelto → verde */
.resultado-vuelto.vuelto-ok span,
.resultado-vuelto.vuelto-ok strong { color: var(--csp-verde); }

/* Falta plata → carmesí */
.resultado-vuelto.vuelto-falta span,
.resultado-vuelto.vuelto-falta strong { color: var(--primary); }

/* Lista productos */
.lista-detalle-cobro {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.linea-detalle {
    display: grid;
    grid-template-columns: 22px 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    box-shadow: none;
}

.linea-detalle-cant {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    color: var(--text-heading);
    font-weight: 600;
    font-size: 11px;
    border-radius: 5px;
    flex-shrink: 0;
}

.linea-detalle-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.linea-nombre {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.25;
    word-break: break-word;
}

.linea-detalle-acciones {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.linea-precio {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-heading);
    white-space: nowrap;
}

.linea-menu-dia {
    background: var(--gold-light);
    border-color: var(--gold-muted);
}

.linea-menu-dia .linea-detalle-info {
    flex-direction: row;
    align-items: center;
}

.linea-menu-dia .linea-nombre {
    color: var(--text-heading);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.linea-menu-etiqueta {
    color: var(--primary-hover);
    font-weight: 700;
}

.linea-menu-etiqueta--solo {
    color: #b45309;
}

.linea-menu-sep {
    color: var(--text-secondary);
    font-weight: 500;
}

.linea-menu-detalle {
    color: var(--text-heading);
    font-weight: 500;
}

.btn-anular-linea {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--mesa-ocupada-bg);
    color: var(--danger);
    border-radius: 5px;
    cursor: pointer;
    transition: background var(--transition);
    flex-shrink: 0;
    padding: 0;
}

.btn-anular-linea .icon-xs {
    width: 11px;
    height: 11px;
}

.btn-anular-linea:hover { background: #FEE2E2; }

.nota-item {
    font-size: 10px;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.2;
    margin-top: 1px;
}

.cobro-direccion {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.4;
}

/* Acciones footer */
.cobro-acciones {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 8px;
    margin-top: 10px;
}

.btn-imprimir,
.btn-cobrar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.btn-ghost {
    padding: 10px 10px;
    min-height: 40px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    background: var(--primary);
    color: #FFFFFF;
}

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

.btn-primary-action,
.btn-cobrar {
    padding: 10px 14px;
    min-height: 40px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    background: var(--success);
    color: #FFFFFF;
    box-shadow: var(--shadow-sm);
}

.btn-cobrar:hover,
.btn-primary-action:hover {
    background: var(--success-hover);
}

.btn-cobrar:active,
.btn-primary-action:active {
    transform: scale(0.98);
}

/* Scrollbars */
.mapa-mesas-wrap::-webkit-scrollbar,
.detalle-cuenta::-webkit-scrollbar { width: 6px; }

.mapa-mesas-wrap::-webkit-scrollbar-thumb,
.detalle-cuenta::-webkit-scrollbar-thumb {
    background: var(--border-soft);
    border-radius: 3px;
}

/* ==========================================================================
   TICKET IMPRESIÓN
   ========================================================================== */
.ticket-impresion { display: none; }

@media print {
    @page { size: 80mm auto; margin: 0; }

    body * { visibility: hidden; }

    #ticket-impresion,
    #ticket-impresion * { visibility: visible; }

    #ticket-impresion {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 80mm;
        padding: 4mm 2.5mm 7mm;
        font-family: var(--font-sans);
        font-size: 13px;
        line-height: 1.32;
        color: #000;
    }

    .ticket-contenido { width: 100%; }

    .ticket-contenido .ticket-aviso {
        font-size: 11px;
        text-align: center;
        margin: 3px 0;
        font-weight: 700;
    }

    .ticket-contenido .ticket-direccion {
        font-size: 11px;
        text-align: center;
        margin: 0 0 8px;
    }

    .ticket-contenido h2 {
        font-size: 20px;
        text-align: center;
        margin: 0 0 5px;
        font-weight: 800;
    }

    .ticket-contexto {
        margin: 0 0 3px;
        font-size: 14.5px;
        font-weight: 800;
        text-align: center;
    }

    .ticket-direccion-entrega,
    .ticket-fecha,
    .ticket-pago {
        margin: 2px 0;
        font-size: 12px;
        text-align: center;
    }

    .ticket-separador {
        border-top: 1.5px dashed #111;
        margin: 7px 0 6px;
    }

    .ticket-seccion {
        margin: 0 0 5px;
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-align: center;
    }

    .ticket-contenido .ticket-gracias {
        font-size: 15px;
        font-weight: 800;
        text-align: center;
        margin: 8px 0 0;
    }

    .ticket-contenido table {
        width: 100%;
        border-collapse: collapse;
    }

    .ticket-items tr + tr td { padding-top: 6px; }

    .ticket-item-principal {
        display: flex;
        align-items: baseline;
        gap: 6px;
    }

    .ticket-cantidad {
        min-width: 26px;
        font-size: 13.5px;
        font-weight: 800;
        text-align: right;
    }

    .ticket-producto {
        font-size: 14px;
        font-weight: 700;
    }

    .ticket-nota {
        margin: 2px 0 0 30px;
        font-size: 12px;
    }

    .ticket-precio {
        text-align: right;
        white-space: nowrap;
        font-size: 13px;
        font-weight: 800;
    }

    .ticket-contenido .ticket-totales td {
        padding: 2.5px 0;
        font-size: 13px;
        font-weight: 700;
    }

    .ticket-contenido .ticket-total-fila td {
        padding-top: 8px;
        font-size: 19px;
        font-weight: 800;
        border-top: 1.5px solid #000;
    }

    .ticket-contenido td:last-child {
        text-align: right;
        white-space: nowrap;
    }
}

/* Campo Repartidor en el panel de cobro (solo delivery) */
.input-repartidor {
    flex: 0 1 200px;
    min-width: 0;
    max-width: 100%;
    border: 1.5px solid var(--border, #e5e5e5);
    border-radius: 8px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 14px;
    text-align: center;
    background: var(--bg-card, #fff);
    color: var(--text-primary, #262626);
}
.input-repartidor:focus {
    outline: none;
    border-color: var(--primary, #C0392B);
}
