/* =====================================================================
   WOKA — Sistema de diseño
   Marca: rojo #A42E1E · azul #A9C0C6 · amarillo #DFD796 · crema #EBE8D8 · beige #DAC2B3
   Tipografía: Poppins (títulos seminegrita, cuerpo normal)
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
  --woka-red: #A42E1E;
  --woka-red-deep: #8A2519;
  --woka-red-soft: #F4E3DF;
  --woka-blue: #A9C0C6;
  --woka-blue-deep: #5F8791;
  --woka-blue-soft: #E6EEF0;
  --woka-yellow: #DFD796;
  --woka-yellow-soft: #F5F2D9;
  --woka-cream: #EBE8D8;
  --woka-beige: #DAC2B3;

  --bg: #F6F4EC;
  --surface: #FFFFFF;
  --surface-2: #FBFAF6;
  --surface-3: #F1EEE3;
  --border: #E4DFD1;
  --border-strong: #CFC8B6;
  --text: #2A2220;
  --text-muted: #6F655D;
  --text-soft: #9A9088;

  --primary: var(--woka-red);
  --primary-hover: var(--woka-red-deep);
  --primary-contrast: #FFFFFF;
  --accent: var(--woka-blue-deep);

  --ok: #3F7D4E;
  --ok-soft: #E3F0E4;
  --warn: #A86A00;
  --warn-soft: #FBF0D5;
  --danger: #B3261E;
  --danger-soft: #FBE4E1;
  --info: #3E6F7B;
  --info-soft: #E3EEF1;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(60, 40, 30, .06);
  --shadow: 0 2px 6px rgba(60, 40, 30, .06), 0 8px 24px rgba(60, 40, 30, .06);
  --shadow-lg: 0 12px 40px rgba(60, 40, 30, .18);

  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --sidebar-w: 248px;
  --topbar-h: 60px;
  --focus-ring: 0 0 0 3px rgba(95, 135, 145, .45);
  color-scheme: light;
}

/* ---------------------------------------------------------------------
   Base
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { vertical-align: middle; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
small, .small { font-size: .85em; }
.muted { color: var(--text-muted); }
.soft { color: var(--text-soft); }
.num, .money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
table.sr-only { display: block; } /* una tabla ignora height:1px y alargaba la página */
/* Ocultar columnas secundarias en pantallas angostas */
@media (max-width: 1100px) { .hide-md { display: none; } }
@media (max-width: 640px) { .hide-sm { display: none; } }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-sm); }

.icon { width: 20px; height: 20px; flex: none; }
.icon-sm { width: 16px; height: 16px; flex: none; }
.icon-lg { width: 28px; height: 28px; flex: none; }

