/* DivisaOS · marca Oro: índigo nocturno y oro. Banca profesional, una sola paleta, tamaños uniformes. */
:host, .dv-root {
  --navy: #0B3B2E; --navy-2: #13503F; --blue: #0E6B4C; --blue-hover: #0A5A3F; --blue-soft: #E7F3ED;
  --gold: #D4AF37; --gold-text: #7A5A00; --gold-soft: #FBF4DC;
  --info: #1F4E6B; --info-soft: #EEF3F6; --info-line: #C5D6E0; --on-dark: #B7D3C7;
  --green: #157347; --green-soft: #E6F4EC; --green-line: #91c9b1;
  --amber: #B54708; --amber-soft: #FFF6E5; --amber-line: #E6B680;
  --red: #B42318; --red-soft: #FDECEA; --red-line: #dfa0a8;
  --ink: #0F2A21; --gray: #3F5249; --muted: #5E6E66; --line: #DEE6E1; --line-2: #C8D5CD;
  --page: #F4F7F5; --card: #ffffff; --raised: #F8FAF9;
  --font: "DivisaOS Sans", "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  /* Escala única: espacios 4·8·12·16·24 · letra 12·13·14·16·18·22·28 · radios 6·8·12 · controles 36·40·48 */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
  --fs-xs: 12px; --fs-sm: 13px; --fs-md: 14px; --fs-lg: 16px; --fs-xl: 18px; --fs-2xl: 22px; --fs-3xl: 28px;
  --r-sm: 6px; --r-md: 8px; --r-lg: 12px;
  --h-sm: 36px; --h-md: 40px; --h-lg: 48px;
  --content-max: 1320px; --form-max: 640px;
  display: block;
}
.dv-root { font-family: var(--font); font-size: 14px; color: var(--ink); background: var(--page); min-height: 100%;
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums lining-nums; line-height: 1.4; }
:where(.dv-root) *, :where(.dv-root) *::before, :where(.dv-root) *::after { box-sizing: border-box; }
:where(.dv-root) :where(button, input, select, textarea) { font: inherit; color: inherit; }
.dv-root :focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Barra superior */
.topbar { background: var(--navy); color: #fff; display: flex; align-items: center; gap: 24px; padding: 0 24px; min-height: 52px; position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 22px; letter-spacing: -.02em; white-space: nowrap; background: none; border: 0; color: #fff; cursor: pointer; padding: 0 20px 0 0; margin-right: 4px; border-right: 1px solid #ffffff1f; align-self: stretch; text-align: left; }
.brand .os { color: var(--gold); }
.brand-mark { width: 40px; height: 40px; flex: none; filter: drop-shadow(0 2px 4px rgb(0 0 0 / 25%)); }
.brand small { margin-top: 1px; }
.brand small { display: block; font-size: 10px; letter-spacing: .14em; font-weight: 500; color: var(--on-dark); }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; align-self: stretch; }
.nav::-webkit-scrollbar { display: none; }
.nav button { background: none; border: 0; color: var(--on-dark); padding: 0 12px; cursor: pointer; font-size: 14px; border-bottom: 3px solid transparent; white-space: nowrap; }
.nav button:hover { color: #fff; }
.nav button[aria-current="page"] { color: #fff; font-weight: 700; border-bottom-color: var(--gold); }
.nav .count { margin-left: 6px; }
.top-right { display: flex; align-items: center; gap: 10px; }
.env { border: 1px solid #ffffff80; border-radius: 999px; padding: 4px 12px; font-size: 12px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: var(--avatar-ink, var(--navy)); display: grid; place-items: center; font-weight: 700; border: 0; cursor: pointer; font-size: 13px; }

.topbar.embedded { position: static; min-height: 48px; background: var(--navy-2); }

/* Encabezado de página */
.pagehead { background: var(--card); border-bottom: 1px solid var(--line); padding: var(--sp-2) max(var(--sp-5), calc((100% - var(--content-max)) / 2 + var(--sp-5))); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 44px; }
.eyebrow-action { color: var(--blue) !important; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.pagehead h1 { margin: 0; font-size: var(--fs-lg); font-weight: 700; }
.ph-title { display: flex; align-items: baseline; gap: var(--sp-2); min-width: 0; }
.ph-eyebrow { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.main { padding: var(--sp-4) var(--sp-5) 32px; max-width: var(--content-max); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); }
.form-narrow { max-width: var(--form-max); }
.w-320 { max-width: 320px; } .w-220 { max-width: 220px; }

/* Pestañas */
.tabs { display: flex; gap: 4px; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 12px 9px; margin-bottom: -1px; color: var(--gray); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--gold); }

/* Banda principal */
.hero { background: var(--navy); color: #fff; border-radius: 8px; overflow: hidden; }
.hero-top { padding: var(--sp-4) var(--sp-4); display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.hero .eyebrow { color: var(--on-dark); }
.hero h2 { margin: 4px 0 2px; font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -.02em; }
.hero p { margin: 0; color: var(--on-dark); }
.hero-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border-top: 1px solid #ffffff26; }
.hero-kpis > div { padding: var(--sp-3) var(--sp-4); border-right: 1px solid #ffffff26; }
.hero-kpis > div:last-child { border-right: 0; }
.hero-kpis .k-label { font-size: var(--fs-xs); color: var(--on-dark); }
.hero-kpis .k-value { font-size: 20px; font-weight: 700; margin: 2px 0; letter-spacing: -.01em; }
.hero-kpis .k-gold { color: var(--gold); }
.hero-kpis .k-note { font-size: 12px; color: var(--on-dark); }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Tarjetas */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h3 { margin: 0; font-size: var(--fs-lg); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-body { padding: var(--sp-4); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.grid-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.list { display: grid; }
.row { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); padding: 10px var(--sp-4); border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row-title { font-weight: 700; }
.row-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.empty { padding: var(--sp-4); color: var(--muted); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.empty-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); border: 1px solid var(--line); color: var(--muted); flex: none; }
.empty-ic svg { width: 18px; height: 18px; }
.empty-ic.is-done { background: var(--green-soft); border-color: var(--green-line); color: var(--green); }
.empty-text { flex: 1; min-width: 160px; }

/* Cuenta (caja o bóveda × moneda), como «Mi cuadre» */
.acct, .loc-card .card-body { border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); display: grid; gap: 10px; }
.acct { border: 1px solid var(--line); background: var(--card); font-size: var(--fs-sm); }
.acct-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.acct-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.fact-l { font-size: 12px; color: var(--gray); }
.fact-v { font-weight: 700; }
.acct-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.acct-actions > .btn { flex: 1 1 0; justify-content: center; }
.acct-actions > .btn-primary { flex: 1 1 auto; }
.acct-actions { flex-wrap: nowrap; }

/* Insignias */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.b-green { background: var(--green-soft); color: var(--green); }
.b-amber { background: var(--amber-soft); color: var(--amber); }
.b-red { background: var(--red-soft); color: var(--red); }
.b-blue { background: var(--blue-soft); color: var(--blue); }
.b-gray { background: #EDF2EF; color: var(--gray); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--raised); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-danger { background: var(--card); border-color: var(--red-line); color: var(--red); }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-link { border: 0; background: none; color: var(--blue); padding: 0 4px; min-height: 32px; }
.btn-light { background: #fff; color: var(--navy); border-color: #fff; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { border: 0; background: none; padding: 2px; color: var(--muted); cursor: pointer; display: inline-flex; vertical-align: middle; }
.icon-btn svg { width: 16px; height: 16px; }

/* Formularios */
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.field { display: grid; gap: 6px; }
.field label, .label { font-size: 12px; font-weight: 700; color: var(--gray); }
.input, select.input, textarea.input { width: 100%; min-height: 42px; border: 1px solid #A9BDB3; border-radius: 6px; padding: 8px 10px; background: #fff; }
textarea.input { min-height: 72px; resize: vertical; }
.input-lg { font-size: 20px; font-weight: 700; min-height: var(--h-lg); }
.input:disabled { background: var(--raised); color: var(--muted); }
.check { display: flex; gap: 8px; align-items: center; min-height: 36px; }
.segment { display: inline-flex; background: #EDF2EF; border-radius: 8px; padding: 4px; gap: 4px; }
.segment button { border: 0; background: none; padding: 8px 14px; border-radius: 6px; cursor: pointer; color: var(--gray); font-weight: 700; }
.segment button[aria-pressed="true"] { background: var(--blue); color: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 12%); }
.segment.segment-wide { display: flex; }
.segment.segment-wide button { flex: 1; min-height: 40px; }

/* Avisos */
.notice { border-radius: 8px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid; }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.n-info { background: var(--info-soft); color: var(--info); border-color: var(--info-line); }
.n-ok { background: var(--green-soft); color: #0E5A3F; border-color: var(--green-line); }
.n-warn { background: var(--amber-soft); color: var(--amber); border-color: var(--amber-line); }
.n-err { background: var(--red-soft); color: #ac2936; border-color: var(--red-line); }
.verdict { padding: 14px 16px; font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.verdict svg { width: 22px; height: 22px; }

/* Ahora → Después */
.impact { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.impact-head { background: var(--raised); padding: 8px 12px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gray); display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
.impact-row { padding: 10px 12px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; border-top: 1px solid var(--line); align-items: center; }
.impact-row .after { font-weight: 700; }
.impact-row .neg { color: var(--red); }
.num { text-align: right; white-space: nowrap; }

/* Debemos tener / Tenemos */
.ledger2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ledger2 > div { padding: 16px; }
.ledger2 > div + div { border-left: 1px solid var(--line); }
.l-line { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 15px; }
.l-total { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; margin-top: 8px; border-top: 1px solid var(--line); font-size: 18px; font-weight: 700; }

/* Tablas */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: var(--fs-xs); font-weight: 700; color: var(--gray); background: var(--raised); padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px var(--sp-3); border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
tfoot td { font-weight: 700; background: var(--raised); }
.pos { color: var(--green); font-weight: 700; }
.negv { color: var(--red); font-weight: 700; }
.mono { font-family: var(--mono); font-size: 13px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.denom { display: grid; grid-template-columns: 96px 12px minmax(64px, 110px) minmax(0, 1fr); gap: 8px; align-items: center; }
.denom .muted.num { font-size: 12px; }
.alloc-row { display: grid; grid-template-columns: 1.4fr .7fr 1fr auto; gap: 8px; align-items: center; }
.alloc-row.with-cost { grid-template-columns: 1.3fr .7fr 1fr 1fr 1fr 44px; }
.alloc-head { font-size: 12px; color: var(--muted); font-weight: 600; }
.alloc-value { align-self: center; text-align: right; font-weight: 600; }
.alloc-rate { min-width: 0; display: flex; align-items: center; min-height: 44px; }
.alloc-rate .input { width: 100%; }

/* Ventana */
.overlay { position: fixed; inset: 0; background: rgb(8 15 27 / 55%); display: grid; place-items: center; z-index: 50; padding: 16px; }
/* Regla única de tamaños (docs/DISENO.md): sm 480 · md 640 · lg 880 · xl 1120. Alto máximo: pantalla − 48 px;
   encabezado y pie fijos, solo el cuerpo se desplaza. */
.dialog { background: var(--card); border-radius: 12px; width: min(640px, 100%); max-height: calc(100dvh - 48px); display: flex; flex-direction: column; box-shadow: 0 12px 32px rgb(11 59 46 / 18%); overflow: hidden; }
.dialog.size-sm { width: min(480px, 100%); }
.dialog.size-md { width: min(640px, 100%); }
.dialog.size-lg { width: min(880px, 100%); }
.dialog.size-xl { width: min(1120px, 100%); }
.dialog-head, .dialog-foot { flex: none; }
.dialog-head { padding: var(--sp-4) var(--sp-4) var(--sp-3); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.dialog-head h2 { margin: 0; font-size: var(--fs-xl); }
.dialog-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.dialog-body { padding: var(--sp-4); overflow: auto; min-width: 0; min-height: 0; flex: 1 1 auto; display: grid; gap: 16px; align-content: start; background: var(--raised); }
.dialog-foot { padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; align-items: center; }
.pin { letter-spacing: .5em; font-size: 20px; text-align: center; max-width: 180px; }

/* Info (i) */
.tip { position: relative; display: inline-flex; }
.tip-box { position: absolute; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); width: max-content; max-width: min(300px, calc(100vw - 16px)); white-space: normal; text-align: left; background: var(--ink); color: #fff; font-size: 12px; font-weight: 400; line-height: 1.45; padding: 10px 12px; border-radius: 6px; z-index: 30; text-transform: none; letter-spacing: 0; }

/* Acceso */
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(320px, 1fr) minmax(360px, 1fr); background: var(--page); }
.auth-side { background: var(--navy); color: #fff; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.auth-lockup { display: flex; align-items: center; gap: 20px; }
.mark-xl { width: 72px; height: 72px; filter: drop-shadow(0 6px 14px rgb(0 0 0 / 35%)); }
.auth-home { background: none; border: 0; padding: 0; margin: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 12px; }
.auth-home:hover .auth-name, .auth-home:focus-visible .auth-name { opacity: .9; }
.auth-home:focus-visible { outline: 3px solid var(--gold); outline-offset: 6px; }
.auth-name { font-size: 40px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.auth-tag { margin-top: 8px; font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.auth-logo .os, .wordmark .os { color: var(--gold); }
.auth-side h1 { margin: 0 0 8px; font-size: 26px; line-height: 1.15; letter-spacing: -.02em; font-weight: 600; color: #fff; }
.auth-side p { margin: 0; color: var(--on-dark); font-size: 16px; }
.auth-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.auth-facts li { display: flex; gap: 12px; align-items: center; font-size: 15px; }
.auth-facts svg { width: 20px; height: 20px; color: var(--gold); flex: none; }
.auth-main { display: grid; place-items: center; padding: 32px 24px; }
.auth-card { width: min(400px, 100%); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-5); display: grid; gap: 16px; }
.auth-card h2 { margin: 0; font-size: var(--fs-2xl); letter-spacing: -.01em; }
.pw { position: relative; display: flex; align-items: center; }
.pw .input { flex: 1; padding-right: 48px; }
.eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none; border-radius: 6px; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.eye:hover { color: var(--ink); background: var(--raised); }
.eye svg { width: 20px; height: 20px; }
.pw-rules { list-style: none; margin: -6px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.pw-rules li { display: flex; gap: 6px; align-items: center; }
.pw-rules li svg { width: 14px; height: 14px; }
.pw-rules li.ok { color: var(--green); }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.qr { display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 24px; gap: 16px; }
  .auth-side h1 { font-size: 20px; }
  .mark-xl { width: 60px; height: 60px; }
  .auth-name { font-size: 34px; }
  .auth-tag { font-size: 12px; letter-spacing: .12em; }
  .auth-lockup { gap: 14px; }
  .auth-facts { display: none; }
}

/* Recibo */
.receipt { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; display: grid; gap: 6px; }
.receipt .big { font-size: 26px; font-weight: 700; }
/* Avisos: en computadora abajo a la izquierda (los botones de las ventanas van a la derecha);
   en el teléfono arriba, bajo la barra (abajo están la barra de la ventanilla y el menú). Nunca tapan un botón. */
.toasts { position: fixed; bottom: 24px; left: 24px; z-index: 70; width: min(380px, calc(100% - 32px)); display: grid; gap: 8px; }
@media (max-width: 760px) { .toasts { top: calc(60px + env(safe-area-inset-top)); bottom: auto; right: 0; left: 0; margin: 0 auto; } }
.toasts .notice { cursor: pointer; box-shadow: 0 6px 16px rgb(11 59 46 / 14%); animation: dv-in .18s ease-out; }
@keyframes dv-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .toasts .notice { animation: none; } }

/* Libro diario: un bloque por asiento */
tr.je td { border-bottom: 0; padding-top: 7px; padding-bottom: 7px; }
tr.je-first td { border-top: 1px solid var(--line-2); padding-top: 12px; }
tbody tr.je-first:first-child td { border-top: 0; }

/* Aprobaciones */
.all-clear { display: flex; gap: 12px; align-items: center; padding: 18px 16px; color: var(--green); }
.all-clear svg { width: 24px; height: 24px; }
.all-clear .row-title { color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: var(--sp-3) var(--sp-4); }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: var(--fs-xs); color: var(--gray); background: var(--raised); }
.chip svg { width: 14px; height: 14px; color: var(--green); }

/* Barra inferior (solo teléfono) y hoja «Más» */
.tabbar { display: none; }
.sheet { gap: 4px; }
.sheet-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 12px; border: 0; border-radius: 8px; background: none; cursor: pointer; font-size: 15px; color: var(--ink); text-align: left; }
.sheet-item:hover, .sheet-item[aria-current="page"] { background: var(--blue-soft); }
.sheet-item[aria-current="page"] { font-weight: 700; }
.sheet-item svg { width: 20px; height: 20px; color: var(--blue); }
.sheet-item .count { margin-left: auto; }
.count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #b42318; color: #fff; font-size: 12px; line-height: 18px; text-align: center; font-weight: 700; }
.loading { padding: 20px 16px; color: transparent; display: grid; gap: 10px; min-height: 120px; user-select: none; }
.loading::before, .loading::after { content: ""; display: block; height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--line) 0%, var(--raised) 50%, var(--line) 100%); background-size: 200% 100%; animation: dv-sk 1.2s linear infinite; }
.loading::before { width: 60%; } .loading::after { width: 85%; height: 44px; }
@keyframes dv-sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .loading::before, .loading::after { animation: none; } }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.right { text-align: right; }
.gap-8 { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hide-sm { }

@media (max-width: 900px) {
  .topbar { padding: 0 12px; gap: 12px; }
  .brand small, .env { display: none; }
  .brand { font-size: 20px; border-right: 0; padding-right: 0; }
  .brand .brand-mark { width: 36px; height: 36px; }
  .pagehead, .main { padding-left: 12px; padding-right: 12px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .ledger2 { grid-template-columns: minmax(0, 1fr); }
  .ledger2 > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .btn { min-height: 44px; }
  .hero h2 { font-size: 22px; }
  .hide-sm { display: none; }
  .grid-cols { grid-template-columns: minmax(0, 1fr); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .alloc-row, .alloc-row.with-cost { grid-template-columns: 1fr 1fr; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .alloc-head { display: none; }
  .dialog-body { padding: 14px; }
  .overlay { padding: 8px; }
}
@media (max-width: 760px) {
  .topbar:not(.embedded) .nav { display: none; }
  .topbar:not(.embedded) { justify-content: space-between; min-height: 56px; }
  .pagehead { flex-wrap: nowrap; min-height: 52px; padding-top: 8px; padding-bottom: 8px; }
  .btn-refresh .lbl { display: none; }
  .tabs { scroll-snap-type: x proximity; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .tabs button { scroll-snap-align: start; }
  .btn-refresh { width: 44px; padding: 0; justify-content: center; }
  .main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 16px rgb(11 59 46 / 6%); }
  .tabbar button { background: none; border: 0; min-height: 60px; display: grid; justify-items: center; align-content: center; gap: 3px; font-size: 12px; color: var(--muted); cursor: pointer; position: relative; }
  .tabbar button[aria-current="page"] { color: var(--blue); font-weight: 700; }
  .tabbar button[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 3px; border-radius: 0 0 3px 3px; background: var(--blue); }
  .tb-ic { position: relative; display: grid; }
  .tb-ic svg { width: 22px; height: 22px; }
  .tb-ic .count { position: absolute; top: -6px; right: -12px; }
  .hero-actions { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero-actions .btn { justify-content: center; }
}
@media print {
  .topbar, .pagehead, .tabs, .no-print, .overlay .dialog-foot { display: none !important; }
  .dv-root { background: #fff; }
  .card { border-color: #ccc; }
}

/* ── Fases ── */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; counter-reset: none; }
.flow-step { position: relative; display: flex; gap: 0; align-items: flex-start; min-width: 0; }
.flow-step:not(:last-child)::after { content: ""; position: absolute; top: 14px; left: 28px; right: 4px; height: 2px; background: var(--line); border-radius: 2px; }
.flow-step.is-done:not(:last-child)::after { background: var(--blue); }
.flow-dot { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; border: 2px solid var(--line-2); background: var(--card); color: var(--muted); position: relative; z-index: 1; }
.flow-dot svg { width: 14px; height: 14px; }
.flow-text { display: grid; min-width: 0; padding: 3px 8px 0 10px; background: var(--card); position: relative; z-index: 1; }
.flow-label { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-done .flow-dot { background: var(--blue); border-color: var(--blue); color: #fff; }
.is-done .flow-label { color: var(--ink); }
.is-current .flow-dot { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-text); box-shadow: 0 0 0 4px rgb(212 175 55 / 18%); }
.is-current .flow-label { color: var(--ink); }
.is-rejected .flow-dot { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.flow-compact { margin-top: 8px; gap: 4px; max-width: 620px; }
.flow-compact .flow-dot { width: 20px; height: 20px; font-size: 12px; border-width: 1.5px; }
.flow-compact .flow-dot svg { width: 11px; height: 11px; }
.flow-compact .flow-step:not(:last-child)::after { top: 10px; left: 20px; height: 1.5px; }
.flow-compact .flow-text { padding-left: 8px; }
.flow-compact .flow-text { padding-top: 1px; }
.flow-compact .flow-label { font-size: 12px; }
.row-main { min-width: 0; flex: 1; }
.day .card-body { display: grid; gap: 14px; }
.meter { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--blue); border-radius: 999px; transition: width .3s; }

/* ── Monedas ── */
.coin { flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; letter-spacing: -.02em; border: 1px solid transparent; }
.coin.sm { width: 26px; height: 26px; font-size: 12px; }
.coin-gold { background: var(--gold-soft); color: var(--gold-text); border-color: #E9D9A3; }
.coin-info { background: var(--info-soft); color: var(--info); border-color: var(--info-line); }
.coin-green { background: var(--green-soft); color: var(--green); border-color: var(--green-line); }
.coin-amber { background: var(--amber-soft); color: var(--amber); border-color: var(--amber-line); }
.cur-cell { display: flex; gap: 10px; align-items: center; }
.amt small { font-size: .55em; font-weight: 600; opacity: .8; margin-left: 1px; }

/* ── Ventanilla ── */
.fx-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.fx-tile { display: grid; gap: 2px; text-align: left; padding: 10px var(--sp-3); border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--card); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.fx-tile:hover { border-color: var(--blue); }
.fx-tile.on { border: 2px solid var(--blue); padding: 9px 11px; box-shadow: 0 0 0 4px var(--blue-soft); }
.fx-top { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.fx-top > span:last-child { display: grid; line-height: 1.2; }
.fx-name { font-size: 12px; color: var(--muted); }
.fx-rate-l { font-size: 12px; color: var(--muted); }
.fx-rate { font-size: 20px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.fx-have { font-size: 12px; color: var(--green); }
.fx-have.short { color: var(--amber); }
.amt-input { position: relative; display: flex; align-items: center; }
.amt-prefix { position: absolute; left: 14px; font-size: 20px; font-weight: 700; color: var(--muted); pointer-events: none; }
.input-xl { min-height: 52px; font-size: 24px; font-weight: 700; padding-left: 64px; letter-spacing: -.01em; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: -4px; }
.quick-btn { border: 1px solid var(--line-2); background: var(--card); border-radius: 999px; padding: 6px 14px; min-height: 34px; font-size: 13px; font-weight: 600; color: var(--gray); cursor: pointer; }
.quick-btn:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.caja-chip { display: inline-flex; gap: 8px; align-items: center; color: var(--gray); font-size: 13px; }
.caja-chip svg { width: 18px; height: 18px; color: var(--blue); }
.result { background: var(--navy); color: #fff; border-radius: 12px; padding: 20px; display: grid; gap: 4px; }
.result-l { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--on-dark); }
.result-amt { font-size: 30px; font-weight: 700; color: var(--gold); letter-spacing: -.02em; line-height: 1.1; }
.result-sub { font-size: 13px; color: var(--on-dark); }
@media (max-width: 760px) {
  .fx-tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .result-amt { font-size: 26px; }
  .flow-step { flex-direction: column; align-items: center; text-align: center; }
  .flow-step:not(:last-child)::after { left: calc(50% + 16px); right: calc(-50% + 12px); }
  .flow-compact .flow-step:not(:last-child)::after { left: calc(50% + 12px); right: calc(-50% + 8px); }
  .flow-text, .flow-compact .flow-text { padding: 4px 2px 0; background: none; }
  .flow-label { font-size: 12px; white-space: normal; }
  .flow-sub { font-size: 12px; }
  .flow-compact .flow-sub { display: none; }
}

/* Marca en el comprobante y en la franja principal */
.receipt-brand { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; margin-bottom: 6px; border-bottom: 1px dashed var(--line-2); font-size: 18px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.receipt-brand .os { color: var(--gold-text); }
.mark-sm { width: 28px; height: 28px; filter: none; }
.receipt-biz { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.hero-brand { position: relative; }
.hero-watermark { position: absolute; right: -24px; top: -36px; width: 160px; height: 160px; opacity: .07; filter: none; pointer-events: none; }
.hero-brand > :not(.hero-watermark) { position: relative; }
@media (max-width: 760px) { .hero-watermark { width: 120px; height: 120px; right: -24px; top: -24px; } }

/* ── Auditoría ── */
.controls-head { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 12px; border: 1px solid; }
.controls-head.is-ok { background: var(--green-soft); border-color: var(--green-line); }
.controls-head.is-warn { background: var(--amber-soft); border-color: var(--amber-line); }
.controls-head.is-err { background: var(--red-soft); border-color: var(--red-line); }
.controls-head > div { flex: 1; min-width: 0; }
.controls-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #fff; flex: none; }
.controls-ic svg { width: 24px; height: 24px; }
.is-ok .controls-ic { color: var(--green); } .is-warn .controls-ic { color: var(--amber); } .is-err .controls-ic { color: var(--red); }
.controls-title { font-size: 18px; font-weight: 700; color: var(--ink); }
.controls-sub { font-size: 13px; color: var(--gray); }
.control { align-items: flex-start; }
.control-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 2px; }
.control-ic svg { width: 18px; height: 18px; }
.tone-green { background: var(--green-soft); color: var(--green); }
.tone-amber { background: var(--amber-soft); color: var(--amber); }
.tone-red { background: var(--red-soft); color: var(--red); }
.control.is-err { background: #FFF8F7; }
.filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
.nowrap { white-space: nowrap; }
.audit-kind { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--raised); color: var(--gray); border: 1px solid var(--line); white-space: nowrap; }
.audit-kind.k-operation { background: var(--blue-soft); color: var(--blue-hover); border-color: transparent; }
.audit-kind.k-transfer, .audit-kind.k-count { background: var(--info-soft); color: var(--info); border-color: transparent; }
.audit-kind.k-expense, .audit-kind.k-capital, .audit-kind.k-day { background: var(--gold-soft); color: var(--gold-text); border-color: transparent; }
.audit-kind.k-pin, .audit-kind.k-member, .audit-kind.k-settings, .audit-kind.k-rate { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
@media (max-width: 900px) { .filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .filters-act { grid-column: 1 / -1; } }
@media (max-width: 760px) { .controls-head { flex-wrap: wrap; } .controls-head .btn { width: 100%; } }

/* Matriz de permisos: íconos del tamaño del texto */
td .pos svg, td .muted svg, .pos > svg { width: 18px; height: 18px; }

/* Cajas y bóveda en Hoy: fichas compactas */
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; padding: 14px 16px 16px; }
.mini { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 4px; background: var(--card); border-left: 4px solid var(--line-2); }
.mini.is-green { border-left-color: var(--green); } .mini.is-amber { border-left-color: var(--amber); } .mini.is-red { border-left-color: var(--red); } .mini.is-blue { border-left-color: var(--info); }
.mini-top { display: flex; align-items: center; gap: 8px; }
.mini-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-amt { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }

/* Teléfono: cada fila de tabla se lee como ficha */
@media (max-width: 760px) {
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tfoot, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  table.stack tr:last-child { border-bottom: 0; }
  table.stack td { border: 0; padding: 3px 0; display: grid; grid-template-columns: minmax(84px, 38%) minmax(0, 1fr); column-gap: 12px; text-align: right; align-items: baseline; }
  table.stack td > * { grid-column: 2; justify-self: end; }
  table.stack td.num { text-align: right; }
  table.stack td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; grid-column: 1; grid-row: 1 / span 6; }
  table.stack td:not([data-label]), table.stack td[data-label=""] { grid-template-columns: minmax(0, 1fr); }
  table.stack td:not([data-label])::before, table.stack td[data-label=""]::before { content: none; }
  table.stack td:not([data-label]) > *, table.stack td[data-label=""] > * { grid-column: 1; }
  table.stack td:first-child { font-weight: 700; }
  table.stack td:empty { display: none; }
  table.stack td > * { text-align: right; }
  table.stack tfoot tr { background: var(--raised); }
  .mini-grid { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .mini-amt { font-size: 15px; }
  .mini-top { flex-wrap: wrap; }
  .mini-top .badge { order: 3; }
}

/* ── Clientes ── */
.person { width: 36px; height: 36px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; background: var(--navy); color: var(--gold); font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.person-lg { width: 64px; height: 64px; font-size: 22px; background: var(--gold); color: var(--navy); }
.hero-person .cur-cell { gap: 16px; }
.search { position: relative; flex: 1; max-width: 480px; display: flex; align-items: center; }
.search svg { position: absolute; left: 12px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search .input { padding-left: 38px; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px 14px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); color: var(--gray); font-size: 13px; font-weight: 600; cursor: pointer; }
.fchip:hover { border-color: var(--blue); color: var(--blue); }
.fchip[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.fchip-n { min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--raised); color: var(--gray); font-size: 12px; line-height: 20px; text-align: center; }
.fchip[aria-selected="true"] .fchip-n { background: var(--gold); color: var(--navy); }
table.clickable tbody tr { cursor: pointer; }
table.clickable tbody tr:hover td { background: var(--raised); }
table.clickable tbody tr:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.row-go svg { width: 16px; height: 16px; color: var(--muted); }
.section-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 4px; border-top: 1px solid var(--line); }
.section-label:first-child { border-top: 0; padding-top: 0; }
.back { padding-left: 0; gap: 6px; }
.back svg { width: 16px; height: 16px; }
.btn-danger-soft { color: var(--red); border-color: var(--red-line); background: var(--card); }
.btn-danger-soft:hover { background: var(--red-soft); }
@media (max-width: 760px) {
  .search { max-width: none; flex-basis: 100%; }
  .card-head:has(.search) { flex-wrap: wrap; }
  .card-head:has(.search) > .btn { width: 100%; }
  .filter-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .fchip { flex: none; }
  .person-lg { width: 52px; height: 52px; font-size: 18px; }
  table.clickable .row-go { display: none; }
}

/* ── Análisis ── */
.range { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.range > .field { min-width: 160px; flex: 1 1 160px; max-width: 240px; }
.range-act { flex: 2 1 320px; }
.kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: var(--navy); color: #fff; border-radius: 12px; overflow: hidden; }
.kpi { padding: var(--sp-3) var(--sp-4); border-right: 1px solid #ffffff1f; border-bottom: 1px solid #ffffff1f; }
.kpi .k-label { font-size: var(--fs-xs); color: var(--on-dark); }
.kpi .k-value { font-size: 20px; font-weight: 700; margin: 2px 0; letter-spacing: -.01em; }
.kpi .k-note { font-size: 12px; color: var(--on-dark); }
.kpi.pos .k-value { color: var(--gold); } .kpi.neg .k-value { color: #FFB4A8; }
.cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 64px); justify-content: center; gap: var(--sp-2); height: 140px; align-items: end; }
.col { display: grid; grid-template-rows: 18px 1fr 18px; height: 100%; text-align: center; }
.col-v { font-size: 12px; font-weight: 700; color: var(--ink); }
.col-bar { display: flex; align-items: flex-end; justify-content: center; background: var(--raised); border-radius: 6px 6px 2px 2px; overflow: hidden; }
.col-bar > span { display: block; width: 100%; max-width: 48px; margin: 0 auto; background: var(--blue); border-radius: 6px 6px 0 0; transition: height .3s; }
.col:hover .col-bar > span { background: var(--navy); }
.col-l { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.col.is-zero .col-bar { background: var(--raised); }
.hbars { display: grid; gap: 12px; }
.hbar { display: grid; grid-template-columns: minmax(120px, 28%) minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.hbar-l { display: grid; min-width: 0; }
.hbar-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-sub { font-size: 12px; color: var(--muted); }
.hbar-track { height: 12px; background: var(--raised); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.hbar-fill { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
.hbar-v { white-space: nowrap; }
.grid-even { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--gray); }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg::before { content: ""; width: 14px; height: 3px; border-radius: 2px; }
.lg-buy::before { background: var(--info); } .lg-sell::before { background: var(--blue); }
.chart-wrap { width: 100%; min-height: 160px; }
.linechart { width: 100%; height: 180px; display: block; }
.linechart .grid { stroke: var(--line); stroke-width: 1; }
.linechart .axis { fill: var(--muted); font-size: 12px; font-family: var(--font); }
.linechart .ln-buy { stroke: var(--info); stroke-width: 2.5; stroke-linejoin: round; }
.linechart .ln-sell { stroke: var(--blue); stroke-width: 2.5; stroke-linejoin: round; }
.linechart .pt-buy { fill: #fff; stroke: var(--info); stroke-width: 2; }
.linechart .pt-sell { fill: #fff; stroke: var(--blue); stroke-width: 2; }

/* ── Reporte de cierre (también impreso) ── */
.close-report { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-5); display: grid; gap: var(--sp-4); max-width: 980px; width: 100%; margin: 0 auto; }
.cr-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 16px; border-bottom: 2px solid var(--navy); }
.cr-brand { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.02em; } .cr-brand .os { color: var(--gold-text); }
.cr-title { font-size: 18px; font-weight: 700; }
.cr-verdict { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 10px; border: 1px solid; }
.cr-verdict svg { width: 22px; height: 22px; flex: none; }
.cr-verdict.is-ok { background: var(--green-soft); border-color: var(--green-line); color: var(--green); }
.cr-verdict.is-err { background: var(--red-soft); border-color: var(--red-line); color: var(--red); }
.cr-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-5); }
.close-report h4 { margin: 0 0 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.close-report .l-line.total { border-top: 1px solid var(--line-2); margin-top: 4px; padding-top: 8px; }
.cr-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding-top: 32px; }
.cr-foot > div { border-top: 1px solid var(--ink); padding-top: 6px; font-size: 12px; color: var(--muted); text-align: center; }
@media (max-width: 760px) {
  .range > .field { max-width: none; }
  .cols { height: 120px; gap: 3px; grid-auto-columns: minmax(0, 1fr); justify-content: stretch; }
  .col-v { font-size: 12px; }
  .hbar { grid-template-columns: minmax(0, 1fr) auto; }
  .hbar-track { grid-column: 1 / -1; order: 3; }
  .close-report { padding: 16px; }
  .cr-grid { grid-template-columns: minmax(0, 1fr); }
  .kpi .k-value { font-size: 18px; }
}
@media print {
  .tabbar, .toasts, .no-print, .btn { display: none !important; }
  .main { padding: 0; max-width: none; }
  .close-report { border: 0; padding: 0; max-width: none; }
  table.stack thead { display: table-header-group !important; }
}

/* Exportar y PDF */
.export-bar { justify-content: flex-end; }
.where { display: grid; gap: 10px; padding: 6px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.where:last-child { border-bottom: 0; margin-bottom: 0; }
.print-head { display: none; }
@media print {
  .print-head { display: flex !important; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 2px solid var(--navy); }
  .print-head .print-title { font-size: 18px; font-weight: 700; }
  .card, .close-report, .kpi-strip { break-inside: avoid; }
  .kpi-strip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .hero { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ── Ventanilla: modos, monto en pesos, vuelto y compartir ── */
.segment-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.segment-sm { display: inline-flex; padding: 3px; gap: 2px; }
.segment-sm button { min-height: 30px; padding: 0 10px; font-size: 12px; }
.amt-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.amt-hint { font-size: 13px; color: var(--gray); min-height: 18px; }
.fx-tier { font-size: 12px; color: var(--info); font-weight: 600; }
.change { min-height: 0; }
.change-ok, .change-short { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: 10px; font-weight: 700; }
.change-ok { background: var(--green-soft); color: var(--green); }
.change-short { background: var(--red-soft); color: var(--red); }
.change-ok .amt, .change-short .amt { font-size: 24px; }
.share-row .btn { text-decoration: none; }
/* ── Pizarra (Ajustes) ── */
.pin-row { max-width: 280px; }
.rate-in { max-width: 130px; text-align: right; }
.rate-info { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 220px; }
.rate-margin { font-size: 13px; font-weight: 700; color: var(--green); }
.rate-margin.neg { color: var(--red); }
.link-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.link-box .input { flex: 1; min-width: 240px; font-size: 13px; }
.limit-row { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: end; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.subnav { display: flex; gap: 8px; flex-wrap: wrap; }
.subnav .fchip svg { width: 16px; height: 16px; }
@media (max-width: 760px) {
  .limit-row { grid-template-columns: minmax(0, 1fr); }
  .rates-table .rate-in { max-width: none; }
  .subnav { flex-wrap: nowrap; overflow-x: auto; }
  .subnav .fchip { flex: none; }
}

/* Billetes por operación */
.card-head-in { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-head-in h3 { margin: 0; font-size: 16px; }
.bill-pad { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 10px; }
.bill-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bill-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 16px; }
.bill-rows .denom { grid-template-columns: 84px 12px minmax(56px, 90px) minmax(0, 1fr); }
.bill-status { font-weight: 600; font-size: 14px; }
.denom[hidden], .form[hidden], .form-row[hidden] { display: none; }

/* Owner Console */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px 16px; }
.fact { display: grid; gap: 2px; }
.toolbar { display: flex; gap: 8px; align-items: center; }
.toolbar .input { flex: 1; }
.wrap { flex-wrap: wrap; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.amber-t { color: #B54708; }
.code-box { text-align: center; letter-spacing: .08em; font-weight: 700; }
@media (max-width: 760px) { .cols-2 { grid-template-columns: minmax(0, 1fr); } }
.kpi.warn .k-value { color: #F5C26B; }

/* Alta de casa en pasos: indicador de pasos, tarjetas de plan y resumen */
.stepper { display: flex; gap: 8px; list-style: none; margin: 0 0 4px; padding: 0; }
.stepper li { flex: 1; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; color: var(--muted); padding-bottom: 10px; border-bottom: 3px solid var(--line); }
.stepper .n { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--gray); font-size: 12px; font-weight: 700; }
.stepper .n svg { width: 14px; height: 14px; }
.stepper li.current { color: var(--ink); border-color: var(--blue); }
.stepper li.current .n { background: var(--blue); color: #fff; }
.stepper li.done { color: var(--green); border-color: var(--green); }
.stepper li.done .n { background: var(--green); color: #fff; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 108px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.plan:hover:not([disabled]) { border-color: var(--blue); }
.plan[aria-checked="true"] { border: 2px solid var(--blue); padding: 13px 15px; background: var(--blue-soft); }
.plan[disabled] { opacity: .55; cursor: not-allowed; }
.plan-check { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--blue); color: #fff; display: none; place-items: center; }
.plan-check svg { width: 13px; height: 13px; }
.plan[aria-checked="true"] .plan-check { display: grid; }
.plan-title { font-size: 16px; font-weight: 700; }
.plan-sub { font-size: 13px; color: var(--muted); }
.plan-until { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--blue); }
.review { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.review-row { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--line); }
.review-row:first-child { border-top: 0; }
.review-row dt { color: var(--muted); font-size: 13px; }
.review-row dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.btn[hidden] { display: none; }
@media (max-width: 560px) {
  .review-row { grid-template-columns: 1fr; gap: 2px; }
  .stepper li { font-size: 12px; flex-direction: column; align-items: flex-start; }
  .plan-grid { grid-template-columns: 1fr 1fr; }
}

/* Ventanilla: barra con el total y el botón de registrar */
.v-dock { display: grid; gap: 8px; }
.v-dock-sum { display: none; }
@media (max-width: 760px) {
  .has-dock { padding-bottom: 84px; }
  .v-dock { position: fixed; left: 0; right: 0; bottom: calc(61px + env(safe-area-inset-bottom)); z-index: 35; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px;
    padding: 10px 12px; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgb(11 59 46 / 8%); }
  .v-dock-sum { display: grid; line-height: 1.2; min-width: 0; }
  .v-dock-l { font-size: 12px; color: var(--muted); }
  .v-dock-amt { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .v-dock .btn-block { width: auto; min-height: 48px; padding: 0 18px; }
}

/* Cuadre de varias monedas en una ventana */
.count-status { display: flex; flex-wrap: wrap; gap: 8px; position: sticky; top: -16px; z-index: 2; background: var(--card); padding: 4px 0 8px; }
.count-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 8px 6px 12px; background: var(--card); font: inherit; color: var(--ink); cursor: pointer; min-height: 40px; }
.count-chip:hover { border-color: var(--blue); }
.count-sec { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 12px; scroll-margin-top: 56px; }
.count-sec-h { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 16px; }
.count-all { border-bottom: 1px solid var(--line); }

/* Entrega de varias monedas */
.t-line { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.t-amt .input { padding-left: 70px; }
.t-line .btn[hidden] { display: none; }
@media (max-width: 560px) { .t-line { grid-template-columns: 96px minmax(0, 1fr) auto; } }

/* Búsqueda rápida y atajos */
.top-search { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 12px; border-radius: 8px; border: 1px solid #ffffff2e; background: #ffffff14; color: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.top-search:hover { background: #ffffff24; }
.top-search svg { width: 16px; height: 16px; }
.dv-root .top-search kbd { background: transparent; font-family: var(--font); font-size: 11px; color: var(--on-dark); border: 1px solid #ffffff33; border-radius: 4px; padding: 1px 5px; }
.dv-root kbd { font-family: var(--mono); font-size: 12px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 1px 6px; background: var(--raised); color: var(--ink); }
.kbd-hint { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding-top: 4px; border-top: 1px dashed var(--line); }
.search-row { width: 100%; background: none; border: 0; border-top: 1px solid var(--line); text-align: left; font: inherit; color: inherit; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; min-height: 56px; }
.search-row:first-child { border-top: 0; }
.search-row:hover, .search-row:focus-visible { background: var(--blue-soft); }
.search-row svg { color: var(--muted); flex: none; width: 18px; height: 18px; }
@media (max-width: 760px) { .top-search .lbl, .dv-root .top-search kbd { display: none; } .top-search { padding: 0 10px; } }

/* Ventana con datos escritos: tocar fuera no la cierra, solo la mueve un poco */
@keyframes dv-nudge { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.dialog.nudge { animation: dv-nudge .25s ease-in-out; }
@media (prefers-reduced-motion: reduce) { .dialog.nudge { animation: none; } }
.dialog-hint { padding: 0 20px 12px; }
.dialog-hint:empty { display: none; }

/* Primeros pasos de una casa nueva */
.setup { border-color: var(--blue); }
.setup-meter { margin: 0 16px; }
.setup-list { list-style: none; margin: 0; padding: 4px 0; }
.setup-list li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.setup-list li:first-child { border-top: 0; }
.setup-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--gray); font-weight: 700; font-size: 13px; }
.setup-n svg { width: 16px; height: 16px; }
.setup-list li.done .setup-n { background: var(--green); color: #fff; }
.setup-list li.done .row-title { color: var(--muted); }
.setup-list li.next .setup-n { background: var(--blue); color: #fff; }
.setup-list li.next { background: var(--blue-soft); }
@media (max-width: 560px) { .setup-list li { grid-template-columns: 28px minmax(0, 1fr); } .setup-list li > :last-child { grid-column: 2; justify-self: start; } }

/* Teléfono: toda ventana es una hoja desde abajo, a todo el ancho; botones del pie grandes y a lo ancho. */
@media (max-width: 760px) {
  .overlay { place-items: end stretch; padding: 0; }
  .dialog, .dialog.size-sm, .dialog.size-md, .dialog.size-lg, .dialog.size-xl { width: 100%; max-height: 92dvh; border-radius: 16px 16px 0 0; }
  .dialog-head { padding: 16px; }
  .dialog-body { padding: 16px; }
  .dialog-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .dialog-foot .btn { flex: 1 1 0; min-height: 48px; justify-content: center; }
}

/* Vista previa del recibo térmico dentro de la ventana (mismo diseño que recibo.css, sin reglas de página) */
.thermal-preview { background: #E9EDEB; border-radius: 8px; padding: 12px; display: grid; justify-items: center; }
.thermal-preview .thermal { background: #fff; color: #000; box-sizing: border-box; font-family: Arial, Helvetica, "Liberation Sans", sans-serif; font-size: 13px; font-weight: 600; line-height: 1.5; padding: 12px; width: 302px; max-width: 100%; box-shadow: 0 1px 3px rgb(0 0 0 / 15%); }
.thermal-preview .thermal.w58 { width: 220px; font-size: 11px; }
.thermal-preview .t-c { text-align: center; }
.thermal-preview .t-b { font-weight: 700; }
.thermal-preview .t-name { font-size: 1.25em; }
.thermal-preview .t-small { font-size: .85em; margin-top: 8px; }
.thermal-preview .t-row { display: flex; justify-content: space-between; gap: 8px; }
.thermal-preview .t-row span:last-child { text-align: right; overflow-wrap: anywhere; }
.thermal-preview .t-total { font-weight: 700; }
.thermal-preview .t-big { font-size: 1.45em; font-weight: 700; text-align: right; margin: 2px 0 4px; }
.thermal-preview .t-hr { border-top: 1px dashed #000; margin: 8px 0; }
.thermal-preview .t-sign { border-top: 1px solid #000; margin: 28px 12px 6px; padding-top: 4px; text-align: center; font-size: .9em; }

/* Ventanilla: cliente arriba */
.cust-bar { padding: 12px 16px; display: grid; gap: 10px; }
.cust-search { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.cust-ic { width: 36px; height: 36px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; }
.cust-ic svg { width: 18px; height: 18px; }
.cust-input { position: relative; min-width: 0; }
.cust-results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: var(--card); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 12px 24px rgb(11 59 46 / 14%); overflow: hidden; }
.cust-results:empty { display: none; }
.cust-opt { width: 100%; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; min-height: 52px; }
.cust-opt:first-child { border-top: 0; }
.cust-opt:hover, .cust-opt:focus-visible { background: var(--blue-soft); }
.cust-opt-t { display: grid; min-width: 0; }
.cust-empty { padding: 12px; font-size: 13px; color: var(--muted); }
.cust-walkin { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); font-size: 13px; color: var(--gray); white-space: nowrap; }
.cust-chosen { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.cust-info { min-width: 0; }
@media (max-width: 760px) {
  .cust-search { grid-template-columns: minmax(0, 1fr) auto; }
  .cust-search .cust-input { grid-column: 1 / -1; }
  .cust-walkin { justify-content: center; }
  .cust-search .cust-ic { display: none; }
  .cust-chosen { grid-template-columns: auto minmax(0, 1fr); }
  .cust-chosen > :last-child { grid-column: 1 / -1; }
}
/* Ventanilla: dos montos enlazados */
.amt-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: end; }
.amt-pair.single { grid-template-columns: minmax(0, 1fr); }
.amt-pair.single .amt-swap { display: none; }
.amt-swap { width: 36px; height: 36px; display: grid; place-items: center; color: var(--muted); margin-bottom: 14px; }
.amt-pair .field[hidden] { display: none; }
@media (max-width: 760px) { .amt-pair { grid-template-columns: minmax(0, 1fr); } .amt-swap { display: none; } }
@media (min-width: 1101px) { .v-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; } .v-side { position: sticky; top: 76px; } }
/* Clientes */
.complete { display: grid; gap: 6px; }
.note-body { white-space: pre-wrap; font-weight: 500; }
/* Regla de páginas (docs/DISENO.md): formularios y ajustes centrados a 720 px */
.page-form { max-width: 720px; }

a.btn { text-decoration: none; }

/* Ventanilla sencilla: lo avanzado se abre con «Más opciones» */
.rate-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--gray); }
.rate-line[hidden] { display: none; }
.more { border-top: 1px dashed var(--line); padding-top: 10px; display: grid; gap: 10px; }
.more-toggle { justify-self: start; }
.more-panel { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.more-panel[hidden] { display: none; }
.more-panel .kbd-hint { flex-basis: 100%; border-top: 0; padding-top: 0; }
.amt-hint:empty { display: none; }

/* ───────────── Campana de avisos ───────────── */
.top-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 36px; border-radius: 8px; border: 1px solid #ffffff2e; background: #ffffff14; color: #fff; cursor: pointer; }
.top-bell:hover { background: #ffffff24; }
.top-bell svg { width: 18px; height: 18px; }
.bell-count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #B42318; color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; border: 2px solid var(--navy); }
.bell-count[hidden] { display: none; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: middle; background: var(--muted); }
.dot-blue { background: var(--blue); } .dot-amber { background: #B54708; } .dot-red { background: #B42318; } .dot-green { background: #157347; } .dot-gray { background: #9AA8A1; }
.notes-list .note-row { width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.notes-list .note-row:last-child { border-bottom: 0; }
.notes-list .note-row:hover { background: var(--page); }
.notes-list .note-row.unread .row-title { font-weight: 700; }
.note-time { white-space: nowrap; align-self: flex-start; }
.notes-list .note-row:not(.unread) .row-title { font-weight: 600; }
@media (max-width: 640px) { .top-bell { width: 44px; height: 44px; } }

/* ───────────── Controles antirrobo ───────────── */
.blind { display: flex; align-items: center; gap: 8px; padding: 18px 12px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 14px; background: var(--page); }
.blind svg { width: 18px; height: 18px; flex: none; }
.recv-count { width: 200px; flex: none; }
.recv-count .input { font-size: 16px; }
.hours { display: flex; flex-wrap: wrap; gap: 4px; }
.hour-chip { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--page); border: 1px solid var(--line); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .recv-count { width: 100%; } }

/* ───────────── Firma con PIN ───────────── */
.field:has(> input.pin-sign), .pin-row:has(input.pin-sign) { display: none; }
.pinpad { position: relative; display: flex; justify-content: center; gap: 10px; margin: 8px auto 4px; cursor: text; }
.pinbox { width: 46px; height: 56px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; transition: border-color .12s; }
.pinbox.filled::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); }
.pinbox.active { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 14%, transparent); }
.pinpad-in { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; color: transparent; caret-color: transparent; border: 0; background: transparent; }
.pinpad.shake { animation: pin-shake .35s; }
.pinpad.shake .pinbox { border-color: #B42318; }
@keyframes pin-shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .pinpad.shake { animation: none; } }
.sign-sheet .center, .center { text-align: center; }
.sign-msg { min-height: 20px; text-align: center; }
.sign-layer { z-index: 60; }
.pin-rules { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.pin-rule { display: inline-flex; align-items: center; gap: 4px; }
.pin-rule svg { width: 14px; height: 14px; }
.pin-rule.ok { color: #157347; }
.pin-steps { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pin-step { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--page); border: 1px solid var(--line); color: var(--muted); }
.pin-step.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.pin-step.done { color: #157347; border-color: #15734755; }
@media (max-width: 640px) { .pinbox { width: 44px; height: 54px; } .pinpad { gap: 8px; } }

/* ───────────── Revisión UX 21 nov ───────────── */
.fresh { border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; padding: 6px 4px; white-space: nowrap; }
.fresh:hover { color: var(--blue); text-decoration: underline; }
.pagehead .head-tabs { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.pagehead .head-tabs .fchip { min-height: 32px; }
.h-section { margin: 0; font-size: 20px; }
.date-wrap { position: relative; display: flex; align-items: center; }
.date-wrap .date-in { padding-right: 44px; width: 100%; }
.date-cal { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 8px; display: grid; place-items: center; }
.date-cal:hover { background: var(--page); color: var(--blue); }
.date-cal svg { width: 18px; height: 18px; }
.date-native { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
@media (min-width: 761px) { .auth-card .input::placeholder { color: transparent; } }
@media (max-width: 760px) { .v-side .result { display: none; } }
/* Los avisos no tapan toques: dejan pasar el clic a lo que está debajo. Y al enfocar o desplazar, nada queda bajo las barras fijas del teléfono. */
.toasts, .toasts .notice { pointer-events: none; }
@media (max-width: 760px) { html { scroll-padding-bottom: calc(150px + env(safe-area-inset-bottom)); scroll-padding-top: 70px; } }

/* Equipo y roles */
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-3); }
.role-card .card-body { padding: var(--sp-3); gap: var(--sp-2); }
.role-card h3 { margin: 0; font-size: var(--fs-md); }
.role-can { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: var(--fs-xs); color: var(--muted); }
.role-can li { display: flex; gap: 6px; align-items: flex-start; }
.role-can svg { width: 14px; height: 14px; color: #157347; flex: none; margin-top: 2px; }
.role-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; background: var(--muted); }
.role-owner { background: var(--navy); } .role-general_manager { background: var(--blue); } .role-supervisor { background: #B54708; }
.role-vault { background: #157347; } .role-cashier { background: var(--muted); } .role-accounting { background: #1F4E6B; }
.role-tag { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.role-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.role-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; cursor: pointer; min-height: 44px; }
.role-opt:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue) inset; background: var(--page); }
.role-opt input { margin-top: 3px; accent-color: var(--blue); }
.role-opt-body { display: grid; gap: 2px; }
.role-opt-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--ink); }
.who { display: flex; gap: 10px; align-items: center; }
.avatar-sm { width: 32px; height: 32px; border-radius: 50%; background: var(--line); color: var(--navy); font-weight: 700; font-size: 12px; display: inline-grid; place-items: center; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chips .chip { margin: 0; padding: 4px 10px; }

/* Menú «⋯» de acciones secundarias */
.more-menu { position: relative; display: inline-block; }
.more-menu > summary { list-style: none; min-width: 44px; justify-content: center; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-menu > summary svg { stroke-width: 3; }
.more-list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 190px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 42, 33, .12); padding: 4px; display: grid; }
.more-item { background: none; border: 0; text-align: left; padding: 10px 12px; min-height: 44px; border-radius: 8px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
.more-item:hover, .more-item:focus-visible { background: var(--page); }
.acct-actions { align-items: center; }

/* Pestañas que no caben: degradado a la derecha mientras haya más */
.tabs.has-more { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }

/* Cifras compactas del día en el teléfono (quien no ve todo) */
.hero.hero-compact { padding: 16px; }
.hero.hero-compact .hero-top h2 { font-size: 18px; }
.hero.hero-compact .hero-top p, .hero.hero-compact .hero-watermark { display: none; }
.hero.hero-compact .k-value { font-size: 18px; }

/* Bienvenida por rol */
.welcome .step-n { width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: 13px; display: inline-grid; place-items: center; flex: none; }

/* Marca de cada casa (marca blanca) */
.brand-logo { display: block; height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.brand-plate { display: inline-flex; align-items: center; background: #fff; border-radius: 8px; padding: 4px 10px; }
.brand-casa { padding-top: 8px; padding-bottom: 8px; }
.top-logo, .brand-casa .brand-plate { height: 40px; max-width: 230px; }
.brand-casa .brand-plate .brand-logo { height: 32px; }
.auth-brand-logo { height: 64px; max-width: 320px; }
.auth-lockup .brand-plate { height: 76px; padding: 8px 14px; }
.auth-card-brand { display: none; }
.auth-card-logo { height: 44px; max-width: 240px; margin: 0 auto; }
.auth-side-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--on-dark); }
.auth-powered { margin-top: 14px; text-align: center; color: var(--muted); }
.powered { font-size: 12px; letter-spacing: .02em; color: var(--muted); }
.powered b { font-weight: 700; } .powered .os { color: var(--gold-text); }
.powered.on-dark { color: var(--on-dark); } .powered.on-dark .os { color: var(--gold); }
.app-foot { display: flex; justify-content: center; padding: 24px 0 8px; }
.hero-watermark.brand-symbol { opacity: .14; object-fit: contain; }
.print-logo { height: 48px; width: auto; max-width: 260px; }
.thermal .t-logo img { max-width: 70%; max-height: 64px; filter: grayscale(1) contrast(1.4); }
.has-brand .auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; }
@media (max-width: 760px) {
  .top-logo, .brand-casa .brand-plate { height: 34px; max-width: 170px; }
  .auth-brand-logo { height: 56px; max-width: 260px; }
  .auth-lockup .brand-plate { height: 64px; }
}

/* Owner Console · Marca */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.brand-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.brand-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.brand-slot { display: grid; gap: 8px; }
.brand-thumb { height: 72px; border: 1px dashed var(--line-2); border-radius: 8px; display: grid; place-items: center; padding: 8px; background: #fff; }
.brand-thumb.on-dark { background: var(--navy); }
.brand-thumb img { max-height: 56px; max-width: 100%; object-fit: contain; }
.color-pick { width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; }
.brand-preview { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--page); }
.bp-bar { background: var(--navy); color: #fff; display: flex; align-items: center; gap: 14px; padding: 10px 14px; min-height: 52px; }
.bp-bar .top-logo, .bp-bar .brand-plate { height: 30px; max-width: 150px; }
.bp-bar .brand-plate .brand-logo { height: 22px; }
.bp-nav { display: flex; gap: 12px; font-size: 13px; color: var(--on-dark); flex: 1; }
.bp-cur { color: #fff; font-weight: 700; border-bottom: 3px solid var(--gold); padding-bottom: 2px; }
.bp-av { width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: var(--avatar-ink, var(--navy)); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.bp-body { padding: 14px; display: grid; gap: 12px; }
.bp-hero { position: relative; overflow: hidden; background: var(--navy); color: #fff; border-radius: 10px; padding: 16px; display: flex; gap: 12px; align-items: center; }
.bp-mark { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px; }
.bp-eyebrow { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark); }
.bp-btn { background: var(--blue); color: #fff; border-radius: 8px; padding: 10px 14px; font-weight: 600; font-size: 13px; }
.bp-link { color: var(--blue); font-weight: 600; font-size: 13px; align-self: center; }
@media (max-width: 760px) { .brand-grid, .brand-slots { grid-template-columns: 1fr; } }

/* Cajas y bóveda: tarjetas, ficha, asistente y configuración */
.loc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp-3); }
.loc-card { font-size: var(--fs-sm); }
.loc-ic { width: 32px !important; height: 32px !important; border-radius: var(--r-md) !important; }
.loc-ic svg { width: 16px !important; height: 16px !important; }
.loc-card.is-off { opacity: .7; }
.loc-head { display: flex; align-items: center; gap: 12px; }
.loc-title { flex: 1; min-width: 0; }
.loc-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex: none; }
.loc-ic.vault { background: var(--navy); color: var(--gold); }
.loc-ic svg { width: 20px; height: 20px; }
.loc-code { margin-left: 8px; font-size: 12px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.loc-bals { display: grid; gap: 6px; }
.loc-staff { display: flex; align-items: center; gap: 6px; }
.loc-staff svg { width: 14px; height: 14px; flex: none; }
.loc-bal { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--line); padding-bottom: 4px; }
.group-title { margin: 8px 0 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lvl-row { display: flex; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.lvl-row:last-child { border-bottom: 0; }
.lvl-main { flex: 1; display: grid; gap: 6px; }
.lvl-nums { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.lvl-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.lvl-fill { display: block; height: 100%; background: var(--blue); border-radius: 4px; }
.lvl-bar.over .lvl-fill { background: var(--amber); } .lvl-bar.under .lvl-fill { background: var(--red); }
.wiz-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.wiz-steps li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); border-top: 3px solid var(--line); padding-top: 8px; }
.wiz-steps li span { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--line); color: var(--ink); flex: none; }
.wiz-steps li.on { color: var(--ink); font-weight: 700; border-top-color: var(--blue); }
.wiz-steps li.on span { background: var(--blue); color: #fff; }
.wiz-steps li.done { border-top-color: var(--green); } .wiz-steps li.done span { background: var(--green); color: #fff; }
.wiz-foot { margin-right: auto; }
.cfg-sec { display: grid; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cfg-sec h4 { margin: 0; font-size: 14px; color: var(--navy); }
.check-row { cursor: pointer; }
.form-row.wrap { flex-wrap: wrap; }
@media (max-width: 760px) { .wiz-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .loc-grid { grid-template-columns: 1fr; } }
.lvl-fill.w0 { width: 0%; }
.lvl-fill.w5 { width: 5%; }
.lvl-fill.w10 { width: 10%; }
.lvl-fill.w15 { width: 15%; }
.lvl-fill.w20 { width: 20%; }
.lvl-fill.w25 { width: 25%; }
.lvl-fill.w30 { width: 30%; }
.lvl-fill.w35 { width: 35%; }
.lvl-fill.w40 { width: 40%; }
.lvl-fill.w45 { width: 45%; }
.lvl-fill.w50 { width: 50%; }
.lvl-fill.w55 { width: 55%; }
.lvl-fill.w60 { width: 60%; }
.lvl-fill.w65 { width: 65%; }
.lvl-fill.w70 { width: 70%; }
.lvl-fill.w75 { width: 75%; }
.lvl-fill.w80 { width: 80%; }
.lvl-fill.w85 { width: 85%; }
.lvl-fill.w90 { width: 90%; }
.lvl-fill.w95 { width: 95%; }
.lvl-fill.w100 { width: 100%; }
.page-narrow { max-width: 880px; }

/* ── Ajuste «fit»: más información arriba, menos cajas ── */
.main { padding-top: var(--sp-3); gap: var(--sp-3); }
.form { gap: var(--sp-3); }
.grid-2 { gap: var(--sp-3); }
@media (max-width: 760px) { .pagehead .fresh { display: none; } .pagehead { min-height: 44px; } .ph-eyebrow { display: none; } }

/* Hoy: primeros pasos en una franja */
.setup-bar { display: flex; align-items: center; gap: var(--sp-3); padding: 10px var(--sp-4); flex-wrap: wrap; }
.setup-bar-t { flex: 1; min-width: 220px; display: grid; gap: 2px; }
.setup-meter-ring { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 700; color: var(--blue); border: 3px solid var(--blue-soft); border-top-color: var(--blue); flex: none; }
.setup-list[hidden] { display: none; }
.setup-list { border-top: 1px solid var(--line); }
.setup-list li { padding: 8px var(--sp-4); }

/* Hoy: tarjeta oscura en una sola fila (nombre a la izquierda, cifras a la derecha) */
@media (min-width: 1000px) {
  .hero.hero-row { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2.2fr); align-items: stretch; }
  .hero.hero-row .hero-top { align-items: center; }
  .hero.hero-row .hero-kpis { border-top: 0; border-left: 1px solid #ffffff26; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .hero.hero-row .hero-kpis > div { display: grid; align-content: center; }
}

/* Avance del día en una franja */
.day-strip { display: flex; align-items: center; gap: var(--sp-4); padding: 8px var(--sp-4); flex-wrap: wrap; }
.day-strip-t { display: flex; align-items: center; gap: 6px; flex: none; }
.day-strip-t h3 { margin: 0; font-size: var(--fs-md); }
.day-strip-flow { flex: 1; min-width: 280px; }
.day-strip .flow-compact { margin-top: 0; max-width: none; }

/* Tarjetas que solo dicen «nada pendiente»: una línea */
.card:has(> .card-head + .empty:last-child) { display: flex; align-items: center; flex-wrap: wrap; }
.card:has(> .card-head + .empty:last-child) > .card-head { border-bottom: 0; flex: none; padding-right: var(--sp-2); }
.card:has(> .card-head + .empty:last-child) > .empty { padding: var(--sp-2) var(--sp-4) var(--sp-2) 0; flex: 1; }
.card > .empty .empty-ic, .card:has(> .card-head + .empty:last-child) .empty-ic { width: 24px; height: 24px; }
.card > .empty .empty-ic svg { width: 14px; height: 14px; }
.card > .empty { padding-top: var(--sp-3); padding-bottom: var(--sp-3); }

/* Dos columnas en pantallas anchas */
.cols-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); align-items: start; }
@media (min-width: 1200px) { .cols-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* Auditoría: controles en cuadrícula */
.controls-grid { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.controls-grid > .row { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 10px var(--sp-3); align-items: flex-start; }
.controls-grid .row-sub { font-size: var(--fs-xs); }
.controls-grid .control-ic svg { width: 16px; height: 16px; }

/* Cuadre en tabla */
.acct-table td { vertical-align: middle; }
.acct-table .acct { border: 0; }
.acct-table .acct-actions { justify-content: flex-end; }
.acct-table .blind { padding: 6px 10px; font-size: var(--fs-sm); }
@media (min-width: 761px) { tr.acct { display: table-row; padding: 0; background: none; } }
@media (max-width: 760px) { tr.acct { gap: 6px; } }

/* CSV y PDF en la fila de filtros */
.range-exp { margin-left: auto; align-self: flex-end; }
.range-exp:empty { display: none; }

/* F. Controles más finos en la computadora (el teléfono sigue en 44 px) */
@media (min-width: 761px) {
  .btn { min-height: var(--h-sm); padding: 0 12px; }
  .input:not(.input-xl), select.input { min-height: 38px; padding-top: 6px; padding-bottom: 6px; }
  .card-head .btn:not(.btn-primary) { min-height: 32px; }
  .row .btn:not(.btn-primary) { min-height: 32px; }
}

/* G. Acabado: bordes más suaves y cifras alineadas */
.card { border-color: var(--line); box-shadow: 0 1px 3px rgb(15 42 33 / 7%), 0 1px 1px rgb(15 42 33 / 4%); }
td.num, th.num { font-variant-numeric: tabular-nums; }
.setup:empty, .card:empty { display: none; }

/* Cuadre: billetes en dos columnas y el total siempre visible abajo */
.denom-grid { display: grid; gap: 8px; }
@media (min-width: 761px) { .denom-grid { gap: 6px; } .denom-grid .denom .input { min-height: 34px; padding-top: 4px; padding-bottom: 4px; } }
.count-sum { position: sticky; bottom: 0; background: var(--card); padding-top: 8px; border-top: 1px solid var(--line); z-index: 1; }

/* Franja de pendientes en Ventanilla */
.pending-strip { display: flex; align-items: center; gap: var(--sp-3); padding: 8px var(--sp-4); border: 1px solid var(--amber-line, #f2d3a6); background: var(--amber-soft, #fff7ed); border-radius: var(--r-md); flex-wrap: wrap; }
.pending-n { min-width: 24px; height: 24px; border-radius: 12px; background: var(--amber, #B54708); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; padding: 0 6px; }
.pending-t { flex: 1; min-width: 200px; font-size: var(--fs-sm); }

/* Tipo de operación con color */
.kind-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; }
.kind-buy { background: var(--green-soft, #E7F4EC); color: var(--green, #157347); }
.kind-sell { background: var(--info-soft, #E6EEF4); color: var(--info, #1F4E6B); }
.empty-line { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--fs-sm); padding: 4px 2px; }
.empty-line svg { width: 14px; height: 14px; color: var(--green); }
.count-miss { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.count-miss .btn-link svg { width: 14px; height: 14px; }

/* Cliente VIP: oro sobre blanco (#7A5A00 pasa 4.5:1) */
.b-gold { background: #FBF3D6; color: #7A5A00; border: 1px solid #E8D18A; font-weight: 700; letter-spacing: .02em; }
.fchip-vip[aria-pressed="true"] { background: #7A5A00; border-color: #7A5A00; color: #fff; }

/* Ventanilla con un poco más de vida: moneda elegida con fondo de marca y montos rápidos más claros */
.fx-tile.on { background: color-mix(in srgb, var(--blue) 6%, var(--card)); }
.fx-tile.on .fx-rate-v, .fx-tile.on b { color: var(--navy); }
.quick-btn { background: var(--card); border: 1px solid var(--line-2); }
.quick-btn:hover { border-color: var(--blue); color: var(--blue); }

/* Centro de reportes */
.rep-groups { display: flex; gap: 8px; flex-wrap: wrap; }
.rep-check { align-self: flex-end; min-height: 38px; font-size: var(--fs-sm); }
.rep-formula { display: flex; align-items: center; gap: 6px; }
.rep-cash td, .rep-cash th { white-space: nowrap; }
.rep-matrix tfoot td, .rep-cash tfoot td { font-weight: 700; }
tr.row-off td { color: var(--muted); }
tr.row-off td * { color: inherit; }
tr.row-sub-total td { color: var(--info); font-style: italic; }
.amber-t { color: var(--amber); }
.kpi.warn .k-value { color: #F5C26B; }
.rep-cash td:last-child { white-space: normal; min-width: 150px; }
.pending-x { min-height: 32px; width: 32px; padding: 0; justify-content: center; border-color: transparent; background: transparent; }
.pending-x svg { width: 14px; height: 14px; }

/* Cambio entre divisas: desglose a la vista */
.ex-break { display: grid; gap: 2px; margin-top: 6px; font-size: var(--fs-sm); }
.ex-break > div { display: flex; justify-content: space-between; gap: 12px; }
.ex-break .ex-total { border-top: 1px solid #ffffff33; padding-top: 4px; margin-top: 2px; }
.ex-break .ex-round { opacity: .8; font-size: var(--fs-xs); }

/* Modo caja (Caja y Supervisor en Ventanilla): todo el ancho, montos y botones grandes */
.caja-mode .main { max-width: none; padding-left: var(--sp-5); padding-right: var(--sp-5); }
@media (min-width: 761px) {
  .caja-mode .fx-tile { padding: 14px 16px; }
  .caja-mode .fx-tile.on { padding: 13px 15px; }
  .caja-mode .fx-rate { font-size: 30px; }
  .caja-mode .fx-rate-l, .caja-mode .fx-tile .fx-name { font-size: 13px; }
  .caja-mode .input-xl { min-height: 68px; font-size: 32px; padding-left: 76px; }
  .caja-mode .t-amt .input, .caja-mode .amt-input .input-xl { padding-left: 76px; }
  .caja-mode .amt-prefix { font-size: 22px; }
  .caja-mode .result { padding: 24px; }
  .caja-mode .result-amt { font-size: 42px; }
  .caja-mode .v-submit { min-height: 56px; font-size: 18px; }
  .caja-mode .segment button { min-height: 48px; font-size: 16px; }
  .caja-mode .quick-btn { min-height: 40px; font-size: 15px; padding: 6px 18px; }
}
.head-pend svg { width: 14px; height: 14px; }

/* Pendientes: aviso arriba, lista con color por tipo y bienvenida al lado */
.pend-page { max-width: 1100px; }
.pend-banner { display: flex; align-items: center; gap: var(--sp-3); padding: 14px var(--sp-4); border-radius: var(--r-lg); border: 1px solid; border-left-width: 5px; background: var(--card); box-shadow: 0 1px 3px rgb(15 42 33 / 8%); }
.pend-banner > div { flex: 1; min-width: 0; }
.pend-banner-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.pend-banner-ic svg { width: 20px; height: 20px; }
.pend-banner-t { font-size: var(--fs-lg); font-weight: 700; }
.pend-banner-s { font-size: var(--fs-sm); color: var(--muted); }
.pend-banner.is-alert { border-color: var(--amber-line); border-left-color: var(--amber); background: var(--amber-soft); }
.pend-banner.is-alert .pend-banner-ic { background: var(--amber); color: #fff; }
.pend-banner.is-info { border-color: var(--info-line); border-left-color: var(--info); }
.pend-banner.is-info .pend-banner-ic { background: var(--info-soft); color: var(--info); }
.pend-banner.is-ok { border-color: var(--green-line); border-left-color: var(--green); }
.pend-banner.is-ok .pend-banner-ic { background: var(--green-soft); color: var(--green); }
.pend-grid { display: grid; gap: var(--sp-3); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) { .pend-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.pend-row { border-left: 4px solid transparent; }
.pend-row.tone-red { border-left-color: var(--red); background: color-mix(in srgb, var(--red) 4%, var(--card)); }
.pend-row.tone-amber { border-left-color: var(--amber); background: color-mix(in srgb, var(--amber) 5%, var(--card)); }
.pend-row.tone-blue { border-left-color: var(--blue); }
.pend-row.tone-gray { border-left-color: var(--line-2); }

/* Franja y botón de pendientes: que se lean como aviso */
.pending-strip { border-left-width: 5px; border-left-color: var(--amber); box-shadow: 0 1px 3px rgb(15 42 33 / 8%); padding: 10px var(--sp-4); }
.pending-ic { color: var(--amber); display: grid; place-items: center; }
.pending-ic svg { width: 20px; height: 20px; }
.pending-t { font-size: var(--fs-md); }
.head-pend { background: var(--amber-soft); border-color: var(--amber-line); color: var(--amber); font-weight: 700; gap: 6px; }
.head-pend:hover { background: color-mix(in srgb, var(--amber) 12%, #fff); }
.head-pend svg { width: 16px; height: 16px; }
.head-pend-n { min-width: 20px; height: 20px; border-radius: 10px; background: var(--red); color: #fff; font-size: 12px; display: grid; place-items: center; padding: 0 6px; }

/* Código de activación (personas sin correo) */
.access-code .code-big { font: 800 32px/1.2 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .14em; text-align: center; color: var(--navy, #0c2f48); background: #F3F6FA; border: 1px solid #e5e7eb; border-radius: 10px; padding: 16px 8px; }
.access-code .code-kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.access-code .code-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: #4b5563; }

/* Personas que salieron (plegado) */
.gone-card > summary { cursor: pointer; list-style: none; }
.gone-card > summary::-webkit-details-marker { display: none; }
.gone-card > summary::after { content: "Ver"; margin-left: auto; font-size: 13px; font-weight: 700; color: var(--blue, #0E6B4C); }
.gone-card[open] > summary::after { content: "Ocultar"; }

/* ───────────── Cuadres: panel por caja o bóveda y ventana de conteo ───────────── */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cnt-summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cnt-progress { min-width: 240px; flex: 0 1 320px; display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 10px; }
.cnt-progress-n { font-variant-numeric: tabular-nums; color: var(--muted); font-size: var(--fs-lg); }
.cnt-progress-n b { font-size: 26px; line-height: 1; color: var(--ink); }
.cnt-progress-l { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.cnt-bar { grid-column: 1 / -1; height: 8px; margin-top: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.cnt-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--green)); transition: width .5s ease; }
.cnt-bar.is-full span { background: var(--green); }
.cnt-locs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.cnt-loc { display: grid; border-left: 4px solid var(--amber-line); }
.cnt-loc.is-ok { border-left-color: var(--green); }
.cnt-loc-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px 4px; flex-wrap: wrap; }
.cnt-loc-act { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.cnt-loc-act > .btn-primary { min-height: var(--h-md); }
.cnt-loc-t h3 { display: flex; align-items: center; gap: 8px; }
.cnt-summary-card { padding: 12px 16px; }
.cnt-summary-t h3 { margin: 0 0 2px; }
.cnt-loc-ic { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--navy); color: var(--gold); }
.cnt-loc-ic svg { width: 20px; height: 20px; }
.cnt-loc-t { flex: 1; min-width: 0; }
.cnt-loc-t h3 { margin: 0; font-size: var(--fs-xl); }
.cnt-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; padding: 8px 16px 14px; align-content: start; }
.cnt-tile { position: relative; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--amber-line); background: var(--raised); gap: 8px; }
.cnt-tile.is-cuadrada, .cnt-tile.is-revisada { border-left-color: var(--green); background: var(--card); }
.cnt-tile.is-por_revisar { border-left-color: var(--red); }
.cnt-tile-top { display: flex; align-items: center; gap: 8px; }
.cnt-tile-name { flex: 1; min-width: 0; font-size: var(--fs-lg); }
.cnt-tile-top .more-menu summary { min-height: 32px; width: 32px; padding: 0; justify-content: center; }
.cnt-tile-amt { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 8px; flex-wrap: wrap; }
.cnt-tile-amt b { font-size: var(--fs-xl); font-variant-numeric: tabular-nums; white-space: normal; overflow-wrap: anywhere; text-align: right; }
.cnt-tile-top .badge { flex: none; }
.cnt-tile-flow { text-align: left; white-space: normal; }
.cnt-tile .blind { padding: 10px; font-size: var(--fs-sm); }
.cnt-loc-foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.cnt-loc-foot > .btn-primary { flex: 1 1 auto; justify-content: center; min-height: var(--h-lg); font-size: var(--fs-lg); }
.cnt-allok { display: flex; align-items: center; gap: 8px; color: var(--green); font-weight: 700; flex: 1; }
.cnt-allok svg { width: 20px; height: 20px; }

.cnt-steps .flow { max-width: none; }
.cnt-cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cnt-count-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.cnt-grid { display: grid; gap: 6px; }
.cnt-row { grid-template-columns: 92px 12px minmax(64px, 1fr) minmax(96px, auto); padding: 4px 6px; border-radius: var(--r-md); transition: background .15s; }
.cnt-row.has-qty { background: var(--blue-soft); }
.cnt-bill { display: grid; place-items: center; height: 36px; border-radius: 6px; border: 1px solid #E9D9A3; background: linear-gradient(135deg, var(--gold-soft), #fff); color: var(--ink); font-weight: 800; font-size: var(--fs-md); text-align: center; }
.cnt-bill-loose { background: var(--raised); border-color: var(--line); color: var(--gray); font-weight: 700; }
.cnt-x { color: var(--muted); text-align: center; }
.cnt-qty { text-align: right; font-weight: 700; font-size: var(--fs-lg); }
.cnt-sub { color: var(--gray); font-size: var(--fs-sm); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cnt-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--navy); color: #fff; }
.cnt-total span { color: var(--on-dark); font-weight: 600; }
.cnt-total b { font-size: 26px; color: #fff; font-variant-numeric: tabular-nums; }
.cnt-compare { min-height: var(--h-lg); justify-content: center; font-size: var(--fs-lg); width: 100%; }

.cnt-result { border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); overflow: hidden; }
.cnt-result.is-hidden { padding: 16px; display: grid; gap: 10px; background: var(--raised); border-style: dashed; }
.cnt-result-head { display: flex; align-items: center; gap: 14px; padding: 18px; flex-wrap: wrap; }
.cnt-result-head > div { flex: 1; min-width: 160px; }
.cnt-result-ic { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.cnt-result-ic svg { width: 30px; height: 30px; stroke-width: 2.6; }
.cnt-result-t { font-size: var(--fs-3xl); font-weight: 800; line-height: 1.1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.cnt-result.is-ok { border-color: var(--green-line); }
.cnt-result.is-ok .cnt-result-head { background: var(--green-soft); color: var(--green); }
.cnt-result.is-ok .cnt-result-ic { background: var(--green); animation: cnt-pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.cnt-result.is-ok .cnt-result-ic path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: cnt-draw .4s .25s ease-out forwards; }
.cnt-result.is-short, .cnt-result.is-over { border-color: var(--red-line); }
.cnt-result.is-short .cnt-result-head, .cnt-result.is-over .cnt-result-head { background: var(--red-soft); color: var(--red); }
.cnt-result.is-over .cnt-result-head { background: var(--amber-soft); color: var(--amber); }
.cnt-result.is-short .cnt-result-ic { background: var(--red); animation: cnt-shake .4s ease-in-out both; }
.cnt-result.is-over .cnt-result-ic { background: var(--amber); animation: cnt-shake .4s ease-in-out both; }
.cnt-result-head .btn-link { color: inherit; font-weight: 700; }
.cnt-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cnt-stats > div { display: grid; gap: 4px; padding: 12px 16px; }
.cnt-stats > div + div { border-left: 1px solid var(--line); }
.cnt-stats span { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cnt-stats b { font-size: var(--fs-lg); text-align: left; }
.is-ok .cnt-stat-diff b { color: var(--green); }
.is-short .cnt-stat-diff b { color: var(--red); }
.is-over .cnt-stat-diff b { color: var(--amber); }
.cnt-debe { padding: 12px 16px 16px; }
.cnt-why { display: grid; gap: 8px; }
.cnt-why-opt { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); cursor: pointer; }
.cnt-why-opt.is-on { border-color: var(--blue); background: var(--blue-soft); font-weight: 700; }
@keyframes cnt-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes cnt-draw { to { stroke-dashoffset: 0; } }
@keyframes cnt-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .cnt-result-ic, .cnt-result-ic path { animation: none !important; stroke-dashoffset: 0 !important; } .cnt-bar span { transition: none; } }
@media (max-width: 900px) { .cnt-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .cnt-summary { align-items: stretch; }
  .cnt-progress { flex: 1 1 100%; }
  .cnt-tiles { grid-template-columns: minmax(0, 1fr); padding: 10px 12px; }
  .cnt-loc-head { padding: 14px 12px 2px; }
  .cnt-loc-act { margin-left: 0; flex: 1 1 100%; }
  .cnt-loc-act > .btn { flex: 1 1 100%; justify-content: center; min-height: var(--h-lg); }
  .cnt-row { grid-template-columns: 76px 10px minmax(56px, 1fr) minmax(84px, auto); padding: 3px 4px; gap: 6px; }
  .cnt-total b { font-size: 22px; }
  .cnt-result-t { font-size: var(--fs-2xl); }
  .cnt-result-ic { width: 44px; height: 44px; }
  .cnt-stats > div { padding: 10px; }
  .cnt-stats b { font-size: var(--fs-md); white-space: normal; overflow-wrap: anywhere; }
}
.login-note { display: flex; align-items: center; gap: 8px; }
.login-note svg { width: 16px; height: 16px; flex: none; }

.cnt-tile-last { display: flex; align-items: center; gap: 4px; }

/* ───────────── Ayuda ───────────── */
.top-help { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid #ffffff2e; background: #ffffff14; color: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.top-help:hover { background: #ffffff24; }
.top-help svg { width: 16px; height: 16px; }
.help-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 420px); gap: 16px; align-items: center; }
.help-head h2 { margin: 0 0 2px; }
.help-groups { display: grid; gap: 20px; }
.help-group { display: grid; gap: 8px; }
.help-gt { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-lg); }
.help-guide { padding: 0; }
.help-guide summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; font-weight: 700; font-size: var(--fs-md); }
.help-guide summary::-webkit-details-marker { display: none; }
.help-guide summary svg { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; flex: none; }
.help-guide[open] summary svg { transform: rotate(90deg); }
.help-guide[open] summary { border-bottom: 1px solid var(--line); }
.help-body { display: grid; gap: 12px; padding: 14px 16px 16px; }
.help-steps { margin: 0; padding: 0; list-style: none; counter-reset: paso; display: grid; gap: 10px; }
.help-steps li { counter-increment: paso; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; line-height: 1.45; }
.help-steps li::before { content: counter(paso); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; }
.help-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-md); background: var(--info-soft); color: var(--info); font-size: var(--fs-sm); }
.help-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
@media (max-width: 760px) { .help-head { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .dv-root .top-help { display: none; } }

/* Etiquetas largas en computadora, cortas en el teléfono. */
.lbl-short { display: none; }
@media (max-width: 760px) { .lbl-long { display: none; } .lbl-short { display: inline; } }

/* Perfil del negocio */
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.req { color: var(--red); }

/* Entrada: solo la marca, centrada en su panel (sin frases ni promociones). */
@media (min-width: 761px) {
  .auth-side > .auth-lockup { margin: auto 0; align-self: center; }
  .auth-side .auth-brand-logo { height: 96px; max-width: 420px; }
}

/* Modo soporte de DivisaOS (solo ver) */
.support-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 10px;
  background: #1F4E6B; color: #fff; font-size: 14px; }
.support-bar svg { width: 18px; height: 18px; flex: none; }
.support-bar .btn-link { color: #fff; text-decoration: underline; margin-left: auto; }

/* Densidad de escritorio: controles compactos y uniformes (en el teléfono se quedan de 44 px para el dedo). */
@media (min-width: 761px) {
  .btn { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 7px; }
  .btn svg { width: 15px; height: 15px; }
  .btn-link { min-height: 28px; }
  .input, select.input { min-height: 38px; padding: 6px 10px; font-size: 14px; }
  .segment button { min-height: 34px; }
  .segment.segment-wide button { min-height: 36px; }
  .count-chip { min-height: 34px; padding: 4px 8px 4px 10px; }
  .card-head { padding: 10px var(--sp-4); min-height: 48px; }
  .card-head h3 { font-size: 15px; }
  .card-body { padding: 14px var(--sp-4); }
  td { padding: 8px var(--sp-3); }
  th { padding: 7px var(--sp-3); }
  .main { gap: 14px; }
  .form { gap: 12px; }
  .field { gap: 5px; }
  .dialog-body { gap: 12px; }
  .notice { padding: 9px 12px; font-size: 13px; line-height: 1.45; }
  .notice svg { width: 16px; height: 16px; }
  .dialog-head { padding: 14px var(--sp-4) 12px; }
  .dialog-body { padding: 14px var(--sp-4); }
  .dialog-foot { padding: 10px var(--sp-4); }
  .role-opt { min-height: 40px; padding: 8px 10px; }
  .more-item { min-height: 36px; padding: 8px 10px; }
  .row-sub { font-size: 12.5px; }
}
.check.sub-check { padding-left: 26px; }
