/* Financial OS · tema oscuro único estilo fintech.
   Escritorio: barra lateral fija + contenido en grilla. Celular: encabezado + barra inferior con botón central. */
:root {
  color-scheme: dark;
  --bg: #0a0a0c; --surface: #131316; --surface-2: #1b1b1f; --line: #27272c; --line-soft: #1f1f24;
  --text: #f2f2f4; --muted: #a1a1ab; --faint: #6c6c77;
  --accent: #34d399; --accent-soft: rgba(52, 211, 153, .12); --accent-ink: #04261b;
  --warn: #f5a524; --warn-soft: rgba(245, 165, 36, .12);
  --danger: #f87171; --danger-soft: rgba(248, 113, 113, .12);
  --info: #60a5fa; --info-soft: rgba(96, 165, 250, .12);
  --f-display: 'Sora', 'Manrope', system-ui, sans-serif;
  --f-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r: 14px;
}
* { box-sizing: border-box }
html, body { height: 100% }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--f-body); font-size: 14px; line-height: 1.5; -webkit-tap-highlight-color: transparent; font-variant-numeric: tabular-nums; padding-top: env(safe-area-inset-top, 0px) }
button, input, select { font: inherit; color: inherit }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit }
button:disabled { opacity: .5; cursor: default }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px }
[hidden] { display: none !important }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none }
.ic.sm { width: 15px; height: 15px }
.pos { color: var(--accent) } .neg { color: var(--danger) } .warn { color: var(--warn) } .info { color: var(--info) } .muted { color: var(--muted) }

/* Estructura */
.app { display: grid; grid-template-columns: 1fr; min-height: 100% }
@media (min-width: 900px) { .app { grid-template-columns: 248px 1fr } }
.side { display: none }
@media (min-width: 900px) {
  .side { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; padding: 22px 16px; border-right: 1px solid var(--line-soft); background: var(--surface) }
}
.brand, .marca { display: flex; align-items: center; gap: 10px; padding: 0 6px }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-family: var(--f-display); font-weight: 700; font-size: 13px; flex: none }
.brand-mark.grande { width: 52px; height: 52px; font-size: 18px; border-radius: 14px }
.brand b, .marca b { font-family: var(--f-display); font-size: 14px; display: block; letter-spacing: -.01em }
.marca b { font-size: 18px }
.brand small, .marca small { color: var(--faint); font-size: 11.5px }
.user { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--bg) }
.user > div:not(.avatar) { flex: 1; min-width: 0 }
.user b { font-size: 13px; display: block }
.user small { color: var(--faint); font-size: 11px }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none }
.nav { display: flex; flex-direction: column; gap: 2px }
.nav button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-size: 13px; font-weight: 600 }
.nav button:hover { background: var(--surface-2); color: var(--text) }
.nav button[aria-current] { background: var(--surface-2); color: var(--accent) }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border-radius: 12px; font-weight: 700; font-size: 13px; border: 1px solid var(--line); background: var(--surface-2); transition: background .15s; text-align: center }
.btn:hover { background: #232329 }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent }
.btn.primary:hover { background: #4ade9f }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted) }
.btn.ghost:hover { color: var(--text); background: var(--surface-2) }
.btn.peligro { background: var(--danger); color: #2a0606; border-color: transparent }
.btn.block { width: 100% }
.btn.sm { padding: 7px 11px; font-size: 12px; border-radius: 10px }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); background: var(--surface); flex: none }
.icon-btn:hover { color: var(--text) }
.icon-btn.chico { width: 30px; height: 30px }
.link { font-size: 12px; font-weight: 700; color: var(--accent) }
.link.info { color: var(--info) } .link.muted { color: var(--muted) }
.acciones-h { display: flex; gap: 14px; align-items: center }

.main { min-width: 0; display: flex; flex-direction: column }
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(10, 10, 12, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line-soft); padding-block: 12px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; align-items: center; gap: 10px }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 25; background: var(--bg) }
.topbar .t { flex: 1; min-width: 0 }
.topbar h1 { margin: 0; font-family: var(--f-display); font-size: 16px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.topbar p { margin: 0; color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.m-only { display: grid }
.d-only { display: none }
@media (min-width: 900px) { .topbar { padding-block: 18px; padding-left: 32px; padding-right: 32px } .topbar h1 { font-size: 19px } .m-only { display: none } .d-only { display: inline-flex } }
.sync-pill { font-size: 11px; font-weight: 700; color: var(--warn); background: var(--warn-soft); border-radius: 99px; padding: 4px 9px; white-space: nowrap }

.content { width: 100%; max-width: 1180px; margin: 0 auto; padding-block: 18px 120px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 16px }
@media (min-width: 900px) { .content { padding-block: 28px 48px; padding-left: 32px; padding-right: 32px; gap: 18px } }

.panel { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0 }
@media (min-width: 700px) { .panel { padding: 18px } }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px }
.panel-h.wrap { flex-wrap: wrap }
.panel-h.sep { margin-top: 10px }
.panel-h h2 { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px }
.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) }
@media (min-width: 1000px) { .grid.two { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr) } .grid.half { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0 }
.hint { font-size: 12px; color: var(--faint); margin: 0 }
.hint.warn { color: var(--warn) }
.empty { color: var(--faint); font-size: 12.5px; padding: 8px 0; margin: 0 }
.l { font-size: 11.5px; font-weight: 700; color: var(--muted) }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60% }

