@charset "UTF-8";

/* Tokens copiados del tema de la app (bundle del APK): claro y oscuro. */
:root {
  --background: #0f172a;
  --surface: #1e293b;
  --surface-secondary: #334155;
  --text: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --primary: #f59e0b;
  --primary-light: rgba(245, 158, 11, .1);
  --primary-contrast: #0f172a;
  --accent: #fbbf24;
  --border: #334155;
  --border-light: #1e293b;
  --error: #f87171;
  --error-secondary: rgba(248, 113, 113, .1);
  --success: #4ade80;
  --success-secondary: rgba(74, 222, 128, .1);
  --info: #60a5fa;
  --info-secondary: rgba(96, 165, 250, .1);
  --card: #1e293b;
  --input: #1e293b;
  --input-border: #334155;
  --overlay: rgba(0, 0, 0, .7);
  --divider: #334155;
  --stage: #0b1220;
  --on-primary: #ffffff;
  font-family: Inter, Roboto, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--background);
  font-synthesis: none;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --background: #f8fafc;
  --surface: #ffffff;
  --surface-secondary: #f1f5f9;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --primary-light: #fff7ed;
  --primary-contrast: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --error: #ef4444;
  --error-secondary: #fef2f2;
  --success: #10b981;
  --success-secondary: #ecfdf5;
  --info: #3b82f6;
  --info-secondary: #eff6ff;
  --card: #ffffff;
  --input: #ffffff;
  --input-border: #e2e8f0;
  --overlay: rgba(15, 23, 42, .3);
  --divider: #f1f5f9;
  --stage: #eef2f7;
  --on-primary: #ffffff;
  color-scheme: light;
}

* { box-sizing: border-box }
body { margin: 0; background: var(--stage); color: var(--text) }
button, input, select { font: inherit }
button { cursor: pointer; border: 0; color: inherit; background: none }
button:disabled { cursor: not-allowed }
a { color: inherit; text-decoration: none }
button, a, input { -webkit-tap-highlight-color: transparent; touch-action: manipulation }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px }
img { max-width: 100%; display: block }
[hidden] { display: none !important }

/* ---------- Cáscara del sitio ---------- */
.site-header { height: 80px; max-width: 1320px; margin: auto; display: flex; align-items: center; justify-content: space-between; padding: 0 40px; position: relative }
.brand { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; letter-spacing: -.8px }
.brand-dot { color: var(--primary) }
.site-switch { display: flex; gap: 3px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; position: absolute; left: 50%; transform: translateX(-50%) }
.site-switch a { font-size: 13px; font-weight: 600; padding: 10px 22px; border-radius: 9px; color: var(--text-secondary); white-space: nowrap }
.site-switch a[aria-current] { background: var(--surface-secondary); color: var(--text) }
.demo-pill { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 30px; padding: 6px 10px; color: var(--text-secondary); font-size: 11px; font-weight: 600 }
.demo-pill span, .small-dot { width: 5px; height: 5px; background: var(--primary); border-radius: 100%; display: inline-block }
.stage { padding: 18px 16px 12px; min-height: calc(100dvh - 80px); display: flex; flex-direction: column; align-items: center; justify-content: center }
.stage-caption { font-size: 10px; letter-spacing: .15px; color: var(--text-muted); margin: 19px 0 3px; display: flex; align-items: center; gap: 6px }

