﻿/* ITSS — FacturaSer · America/Santo_Domingo (UTC-4) */
@import url("fs-theme.css");

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background: #e8edf3;
    color: #1a2332;
}
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #081624;
    padding: 24px 16px;
}
.login-shell {
    width: min(960px, 100%);
    display: grid;
    grid-template-columns: 1.12fr 0.88fr;
    background: #0f2a43;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.login-aside {
    position: relative;
    background: linear-gradient(165deg, #0a1f33 0%, #0f2a43 42%, #123552 100%);
    color: #d5e2ee;
    padding: 48px 28px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 460px;
    overflow: hidden;
}
.login-aside::before {
    content: "";
    position: absolute;
    top: 8%;
    left: -15%;
    width: 90%;
    height: 55%;
    background: radial-gradient(ellipse at 30% 40%, rgba(6, 182, 212, 0.22), transparent 68%);
    pointer-events: none;
}
.login-aside::after {
    content: "";
    position: absolute;
    bottom: -20%;
    right: -25%;
    width: 70%;
    height: 50%;
    background: radial-gradient(circle, rgba(31, 164, 99, 0.12), transparent 70%);
    pointer-events: none;
}
.login-aside-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    width: 100%;
}
.login-brand-stage {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}
.login-brand-stage::after {
    content: none;
}
.login-aside .login-brand-img {
    margin: 0;
    position: relative;
    z-index: 1;
    line-height: 0;
}
.login-aside .login-brand-img img {
    width: 100%;
    height: auto;
    max-width: 100%;
    aspect-ratio: 644 / 240;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    object-position: center;
    image-rendering: auto;
    filter: none;
}
.login-season {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #fde68a;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.login-season svg {
    width: 16px;
    height: 16px;
    fill: #fbbf24;
    flex: 0 0 auto;
}
.login-lights {
    position: absolute;
    top: 14px;
    left: 22px;
    right: 22px;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}