/* Saldo principal */
.hero { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) }
@media (min-width: 700px) { .hero { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) } }
.balance { background: linear-gradient(160deg, #10231c 0%, var(--surface) 55%); border: 1px solid #1c3a2f; border-radius: 18px; padding: 20px }
.lbl { color: var(--muted); font-size: 12.5px; font-weight: 600 }
.balance .big { font-family: var(--f-display); font-weight: 600; font-size: clamp(30px, 7vw, 42px); letter-spacing: -.02em; margin: 8px 0 4px; line-height: 1.1 }
.balance .sub { color: var(--faint); font-size: 12px }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px }
.split > div { background: rgba(10, 10, 12, .5); border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px 12px; min-width: 0 }
.split small { display: block; color: var(--faint); font-size: 11px }
.split-btn { background: rgba(10, 10, 12, .5); border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px 12px; min-width: 0; text-align: left; transition: border-color .15s }
.split-btn:hover, .split-btn:focus-visible { border-color: var(--line) }
.split b { font-size: 15px; display: block }
.payday { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start }
.payday .days { font-family: var(--f-display); font-size: 38px; font-weight: 600; line-height: 1 }
.payday .days span { font-size: 14px; color: var(--muted); font-family: var(--f-body); font-weight: 600; margin-left: 6px }
.payday p { margin: 0; color: var(--muted); font-size: 12.5px }
.payday .track { width: 100% }
.track { height: 6px; border-radius: 9px; background: var(--bg); overflow: hidden; border: 1px solid var(--line-soft); width: 100% }
.track i { display: block; height: 100%; background: var(--accent); border-radius: 9px; transition: width .4s }
.track.warn i { background: var(--warn) } .track.danger i { background: var(--danger) }

/* Alertas */
.alerts { display: flex; flex-direction: column; gap: 8px }
.alert { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--surface); font-size: 13px }
.alert .dot { width: 8px; height: 8px; border-radius: 50%; flex: none }
.alert span { flex: 1; min-width: 0 }
.alert button { font-weight: 700; font-size: 12px; white-space: nowrap }
.alert.warn { border-color: rgba(245, 165, 36, .3) } .alert.warn .dot { background: var(--warn) } .alert.warn button { color: var(--warn) }
.alert.info { border-color: rgba(96, 165, 250, .3) } .alert.info .dot { background: var(--info) } .alert.info button { color: var(--info) }
.alert.ok { border-color: rgba(52, 211, 153, .3) } .alert.ok .dot { background: var(--accent) } .alert.ok button { color: var(--accent) }
.alert.danger { border-color: rgba(248, 113, 113, .35) } .alert.danger .dot { background: var(--danger) } .alert.danger button { color: var(--danger) }

/* Cuentas */
.accounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px }
@media (min-width: 700px) { .accounts { grid-template-columns: repeat(4, minmax(0, 1fr)) } }
.acc { background: var(--bg); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0 }
.acc:hover { border-color: var(--line) }
.acc .tag { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--muted) }
.chip-dot { width: 8px; height: 8px; border-radius: 3px; flex: none; display: inline-block }
.acc b { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis }
.acc small { color: var(--faint); font-size: 11px }

/* Filas */
.rows { display: flex; flex-direction: column }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); width: 100%; min-width: 0 }
.row:last-child { border-bottom: 0 }
button.row:hover .txt b { color: var(--accent) }
.row .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none }
.row .ico.in { color: var(--accent); background: var(--accent-soft) }
.row .ico.mv { color: var(--info); background: var(--info-soft) }
.row .txt { flex: 1; min-width: 0; display: block }
.row .txt b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.row .txt small { color: var(--faint); font-size: 11.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.amt { font-weight: 700; font-size: 13.5px; white-space: nowrap }
.amt.in { color: var(--accent) } .amt.mv { color: var(--info) }
.dia { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 14px 0 2px }
.dia:first-child { padding-top: 4px }

.check { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); width: 100% }
.check:last-child { border-bottom: 0 }
.box { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line); display: grid; place-items: center; flex: none; color: transparent }
.check.done .box { background: var(--accent); border-color: var(--accent); color: var(--accent-ink) }
.check.done .txt b { color: var(--faint); text-decoration: line-through }
.check .txt { flex: 1; min-width: 0 }
.check .txt b { display: block; font-size: 13.5px; font-weight: 600 }
.check .txt small { color: var(--faint); font-size: 11.5px }
.check .amt { font-size: 13px }
.badge { font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; align-self: flex-start }
.panel-h .badge, .row .badge, .check .badge { align-self: center }
.badge.warn { background: var(--warn-soft); color: var(--warn) } .badge.ok { background: var(--accent-soft); color: var(--accent) }
.badge.info { background: var(--info-soft); color: var(--info) } .badge.danger { background: var(--danger-soft); color: var(--danger) }