/* ---------- Marco del teléfono ---------- */
.device { width: 420px; height: min(860px, calc(100dvh - 146px)); min-height: 640px; background: var(--background); border: 7px solid #252831; border-radius: 42px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 28px 60px -27px rgba(0, 0, 0, .55); position: relative }
.device-status { height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 12px 24px 0; font-size: 11px; font-weight: 600; flex-shrink: 0; color: var(--text) }
.status-right { display: flex; align-items: center; gap: 6px; font-size: 11px }
.status-net { font-size: 9px; font-weight: 700; opacity: .85 }
.status-bars { display: flex; align-items: flex-end; gap: 1.5px; height: 10px }
.status-bars i { width: 2.5px; background: currentColor; border-radius: 1px }
.status-bars i:nth-child(1) { height: 30% } .status-bars i:nth-child(2) { height: 55% }
.status-bars i:nth-child(3) { height: 78% } .status-bars i:nth-child(4) { height: 100% }
.status-battery { width: 9px; height: 15px; border: 1.5px solid currentColor; border-radius: 2px; background: linear-gradient(to top, currentColor 92%, transparent 92%) }
.system-nav { height: 38px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-around; background: var(--surface-secondary); opacity: .55 }
.system-nav span { background: var(--text); opacity: .75 }
.sys-back { width: 0; height: 0; background: none !important; border-right: 9px solid var(--text); border-top: 6px solid transparent; border-bottom: 6px solid transparent }
.sys-home { width: 13px; height: 13px; border-radius: 100% }
.sys-recent { width: 12px; height: 12px; border-radius: 2px }

/* ---------- Barra superior ---------- */
.topbar { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface); flex-shrink: 0 }
.topbar h1 { font-size: 20px; font-weight: 800; letter-spacing: -.3px; margin: 0; flex: 1 }
.topbar-divider { width: 1px; height: 22px; background: var(--border) }
.topbar-button { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--text) }
.topbar-button:hover { background: var(--surface-secondary) }
.topbar-button .icon { width: 26px; height: 26px }
.icon { width: 20px; height: 20px; display: inline-block; flex-shrink: 0; vertical-align: middle }
.caret { width: 12px; height: 8px; color: var(--text-muted); flex-shrink: 0 }

/* ---------- Menú lateral ---------- */
.scrim { position: absolute; inset: 0; background: var(--overlay); z-index: 8 }
.drawer { position: absolute; inset: 0 auto 0 0; width: 78%; background: var(--surface); z-index: 9; padding: 14px 20px 20px; display: flex; flex-direction: column; box-shadow: 8px 0 40px rgba(0, 0, 0, .35) }
.drawer-close { align-self: flex-end; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--text) }
.drawer-close .icon { width: 24px; height: 24px }
.drawer-account { display: flex; align-items: center; gap: 16px; padding: 6px 4px 0 }
.account-avatar { width: 56px; height: 56px; border-radius: 16px; background: var(--surface-secondary); display: grid; place-items: center; color: var(--primary); flex-shrink: 0 }
.account-avatar .icon { width: 28px; height: 28px }
.drawer-account strong { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.4px }
.account-chip { display: inline-block; margin-top: 8px; background: var(--surface-secondary); color: var(--text-secondary); border-radius: 6px; padding: 4px 9px; font-size: 12px; font-weight: 800; letter-spacing: 2px }
.drawer-rule { border: 0; border-top: 1px solid var(--border); margin: 22px 0 }
.drawer-nav { display: flex; flex-direction: column; gap: 6px }
.drawer-nav button { display: flex; align-items: center; gap: 16px; height: 56px; padding: 0 18px; border-radius: 14px; color: var(--text-secondary); font-size: 17px; font-weight: 700 }
.drawer-nav button .icon { width: 24px; height: 24px }
.drawer-nav button:hover { background: var(--surface-secondary) }
.drawer-nav .active { background: var(--primary); color: var(--on-primary) }
.drawer-nav .active:hover { background: var(--accent) }
.drawer-foot { margin-top: auto }
.theme-button { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 auto; height: 54px; padding: 0 28px; border-radius: 999px; background: var(--surface-secondary); color: var(--text); font-size: 16px; font-weight: 800 }
.drawer-version { text-align: center; font-size: 12px; color: var(--text-muted); margin: 12px 0 0 }

/* ---------- Pantalla ---------- */
.screen { padding: 16px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--surface-secondary) transparent; flex: 1; background: var(--background); display: flex; flex-direction: column; gap: 14px }
.screen:focus { outline: none }
.section-label { font-size: 13px; font-weight: 800; letter-spacing: .6px; color: var(--primary); margin: 0 }
.section-label.spaced { margin-top: 2px }
.field-label { font-size: 12px; font-weight: 800; letter-spacing: 1.2px; color: var(--text-secondary); display: block; margin-bottom: 8px }
.empty-hint { font-size: 13px; font-weight: 600; color: var(--text-secondary); opacity: .6; margin: 0 0 0 4px }
.empty-hint.centered { text-align: center; font-size: 15px; padding: 28px 0; opacity: .7; margin: 0 }
.helper-text { font-size: 11px; font-weight: 600; text-align: right; color: var(--text-muted); margin: 2px 0 0 }
.form-error { color: var(--error); font-size: 13px; font-weight: 700; text-align: center; margin: 2px 0 0 }