/* Utilidades de layout */
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: 8px } .mt-2 { margin-top: 16px } .mt-3 { margin-top: 24px }
.mb-0 { margin-bottom: 0 } .mb-1 { margin-bottom: 8px } .mb-2 { margin-bottom: 16px } .mb-3 { margin-bottom: 24px }
.gap-sm { gap: 6px !important; }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------
   Botones
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 18px;
  font: 500 .95rem/1.2 var(--font);
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--r-pill);
  cursor: pointer; user-select: none; text-decoration: none !important;
  transition: background .15s, border-color .15s, color .15s, transform .05s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-loading { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-contrast); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-secondary { background: var(--woka-blue-soft); border-color: var(--woka-blue); color: #24464E; }
.btn-secondary:hover { background: #D8E5E8; }
.btn-accent { background: var(--woka-yellow); border-color: #CFC67A; color: #3B3615; }
.btn-accent:hover { background: #D6CD84; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #8F1E17; }
.btn-danger-soft { background: var(--danger-soft); border-color: #F0C3BD; color: var(--danger); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: .85rem; }
.btn-lg { min-height: 54px; padding: 12px 24px; font-size: 1.05rem; font-weight: 600; }
.btn-xl { min-height: 68px; padding: 14px 28px; font-size: 1.2rem; font-weight: 600; border-radius: var(--r-lg); }
.btn-block { width: 100%; }
.btn-icon { width: 42px; padding: 0; }
.btn-icon.btn-sm { width: 34px; }
.btn.is-loading::after {
  content: ''; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------------
   Formularios
   --------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: .85rem; font-weight: 500; color: var(--text-muted); }
.field .hint { font-size: .8rem; color: var(--text-soft); }
.field .error-text { font-size: .8rem; color: var(--danger); }
.input, .select, .textarea,
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel],
input[type=date], input[type=time], input[type=search], input[type=datetime-local], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 14px;
  font: 400 .95rem/1.3 var(--font); color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 84px; resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236F655D' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--danger); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-3); color: var(--text-muted); }
.input-lg { min-height: 54px; font-size: 1.15rem; }
.input-money { text-align: right; font-variant-numeric: tabular-nums; }
.input-group { display: flex; align-items: stretch; }
.input-group > :not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.input-group > :not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-addon { display: inline-flex; align-items: center; padding: 0 12px; background: var(--surface-3); border: 1px solid var(--border-strong); border-radius: var(--r-sm); color: var(--text-muted); }
.form-grid { display: grid; gap: 14px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .95rem; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }

/* Switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 44px; height: 26px; border-radius: 13px; background: var(--border-strong); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s; }
.switch input:checked + .track { background: var(--ok); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: var(--focus-ring); }
.switch input:disabled + .track { opacity: .45; }
.switch:has(input:disabled) { cursor: not-allowed; }

/* Control segmentado */
.segmented { display: inline-flex; background: var(--surface-3); border-radius: var(--r-pill); padding: 4px; gap: 4px; }
.segmented button, .segmented a { border: 0; background: transparent; padding: 8px 16px; border-radius: var(--r-pill); font: 500 .9rem var(--font); color: var(--text-muted); cursor: pointer; text-decoration: none; }
.segmented .is-active, .segmented [aria-pressed=true] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------------------------------------------------------------------
   Tarjetas, tablas, badges
   --------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.card-body { padding: 20px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-header h2, .card-header h3 { margin: 0; }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--r) var(--r); }

/* position:relative: los .sr-only (absolutos) de una tabla ancha quedan dentro del recorte y no ensanchan la página */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table tr.is-clickable { cursor: pointer; }
.table .actions { text-align: right; white-space: nowrap; }
.table td.num, .table th.num { text-align: right; }
.table tfoot td { font-weight: 600; background: var(--surface-2); border-top: 1px solid var(--border); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: var(--r-pill); font-size: .78rem; font-weight: 500; background: var(--surface-3); color: var(--text-muted); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-brand { background: var(--woka-red-soft); color: var(--woka-red); }
.badge-yellow { background: var(--woka-yellow-soft); color: #6B6320; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--border-strong); background: var(--surface); font-size: .85rem; cursor: pointer; }
.chip.is-active { background: var(--text); color: #fff; border-color: var(--text); }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r); background: var(--info-soft); color: var(--info); border: 1px solid transparent; }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-danger { background: var(--danger-soft); color: var(--danger); }
.alert-ok { background: var(--ok-soft); color: var(--ok); }

/* KPI */
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 18px; }
.stat .stat-label { font-size: .8rem; color: var(--text-muted); font-weight: 500; }
.stat .stat-value { font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 4px; }
.stat .stat-delta { font-size: .8rem; margin-top: 2px; }
.stat .stat-delta.up { color: var(--ok); }
.stat .stat-delta.down { color: var(--danger); }

.empty { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty .icon-lg { color: var(--woka-blue-deep); margin-bottom: 8px; }
.empty h3 { color: var(--text); }

/* La línea base va como sombra interior: la pestaña activa la tapa sin margin-bottom:-1px (que desbordaba y mostraba una barra de scroll vertical) */
.tabs { display: flex; gap: 4px; box-shadow: inset 0 -1px 0 var(--border); margin-bottom: 20px; overflow-x: auto; overflow-y: hidden; }
.tabs a, .tabs button { padding: 10px 16px; border: 0; background: none; font: 500 .92rem var(--font); color: var(--text-muted); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; text-decoration: none; }
.tabs .is-active { color: var(--primary); border-bottom-color: var(--primary); }

.kbd { display: inline-block; padding: 1px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; font: 500 .75rem var(--mono); color: var(--text-muted); background: var(--surface); }

.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--woka-yellow); color: #4A4418; font-weight: 600; font-size: .85rem; flex: none; }

.skeleton { background: linear-gradient(90deg, var(--surface-3), #F8F6EF, var(--surface-3)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--r-sm); min-height: 16px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------------
   Shell de la app (sidebar + topbar)
   --------------------------------------------------------------------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--woka-cream); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 18px 14px;
}
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.sidebar .brand img { height: 34px; }
.sidebar .brand .tagline { font-size: .7rem; color: var(--text-muted); line-height: 1.1; }
.nav-section { margin-bottom: 14px; }
.nav-section-title { font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-soft); padding: 6px 12px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-sm); color: var(--text); font-size: .92rem; font-weight: 500; text-decoration: none !important; }
.nav-link .icon { color: var(--text-muted); }
.nav-link:hover { background: rgba(255,255,255,.6); }
.nav-link.is-active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.nav-link.is-active .icon { color: var(--primary); }
.sidebar-footer { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }

.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 24px; background: rgba(246, 244, 236, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.topbar .menu-toggle { display: none; }
.topbar .spacer { flex: 1; }
.sucursal-select { min-height: 36px; padding: 6px 34px 6px 12px; border-radius: var(--r-pill); font-weight: 500; font-size: .88rem; width: auto; background-color: var(--surface); max-width: min(260px, 50vw); min-width: 0; flex: 0 1 auto; text-overflow: ellipsis; }
.user-menu { display: flex; align-items: center; gap: 10px; }
.user-menu .who { line-height: 1.15; text-align: right; }
.user-menu .who strong { display: block; font-size: .88rem; font-weight: 600; }
.user-menu .who span { font-size: .75rem; color: var(--text-muted); }

.main { padding: 24px; max-width: 1400px; width: 100%; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-header h1 { margin: 0; }
.page-header .subtitle { color: var(--text-muted); margin: 4px 0 0; font-size: .92rem; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .field { min-width: 160px; }

.content { min-width: 0; }

@media (max-width: 1000px) {
  /* minmax(0, 1fr): con 1fr el mínimo es el contenido y una tabla ancha ensanchaba toda la página */
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; width: 280px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(30, 20, 15, .35); z-index: 50; }
  .topbar { padding: 0 14px; }
  .topbar .menu-toggle { display: inline-flex; }
  .main { padding: 16px; }
  .user-menu .who { display: none; }
}

/* ---------------------------------------------------------------------
   Modal, toast, pin pad
   --------------------------------------------------------------------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(30, 20, 15, .45); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); animation: pop .18s ease-out; }
.modal.modal-sm { max-width: 380px; }
.modal.modal-lg { max-width: 760px; }
.modal.modal-xl { max-width: 1040px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-header h2 { margin: 0; font-size: 1.15rem; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }

.toasts { position: fixed; z-index: 200; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r); background: var(--text); color: #fff; box-shadow: var(--shadow-lg); animation: pop .18s ease-out; font-size: .92rem; }
.toast.ok { background: var(--ok); }
.toast.error { background: var(--danger); }
.toast.warn { background: #8A5A00; }

.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pinpad button { min-height: 60px; font: 600 1.4rem var(--font); border-radius: var(--r); border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; }
.pinpad button:active { background: var(--surface-3); }
.pinpad button.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-contrast, #fff); }
.pinpad button.btn-primary:active { background: var(--primary-hover); }
.pin-dots { display: flex; justify-content: center; gap: 12px; margin: 8px 0 18px; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border-strong); }
.pin-dots span.filled { background: var(--primary); border-color: var(--primary); }

/* ---------------------------------------------------------------------
   Páginas "blank" (login, errores, kiosco)
   --------------------------------------------------------------------- */
.blank-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden; background: var(--woka-cream); }
.blank-page::before, .blank-page::after { content: ''; position: absolute; border-radius: 50%; z-index: 0; }
.blank-page::before { width: 520px; height: 520px; right: -160px; top: -180px; background: var(--woka-blue); opacity: .55; }
.blank-page::after { width: 340px; height: 340px; left: -120px; bottom: -120px; background: var(--woka-yellow); opacity: .7; }
.blank-page > * { position: relative; z-index: 1; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 32px; }
.auth-card .logo { display: block; height: 56px; margin: 0 auto 6px; }
.auth-card .tagline { text-align: center; color: var(--text-muted); margin-bottom: 24px; font-size: .9rem; }

/* Impresión genérica */
@media print {
  .sidebar, .topbar, .toolbar, .no-print, .btn { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  body { background: #fff; }
  .card { box-shadow: none; border: 0; }
}

/* ---------------------------------------------------------------------
   Pantalla completa (POS, KDS, llamado) y tema oscuro
   --------------------------------------------------------------------- */
.app-fullscreen { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.app-topbar { height: 56px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--border); }
.app-brand img { height: 32px; }
.app-topbar .spacer { flex: 1; }
.app-topbar-slot { display: flex; align-items: center; gap: 8px; min-width: 0; }
.app-main { flex: 1; min-height: 0; overflow: auto; }
.theme-dark {
  --bg: #161210; --surface: #211B18; --surface-2: #2A2320; --surface-3: #342B27;
  --border: #3A302B; --border-strong: #4D413A; --text: #F5F0EA; --text-muted: #BFB4AA; --text-soft: #8E837A;
  --primary: #C8412C; --primary-hover: #E0533C;
  color-scheme: dark;
}
.theme-dark .app-topbar { background: #1B1614; }
.theme-dark .badge-info { background: #243539; color: #A9C0C6; }

/* ---------------------------------------------------------------------
   Escáner QR (core/scanner.js)
   --------------------------------------------------------------------- */
.scanner { display: flex; flex-direction: column; gap: 12px; }
.scanner-stage { position: relative; width: 100%; aspect-ratio: 4 / 3; background: #1b1614; border-radius: var(--r); overflow: hidden; }
.scanner-stage.is-off { aspect-ratio: 16 / 7; }
.scanner-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner-video.is-mirror { transform: scaleX(-1); }
.scanner-frame { position: absolute; inset: 14% 22%; pointer-events: none; }
.scanner-stage.is-off .scanner-frame { display: none; }
.scanner-frame > span { position: absolute; width: 34px; height: 34px; border: 4px solid var(--woka-yellow); }
.scanner-frame > span:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 14px 0 0 0; }
.scanner-frame > span:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 14px 0 0; }
.scanner-frame > span:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 14px; }
.scanner-frame > span:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 14px 0; }
.scanner-laser { position: absolute; left: 6%; right: 6%; height: 2px; background: var(--woka-red); box-shadow: 0 0 10px var(--woka-red); animation: scanline 1.8s ease-in-out infinite alternate; }
@keyframes scanline { from { top: 8%; } to { top: 92%; } }
.scanner-stage.is-ok { box-shadow: 0 0 0 4px var(--ok); }
.scanner-stage.is-ok .scanner-frame > span { border-color: var(--ok); }
.scanner-hint { text-align: center; margin: 0; }
.scanner-status { text-align: center; font-weight: 500; color: var(--text-muted); min-height: 1.5em; }
.scanner-status.is-error { color: var(--danger); }
.scanner-status.is-ok { color: var(--ok); }
@media (prefers-reduced-motion: reduce) { .scanner-laser { animation: none; top: 50%; } }