.bud { display: flex; flex-direction: column; gap: 6px; padding: 6px 0 }
.bud .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px }
.bud .top b { font-weight: 600 }
.bud .top > span { color: var(--faint); font-size: 12px; text-align: right }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; width: 100% }
.kv:last-of-type { border-bottom: 0 }
.kv span { color: var(--muted); display: flex; align-items: center; gap: 8px }
.kv b { font-weight: 700; text-align: right }
.kv-btn:hover b { text-decoration: underline }
.figure { font-family: var(--f-display); font-size: 28px; font-weight: 600; letter-spacing: -.02em }
.dos-botones { display: grid; grid-template-columns: 1fr 1fr; gap: 8px }

.seg { display: flex; gap: 6px; flex-wrap: wrap }
.seg button { padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted) }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text) }

/* Barra inferior */
.bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(10, 10, 12, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line-soft); padding-top: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px)); display: grid; grid-template-columns: repeat(5, 1fr); align-items: end }
@media (min-width: 900px) { .bnav { display: none } }
.bnav button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; color: var(--faint) }
.bnav button[aria-current] { color: var(--accent) }
.bnav .fab { width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; margin: -24px auto 0; border: 4px solid var(--bg); box-shadow: 0 8px 24px rgba(52, 211, 153, .25) }
.fab .ic { width: 24px; height: 24px; stroke-width: 2.4 }

/* Hojas modales */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .62); backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center }
@media (min-width: 700px) { .scrim { align-items: center; padding: 24px } }
.sheet { width: 100%; max-width: 460px; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border: 1px solid var(--line); border-radius: 22px 22px 0 0; padding: 18px 18px calc(22px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; animation: subir .22s cubic-bezier(.16, 1, .3, 1) }
@media (min-width: 700px) { .sheet { border-radius: 20px; padding-bottom: 22px } }
@keyframes subir { from { transform: translateY(24px); opacity: .4 } to { transform: none; opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none } .track i { transition: none } }
.sheet-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px }
.sheet-h h3 { margin: 0 0 2px; font-family: var(--f-display); font-size: 16px; font-weight: 600 }
.field { display: flex; flex-direction: column; gap: 6px }
.field label, .field .l { font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .02em }
.input { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; font-size: 16px }
.input:focus { outline: none; border-color: var(--accent) }
.input[readonly] { color: var(--faint) }
input[type=date].input { min-height: 46px }
.money { font-family: var(--f-display); font-size: 26px; font-weight: 600; padding: 12px 14px }
.pin { letter-spacing: .6em; font-size: 22px; text-align: center }
.chips { display: flex; flex-wrap: wrap; gap: 6px }
.chips button { padding: 7px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 12.5px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px }
.chips button[aria-pressed="true"] { border-color: var(--accent); color: var(--text); background: var(--accent-soft) }
.chips button.apagada { opacity: .45; text-decoration: line-through }
.tabs3 { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 3px }
.tabs3.dos { grid-template-columns: 1fr 1fr }
.tabs3 button { padding: 8px; border-radius: 9px; font-size: 12.5px; font-weight: 700; color: var(--muted); text-align: center }
.tabs3 button[aria-pressed="true"] { background: var(--surface-2); color: var(--text) }
.calc { background: var(--bg); border: 1px dashed var(--line); border-radius: 12px; padding: 12px; font-size: 12.5px; display: flex; flex-direction: column; gap: 6px }
.calc div { display: flex; justify-content: space-between; gap: 10px }
.calc span { color: var(--muted) }
.calc b { text-align: right; overflow-wrap: anywhere }
.rapido { display: flex; gap: 8px }
.rapido .input { flex: 1; min-width: 0; font-size: 14px }
.mas summary { cursor: pointer; font-size: 12px; font-weight: 700; color: var(--muted); padding: 2px 0 8px }
.confirmar .si.opciones { flex-direction: column; align-items: stretch; text-align: left }
.confirmar .si { display: flex; align-items: center; gap: 10px; justify-content: space-between; background: var(--danger-soft); border-radius: 12px; padding: 10px 12px; font-size: 12.5px }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 80; background: var(--text); color: var(--bg); font-weight: 700; font-size: 13px; padding: 10px 16px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); max-width: calc(100vw - 32px); width: max-content; text-align: center }
.toast.error { background: var(--danger); color: #2a0606 }
.toast.info { background: var(--surface-2); color: var(--text); border: 1px solid var(--line) }
@media (min-width: 900px) { .toast { bottom: 28px } }

.tgl { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft) }
.tgl:last-of-type { border-bottom: 0 }
.tgl b { display: block; font-size: 13.5px; font-weight: 600 }
.tgl small { color: var(--faint); font-size: 11.5px }
.switch { width: 42px; height: 24px; border-radius: 99px; background: var(--line); position: relative; flex: none; transition: background .15s }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text); transition: transform .15s }
.switch[aria-checked="true"] { background: var(--accent) }
.switch[aria-checked="true"]::after { transform: translateX(18px); background: var(--accent-ink) }
.pasos { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 12px; font-size: 13px; color: var(--muted) }
.codigo { display: flex; align-items: center; gap: 8px; margin-top: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px }
.codigo code { flex: 1; font-size: 15px; color: var(--text); user-select: all }