/* Selector de modo Normal / Rápida */
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 5px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border) }
.mode-switch button { height: 48px; border-radius: 12px; font-size: 16px; font-weight: 800; color: var(--text) }
.mode-switch .active { background: var(--primary); color: var(--on-primary) }

/* Selector de sorteos */
.draw-field { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px }
.draw-field-text { flex: 1; min-width: 0 }
.draw-field-value { display: block; font-size: 16px; font-weight: 700; color: var(--text) }
.draw-field-value.is-empty { color: var(--text-muted); font-weight: 600 }
.draw-field .field-label { margin-bottom: 6px }

/* Formulario normal */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px }
.field input, .add-num-row input { width: 100%; height: 56px; padding: 0 16px; border-radius: 14px; background: var(--input); border: 1.5px solid var(--input-border); color: var(--text); font-size: 17px; font-weight: 700 }
.field input::placeholder, .add-num-row input::placeholder, .amount-input::placeholder { color: var(--text-muted); font-weight: 600 }
.btn-add { width: 100%; height: 60px; border-radius: 14px; background: var(--surface-secondary); color: var(--text); font-size: 16px; font-weight: 800 }
.btn-add:hover { background: var(--border) }
#play-form { display: contents }

/* Modo rápida */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 48px }
.chip { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--primary); background: var(--primary-light); color: var(--primary); border-radius: 14px; padding: 10px 14px; font-size: 16px; font-weight: 900 }
.chip span { font-size: 20px; font-weight: 900; line-height: 1; opacity: .8 }
.add-num-row { display: flex; gap: 12px }
.btn-secondary { height: 56px; padding: 0 20px; border-radius: 14px; background: var(--surface-secondary); color: var(--text); font-size: 16px; font-weight: 800; flex-shrink: 0 }
.btn-secondary:hover { background: var(--border) }
.amounts { display: flex; flex-direction: column; gap: 10px; margin-top: 4px }
.amount-row { display: flex; align-items: center; justify-content: space-between; gap: 12px }
.amount-label { font-size: 15px; font-weight: 800 }
.amount-input { width: 140px; height: 56px; padding: 0 16px; border-radius: 14px; background: var(--input); border: 1.5px solid var(--input-border); color: var(--text); text-align: right; font-size: 18px; font-weight: 900 }
.preview-card { margin-top: 2px; padding: 24px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border) }
.preview-title { display: block; font-size: 13px; font-weight: 700; letter-spacing: .8px; color: var(--text-secondary); margin-bottom: 10px }
.preview-counts { font-size: 16px; font-weight: 800; margin: 0 0 6px }
.preview-total { font-size: 14px; font-weight: 600; color: var(--text-secondary); margin: 0 }
.preview-divider { border: 0; height: 1.5px; background: var(--divider); opacity: .5; margin: 16px 0 }
.preview-cost { font-size: 32px; font-weight: 900; letter-spacing: -.8px; color: var(--primary) }
.btn-submit { width: 100%; height: 60px; border-radius: 16px; background: var(--primary); color: var(--primary-contrast); font-size: 17px; font-weight: 800; box-shadow: 0 8px 24px -8px var(--primary) }
.btn-submit:hover { background: var(--accent) }

/* Lista de jugadas del ticket */
.plays { display: flex; flex-direction: column }
.play-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--divider) }
.play-info { flex: 1; min-width: 0 }
.play-info strong { font-size: 17px; font-weight: 800; letter-spacing: .5px; font-variant-numeric: tabular-nums }
.play-info small { display: block; font-size: 12px; color: var(--text-secondary); margin-top: 4px }
.play-price { font-size: 14px; font-weight: 800; white-space: nowrap }
.play-remove { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--text-muted) }
.play-remove:hover { background: var(--error-secondary); color: var(--error) }
.play-remove .icon { width: 16px; height: 16px }

/* Barra de emisión */
.checkout { flex-shrink: 0; padding: 14px 16px; border-top: 1px solid var(--border); background: var(--surface) }
.checkout-total { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-secondary); margin-bottom: 12px }
.checkout-total strong { color: var(--text); font-size: 22px; font-weight: 800; letter-spacing: -.5px }
.primary { min-height: 52px; background: var(--primary); color: var(--primary-contrast); border-radius: 14px; font-size: 15px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; padding: 12px 16px }
.primary:hover:not(:disabled) { background: var(--accent) }
.primary:disabled { background: var(--surface-secondary); color: var(--text-muted) }
.primary .icon { width: 17px; height: 17px }

