/* ==========================================================================
   Proa al Mar — sistema de diseño (tema claro, azul océano + coral)
   Se carga al final de cada vista y refina Bootstrap y los estilos propios.
   Tipografía Inter (local). Espaciado 4/8 px. Contraste AA. Áreas táctiles >= 44 px.
   ========================================================================== */

/* ---- Tipografía local (funciona sin internet) ---- */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Tokens ---- */
:root {
    /* Marca: azul océano */
    --pr-accent: #2563EB;
    --pr-accent-hover: #1D4ED8;
    --pr-accent-press: #1E40AF;
    --pr-accent-soft: #EEF4FF;
    --pr-accent-line: #D6E4FF;
    --pr-accent-ink: #1E3A8A;

    /* Acento cálido: coral */
    --pr-coral: #F0573E;
    --pr-coral-ink: #B4321C;
    --pr-coral-soft: #FFF1ED;
    --pr-coral-line: #FFD5CA;

    /* Neutros cálidos (arena) */
    --pr-bg: #F7F6F3;
    --pr-surface: #FFFFFF;
    --pr-surface-2: #FBFAF8;
    --pr-surface-3: #F3F2EE;
    --pr-line: #ECE9E4;
    --pr-line-strong: #DCD8D0;

    --pr-ink: #1C2333;
    --pr-ink-2: #475069;
    --pr-muted: #667085;

    /* Estados */
    --pr-ocupada: #F0573E;       --pr-ocupada-ink: #B4321C;   --pr-ocupada-soft: #FFF1ED;   --pr-ocupada-line: #FFD5CA;
    --pr-preparando: #F59E0B;    --pr-preparando-ink: #8A5300; --pr-preparando-soft: #FFF7E3; --pr-preparando-line: #FCE2A6;
    --pr-cobrar: #7C5CFC;        --pr-cobrar-ink: #5B3FD6;    --pr-cobrar-soft: #F3F0FF;    --pr-cobrar-line: #DDD4FF;
    --pr-online: #16A34A;

    --pr-danger: #D92D20;
    --pr-danger-ink: #912018;
    --pr-danger-soft: #FEF3F2;
    --pr-danger-line: #FECDCA;
    --pr-warn: #B54708;
    --pr-warn-soft: #FFFAEB;
    --pr-warn-line: #FEDF89;
    --pr-info: #2563EB;
    --pr-info-soft: #EEF4FF;
    --pr-ok: #2563EB;
    --pr-ok-soft: #EEF4FF;

    --pr-r-sm: 10px;
    --pr-r: 14px;
    --pr-r-lg: 18px;
    --pr-r-xl: 24px;
    --pr-shadow-xs: 0 1px 2px rgba(28, 35, 51, .05);
    --pr-shadow-sm: 0 1px 2px rgba(28, 35, 51, .04), 0 2px 6px rgba(28, 35, 51, .04);
    --pr-shadow: 0 1px 2px rgba(28, 35, 51, .04), 0 8px 24px rgba(28, 35, 51, .07);
    --pr-shadow-lg: 0 4px 8px rgba(28, 35, 51, .04), 0 24px 56px rgba(28, 35, 51, .14);
    --pr-shadow-accent: 0 1px 2px rgba(37, 99, 235, .2), 0 8px 20px rgba(37, 99, 235, .22);
    --pr-font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --pr-font-display: var(--pr-font);
    --pr-ease: cubic-bezier(.2, .7, .2, 1);

    /* Bootstrap */
    --bs-primary: #2563EB;
    --bs-primary-rgb: 37, 99, 235;
    --bs-success: #2563EB;
    --bs-success-rgb: 37, 99, 235;
    --bs-danger: #D92D20;
    --bs-danger-rgb: 217, 45, 32;
    --bs-warning: #F59E0B;
    --bs-warning-rgb: 245, 158, 11;
    --bs-info: #2563EB;
    --bs-info-rgb: 37, 99, 235;
    --bs-body-font-family: var(--pr-font);
    --bs-body-color: var(--pr-ink);
    --bs-body-color-rgb: 28, 35, 51;
    --bs-body-bg: var(--pr-bg);
    --bs-secondary-color: var(--pr-muted);
    --bs-border-color: var(--pr-line);
    --bs-border-radius: var(--pr-r-sm);
    --bs-border-radius-lg: var(--pr-r);
    --bs-link-color: var(--pr-accent);
    --bs-link-color-rgb: 37, 99, 235;
    --bs-link-hover-color: var(--pr-accent-hover);
    --bs-focus-ring-color: rgba(37, 99, 235, .28);
    --bs-primary-text-emphasis: #1E3A8A;
    --bs-primary-bg-subtle: #EEF4FF;
    --bs-success-text-emphasis: #1E3A8A;
    --bs-success-bg-subtle: #EEF4FF;
    --bs-warning-text-emphasis: #8A5300;
    --bs-warning-bg-subtle: #FFF7E3;
}

/* ---- Base ---- */
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--pr-font);
    background: var(--pr-bg) !important;
    color: var(--pr-ink) !important;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv11", "ss01", "ss03";
    text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, .modal-title {
    font-family: var(--pr-font);
    letter-spacing: -.022em;
    color: var(--pr-ink);
    font-weight: 650;
}
.text-muted, .text-secondary, small.text-muted { color: var(--pr-muted) !important; }
.text-primary { color: var(--pr-accent) !important; }
.text-success { color: var(--pr-accent) !important; }
.fw-bold { font-weight: 650 !important; }
/* Cifras alineadas */
.producto-btn-precio, .pedido-total-valor, .mesa-card-total, .pedido-item-subtotal, .pedido-item-cant,
.precuenta-ticket-line, .precuenta-ticket-total, .pedido-tiempo-chip, table td, table th, .kpi-valor,
.metric-card h3 { font-variant-numeric: tabular-nums; }
::selection { background: var(--pr-accent-line); color: var(--pr-ink); }
a { text-underline-offset: 3px; }

/* Barras de desplazamiento discretas */
* { scrollbar-width: thin; scrollbar-color: #D5D1C8 transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #DDD9D1; border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: #C9C4BA; background-clip: padding-box; }

/* Tema oscuro retirado: el sistema es solo claro */
#btn-theme { display: none !important; }

/* ---- Foco visible y áreas táctiles ---- */
:focus { outline: none; }
:focus-visible,
.btn:focus-visible, .form-control:focus-visible, .form-select:focus-visible,
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .45) !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}

