/* ===================== SOULBAR POS ===================== */
:root {
  --sb-black: #0e0e10;
  --sb-graphite: #19191c;
  --sb-graphite-2: #26262b;
  --sb-line: #34343a;
  --sb-yellow: #ffd60a;
  --sb-yellow-d: #e6bf00;
  --sb-yellow-soft: #fff6c2;
  --sb-bg: #f1f1f3;
  --sb-card: #ffffff;
  --sb-text: #17171a;
  --sb-muted: #6c6c75;
  --sb-border: #e3e3e8;
  --sb-ok: #1f9d55;
  --sb-warn: #f59e0b;
  --sb-bad: #dc3545;
  --sb-radius: 14px;
  --side-w: 236px;
  --topbar-h: 64px;
  --bs-font-sans-serif: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-body-font-family: var(--bs-font-sans-serif);
  --bs-body-bg: var(--sb-bg);
  --bs-body-color: var(--sb-text);
  --bs-primary: #17171a;
  --bs-primary-rgb: 23, 23, 26;
  --bs-link-color: #17171a;
  --bs-border-radius: 10px;
}
* { -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { font-family: var(--bs-font-sans-serif); background: var(--sb-bg); color: var(--sb-text); font-size: 14.5px; overscroll-behavior-y: none; }
.text-warning-sb { color: var(--sb-yellow-d) !important; }
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- Botones ---------- */
.btn { border-radius: 10px; font-weight: 600; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; touch-action: manipulation; }
.btn-sm { min-height: 34px; }
.btn-lg { min-height: 52px; font-size: 1.05rem; }
.btn-sb { background: var(--sb-yellow); border: 1px solid var(--sb-yellow); color: #111; }
.btn-sb:hover, .btn-sb:focus, .btn-sb:active { background: var(--sb-yellow-d); border-color: var(--sb-yellow-d); color: #000; }
.btn-sb:disabled, .btn-sb.disabled { background: #e8e1b0; border-color: #e8e1b0; color: #8a8566; }
.btn-dark { background: var(--sb-graphite); border-color: var(--sb-graphite); }
.btn-dark:hover { background: #000; }
.btn-outline-sb { border: 1.5px solid var(--sb-border); background: #fff; color: var(--sb-text); }
.btn-outline-sb:hover { border-color: var(--sb-text); background: #fff; }
.btn-icon { width: 42px; padding: 0; font-size: 1.35rem; background: transparent; color: #fff; border: 0; }
.btn:focus-visible, .form-control:focus-visible { outline: 3px solid rgba(255,214,10,.55); outline-offset: 1px; }
.form-control, .form-select { min-height: 42px; border-color: var(--sb-border); }
.form-control:focus, .form-select:focus { border-color: var(--sb-yellow-d); box-shadow: 0 0 0 .2rem rgba(255,214,10,.28); }
.form-label { font-weight: 600; font-size: .82rem; color: #3b3b42; margin-bottom: .25rem; }
.form-check-input:checked { background-color: var(--sb-yellow-d); border-color: var(--sb-yellow-d); }
.form-switch .form-check-input { width: 2.6em; height: 1.4em; cursor: pointer; }
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(255,214,10,.3); border-color: var(--sb-yellow-d); }

/* ---------- Logo ---------- */
.sb-logo { display: inline-flex; flex-direction: column; line-height: 1; align-items: flex-start; font-family: 'Poppins', sans-serif; }
.sb-logo-main { font-weight: 900; letter-spacing: -.02em; display: inline-flex; font-style: italic; }
.sb-logo .s1 { color: #fff; } .sb-logo .s2 { color: var(--sb-yellow); }
.sb-logo-by { font-weight: 600; letter-spacing: .12em; color: #fff; align-self: flex-end; }
.sb-logo-sm .sb-logo-main { font-size: 1.9rem; } .sb-logo-sm .sb-logo-by { font-size: .6rem; margin-top: 2px; }
.sb-logo-lg .sb-logo-main { font-size: 2.9rem; } .sb-logo-lg .sb-logo-by { font-size: .85rem; margin-top: 6px; align-self: stretch; display: flex; align-items: center; justify-content: center; gap: 12px; }
.sb-logo-lg .sb-logo-by::before, .sb-logo-lg .sb-logo-by::after { content: ''; flex: 1; height: 2px; background: var(--sb-yellow); border-radius: 2px; }
.sb-logo-xl .sb-logo-main { font-size: 4.4rem; } .sb-logo-xl .sb-logo-by { font-size: 1.3rem; margin-top: 8px; align-self: stretch; display: flex; align-items: center; gap: 22px; justify-content: flex-end; }
.sb-logo-xl .sb-logo-by::before { content: ''; flex: 0 0 150px; height: 3px; background: var(--sb-yellow); border-radius: 2px; margin-right: auto; }

/* ---------- Estructura ---------- */
.app-shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); height: 100dvh; }
.side { background: var(--sb-black); color: #d6d6db; display: flex; flex-direction: column; overflow-y: auto; padding-bottom: env(safe-area-inset-bottom); z-index: 1040; }
.side-logo { padding: 16px 18px 14px; text-decoration: none; display: block; }
.side-nav { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; }
.side-link { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 10px; color: #d6d6db; text-decoration: none; font-weight: 500; font-size: .95rem; white-space: nowrap; min-height: 46px; }
.side-link i { font-size: 1.25rem; width: 24px; text-align: center; flex: none; }
.side-link:hover { background: var(--sb-graphite-2); color: #fff; }
.side-link.active { background: var(--sb-yellow); color: #111; font-weight: 700; }
.side-promo { margin-top: auto; padding: 28px 22px; background: linear-gradient(160deg, #1d1d21, #0b0b0c); border-top: 1px solid var(--sb-line); color: #fff; font-weight: 600; letter-spacing: .22em; font-size: .8rem; line-height: 1.7; position: relative; min-height: 150px; }
.side-promo i { display: block; width: 36px; height: 3px; background: var(--sb-yellow); margin-top: 10px; }
.side-backdrop { display: none; }

.main { display: flex; flex-direction: column; min-width: 0; height: 100dvh; }
.topbar { height: var(--topbar-h); flex: none; background: var(--sb-black); color: #fff; display: flex; align-items: center; gap: 14px; padding: 0 20px; padding-top: env(safe-area-inset-top); }
.topbar-title { font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.topbar-slot { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.user-chip { display: flex; align-items: center; gap: 10px; background: transparent; border: 0; color: #fff; padding: 4px 6px; border-radius: 12px; }
.user-chip:hover { background: var(--sb-graphite-2); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--sb-graphite-2); display: grid; place-items: center; font-weight: 700; border: 1px solid var(--sb-line); }
.user-meta { display: flex; flex-direction: column; text-align: left; line-height: 1.15; }
.user-meta small { color: #9a9aa3; }
.content { flex: 1; overflow: auto; padding: 20px; min-height: 0; -webkit-overflow-scrolling: touch; }
body.app-pos .content { padding: 0; overflow: hidden; }

/* ---------- Tarjetas, tablas ---------- */
.sb-card { background: var(--sb-card); border: 1px solid var(--sb-border); border-radius: var(--sb-radius); }
.sb-card-h { padding: 14px 18px; border-bottom: 1px solid var(--sb-border); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sb-card-h h2, .sb-card-h h3 { font-size: 1rem; font-weight: 700; margin: 0; }
.sb-card-b { padding: 18px; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { font-size: 1.35rem; font-weight: 800; margin: 0; }
.table { --bs-table-bg: transparent; margin: 0; }
.table > :not(caption) > * > * { padding: .7rem .85rem; vertical-align: middle; }
.table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--sb-muted); font-weight: 700; border-bottom: 1px solid var(--sb-border); background: #fafafb; white-space: nowrap; }
.table-hover tbody tr:hover { background: #fffbe0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.badge-sb { background: var(--sb-yellow-soft); color: #7a6200; font-weight: 600; }
.pill { display: inline-block; padding: .18rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.pill-ok { background: #def5e7; color: #166b3a; } .pill-bad { background: #fde3e6; color: #a1202e; }
.pill-warn { background: #fff0cf; color: #8a5a00; } .pill-mute { background: #ececf0; color: #5a5a63; }
.empty { text-align: center; color: var(--sb-muted); padding: 36px 12px; }
.empty i { font-size: 2.2rem; display: block; opacity: .5; margin-bottom: 6px; }
.loading { text-align: center; padding: 30px; color: var(--sb-muted); }
.spin { display: inline-block; width: 1.2rem; height: 1.2rem; border: 3px solid #ddd; border-top-color: var(--sb-yellow-d); border-radius: 50%; animation: sp .7s linear infinite; vertical-align: -3px; }
@keyframes sp { to { transform: rotate(360deg); } }

/* ---------- Modales ---------- */
.modal-content { border: 0; border-radius: 18px; overflow: hidden; }
.modal-header { background: var(--sb-black); color: #fff; border: 0; padding: 14px 20px; }
.modal-header .modal-title { font-weight: 700; font-size: 1.05rem; }
.modal-header .btn-close { filter: invert(1); opacity: .8; }
.modal-footer { border-top: 1px solid var(--sb-border); }
.modal-backdrop.show { opacity: .55; }

/* ---------- Toasts ---------- */
.toast-stack { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; z-index: 2000; max-width: min(92vw, 380px); }
.sb-toast { background: var(--sb-black); color: #fff; padding: 12px 16px; border-radius: 12px; display: flex; gap: 10px; align-items: flex-start; box-shadow: 0 10px 30px rgba(0,0,0,.28); border-left: 5px solid var(--sb-yellow); animation: tin .18s ease-out; font-weight: 500; }
.sb-toast.ok { border-left-color: var(--sb-ok); } .sb-toast.err { border-left-color: var(--sb-bad); }
.sb-toast i { font-size: 1.2rem; margin-top: 1px; }
@keyframes tin { from { transform: translateY(10px); opacity: 0; } }

/* ---------- Login ---------- */
body.simple-page { background: #0b0b0c; }
.login-wrap { position: relative; min-height: 100dvh; display: grid; grid-template-columns: 1.05fr 1fr; background: #0b0b0c; overflow: hidden; isolation: isolate; }
/* La fotografía cubre toda la pantalla conservando su proporción (16:9 aprox.); los textos se miden con --sw (ancho del escenario). */
.login-stage { --sw: max(100vw, calc(100dvh * 1.7768)); position: fixed; left: 50%; top: 50%; width: var(--sw); aspect-ratio: 1672 / 941; transform: translate(-50%, -50%); z-index: -2; background: #0b0b0c; }
.login-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.login-shade { position: fixed; inset: 0; z-index: -1; background: radial-gradient(120% 90% at 70% 50%, rgba(0,0,0,0) 30%, rgba(0,0,0,.45) 100%); pointer-events: none; }
.login-hero { position: absolute; left: 6.6%; top: 39%; width: 19.4%; color: #fff; }
.hero-tag { letter-spacing: .5em; font-size: max(10px, calc(var(--sw) * .0092)); margin: 0; font-weight: 300; text-shadow: 0 2px 12px rgba(0,0,0,.8); white-space: nowrap; }
.hero-tag-y { color: var(--sb-yellow); margin-top: .7em; }
.hero-feats { display: flex; justify-content: space-between; gap: 2%; margin: calc(var(--sw) * .016) 0 calc(var(--sw) * .008); }
.hero-feats div { text-align: center; font-size: max(8px, calc(var(--sw) * .0056)); letter-spacing: .08em; color: #f0f0f3; line-height: 1.5; text-shadow: 0 1px 8px rgba(0,0,0,.9); }
.hero-feats svg { display: block; width: max(26px, calc(var(--sw) * .022)); height: auto; aspect-ratio: 1; color: var(--sb-yellow); margin: 0 auto .7em; filter: drop-shadow(0 1px 6px rgba(0,0,0,.8)); }
.hero-script { font-family: 'Kaushan Script', 'Brush Script MT', 'Segoe Script', cursive; font-size: max(16px, calc(var(--sw) * .0165)); color: #fff; margin: 0; padding-left: 0; text-shadow: 0 2px 14px rgba(0,0,0,.85); transform: rotate(-3deg); transform-origin: left center; white-space: nowrap; }
.hero-swoosh { display: block; width: 72%; height: calc(var(--sw) * .0075); min-height: 6px; margin-left: 3%; margin-top: 2px; }
.login-panel { grid-column: 2; display: grid; place-items: center; padding: 24px; position: relative; z-index: 1; }
.login-card { width: min(440px, 100%); background: rgba(16,16,18,.58); -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2); border: 1px solid rgba(255,255,255,.16); border-radius: 30px; padding: 40px 38px 30px; color: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.08); }
.login-opts .form-check-label { color: #e2e2e7; }
.login-title { text-align: center; font-size: 1.7rem; font-weight: 700; margin: 10px 0 0; }
.login-sub { text-align: center; color: #cfcfd6; margin-bottom: 22px; }
.sb-field { position: relative; margin-bottom: 14px; }
.sb-field > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 1.2rem; color: #b7b7c0; pointer-events: none; }
.sb-field .form-control { background: transparent; color: #fff; border: 1px solid #55555e; border-radius: 12px; min-height: 52px; padding-left: 46px; }
.sb-field .form-control::placeholder { color: #c4c4cc; }
.sb-field .form-control:focus { background: rgba(255,255,255,.04); color: #fff; border-color: var(--sb-yellow); }
.sb-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #b7b7c0; width: 40px; height: 40px; font-size: 1.15rem; }
.login-card .form-check-input { background-color: transparent; border-color: #77777f; }
.login-card .form-check-input:checked { background-color: var(--sb-yellow); border-color: var(--sb-yellow); }
.login-foot { display: flex; justify-content: space-between; align-items: flex-end; border-top: 1px solid #36363c; margin-top: 22px; padding-top: 14px; font-size: .72rem; letter-spacing: .2em; color: #d0d0d6; text-align: center; }
.login-foot span:last-child { letter-spacing: 0; color: #9c9ca5; }
@media (max-width: 991.98px) { .login-wrap { grid-template-columns: 1fr; } .login-panel { grid-column: 1; } .login-stage > img { object-position: 38% 50%; } }

/* ---------- Placeholder de productos (sin foto) ---------- */
.ph { width: 100%; height: 100%; display: grid; place-items: center; color: rgba(255,255,255,.92); font-size: 2.4rem; background: linear-gradient(135deg, #3a2f26, #1c1613); }
.ph.c0 { background: linear-gradient(135deg, #5b4332, #1f1712); }
.ph.c1 { background: linear-gradient(135deg, #2f5d73, #12242d); }
.ph.c2 { background: linear-gradient(135deg, #a8467a, #3a1a2d); }
.ph.c3 { background: linear-gradient(135deg, #5a4a9a, #1f1a38); }
.ph.c4 { background: linear-gradient(135deg, #5a7d3a, #1d2a12); }
.ph.c5 { background: linear-gradient(135deg, #b0762b, #34220c); }

/* ---------- POS ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 392px; height: 100%; min-height: 0; }
.pos-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #fafafa; border-right: 1px solid var(--sb-border); }
.pos-cats { display: flex; gap: 8px; padding: 14px 16px 10px; overflow-x: auto; flex: none; scrollbar-width: none; }
.pos-cats::-webkit-scrollbar { display: none; }
.cat-btn { flex: 1 0 auto; min-width: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--sb-border); background: #fff; color: var(--sb-text); font-weight: 600; font-size: .85rem; min-height: 68px; touch-action: manipulation; }
.cat-btn i { font-size: 1.35rem; }
.cat-btn.active { background: var(--sb-yellow); border-color: var(--sb-yellow); color: #111; box-shadow: 0 4px 14px rgba(255,214,10,.4); }
.pos-grid-wrap { flex: 1; overflow-y: auto; padding: 6px 16px 90px; min-height: 0; -webkit-overflow-scrolling: touch; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
.p-card { position: relative; background: #fff; border: 1px solid var(--sb-border); border-radius: 12px; overflow: hidden; text-align: left; padding: 0; cursor: pointer; display: flex; flex-direction: column; transition: transform .08s, box-shadow .15s; touch-action: manipulation; user-select: none; }
.p-card:active { transform: scale(.97); }
.p-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.p-img { aspect-ratio: 4/3; background: #eee; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-body { padding: 8px 10px 10px; display: flex; align-items: center; gap: 6px; }
.p-name { font-size: .8rem; font-weight: 500; line-height: 1.2; display: block; color: #333; }
.p-price { font-size: 1.15rem; font-weight: 800; line-height: 1.2; display: block; }
.p-add { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; background: var(--sb-yellow); display: grid; place-items: center; font-size: 1.2rem; flex: none; color: #111; }
.p-card.off { opacity: .45; pointer-events: none; }
.p-flag { position: absolute; top: 8px; left: 8px; font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: rgba(0,0,0,.72); color: #fff; }
.p-flag.low { background: var(--sb-warn); color: #111; }
.p-opts { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.9); display: grid; place-items: center; font-size: .8rem; }
.pos-search { position: relative; flex: 1; max-width: 520px; }
.pos-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #9b9ba4; }
.pos-search input, .socio-btn { background: var(--sb-graphite); border: 1px solid var(--sb-line); color: #fff; border-radius: 10px; min-height: 44px; padding-left: 42px; }
.pos-search input::placeholder { color: #9b9ba4; }
.pos-search input:focus { background: var(--sb-graphite-2); color: #fff; }
.socio-wrap { position: relative; width: 250px; flex: none; }
.socio-btn { width: 100%; text-align: left; padding: 0 12px 0 42px; display: flex; align-items: center; justify-content: space-between; gap: 6px; position: relative; color: #e9e9ee; }
.socio-btn > i.lead { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); }
.socio-pop { position: absolute; top: 50px; left: 0; width: 330px; background: #fff; color: var(--sb-text); border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.35); padding: 10px; z-index: 1060; }
.socio-item { display: flex; flex-direction: column; width: 100%; text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: 10px; }
.socio-item:hover { background: var(--sb-yellow-soft); }

/* Ticket */
.pos-ticket { display: flex; flex-direction: column; background: #fff; min-height: 0; }
.tk-tabs { display: flex; background: var(--sb-black); flex: none; }
.tk-tabs button { flex: 1; border: 0; background: transparent; color: #cfcfd6; font-weight: 700; padding: 13px; position: relative; }
.tk-tabs button.active { color: #fff; }
.tk-tabs button.active::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; background: var(--sb-yellow); border-radius: 3px; }
.tk-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 12px 14px 8px; background: #efeff2; border-radius: 12px; padding: 4px; flex: none; }
.tk-mode button { border: 0; background: transparent; border-radius: 9px; padding: 10px; font-weight: 600; color: #555; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; touch-action: manipulation; }
.tk-mode button.active { background: var(--sb-black); color: #fff; }
.tk-mode button.active i { color: var(--sb-yellow); }
.tk-head { display: grid; grid-template-columns: 1fr 86px 58px 62px 26px; gap: 4px; padding: 6px 16px; font-size: .74rem; color: var(--sb-muted); border-bottom: 1px solid var(--sb-border); flex: none; }
.tk-lines { flex: 1 1 auto; overflow-y: auto; min-height: 120px; -webkit-overflow-scrolling: touch; }
#paneTicket { overflow-y: auto; }
.tk-line { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto 28px; grid-template-areas: "t i p d" "t q q q"; gap: 2px 10px; align-items: start; padding: 11px 14px; border-bottom: 1px solid #efeff2; animation: tin .15s; }
.tk-line .thumb { grid-area: t; align-self: start; }
.tk-info { grid-area: i; cursor: pointer; min-width: 0; }
.tk-total { grid-area: p; font-weight: 800; font-size: .95rem; text-align: right; padding-top: 1px; }
.tk-del { grid-area: d; }
.tk-qty { grid-area: q; display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.tk-unit { color: var(--sb-muted); font-size: .8rem; }
.tk-line .thumb { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; background: #ddd; font-size: 1rem; }
.tk-line .thumb .ph { font-size: 1.1rem; }
.tk-line .thumb img { width: 100%; height: 100%; object-fit: cover; }
.tk-name { font-weight: 700; font-size: .82rem; line-height: 1.2; }
.tk-sub { font-size: .72rem; color: var(--sb-muted); line-height: 1.25; }
.tk-note { font-size: .72rem; color: #8a6d00; font-style: italic; }
.qty { display: flex; align-items: center; gap: 4px; }
.qty button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid #cfcfd6; background: #fff; display: grid; place-items: center; line-height: 1; padding: 0; font-size: 1rem; touch-action: manipulation; }
.qty button:active { background: var(--sb-yellow); }
.qty span { min-width: 16px; text-align: center; font-weight: 600; }
.tk-del { border: 0; background: none; color: #a0a0aa; font-size: 1.05rem; padding: 0; }
.tk-del:hover { color: var(--sb-bad); }
.tk-empty { text-align: center; color: var(--sb-muted); padding: 40px 20px; }
.tk-empty i { font-size: 2.6rem; opacity: .35; display: block; }
.tk-extra { padding: 10px 14px 0; flex: none; }
.tk-extra .form-control { min-height: 38px; font-size: .85rem; }
.tk-foot { flex: none; border-top: 1px solid var(--sb-border); padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); background: #fff; }
.tk-row { display: flex; justify-content: space-between; align-items: baseline; font-size: .95rem; padding: 2px 0; }
.tk-row.total { font-size: 1.15rem; font-weight: 800; margin-top: 2px; }
.tk-row.total b { font-size: 2rem; letter-spacing: -.02em; }
.tk-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 10px 0; }
.tk-pay { background: var(--sb-graphite); color: #fff; border: 0; border-radius: 12px; padding: 11px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .78rem; font-weight: 600; min-height: 62px; touch-action: manipulation; }
.tk-pay i { font-size: 1.35rem; }
.tk-pay:active { background: #000; }
.btn-cobrar { width: 100%; min-height: 62px; font-size: 1.35rem; font-weight: 800; border-radius: 12px; }
.btn-cobrar span { font-weight: 800; margin-left: 12px; }
.disc-row { display: flex; align-items: center; gap: 8px; }
.disc-row .input-group { flex: 1; }
.pos-cartbar { display: none; }
.caja-banner { display: flex; align-items: center; gap: 10px; background: #fff3cd; color: #6b4e00; padding: 8px 14px; font-weight: 600; font-size: .9rem; flex: none; }
.caja-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--sb-graphite-2); color: #dcdce2; white-space: nowrap; }
.caja-chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--sb-ok); }
.caja-chip.closed::before { background: var(--sb-bad); }

/* Variantes (modal compacto) */
.opt-group { margin-bottom: 14px; }
.opt-group h6 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--sb-muted); font-weight: 700; margin-bottom: 8px; }
.opt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-chip { position: relative; }
.opt-chip input { position: absolute; opacity: 0; pointer-events: none; }
.opt-chip label { display: flex; flex-direction: column; align-items: center; min-width: 92px; padding: 10px 14px; border: 1.5px solid var(--sb-border); border-radius: 12px; font-weight: 600; background: #fff; cursor: pointer; min-height: 52px; justify-content: center; touch-action: manipulation; }
.opt-chip label small { font-weight: 500; color: var(--sb-muted); }
.opt-chip input:checked + label { border-color: var(--sb-yellow-d); background: var(--sb-yellow-soft); box-shadow: 0 0 0 2px var(--sb-yellow); }
.opt-chip input:focus-visible + label { outline: 3px solid rgba(255,214,10,.6); }

/* Cobro */
.pay-total { text-align: center; padding: 8px 0 14px; }
.pay-total small { color: var(--sb-muted); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.pay-total b { display: block; font-size: 3rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.pay-methods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.pay-m { border: 1.5px solid var(--sb-border); background: #fff; border-radius: 12px; padding: 12px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 600; font-size: .82rem; min-height: 72px; touch-action: manipulation; }
.pay-m i { font-size: 1.5rem; }
.pay-m.active { background: var(--sb-black); color: #fff; border-color: var(--sb-black); }
.pay-m.active i { color: var(--sb-yellow); }
.quick-cash { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.quick-cash button { flex: 1 0 70px; border: 1.5px solid var(--sb-border); background: #fff; border-radius: 10px; min-height: 46px; font-weight: 700; touch-action: manipulation; }
.quick-cash button:active { background: var(--sb-yellow); }
.pay-big { font-size: 1.6rem; font-weight: 700; text-align: right; min-height: 56px; }
.change-box { background: #e9f7ef; color: #166b3a; border-radius: 12px; padding: 10px 14px; display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.change-box b { font-size: 1.6rem; }
.change-box.short { background: #fde3e6; color: #a1202e; }
.mix-row { display: grid; grid-template-columns: 130px 1fr 36px; gap: 8px; align-items: center; margin-bottom: 8px; }
.success-ico { width: 84px; height: 84px; border-radius: 50%; background: var(--sb-yellow); display: grid; place-items: center; font-size: 2.8rem; margin: 6px auto 10px; animation: pop .3s ease-out; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

/* ---------- Pedidos ---------- */
.ord-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.ord-card { background: #fff; border-radius: 16px; border: 1px solid var(--sb-border); overflow: hidden; display: flex; flex-direction: column; border-top: 8px solid #bbb; }
.ord-card.pendiente { border-top-color: var(--sb-bad); }
.ord-card.preparando { border-top-color: var(--sb-warn); }
.ord-card.listo { border-top-color: var(--sb-ok); }
.ord-card.entregado { border-top-color: #9aa; opacity: .7; }
.ord-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 6px; }
.ord-num { font-size: 2rem; font-weight: 900; line-height: 1; }
.ord-meta { text-align: right; font-size: .8rem; color: var(--sb-muted); line-height: 1.3; }
.ord-items { padding: 6px 16px 8px; flex: 1; }
.ord-item { padding: 8px 0; border-bottom: 1px dashed #e6e6ea; }
.ord-item:last-child { border: 0; }
.ord-item b { font-size: 1.05rem; }
.ord-item .q { display: inline-block; min-width: 30px; font-weight: 800; color: #111; background: var(--sb-yellow); border-radius: 8px; text-align: center; padding: 0 6px; margin-right: 8px; }
.ord-mods { font-size: .82rem; color: #555; margin-left: 40px; }
.ord-note { font-size: .82rem; margin-left: 40px; color: #8a5a00; font-weight: 600; }
.ord-f { padding: 10px 14px 14px; display: flex; gap: 8px; }
.ord-f .btn { flex: 1; min-height: 52px; font-size: 1.05rem; }
.ord-late { color: var(--sb-bad); font-weight: 700; }
.seg { display: inline-flex; background: #e8e8ec; border-radius: 12px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 8px 16px; border-radius: 9px; font-weight: 600; min-height: 40px; touch-action: manipulation; color: #44444c; }
.seg button.active { background: var(--sb-black); color: #fff; }

/* ---------- KPI / dashboard ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--sb-border); border-radius: 14px; padding: 16px 18px; position: relative; overflow: hidden; }
.kpi small { color: var(--sb-muted); font-weight: 600; display: block; }
.kpi b { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; display: block; margin-top: 2px; }
.kpi i { position: absolute; right: 14px; top: 14px; font-size: 1.5rem; color: var(--sb-yellow-d); opacity: .85; }
.kpi.dark { background: var(--sb-black); color: #fff; border-color: var(--sb-black); }
.kpi.dark small { color: #a9a9b2; }
.chart-box { position: relative; height: 270px; }
.bar-list .row-b { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: .88rem; }
.bar-list .lbl { width: 110px; font-weight: 600; flex: none; }
.bar-list .bar { flex: 1; height: 12px; background: #eee; border-radius: 99px; overflow: hidden; }
.bar-list .bar i { display: block; height: 100%; background: var(--sb-yellow); border-radius: 99px; }
.bar-list .val { width: 90px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Varios ---------- */
.nav-sb { border-bottom: 1px solid var(--sb-border); gap: 4px; flex-wrap: nowrap; overflow-x: auto; }
.nav-sb .nav-link { color: var(--sb-muted); font-weight: 600; border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 10px 16px; white-space: nowrap; }
.nav-sb .nav-link.active { color: var(--sb-text); border-bottom-color: var(--sb-yellow); background: transparent; }
.thumb-sm { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; display: inline-block; background: #ddd; vertical-align: middle; }
.thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.thumb-sm .ph { font-size: 1.1rem; }
.photo-drop { width: 160px; height: 120px; border: 2px dashed #c8c8d0; border-radius: 12px; display: grid; place-items: center; overflow: hidden; cursor: pointer; background: #fafafa; text-align: center; color: var(--sb-muted); }
.photo-drop img { width: 100%; height: 100%; object-fit: cover; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.min-w-0 { min-width: 0; }
.sticky-actions { position: sticky; bottom: 0; background: #fff; }
.perm-grid th, .perm-grid td { text-align: center; }
.perm-grid td:first-child, .perm-grid th:first-child { text-align: left; }
.low-stock { color: var(--sb-bad); font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
  :root { --side-w: 76px; }
  .side-link span, .side-promo { display: none; }
  .side-link { justify-content: center; padding: 12px; }
  .side-logo { padding: 14px 6px; text-align: center; }
  .side-logo .sb-logo-main { font-size: .74rem; }
  .side-logo .sb-logo-by { display: none; }
  .pos { grid-template-columns: minmax(0, 1fr) 360px; }
  .socio-wrap { width: 200px; }
}
@media (max-width: 991.98px) {
  .app-shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .side .side-link span { display: inline; }
  .side .side-link { justify-content: flex-start; padding: 12px 14px; }
  .side-logo .sb-logo-main { font-size: 1.9rem; }
  .side-logo .sb-logo-by { display: block; }
  .side-logo { text-align: left; padding: 16px 18px 14px; }
  body.side-open .side { transform: none; }
  body.side-open .side-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1030; }
  .topbar { padding: 0 10px; gap: 8px; }
  .content { padding: 14px; }
  .socio-wrap { display: none; }
  /* POS vertical: el ticket se vuelve una hoja inferior */
  .pos { grid-template-columns: 1fr; }
  .pos-ticket { position: fixed; left: 0; right: 0; bottom: 0; height: 86dvh; border-radius: 22px 22px 0 0; box-shadow: 0 -12px 40px rgba(0,0,0,.35); transform: translateY(100%); transition: transform .22s ease; z-index: 1035; overflow: hidden; }
  body.ticket-open .pos-ticket { transform: none; }
  .pos-cartbar { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 1030; background: var(--sb-black); color: #fff; border-radius: 16px; padding: 10px 12px 10px 16px; align-items: center; gap: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.35); }
  .pos-cartbar .info { flex: 1; line-height: 1.15; }
  .pos-cartbar .info b { font-size: 1.3rem; display: block; }
  .pos-cartbar .info small { color: #b9b9c2; }
  .tk-close { display: grid !important; }
  .pos-grid-wrap { padding-bottom: 110px; }
}
.tk-close { display: none; position: absolute; right: 8px; top: 8px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; place-items: center; font-size: 1.1rem; }
@media (max-width: 575.98px) {
  .pos-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi b { font-size: 1.4rem; }
  .pay-methods { grid-template-columns: repeat(2, 1fr); }
  .mix-row { grid-template-columns: 1fr 1fr 36px; }
}
@media print { .side, .topbar, .toast-stack, .no-print { display: none !important; } .content { padding: 0; overflow: visible; } }