/* ---------- Historial ----------
   Medidas del StyleSheet de la pantalla en el APK. */
.history-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 8px 4px 0 }
.history-date { flex: 1; min-width: 0 }
.history-label { display: block; font-size: 13px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 10px }
.date-field { display: flex; align-items: center; gap: 12px; width: 100%; background: var(--surface-secondary); border-radius: 16px; padding: 14px 16px; color: var(--text) }
.date-field .icon:first-child { color: var(--primary); width: 22px; height: 22px }
.date-field .icon:last-child { color: var(--text-secondary); width: 18px; height: 18px; margin-left: auto }
.date-value { font-size: 18px; font-weight: 800; letter-spacing: -.2px }
.date-wrap { position: relative }
.date-input { position: absolute; left: 16px; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none }
.history-total { text-align: right; flex-shrink: 0 }
.history-total-label { display: block; font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 6px }
.history-total-value { font-size: 18px; font-weight: 900 }
.history-search { width: 100%; height: 48px; border-radius: 12px; font-size: 14px; padding: 0 16px; background: var(--surface); border: 1px solid var(--border); color: var(--text) }
.spaced-top { margin-top: 12px }
.history-search::placeholder { color: var(--text-muted) }
.history-tabs { display: flex; border-radius: 12px; padding: 4px; background: var(--surface-secondary); gap: 4px }
.history-tabs button { flex: 1; padding: 10px 6px; border-radius: 10px; font-size: 13px; font-weight: 800; color: var(--text-secondary) }
.history-tabs .active { background: var(--primary); color: var(--on-primary) }
.history-list { padding-bottom: 24px }
.history-card { display: block; width: 100%; text-align: left; margin-bottom: 12px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border) }
.history-card:hover { border-color: var(--primary) }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px }
.ticket-number { font-size: 15px; font-weight: 900; letter-spacing: .5px }
.card-bottom { display: flex; justify-content: space-between; align-items: flex-end }
.jugadas-count { display: block; font-size: 12px; font-weight: 700; color: var(--text-secondary) }
.hora { display: block; font-size: 11px; font-weight: 600; margin-top: 2px; color: var(--text-muted) }
.monto { font-size: 18px; font-weight: 900 }
.pill { border-radius: 999px; padding: 7px 16px; font-size: 12px; font-weight: 800; letter-spacing: .5px }
.pill-activo { border: 1.5px solid var(--info); color: var(--info) }
.pill-expirado, .pill-anulado { background: var(--surface-secondary); color: var(--text-muted) }
.history-empty { text-align: center; padding-top: 80px; font-size: 15px; font-weight: 800; color: var(--text-secondary) }

/* ---------- Resultados, ganadores ---------- */
.stats-card { padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center }
.stats-card small { font-size: 11px; color: var(--text-secondary); display: block; margin-bottom: 7px }
.stats-card strong { font-size: 22px; font-weight: 800; letter-spacing: -.5px }
.stats-card .stats-count { text-align: right }
.stats-count strong { font-size: 19px }
.search { position: relative }
.search .icon { position: absolute; top: 18px; left: 16px; width: 18px; height: 18px; color: var(--text-muted) }
.search input { width: 100%; height: 54px; padding: 0 14px 0 44px; border: 1.5px solid var(--input-border); background: var(--input); color: var(--text); border-radius: 14px; font-size: 14px }
.filters { display: flex; gap: 8px; flex-wrap: wrap }
.filters button { font-size: 13px; font-weight: 700; padding: 10px 16px; border-radius: 10px; background: var(--surface); color: var(--text-secondary); border: 1px solid var(--border) }
.filters .active { background: var(--primary); color: var(--on-primary); border-color: var(--primary) }
.ticket-card { width: 100%; text-align: left; border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-bottom: 10px; background: var(--surface); display: block }
.ticket-card:hover { border-color: var(--primary) }
.ticket-card-top, .ticket-card-bottom { display: flex; justify-content: space-between; align-items: center }
.ticket-card-top strong { font-size: 14px; font-weight: 800 }
.ticket-card-bottom { margin-top: 12px; font-size: 12px; color: var(--text-secondary) }
.ticket-card-bottom strong { font-size: 14px; color: var(--text) }
.badge { font-size: 11px; font-weight: 700; border-radius: 6px; padding: 5px 8px }
.badge-activo { background: var(--info-secondary); color: var(--info) }
.badge-ganador { background: var(--primary-light); color: var(--primary) }
.badge-pagado { background: var(--success-secondary); color: var(--success) }
.badge-anulado { background: var(--error-secondary); color: var(--error) }
.sample-note { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary) }
.result-card { border: 1px solid var(--border); background: var(--surface); border-radius: 16px; padding: 16px; margin-bottom: 12px }
.result-top { display: flex; align-items: center; gap: 12px }
.lottery-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-secondary) }
.lottery-icon img { width: 30px; height: 30px; object-fit: contain }
.draw-name { display: block; font-size: 15px; font-weight: 700 }
.draw-time { display: block; font-size: 12px; color: var(--text-secondary); margin-top: 2px }
.result-balls { display: flex; justify-content: space-around; padding-top: 16px; margin-top: 15px; border-top: 1px solid var(--divider) }
.ball-column { text-align: center }
.ball-column strong { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-secondary); font-size: 22px; font-weight: 800; letter-spacing: -.5px }
.ball-column:first-child strong { background: var(--primary); color: var(--primary-contrast) }
.ball-column small { font-size: 10px; color: var(--text-muted); display: block; margin-top: 7px }
/* ---------- Ganadores ----------
   Medidas del StyleSheet de la pantalla en el APK. */
