/* Aportes Colación 2027 · BTI */
:root {
  color-scheme: light;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eef0f3;
  --border: #e2e4e8;
  --border-strong: #cfd3d9;
  --text: #111418;
  --text-2: #474c54;
  --text-3: #6a7079;
  --brand: #1c5cab;
  --brand-strong: #184f95;
  --brand-soft: #e7f0fb;
  --brand-text: #1c5cab;
  --series-1: #2a78d6;
  --track: #cde2fb;
  --good: #0ca30c;
  --good-text: #006300;
  --good-soft: #e5f5e5;
  --warn: #fab219;
  --warn-text: #7a4d00;
  --warn-soft: #fff4d9;
  --crit: #d03b3b;
  --crit-text: #b02a2a;
  --crit-soft: #fdeaea;
  --wa: #128c4a;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .07);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .18);
  --radius: 12px;
  --radius-sm: 8px;
  --nav-w: 240px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
/* Modo oscuro: solo si el usuario lo activa (por defecto, modo claro) */
:root[data-tema="oscuro"] {
    color-scheme: dark;
    --bg: #111213;
    --surface: #1a1a19;
    --surface-2: #212120;
    --surface-3: #2a2a29;
    --border: #2f302e;
    --border-strong: #42433f;
    --text: #f0efec;
    --text-2: #c3c2b7;
    --text-3: #9d9c93;
    --brand: #3987e5;
    --brand-strong: #5598e7;
    --brand-soft: #16263b;
    --brand-text: #86b6ef;
    --series-1: #3987e5;
    --track: #1b3350;
    --good-text: #5fcf5f;
    --good-soft: #13281a;
    --warn-text: #fab219;
    --warn-soft: #2e2512;
    --crit-text: #f08a8a;
    --crit-soft: #351a1a;
    --wa: #25a35a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-size: 1.45rem; font-weight: 700; }
h2 { font-size: 1.12rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 .6em; }
a { color: var(--brand-text); }
button, input, select, textarea { font: inherit; color: inherit; }
svg.ico { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--text-3); }
.small { font-size: .86rem; }
.right { text-align: right; }
.oculto { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Estructura ---------- */
.app { min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: var(--brand); color: #fff;
}
:root[data-tema="oscuro"] .topbar { background: #14365f; }
.topbar .marca { display: flex; align-items: center; gap: 10px; font-weight: 700; color: #fff; text-decoration: none; min-width: 0; }
.topbar .marca img { width: 30px; height: 30px; border-radius: 8px; }
.topbar .marca span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .espacio { flex: 1; }
.topbar .icon-btn { color: #fff; }
.topbar .icon-btn:hover { background: rgba(255, 255, 255, .14); }
.topbar .quien { font-size: .85rem; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }

.layout { display: flex; }
.sidenav { display: none; }
.contenido { flex: 1; min-width: 0; padding: 16px 16px 96px; max-width: 1180px; margin: 0 auto; width: 100%; }

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px;
  font-size: .7rem; color: var(--text-3); text-decoration: none; min-height: 56px; justify-content: center;
}
.bottomnav a.activo { color: var(--brand-text); font-weight: 600; }
.bottomnav a.mas-grande span.circulo {
  width: 46px; height: 46px; margin-top: -20px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; box-shadow: var(--shadow-lg);
}
.bottomnav a.mas-grande svg.ico { width: 24px; height: 24px; }

@media (min-width: 900px) {
  .sidenav {
    display: block; position: sticky; top: 50px; align-self: flex-start; width: var(--nav-w); flex: none;
    height: calc(100vh - 50px); overflow-y: auto; padding: 14px 10px; border-right: 1px solid var(--border); background: var(--surface);
  }
  .sidenav a {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm);
    color: var(--text-2); text-decoration: none; font-weight: 500; margin-bottom: 2px;
  }
  .sidenav a:hover { background: var(--surface-3); }
  .sidenav a.activo { background: var(--brand-soft); color: var(--brand-text); font-weight: 650; }
  .sidenav a.destacado { background: var(--brand); color: #fff; margin-bottom: 12px; justify-content: center; }
  .sidenav a.destacado:hover { background: var(--brand-strong); }
  .sidenav .sep { height: 1px; background: var(--border); margin: 10px 4px; }
  .bottomnav { display: none; }
  .contenido { padding: 24px 28px 48px; }
}

/* ---------- Encabezados de página ---------- */
.pagina-h { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.pagina-h .titulos { flex: 1; min-width: 200px; }
.pagina-h .sub { color: var(--text-3); margin-top: 4px; font-size: .92rem; }
.pagina-h .acciones-h { display: flex; gap: 8px; flex-wrap: wrap; }
.volver { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); text-decoration: none; font-size: .9rem; margin-bottom: 8px; }

/* ---------- Tarjetas ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }
.card > .card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.card > .card-h h2, .card > .card-h h3 { flex: 1; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-2-1 { grid-template-columns: 2fr 1fr; } }

/* Stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); min-width: 0; }
.tile .lbl { color: var(--text-3); font-size: .82rem; }
.tile .val { font-size: clamp(1rem, 4.3vw, 1.22rem); font-weight: 650; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .det { color: var(--text-3); font-size: .8rem; margin-top: 2px; }
.tile.hero .val { font-size: clamp(1.02rem, 4.5vw, 1.36rem); }
.tile a { color: inherit; text-decoration: none; }

/* Medidor */
.medidor { height: 10px; background: var(--track); border-radius: 999px; overflow: hidden; }
.medidor > span { display: block; height: 100%; background: var(--series-1); border-radius: 999px; min-width: 0; }
.medidor.ok > span { background: var(--good); }
.medidor-txt { display: flex; justify-content: space-between; font-size: .82rem; color: var(--text-3); margin-top: 6px; gap: 8px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-weight: 550; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-3); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primario { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primario:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn-peligro { background: var(--crit); border-color: var(--crit); color: #fff; }
.btn-peligro:hover { filter: brightness(.95); background: var(--crit); }
.btn-wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn-wa:hover { filter: brightness(.95); background: var(--wa); }
.btn-ok { background: var(--good-text); border-color: var(--good-text); color: #fff; }
.btn-ok:hover { filter: brightness(1.05); background: var(--good-text); }
.btn-grande { min-height: 52px; font-size: 1.05rem; padding: 12px 20px; width: 100%; }
.btn-sm { min-height: 32px; padding: 4px 10px; font-size: .86rem; }
.btn-link { border: 0; background: none; color: var(--brand-text); padding: 4px 6px; min-height: 0; }
.btn-link:hover { background: none; text-decoration: underline; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-sm); border: 0;
  background: transparent; color: var(--text-2); cursor: pointer; flex: none;
}
.icon-btn:hover { background: var(--surface-3); }
.acciones { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }

/* ---------- Formularios ---------- */
.campo { margin-bottom: 14px; }
.campo > label, .lbl-campo { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--text-2); }
.campo .ayuda { font-size: .8rem; color: var(--text-3); margin-top: 4px; }
input:not([type]), input[type=text], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=url], input[type=search], select, textarea {
  width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); outline: none;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.input-monto { font-size: 1.6rem !important; font-weight: 650; font-variant-numeric: tabular-nums; min-height: 56px !important; }
.fila-campos { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .fila-campos { grid-template-columns: 1fr 1fr; } .fila-campos.tres { grid-template-columns: 1fr 1fr 1fr; } }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }

/* Chips / segmentados */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-weight: 550; font-size: .9rem; color: var(--text);
  text-decoration: none;
}
.chip:hover { background: var(--surface-3); }
.chip.sel { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .sub { font-weight: 400; opacity: .8; font-size: .8rem; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; flex-wrap: wrap; }
.seg button { border: 0; background: var(--surface); padding: 8px 14px; min-height: 40px; cursor: pointer; font-weight: 550; border-right: 1px solid var(--border); }
.seg button:last-child { border-right: 0; }
.seg button.sel { background: var(--brand); color: #fff; }

/* ---------- Insignias de estado ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.badge svg.ico { width: 14px; height: 14px; stroke-width: 2.5; }
.b-ok { background: var(--good-soft); color: var(--good-text); }
.b-warn { background: var(--warn-soft); color: var(--warn-text); }
.b-crit { background: var(--crit-soft); color: var(--crit-text); }
.b-neutro { background: var(--surface-3); color: var(--text-2); }
.b-brand { background: var(--brand-soft); color: var(--brand-text); }

/* ---------- Tablas ---------- */
.tabla-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
table.tabla { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tabla th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .02em; color: var(--text-3); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tabla td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla tbody tr.click { cursor: pointer; }
.tabla tbody tr.click:hover td { background: var(--surface-2); }
.tabla tfoot td { font-weight: 650; border-top: 2px solid var(--border-strong); border-bottom: 0; }
.tabla .acc { white-space: nowrap; text-align: right; }
.celda-nombre { font-weight: 600; }
.celda-sub { font-size: .8rem; color: var(--text-3); }

/* Lista tipo tarjeta (móvil) */
.lista { display: flex; flex-direction: column; }
.item {
  display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit; cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left;
}
.item:last-child { border-bottom: 0; }
.item:hover { background: var(--surface-2); }
.item { flex-wrap: wrap; }
.item .principal { flex: 1 1 150px; min-width: 0; }
.item .lado.chips { justify-content: flex-end; margin-left: auto; }
.item .principal .t { font-weight: 600; overflow-wrap: anywhere; }
.item .principal .s { font-size: .82rem; color: var(--text-3); overflow-wrap: anywhere; }
.item .lado { text-align: right; flex: none; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); font-weight: 700; flex: none; font-size: .9rem; }

.solo-escritorio { display: none; }
@media (max-width: 759px) { .col-ext { display: none; } }
@media (min-width: 760px) { .solo-escritorio { display: block; } .solo-movil { display: none !important; } table.solo-escritorio { display: table; } }

/* Barra de filtros */
.filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filtros .buscar { flex: 1; min-width: 200px; position: relative; }
.filtros .buscar svg.ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.filtros .buscar input { padding-left: 38px; }
.filtros select { width: auto; min-width: 140px; }

/* ---------- Registro rápido ---------- */
.buscador-grande { position: relative; }
.buscador-grande input { font-size: 1.1rem; min-height: 54px; padding-left: 44px; }
.buscador-grande svg.ico { position: absolute; left: 14px; top: 17px; color: var(--text-3); }
.resultados { margin-top: 8px; }
.resultados .grupo { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); font-weight: 700; margin: 10px 4px 2px; }
.resultados .item.foco { background: var(--brand-soft); }
.sel-alumno { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius); background: var(--brand-soft); margin-bottom: 14px; }
.sel-alumno .principal { flex: 1; min-width: 0; }
.sel-alumno .t { font-weight: 700; font-size: 1.05rem; }
.resumen-cuenta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.resumen-cuenta div { background: var(--surface); border-radius: var(--radius-sm); padding: 6px 8px; }
.resumen-cuenta .l { font-size: .72rem; color: var(--text-3); }
.resumen-cuenta .v { font-weight: 650; font-size: .92rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.exito { text-align: center; padding: 18px 8px; }
.exito .icono-ok { width: 64px; height: 64px; border-radius: 50%; background: var(--good-soft); color: var(--good-text); display: grid; place-items: center; margin: 0 auto 10px; }
.exito .icono-ok svg.ico { width: 34px; height: 34px; stroke-width: 3; }

/* Foto del comprobante */
.foto-prev { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.foto-prev img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.subir-foto { position: relative; overflow: hidden; }
.subir-foto input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Invitados */
.contador { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.contador button { width: 40px; height: 40px; border: 0; background: var(--surface-2); font-size: 1.3rem; cursor: pointer; color: var(--text); }
.contador button:hover { background: var(--surface-3); }
.contador input { width: 52px; min-height: 40px; border: 0; border-radius: 0; text-align: center; font-weight: 650; padding: 0; -moz-appearance: textfield; }
.contador input::-webkit-outer-spin-button, .contador input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.contador.grande button { width: 52px; height: 52px; }
.contador.grande input { width: 64px; min-height: 52px; font-size: 1.3rem; }
.guardando { opacity: .6; }

/* Gráfico */
.grafico { position: relative; }
.grafico svg { width: 100%; display: block; overflow: visible; }
.grafico .eje { fill: var(--text-3); font-size: 11px; }
.grafico .grid-l { stroke: var(--border); stroke-width: 1; }
.grafico .barra { fill: var(--series-1); }
.grafico .hit { fill: transparent; cursor: default; }
.grafico .hit:hover + .barra, .grafico .barra.hover { filter: brightness(1.12); }
.tooltip {
  position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg);
  border-radius: var(--radius-sm); padding: 8px 10px; font-size: .84rem; white-space: nowrap; z-index: 5; transform: translate(-50%, calc(-100% - 10px));
}
.tooltip .tt-t { color: var(--text-3); font-size: .76rem; }
.tooltip .tt-v { font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 100; background: rgba(10, 14, 20, .5); display: flex; align-items: flex-end; justify-content: center; }
.modal {
  background: var(--surface); width: 100%; max-height: 92vh; overflow: auto; border-radius: 16px 16px 0 0; box-shadow: var(--shadow-lg);
  padding-bottom: env(safe-area-inset-bottom); animation: subir .18s ease-out;
}
@keyframes subir { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-h { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-h h3 { flex: 1; font-size: 1.05rem; }
.modal-b { padding: 16px; }
@media (min-width: 700px) {
  .modal-bg { align-items: center; padding: 24px; }
  .modal { border-radius: 16px; max-width: 560px; }
  .modal.modal-lg { max-width: 860px; }
  .modal.modal-xl { max-width: 1100px; }
}
.comprobante-img { max-width: 100%; border-radius: var(--radius-sm); display: block; margin: 0 auto; }

/* ---------- Avisos ---------- */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 84px; z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 440px); pointer-events: none; }
@media (min-width: 900px) { #toasts { bottom: 24px; } }
.toast { background: #1e2329; color: #fff; padding: 12px 14px; border-radius: 10px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: flex-start; animation: subir .18s ease-out; pointer-events: auto; }
.toast.ok { background: #0f5f22; }
.toast.error { background: #a32525; }
.aviso { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: .92rem; }
.aviso.info { background: var(--brand-soft); color: var(--text); }
.aviso.warn { background: var(--warn-soft); color: var(--text); }
.aviso.warn svg.ico { color: var(--warn-text); }
.aviso.crit { background: var(--crit-soft); color: var(--text); }
.offline { background: #7a4d00; color: #fff; text-align: center; font-size: .85rem; padding: 6px; }
.vacio { text-align: center; padding: 28px 12px; color: var(--text-3); }

/* ---------- Pantallas de ingreso ---------- */
.ingreso { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: linear-gradient(180deg, var(--brand) 0 38%, var(--bg) 38%); }
:root[data-tema="oscuro"] .ingreso { background: linear-gradient(180deg, #14365f 0 38%, var(--bg) 38%); }
.ingreso .caja { width: 100%; max-width: 420px; }
.ingreso .logo { text-align: center; color: #fff; margin-bottom: 18px; }
.ingreso .logo img { width: 72px; height: 72px; border-radius: 18px; box-shadow: var(--shadow-lg); }
.ingreso .logo h1 { margin-top: 10px; font-size: 1.35rem; }
.ingreso .logo p { opacity: .9; margin: 4px 0 0; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-3); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 16px; }
.tabs button { border: 0; background: none; padding: 9px; border-radius: 6px; cursor: pointer; font-weight: 600; color: var(--text-2); }
.tabs button.sel { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.input-pin { letter-spacing: .5em; font-size: 1.4rem !important; text-align: center; font-weight: 700; }

/* Portal de padres */
.hijo-card .nombre { font-size: 1.2rem; font-weight: 700; }
.saldo-grande { font-size: 1.9rem; font-weight: 750; font-variant-numeric: tabular-nums; margin: 4px 0 2px; }
.saldo-grande.ok { color: var(--good-text); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: .94rem; }
.kv .k { color: var(--text-2); }
.kv .v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.kv .total { border-top: 1px solid var(--border); padding-top: 6px; font-weight: 700; }
.datos-pago { white-space: pre-wrap; font-family: ui-monospace, Consolas, monospace; font-size: .9rem; background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; }

.cargando-pantalla { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--text-3); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--brand); animation: girar .8s linear infinite; }
.spinner.sm { width: 18px; height: 18px; border-width: 2px; }
@keyframes girar { to { transform: rotate(360deg); } }
.pin-grande { font-size: 2.4rem; font-weight: 800; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; padding: 8px; background: var(--surface-2); border-radius: var(--radius); margin: 8px 0; }
.etiqueta-mini { font-size: .72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.variantes { display: flex; flex-wrap: wrap; gap: 4px; }
.variantes span { background: var(--surface-3); border-radius: 6px; padding: 1px 6px; font-size: .8rem; }
.solo-print { display: none; }

@media print {
  body { background: #fff; color: #000; font-size: 12px; }
  .topbar, .sidenav, .bottomnav, .no-print, #toasts, .acciones-h, .btn, .icon-btn, .filtros { display: none !important; }
  .contenido { padding: 0; max-width: none; }
  .card, .tile { box-shadow: none; border-color: #bbb; break-inside: avoid; }
  .solo-print { display: block; margin-bottom: 12px; }
  .tabla-wrap { overflow: visible; }
  a { color: #000; text-decoration: none; }
}
