:root {
    --rr-bg: #121214;
    --rr-panel: #1f1f22;
    --rr-teal: #00b4b4;
    --rr-orange: #ff8c00;
    --rr-magenta: #d81b60;
    --rr-navy: #1a1a1b;
    --rr-cream: #f3efe6;
    --rr-gold: #d4a017;
}

html, body {
    background: var(--rr-bg);
    color: var(--rr-cream);
    font-family: "Segoe UI", sans-serif;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }

.rr-brand {
    color: var(--rr-orange);
    letter-spacing: 0.06em;
    font-weight: 700;
}

.rr-sidebar {
    background: var(--rr-navy);
    min-height: 100vh;
    padding: 1rem 0.75rem 1.2rem;
    width: 240px;
    border-right: 1px solid #2c2c30;
    overflow-y: auto;
    flex-shrink: 0;
}

.rr-logo {
    display: block;
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin: 0 auto 0.8rem;
    border-radius: 50%;
    background: #0e0e10;
}

.rr-sidebar a {
    color: var(--rr-cream);
    display: block;
    padding: 0.55rem 0.85rem;
    border-radius: 10px;
    text-decoration: none;
    margin-bottom: 0.15rem;
    font-weight: 600;
}

.rr-sidebar a.active, .rr-sidebar a:hover {
    background: var(--rr-teal);
    color: #041616;
}

.rr-nav-group {
    margin-top: 0.85rem;
    padding-top: 0.55rem;
    border-top: 1px solid #2c2c30;
}