.date-header { margin: 4px 4px 0 }
.date-title { display: block; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 15px }
.search-bar { display: flex; align-items: center; height: 44px; padding: 0 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); margin-top: 12px }
.search-bar .icon { width: 20px; height: 20px; color: var(--text-muted); flex-shrink: 0 }
.search-bar input { flex: 1; min-width: 0; margin-left: 10px; font-size: 15px; font-weight: 600; background: none; border: 0; color: var(--text) }
.search-bar input::placeholder { color: var(--text-muted); font-weight: 600 }
.winners-list { padding-top: 8px }
.winner-card { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; padding: 16px; margin-bottom: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border) }
.winner-card:hover { border-color: var(--success) }
.winner-number { font-size: 16px; font-weight: 800; font-family: ui-monospace, "Roboto Mono", monospace }
.winner-hora { display: block; font-size: 12px; margin-top: 4px; color: var(--text-muted) }
.card-right { display: flex; flex-direction: column; align-items: flex-end }
.winner-monto { display: block; font-size: 18px; font-weight: 900; margin-bottom: 4px; color: var(--success) }
.pill-ganador { border: 1.5px solid var(--success); color: var(--success) }
.pill-pagado { background: var(--surface-secondary); color: var(--text-muted) }
.winners-empty { text-align: center; padding-top: 60px; font-size: 14px; font-weight: 600; color: var(--text-muted) }

/* ---------- Configuración ----------
   Medidas del StyleSheet de la pantalla en el APK. */
.config-screen { display: flex; flex-direction: column }
.config-title { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; margin: 0 4px 20px; color: var(--text-secondary) }
.config-section { margin-bottom: 24px }
.section-label-sm { display: block; font-size: 10px; font-weight: 800; letter-spacing: .8px; margin: 0 0 10px 4px; color: var(--text-secondary) }
.config-card { padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border) }
.printer-header { display: flex; justify-content: space-between; align-items: flex-start }
.card-title { font-size: 17px; font-weight: 700 }
.indicator { width: 10px; height: 10px; border-radius: 5px; margin-top: 6px; background: #10b981; flex-shrink: 0 }
.card-sub { font-size: 14px; margin: 6px 0 20px; color: var(--text-secondary) }
.btn-action { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 56px; border-radius: 14px; background: var(--surface-secondary); color: var(--text); font-size: 17px; font-weight: 700 }
.btn-action:hover { background: var(--border) }
.btn-action .icon { width: 17px; height: 17px }
.btn-action.demo-only { font-size: 14px; height: 48px; color: var(--text-secondary) }
.disconnect-btn { display: flex; justify-content: center; width: 100%; margin-top: 16px; padding: 8px }
.disconnect-text { font-size: 13px; font-weight: 600; text-decoration: underline; color: var(--text-secondary) }
.data-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border) }
.data-row:last-child { border-bottom: 0 }
.data-label { font-size: 14px; font-weight: 600; color: var(--text-secondary) }
.data-value { font-size: 15px; font-weight: 700 }
.config-info { margin-top: 48px; text-align: center; padding-bottom: 24px }
.config-info p { font-size: 12px; line-height: 18px; color: var(--text-muted); margin: 0 }