/* ---- Botones ---- */
.btn {
    min-height: 44px;
    border-radius: var(--pr-r-sm);
    font-weight: 600;
    letter-spacing: -.005em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding-inline: 1rem;
    transition: background-color .18s var(--pr-ease), border-color .18s var(--pr-ease), color .18s var(--pr-ease), box-shadow .18s var(--pr-ease), transform .12s var(--pr-ease);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-sm { min-height: 34px; border-radius: 9px; font-size: .82rem; padding-inline: .75rem; }
.btn-lg { min-height: 52px; font-size: 1.02rem; }
.btn-touch { min-height: 52px; font-size: .98rem; }
.btn-icon-linea, .btn-icon-kitchen, .btn-close { min-width: 40px; min-height: 40px; }

.btn-primary, .btn-success {
    --bs-btn-bg: var(--pr-accent); --bs-btn-border-color: var(--pr-accent); --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--pr-accent-hover); --bs-btn-hover-border-color: var(--pr-accent-hover); --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--pr-accent-press); --bs-btn-active-border-color: var(--pr-accent-press); --bs-btn-active-color: #fff;
    --bs-btn-disabled-bg: #B7C8F5; --bs-btn-disabled-border-color: #B7C8F5; --bs-btn-disabled-color: #fff;
    box-shadow: var(--pr-shadow-accent);
}
.btn-primary:hover, .btn-success:hover { box-shadow: 0 1px 2px rgba(37, 99, 235, .25), 0 10px 24px rgba(37, 99, 235, .28); }
.btn-outline-primary, .btn-outline-success {
    --bs-btn-color: var(--pr-accent); --bs-btn-border-color: var(--pr-accent-line);
    --bs-btn-hover-bg: var(--pr-accent-soft); --bs-btn-hover-color: var(--pr-accent-hover); --bs-btn-hover-border-color: #B9CEFB;
    --bs-btn-active-bg: var(--pr-accent-soft); --bs-btn-active-color: var(--pr-accent-press); --bs-btn-active-border-color: var(--pr-accent);
    background: var(--pr-surface);
}
.btn-outline-secondary, .btn-secondary, .btn-light, .btn-outline-dark, .btn-label-secondary {
    --bs-btn-color: var(--pr-ink-2); --bs-btn-bg: var(--pr-surface); --bs-btn-border-color: var(--pr-line-strong);
    --bs-btn-hover-bg: var(--pr-surface-2); --bs-btn-hover-color: var(--pr-ink); --bs-btn-hover-border-color: #C9C4BA;
    --bs-btn-active-bg: var(--pr-surface-3); --bs-btn-active-color: var(--pr-ink); --bs-btn-active-border-color: #C9C4BA;
    background: var(--pr-surface);
    color: var(--pr-ink-2);
    border: 1px solid var(--pr-line-strong);
    box-shadow: var(--pr-shadow-xs);
}
.btn-label-secondary:hover { background: var(--pr-surface-2); color: var(--pr-ink); }
.btn-outline-light { --bs-btn-color: var(--pr-ink-2); --bs-btn-border-color: var(--pr-line-strong); --bs-btn-hover-bg: var(--pr-surface-2); --bs-btn-hover-color: var(--pr-ink); --bs-btn-hover-border-color: #C9C4BA; background: var(--pr-surface); }
.btn-danger { --bs-btn-bg: var(--pr-danger); --bs-btn-border-color: var(--pr-danger); --bs-btn-hover-bg: var(--pr-danger-ink); --bs-btn-hover-border-color: var(--pr-danger-ink); --bs-btn-color: #fff; --bs-btn-hover-color: #fff; }
.btn-outline-danger { --bs-btn-color: var(--pr-danger); --bs-btn-border-color: var(--pr-danger-line); --bs-btn-hover-bg: var(--pr-danger-soft); --bs-btn-hover-color: var(--pr-danger-ink); --bs-btn-hover-border-color: #FDA29B; --bs-btn-active-bg: var(--pr-danger-soft); --bs-btn-active-color: var(--pr-danger-ink); background: var(--pr-surface); }
.btn-warning { --bs-btn-bg: var(--pr-preparando); --bs-btn-border-color: var(--pr-preparando); --bs-btn-color: #3D2600; --bs-btn-hover-bg: #E08E00; --bs-btn-hover-border-color: #E08E00; --bs-btn-hover-color: #3D2600; }
.btn-info { --bs-btn-bg: var(--pr-accent); --bs-btn-border-color: var(--pr-accent); --bs-btn-color: #fff; --bs-btn-hover-bg: var(--pr-accent-hover); --bs-btn-hover-border-color: var(--pr-accent-hover); --bs-btn-hover-color: #fff; }
.btn:disabled, .btn.disabled { opacity: .55; box-shadow: none; }

/* ---- Superficies ---- */
.card, .modal-content, .dropdown-menu, .offcanvas {
    background: var(--pr-surface);
    border: 1px solid var(--pr-line);
    border-radius: var(--pr-r-lg);
    box-shadow: var(--pr-shadow-sm);
}
.card-header { background: var(--pr-surface); border-bottom: 1px solid var(--pr-line); }
.modal-content { box-shadow: var(--pr-shadow-lg); border: 0; border-radius: var(--pr-r-xl); overflow: hidden; }
.modal-header { padding: 1.25rem 1.5rem 1rem; border-bottom: 0; }
.modal-header .modal-title { font-size: 1.15rem; font-weight: 650; }
.modal-body { padding: .5rem 1.5rem 1.25rem; }
.modal-footer { padding: 1rem 1.5rem 1.25rem; border-top: 1px solid var(--pr-line); background: var(--pr-surface-2); gap: .5rem; }
.modal-footer > * { margin: 0; }
.modal-backdrop.show { --bs-backdrop-bg: #101828; --bs-backdrop-opacity: .38; }
.modal.fade .modal-dialog { transform: translateY(12px) scale(.98); transition: transform .22s var(--pr-ease); }
.modal.show .modal-dialog { transform: none; }
.btn-close { border-radius: 10px; opacity: .55; }
.btn-close:hover { opacity: .9; background-color: var(--pr-surface-3); }
.dropdown-item { border-radius: var(--pr-r-sm); min-height: 40px; display: flex; align-items: center; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--pr-accent-soft); color: var(--pr-accent-press); }

/* ---- Formularios ---- */
.form-control, .form-select {
    min-height: 44px;
    border: 1px solid var(--pr-line-strong);
    border-radius: var(--pr-r-sm);
    background-color: var(--pr-surface);
    color: var(--pr-ink);
    font-size: .95rem;
    box-shadow: var(--pr-shadow-xs);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control::placeholder { color: #8A93A6; }
.form-control:hover, .form-select:hover { border-color: #C9C4BA; }
.form-control:focus, .form-select:focus { border-color: var(--pr-accent); box-shadow: 0 0 0 4px rgba(37, 99, 235, .14); background-color: #fff; }
.form-label { font-weight: 600; font-size: .84rem; color: var(--pr-ink-2); margin-bottom: .4rem; }
.form-check-input { border-color: #C9C4BA; }
.form-check-input:checked { background-color: var(--pr-accent); border-color: var(--pr-accent); }
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(37, 99, 235, .14); border-color: var(--pr-accent); }
.form-switch .form-check-input { width: 2.6em; height: 1.4em; }
.input-group-text { background: var(--pr-surface-2); border-color: var(--pr-line-strong); color: var(--pr-muted); }

/* ---- Tablas ---- */
.table { --bs-table-bg: transparent; --bs-table-hover-bg: #F8F9FC; --bs-table-striped-bg: var(--pr-surface-2); color: var(--pr-ink); margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .85rem 1rem; border-bottom-color: var(--pr-line); vertical-align: middle; }
.table thead th {
    background: var(--pr-surface-2);
    color: var(--pr-muted);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--pr-line);
    white-space: nowrap;
}
.table tbody tr { transition: background-color .12s ease; }
.table-responsive { border-radius: var(--pr-r); }

/* ---- Insignias, alertas ---- */
.badge { font-weight: 600; letter-spacing: 0; border-radius: 999px; padding: .38em .72em; }
.status-pill, .estado-mesa {
    display: inline-flex; align-items: center; gap: .38rem;
    border-radius: 999px; font-weight: 600; font-size: .72rem; line-height: 1;
    padding: .38rem .62rem .38rem .55rem; border: 1px solid transparent; white-space: nowrap;
}
.status-pill::before, .estado-mesa::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.estado-ocupada { background: var(--pr-ocupada-soft) !important; color: var(--pr-ocupada-ink) !important; border-color: var(--pr-ocupada-line) !important; }
.estado-preparando { background: var(--pr-preparando-soft) !important; color: var(--pr-preparando-ink) !important; border-color: var(--pr-preparando-line) !important; }
.estado-por-cobrar { background: var(--pr-cobrar-soft) !important; color: var(--pr-cobrar-ink) !important; border-color: var(--pr-cobrar-line) !important; }
.badge.bg-success, .badge.bg-primary { background: var(--pr-accent-soft) !important; color: var(--pr-accent-ink) !important; }
.badge.bg-danger { background: var(--pr-danger-soft) !important; color: var(--pr-danger-ink) !important; }
.badge.bg-info { background: var(--pr-accent-soft) !important; color: var(--pr-accent-ink) !important; }
.badge.bg-warning { background: var(--pr-preparando-soft) !important; color: var(--pr-preparando-ink) !important; }
.badge.bg-secondary { background: var(--pr-surface-3) !important; color: var(--pr-ink-2) !important; }
.badge.text-bg-light { background: var(--pr-surface) !important; color: var(--pr-ink-2) !important; border: 1px solid var(--pr-line); }
.bg-warning-subtle { background: var(--pr-preparando-soft) !important; }
.text-warning { color: var(--pr-preparando-ink) !important; }
.alert { border-radius: var(--pr-r); border-width: 1px; }
.alert-success, .alert-primary, .alert-info { background: var(--pr-accent-soft); color: var(--pr-accent-ink); border-color: var(--pr-accent-line); }
.alert-danger { background: var(--pr-danger-soft); color: var(--pr-danger-ink); border-color: var(--pr-danger-line); }
.alert-warning { background: var(--pr-warn-soft); color: #7A2E0E; border-color: var(--pr-warn-line); }
.nav-pills .nav-link { border-radius: 999px; color: var(--pr-ink-2); font-weight: 600; min-height: 40px; }
.nav-pills .nav-link.active { background: var(--pr-accent); color: #fff; }
.progress { border-radius: 999px; background: var(--pr-surface-3); }
.progress-bar { background: var(--pr-accent); }

/* ==========================================================================
   POS — aplicación a pantalla completa
   ========================================================================== */
.pos-page { height: 100vh; height: 100dvh; overflow: hidden; }
.pos-app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }

/* Barra superior */
.pos-topbar {
    flex-shrink: 0;
    display: flex; align-items: center; gap: 1rem;
    height: 68px; padding: 0 1.25rem;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--pr-line);
    position: relative; z-index: 5;
}
.pos-brand { display: flex; align-items: center; gap: .85rem; min-width: 0; padding-right: 1rem; border-right: 1px solid var(--pr-line); height: 40px; }
.pos-logo { height: 30px; width: auto; display: block; }
.pos-brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.pos-brand-title { font-weight: 650; font-size: .95rem; letter-spacing: -.015em; color: var(--pr-ink); }
.pos-brand-sub { font-size: .76rem; color: var(--pr-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }

.salon-pills {
    display: inline-flex; align-items: center; gap: 2px;
    padding: 4px; border-radius: 12px;
    background: var(--pr-surface-3);
    border: 1px solid var(--pr-line);
    overflow-x: auto; max-width: 100%;
}
.btn-salon {
    min-height: 36px; padding: 0 .9rem; border: 0; border-radius: 9px;
    display: inline-flex; align-items: center; gap: .45rem;
    background: transparent; color: var(--pr-ink-2);
    font-weight: 600; font-size: .86rem; white-space: nowrap;
    transition: background .18s var(--pr-ease), color .18s var(--pr-ease), box-shadow .18s var(--pr-ease);
}
.btn-salon i { font-size: .9rem; opacity: .8; }
.btn-salon:hover { color: var(--pr-ink); background: rgba(255, 255, 255, .7); }
.btn-salon.active { background: var(--pr-surface) !important; color: var(--pr-accent) !important; box-shadow: 0 1px 2px rgba(28, 35, 51, .08), 0 2px 8px rgba(28, 35, 51, .06); }
.btn-salon.active i { opacity: 1; }

.pos-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.pos-nav-link, .kitchen-nav-link {
    min-height: 40px; display: inline-flex; align-items: center; gap: .45rem;
    padding: 0 .85rem; border-radius: 10px;
    color: var(--pr-ink-2); background: transparent; border: 1px solid transparent;
    font-weight: 600; font-size: .86rem; text-decoration: none;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.pos-nav-link:hover, .kitchen-nav-link:hover { background: var(--pr-surface-3); color: var(--pr-ink); }
.pos-nav-link i, .kitchen-nav-link i { font-size: 1rem; }
.btn-logout-mesas {
    width: 40px; height: 40px; min-height: 40px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px; border: 1px solid var(--pr-line); background: var(--pr-surface);
    color: var(--pr-muted); font-size: 1.05rem; transition: all .15s ease;
}
.btn-logout-mesas:hover { color: var(--pr-danger); border-color: var(--pr-danger-line); background: var(--pr-danger-soft); }

/* Disposición: mesas | categorías | carta | pedido */
.pos-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.pos-mesas {
    min-height: 0; display: flex; flex-direction: column;
    background: var(--pr-surface);
    border-right: 1px solid var(--pr-line);
}
.pos-mesas-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1.1rem 1.1rem .75rem; }
.pos-section-title { font-size: 1.15rem !important; font-weight: 700; letter-spacing: -.025em; margin: 0; color: var(--pr-ink); }
.pos-section-sub { display: block; font-size: .78rem; color: var(--pr-muted); margin-top: 2px; }
.btn-crear-mesa {
    min-height: 38px !important; border-radius: 10px !important; padding: 0 .9rem !important;
    font-size: .86rem; gap: .35rem;
}
.mesas-legend-wrap { padding: 0 1.1rem .85rem; border-bottom: 1px solid var(--pr-line); }
.mesas-legend-wrap .badge { font-size: .7rem; padding: .3rem .55rem .3rem .5rem; }
.pos-app .mesa-grid {
    flex: 1; min-height: 0; overflow-y: auto;
    display: flex; flex-direction: column;
    gap: .5rem; padding: .9rem 1rem 1.25rem;
}
.mesas-vacio {
    grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: .5rem;
    padding: 2rem 1rem; color: var(--pr-muted); font-size: .85rem; text-align: center;
    border: 1.5px dashed var(--pr-line-strong); border-radius: var(--pr-r);
}
.mesas-vacio i { font-size: 1.6rem; color: #B5BCCB; }

/* Tarjeta de mesa */
.pos-app .mesa-card {
    position: relative; display: flex; flex-direction: column; gap: .5rem; flex-shrink: 0;
    padding: .75rem .8rem .7rem 1rem;
    background: var(--pr-surface);
    border: 1px solid var(--pr-line);
    border-radius: var(--pr-r);
    box-shadow: var(--pr-shadow-xs);
    cursor: pointer; overflow: hidden;
    transition: transform .18s var(--pr-ease), box-shadow .18s var(--pr-ease), border-color .18s var(--pr-ease), background .18s var(--pr-ease);
}
.pos-app .mesa-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--estado, var(--pr-line-strong)); }
.pos-app .mesa-card:hover { transform: translateY(-1px); box-shadow: var(--pr-shadow); border-color: var(--pr-line-strong); }
.pos-app .mesa-card:active { transform: translateY(0) scale(.99); }
.pos-app .mesa-card.is-activa { border-color: var(--pr-accent); background: linear-gradient(180deg, #F5F8FF 0%, #fff 70%); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14), var(--pr-shadow-sm); }
.pos-app .mesa-ocupada { --estado: var(--pr-ocupada); }
.pos-app .mesa-preparando { --estado: var(--pr-preparando); }
.pos-app .mesa-cuenta, .pos-app .mesa-por_cobrar { --estado: var(--pr-cobrar); }
.pos-app .mesa-libre { --estado: var(--pr-accent); }
.mesa-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.mesa-card-nombre { font-size: 1.1rem; font-weight: 700; letter-spacing: -.03em; color: var(--pr-ink); line-height: 1.15; min-width: 0; }
.pos-app .mesa-card .status-pill { font-size: .64rem; padding: .3rem .45rem .3rem .4rem; gap: .3rem; }
.pos-app .mesa-card .status-pill::before { width: 5px; height: 5px; }
.mesa-card-meta { display: flex; align-items: center; gap: .5rem; font-size: .76rem; color: var(--pr-muted); min-width: 0; }
.mesa-card-meta .btn-cambiar-mesa { margin-left: auto; }
.mesa-card-meta i { margin-right: .25rem; font-size: .78rem; }
.mesa-card-garzon { min-width: 0; flex: 0 1 auto; }
.mesa-card-personas { flex-shrink: 0; white-space: nowrap; }
.mesa-card-total { flex-shrink: 0; font-size: 1rem; font-weight: 700; letter-spacing: -.02em; color: var(--pr-ink); }
.btn-cambiar-mesa {
    width: 28px; height: 28px; border-radius: 8px; padding: 0; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid transparent; background: transparent; color: #98A2B3; font-size: .8rem;
    transition: all .15s ease;
}
.btn-cambiar-mesa:hover { background: var(--pr-surface-3); color: var(--pr-ink); border-color: var(--pr-line); }

/* Zona de trabajo */
.pos-work {
    min-height: 0; display: grid; gap: 1rem; padding: 1rem;
    grid-template-columns: 196px minmax(0, 1fr) minmax(330px, 380px);
}
.pos-work.layout-categorias-colapsada { grid-template-columns: 60px minmax(0, 1fr) minmax(330px, 380px); }
.pos-col { min-height: 0; min-width: 0; }
.categorias-panel, .productos-panel, .pedido-panel {
    height: 100%; min-height: 0; display: flex; flex-direction: column;
    background: var(--pr-surface);
    border: 1px solid var(--pr-line);
    border-radius: var(--pr-r-lg);
    box-shadow: var(--pr-shadow-sm);
    overflow: hidden;
}
.categorias-panel-header, .productos-panel-header, .pedido-panel-header { flex-shrink: 0; padding: .95rem 1rem .8rem; background: var(--pr-surface); }
.categorias-panel-title, .productos-panel-title, .pedido-panel-title { margin: 0; font-size: .98rem; font-weight: 650; letter-spacing: -.02em; color: var(--pr-ink); }
.categorias-panel-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.toggle-categorias-btn {
    width: 30px; height: 30px; padding: 0; border-radius: 8px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--pr-line); background: var(--pr-surface); color: var(--pr-muted);
    font-size: .6rem; line-height: 1; transition: all .15s ease;
}
.toggle-categorias-btn:hover { background: var(--pr-surface-3); color: var(--pr-ink); }
.categorias-panel-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: .1rem .6rem .8rem; }
.layout-categorias-colapsada .categorias-panel-header { justify-content: center; padding: .9rem .4rem; }
.layout-categorias-colapsada .categorias-panel-title,
.layout-categorias-colapsada #categorias-list { display: none !important; }

.btn-categoria-pos {
    position: relative; display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    width: 100%; min-height: 44px; padding: .55rem .65rem .55rem .75rem;
    border: 0; border-radius: 10px; background: transparent;
    color: var(--pr-ink-2); font-weight: 550; font-size: .89rem; text-align: left; line-height: 1.25;
    transition: background .15s ease, color .15s ease;
}
.btn-categoria-pos:hover { background: var(--pr-surface-3); color: var(--pr-ink); }
.btn-categoria-pos.active { background: var(--pr-accent-soft) !important; color: var(--pr-accent-press) !important; font-weight: 650; box-shadow: none !important; }
.btn-categoria-pos.active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 99px; background: var(--pr-accent); }
.btn-categoria-nombre { flex: 1; min-width: 0; }
.btn-categoria-count {
    flex-shrink: 0; min-width: 24px; height: 22px; padding: 0 .4rem;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px; font-size: .7rem; font-weight: 650;
    background: var(--pr-surface-3); color: var(--pr-muted);
}
.btn-categoria-pos.active .btn-categoria-count { background: #fff; color: var(--pr-accent); }

.productos-panel-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .7rem; }
.producto-search-wrap { position: relative; }
.producto-search-wrap > i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: #98A2B3; pointer-events: none; font-size: .9rem; }
.producto-search { min-height: 42px; padding-left: 2.3rem; border-radius: 11px; background: var(--pr-surface-2); box-shadow: none; }
.producto-search:focus { background: #fff; }
.mesa-activa-pill, .pedido-mesa-chip {
    display: inline-flex; align-items: center; gap: .35rem; max-width: 60%;
    padding: .32rem .7rem; border-radius: 999px;
    font-size: .76rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    background: var(--pr-accent); color: #fff; border: 1px solid var(--pr-accent);
}
.mesa-activa-pill:not(.is-placeholder)::before, .pedido-mesa-chip:not(.is-placeholder)::before {
    content: ""; width: 12px; height: 12px; flex-shrink: 0; background: currentColor; opacity: .9;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1 4.5h14v2H13v6.5h-1.6V6.5H4.6V13H3V6.5H1z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1 4.5h14v2H13v6.5h-1.6V6.5H4.6V13H3V6.5H1z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.mesa-activa-pill.is-placeholder, .pedido-mesa-chip.is-placeholder { background: var(--pr-surface-3); color: var(--pr-muted); border: 1px dashed var(--pr-line-strong); font-weight: 550; }
.pedido-uuid-chip {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .68rem; color: var(--pr-muted);
    padding: .28rem .5rem; border-radius: 7px; background: var(--pr-surface-2); border: 1px solid var(--pr-line);
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.productos-panel-body { flex: 1; min-height: 0; overflow-y: auto; padding: .25rem 1rem 1rem; }
.productos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .7rem; }
.productos-grid.bloqueado { opacity: .5; pointer-events: none; }
.producto-btn {
    position: relative; display: flex; flex-direction: column; align-items: flex-start; text-align: left;
    min-height: 104px; padding: .8rem .85rem .75rem;
    background: var(--pr-surface); border: 1px solid var(--pr-line); border-radius: var(--pr-r);
    box-shadow: var(--pr-shadow-xs);
    user-select: none; -webkit-user-select: none; overflow: hidden;
    transition: transform .16s var(--pr-ease), box-shadow .16s var(--pr-ease), border-color .16s var(--pr-ease), background .16s var(--pr-ease);
}
.producto-btn:hover { transform: translateY(-2px); border-color: #C7D7FB; box-shadow: 0 2px 4px rgba(28, 35, 51, .04), 0 10px 22px rgba(37, 99, 235, .10); }
.producto-btn:active { transform: scale(.98); background: var(--pr-accent-soft); border-color: var(--pr-accent); }
.producto-btn-nombre { font-weight: 600; font-size: .9rem; line-height: 1.3; color: var(--pr-ink); padding-right: 1.6rem; }
.producto-btn-precio { margin-top: auto; padding-top: .7rem; font-size: 1.02rem; font-weight: 700; letter-spacing: -.02em; color: var(--pr-ink); }
.producto-btn-add {
    position: absolute; right: .65rem; bottom: .65rem;
    width: 30px; height: 30px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--pr-accent-soft); color: var(--pr-accent); font-size: .9rem;
    transition: background .16s ease, color .16s ease, transform .16s var(--pr-ease);
}
.producto-btn:hover .producto-btn-add { background: var(--pr-accent); color: #fff; transform: scale(1.05); }

/* Pedido */
.pedido-panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; border-bottom: 1px solid var(--pr-line); }
.pedido-panel-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .45rem; }
.pedido-mesa-chip { max-width: 100%; }
.btn-mensaje-cocina {
    width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--pr-line); background: var(--pr-surface); color: var(--pr-ink-2); font-size: 1rem;
    transition: all .15s ease;
}
.btn-mensaje-cocina:hover { background: var(--pr-accent-soft); border-color: var(--pr-accent-line); color: var(--pr-accent); }
.pedido-detalles-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: .85rem 1rem; background: var(--pr-surface-2); }
.pedido-empty-msg {
    height: 100%; min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
    text-align: center; padding: 1.5rem; color: var(--pr-muted);
}
.pedido-empty-icono { font-size: 2rem; color: #B5BCCB; margin-bottom: .35rem; }
.pedido-empty-titulo { font-weight: 650; color: var(--pr-ink-2); font-size: .95rem; }
.pedido-empty-sub { font-size: .82rem; }
.pedido-ronda { background: var(--pr-surface); border: 1px solid var(--pr-line); border-radius: var(--pr-r); padding: .55rem; box-shadow: var(--pr-shadow-xs); }
.pedido-ronda + .pedido-ronda { margin-top: .6rem; }
.pedido-ronda-header { padding: .15rem .3rem .35rem; }
.pedido-ronda-titulo { font-size: .72rem; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--pr-muted); }
.pedido-ronda .btn-sm { min-height: 30px; font-size: .74rem; border-radius: 8px; padding-inline: .6rem; }
.pedido-item { padding: .55rem .45rem; border-radius: 10px; margin-bottom: 0 !important; transition: background .12s ease; }
.pedido-item + .pedido-item { border-top: 1px solid var(--pr-line); border-top-left-radius: 0; border-top-right-radius: 0; }
.pedido-item:hover { background: var(--pr-surface-2); }
.pedido-item-nombre { font-size: .89rem; font-weight: 600; line-height: 1.25; color: var(--pr-ink); }
.pedido-item-subtotal { font-size: .89rem; font-weight: 650; color: var(--pr-ink); }
.pedido-item-meta { margin-top: .25rem; font-size: .74rem; color: var(--pr-muted); row-gap: .25rem; }
.pedido-item-cant { font-weight: 550; white-space: nowrap; }
.pedido-item-obs {
    display: inline-flex; align-items: center; max-width: 100%;
    color: #8A5300; background: var(--pr-preparando-soft); border: 1px solid var(--pr-preparando-line);
    border-radius: 6px; padding: .08rem .4rem; font-size: .72rem;
}
.pedido-item .badge { font-size: .66rem; padding: .25rem .5rem; font-weight: 600; }
.pedido-item-acciones { flex-shrink: 0; }
.btn-icon-linea { width: 32px; height: 32px; min-width: 32px; min-height: 32px; padding: 0; border-radius: 9px; font-size: .85rem; box-shadow: none; }
.pedido-footer { flex-shrink: 0; padding: .9rem 1rem 1rem; background: var(--pr-surface); border-top: 1px solid var(--pr-line); }
.pedido-total-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .85rem; padding: 0 .1rem; }
.pedido-total-label { font-size: .8rem; font-weight: 600; color: var(--pr-muted); }
.pedido-total-valor { font-size: 1.75rem; font-weight: 750; letter-spacing: -.035em; color: var(--pr-ink); }
.acciones-pedido { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.btn-pedido-enviar, .btn-pedido-cobrar {
    min-height: 52px; border: 0; border-radius: 12px; font-weight: 650; font-size: .95rem; gap: .5rem;
    transition: background-color .18s ease, box-shadow .18s ease, transform .12s ease;
}
.btn-pedido-enviar { background: var(--pr-accent); color: #fff; box-shadow: var(--pr-shadow-accent); }
.btn-pedido-enviar:hover { background: var(--pr-accent-hover); color: #fff; }
.btn-pedido-cobrar { background: var(--pr-ink); color: #fff; box-shadow: 0 1px 2px rgba(28, 35, 51, .2), 0 8px 18px rgba(28, 35, 51, .16); }
.btn-pedido-cobrar:hover { background: #0F1424; color: #fff; }
.btn-pedido-enviar:disabled, .btn-pedido-cobrar:disabled { background: var(--pr-surface-3) !important; color: #98A2B3 !important; box-shadow: none !important; opacity: 1; }

/* Modales del POS */
.precuenta-ticket {
    max-width: 340px; margin: 0 auto; padding: 1.25rem 1.25rem 1rem;
    background: #fff; color: #1C2333;
    border: 1px solid var(--pr-line); border-radius: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    box-shadow: var(--pr-shadow);
}
.precuenta-ticket-title { text-align: center; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.precuenta-ticket-line { display: flex; justify-content: space-between; gap: .75rem; border-bottom: 1px dashed var(--pr-line-strong); padding: .4rem 0; font-size: .86rem; }
.precuenta-ticket-total { display: flex; justify-content: space-between; gap: .75rem; padding: .5rem 0 0; font-size: 1rem; font-weight: 800; }
.quick-note { min-height: 40px; display: inline-flex; align-items: center; gap: .4rem; padding: 0 .85rem 0 2.1rem; border: 1px solid var(--pr-line-strong); border-radius: 999px; background: var(--pr-surface); }
.quick-note .form-check-input { margin-top: 0; }
#modalAgregarProducto .input-group .btn { min-width: 52px; font-size: 1.15rem; }
#modalAgregarProducto #modal-cantidad { font-size: 1.15rem; font-weight: 650; }
#modal-producto-nombre { font-size: 1.3rem; font-weight: 700; letter-spacing: -.025em; }
.toast-pos {
    position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 1080;
    min-width: 260px; max-width: min(92vw, 460px);
    border-radius: 12px; padding: .8rem 1.1rem; font-weight: 600; font-size: .9rem; text-align: center;
    border: 0 !important; color: #fff !important; background: var(--pr-ink) !important;
    box-shadow: var(--pr-shadow-lg); animation: toast-entrada .22s var(--pr-ease);
}
.toast-pos.alert-success { background: #1E3A8A !important; }
.toast-pos.alert-danger { background: var(--pr-danger) !important; }
.toast-pos.alert-warning { background: #8A5300 !important; }
@keyframes toast-entrada { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.loading-bar {
    position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 2000;
    background: linear-gradient(90deg, transparent, var(--pr-accent), var(--pr-coral), transparent);
    background-size: 200% 100%; animation: barra-carga 1.1s linear infinite;
}
@keyframes barra-carga { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---- Modo sin internet: indicador de conexión y estado de cada comanda ---- */
.conexion-chip {
    display: inline-flex; align-items: center; gap: .5rem; min-height: 36px; padding: 0 .85rem;
    border-radius: 999px; border: 1px solid var(--pr-line); background: var(--pr-surface);
    color: var(--pr-ink-2); font-weight: 600; font-size: .8rem; cursor: pointer; transition: all .15s ease;
}
.conexion-chip:hover { border-color: var(--pr-line-strong); }
.conexion-punto { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--pr-online); flex-shrink: 0; }
.conexion-online .conexion-punto::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: var(--pr-online); opacity: .25; animation: latido 2.4s ease-out infinite; }
@keyframes latido { 0% { transform: scale(.6); opacity: .35; } 100% { transform: scale(1.8); opacity: 0; } }
.conexion-offline { border-color: var(--pr-warn-line); background: var(--pr-warn-soft); color: #7A2E0E; }
.conexion-offline .conexion-punto { background: #DC6803; }
.conexion-sincronizando { border-color: var(--pr-accent-line); background: var(--pr-accent-soft); color: var(--pr-accent-ink); }
.conexion-sincronizando .conexion-punto { background: var(--pr-accent); animation: conexion-pulso 1s ease-in-out infinite; }
.conexion-sesion { border-color: var(--pr-danger-line); background: var(--pr-danger-soft); color: var(--pr-danger-ink); }
.conexion-sesion .conexion-punto { background: var(--pr-danger); }
.conexion-rech { padding: .1rem .5rem; border-radius: 999px; background: var(--pr-danger); color: #fff; font-size: .7rem; font-weight: 700; }
@keyframes conexion-pulso { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.sync-en-cocina { background: var(--pr-accent-soft); color: var(--pr-accent-ink); border: 1px solid var(--pr-accent-line); font-weight: 600; }
.sync-por-sincronizar { background: var(--pr-cobrar-soft); color: var(--pr-cobrar-ink); border: 1px solid var(--pr-cobrar-line); font-weight: 600; }
.sync-no-llego { background: var(--pr-danger-soft); color: var(--pr-danger-ink); border: 1px solid var(--pr-danger-line); font-weight: 700; }
.sync-item { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .75rem .9rem; border: 1px solid var(--pr-line); border-radius: var(--pr-r); background: var(--pr-surface-2); }

/* ==========================================================================
   Cocina (pantalla KDS) — lectura a distancia
   ========================================================================== */
body.dark-mode { background: var(--pr-bg) !important; color: var(--pr-ink) !important; }
.kitchen-header {
    background: rgba(255, 255, 255, .9) !important; color: var(--pr-ink) !important;
    border: 1px solid var(--pr-line) !important; border-radius: var(--pr-r-lg) !important;
    box-shadow: var(--pr-shadow-sm) !important;
}
.kitchen-header h3 { color: var(--pr-ink) !important; font-weight: 700; letter-spacing: -.03em; }
.kitchen-header small { color: var(--pr-muted) !important; opacity: 1 !important; }
.kitchen-header .badge.bg-primary { background: var(--pr-accent) !important; color: #fff !important; }
.kitchen-logo { height: 34px; width: auto; }
.kitchen-live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pr-online); box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
#lista-mesas .mesa-card { border-radius: var(--pr-r-lg) !important; border: 1px solid var(--pr-line) !important; background: var(--pr-surface) !important; box-shadow: var(--pr-shadow-sm) !important; overflow: hidden; }
.mesa-card.tiempo-verde::before { background: var(--pr-accent) !important; }
.mesa-card.tiempo-amarillo::before { background: var(--pr-preparando) !important; }
.mesa-card.tiempo-rojo::before { background: var(--pr-danger) !important; }
#lista-mesas .mesa-card.tiempo-amarillo { border-color: var(--pr-preparando-line) !important; }
#lista-mesas .mesa-card.tiempo-rojo { border-color: var(--pr-danger-line) !important; box-shadow: 0 0 0 3px rgba(217, 45, 32, .08), var(--pr-shadow-sm) !important; }
.mesa-card.estado-salida::before { background: var(--pr-accent) !important; }
#lista-mesas .mesa-card.mesa-prioritaria { border-color: var(--pr-danger) !important; }
.mesa-head { background: var(--pr-surface-2) !important; border: 1px solid var(--pr-line) !important; border-radius: var(--pr-r) !important; }
.mesa-head h3 { font-weight: 750; font-size: 1.6rem; letter-spacing: -.035em; }
.estado-chip, .badge-urgente { font-weight: 650; letter-spacing: .04em; }
.estado-pendiente { background: var(--pr-accent-soft); color: var(--pr-accent-ink); }
.estado-listo { background: var(--pr-accent); color: #fff; }
.badge-urgente { background: var(--pr-danger) !important; color: #fff !important; }
.tiempo-progress { background: var(--pr-surface-3) !important; border-radius: 99px; }
.tiempo-progress-bar { background: var(--pr-accent) !important; border-radius: 99px; }
.tiempo-amarillo .tiempo-progress-bar { background: var(--pr-preparando) !important; }
.tiempo-rojo .tiempo-progress-bar { background: var(--pr-danger) !important; }
.seccion-cocina { background: var(--pr-surface-2) !important; border: 1px solid var(--pr-line) !important; border-radius: var(--pr-r) !important; }
.seccion-preparacion { background: var(--pr-preparando-soft) !important; border-color: var(--pr-preparando-line) !important; }
.seccion-salida { background: var(--pr-accent-soft) !important; border-color: var(--pr-accent-line) !important; }
.seccion-preparacion .seccion-title { color: var(--pr-preparando-ink) !important; }
.seccion-salida .seccion-title { color: var(--pr-accent-press) !important; }
.pedido-bloque { background: var(--pr-surface) !important; border: 1px solid var(--pr-line) !important; border-radius: 12px !important; }
.producto-linea { background: var(--pr-surface-2) !important; border: 1px solid var(--pr-line) !important; font-size: 1.15rem; font-weight: 700; border-radius: 10px !important; color: var(--pr-ink); }
.obs-linea { color: var(--pr-coral-ink) !important; }
.pedido-tiempo-chip { background: var(--pr-accent-soft) !important; color: var(--pr-accent-ink) !important; font-weight: 750; }
.pedido-tiempo-chip.tiempo-amarillo { background: var(--pr-preparando-soft) !important; color: var(--pr-preparando-ink) !important; }
.pedido-tiempo-chip.tiempo-rojo { background: var(--pr-danger-soft) !important; color: var(--pr-danger-ink) !important; }
.aviso-sin-conexion { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; padding: .85rem 1.1rem; border: 1px solid var(--pr-warn-line); border-radius: var(--pr-r); background: var(--pr-warn-soft); color: #7A2E0E; font-weight: 600; }
.aviso-sin-conexion i { font-size: 1.4rem; }
.btn-sonido { cursor: pointer; }
.btn-sonido.sonido-on { background: var(--pr-accent-soft); border-color: var(--pr-accent-line); color: var(--pr-accent-press); }
.aviso-sonido { display: flex; align-items: center; gap: .75rem; width: 100%; margin-bottom: .75rem; padding: .9rem 1.1rem; border: 1px solid var(--pr-accent-line); border-radius: var(--pr-r); background: var(--pr-accent-soft); color: var(--pr-accent-ink); font-size: .98rem; text-align: left; min-height: 56px; cursor: pointer; }
.aviso-sonido i { font-size: 1.5rem; color: var(--pr-accent); }
.aviso-sonido:hover { background: #E3ECFF; }
.aviso-error { margin-bottom: .75rem; padding: .8rem 1.1rem; border: 1px solid var(--pr-danger-line); border-radius: var(--pr-r); background: var(--pr-danger-soft); color: var(--pr-danger-ink); font-weight: 600; }
.pedido-bloque.pedido-nuevo { border-color: var(--pr-coral) !important; box-shadow: 0 0 0 3px rgba(240, 87, 62, .2) !important; animation: pedido-nuevo-pulso 1.4s ease-in-out infinite; }
.badge-nuevo { display: inline-block; margin-left: .4rem; padding: .15rem .6rem; border-radius: 999px; background: var(--pr-coral); color: #fff; font-size: .68rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
@keyframes pedido-nuevo-pulso { 0%, 100% { box-shadow: 0 0 0 3px rgba(240, 87, 62, .22); } 50% { box-shadow: 0 0 0 7px rgba(240, 87, 62, .08); } }
.btn-kitchen { min-height: 52px; border-radius: 12px; font-weight: 650; font-size: .95rem; }
.btn-kitchen.btn-success, .btn-para-salida-pedido, .btn-retirar-mesa { background: var(--pr-accent) !important; border: 0 !important; color: #fff !important; box-shadow: var(--pr-shadow-accent) !important; }
.btn-kitchen.btn-success:hover, .btn-para-salida-pedido:hover, .btn-retirar-mesa:hover { background: var(--pr-accent-hover) !important; }
.btn-kitchen.btn-warning, .btn-preparando-pedido { background: var(--pr-preparando) !important; border: 0 !important; color: #3D2600 !important; }
.btn-tiempo-extra { background: var(--pr-surface) !important; border: 1px solid var(--pr-line-strong) !important; color: var(--pr-ink-2) !important; box-shadow: none !important; }
.btn-tiempo-extra:hover { background: var(--pr-surface-2) !important; }
.btn-icon-kitchen { width: 40px; height: 40px; padding: 0; border-radius: 10px; }

/* ==========================================================================
   Administración — barra lateral
   ========================================================================== */
body.adm-con-sidebar { padding-left: 264px; }
body.adm-con-sidebar > .container-fluid { max-width: 1480px; padding: 1.75rem 2rem 2.5rem !important; }
.adm-sidebar {
    position: fixed; inset: 0 auto 0 0; width: 264px; z-index: 1040;
    display: flex; flex-direction: column;
    background: var(--pr-surface); border-right: 1px solid var(--pr-line);
    padding: 1.25rem .9rem 1rem;
}
.adm-brand { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .25rem .55rem 1.25rem; }
.admin-brand-mark { height: 34px; width: auto; display: block; }
.adm-brand-tag { font-size: .68rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--pr-accent); background: var(--pr-accent-soft); padding: .25rem .5rem; border-radius: 6px; }
.adm-nav { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.adm-nav-grupo { font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #98A2B3; padding: 1rem .7rem .4rem; }
.adm-nav-grupo:first-child { padding-top: .25rem; }
.admin-nav-link {
    position: relative; display: flex; align-items: center; gap: .7rem;
    min-height: 42px; padding: 0 .7rem; border-radius: 10px;
    color: var(--pr-ink-2); font-weight: 550; font-size: .9rem; text-decoration: none;
    border: 0; background: transparent; box-shadow: none;
    transition: background .15s ease, color .15s ease;
}
.admin-nav-link i { font-size: 1.05rem; width: 20px; text-align: center; color: #98A2B3; transition: color .15s ease; }
.admin-nav-link:hover { background: var(--pr-surface-3); color: var(--pr-ink); }
.admin-nav-link:hover i { color: var(--pr-ink-2); }
.admin-nav-link.active { background: var(--pr-accent-soft); color: var(--pr-accent-press); font-weight: 650; box-shadow: none; }
.admin-nav-link.active i { color: var(--pr-accent); }
.adm-sidebar-pie { flex-shrink: 0; display: flex; flex-direction: column; gap: .75rem; padding-top: .9rem; border-top: 1px solid var(--pr-line); }
.adm-accesos { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.adm-acceso {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 40px;
    border-radius: 10px; font-size: .84rem; font-weight: 600; text-decoration: none;
    color: var(--pr-ink-2); background: var(--pr-surface); border: 1px solid var(--pr-line-strong); transition: all .15s ease;
}
.adm-acceso:hover { background: var(--pr-surface-2); color: var(--pr-ink); }
.adm-acceso-pos { background: var(--pr-accent); color: #fff; border-color: var(--pr-accent); box-shadow: var(--pr-shadow-accent); }
.adm-acceso-pos:hover { background: var(--pr-accent-hover); color: #fff; }
.adm-usuario { display: flex; align-items: center; gap: .6rem; padding: .5rem .35rem .1rem; }
.adm-avatar {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .78rem; font-weight: 700; color: var(--pr-coral-ink);
    background: linear-gradient(135deg, #FFE4DC, #FFF1ED); border: 1px solid var(--pr-coral-line);
}
.adm-usuario-texto { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.adm-usuario-nombre { font-size: .86rem; font-weight: 650; color: var(--pr-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-usuario-rol { font-size: .74rem; color: var(--pr-muted); }
.adm-salir {
    width: 34px; height: 34px; border-radius: 9px; border: 0; background: transparent; color: #98A2B3;
    display: inline-flex; align-items: center; justify-content: center; transition: all .15s ease;
}
.adm-salir:hover { background: var(--pr-danger-soft); color: var(--pr-danger); }
.adm-topbar { display: none; }
.adm-sidebar-velo { position: fixed; inset: 0; z-index: 1035; background: rgba(16, 24, 40, .35); }

/* Encabezados de página: claros, sin bloque de color */
.admin-page-hero, .dashboard-hero {
    background: transparent !important; color: var(--pr-ink) !important;
    border: 0 !important; box-shadow: none !important; border-radius: 0 !important;
    padding: 0 0 .5rem !important; margin-bottom: 1.5rem !important;
}
.admin-page-hero::before, .admin-page-hero::after, .dashboard-hero::before, .dashboard-hero::after { display: none !important; }
.admin-page-hero h3, .dashboard-hero h3 { color: var(--pr-ink) !important; font-size: 1.65rem; font-weight: 700; letter-spacing: -.035em; margin-bottom: .25rem !important; }
.admin-page-hero small, .dashboard-hero small { color: var(--pr-muted) !important; font-size: .9rem; }
.admin-page-hero .small.text-uppercase, .dashboard-hero .small.text-uppercase { color: var(--pr-accent) !important; font-size: .72rem; letter-spacing: .08em !important; font-weight: 650 !important; opacity: 1 !important; }
.admin-filter-card, .dashboard-hero .filter-card {
    background: var(--pr-surface) !important; border: 1px solid var(--pr-line) !important;
    border-radius: var(--pr-r) !important; box-shadow: var(--pr-shadow-xs) !important; color: var(--pr-ink) !important;
}
.admin-filter-card .small, .admin-filter-card span { color: var(--pr-muted) !important; }
.admin-filter-card .btn-salon { background: transparent !important; color: var(--pr-ink-2) !important; border: 1px solid transparent !important; box-shadow: none !important; min-height: 38px; }
.admin-filter-card .btn-salon:hover { background: var(--pr-surface-3) !important; }
.admin-filter-card .btn-salon.active { background: var(--pr-accent-soft) !important; color: var(--pr-accent-press) !important; border-color: var(--pr-accent-line) !important; }
.dashboard-hero .filter-card .btn-light { background: var(--pr-accent) !important; color: #fff !important; border-color: var(--pr-accent) !important; }
.dashboard-hero .filter-card .btn-outline-light { color: var(--pr-ink-2) !important; }
.dashboard-hero .filter-card .form-control { min-height: 40px; }

/* Tarjetas, métricas y paneles */
.panel-card { border-radius: var(--pr-r-lg) !important; }
.panel-card > .card-body { padding: 1.35rem 1.4rem; }
.panel-title h5, .panel-title h6 { font-weight: 650; letter-spacing: -.02em; }
.panel-title small { color: var(--pr-muted); }
.kpi-card, .stat-card, .metric-card { background: var(--pr-surface) !important; border: 1px solid var(--pr-line) !important; border-radius: var(--pr-r-lg) !important; box-shadow: var(--pr-shadow-sm) !important; }
.metric-card { position: relative; overflow: hidden; }
.metric-card .card-body { padding: 1.25rem 1.35rem; }
.metric-card small { display: block; color: var(--pr-muted) !important; font-size: .78rem !important; font-weight: 550 !important; letter-spacing: 0 !important; text-transform: none !important; margin-bottom: .35rem; }
.metric-card h3 { font-size: 1.85rem; font-weight: 750; letter-spacing: -.04em; margin: 0; color: var(--pr-ink); }
.metric-accent { position: absolute !important; top: 1.25rem !important; right: 1.25rem !important; left: auto !important; bottom: auto !important; width: 10px !important; height: 10px !important; border-radius: 50% !important; background: var(--pr-accent); box-shadow: 0 0 0 5px rgba(37, 99, 235, .1); }
.empty-state, .empty-box { border: 1.5px dashed var(--pr-line-strong) !important; background: var(--pr-surface-2) !important; border-radius: var(--pr-r) !important; color: var(--pr-muted) !important; }

/* Mesas activas (admin) */
.metric-mini { background: var(--pr-surface-2) !important; border: 1px solid var(--pr-line) !important; border-radius: 10px !important; padding: .55rem .6rem !important; }
.metric-mini small { display: block; font-size: .66rem !important; color: var(--pr-muted) !important; letter-spacing: .03em; }
.metric-mini strong { display: block; font-size: .92rem !important; font-weight: 700; white-space: nowrap; letter-spacing: -.02em; color: var(--pr-ink) !important; font-variant-numeric: tabular-nums; }
.card.mesa-card h5 { overflow-wrap: anywhere; font-weight: 700; letter-spacing: -.03em; }
.mesa-meta span { background: var(--pr-surface-3) !important; color: var(--pr-ink-2) !important; border: 0 !important; }
.btn-outline-warning { --bs-btn-color: var(--pr-preparando-ink); --bs-btn-border-color: var(--pr-preparando-line); --bs-btn-hover-bg: var(--pr-preparando-soft); --bs-btn-hover-color: var(--pr-preparando-ink); --bs-btn-hover-border-color: var(--pr-preparando); background: var(--pr-surface); }

/* Caja del turno */
.caja-estado-badge { border-radius: 999px; font-weight: 650; font-size: .7rem; padding: .3rem .6rem; letter-spacing: .03em; }

/* ==========================================================================
   Ingreso
   ========================================================================== */
.login-page { min-height: 100vh; background: var(--pr-bg) !important; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(420px, 1fr); }
.login-escena {
    position: relative; overflow: hidden; display: flex; align-items: center;
    padding: 3.5rem clamp(2rem, 5vw, 5rem) 9rem;
    background:
        radial-gradient(900px 500px at 15% 0%, #DCE8FF 0%, transparent 60%),
        radial-gradient(700px 420px at 100% 30%, #FFE7DF 0%, transparent 60%),
        linear-gradient(180deg, #F2F6FF 0%, #F7F6F3 100%);
    border-right: 1px solid var(--pr-line);
}
.login-escena-contenido { position: relative; z-index: 1; max-width: 560px; display: flex; flex-direction: column; gap: 2.5rem; }
.login-escena-logo { height: 44px; width: auto; align-self: flex-start; }
.login-eyebrow { display: inline-block; font-size: .78rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--pr-accent); margin-bottom: 1rem; }
.login-titulo { font-size: clamp(2.2rem, 3.6vw, 3.4rem); line-height: 1.05; font-weight: 750; letter-spacing: -.045em; color: var(--pr-ink); margin: 0; }
.login-bajada { margin: 1.1rem 0 0; font-size: 1.08rem; line-height: 1.6; color: var(--pr-ink-2); max-width: 30rem; }
.login-puntos { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.login-puntos li {
    display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem;
    background: rgba(255, 255, 255, .7); border: 1px solid rgba(255, 255, 255, .9);
    border-radius: var(--pr-r); box-shadow: var(--pr-shadow-xs);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    font-size: .88rem; color: var(--pr-muted); max-width: 26rem;
}
.login-puntos strong { display: block; color: var(--pr-ink); font-weight: 650; font-size: .92rem; }
.login-punto-icono { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--pr-accent-soft); color: var(--pr-accent); font-size: 1.1rem; }
.login-puntos li:nth-child(2) .login-punto-icono { background: var(--pr-coral-soft); color: var(--pr-coral); }
.login-puntos li:nth-child(3) .login-punto-icono { background: var(--pr-cobrar-soft); color: var(--pr-cobrar); }
.login-olas { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 190px; }
.login-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2.5rem 1.5rem 1.5rem; }
.login-card { width: 100%; max-width: 400px; }
.login-logo { height: 40px; width: auto; display: none; margin-bottom: 2rem; }
.login-card-titulo { font-size: 1.85rem; font-weight: 750; letter-spacing: -.04em; margin: 0 0 .4rem; }
.login-card-sub { color: var(--pr-muted); margin: 0 0 2rem; font-size: .98rem; }
.login-alerta { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: 1.5rem; }
.login-alerta > i { font-size: 1.15rem; margin-top: .05rem; }
.login-campo { position: relative; }
.login-campo > i { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: #98A2B3; pointer-events: none; }
.login-campo .form-control { min-height: 48px; padding-left: 2.6rem; border-radius: 12px; }
.login-form .form-check-label { font-size: .88rem; color: var(--pr-ink-2); }
.btn-login { min-height: 50px; border-radius: 12px; font-size: 1rem; font-weight: 650; }
.btn-login i { transition: transform .18s var(--pr-ease); }
.btn-login:hover i { transform: translateX(3px); }
.login-ayuda { display: flex; gap: .5rem; align-items: flex-start; margin: 1.75rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--pr-line); font-size: .84rem; color: var(--pr-muted); }
.login-pie { margin: 2.5rem 0 0; font-size: .78rem; color: #98A2B3; }

/* ==========================================================================
   Responsive y movimiento
   ========================================================================== */
@media (max-width: 1399.98px) {
    .pos-layout { grid-template-columns: 268px minmax(0, 1fr); }
    .pos-work { grid-template-columns: 172px minmax(0, 1fr) minmax(310px, 350px); gap: .85rem; padding: .85rem; }
    .pos-work.layout-categorias-colapsada { grid-template-columns: 60px minmax(0, 1fr) minmax(310px, 350px); }
}
@media (max-width: 1199.98px) {
    /* Tablet horizontal: las mesas pasan a una franja superior desplazable */
    .pos-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
    .pos-mesas { border-right: 0; border-bottom: 1px solid var(--pr-line); }
    .pos-mesas-head { padding: .7rem 1rem .5rem; }
    .mesas-legend-wrap { display: none; }
    .pos-app .mesa-grid { flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: .2rem 1rem .8rem; gap: .55rem; }
    .pos-app .mesa-card { flex: 0 0 230px; }
    .pos-brand-sub { display: none; }
    .pos-nav-link span { display: none; }
    .pos-work { grid-template-columns: 140px minmax(0, 1fr) minmax(320px, 340px); }
    .pos-work.layout-categorias-colapsada { grid-template-columns: 60px minmax(0, 1fr) minmax(320px, 340px); }
    .btn-pedido-enviar i, .btn-pedido-cobrar i { display: none; }
    .btn-pedido-enviar, .btn-pedido-cobrar { white-space: nowrap; font-size: .9rem; padding-inline: .5rem; }
}
@media (max-width: 991.98px) {
    .pos-page { height: auto; overflow: auto; }
    .pos-app { height: auto; min-height: 100vh; }
    .pos-topbar { flex-wrap: wrap; height: auto; padding: .7rem 1rem; gap: .6rem; position: sticky; top: 0; }
    .pos-brand { border-right: 0; padding-right: 0; }
    .salon-pills { order: 3; width: 100%; }
    .pos-work, .pos-work.layout-categorias-colapsada { grid-template-columns: minmax(0, 1fr); }
    #col-categorias .categorias-panel { height: auto; }
    .categorias-panel-body { flex-direction: row; overflow-x: auto; padding: .1rem .75rem .75rem; }
    .btn-categoria-pos { width: auto; flex-shrink: 0; white-space: nowrap; }
    .btn-categoria-pos.active::before { display: none; }
    #btn-toggle-categorias { display: none; }
    .layout-categorias-colapsada #categorias-list, .layout-categorias-colapsada .categorias-panel-title { display: flex !important; }
    .productos-panel, .pedido-panel { height: auto; }
    .productos-panel-body { max-height: 56vh; }
    .pedido-detalles-scroll { max-height: 50vh; }
    .productos-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

    body.adm-con-sidebar { padding-left: 0; }
    body.adm-con-sidebar > .container-fluid { padding: 1rem 1rem 2rem !important; }
    .adm-sidebar { transform: translateX(-100%); transition: transform .25s var(--pr-ease); box-shadow: var(--pr-shadow-lg); }
    .adm-sidebar.abierta { transform: none; }
    .adm-topbar { display: flex; align-items: center; gap: .75rem; margin: -1rem -1rem 1.25rem; padding: .7rem 1rem; background: rgba(255, 255, 255, .9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--pr-line); position: sticky; top: 0; z-index: 1030; }
    .adm-menu-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--pr-line); background: var(--pr-surface); font-size: 1.3rem; display: inline-flex; align-items: center; justify-content: center; color: var(--pr-ink); }
    .adm-topbar-logo { height: 28px; width: auto; }

    .login-shell { grid-template-columns: minmax(0, 1fr); }
    .login-escena { display: none; }
    .login-panel { min-height: 100vh; background: radial-gradient(600px 300px at 50% 0%, #E3ECFF 0%, transparent 70%), var(--pr-bg); }
    .login-logo { display: block; }
}
@media (max-width: 575.98px) {
    body { font-size: 15px; }
    .btn { min-height: 46px; }
    .pedido-total-valor { font-size: 1.5rem; }
    .acciones-pedido { grid-template-columns: 1fr; }
    .conexion-chip #estado-conexion-texto { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Escritorio (≥992px): categorías como cinta de chips sobre la carta,
   carta amplia al centro y pedido fijo a la derecha
   ========================================================================== */
@media (min-width: 992px) {
    .pos-app .pos-work,
    .pos-app .pos-work.layout-categorias-colapsada {
        grid-template-columns: minmax(0, 1fr) clamp(340px, 29vw, 430px);
        grid-template-rows: auto minmax(0, 1fr);
        gap: .9rem 1.25rem; padding: 1.1rem 1.4rem 1.2rem;
    }
    .pos-app #col-categorias { grid-column: 1; grid-row: 1; }
    .pos-app #col-productos { grid-column: 1; grid-row: 2; }
    .pos-app #col-pedido { grid-column: 2; grid-row: 1 / span 2; }

    .pos-app #col-categorias .categorias-panel {
        height: auto; background: transparent; border: 0; box-shadow: none; overflow: visible;
    }
    .pos-app .categorias-panel-header { display: none; }
    .pos-app .categorias-panel-body,
    .pos-app .layout-categorias-colapsada #categorias-list {
        display: flex !important; flex-direction: row; flex-wrap: nowrap; gap: .5rem;
        overflow-x: auto; overflow-y: hidden; padding: .15rem .1rem .35rem;
        scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 94%, transparent);
        mask-image: linear-gradient(90deg, #000 94%, transparent);
    }
    .pos-app .categorias-panel-body::-webkit-scrollbar { display: none; }
    .pos-app .btn-categoria-pos {
        width: auto; flex: 0 0 auto; white-space: nowrap; min-height: 42px;
        padding: .45rem .55rem .45rem 1rem; gap: .6rem; border-radius: 999px;
        background: var(--pr-surface); border: 1px solid var(--pr-line);
        box-shadow: 0 1px 2px rgba(28, 35, 51, .04);
    }
    .pos-app .btn-categoria-pos:hover { border-color: #C7D7FB; background: #fff; }
    .pos-app .btn-categoria-pos.active {
        background: var(--pr-accent) !important; color: #fff !important; border-color: var(--pr-accent);
        box-shadow: 0 6px 16px rgba(37, 99, 235, .28) !important;
    }
    .pos-app .btn-categoria-pos.active::before { display: none; }
    .pos-app .btn-categoria-pos.active .btn-categoria-count { background: rgba(255, 255, 255, .22); color: #fff; }
    .pos-app .btn-categoria-nombre { flex: 0 0 auto; }

    .pos-app .productos-panel { border-radius: 20px; box-shadow: 0 1px 2px rgba(28, 35, 51, .04), 0 12px 32px rgba(28, 35, 51, .05); }
    .pos-app .productos-panel-header { padding: 1.1rem 1.3rem .8rem; }
    .pos-app .productos-panel-top { margin-bottom: .8rem; }
    .pos-app .productos-panel-title { font-size: 1.15rem; }
    .pos-app .productos-panel-body { padding: .4rem 1.3rem 1.3rem; }
    .pos-app .productos-grid { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: .9rem; }
    .pos-app .producto-btn { min-height: 118px; padding: 1rem 1rem .9rem; border-radius: 16px; }
    .pos-app .producto-btn-nombre { font-size: .95rem; }
    .pos-app .producto-btn-precio { font-size: 1.12rem; }

    .pos-app .pedido-panel { border-radius: 20px; box-shadow: 0 1px 2px rgba(28, 35, 51, .04), 0 12px 32px rgba(28, 35, 51, .06); }
}

/* ==========================================================================
   Venta en caja e Impresión (admin)
   ========================================================================== */
.vc-body { background: var(--pr-bg); }
body.vc-body.adm-con-sidebar > .container-fluid { max-width: 1680px; padding-top: 1.25rem !important; padding-bottom: 1.25rem !important; }
.vc { display: grid; grid-template-columns: minmax(0, 1fr) clamp(360px, 28vw, 430px); gap: 1.25rem; height: calc(100vh - 2.5rem); min-height: 560px; }
.vc-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.vc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.vc-title { margin: 0; font-size: 1.6rem; font-weight: 700; letter-spacing: -.03em; color: var(--pr-ink); }
.vc-sub { margin: .25rem 0 0; color: var(--pr-muted); font-size: .92rem; max-width: 52ch; }
.vc-head-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.vc-turno { display: inline-flex; align-items: center; gap: .4rem; height: 40px; padding: 0 .95rem; border-radius: 999px; font-size: .85rem; font-weight: 600; border: 1px solid var(--pr-line); background: var(--pr-surface); color: var(--pr-muted); }
.vc-turno.is-abierto { background: #ECFDF3; border-color: #ABEFC6; color: #067647; }
.vc-turno.is-cerrado { background: var(--pr-surface-3); }
.vc-btn-ghost { height: 40px; display: inline-flex; align-items: center; gap: .45rem; padding: 0 1rem; border-radius: 12px; border: 1px solid var(--pr-line-strong); background: var(--pr-surface); color: var(--pr-ink); font-weight: 600; font-size: .88rem; transition: all .15s ease; }
.vc-btn-ghost:hover { border-color: var(--pr-accent); color: var(--pr-accent); background: var(--pr-accent-soft); }
.vc-btn-sm { height: 34px; padding: 0 .75rem; font-size: .8rem; border-radius: 10px; }
.vc-aviso { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 1rem; margin-bottom: 1rem; border-radius: 14px; background: var(--pr-preparando-soft); border: 1px solid var(--pr-preparando-line); color: var(--pr-preparando-ink); font-size: .9rem; }
.vc-aviso a { color: inherit; font-weight: 700; }

.vc-toolbar { margin-bottom: .75rem; }
.vc-search { position: relative; }
.vc-search > i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: #98A2B3; pointer-events: none; }
.vc-search .form-control { height: 50px; padding-left: 2.7rem; border-radius: 14px; border: 1px solid var(--pr-line); background: var(--pr-surface); font-size: 1rem; box-shadow: 0 1px 2px rgba(28, 35, 51, .04); }
.vc-search .form-control:focus { border-color: var(--pr-accent); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }

.vc-cats { display: flex; gap: .5rem; overflow-x: auto; padding: .15rem .1rem .6rem; scrollbar-width: none; flex-shrink: 0; }
.vc-cats::-webkit-scrollbar { display: none; }
.vc-cat { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .55rem; height: 42px; padding: 0 .6rem 0 1rem; border-radius: 999px; border: 1px solid var(--pr-line); background: var(--pr-surface); color: var(--pr-ink-2); font-weight: 600; font-size: .9rem; white-space: nowrap; transition: all .15s ease; box-shadow: 0 1px 2px rgba(28, 35, 51, .04); }
.vc-cat span { min-width: 24px; height: 22px; padding: 0 .4rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--pr-surface-3); color: var(--pr-muted); }
.vc-cat:hover { border-color: #C7D7FB; color: var(--pr-ink); }
.vc-cat.is-activa { background: var(--pr-accent); border-color: var(--pr-accent); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, .28); }
.vc-cat.is-activa span { background: rgba(255, 255, 255, .22); color: #fff; }

.vc-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); grid-auto-rows: 118px; gap: .9rem; align-content: start; padding: .75rem .75rem 1rem; }
.vc-prod { position: relative; display: flex; flex-direction: column; justify-content: space-between; text-align: left; padding: 1rem; border-radius: 18px; border: 1px solid var(--pr-line); background: var(--pr-surface); box-shadow: 0 1px 2px rgba(28, 35, 51, .04), 0 6px 18px rgba(28, 35, 51, .04); transition: transform .15s var(--pr-ease), box-shadow .15s ease, border-color .15s ease; }
.vc-prod:hover { transform: translateY(-2px); border-color: #C7D7FB; box-shadow: 0 2px 4px rgba(28, 35, 51, .04), 0 14px 28px rgba(37, 99, 235, .12); }
.vc-prod:active { transform: scale(.98); background: var(--pr-accent-soft); }
.vc-prod.is-en-pedido { border-color: var(--pr-accent); background: linear-gradient(180deg, #fff, var(--pr-accent-soft)); }
.vc-prod-badge { position: absolute; top: -8px; right: -8px; min-width: 28px; height: 28px; padding: 0 .4rem; display: grid; place-items: center; border-radius: 999px; background: var(--pr-coral); color: #fff; font-weight: 700; font-size: .8rem; box-shadow: 0 4px 10px rgba(240, 87, 62, .4); }
.vc-prod-nombre { font-weight: 650; font-size: .96rem; line-height: 1.3; color: var(--pr-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vc-prod-pie { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.vc-prod-precio { font-size: 1.15rem; font-weight: 750; letter-spacing: -.02em; color: var(--pr-ink); font-variant-numeric: tabular-nums; }
.vc-prod-est { display: inline-flex; gap: .3rem; }
.vc-est { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; font-size: .8rem; }
.vc-est-cal { background: var(--pr-coral-soft); color: var(--pr-coral-ink); }
.vc-est-fri { background: #E8F6FD; color: #0B6B94; }
.vc-est-bar { background: var(--pr-cobrar-soft); color: var(--pr-cobrar-ink); }

.vc-vacio { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; padding: 2.5rem 1rem; text-align: center; color: var(--pr-muted); }
.vc-vacio i { font-size: 2rem; color: #B8C2D6; margin-bottom: .3rem; }
.vc-vacio strong { color: var(--pr-ink); font-size: 1rem; }
.vc-vacio span { font-size: .88rem; }
.vc-vacio-cart { height: 100%; }

/* Carrito */
.vc-cart { min-height: 0; display: flex; flex-direction: column; background: var(--pr-surface); border: 1px solid var(--pr-line); border-radius: 22px; box-shadow: 0 1px 2px rgba(28, 35, 51, .04), 0 16px 40px rgba(28, 35, 51, .07); overflow: hidden; }
.vc-cart-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.25rem .6rem; }
.vc-cart-title { font-size: 1.1rem; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: center; gap: .5rem; color: var(--pr-ink); }
.vc-cart-title i { color: var(--pr-accent); }
.vc-link { border: 0; background: transparent; color: var(--pr-muted); font-size: .82rem; font-weight: 600; display: inline-flex; gap: .3rem; align-items: center; }
.vc-link:hover { color: var(--pr-danger); }
.vc-cliente { position: relative; margin: 0 1.25rem .6rem; }
.vc-cliente > i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: #98A2B3; }
.vc-cliente .form-control { height: 42px; padding-left: 2.4rem; border-radius: 12px; background: var(--pr-surface-2); border: 1px solid var(--pr-line); box-shadow: none; font-size: .92rem; }
.vc-cliente .form-control:focus { background: #fff; border-color: var(--pr-accent); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }

.vc-items { flex: 1; min-height: 0; overflow-y: auto; padding: .25rem 1.25rem; display: flex; flex-direction: column; gap: .55rem; }
.vc-item { padding: .75rem .85rem; border-radius: 14px; background: var(--pr-surface-2); border: 1px solid var(--pr-line); }
.vc-item-top { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; }
.vc-item-nombre { font-weight: 650; font-size: .93rem; color: var(--pr-ink); }
.vc-item-sub { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--pr-ink); font-size: .93rem; }
.vc-item-bot { display: flex; align-items: center; gap: .5rem; margin-top: .55rem; }
.vc-stepper { display: inline-flex; align-items: center; background: #fff; border: 1px solid var(--pr-line-strong); border-radius: 11px; overflow: hidden; flex-shrink: 0; }
.vc-stepper button { width: 34px; height: 34px; border: 0; background: transparent; color: var(--pr-accent); font-size: 1.05rem; display: grid; place-items: center; }
.vc-stepper button:hover { background: var(--pr-accent-soft); }
.vc-stepper span { min-width: 30px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.vc-obs { flex: 1; min-width: 0; height: 34px; border: 1px dashed var(--pr-line-strong); border-radius: 10px; background: transparent; padding: 0 .65rem; font-size: .82rem; color: var(--pr-ink-2); }
.vc-obs:focus { outline: 0; border-style: solid; border-color: var(--pr-accent); background: #fff; }
.vc-icon-btn { width: 34px; height: 34px; flex-shrink: 0; border: 0; border-radius: 10px; background: transparent; color: var(--pr-muted); display: grid; place-items: center; transition: all .15s ease; }
.vc-icon-btn:hover { background: var(--pr-surface-3); color: var(--pr-ink); }
.vc-quitar:hover { background: var(--pr-coral-soft); color: var(--pr-coral-ink); }

.vc-cart-foot { padding: 1rem 1.25rem 1.25rem; border-top: 1px solid var(--pr-line); background: linear-gradient(180deg, var(--pr-surface), var(--pr-surface-2)); display: flex; flex-direction: column; gap: .8rem; }
.vc-total-row { display: flex; justify-content: space-between; align-items: baseline; color: var(--pr-muted); font-weight: 600; }
.vc-total-row strong { font-size: 2rem; letter-spacing: -.04em; color: var(--pr-ink); font-variant-numeric: tabular-nums; }
.vc-pagos { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; }
.vc-pago { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .6rem .2rem; border-radius: 13px; border: 1px solid var(--pr-line-strong); background: var(--pr-surface); color: var(--pr-ink-2); font-size: .74rem; font-weight: 650; transition: all .15s ease; }
.vc-pago i { font-size: 1.15rem; }
.vc-pago:hover { border-color: #C7D7FB; }
.vc-pago.is-activo { border-color: var(--pr-accent); background: var(--pr-accent-soft); color: var(--pr-accent-press); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.vc-pago.is-bloqueado { opacity: .45; }
.vc-efectivo[hidden] { display: none; }
.vc-efectivo-label { font-size: .78rem; font-weight: 650; color: var(--pr-muted); margin-bottom: .3rem; display: block; }
.vc-efectivo-input { display: flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid var(--pr-line-strong); border-radius: 13px; padding: 0 .85rem; }
.vc-efectivo-input > span { font-weight: 700; color: var(--pr-muted); }
.vc-efectivo-input .form-control { border: 0; box-shadow: none; height: 46px; padding: 0; font-size: 1.2rem; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 0; flex: 1; background: transparent; }
.vc-vuelto { font-size: .82rem; font-weight: 600; color: #067647; white-space: nowrap; }
.vc-vuelto strong { font-size: 1rem; }
.vc-vuelto.is-falta { color: var(--pr-coral-ink); }
.vc-billetes { display: flex; gap: .35rem; margin-top: .45rem; flex-wrap: wrap; }
.vc-billetes button { flex: 1 1 auto; height: 32px; padding: 0 .55rem; border-radius: 9px; border: 1px solid var(--pr-line); background: var(--pr-surface); font-size: .78rem; font-weight: 650; color: var(--pr-ink-2); }
.vc-billetes button:hover { border-color: var(--pr-accent); color: var(--pr-accent); background: var(--pr-accent-soft); }
.vc-check { display: flex; align-items: center; gap: .55rem; font-size: .86rem; color: var(--pr-ink-2); cursor: pointer; margin: 0; }
.vc-check input { width: 18px; height: 18px; accent-color: var(--pr-accent); }
.vc-error { padding: .6rem .8rem; border-radius: 12px; background: var(--pr-coral-soft); border: 1px solid var(--pr-coral-line); color: var(--pr-coral-ink); font-size: .86rem; font-weight: 600; }
.vc-error[hidden] { display: none; }
.vc-cta { height: 58px; border: 0; border-radius: 16px; background: var(--pr-accent); color: #fff; font-size: 1.05rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: .6rem; box-shadow: 0 10px 24px rgba(37, 99, 235, .32); transition: all .15s ease; }
.vc-cta:hover:not(:disabled) { background: var(--pr-accent-hover); transform: translateY(-1px); color: #fff; }
.vc-cta:disabled { background: var(--pr-surface-3); color: #98A2B3; box-shadow: none; }
.vc-cta-inline { height: 48px; padding: 0 1.3rem; }

/* Confirmación */
.vc-modal { position: fixed; inset: 0; z-index: 1080; display: grid; place-items: center; padding: 1rem; background: rgba(28, 35, 51, .45); backdrop-filter: blur(4px); }
.vc-modal[hidden] { display: none; }
.vc-ok-card { width: min(440px, 100%); background: var(--pr-surface); border-radius: 26px; padding: 2rem 1.75rem 1.5rem; text-align: center; box-shadow: 0 30px 80px rgba(28, 35, 51, .35); animation: vc-pop .28s var(--pr-ease); }
@keyframes vc-pop { from { transform: translateY(12px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.vc-ok-check { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; background: #ECFDF3; color: #12B76A; font-size: 2rem; }
.vc-ok-eyebrow { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--pr-muted); }
.vc-ok-num { font-size: 3.6rem; font-weight: 800; letter-spacing: -.05em; line-height: 1.1; color: var(--pr-ink); }
.vc-ok-meta { color: var(--pr-ink-2); font-weight: 600; margin-top: .25rem; }
.vc-ok-tickets { margin: 1.25rem 0 .5rem; display: flex; flex-direction: column; gap: .45rem; text-align: left; }
.vc-ok-ticket { display: flex; align-items: center; gap: .7rem; padding: .65rem .85rem; border-radius: 12px; background: var(--pr-surface-2); border: 1px solid var(--pr-line); font-weight: 650; font-size: .92rem; }
.vc-ok-ticket i { color: var(--pr-accent); font-size: 1.05rem; }
.vc-ok-ticket span { flex: 1; }
.vc-ok-ticket a { font-size: .8rem; font-weight: 650; color: var(--pr-accent); text-decoration: none; }
.vc-ok-nota { min-height: 1.4rem; color: #067647; font-weight: 600; margin-bottom: .5rem; }
.vc-ok-acciones { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: .5rem; }

/* Ventas de hoy */
.vc-drawer-velo { position: fixed; inset: 0; z-index: 1070; background: rgba(28, 35, 51, .35); }
.vc-drawer-velo[hidden], .vc-drawer[hidden] { display: none; }
.vc-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 1075; width: min(420px, 100%); background: var(--pr-surface); box-shadow: -20px 0 60px rgba(28, 35, 51, .2); display: flex; flex-direction: column; animation: vc-slide .25s var(--pr-ease); }
@keyframes vc-slide { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.vc-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--pr-line); font-size: 1.05rem; }
.vc-drawer-body { flex: 1; overflow-y: auto; padding: .75rem 1rem 1.25rem; display: flex; flex-direction: column; gap: .5rem; }
.vc-venta { display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border-radius: 14px; border: 1px solid var(--pr-line); background: var(--pr-surface-2); }
.vc-venta-num { min-width: 56px; font-weight: 800; letter-spacing: -.03em; color: var(--pr-accent); }
.vc-venta-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.vc-venta-info strong { font-variant-numeric: tabular-nums; }
.vc-venta-info span { font-size: .78rem; color: var(--pr-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-chip { display: inline-flex; align-items: center; height: 26px; padding: 0 .65rem; border-radius: 999px; font-size: .74rem; font-weight: 700; text-transform: capitalize; background: var(--pr-surface-3); color: var(--pr-muted); white-space: nowrap; }
.vc-chip.is-ok, .vc-chip.is-impreso { background: #ECFDF3; color: #067647; }
.vc-chip.is-pend, .vc-chip.is-pendiente { background: var(--pr-preparando-soft); color: var(--pr-preparando-ink); }
.vc-chip.is-error { background: var(--pr-coral-soft); color: var(--pr-coral-ink); }

/* Cola de impresión */
.vp { max-width: 1100px; }
.vp-filtros { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.vp-lista { display: flex; flex-direction: column; gap: .6rem; }
.vp-job { display: flex; align-items: center; gap: .85rem; padding: .8rem 1rem; border-radius: 16px; background: var(--pr-surface); border: 1px solid var(--pr-line); box-shadow: 0 1px 2px rgba(28, 35, 51, .04); flex-wrap: wrap; }
.vp-job-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.1rem; background: var(--pr-accent-soft); color: var(--pr-accent); flex-shrink: 0; }
.vp-job-ic.vp-cocina_caliente, .vp-job-ic.vp-cocina { background: var(--pr-coral-soft); color: var(--pr-coral-ink); }
.vp-job-ic.vp-cocina_fria { background: #E8F6FD; color: #0B6B94; }
.vp-job-ic.vp-bar { background: var(--pr-cobrar-soft); color: var(--pr-cobrar-ink); }
.vp-job-info { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.vp-job-info span { font-size: .8rem; color: var(--pr-muted); }

@media (max-width: 991.98px) {
    .vc { display: flex; flex-direction: column; height: auto; min-height: 0; }
    .vc-grid { overflow: visible; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: 108px; }
    .vc-cart { position: sticky; bottom: 0; max-height: none; }
    .vc-items { max-height: 38vh; }
}

/* Venta en caja: espera de terminal, confirmación con boleta, integraciones */
.vc-espera-card { width: min(420px, 100%); background: var(--pr-surface); border-radius: 26px; padding: 2.2rem 1.75rem 1.6rem; text-align: center; box-shadow: 0 30px 80px rgba(28, 35, 51, .35); animation: vc-pop .28s var(--pr-ease); display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.vc-pulso { position: relative; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--pr-accent-soft); color: var(--pr-accent); font-size: 2.2rem; margin-bottom: .4rem; }
.vc-pulso::before, .vc-pulso::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--pr-accent); opacity: 0; animation: vc-onda 2s ease-out infinite; }
.vc-pulso::after { animation-delay: 1s; }
@keyframes vc-onda { from { transform: scale(1); opacity: .5; } to { transform: scale(1.7); opacity: 0; } }
.vc-espera-monto { font-size: 3rem; font-weight: 800; letter-spacing: -.045em; color: var(--pr-ink); line-height: 1.1; }
.vc-espera-texto { color: var(--pr-ink-2); font-weight: 600; min-height: 1.4rem; }
.vc-pasos { display: flex; gap: .4rem; margin: .5rem 0 .8rem; }
.vc-pasos span { padding: .3rem .8rem; border-radius: 999px; background: var(--pr-surface-3); color: var(--pr-muted); font-size: .76rem; font-weight: 700; transition: all .25s ease; }
.vc-pasos span.is-on { background: var(--pr-accent-soft); color: var(--pr-accent-press); }

.vc-ok-doble { width: min(980px, 100%); max-height: calc(100vh - 2rem); display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); padding: 0; overflow: hidden; text-align: left; }
.vc-ok-izq { padding: 2rem 1.75rem 1.5rem; display: flex; flex-direction: column; text-align: center; overflow-y: auto; }
.vc-ok-izq .vc-ok-tickets { text-align: left; }
.vc-ok-seccion { margin-top: 1rem; text-align: left; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pr-muted); }
.vc-ok-izq .vc-ok-acciones { margin-top: auto; padding-top: 1rem; }
.vc-ok-ticket.is-boleta { border-color: var(--pr-accent-line); background: var(--pr-accent-soft); }
.vc-t-nombre { flex: 1; }
.vc-imp { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.vc-imp.is-ok { color: #067647; }
.vc-imp.is-error { color: var(--pr-coral-ink); }
.vc-imp.is-cola { color: var(--pr-muted); }
.vc-spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--pr-line-strong); border-top-color: var(--pr-accent); animation: vc-giro .8s linear infinite; }
@keyframes vc-giro { to { transform: rotate(360deg); } }
.vc-ok-aviso { margin-top: .6rem; padding: .6rem .8rem; border-radius: 12px; background: var(--pr-preparando-soft); border: 1px solid var(--pr-preparando-line); color: var(--pr-preparando-ink); font-size: .82rem; font-weight: 600; text-align: left; }
.vc-ok-aviso[hidden], .vc-ok-vacio { display: none; }
.vc-ok-der { background: linear-gradient(180deg, #ECEAE5, #E4E1DB); padding: 1.1rem 1.25rem 1rem; display: flex; flex-direction: column; min-height: 520px; border-left: 1px solid var(--pr-line); }
.vc-doc-barra { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .7rem; }
.vc-doc-titulo { font-weight: 700; color: var(--pr-ink); display: inline-flex; align-items: center; gap: .45rem; }
.vc-doc-marco { flex: 1; min-height: 0; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 10px 30px rgba(28, 35, 51, .14); position: relative; }
.vc-doc-marco iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.vc-doc-marco iframe[hidden] { display: none; }
.vc-doc-vacio { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; color: var(--pr-muted); font-size: .9rem; text-align: center; padding: 1.5rem; }
.vc-doc-vacio[hidden] { display: none; }
.vc-doc-vacio i { font-size: 2.2rem; color: #B8C2D6; }
.vc-doc-acciones { display: flex; gap: .5rem; margin-top: .7rem; justify-content: flex-end; }
.vc-doc-acciones [hidden] { display: none; }

.vc-venta-bloque { border: 1px solid var(--pr-line); border-radius: 14px; background: var(--pr-surface-2); overflow: hidden; }
.vc-venta-bloque .vc-venta { border: 0; background: transparent; }
.vc-venta-extra { display: flex; gap: .5rem; align-items: center; padding: 0 .8rem .6rem; flex-wrap: wrap; }
.vc-venta-cobrar { display: flex; align-items: center; gap: .4rem; padding: .55rem .8rem; border-top: 1px dashed var(--pr-line-strong); font-size: .8rem; color: var(--pr-muted); }
.vc-venta-cobrar button { border: 1px solid var(--pr-line-strong); background: #fff; border-radius: 9px; padding: .25rem .6rem; font-weight: 650; font-size: .78rem; color: var(--pr-accent-press); }
.vc-venta-cobrar button:hover:not(:disabled) { background: var(--pr-accent-soft); border-color: var(--pr-accent); }

.vi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 1.25rem; align-items: start; }
.vi-card { background: var(--pr-surface); border: 1px solid var(--pr-line); border-radius: 22px; padding: 1.5rem; box-shadow: 0 1px 2px rgba(28, 35, 51, .04), 0 16px 40px rgba(28, 35, 51, .06); display: flex; flex-direction: column; gap: .35rem; }
.vi-card-head { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: .8rem; }
.vi-card-head > div { flex: 1; }
.vi-card-head h2 { margin: 0; font-size: 1.1rem; font-weight: 700; letter-spacing: -.02em; }
.vi-card-head p { margin: .2rem 0 0; font-size: .86rem; color: var(--pr-muted); }
.vi-logo { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; color: #fff; flex-shrink: 0; font-size: 1rem; }
.vi-logo-mp { background: #009EE3; }
.vi-logo-sii { background: linear-gradient(135deg, var(--pr-accent), var(--pr-accent-press)); font-size: 1.3rem; }
.vi-label { margin-top: .7rem; font-size: .8rem; font-weight: 700; color: var(--pr-ink-2); }
.vi-input { height: 46px; border-radius: 12px; border: 1px solid var(--pr-line-strong); background: var(--pr-surface-2); box-shadow: none; }
.vi-input:focus { background: #fff; border-color: var(--pr-accent); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.vi-hint { margin: .15rem 0 0; font-size: .78rem; color: var(--pr-muted); }
.vi-row { display: flex; gap: .5rem; }
.vi-row .vi-input { flex: 1; min-width: 0; }
.vi-seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--pr-surface-3); border-radius: 13px; padding: 4px; gap: 4px; }
.vi-seg button { border: 0; background: transparent; height: 40px; border-radius: 10px; font-weight: 650; color: var(--pr-ink-2); }
.vi-seg button.is-on { background: #fff; color: var(--pr-accent-press); box-shadow: 0 2px 8px rgba(28, 35, 51, .12); }
.vi-lista { display: flex; flex-direction: column; gap: .4rem; margin-top: .5rem; }
.vi-term { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; border-radius: 12px; border: 1px solid var(--pr-line); background: var(--pr-surface-2); text-align: left; font-weight: 650; }
.vi-term:hover { border-color: var(--pr-accent); background: var(--pr-accent-soft); }
.vi-term span { flex: 1; word-break: break-all; font-size: .84rem; }
.vi-term em { font-style: normal; font-size: .72rem; color: var(--pr-muted); }
.vi-acciones { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-top: 1.1rem; flex-wrap: wrap; }
.vi-msg { margin-top: .7rem; padding: .65rem .85rem; border-radius: 12px; font-size: .86rem; font-weight: 600; }
.vi-msg[hidden] { display: none; }
.vi-msg.is-ok { background: #ECFDF3; color: #067647; border: 1px solid #ABEFC6; }
.vi-msg.is-error { background: var(--pr-coral-soft); color: var(--pr-coral-ink); border: 1px solid var(--pr-coral-line); }
.vi-aviso { margin: .6rem 0 0; }
.vi-switch { display: flex; align-items: center; gap: .75rem; cursor: pointer; font-weight: 650; margin: .3rem 0 0; }
.vi-switch input { position: absolute; opacity: 0; }
.vi-switch-pista { width: 48px; height: 28px; border-radius: 999px; background: var(--pr-line-strong); position: relative; flex-shrink: 0; transition: background .2s ease; }
.vi-switch-pista::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .2s ease; }
.vi-switch input:checked + .vi-switch-pista { background: var(--pr-accent); }
.vi-switch input:checked + .vi-switch-pista::after { transform: translateX(20px); }
.vi-switch input:focus-visible + .vi-switch-pista { box-shadow: 0 0 0 4px rgba(37, 99, 235, .2); }

/* Botón de imprimir la boleta del cliente */
.vc-doc-acciones { align-items: center; flex-wrap: wrap; }
.vc-auto { display: inline-flex; align-items: center; gap: .45rem; margin-right: auto; font-size: .8rem; font-weight: 650; color: var(--pr-ink-2); cursor: pointer; user-select: none; }
.vc-auto input { width: 16px; height: 16px; accent-color: var(--pr-accent); }
.vc-imprimir-boleta { display: inline-flex; align-items: center; gap: .55rem; height: 48px; padding: 0 1.4rem; border: 0; border-radius: 14px; font-weight: 750; font-size: 1rem; color: #fff; background: linear-gradient(180deg, #3B7BFF, var(--pr-accent)); box-shadow: 0 10px 24px rgba(37, 99, 235, .32); transition: transform .12s ease, box-shadow .12s ease; }
.vc-imprimir-boleta:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(37, 99, 235, .4); color: #fff; }
.vc-imprimir-boleta:disabled { opacity: .45; box-shadow: none; }
.vc-imprimir-boleta kbd { margin-left: .2rem; padding: 1px 7px; border-radius: 6px; font: 700 .72rem inherit; background: rgba(255, 255, 255, .22); color: #fff; border: 0; }
@media (max-width: 860px) {
    .vc-ok-doble { grid-template-columns: 1fr; overflow-y: auto; }
    .vc-ok-der { min-height: 420px; border-left: 0; border-top: 1px solid var(--pr-line); }
}