.rr-nav-label {
    margin: 0 0 0.35rem;
    padding: 0 0.85rem;
    color: var(--rr-teal);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rr-nav-salir {
    margin-top: 1.2rem;
    padding: 0 0.8rem;
}

.rr-shell {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.rr-shell-body {
    display: flex;
    flex: 1;
    min-width: 0;
    min-height: 0;
    align-items: stretch;
}

.rr-topbar { display: none; }

.rr-nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 50;
    margin: 0;
    border: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

.rr-page {
    padding: 1.25rem;
    min-width: 0;
    flex: 1;
}

.page-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem 0.8rem;
    margin-bottom: 0.45rem;
}

.page-toolbar h1 { margin: 0; flex: 1 1 12rem; }
.page-toolbar .chips { margin: 0; }

.rr-kpi {
    background: var(--rr-panel);
    border: 1px solid #333338;
    border-radius: 12px;
    padding: 1rem 1.2rem;
}

.rr-kpi h3 { color: var(--rr-teal); margin: 0; font-size: 1.6rem; }
.rr-kpi span { color: #c9c4b8; font-size: 0.85rem; }

.leyenda { display: flex; gap: 1rem; flex-wrap: wrap; margin: 0.6rem 0 1rem; }
.leyenda span { display: flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot-libre { background: var(--rr-teal); }
.dot-ocupada { background: var(--rr-orange); }
.dot-cobrar { background: var(--rr-magenta); }
.dot-cuenta { background: var(--rr-gold); }

.zona-titulo {
    margin: 1.2rem 0 0.6rem;
    color: var(--rr-teal);
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mesa-card {
    background: var(--rr-panel);
    border-radius: 16px;
    padding: 1.1rem;
    cursor: pointer;
    border: 3px solid #333;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.mesa-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.35); }
.mesa-card strong { font-size: 1.25rem; }
.mesa-libre { border-color: var(--rr-teal); }
.mesa-ocupada { border-color: var(--rr-orange); }
.mesa-cobrar { border-color: var(--rr-magenta); }
.mesa-pide-cuenta { box-shadow: 0 0 0 3px var(--rr-gold); }
.badge-pide-cuenta { background: #3d3008; color: var(--rr-gold); }

.badge-estado {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-libre { background: #0a3d3d; color: #7ef0f0; }
.badge-ocupada { background: #4a2d00; color: #ffc46b; }
.badge-cobrar { background: #4a1028; color: #ff8ab3; }

.prod-card {
    background: var(--rr-panel);
    border-radius: 10px;
    padding: 0.9rem;
    cursor: pointer;
    border: 1px solid #333338;
}

.prod-card:hover { border-color: var(--rr-orange); }

.login-wrap {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(1rem + env(safe-area-inset-top)) 1rem calc(1rem + env(safe-area-inset-bottom));
    background: radial-gradient(circle at top, #3a2210, #0e0e10 55%);
}

.login-box {
    background: #1a1a1d;
    padding: 1.6rem 1.8rem 2rem;
    border-radius: 20px;
    width: 380px;
    border: 1px solid #333;
    text-align: center;
}

.login-box .login-logo {
    width: 180px;
    height: 180px;
    object-fit: contain;
    border-radius: 50%;
    margin-bottom: 0.6rem;
}

.login-box input {
    width: 100%;
    margin: 0.4rem 0 0.9rem;
    padding: 0.7rem;
    border-radius: 8px;
    border: 1px solid #444;
    background: #121214;
    color: #f3efe6;
    text-align: left;
}

.login-box label { display: block; text-align: left; }

.btn-gold {
    background: var(--rr-orange);
    color: #1a1a1b;
    border: none;
    border-radius: 8px;
    padding: 0.65rem 1rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-wine {
    background: var(--rr-magenta);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.55rem 1rem;
    cursor: pointer;
}

button:disabled,
.btn-wine:disabled,
.btn-gold:disabled,
.btn-teal:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-teal {
    background: var(--rr-teal);
    color: #041616;
    border: none;
    border-radius: 8px;
    padding: 0.65rem 1rem;
    font-weight: 700;
    cursor: pointer;
}

.ticket-card {
    background: var(--rr-panel);
    border-left: 6px solid var(--rr-orange);
    border-radius: 12px;
    padding: 1rem 1.1rem;
}

.grid-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.grid-mesas { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.9rem; }
.grid-prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.7rem; }
.grid-tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.9rem; }
.row-flex { display: flex; gap: 1rem; flex-wrap: wrap; }
.grow { flex: 1; min-width: min(280px, 100%); }
.muted { color: #c9c4b8; }
.alert-stock { color: #ffb4b4; }
.acciones { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.7rem; }

.floor-app {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--rr-bg);
}

.floor-top {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: calc(0.55rem + env(safe-area-inset-top)) 0.9rem 0.55rem;
    background: var(--rr-navy);
    border-bottom: 1px solid #2c2c30;
}

.floor-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: contain;
    background: #0e0e10;
}

.floor-title { font-weight: 800; color: var(--rr-orange); line-height: 1.1; }
.floor-sub { font-size: 0.75rem; color: #c9c4b8; }

.floor-body {
    flex: 1;
    padding: 0.85rem 0.85rem 5.8rem;
}

.floor-tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    background: #141416;
    border-top: 1px solid #2c2c30;
    padding-bottom: env(safe-area-inset-bottom);
}

.floor-tab, .floor-tabs a, .floor-tab-exit {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    color: #c9c4b8;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 700;
    background: none;
    border: none;
    cursor: pointer;
}

.floor-tabs a.active {
    color: var(--rr-teal);
    background: #0e2a2a;
}

.floor-tab-ico { font-size: 1.15rem; line-height: 1; }
.floor-tab-form { flex: 1; display: flex; margin: 0; }
.floor-tab-exit { width: 100%; color: #ff8ab3; }

.seg {
    display: flex;
    flex-wrap: wrap;
    background: #18181b;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 0.8rem;
    gap: 4px;
}

.seg button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #c9c4b8;
    font-weight: 700;
    cursor: pointer;
}

.seg button.on { background: var(--rr-teal); color: #041616; }

.rr-fiscal-seg button {
    flex: 1 1 110px;
    font-size: 0.88rem;
    padding: 0 0.5rem;
}

.chips {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.4rem;
}

.chip {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid #3a3a40;
    background: #1f1f22;
    color: var(--rr-cream);
    font-weight: 700;
    cursor: pointer;
}

.chip.on { background: var(--rr-orange); color: #1a1a1b; border-color: var(--rr-orange); }

.item-line {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem 0.6rem;
    background: var(--rr-panel);
    border: 1px solid #333338;
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
    margin-bottom: 0.45rem;
}

.item-line.item-pendiente { border-color: #4a4a50; }
.dif-ok { color: #7ef0f0; }
.dif-falta { color: #ff6b8a; }
.dif-sobra { color: #f0c14b; }
.item-line.item-inactiva { opacity: 0.55; }
.item-line.sel { border-color: var(--rr-orange); }
.item-line strong { display: block; }
.item-line-main { flex: 1 1 140px; }
.item-line-precio { text-align: right; }
.item-line-acciones {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
}
.btn-qty {
    min-width: 42px;
    min-height: 42px;
    border: 1px solid #555;
    border-radius: 8px;
    background: #1c1c20;
    color: #f3efe6;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
}
.item-qty {
    min-width: 1.6rem;
    text-align: center;
    font-weight: 700;
}
.btn-quitar {
    margin-left: auto;
    min-height: 42px;
    padding: 0.4rem 0.85rem;
}

.btn-block {
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
}

.rr-page input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.rr-page select,
.rr-page textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0.25rem 0 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #444;
    background: #121214;
    color: var(--rr-cream);
    font-size: 1rem;
}

.rr-page label {
    display: block;
    margin-top: 0.45rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: #e8e2d6;
}

.rr-card {
    background: var(--rr-panel);
    border: 1px solid #333338;
    border-radius: 14px;
    padding: 1rem 1.05rem 1.15rem;
    margin-bottom: 1rem;
}

.rr-card h3 {
    margin: 0 0 0.35rem;
    color: var(--rr-teal);
    font-size: 1.05rem;
}

.rr-card > .muted { margin-top: 0; }

.rr-card input[type=file] {
    width: 100%;
    margin-top: 0.4rem;
    padding: 0.45rem 0;
    color: var(--rr-cream);
}

.rr-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.45rem 0;
    font-weight: 600;
}

.rr-check input {
    width: auto !important;
    margin: 0 !important;
    display: inline-block;
}

.flags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.9rem;
    margin-top: 0.4rem;
}

.flags .rr-check {
    margin: 0;
    font-size: 0.82rem;
    color: #c9c4b8;
}

.rr-ok { color: #7ef0f0; }
.item-line.stock-bajo { border-color: var(--rr-magenta); }
.e-grid .e-row.stock-bajo .e-rowcell {
    background: #3a1520 !important;
}
.e-grid .e-row.fila-activa .e-rowcell {
    background: #0e2a2a !important;
}
.e-grid .e-row.item-inactiva .e-rowcell {
    opacity: 0.55;
}

.rr-grid-form {
    display: grid;
    gap: 0.15rem;
    padding: 0.2rem 0.15rem 0.4rem;
}
.rr-grid-form label { margin-top: 0.35rem; }

.rr-card .e-input-group,
.rr-card .e-control-wrapper,
.rr-card .e-ddl,
.rr-page .e-input-group,
.rr-page .e-control-wrapper {
    width: 100%;
    margin: 0.25rem 0 0.65rem;
}

.rr-page .e-grid {
    margin: 0.6rem 0 1rem;
    border-radius: 12px;
    overflow: hidden;
}

.sticky-actions {
    position: sticky;
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.55rem 0 calc(0.2rem + env(safe-area-inset-bottom));
    background: linear-gradient(transparent, var(--rr-bg) 20%);
}
.floor-body .sticky-actions {
    bottom: 4.6rem;
    padding-bottom: 0.2rem;
}
.sticky-actions .full { grid-column: 1 / -1; }

.venta-line {
    background: var(--rr-panel);
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.45rem;
}

.login-box { max-width: calc(100vw - 2rem); box-sizing: border-box; }

@media (max-width: 767px) {
    .grid-mesas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
    .mesa-card { min-height: 132px; padding: 0.8rem; }
    .mesa-card strong { font-size: 1.05rem; }
    .grid-prods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-tickets { grid-template-columns: 1fr; }
    .grid-kpis { grid-template-columns: 1fr 1fr; }
    .rr-kpi { padding: 0.8rem 0.85rem; }
    .rr-kpi h3 { font-size: 1.25rem; }
    .login-box { width: 100%; padding: 1.3rem 1.15rem 1.6rem; }
    .login-box .login-logo { width: 120px; height: 120px; }
    h1 { font-size: 1.25rem; }
    .denom-row {
        grid-template-columns: 72px 1fr 72px;
        padding: 0.4rem 0.45rem;
    }
    .denom-sub { font-size: 0.82rem; }
    .hoja-carta-head,
    .hoja-carta-meta,
    .hoja-carta-firmas { grid-template-columns: 1fr; }
    .hoja-carta { padding: 0.9rem; }
    .hoja-carta-num { text-align: left; }
    .rr-fiscal-seg { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .rr-fiscal-seg button { flex: 0 0 auto; min-width: 6.5rem; }
    .row-flex > .e-control-wrapper,
    .row-flex > .e-input-group,
    .row-flex .e-btn {
        width: 100%;
    }
}

@media (min-width: 768px) and (max-width: 1100px) {
    .grid-mesas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-prods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-tickets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
    .rr-topbar {
        display: flex;
        flex: 0 0 auto;
        width: 100%;
        position: sticky;
        top: 0;
        z-index: 40;
        align-items: center;
        gap: 0.65rem;
        min-height: 52px;
        padding: calc(0.45rem + env(safe-area-inset-top)) 0.8rem 0.45rem;
        background: var(--rr-navy);
        border-bottom: 1px solid #2c2c30;
    }

    .rr-menu-btn {
        width: 44px;
        min-height: 44px;
        border: 1px solid #3a3a40;
        border-radius: 10px;
        background: #1f1f22;
        color: var(--rr-cream);
        font-size: 1.35rem;
        line-height: 1;
        cursor: pointer;
    }

    .rr-topbar-logo {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        object-fit: contain;
        background: #0e0e10;
    }

    .rr-topbar-title {
        font-weight: 800;
        color: var(--rr-orange);
        letter-spacing: 0.04em;
    }

    .rr-shell-body {
        display: block;
        width: 100%;
    }

    .rr-nav-backdrop {
        display: none;
    }

    .rr-shell.nav-open .rr-nav-backdrop {
        display: block;
    }

    body:has(.rr-shell.nav-open) {
        overflow: hidden;
    }

    .rr-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 60;
        width: min(300px, 88vw);
        height: 100dvh;
        min-height: 100dvh;
        margin: 0;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        padding-top: calc(0.85rem + env(safe-area-inset-top));
        padding-bottom: calc(1.2rem + env(safe-area-inset-bottom));
        box-shadow: 8px 0 28px rgba(0, 0, 0, 0.35);
    }

    .rr-shell.nav-open .rr-sidebar {
        transform: translateX(0);
    }

    .rr-logo {
        width: 96px;
        height: 96px;
        margin-bottom: 0.6rem;
    }

    .rr-page {
        display: block;
        width: 100%;
        flex: none;
        padding: 0.85rem 0.85rem calc(1rem + env(safe-area-inset-bottom));
    }

    .rr-sidebar a { min-height: 44px; display: flex; align-items: center; }

    .e-dlg-overlay { touch-action: none; }

    .e-dialog {
        left: 0.6rem !important;
        right: 0.6rem !important;
        width: auto !important;
        max-width: none !important;
        max-height: calc(100dvh - 1.5rem) !important;
    }

    .e-dlg-content { overflow: auto; }

    .rr-page .e-grid,
    .rr-page .e-control.e-chart {
        max-width: 100%;
    }

    .rr-page .e-grid .e-gridcontent {
        overflow-x: auto;
    }
}

.ticket-wrap { max-width: 420px; margin: 0 auto; padding: 1rem 0.75rem 2rem; }
.ticket {
    background: #fff;
    color: #111;
    padding: 1rem 1.1rem 1.2rem;
    border-radius: 8px;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 13px;
}
.ticket h1 { margin: 0.2rem 0 0; font-size: 1.15rem; text-align: center; color: #111; }
.ticket-logo { display: block; width: 86px; height: 86px; margin: 0 auto 0.3rem; border-radius: 50%; }
.ticket-sub { text-align: center; margin: 0.1rem 0; color: #333; }
.ticket hr { border: none; border-top: 1px dashed #888; margin: 0.55rem 0; }
.ticket-table { width: 100%; border-collapse: collapse; }
.ticket-table th, .ticket-table td { text-align: left; padding: 0.15rem 0; }
.ticket-table th:last-child, .ticket-table td:last-child { text-align: right; }
.orden-doc .ticket-table th:last-child,
.orden-doc .ticket-table td:last-child { text-align: left; }
.orden-doc .ticket-table th:first-child,
.orden-doc .ticket-table td:first-child { white-space: nowrap; padding-right: 0.6rem; }
.ticket-row { display: flex; justify-content: space-between; margin: 0.15rem 0; }
.ticket-total { font-size: 1.05rem; font-weight: 800; }
.ticket-gracias { text-align: center; font-weight: 700; margin: 0.4rem 0 0.1rem; }
.ticket-actions { display: grid; gap: 0.5rem; margin-top: 0.9rem; }

.contador-moneda { margin-bottom: 1rem; }
.denom-row {
    display: grid;
    grid-template-columns: 88px 1fr 90px;
    align-items: center;
    gap: 0.45rem;
    background: var(--rr-panel);
    border: 1px solid #333338;
    border-radius: 12px;
    padding: 0.45rem 0.6rem;
    margin-bottom: 0.4rem;
}
.denom-label { font-weight: 700; }
.denom-step { display: flex; align-items: center; gap: 0.35rem; }
.denom-step input {
    width: 64px;
    min-height: 44px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid #444;
    background: #121214;
    color: var(--rr-cream);
    font-size: 1.05rem;
    font-weight: 700;
}
.denom-btn {
    width: 44px;
    min-height: 44px;
    border: none;
    border-radius: 10px;
    background: var(--rr-teal);
    color: #041616;
    font-size: 1.3rem;
    font-weight: 800;
    cursor: pointer;
}
.denom-sub { text-align: right; color: #c9c4b8; font-weight: 600; }
.denom-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0e2a2a;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-top: 0.5rem;
}
.denom-total strong { color: var(--rr-teal); font-size: 1.25rem; }

.alarma-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5000;
    padding: 0.9rem 1rem;
    text-align: center;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.alarma-banner-pedido { background: var(--rr-orange); color: #111; }
.alarma-banner-listo { background: var(--rr-teal); color: #111; }
.alarma-banner-cliente { background: var(--rr-gold); color: #111; }
.alarma-banner-cuenta { background: #7ef0f0; color: #111; }

.qr-host { min-height: 180px; padding: 0.4rem 0 0.8rem; }
.qr-host svg { background: #fff; }

.mesa-cliente {
    max-width: 520px;
    margin: 0 auto;
    padding: 0.8rem 0.9rem 7rem;
}
.mesa-cliente .sticky-actions {
    bottom: 0;
    grid-template-columns: 1fr;
    background: var(--rr-bg);
    padding-bottom: 0.9rem;
}

@media print {
    html, body { background: #fff !important; }
    .floor-top, .floor-tabs, .rr-sidebar, .rr-topbar, .rr-nav-backdrop, .no-print, .alarma-banner { display: none !important; }
    .floor-body, .rr-page, .grow { padding: 0 !important; }
    .ticket-wrap { max-width: none; }
    .ticket {
        width: 80mm;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
    }
    @page { size: 80mm auto; margin: 4mm; }
}

.hoja-carta-wrap {
    max-width: 8.5in;
    margin: 0 auto 2rem;
    padding: 0.75rem 0 1.5rem;
}
.hoja-carta {
    background: #fff;
    color: #111;
    padding: 0.6in 0.7in 0.55in;
    border-radius: 4px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    font-family: "Segoe UI", Calibri, Arial, sans-serif;
    font-size: 12px;
    line-height: 1.35;
}
.hoja-carta-head {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 0.85rem;
    align-items: center;
    margin-bottom: 0.85rem;
    border-bottom: 2px solid #111;
    padding-bottom: 0.7rem;
}
.hoja-carta-logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
}
.hoja-carta-head h1 {
    margin: 0;
    font-size: 1.35rem;
    color: #111;
    text-align: left;
}
.hoja-carta-head p { margin: 0.1rem 0 0; color: #333; }
.hoja-carta-num {
    text-align: right;
    min-width: 140px;
}
.hoja-carta-num strong {
    display: block;
    font-size: 1.05rem;
}
.hoja-carta-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 1.2rem;
    margin: 0.75rem 0 0.9rem;
}
.hoja-carta-meta p { margin: 0; }
.hoja-carta-tabla {
    width: 100%;
    border-collapse: collapse;
    margin: 0.4rem 0 0.7rem;
}
.hoja-carta-tabla th,
.hoja-carta-tabla td {
    border: 1px solid #222;
    padding: 0.38rem 0.4rem;
    text-align: left;
    vertical-align: middle;
}
.hoja-carta-tabla th {
    background: #f0f0f0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.hoja-carta-tabla .col-n { width: 6%; text-align: center; }
.hoja-carta-tabla .col-cant { width: 12%; text-align: right; }
.hoja-carta-tabla .col-ud { width: 10%; }
.hoja-carta-tabla .col-pu,
.hoja-carta-tabla .col-tot { width: 16%; }
.hoja-carta-blank {
    min-height: 1.35rem;
}
.hoja-carta-tabla tfoot td {
    font-weight: 700;
    background: #f7f7f7;
}
.hoja-carta-nota {
    margin: 0.4rem 0 0.9rem;
    min-height: 2.2rem;
    border: 1px solid #222;
    padding: 0.35rem 0.45rem;
}
.hoja-carta-firmas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.4rem;
}
.hoja-carta-firma {
    text-align: center;
    padding-top: 2.1rem;
    border-top: 1px solid #111;
    font-size: 11px;
}
.hoja-carta-ayuda {
    margin-top: 0.85rem;
    color: #555;
    font-size: 11px;
}
.ficha-costo-pagina + .ficha-costo-pagina { margin-top: 1.6rem; }

@media print {
    .hoja-carta-wrap { max-width: none; margin: 0; padding: 0; }
    .hoja-carta {
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        width: auto;
    }
    .ficha-costo-pagina { break-after: page; page-break-after: always; }
    .ficha-costo-pagina:last-child { break-after: auto; page-break-after: auto; }
}

.carta {
    min-height: 100dvh;
    max-width: 720px;
    margin: 0 auto;
    padding: 1rem 1rem 2.2rem;
    background: radial-gradient(circle at top, #3a2210, #0e0e10 50%);
}
.carta-hero { text-align: center; padding: 0.6rem 0 1rem; }
.carta-hero img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: contain;
    background: #0e0e10;
}
.carta-hero h1 { margin: 0.4rem 0 0.15rem; color: var(--rr-orange); font-size: 1.7rem; }
.carta-hero p { margin: 0.1rem 0; letter-spacing: 0.12em; }
.carta-slogan { color: var(--rr-teal) !important; letter-spacing: 0.04em !important; font-weight: 600; }
.carta-chips {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.2rem 0 0.8rem;
    position: sticky;
    top: 0;
    background: linear-gradient(#1a140e, #1a140e 80%, transparent);
    z-index: 5;
}
.carta-sec h2 {
    color: var(--rr-teal);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.95rem;
    margin: 1.1rem 0 0.55rem;
    border-bottom: 1px solid #3a3a40;
    padding-bottom: 0.3rem;
}
.carta-item {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.75rem 0.15rem;
    border-bottom: 1px dashed #333338;
}
.carta-item p { margin: 0.2rem 0 0; color: #c9c4b8; font-size: 0.88rem; }
.carta-precio { text-align: right; white-space: nowrap; }
.carta-precio span { display: block; color: var(--rr-orange); font-weight: 800; }
.carta-precio small { color: #c9c4b8; }
.carta-item.agotado { opacity: 0.5; }
.carta-off {
    display: inline-block;
    margin-top: 0.25rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #ff8ab3;
}
.carta-foot { text-align: center; margin-top: 1.8rem; color: #c9c4b8; font-size: 0.82rem; }
.carta-foot a { color: var(--rr-teal); }

@media (pointer: coarse) {
    button, .mesa-card, .prod-card, .chip, .btn-gold, .btn-teal, .btn-wine, .rr-sidebar a {
        min-height: 44px;
        touch-action: manipulation;
    }
    .prod-card { padding: 1rem 0.8rem; }
    .ticket-card .btn-teal { width: 100%; min-height: 52px; font-size: 1.05rem; }
    .rr-page input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    .rr-page select,
    .rr-page textarea,
    .login-box input {
        font-size: 16px;
    }
}