/* ---------- Reportes (reporte diario) ---------- */
.report-label { display: block; font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-secondary); margin: 4px 4px -4px }
.day-buttons { display: flex; justify-content: space-between; gap: 10px }
.day-buttons button { padding: 13px 22px; border-radius: 12px; background: var(--surface-secondary); color: var(--text); font-size: 15px; font-weight: 700 }
.day-buttons button:hover { background: var(--border) }
.report-note { font-size: 13px; color: var(--text-muted); margin: -4px 4px 0 }
.details-card { padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border) }
.details-title { display: block; font-size: 15px; font-weight: 800; letter-spacing: 1px; margin-bottom: 8px }
.report-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0 }
.row-label { font-size: 16px; font-weight: 700 }
.row-value { font-size: 16px; font-weight: 700; white-space: nowrap }
.row-divider { border: 0; height: 1px; background: var(--divider); opacity: .4; margin: 0 }
.total-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--border) }
.total-label { font-size: 21px; font-weight: 800 }
.total-value { font-size: 22px; font-weight: 900; color: var(--primary); white-space: nowrap }
.total-note { font-size: 13px; color: var(--text-muted); margin: 8px 0 0 }
.sales-section { margin-top: 4px; padding: 0 4px 16px }
.sales-title { display: block; font-size: 15px; font-weight: 800; letter-spacing: 1px }
.sales-subtitle { font-size: 14px; color: var(--text-secondary); margin: 8px 0 0 }
.sales-list { margin-top: 18px }
.sales-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--divider) }
.sales-row:last-child { border-bottom: 0 }
.sales-name { font-size: 15px; font-weight: 700 }
.sales-amount { font-size: 15px; font-weight: 800; white-space: nowrap }
.sales-empty { font-size: 15px; color: var(--text-muted); margin: 22px 0 0 }

/* ---------- Modales, recibo, aviso ---------- */
dialog { border: 1px solid var(--border); padding: 0; border-radius: 22px; width: 400px; max-width: calc(100vw - 30px); max-height: 90dvh; background: var(--surface); color: var(--text); box-shadow: 0 20px 100px rgba(0, 0, 0, .5) }
dialog::backdrop { background: var(--overlay); backdrop-filter: blur(5px) }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border) }
.modal-head h2 { font-size: 16px; font-weight: 800; margin: 0; letter-spacing: -.3px }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--text-secondary) }
.icon-button:hover { background: var(--surface-secondary) }
.modal-body { padding: 20px }
.modal-body p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin: 0 0 20px }
.modal-hint { font-size: 13px !important; margin-bottom: 14px !important }
.modal-actions { display: flex; gap: 8px; margin-top: 20px }
.secondary { width: 100%; border-radius: 12px; background: var(--surface-secondary); color: var(--text); min-height: 48px; font-size: 14px; font-weight: 700; padding: 11px 13px; display: flex; gap: 8px; align-items: center; justify-content: center }
.secondary:hover { background: var(--border) }
.secondary .icon { width: 16px; height: 16px }
.danger { color: var(--error); background: var(--error-secondary) }
.draw-option { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface); border: 1.5px solid var(--border); border-radius: 14px; padding: 12px 14px; margin-bottom: 9px }
.draw-option > span:nth-child(2) { flex: 1 }
.draw-option.selected { border-color: var(--primary); background: var(--primary-light) }
.draw-check { width: 22px; color: var(--primary) }
.draw-check .icon { width: 20px; height: 20px }
.settings-row { padding: 14px 0; display: flex; justify-content: space-between; font-size: 13px; border-bottom: 1px solid var(--border); color: var(--text-secondary) }
.settings-row strong { font-weight: 700; color: var(--text) }
.receipt { padding: 22px; background: var(--surface) }
.receipt-brand { text-align: center; border-bottom: 1px dashed var(--border); padding-bottom: 20px }
.receipt-brand img { width: 36px; height: 36px; margin: 0 auto 9px }
.receipt-brand h3 { margin: 0; font-size: 18px; letter-spacing: -.5px }
.receipt-brand p { font-size: 11px; color: var(--text-secondary); margin: 7px 0 }
.receipt-id { text-align: center; font-family: ui-monospace, monospace; font-size: 15px; margin: 17px 0 8px }
.receipt-date { text-align: center; font-size: 11px; color: var(--text-secondary); margin: 0 0 18px }
.receipt-status { display: flex; justify-content: center; margin-bottom: 15px }
.receipt-lines { border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border); margin: 16px 0; padding: 4px 0 }
.receipt-lines .play-row:last-child { border-bottom: 0 }
.receipt-total { display: flex; justify-content: space-between; font-size: 16px; font-weight: 800; margin: 16px 0 }
.receipt-prize { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; color: var(--primary); background: var(--primary-light); padding: 12px; border-radius: 10px }
.receipt-disclaimer { text-align: center; font-size: 10px; letter-spacing: 1px; color: var(--text-muted); border: 1px solid var(--border); padding: 9px; margin-top: 20px }
.receipt-actions { padding: 0 20px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px }
.receipt-actions .full { grid-column: 1 / -1 }
.lightbox { width: min(1500px, 95vw); max-height: 94dvh }
.lightbox .modal-body { padding: 5px }
.lightbox img { width: 100%; height: auto }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 15px); opacity: 0; pointer-events: none; background: var(--surface-secondary); color: var(--text); border: 1px solid var(--border); padding: 13px 21px; border-radius: 12px; font-size: 13px; z-index: 20; box-shadow: 0 5px 20px rgba(0, 0, 0, .3); transition: opacity .2s, transform .2s; max-width: 90vw; text-align: center }
#toast.show { opacity: 1; transform: translate(-50%, 0) }