/* Informes */
.periodo { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between }
.nav-periodo { display: flex; align-items: center; gap: 12px }
.nav-periodo b { font-family: var(--f-display); font-size: 15px; min-width: 130px; text-align: center }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)) }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)) } }
.kpi { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 14px; min-width: 0 }
.kpi small { color: var(--faint); font-size: 11.5px; display: block }
.kpi b { font-family: var(--f-display); font-size: 19px; font-weight: 600; display: block; margin: 4px 0 2px; overflow: hidden; text-overflow: ellipsis }
.kpi span { font-size: 11.5px; color: var(--muted) }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 180px; border-bottom: 1px solid var(--line); overflow-x: auto }
.bars .g { flex: 1; min-width: 26px; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end }
.bars .pair { display: flex; align-items: flex-end; gap: 3px; height: 100%; width: 100%; justify-content: center }
.bars .pair i { display: block; width: 40%; max-width: 16px; border-radius: 4px 4px 0 0; min-height: 1px }
.bars .pair i.a { background: var(--accent) } .bars .pair i.b { background: var(--muted); opacity: .55 }
.bars small { color: var(--faint); font-size: 10.5px; padding-bottom: 4px }
.legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted) }
.legend span { display: inline-flex; align-items: center; gap: 6px }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block }
.lg-a { background: var(--accent) } .lg-b { background: var(--muted); opacity: .55 }

/* Acceso, carga y bloqueo */
.cargando { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--muted); padding: 24px; text-align: center }
.acceso { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding-block: 32px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)) }
.tarjeta-acceso { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 14px }
.tarjeta-acceso.ancha { max-width: 560px }
.tarjeta-acceso h1 { margin: 0; font-family: var(--f-display); font-size: 20px; font-weight: 600 }
.grid-campos { display: grid; gap: 12px; grid-template-columns: 1fr }
@media (min-width: 520px) { .grid-campos { grid-template-columns: 1fr 1fr } }
.grid-campos .money { font-size: 20px }
.error { color: var(--danger); font-size: 12.5px; margin: 0; min-height: 1em }
#bloqueo { position: fixed; inset: 0; z-index: 90 }
.lock { position: absolute; inset: 0; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px }
.lock-t { text-align: center }
.lock-t b { font-family: var(--f-display); font-size: 18px }
.pins { display: flex; gap: 14px }
.pins i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--line) }
.pins i.on { background: var(--accent); border-color: var(--accent) }
.pins.error { animation: temblar .35s }
.pins.error i.on { background: var(--danger); border-color: var(--danger) }
@keyframes temblar { 25% { transform: translateX(-8px) } 75% { transform: translateX(8px) } }
.pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 12px }
.pad button { height: 60px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-soft); font-family: var(--f-display); font-size: 21px; font-weight: 600; display: grid; place-items: center }
.pad button:active { background: var(--surface-2) }
.pad .invisible { visibility: hidden }

/* Impresión del informe (Guardar como PDF) */
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #f2f2f2; --line: #ddd; --line-soft: #e8e8e8; --text: #111; --muted: #444; --faint: #666; --accent: #0f8a5f; --warn: #b26b00; --danger: #b42318; --info: #1d5fbf }
  body { background: #fff }
  .side, .topbar, .bnav, .no-print, .seg, .nav-periodo .icon-btn, #toastRoot, body::before { display: none !important }
  .app { display: block } .content { padding: 0; max-width: none }
  .panel, .kpi { break-inside: avoid; border-color: #ddd }
  .bars .pair i.b { background: #999 }
}