.login-lights::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(253, 230, 138, 0.45);
}
.login-lights span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #fde68a;
    box-shadow: 0 0 10px #fbbf24;
    animation: login-twinkle 1.8s ease-in-out infinite;
}
.login-lights span:nth-child(3n) {
    background: #f87171;
    box-shadow: 0 0 10px #ef4444;
}
.login-lights span:nth-child(3n + 1) {
    background: #4ade80;
    box-shadow: 0 0 10px #22c55e;
}
.login-lights span:nth-child(2n) { animation-delay: .4s; }
.login-lights span:nth-child(3n) { animation-delay: .8s; }
.login-snow {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.login-snow span {
    position: absolute;
    top: -16px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    animation: login-fall 10s linear infinite;
}
.login-snow span:nth-child(1) { left: 8%; animation-duration: 11s; }
.login-snow span:nth-child(2) { left: 18%; animation-duration: 8s; animation-delay: 1.2s; }
.login-snow span:nth-child(3) { left: 30%; animation-duration: 13s; animation-delay: .4s; }
.login-snow span:nth-child(4) { left: 42%; animation-duration: 9s; animation-delay: 2s; }
.login-snow span:nth-child(5) { left: 54%; animation-duration: 12s; animation-delay: .8s; }
.login-snow span:nth-child(6) { left: 66%; animation-duration: 8.5s; animation-delay: 1.6s; }
.login-snow span:nth-child(7) { left: 74%; animation-duration: 14s; }
.login-snow span:nth-child(8) { left: 84%; animation-duration: 10s; animation-delay: 2.4s; }
.login-snow span:nth-child(9) { left: 92%; animation-duration: 9.5s; animation-delay: .6s; }
.login-snow span:nth-child(10) { left: 48%; animation-duration: 15s; animation-delay: 3s; width: 3px; height: 3px; }
@keyframes login-twinkle {
    0%, 100% { opacity: .45; transform: scale(.85); }
    50% { opacity: 1; transform: scale(1); }
}
@keyframes login-fall {
    0% { transform: translateY(0); opacity: 0; }
    12% { opacity: .9; }
    100% { transform: translateY(520px); opacity: .15; }
}
@media (prefers-reduced-motion: reduce) {
    .login-snow { display: none; }
    .login-lights span { animation: none; }
}
.login-aside .brand { color: #fff; font-size: 36px; }
.login-card button[type="submit"] {
    background: linear-gradient(180deg, #22c55e 0%, #1fa463 100%);
    box-shadow: 0 4px 14px rgba(31, 164, 99, 0.35);
}
.login-aside p { margin: 10px 0 0; font-size: 16px; line-height: 1.45; }
.login-aside .login-brand-img { margin: 0; }
.login-aside .login-season {
    margin: 2px 0 0;
    font-size: 13px;
    line-height: 1;
}
.login-card {
    width: auto;
    max-width: none;
    background: linear-gradient(180deg, #0c2438 0%, #0f2a43 55%, #10283d 100%);
    color: #d5e2ee;
    border-radius: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    padding: 36px 32px 28px;
}
.brand { font-size: 28px; font-weight: 800; margin: 0; color: #0f2a43; }
.brand .ser { color: #1fa463; }
.login-back {
    margin: 0 0 12px;
    font-size: 14px;
    text-align: center;
    width: 100%;
}
.login-back a { color: #7dd3fc; text-decoration: none; font-weight: 600; }
.login-back a:hover { color: #e0f2fe; text-decoration: underline; }
.login-social {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.login-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #f8fafc;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.28);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.login-social a:hover {
    background: rgba(6, 182, 212, 0.35);
    border-color: #06b6d4;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.35);
    transform: translateY(-2px);
    color: #fff;
}
.tag { margin: 4px 0 18px; color: #6b7a8a; font-size: 13px; }
.tag--center { text-align: center; }
.login-card .tag { color: #9fb4c8; }
.login-pago-hint {
    margin: 0 0 10px;
    padding: 10px 12px;
    text-align: center;
    font-size: 14px;
    line-height: 1.45;
    color: #d5e2ee;
    background: rgba(31, 164, 99, 0.12);
    border: 1px solid rgba(31, 164, 99, 0.4);
    border-radius: 10px;
}
.login-card label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #9fb4c8;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 10px 0 4px;
}
.login-card input {
    width: 100%;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    padding: 0 12px;
    font-size: 16px;
    background: rgba(8, 22, 36, 0.55);
    color: #f8fafc;
}
.login-card input::placeholder { color: #7d93a8; }
.login-card input:focus {
    outline: none;
    border-color: #06b6d4;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.25);
}
.login-card input:disabled {
    opacity: 1;
    color: #d5e2ee;
    background: rgba(8, 22, 36, 0.35);
}
.login-card input:-webkit-autofill {
    -webkit-text-fill-color: #f8fafc;
    caret-color: #f8fafc;
    box-shadow: 0 0 0 1000px #0c2438 inset;
}
.login-recordar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    font-size: 14px;
    font-weight: 500;
    color: #d5e2ee;
    text-transform: none;
    cursor: pointer;
}
.login-recordar input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #1fa463;
}
.login-recordar-ayuda {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: #8aa0b5;
}
.login-card button[type="submit"], .panel {
    margin-top: 18px;
}
.login-card button[type="submit"] {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 10px;
    background: #1fa463;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
}
.alert {
    background: #fdecea;
    color: #8a1f11;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
}
.login-card .alert {
    background: rgba(248, 113, 113, 0.14);
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.45);
}
.top {
    height: auto;
    min-height: 84px;
    background: #fff;
    color: #1d2733;
    display: flex;
    align-items: center;
    padding: 14px 22px;
    gap: 24px;
    flex-wrap: nowrap;
    border-bottom: 1px solid #e4ebf2;
}
.top .brand {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    margin: 0 20px 0 0;
    line-height: 0;
}
.top .brand img {
    height: 56px;
    width: auto;
    display: block;
    object-fit: contain;
    object-position: left center;
}
.top-info {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    min-width: 0;
    flex: 0 1 auto;
}
.top-info .who { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.top-info .who strong { font-size: 13px; color: #0f2a43; }
.top-info .who span { font-size: 12px; color: #6b7a8a; font-weight: 500; }
.top-info form { margin: 0; }
.linkish {
    background: #f3f6fa;
    border: 1px solid #d5dee8;
    color: #0f2a43;
    border-radius: 10px;
    min-height: 36px;
    padding: 0 14px;
    cursor: pointer;
    font-weight: 700;
}
.panel { max-width: 720px; margin: 32px auto; background: #fff; border-radius: 12px; padding: 24px; }
.panel h1 { margin: 0 0 8px; }
.muted { color: #6b7a8a; }
.ok { background: #e8f6ee; color: #146c43; border-radius: 8px; padding: 10px 12px; }
.app-body { min-height: 100vh; display: flex; flex-direction: column; }
.app-main { display: flex; flex: 1; min-height: 0; }
.side {
    width: 236px;
    background: #0f2a43;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 18px 12px 20px;
    gap: 2px;
    flex-shrink: 0;
    overflow-y: auto;
}
.side-brand {
    margin: 0;
    color: #f4f7fb;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.3;
    letter-spacing: 0;
    padding: 2px 10px 16px;
    max-width: 100%;
    white-space: normal;
}
.side-sec {
    margin: 16px 12px 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #8aa4bb;
}
.side a, .side span.off {
    width: auto;
    min-height: 40px;
    border-radius: 10px;
    color: #d5e2ee;
    font-size: 14px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    text-decoration: none;
    text-align: left;
    padding: 0 10px;
    flex-shrink: 0;
}
.side a i { width: 1.25em; text-align: center; font-size: 14px; color: #7dcea0; }
.side a.on, .side a.on:hover { background: rgba(31, 164, 99, .16); color: #fff; box-shadow: inset 3px 0 0 #1fa463; }
.side a.on i { color: #7fe3ae; }
.side a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side .off { opacity: .45; cursor: default; }
.page { flex: 1; padding: 28px 32px 40px; overflow: auto; position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; }
.page > .note, .page > .ok, .page > .alert, .page > .search-bar, .page > .cmdbar, .page > h1 { margin: 0; }
.page > .note { max-width: 68ch; }
.page h1 { margin: 0; font-size: 26px; letter-spacing: -.03em; }
.hello { display: flex; align-items: center; justify-content: flex-start; gap: 20px; margin: 0; flex-wrap: wrap; }
.hello p { margin: 4px 0 0; color: #6b7a8a; font-size: 15px; }
.hello .btn-primary { flex-shrink: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; align-items: stretch; }
.stat { background: #fff; border: 1px solid #e3ebf3; border-radius: 14px; padding: 14px 16px; box-shadow: 0 1px 2px rgba(15, 42, 67, .04); min-height: 96px; display: flex; flex-direction: column; justify-content: center; }
.stat span { display: block; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: #6b7a8a; font-weight: 700; }
.stat b { display: block; margin-top: 6px; font-size: 24px; letter-spacing: -.03em; color: #0f2a43; }
.stat small { display: block; margin-top: 4px; color: #6b7a8a; font-size: 12px; }
.home-groups { display: grid; gap: 14px; margin: 0; }
.home-groups h2 { margin: 0; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: #6b7a8a; }
.home-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.mod {
    display: flex; align-items: center; gap: 12px;
    background: #fff; border: 1px solid #e3ebf3; border-radius: 14px;
    padding: 12px 14px; min-height: 72px; height: 100%; box-sizing: border-box;
    text-decoration: none; color: #1d2733;
    box-shadow: 0 1px 2px rgba(15, 42, 67, .04);
}
.mod:hover { border-color: #b7c6d6; }
.mod i {
    width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
    display: grid; place-items: center; background: #eef3f8; color: #0f2a43; font-size: 16px;
}
.mod strong { display: block; font-size: 15px; }
.mod small { display: block; margin-top: 2px; color: #6b7a8a; font-size: 12px; font-weight: 500; }
.page-home { align-items: stretch; max-width: none; }
.page-home > .hello { justify-content: space-between; width: 100%; }
.page-home > .hello > div:first-child { flex: 1; min-width: 0; }
.page .home-board {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
}
.home-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 22rem);
    gap: 16px;
    align-items: stretch;
}
.home-cols .home-panel:last-child { max-height: 420px; overflow: auto; }
.page .home-board h2 {
    margin: 0 0 12px;
    font-size: 16px;
    letter-spacing: 0;
    text-transform: none;
    color: #0f2a43;
    font-weight: 700;
}
.home-shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.home-panel {
    background: #fff;
    border: 1px solid #e3ebf3;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(15, 42, 67, .04);
    min-width: 0;
}
.home-panel .sub { margin: -6px 0 8px; color: #6b7a8a; font-size: 13px; }
.home-chart-box { width: 100%; margin: 4px 0 0; }
.home-chart { width: 100%; height: auto; display: block; overflow: visible; }
.home-sumas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.home-sumas span { display: block; font-size: 12px; color: #6b7a8a; font-weight: 700; }
.home-sumas b { display: block; margin-top: 4px; font-size: 18px; letter-spacing: -.02em; color: #0f2a43; font-variant-numeric: tabular-nums; }
.home-act { list-style: none; margin: 0; padding: 0; }
.home-act li { border-bottom: 1px solid #eef2f6; }
.home-act li:last-child { border-bottom: 0; }
.home-act a, .home-act .fila {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    padding: 10px 0;
    text-decoration: none;
    color: inherit;
}
.home-act time { grid-column: 1; font-size: 12px; color: #6b7a8a; }
.home-act a > span, .home-act .fila > span { grid-column: 1; min-width: 0; }
.home-act .monto { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 700; font-variant-numeric: tabular-nums; color: #0f2a43; }
.home-act strong { display: block; font-size: 14px; font-weight: 600; }
.home-act small { display: block; margin-top: 2px; color: #6b7a8a; font-size: 12px; }
.home-act .badge { margin-left: 6px; vertical-align: 1px; }
.card-link {
    background: #fff;
    color: #0f2a43;
    text-decoration: none;
    font-weight: 700;
    padding: 16px 22px;
    border-radius: 12px;
    border: 1px solid #e3ebf3;
}
.btn-primary, .btn-ghost, .btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}
.btn-primary { background: #1fa463; color: #fff; }
.btn-ghost { background: #e6ecf2; color: #1d2733; }
.btn-danger { background: #8a1f11; color: #fff; }
.reinicio-pasos { display: flex; flex-direction: column; gap: 12px; }
.reinicio-paso {
    border: 1px solid #e3ebf3;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f8fbf9;
}
.reinicio-paso h2 { margin: 0; display: flex; align-items: center; gap: 8px; text-transform: none; }
.reinicio-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #0f2a43;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex: 0 0 auto;
}
.logo-marco {
    min-height: 140px;
    border: 1px dashed #c5d0dc;
    border-radius: 12px;
    background: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
}
.logo-marco p { margin: 0; max-width: 36ch; color: #6b7a8a; }
.logo-marco img { max-width: 100%; max-height: 160px; object-fit: contain; }
.logo-acciones { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.logo-acciones form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 0; }
.logo-acciones label { flex: 1 1 220px; }
.search-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; background: #fff; border: 1px solid #e3ebf3; border-radius: 14px; padding: 8px; box-shadow: 0 1px 2px rgba(15, 42, 67, .04); }
.search-bar input { flex: 1; min-width: 140px; height: 44px; border: 1px solid #d5dee8; border-radius: 10px; padding: 0 12px; background: #fff; }
.search-bar select { height: 44px; border: 1px solid #d5dee8; border-radius: 10px; padding: 0 10px; background: #fff; }
.search-bar button { height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: #0f2a43; color: #fff; font-weight: 700; cursor: pointer; }
.note { font-size: 13px; color: #6b7a8a; margin: 0 0 14px; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; text-transform: lowercase; }
.badge-emitido { background: #e8f6ee; color: #146c43; }
.badge-anulado { background: #fde8e6; color: #8a1f11; }
.badge-borrador { background: #eef2f6; color: #6b7a8a; }
.doc-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 24px;
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #dde4ec;
    margin-bottom: 18px;
}
.doc-meta span { display: block; font-size: 11px; font-weight: 700; color: #6b7a8a; text-transform: uppercase; margin-bottom: 2px; }
.doc-meta .full { grid-column: 1 / -1; }
.doc-totales {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin: 14px 0 22px;
}
.doc-totales div { background: #fff; border: 1px solid #dde4ec; border-radius: 10px; padding: 10px 12px; }
.doc-totales span { display: block; font-size: 11px; color: #6b7a8a; font-weight: 700; text-transform: uppercase; }
.doc-totales .grand { grid-column: 1 / -1; background: #0f2a43; color: #fff; }
.doc-totales .grand span { color: #9ec3e6; }
.page h2 { font-size: 16px; margin: 18px 0 8px; }
.home-groups h2 { margin: 0; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: #6b7a8a; font-weight: 700; }
.page .actions a, .page .table-wrap a { color: #0f6b3c; font-weight: 600; }
.page a.btn-primary { color: #fff; }
.table-wrap { background: #fff; border-radius: 14px; overflow: auto; border: 1px solid #e3ebf3; box-shadow: 0 1px 2px rgba(15, 42, 67, .04); }
.grid-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.grid-table th { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: #6b7a8a; background: #f7fafc; }
.grid-table th, .grid-table td { padding: 12px 14px; border-bottom: 1px solid #eef2f6; text-align: left; }
.grid-table tbody tr:hover td { background: #f7fbf8; }
.grid-table .n { text-align: right; font-variant-numeric: tabular-nums; }
.actions { display: flex; gap: 10px; align-items: center; }
.actions form { margin: 0; }
.link-danger { background: none; border: 0; color: #8a1f11; cursor: pointer; font-weight: 600; }
.form-card {
    max-width: 560px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid #dde4ec;
}
.form-card label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: #6b7a8a; text-transform: uppercase; }
.form-card label.check { flex-direction: row; align-items: center; text-transform: none; font-size: 14px; color: #243140; gap: 8px; font-weight: 500; }
.form-card label.check input { height: auto; width: auto; }
.form-card input, .form-card select {
    height: 40px;
    border: 1px solid #cfd8e2;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 15px;
    font-weight: 500;
    color: #1d2733;
    text-transform: none;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-card.form-wide { max-width: 960px; }
.caja-panel input, .caja-panel select { height: 48px; }
.form-wide .table-wrap { margin: 0; }
.form-wide .grid-table select,
.form-wide .grid-table input {
    width: 100%;
    height: 38px;
    border: 1px solid #cfd8e2;
    border-radius: 8px;
    padding: 0 8px;
}
.stock-zero { color: #8a1f11; font-weight: 700; }
.chk { flex-direction: row !important; align-items: center; text-transform: none !important; font-size: 14px !important; color: #1d2733 !important; }
.chk input { width: auto; height: auto; }
.inline-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #6b7a8a; }
.perm-grid { display: grid; gap: 8px; margin-bottom: 12px; }
.row-warn td { background: #fff8e6; }
.badge-activa { background: #e8f6ee; color: #146c43; }
.badge-agotada, .badge-vencida { background: #fde8e6; color: #8a1f11; }
.badge-inactiva { background: #eef2f6; color: #6b7a8a; }

.pos-body { height: 100vh; overflow: hidden; display: flex; background: linear-gradient(145deg, #0a1628 0%, #0d0d0d 55%); color: #fff; padding: 8px; }
.pos-app { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pos-shell { border: 2px solid #007bff; border-radius: 4px; background: #1e1e1e; box-shadow: 0 12px 48px rgba(0, 123, 255, 0.12); }
.pos-top { position: relative; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 12px; background: #252526; border-bottom: 1px solid #007bff; }
.pos-brand { font-size: 13px; font-weight: 600; color: #ccc; white-space: nowrap; }
.pos-tools { font-size: 14px; color: #00bcd4; letter-spacing: 0.04em; }
.pos-menu-btn { width: 40px; height: 40px; border: 1px solid #3e3e42; border-radius: 6px; background: #2d2d30; color: #fff; font-size: 18px; cursor: pointer; flex-shrink: 0; }
.pos-search-wrap { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 200px; max-width: 520px; margin: 0 auto; background: #2d2d30; border: 1px solid #3e3e42; border-radius: 4px; padding: 0 12px; }
.pos-search-ico { opacity: 0.5; font-size: 14px; }
.pos-search-wrap input { flex: 1; height: 40px; border: 0; background: transparent; font-size: 14px; color: #fff; outline: none; }
.pos-search-wrap input::placeholder { color: #6c757d; }
.pos-results { position: absolute; z-index: 20; left: 12px; right: 12px; top: 100%; margin-top: 4px; max-height: 320px; overflow: auto; background: #2d2d30; border: 1px solid #007bff; border-radius: 6px; }
.pos-results[hidden], .groups[hidden], .groups-all[hidden] { display: none !important; }
.pos-results .p { width: 100%; margin: 0; font: inherit; text-align: left; cursor: pointer; min-height: 0; background: transparent; border: 0; border-radius: 0; border-bottom: 1px solid #3d4550; padding: 10px 12px; flex-direction: row; justify-content: space-between; align-items: center; color: #e8eaed; }
.pos-results .p .pr { color: #b7ebc9; }
.pos-ncf { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; padding: 6px 12px; background: #20242a; border-bottom: 1px solid #2c3138; }
.pos-ncf .fld { min-width: 120px; }
.pos-ncf .fld.grow { flex: 1 1 200px; }
.pos-ncf #cli-info { flex-basis: 100%; margin: 0; font-size: 12px; }
.pos-body .fld label { color: #9aa3ad; }
.pos-body .fld .v, .pos-body .fld select.v, .pos-body .fld input.v { height: 32px; background: #2a3038; color: #fff; border-color: #3d4550; font-size: 13px; }
.pos-body .fld .v.ncf, .pos-body select.ncf { background: #0f2a43; color: #fff; border: 0; }
.pos-status { display: flex; flex-wrap: wrap; gap: 16px; padding: 6px 16px; font-size: 12px; color: #6c757d; }
.pos-status a { color: #8fd0a8; }
.pos-status .w { color: #ffcf5c; }
.pos-main { flex: 1; display: flex; min-height: 0; }
.pos-stage { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.pos-left { border-right: 1px solid #007bff; }
.pos-cart { flex: 1; position: relative; overflow: auto; }
.pos-cart table { width: 100%; border-collapse: collapse; }
.pos-cart th { text-align: left; font-size: 13px; font-weight: 700; color: #fff; padding: 12px 16px; border-bottom: 2px solid #007bff; }
.pos-cart th:first-child, .pos-cart td:first-child { width: 58%; }
.pos-cart th:nth-child(2), .pos-cart td:nth-child(2) { width: 14%; }
.pos-cart th.n, .pos-cart td.n { text-align: right; font-variant-numeric: tabular-nums; }
.pos-cart td { padding: 8px 14px; border-bottom: 1px solid #2a2f36; font-size: 14px; }
.pos-cart tr.on { background: #24352c; }
.pos-cart .qty { width: 76px; height: 32px; background: #2a3038; color: #fff; border: 1px solid #3d4550; border-radius: 6px; padding: 0 6px; }
.pos-cart .muted { color: #9aa3ad; font-size: 12px; }
.cart-empty { position: absolute; inset: 48px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #6c757d; pointer-events: none; padding: 0 24px; }
.cart-empty strong { color: #adb5bd; font-size: 17px; margin-bottom: 8px; }
.cart-empty[hidden] { display: none; }
.pos-tot { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding: 16px 24px 20px; background: #1e1e1e; border-top: 1px solid #333; }
.pos-tot > div { display: flex; gap: 24px; align-items: baseline; font-size: 14px; color: #6c757d; }
.pos-tot > div span { min-width: 72px; text-align: right; }
.pos-tot b { font-size: 16px; font-weight: 600; color: #fff; min-width: 88px; text-align: right; font-variant-numeric: tabular-nums; }
.pos-tot .grand { margin-top: 8px; gap: 20px; }
.pos-tot .grand span { font-size: 28px; font-weight: 800; color: #fff; letter-spacing: 0.02em; min-width: auto; }
.pos-tot .grand b { font-size: 28px; font-weight: 800; color: #fff; }
.pos-tot .fis { flex-basis: 100%; text-align: right; font-size: 11px; color: #6c757d; }
.pos-keys { width: min(340px, 38vw); background: #252526; padding: 12px; overflow: auto; position: relative; flex-shrink: 0; }
.pos-keys::before { content: "FacturaSer"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 38px; font-weight: 800; color: rgba(255,255,255,0.04); pointer-events: none; }
.pos-keys .key-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; position: relative; z-index: 1; }
.pos-keys .key, .pos-keys .pay, .pos-keys .danger { border: 1px solid #3e3e42; border-radius: 8px; background: #2d2d30; color: #fff; min-height: 64px; font-weight: 600; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; padding: 6px 4px; }
.pos-keys .key .ico { font-size: 16px; line-height: 1; opacity: 0.9; }
.pos-keys .key b { font-size: 11px; line-height: 1.15; text-align: center; font-weight: 700; }
.pos-keys .key:disabled { opacity: .35; cursor: not-allowed; }
.pos-keys .k { font-size: 10px; font-weight: 600; opacity: .65; }
.pos-keys .key-cyan { background: #0d6efd; border-color: #0d6efd; }
.pos-keys .pay { grid-column: span 2; background: #28a745; border-color: #28a745; min-height: 72px; font-size: 15px; }
.pos-keys .danger { background: #dc3545; border-color: #dc3545; }

/* POS estilo terminal oscuro (referencia Aronium + marca FacturaSer) */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.pos-aronium.pos-body { background: #0a0a0a; padding: 0; color: #fff; }
.pos-aronium .pos-app { background: #121212; border: 0; box-shadow: none; border-radius: 0; }
.pos-aronium-bar { background: #0a0a0a !important; border-bottom: 1px solid #2a2a2a !important; padding: 6px 10px !important; flex-wrap: nowrap; }
.pos-aronium .pos-toolbar-icons { display: flex; gap: 10px; align-items: center; color: #5eead4; font-size: 15px; flex-shrink: 0; }
.pos-aronium .pos-search-wide { flex: 1; max-width: none; margin: 0 12px; background: #1a1a1a; border-color: #333; }
.pos-aronium .pos-left { border-right: 1px solid #2a2a2a; }
.pos-aronium .pos-cart th { border-bottom-color: #3a3a3a; color: #e5e5e5; font-weight: 600; }
.pos-aronium .cart-empty { color: #737373; }
.pos-aronium .cart-empty strong { color: #a3a3a3; }
.pos-aronium .pos-tot { background: #121212; border-top: 1px solid #2a2a2a; }

.pos-keys-aronium { width: min(400px, 42vw); background: #141414 !important; padding: 8px !important; }
.pos-keys-aronium::before { display: none; }
.key-grid-aronium {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  align-content: start;
}
.key-grid-aronium .key, .key-grid-aronium .pay, .key-grid-aronium .danger {
  min-height: 54px;
  border-radius: 4px;
  background: #1e1e1e;
  border: 1px solid #333;
  color: #f5f5f5;
  font-size: 10px;
  padding: 4px;
}
.key-grid-aronium .kg-top .ico { font-size: 22px; font-weight: 300; }
.key-grid-aronium .kg-pay { min-height: 48px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.key-grid-aronium .kg-pay-cash { border-bottom: 3px solid #10b981; }
.key-grid-aronium .kg-pay-card { border-bottom: 3px solid #38bdf8; }
.key-grid-aronium .kg-pay-credit { grid-column: 3 / span 2; border-bottom: 3px solid #1d4ed8; font-size: 9px; }
.pos-logo-center {
  grid-column: 1 / -1;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: #121212;
  border: 1px solid #252525;
  border-radius: 4px;
}
.pos-logo-center img { max-width: 100%; max-height: 96px; width: auto; height: auto; object-fit: contain; }
.key-grid-aronium .kg-pay-main {
  grid-column: 3 / span 2;
  background: #16a34a !important;
  border-color: #15803d !important;
  min-height: 64px;
  font-size: 14px;
}
.key-grid-aronium .kg-void {
  grid-column: 1 / span 3;
  background: #dc2626 !important;
  border-color: #b91c1c !important;
  min-height: 58px;
}
.key-grid-aronium .kg-more {
  grid-column: 4;
  background: #262626 !important;
  font-size: 22px;
  letter-spacing: 2px;
  line-height: 1;
}

.pos-drawer-pro {
  width: min(320px, 92vw);
  background: #1a1a1a !important;
  color: #e5e5e5 !important;
  padding: 0 !important;
  border-left: 1px solid #333 !important;
}
.pos-drawer-pro[hidden] { display: none !important; }
.pos-drawer-pro:not([hidden]) { display: flex; flex-direction: column; }
.pro-drawer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  border-bottom: 1px solid #333;
  font-weight: 600;
  font-size: 14px;
}
.pro-back {
  width: 36px; height: 36px; border: 0; border-radius: 6px;
  background: #2a2a2a; color: #fff; cursor: pointer;
}
.pro-drawer-nav { display: flex; flex-direction: column; }
.pro-drawer-nav a, .pro-drawer-nav .pro-disabled {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; font-size: 14px;
  border-bottom: 1px solid #2a2a2a;
  color: #e5e5e5; text-decoration: none;
}
.pro-drawer-nav a:hover { background: #252525; }
.pro-drawer-nav .pro-disabled { opacity: 0.45; cursor: default; }
.pro-drawer-nav i { width: 22px; text-align: center; color: #a3a3a3; }
.pro-drawer-section { padding: 16px 16px 6px; font-size: 13px; color: #737373; margin: 0; }
.pro-drawer-logout { margin-top: auto; border-top: 1px solid #333; }
.pro-drawer-logout button {
  width: 100%; text-align: left; padding: 14px 16px;
  background: transparent; border: 0; color: #e5e5e5; font-size: 14px; cursor: pointer;
  display: flex; align-items: center; gap: 12px;
}
.pro-feedback {
  margin: 8px 16px; width: calc(100% - 32px); padding: 12px;
  background: #252525; border: 0; border-radius: 8px; color: #888; cursor: default;
}
.pro-drawer-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-top: 1px solid #333; font-size: 13px; color: #737373;
}
.pro-foot-icons { display: flex; gap: 14px; color: #a3a3a3; }

.pos-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 30; }
.pos-backdrop[hidden] { display: none; }
.pos-drawer { position: fixed; top: 0; right: 0; width: min(340px, 100%); height: 100vh; background: #1e2228; color: #e8eaed; border-left: 1px solid #333; z-index: 40; display: flex; flex-direction: column; padding: 16px; box-shadow: -12px 0 28px rgba(0,0,0,.35); }
.pos-drawer[hidden] { display: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.drawer-head p { margin: 4px 0 0; }
.drawer-head .key { width: 36px; height: 36px; border: 0; border-radius: 8px; background: #2a3038; color: #fff; font-size: 20px; cursor: pointer; }
.drawer-meta { margin: 14px 0; font-size: 13px; color: #c5ced6; line-height: 1.45; }
.drawer-nav { display: flex; flex-direction: column; }
.drawer-nav a, .drawer-logout button { display: block; width: 100%; text-align: left; background: transparent; color: #e8eaed; border: 0; border-bottom: 1px solid #333; padding: 14px 4px; font-size: 15px; text-decoration: none; cursor: pointer; }
.drawer-logout { margin-top: auto; }
.drawer-logout button { color: #ffb4a8; font-weight: 700; }
.pos-body .dlg { background: #24282e; color: #e8eaed; }
.pos-body .pago-total { color: #fff; }
.pos-body .dlg input, .pos-body .dlg select { background: #2a3038; color: #fff; border-color: #3d4550; }
.pos-body .dlg .cobro-modo { border-color: #3d4550; }
.pos-body .dlg .cobro-modo-opt { border-color: #3d4550; background: #2a3038; color: #fff; }
.pos-body .dlg .cobro-modo-opt input { background: transparent; width: 22px; height: 22px; min-height: 22px; flex: 0 0 22px; padding: 0; }
.pos-body .dlg .cobro-modo-opt:has(input:checked) { border-color: #1fa463; background: #163528; }
.pos-body .pago-cli-list button { background: #2a3038; color: #fff; border-color: #3d4550; }
.pos-body .dlg .note { color: #9aa3ad; }
.pos-body #pago-cancel { background: #3a414b; color: #fff; border: 0; height: 40px; border-radius: 8px; padding: 0 14px; cursor: pointer; }
.pos-body #pago-ok { border: 0; cursor: pointer; }
.cat { flex: 1; display: flex; flex-direction: column; padding: 14px; gap: 12px; min-width: 0; }
.search { display: flex; gap: 10px; }
.search input { flex: 1; height: 46px; border: 1px solid #c9d3de; border-radius: 10px; padding: 0 16px; font-size: 15px; background: #fff; }
.search button { height: 46px; padding: 0 18px; border: 0; border-radius: 10px; background: #0f2a43; color: #fff; font-weight: 600; }
.groups { display: flex; gap: 8px; flex-wrap: wrap; }
.groups span { padding: 8px 16px; border-radius: 20px; background: #fff; border: 1px solid #d3dce6; font-size: 13px; font-weight: 600; cursor: pointer; }
.groups span.on { background: #0f2a43; color: #fff; border-color: #0f2a43; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; align-content: start; overflow: auto; }
.p { background: #fff; border-radius: 12px; padding: 12px; border: 1px solid #dde4ec; min-height: 118px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; }
.p.out { opacity: .55; }
.p.out .stk { color: #8a1f11; font-weight: 700; }
.p h4 { font-size: 13.5px; font-weight: 600; line-height: 1.25; margin: 0 0 8px; }
.p .row { display: flex; justify-content: space-between; align-items: end; gap: 6px; }
.p .pr { font-weight: 700; color: #0f2a43; }
.p .tx { font-size: 10.5px; padding: 2px 6px; border-radius: 6px; background: #fff3d6; color: #8a5a00; font-weight: 700; }
.p .tx.ex { background: #e3ecf7; color: #2c5a8c; }
.p .stk { font-size: 11px; color: #6b7a8a; margin-top: 6px; }
.cart { width: 420px; max-width: 100%; background: #fff; border-left: 1px solid #d6dee7; display: flex; flex-direction: column; }
.fiscal { padding: 14px 16px; border-bottom: 1px solid #e3e9ef; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fld label { display: block; font-size: 11px; color: #6b7a8a; font-weight: 600; margin-bottom: 3px; text-transform: uppercase; letter-spacing: .3px; }
.fld .v, .fld select.v, .fld input.v {
    height: 38px; border: 1px solid #cfd8e2; border-radius: 8px;
    display: flex; align-items: center; padding: 0 10px; font-size: 14px; font-weight: 600; width: 100%;
    box-sizing: border-box;
}
.fld .v.ncf, select.ncf { background: #0f2a43; color: #fff; border: 0; }
.ncf small { margin-left: 8px; color: #7fe3ae; font-size: 11px; }
.fld.full { grid-column: 1 / 3; }
.items { flex: 1; overflow: auto; }
.items table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.items th { text-align: left; font-size: 11px; color: #6b7a8a; padding: 8px 12px; border-bottom: 1px solid #e3e9ef; text-transform: uppercase; }
.items td { padding: 8px 12px; border-bottom: 1px solid #f0f3f6; }
.items td.n { text-align: right; font-variant-numeric: tabular-nums; }
.items .qty { width: 64px; height: 32px; border: 1px solid #cfd8e2; border-radius: 6px; padding: 0 6px; }
.items .x { border: 0; background: transparent; font-size: 18px; cursor: pointer; color: #8a1f11; }
.tot { padding: 12px 16px; border-top: 1px solid #e3e9ef; background: #f7f9fb; font-size: 13.5px; }
.tot .l { display: flex; justify-content: space-between; padding: 2px 0; }
.tot .g { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 2px solid #0f2a43; }
.tot .g b { font-size: 22px; color: #0f2a43; }
.btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 12px 16px; }
.btns button { height: 44px; border: 0; border-radius: 10px; font-weight: 700; font-size: 13px; background: #e6ecf2; color: #1d2733; }
.btns button:disabled { opacity: .45; }
.btns .pay { grid-column: 1 / 4; height: 56px; background: #1fa463; color: #fff; font-size: 18px; cursor: pointer; }
.foot { height: 30px; background: #0f2a43; color: #b8cbe0; font-size: 12px; display: flex; align-items: center; padding: 0 20px; gap: 26px; }
.foot a { color: #7fe3ae; }
.foot .w { color: #ffcf5c; }
.dlg { border: 0; border-radius: 14px; padding: 0; width: min(420px, 92vw); }
.dlg form { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.dlg h2 { margin: 0; }
.pago-total { font-size: 22px; font-weight: 800; color: #0f2a43; }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; }
.dlg input, .dlg select { height: 40px; border: 1px solid #cfd8e2; border-radius: 8px; padding: 0 10px; width: 100%; }
.cobro-modo { border: 1px solid #cfd8e2; border-radius: 12px; margin: 0; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.cobro-modo legend { font-size: 13px; font-weight: 700; padding: 0 4px; }
.cobro-modo-opt { display: flex; align-items: center; gap: 12px; min-height: 48px; margin: 0; padding: 10px 12px; border: 1px solid #cfd8e2; border-radius: 10px; cursor: pointer; font-size: 16px; font-weight: 700; }
.cobro-modo-opt input { width: 22px; height: 22px; min-height: 22px; margin: 0; flex: 0 0 22px; padding: 0; }
.cobro-modo-opt:has(input:checked) { border-color: #1fa463; background: #e8f7ef; }
.pago-cli-list { display: flex; flex-direction: column; gap: 6px; }
.pago-cli-list button { min-height: 48px; width: 100%; text-align: left; border: 1px solid #cfd8e2; border-radius: 10px; background: #fff; padding: 8px 12px; font-size: 16px; font-weight: 700; cursor: pointer; }
.dlg-actions button { min-height: 48px; }

@page papel-58 {
    size: 58mm auto;
    margin: 0;
}
@page papel-80 {
    size: 80mm auto;
    margin: 0;
}
html.papel-58 { page: papel-58; }
html.papel-80 { page: papel-80; }
.ticket-body { background: #d7dbe0; color: #111; font-family: "Segoe UI", Arial, sans-serif; }
.ticket-bar { display: flex; flex-wrap: wrap; gap: 12px; padding: 12px; align-items: center; }
.ticket-bar a, .ticket-bar button, .ticket-bar .is-activo {
    background: #0f2a43; color: #fff; border: 0; border-radius: 8px; padding: 8px 12px;
    text-decoration: none; font-weight: 600; cursor: pointer; min-height: 44px; font-size: 16px;
    display: inline-flex; align-items: center; justify-content: center;
}
.ticket-anchos { display: inline-flex; flex-wrap: nowrap; gap: 8px; align-items: center; }
.ticket-ayuda { flex: 1 0 100%; margin: 0; color: #1d2733; font-size: 14px; line-height: 1.35; font-weight: 600; }
.ticket-bar .is-activo { background: #1fa463; font-weight: 800; cursor: default; }
.ticket-bar .ticket-btn-bluetooth { background: #2563eb; }
.ticket-bar .ticket-btn-bluetooth:hover { background: #1d4ed8; }
.ticket-bar .ticket-btn-bluetooth:disabled { opacity: .55; cursor: not-allowed; }
.ticket-bar .ticket-btn-whatsapp { background: #128c7e; }
.ticket-bar .ticket-btn-whatsapp:hover { background: #075e54; }
.ticket-bar .ticket-btn-whatsapp:disabled { opacity: .55; cursor: wait; }
.ticket-listo {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin: 8px 12px; padding: 10px 12px; background: #163528; color: #e8fff2; border-radius: 12px;
}
.ticket-listo[hidden] { display: none !important; }
.ticket-listo a {
    min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px;
    background: #1fa463; color: #fff; border-radius: 10px; font-weight: 800; text-decoration: none;
}
.ticket {
    background: #fff; margin: 0 auto 24px; padding: 0 0 3.5mm; font-size: 12px; line-height: 1.35;
    overflow: hidden; box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.ticket-80 { width: 80mm; }
.ticket-58 { width: 58mm; font-size: 11px; }
.t-franja { background: #111; padding: 2.2mm 2mm; text-align: center; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.t-franja-blanca { background: #fff; padding: 1.6mm 1.2mm 1.2mm; text-align: center; }
.ticket-58 .t-logo,
.ticket-80 .t-logo {
    display: block; width: 100%; max-width: 100%; height: auto;
    margin-left: auto; margin-right: auto;
    object-fit: contain; object-position: center; background: #fff;
}
.t-brand { font-size: 18px; font-weight: 800; margin: 0 0 1mm; text-align: center; }
.t-brand span { color: #1fa463; }
.t-cabeza { padding: 2mm 3mm 0; text-align: center; }
.t-cabeza p, .t-name { margin: 0; text-align: center; }
.t-cabeza p { font-size: 10px; line-height: 1.3; }
.t-name { font-weight: 700; }
.t-cuerpo { padding: 0 3mm; }
.t-factura { margin: 1.6mm 0 0; font-size: 11px; text-align: center; }
.t-fecha { margin: 0.4mm 0 0; font-size: 10px; text-align: center; color: #333; }
.t-fiscal { margin-top: 2.4mm; border: 1.5px solid #111; padding: 1.8mm 2mm 1.6mm; }
.t-etiq { margin: 0; font-size: 8px; letter-spacing: .08em; text-transform: uppercase; color: #444; }
.t-etiq-sep { margin-top: 1.6mm; }
.t-ncf { margin: 0.2mm 0 0; font-size: 13px; font-weight: 800; letter-spacing: .3px; }
.t-cliente { margin: 0.2mm 0 0; font-size: 13px; font-weight: 800; }
.t-meta { margin: 0.3mm 0 0; font-size: 10px; }
.t-producto { margin: 2.2mm 0 0; display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; }
.t-cant { margin: 0.2mm 0 0; font-size: 10px; color: #333; }
.t-totales { margin-top: 1.6mm; }
.t-row { display: flex; justify-content: space-between; gap: 8px; margin: 0.35mm 0; font-size: 10.5px; }
.t-total-caja {
    margin: 1.8mm 0 0; background: #111; color: #fff; padding: 1.8mm 2mm;
    display: flex; justify-content: space-between; align-items: baseline; font-weight: 800;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.t-total-caja small { font-size: 9px; font-weight: 600; letter-spacing: .06em; }
.t-total-caja strong { font-size: 15px; }
.t-credito { margin: 1.8mm 0 0; font-size: 11px; font-weight: 700; text-align: center; }
.t-vence { margin: 0.3mm 0 0; font-size: 10px; text-align: center; }
.t-thanks { margin: 2.2mm 0 0; font-size: 11px; text-align: center; }
@media print {
    .no-print, .ticket-bar, .top, .side, .tabbar, .mas-sheet, .ticket-listo,
    .pos-top, .pos-keys, .pos-tot, .pos-status { display: none !important; }
    html, body.ticket-body {
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        height: auto !important;
        overflow: visible !important;
        color-scheme: light;
    }
    body.ticket-body * { visibility: hidden !important; }
    body.ticket-body .ticket,
    body.ticket-body .ticket * { visibility: visible !important; }
    body.ticket-body .ticket {
        position: absolute;
        left: 0;
        top: 0;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        box-shadow: none !important;
        background: #fff !important;
    }
    .ticket img { max-width: 100%; height: auto; }
}

.app-body { background: #f3f6fa; color: #1d2733; }
.cmdbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; background: #fff; border: 1px solid #e3ebf3; border-radius: 14px; padding: 8px; box-shadow: 0 1px 2px rgba(15, 42, 67, .04); }
.cmdbar > a, .cmdbar button { background: transparent; color: #0f2a43; border: 0; border-radius: 10px; padding: 8px 12px; font-weight: 700; text-decoration: none; cursor: pointer; font-size: 14px; }
.cmdbar > a:hover, .cmdbar button:hover { background: #f3f6fa; }
.cmdbar > a.cmd-new { background: #1fa463; color: #fff; }
.cmdbar > a.cmd-new:hover { background: #178a52; color: #fff; }
.cmdbar .cmd-search { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.cmdbar .cmd-search input,
.cmdbar .cmd-search select { height: 40px; border-radius: 10px; padding: 0 12px; border: 1px solid #d5dee8; background: #fff; color: #1d2733; }
.cmdbar .cmd-search input[type="search"] { min-width: 180px; }
.cmdbar .cmd-search button { background: #0f2a43; color: #fff; height: 40px; }
.doc-tipo { display: flex; flex-direction: column; gap: 1px; line-height: 1.25; }
.doc-tipo strong { font-weight: 700; color: #0f2a43; }
.doc-tipo .muted { font-size: 12px; }
.form-card h2 { margin: 8px 0 0; font-size: 15px; color: #0f2a43; }
.form-card.form-producto { max-width: 640px; }
.form-card fieldset.form-group {
    border: 1px solid #e3ebf3;
    border-radius: 10px;
    margin: 0;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.form-card fieldset.form-group legend {
    font-size: 13px;
    font-weight: 700;
    color: #0f2a43;
    padding: 0 6px;
}
.form-hint { margin: 0; font-size: 12px; line-height: 1.4; color: #6b7a8a; font-weight: 500; text-transform: none; }
.mod-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.mod-tabs a { background: #fff; color: #0f2a43; border: 1px solid #d5dee8; border-radius: 999px; padding: 7px 12px; font-weight: 700; font-size: 13px; text-decoration: none; }
.mod-tabs a.on, .mod-tabs a:hover { background: #0f2a43; color: #fff; border-color: #0f2a43; }
.pos-body .pos-ncf:not([hidden]) { display: flex; }
.pos-ncf[hidden], #box-cliente[hidden] { display: none !important; }

@media (max-width: 960px) {
    .form-row { grid-template-columns: 1fr; }
    .doc-meta { grid-template-columns: 1fr; }
    .login-shell { grid-template-columns: 1fr; }
    .login-aside {
        min-height: 0;
        padding: 48px 20px 22px;
        align-items: center;
        text-align: center;
    }
    .login-brand-stage { width: min(100%, 420px); }
    .login-card { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.08); }
}

.tabbar, .mas-sheet { display: none; }
.pos-body { flex-direction: column; height: 100dvh; }
.trabajo { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; }
.pos-body .search { position: relative; }
.pos-body .search input { width: 100%; height: 44px; border: 1px solid #3d4550; border-radius: 10px; padding: 0 12px; font-size: 16px; background: #2a3038; color: #fff; }
.pos-body .grid { position: absolute; z-index: 8; left: 0; right: 0; top: calc(100% + 4px); max-height: 280px; overflow: auto; background: #2a3038; border: 1px solid #3d4550; border-radius: 10px; }
.pos-body .grid[hidden] { display: none; }
.pos-body .grid .p { min-height: 44px; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #3d4550; cursor: pointer; background: transparent; }
.pos-body .items { flex: 1; }
.pos-body .items table { width: 100%; border-collapse: collapse; }
.pos-body .items th, .pos-body .items td { color: #e8eaed; }
.pos-body .qty-btn { width: 36px; height: 36px; border: 0; border-radius: 8px; background: #323842; color: #fff; font-size: 20px; cursor: pointer; }
.pos-body .ln-qty { display: flex; align-items: center; gap: 6px; }
.pos-body .qty { width: 72px; height: 36px; text-align: center; border-radius: 8px; border: 1px solid #3d4550; background: #2a3038; color: #fff; }
.venta-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.venta-actions button, .box-cliente input { min-height: 44px; }
.venta-actions button { border: 0; border-radius: 10px; padding: 0 14px; background: #323842; color: #fff; font-weight: 700; cursor: pointer; }
.desc-lbl, .box-cliente label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #9aa3ad; }
.desc-lbl input, .box-cliente input { height: 44px; border-radius: 10px; border: 1px solid #3d4550; background: #2a3038; color: #fff; padding: 0 10px; }
.box-cliente { display: grid; gap: 8px; }
.box-cliente[hidden] { display: none; }
.cobro-bar { display: flex; gap: 10px; align-items: center; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: #121418; border-top: 1px solid #2c3138; }
.cobro-bar .tot { flex: 1; background: transparent; border: 0; padding: 0; color: #e8eaed; }
.cobro-bar .tot div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.cobro-bar .tot .grand { font-size: 18px; font-weight: 800; }
.cobro-bar #btn-cobrar { min-width: 120px; min-height: 48px; border: 0; border-radius: 12px; background: #1fa463; color: #fff; font-weight: 800; font-size: 16px; cursor: pointer; }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: #fff; cursor: pointer; }
.toast { position: fixed; left: 12px; right: 12px; bottom: 88px; z-index: 70; padding: 12px 14px; border-radius: 10px; }
.toast.is-ok { background: #163528; color: #b7ebc9; }
.toast.is-err { background: #3a1e1c; color: #ffc9c2; }

@media (max-width: 1100px) {
    .home-cols { grid-template-columns: 1fr; }
    .home-cols .home-panel:last-child { max-height: none; overflow: visible; }
}
@media (max-width: 1024px) {
    .home-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cmdbar { align-items: stretch; }
    .cmdbar .cmd-search {
        margin-left: 0;
        flex: 1 1 100%;
        flex-wrap: wrap;
        min-width: 0;
    }
    .cmdbar .cmd-search input,
    .cmdbar .cmd-search select,
    .search-bar input,
    .search-bar select {
        min-width: 0;
        flex: 1 1 160px;
        max-width: 100%;
    }
}

@media (max-width: 1100px), (pointer: coarse) {
    .side { display: none; }
    .app-body { padding-bottom: 76px; }
    .page { padding: 16px 16px 24px; }
    .page h1 { font-size: 22px; }
    .hello { flex-direction: column; align-items: flex-start; gap: 12px; }
    .page-home > .hello { justify-content: flex-start; }
    .stats { grid-template-columns: 1fr 1fr; }
    .home-sumas { grid-template-columns: 1fr; }
    .home-cards { grid-template-columns: 1fr; }
    .home-cols { grid-template-columns: 1fr; }
    .home-shortcuts { grid-template-columns: 1fr 1fr; }
    .top {
        justify-content: space-between;
        padding: 10px 14px;
        gap: 16px;
        min-height: 76px;
        overflow: visible;
    }
    .top .who { display: none; }
    .top .brand { margin-right: 0; }
    .top .brand img { height: 48px; }
    .top-info { margin-left: auto; flex: 0 0 auto; gap: 0; }
    #btn-menu { width: 44px; height: 44px; }
    .pos-top { flex-wrap: wrap; }
    .pos-top .groups {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        grid-auto-rows: 36px;
        justify-items: stretch;
        align-items: stretch;
        width: 100%;
        min-width: 0;
        flex: 1 0 100%;
        align-self: stretch;
        gap: 6px 3px;
        overflow: visible;
        padding: 0;
    }
    .pos-top .groups button {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: 36px;
        min-height: 36px;
        max-height: 36px;
        margin: 0;
        padding: 0 1px;
        border-radius: 8px;
        border: 1px solid transparent;
        background: #2a3038;
        color: #fff;
        font-weight: 600;
        font-size: 11px;
        line-height: 1.05;
        letter-spacing: 0;
        cursor: pointer;
        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    .pos-top .groups button.on {
        box-shadow: inset 0 0 0 2px #fff;
        color: #fff;
    }
    .pos-top .groups-all {
        display: block;
        flex: 1 0 100%;
        width: 100%;
        height: 28px;
        margin: 0;
        padding: 0;
        border: 0;
        background: transparent;
        color: #9aa3ad;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
    }
    .pos-top .groups-all.on { color: #1fa463; }
    .pos-results {
        position: static;
        flex: 1 0 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        max-height: min(46vh, 380px);
        left: auto;
        right: auto;
        top: auto;
        padding: 0 0 8px;
        background: transparent;
        border: 0;
        border-radius: 0;
    }
    .pos-results .muted { grid-column: 1 / -1; margin: 0; padding: 8px 4px; }
    .pos-results .p {
        min-height: 76px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 6px;
        background: #24282e;
        border: 1px solid #3d4550;
        border-radius: 12px;
        padding: 12px;
        color: #fff;
    }
    .pos-results .p .p-name {
        display: block;
        width: 100%;
        font-weight: 700;
        font-size: 13px;
        line-height: 1.2;
        text-align: center;
        text-transform: uppercase;
    }
    .pos-results .p .pr {
        display: block;
        width: auto;
        align-self: center;
        margin-top: 2px;
        padding: 3px 10px;
        border-radius: 999px;
        background: rgba(0, 0, 0, .28);
        font-weight: 800;
        font-size: 16px;
        line-height: 1.2;
        text-align: center;
        color: #f4f0e6;
        letter-spacing: .02em;
    }
    .pos-results .p.rank-top {
        background: #145c38;
        border-color: #1fa463;
    }
    .pos-results .p.rank-top .p-name { color: #fff; }
    .pos-results .p.rank-mid {
        background: #1c302c;
        border-color: #3d6556;
    }
    .pos-results .p.rank-mid .p-name { color: #f2f5f4; }
    .pos-results .p.rank-rest {
        background: #24282e;
        border-color: #3d4550;
    }
    .pos-results .p.tone .p-name { color: #fff; }
    .pos-keys {
        position: fixed;
        width: 0;
        height: 0;
        padding: 0;
        overflow: visible;
        border: 0;
        background: transparent;
    }
    .tabbar {
        display: flex;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 40;
        height: calc(64px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        background: #fff;
        border-top: 1px solid #e3ebf3;
        box-shadow: 0 -4px 16px rgba(15, 42, 67, .06);
    }
    .tabbar a, .tabbar button {
        flex: 1;
        min-height: 44px;
        border: 0;
        background: transparent;
        color: #5c6b7a;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        font-size: 11px;
        font-weight: 700;
        text-decoration: none;
        cursor: pointer;
    }
    .tabbar a.on, .tabbar button.on { color: #148a4e; }
    .mas-sheet { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(15, 42, 67, .45); }
    .mas-sheet[hidden] { display: none !important; }
    .mas-panel {
        position: absolute; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom));
        background: #fff; color: #1d2733;
        border-radius: 16px 16px 0 0; padding: 8px 12px 16px;
        display: flex; flex-direction: column;
        max-height: min(70vh, 520px); overflow: auto;
    }
    .mas-title { margin: 8px 4px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #6b7a8a; }
    .mas-panel a, .mas-panel button {
        min-height: 48px; text-align: left; background: transparent; color: #1d2733;
        border: 0; border-bottom: 1px solid #e8eef4; font-size: 16px; text-decoration: none;
        padding: 0 8px; cursor: pointer;
    }
    .pos-body .items thead { display: none; }
    .pos-body .items table, .pos-body .items tbody { display: block; width: 100%; }
    .pos-body .items tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px 12px;
        margin: 0 0 10px;
        padding: 12px;
        background: #24282e;
        border: 1px solid #343a42;
        border-radius: 14px;
    }
    .pos-body .items td { display: block; width: auto; border: 0; padding: 0; }
    .pos-body .ln-name { flex: 1 0 100%; font-weight: 700; }
    .pos-body .ln-qty { flex: 1 1 auto; }
    .pos-body .ln-total { margin-left: auto; }
    .pos-body .ln-price::before { content: "Precio "; color: #9aa3ad; font-weight: 600; font-size: 12px; }
    .pos-body .ln-total { font-weight: 800; text-align: right; }
    .pos-body .qty-btn, .pos-body .venta-actions button, .pos-body #btn-cobrar, .pos-body .search input, .pos-body .qty {
        min-height: 44px;
    }
    .pos-body .qty-btn { width: 44px; height: 44px; }
    .pos-body .dlg {
        position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none;
        margin: 0; border-radius: 0;
    }
    .pos-body .dlg form { min-height: 100%; overflow: auto; }
    .pos-body .foot { display: none; }
    .pos-cart thead { display: none; }
    .pos-cart table, .pos-cart tbody { display: block; width: 100%; }
    .pos-cart tr {
        display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
        margin: 0 0 10px; padding: 12px; background: #24282e;
        border: 1px solid #343a42; border-radius: 14px;
    }
    .pos-cart td { display: block; border: 0; padding: 0; color: #e8eaed; }
    .pos-cart .ln-name { flex: 1 0 100%; font-weight: 700; }
    .pos-cart .ln-qty { flex: 1; }
    .pos-cart .ln-price::before { content: "Precio "; color: #9aa3ad; font-size: 12px; }
    .pos-cart .ln-total { margin-left: auto; font-weight: 800; }
    .pos-keys .key, .pos-keys .danger, .pos-keys .row2, .pos-keys .row3 { display: none !important; }
    .pos-main { display: block; }
    .pos-stage { padding-bottom: 88px; }
    .ticket-listo {
        position: fixed; left: 8px; right: 8px; z-index: 36; margin: 0;
        bottom: calc(84px + env(safe-area-inset-bottom));
    }
    .ticket-bar button { flex: 1 0 100%; }
    .pos-body .pos-tot, .pos-body #btn-cobrar {
        position: fixed; bottom: 0; z-index: 35; background: #121418;
        height: calc(76px + env(safe-area-inset-bottom));
        box-sizing: border-box;
    }
    .pos-body .pos-tot {
        left: 0; right: auto; width: 75%; margin: 0; gap: 0;
        display: flex; align-items: center; justify-content: space-evenly;
        flex-wrap: nowrap; text-align: center;
        padding: 0 2px env(safe-area-inset-bottom);
        border-top: 1px solid #2c3138;
    }
    .pos-body .pos-tot > div {
        flex: 1 1 0; min-width: 0; text-align: center;
    }
    .pos-body .pos-tot span,
    .pos-body .pos-tot b { text-align: center; }
    .pos-body .pos-tot span { font-size: 11px; letter-spacing: 0; }
    .pos-body .pos-tot b { font-size: 14px; }
    .pos-body .pos-tot .grand b { font-size: 18px; }
    .pos-body #btn-cobrar {
        left: 75%; right: 0; width: 25%; min-width: 72px;
        min-height: calc(76px + env(safe-area-inset-bottom));
        margin: 0; padding: 0 4px;
        border-radius: 0; border: 0;
    }
    .pos-cart .qty-btn { width: 44px; height: 44px; }
    .dlg {
        position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none;
        margin: 0; border-radius: 0;
    }
    .app-body, .page { overflow-x: hidden; }
    .page { min-width: 0; }
    .cmdbar, .search-bar {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        height: auto;
        width: 100%;
        min-width: 0;
    }
    .cmdbar .cmd-search, .search-bar {
        margin-left: 0;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
    }
    .cmdbar > a, .cmdbar > a.cmd-new {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .cmdbar .cmd-search input,
    .cmdbar .cmd-search input[type="search"],
    .cmdbar .cmd-search select,
    .cmdbar .cmd-search button,
    .search-bar input,
    .search-bar select,
    .search-bar button {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        flex: none;
    }
    .table-wrap {
        overflow: visible;
        background: transparent;
        border: 0;
        box-shadow: none;
    }
    .grid-table { width: 100%; }
    .grid-table thead { display: none; }
    .grid-table, .grid-table tbody, .grid-table tr, .grid-table td { display: block; width: auto; }
    .grid-table tr {
        background: #fff;
        border: 1px solid #e3ebf3;
        border-radius: 14px;
        margin: 0 0 10px;
        padding: 8px 12px;
        box-shadow: 0 1px 2px rgba(15, 42, 67, .04);
    }
    .grid-table td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
        border: 0;
        padding: 6px 0;
        text-align: right;
    }
    .grid-table td[data-label]::before {
        content: attr(data-label);
        color: #6b7a8a;
        font-size: 12px;
        font-weight: 700;
        text-align: left;
        flex: 0 0 38%;
    }
    .grid-table td.actions { justify-content: flex-end; padding-top: 8px; }
    .grid-table td.actions::before { content: none; }
    .grid-table td.actions a { min-height: 44px; display: inline-flex; align-items: center; }
}

@media (min-width: 1101px) and (hover: hover) and (pointer: fine) {
    .tabbar, .mas-sheet { display: none !important; }
}

.seat-widget { margin-bottom: 1rem; }
.seat-bar {
    height: 8px;
    background: #e8eef4;
    border-radius: 999px;
    overflow: hidden;
    margin: 0.5rem 0 0.75rem;
}
.seat-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    transition: width 0.2s ease;
}
.seat-bar--ok span { background: #0d9488; }
.seat-bar--warn span { background: #d97706; }
.seat-bar--full span { background: #dc2626; }