/* ---------- Galería del panel ---------- */
.panel-view { max-width: 1200px; margin: 50px auto 60px; padding: 0 36px }
.gallery-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 25px }
.eyebrow { font-size: 10px; letter-spacing: 1.5px; color: var(--text-muted); font-weight: 700 }
.gallery-heading h1 { font-size: 30px; letter-spacing: -1px; margin: 10px 0 0 }
.text-link { font-size: 12px; color: var(--primary) }
.gallery-tabs { display: flex; gap: 7px; margin-bottom: 18px }
.gallery-tabs button { padding: 11px 18px; font-size: 12px; font-weight: 600; color: var(--text-secondary); border-radius: 9px }
.gallery-tabs .active { background: var(--surface); color: var(--text) }
.gallery-image { position: relative; padding: 0; width: 100%; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--border) }
.gallery-image img { width: 100%; height: auto }
.zoom-hint { position: absolute; right: 15px; bottom: 15px; background: var(--surface); border: 1px solid var(--border); padding: 9px 13px; border-radius: 7px; font-size: 11px; color: var(--text-secondary) }
.gallery-footer { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-top: 15px }

@media (max-width: 600px) {
  .site-header { height: 62px; padding: 0 16px; border-bottom: 1px solid var(--border); background: var(--background) }
  .brand { font-size: 18px; gap: 7px }
  .brand img { width: 28px; height: 28px }
  .site-switch { position: static; transform: none; padding: 3px; border-radius: 9px }
  .site-switch a { font-size: 11px; padding: 9px 12px }
  .demo-pill { display: none }
  .stage { padding: 0; min-height: 0 }
  .device { width: 100%; height: calc(100dvh - 62px); min-height: 0; max-width: 520px; border: 0; border-radius: 0; box-shadow: none }
  .device-status, .system-nav { display: none }
  .stage-caption { display: none }
  .panel-view { margin: 28px auto; padding: 0 18px }
  .gallery-heading { display: block }
  .gallery-heading h1 { font-size: 24px }
  .gallery-heading .text-link { display: inline-block; margin-top: 14px }
  .gallery-tabs button { font-size: 11px; padding: 10px 13px }
  .lightbox .modal-body { overflow: auto }
  .lightbox img { min-width: 900px }
  #toast { bottom: 90px }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important } }

@media print {
  @page { size: 80mm auto; margin: 4mm }
  body { background: white }
  body > *:not(dialog) { display: none !important }
  dialog[open] { position: static; width: 100%; max-width: none; max-height: none; border: 0; box-shadow: none; margin: 0; padding: 0; overflow: visible; background: white; color: black }
  dialog::backdrop { display: none }
  .modal-head, .receipt-actions { display: none !important }
  .receipt { padding: 0; background: white; color: black }
  .receipt-brand img { width: 25px }
  .receipt-lines { break-inside: avoid }
  .receipt-brand p, .receipt-date, .receipt-disclaimer, .play-info small { color: #333 }
  body:has(dialog:not([open])) { display: none }
}
