/*
 * Estilos de Tera según el diseño aprobado (TERA_DISENO.md y design/*.dc.html).
 * Todos los valores salen de tokens.css: aquí no hay colores sueltos.
 */

/* ---------- Fuentes (servidas por Tera, licencia OFL en /assets/fonts) ---------- */
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('/assets/fonts/manrope-latin.woff2') format('woff2');
}
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-mono-400-latin.woff2') format('woff2');
}
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-mono-500-latin.woff2') format('woff2');
}
@font-face {
    font-family: 'IBM Plex Mono';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-mono-600-latin.woff2') format('woff2');
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-ui);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
}

h1 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; }
h2 { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.3; }
h3 { margin: 0; font-size: 16px; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 2px; }
code, .mono { font-family: var(--font-mono); font-size: 13px; font-weight: 500; }
strong { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

.muted, .lead { color: var(--muted); }
.lead { font-size: 15px; }
.small { font-size: 13px; }
.inline { display: inline; }
.nowrap { white-space: nowrap; }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.stack--sm { gap: var(--s-2); }
.stack--lg { gap: var(--s-6); }
.row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.row--between { justify-content: space-between; }

/* Montos, fechas, horas, IDs y códigos (3.2) */
.money { font-family: var(--font-mono); font-weight: 600; white-space: nowrap; }
.num { text-align: right; white-space: nowrap; }
td.num, .money-cell { font-family: var(--font-mono); font-weight: 600; }
.date, .id { font-family: var(--font-mono); font-size: 13px; font-weight: 500; white-space: nowrap; }
.amount { font-family: var(--font-mono); font-size: 34px; font-weight: 600; letter-spacing: -1px; line-height: 1.2; }
.negative { color: var(--bad-solid); }

/* ---------- Logo ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { flex: none; }
.brand__name { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; line-height: 1; }
.brand--dark { color: var(--nav-logo-text); }
.brand--small .brand__name { font-size: 18px; }
.brand-tag {
    background: var(--warn-bg); color: var(--warn-fg); font-size: 11px; font-weight: 800;
    letter-spacing: 0.6px; padding: 3px 7px; border-radius: var(--r-xs);
}

/* ---------- Estructura del panel y la consola ---------- */
.shell { min-height: 100vh; display: flex; }

.nav {
    flex: 0 0 var(--nav-width);
    width: var(--nav-width);
    padding: 28px 18px;
    background: var(--nav-bg);
    color: var(--nav-logo-text);
    display: flex; flex-direction: column; gap: var(--s-7);
    position: sticky; top: 0; align-self: flex-start;
    min-height: 100vh; max-height: 100vh; overflow-y: auto;
}
.nav__brand-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--nav-logo-text); padding: 0 var(--s-2); }
.nav__brand:hover { color: var(--nav-logo-text); }
.nav__word { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; line-height: 1; }
.nav__toggle {
    flex: none; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
    background: var(--nav-active); border: 1px solid var(--nav-toggle-border); color: var(--surface);
    border-radius: var(--r-sm); padding: 0; cursor: pointer;
}
.nav__toggle .icon-open, html.nav-collapsed .nav__toggle .icon-closed { display: block; }
.nav__toggle .icon-closed, html.nav-collapsed .nav__toggle .icon-open { display: none; }
.nav__group { display: flex; flex-direction: column; gap: var(--s-1); font-size: 15px; }
.nav__group--foot { border-top: 1px solid var(--nav-line); padding-top: 18px; }
.nav__item {
    display: flex; align-items: center; gap: var(--s-3); text-decoration: none;
    border-radius: var(--r-sm); padding: 11px 12px; color: var(--nav-text); font-weight: 500;
}
.nav__item svg { flex: none; }
.nav__item:hover { background: var(--nav-hover); color: var(--surface); }
.nav__item[aria-current="page"] { background: var(--nav-active); color: var(--surface); font-weight: 700; }
.nav__label { white-space: nowrap; }

/* Menú colapsado (76 px): solo íconos centrados */
html.nav-collapsed .nav { flex-basis: var(--nav-width-collapsed); width: var(--nav-width-collapsed); padding: 28px 12px; }
html.nav-collapsed .nav__brand-row { flex-direction: column; align-items: center; gap: 14px; }
html.nav-collapsed .nav__brand { padding: 0; justify-content: center; }
html.nav-collapsed .nav .nav__word,
html.nav-collapsed .nav .nav__label,
html.nav-collapsed .nav .brand-tag { display: none; }
html.nav-collapsed .nav__item { justify-content: center; }

/* Botón de menú para pantallas chicas */
.mobile-bar { display: none; }

.main {
    flex: 999 1 560px; min-width: 0;
    padding: var(--s-8) var(--s-10) var(--s-12);
    display: flex; flex-direction: column; gap: var(--s-6);
}
.main--internal { border-top: 4px solid var(--warn-strong); }
.main--home { gap: var(--s-7); }

/* Cuenta y sesión, arriba a la derecha */
.account { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--s-4); font-size: 13px; color: var(--muted); margin-bottom: calc(-1 * var(--s-3)); }
.account__user { font-weight: 600; color: var(--ink-2); }
.account a, .account .link-button { font-weight: 700; font-size: 13px; }

/* Cabecera de página */
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-4); }
.page-header--center { align-items: center; }
.page-header__titles { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; }
.page-header__eyebrow { font-size: 14px; color: var(--muted); font-weight: 600; }
.page-header__eyebrow a { color: var(--muted); text-decoration: none; }
.page-header__eyebrow a:hover { color: var(--accent); }
.page-header__sub { font-size: 14px; color: var(--muted); }
.page-header__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.page-header h1 .badge { vertical-align: middle; margin-left: var(--s-2); }

/* Columnas: principal + lateral */
.columns { display: flex; flex-wrap: wrap; gap: var(--s-5); align-items: flex-start; }
.columns__main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: var(--s-5); }
.columns__side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: var(--s-5); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--s-5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
@media (max-width: 1100px) { .grid-3 { grid-template-columns: 1fr; } }

/* ---------- Tarjetas ---------- */
.card, .panel {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
    padding: 22px var(--s-6); display: flex; flex-direction: column; gap: 14px; min-width: 0;
}
.card--table { padding: 22px 0 var(--s-2); gap: 0; }
.card--table > .card__head { padding: 0 var(--s-6) 14px; }
.card--table > .card__foot { padding: 14px var(--s-6); }
.card--table > .card__body { padding: 0 var(--s-6) 14px; }
.card--filters { padding: var(--s-4) var(--s-5); flex-direction: row; flex-wrap: wrap; gap: var(--s-3); align-items: flex-end; }
.card__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-3); }
.card__head-note { font-size: 13px; color: var(--muted); }
.card__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-3); font-size: 14px; }
.card--large { border-radius: var(--r-2xl); }
.block { background: var(--surface-2); border-radius: var(--r-lg); padding: 14px var(--s-4); }
.counter { background: var(--warn-bg); color: var(--warn-fg); font-weight: 800; font-size: 13px; padding: 4px 10px; border-radius: var(--r-pill); }

/* Indicadores */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-4); }
.stat {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
    padding: var(--s-5) 22px; display: flex; flex-direction: column; gap: var(--s-2); min-width: 0;
}
.stat__label { font-size: 14px; color: var(--muted); font-weight: 600; }
.stat__value { font-family: var(--font-mono); font-size: 26px; font-weight: 600; letter-spacing: -0.5px; line-height: 1.25; overflow-wrap: anywhere; }
.stat__sub { font-size: 13px; color: var(--muted); }
.stat__value--bad { color: var(--bad-solid); }

/* Datos clave en dos columnas */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px var(--s-5); margin: 0; }
.facts > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.facts dt, .facts__label { font-size: 12px; color: var(--muted); font-weight: 600; }
.facts dd, .facts__value { margin: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.details { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 10px var(--s-4); margin: 0; font-size: 14px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* Barra de avance */
progress.progress { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 10px; border: 0; background: var(--line-head); border-radius: var(--r-pill); overflow: hidden; color: var(--accent); }
progress.progress::-webkit-progress-bar { background: var(--line-head); border-radius: var(--r-pill); }
progress.progress::-webkit-progress-value { background: var(--accent); }
progress.progress::-moz-progress-bar { background: var(--accent); }
progress.progress--sm { height: 8px; }
.heading-link { color: inherit; text-decoration: none; }
.heading-link:hover { color: var(--accent); }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
    text-align: left; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.6px; padding: 10px 12px; border-bottom: 1px solid var(--line-head); white-space: nowrap;
}
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th:first-child, .table td:first-child { padding-left: var(--s-6); }
.table th:last-child, .table td:last-child { padding-right: var(--s-6); }
.table th.num, .table td.num { text-align: right; }
.table--wide { min-width: 760px; }
.table--xwide { min-width: 980px; }
.table--compact td { padding-top: var(--s-2); padding-bottom: var(--s-2); }
.table--inset th:first-child, .table--inset td:first-child { padding-left: 0; }
.table--inset th:last-child, .table--inset td:last-child { padding-right: 0; }
.table tbody tr:last-child td { border-bottom: 0; }
.table--lined tbody tr:last-child td { border-bottom: 1px solid var(--line); }
.cell-title { font-weight: 600; }
.cell-sub { display: block; font-size: 12px; color: var(--muted); }
.cell-stack { display: flex; flex-direction: column; }
.table a.id, .table .id a { font-weight: 600; }
.table input {
    font: inherit; font-size: 14px; padding: 8px 10px; border: 1.5px solid var(--border-strong);
    border-radius: var(--r-sm); width: 100%; min-width: 6rem; background: var(--surface); color: var(--ink);
}
.row-target:target td { background: var(--alert-warn-bg); }

/* Paginación */
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-3); font-size: 14px; color: var(--muted); }
.pager__links { display: flex; gap: var(--s-2); }

/* ---------- Botones (3.5) ---------- */
.button {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
    min-height: 44px; padding: 12px 18px; border-radius: var(--r-md);
    font-family: inherit; font-size: 14px; font-weight: 700; line-height: 1.3; text-align: center;
    text-decoration: none; white-space: nowrap; cursor: pointer;
    background: var(--surface); color: var(--ink); border: 1.5px solid var(--border-strong);
}
.button:hover { color: var(--ink); border-color: var(--muted); }
.button--primary { background: var(--accent); color: var(--surface); border: 1.5px solid var(--accent); }
.button--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--surface); }
.button--dark { background: var(--ink); color: var(--surface); border: 1.5px solid var(--ink); }
.button--dark:hover { background: var(--nav-active); border-color: var(--nav-active); color: var(--surface); }
.button--outline-dark { border-color: var(--ink); }
.button--danger { background: var(--surface); color: var(--bad-fg); border: 1.5px solid var(--danger-border); }
.button--danger:hover { color: var(--bad-fg); border-color: var(--bad-solid); }
.button--link { background: transparent; color: var(--accent); border-color: transparent; }
.button--link:hover { color: var(--accent-hover); border-color: transparent; }
.button:disabled, .button[aria-disabled="true"] { background: var(--disabled-bg); color: var(--disabled-fg); border-color: var(--disabled-bg); cursor: not-allowed; }
.button--small { min-height: 0; padding: 8px 12px; font-size: 13px; border-radius: var(--r-sm); }
.button--block { display: flex; width: 100%; }
.button--large { font-size: 15px; padding: 13px 20px; }
.link-button {
    font: inherit; font-weight: 700; background: none; border: 0; padding: 0;
    color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
.link-button:hover { color: var(--accent-hover); }
.link-button--danger { color: var(--bad-fg); }
.link-strong { font-weight: 700; font-size: 14px; }

/* ---------- Campos (3.6) ---------- */
.form { display: flex; flex-direction: column; gap: 18px; }
.form--wide { max-width: 720px; }
.form--inline { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3); }
.form__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.field { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; margin: 0; }
.field > label, .field > legend, .field__label { font-size: 14px; font-weight: 700; color: var(--ink); }
fieldset.field { border: 0; padding: 0; }
fieldset.field legend { padding: 0; margin-bottom: var(--s-2); }
.field input:not([type="checkbox"]):not([type="radio"]),
.field select, .field textarea, textarea, .input {
    border: 1.5px solid var(--border-strong); border-radius: var(--r-md); padding: 12px;
    font-family: inherit; font-size: 15px; color: var(--ink); background: var(--surface);
    width: 100%; line-height: 1.4;
}
.field input:focus, .field select:focus, .field textarea:focus, textarea:focus, .input:focus {
    border-color: var(--accent); outline: 3px solid var(--accent-light); outline-offset: 2px;
}
.field [aria-invalid="true"] { border-color: var(--bad-solid) !important; }
.field input:disabled, .field select:disabled, .field textarea:disabled { background: var(--bg); color: var(--disabled-fg); }
.field input.mono, .field--mono input, input[inputmode="decimal"] { font-family: var(--font-mono); }
.field__error { font-size: 13px; color: var(--bad-fg); font-weight: 600; margin: 0; }
.field__hint { font-size: 13px; color: var(--muted); margin: 0; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.select { position: relative; display: block; }
.select select { appearance: none; padding-right: 36px; }
.select::after {
    content: '▾'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    color: var(--muted); pointer-events: none;
}
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; flex: none; }
.choice-inline { display: flex; gap: 10px; align-items: center; font-size: 15px; font-weight: 400; }
.choice-inline--top { align-items: flex-start; }
.choice-inline--top input { margin-top: 2px; }

/* Opciones grandes (radio en tarjeta) */
.option {
    display: flex; gap: var(--s-3); align-items: flex-start; padding: 14px var(--s-4);
    border: 1.5px solid var(--border-strong); border-radius: var(--r-lg); background: var(--surface); cursor: pointer;
}
.option:has(input:checked) { border: 2px solid var(--accent); background: var(--accent-soft); padding: 13.5px 15.5px; }
.option__title { font-weight: 700; font-size: 15px; display: block; }
.option__text { font-size: 13px; color: var(--muted); display: block; }

/* Filtros sobre tablas */
.filters { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: flex-end; }
.filters .field { flex: 1 1 180px; }
.filters__search { flex: 1 1 300px !important; }
.filters__actions { display: flex; gap: var(--s-3); align-items: center; }

/* ---------- Etiquetas de estado (3.7) ---------- */
.badge {
    display: inline-block; padding: 4px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700;
    white-space: nowrap; background: var(--ref-bg); color: var(--ref-fg); line-height: 1.4; vertical-align: middle;
}
.badge--ok, .badge--succeeded, .badge--paid, .badge--active, .badge--approved, .badge--confirmed { background: var(--ok-bg); color: var(--ok-fg); }
.badge--warn, .badge--pending, .badge--processing, .badge--requires_action, .badge--created, .badge--partially_paid, .badge--validated { background: var(--warn-bg); color: var(--warn-fg); }
.badge--bad, .badge--failed, .badge--overdue, .badge--past_due, .badge--declined, .badge--expired { background: var(--bad-bg); color: var(--bad-fg); }
.badge--ref, .badge--refunded, .badge--partially_refunded, .badge--paused, .badge--waived, .badge--canceled, .badge--archived, .badge--disabled { background: var(--ref-bg); color: var(--ref-fg); }
.badge--info, .badge--test, .badge--new { background: var(--info-bg); color: var(--info-fg); }

/* ---------- Avisos ---------- */
.notice, .alert {
    border-radius: var(--r-md); padding: 14px var(--s-4); display: flex; flex-direction: column; gap: var(--s-1);
    font-size: 14px; color: var(--ink-2); background: var(--alert-info-bg);
}
.notice strong:first-child, .alert__title { font-weight: 700; }
.notice--info { background: var(--alert-info-bg); } .notice--info strong:first-child { color: var(--info-fg); }
.notice--ok { background: var(--alert-ok-bg); } .notice--ok strong:first-child { color: var(--ok-fg); }
.notice--warn { background: var(--alert-warn-bg); } .notice--warn strong:first-child { color: var(--warn-fg); }
.notice--error { background: var(--alert-bad-bg); } .notice--error strong:first-child { color: var(--bad-fg); }
.notice ul { margin: 0; padding-left: 18px; }
.notice p { margin: 0; }
.errors-box { border-left: 0; }
.import-errors { margin: 0; padding-left: var(--s-4); color: var(--bad-fg); font-size: 13px; font-weight: 600; }

/* Aviso temporal (toast): abajo al centro, 4 s */
.toast {
    position: fixed; left: 50%; bottom: var(--s-6); transform: translateX(-50%); z-index: 50;
    background: var(--ink); color: var(--surface); border-radius: var(--r-md); padding: 14px var(--s-4);
    display: flex; justify-content: space-between; align-items: center; gap: var(--s-3);
    font-size: 14px; max-width: calc(100vw - 32px); width: max-content;
    animation: toast-out 0.3s ease 4s forwards;
}
.toast a, .toast button { color: var(--accent-light); font-weight: 700; background: none; border: 0; font: inherit; cursor: pointer; }
@keyframes toast-out { to { opacity: 0; visibility: hidden; } }

/* ---------- Estados de pantalla (3.8) ---------- */
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: var(--s-7); }
.empty svg { color: var(--icon-empty); }
.empty strong { font-size: 16px; }
.empty span, .empty p { font-size: 14px; color: var(--muted); max-width: 46ch; }
.skeleton { background: var(--line); border-radius: var(--r-xs); height: 12px; }

/* ---------- Pestañas tipo píldora y selector de moneda ---------- */
.pills { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.pills a, .pills button {
    border: 1.5px solid var(--border-strong); border-radius: var(--r-pill); padding: 8px 14px;
    font-family: inherit; font-weight: 600; font-size: 13px; background: var(--surface); color: var(--ink);
    text-decoration: none; cursor: pointer; white-space: nowrap;
}
.pills a[aria-current="page"], .pills [aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); font-weight: 700; }
.segmented { display: flex; background: var(--surface); border: 1px solid var(--segment-border); border-radius: var(--r-md); padding: 4px; }
.segmented a, .segmented button {
    border: 0; border-radius: 7px; padding: 9px 14px; font-family: inherit; font-weight: 600; font-size: 14px;
    cursor: pointer; background: transparent; color: var(--ink-2); text-decoration: none; white-space: nowrap;
}
.segmented [aria-current="true"], .segmented [aria-pressed="true"] { background: var(--ink); color: var(--surface); font-weight: 700; }
.tabs-inline { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tabs-inline a {
    border: 1.5px solid var(--border-strong); border-radius: var(--r-pill); padding: 8px 14px;
    font-weight: 600; font-size: 13px; background: var(--surface); color: var(--ink); text-decoration: none;
}
.tabs-inline a[aria-current="page"] { background: var(--ink); color: var(--surface); border-color: var(--ink); font-weight: 700; }
.tabs-inline .count { font-family: var(--font-mono); font-weight: 500; }

/* Pasos (carga masiva, asistente) */
.steps-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-3); }
.steps-row li { background: var(--bg); border-radius: var(--r-lg); padding: 14px var(--s-4); display: flex; gap: var(--s-3); }
.steps-row li.is-done { background: var(--accent-soft); }
.step-dot {
    flex: none; width: 28px; height: 28px; border-radius: var(--r-pill); background: var(--ink); color: var(--surface);
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px;
}
.is-done .step-dot { background: var(--accent); }
.is-todo .step-dot { background: var(--border-strong); color: var(--surface); }
.steps-row strong { font-size: 14px; display: block; }
.steps-row span.small { color: var(--muted); }

/* Menú de acciones en filas (details) */
.actions-menu { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.actions-menu details { position: relative; }
.actions-menu summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--accent); list-style: none; }
.actions-menu summary::-webkit-details-marker { display: none; }
.actions-menu details[open] > form, .actions-menu details[open] > div {
    margin-top: var(--s-2); padding: 14px; border: 1px solid var(--border); border-radius: var(--r-lg);
    background: var(--surface); display: flex; flex-direction: column; gap: 10px; min-width: 260px;
}
details > summary { cursor: pointer; }
details.disclosure > summary { color: var(--accent); font-weight: 700; font-size: 14px; }

/* Compartir link y QR */
.share { display: grid; grid-template-columns: 1fr auto; gap: var(--s-6); align-items: start; }
.share__qr { margin: 0; text-align: center; display: flex; flex-direction: column; gap: var(--s-2); align-items: center; }
.share__qr svg { width: 200px; height: 200px; max-width: 100%; }
.share__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.copy-row { display: flex; gap: var(--s-2); }
.copy-row input {
    flex: 1; min-width: 0; border: 1.5px solid var(--border-strong); border-radius: var(--r-md);
    padding: 10px 12px; font-family: var(--font-mono); font-size: 13px; color: var(--ink); background: var(--surface-2);
}

/* Ítems de lista en tarjetas laterales */
.list-items { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.list-item { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--r-md); }
.list-item--warn { background: var(--warn-item-bg); }
.list-item strong { font-weight: 700; }
.list-item span { color: var(--muted); }
.kv { display: flex; justify-content: space-between; gap: var(--s-3); font-size: 14px; }
.kv > span:first-child { color: var(--muted); }
.kv > span:last-child { font-family: var(--font-mono); font-weight: 600; text-align: right; }

/* Tarjetas de planes */
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-4); }
.plan-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s-5); display: flex; flex-direction: column; gap: 10px; }
.plan-card__head { display: flex; justify-content: space-between; gap: var(--s-2); align-items: flex-start; }
.plan-card__name { font-size: 16px; font-weight: 700; }
.plan-card__price { font-family: var(--font-mono); font-size: 22px; font-weight: 600; }
.plan-card__meta { font-size: 13px; color: var(--muted); }
.plan-card__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-1); }

/* Página «Disponible pronto» */
.soon { max-width: 560px; }

/* ---------- Acceso (login, 2FA, elegir comercio) ---------- */
.auth { min-height: 100vh; display: flex; background: var(--bg); }
.auth__side {
    flex: 1 1 480px; background: var(--nav-bg); color: var(--nav-text); padding: var(--s-12);
    display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-8);
}
.auth__main { flex: 1 1 560px; display: flex; align-items: center; justify-content: center; padding: var(--s-10) var(--s-4); }
.auth__form { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: var(--s-6); }
.auth__form--wide { max-width: 640px; }
.auth__title { display: flex; flex-direction: column; gap: var(--s-2); }
.auth__title h1 { font-size: 32px; }
.auth__title p { color: var(--muted); font-size: 15px; }
.auth__foot { font-size: 13px; color: var(--muted); }
.otp { display: flex; gap: 10px; }
.otp input {
    width: 52px; height: 60px; text-align: center; font-family: var(--font-mono); font-size: 24px; font-weight: 600;
    border: 1.5px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); color: var(--ink);
}
.otp input:focus { border-color: var(--accent); outline: 3px solid var(--accent-light); outline-offset: 2px; }
.secret { display: block; padding: var(--s-3); background: var(--surface-2); border-radius: var(--r-md); font-family: var(--font-mono); font-size: 16px; letter-spacing: 0.08em; word-break: break-all; }
.codes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-2); }
.codes code { display: block; padding: 10px; background: var(--surface-2); border-radius: var(--r-sm); text-align: center; font-size: 14px; }
.steps { padding-left: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); margin: 0; }
.qr svg { display: block; width: 200px; height: 200px; max-width: 100%; }
.choice-list { display: flex; flex-direction: column; gap: var(--s-3); }
.choice {
    display: flex; flex-direction: column; gap: 2px; text-align: left; font: inherit; cursor: pointer; width: 100%;
    padding: 14px var(--s-4); border: 1.5px solid var(--border-strong); border-radius: var(--r-lg); background: var(--surface); color: var(--ink);
}
.choice:hover { border-color: var(--accent); background: var(--accent-soft); }
.choice__title { font-weight: 700; font-size: 15px; }
.choice__meta { color: var(--muted); font-size: 13px; }

/* Página simple centrada (errores, avisos) */
.page--centered { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--s-6) var(--s-4); gap: var(--s-5); }
.card--narrow { width: 100%; max-width: 480px; padding: var(--s-8); gap: var(--s-4); }
.page__footnote { color: var(--muted); font-size: 13px; }

.debug { white-space: pre-wrap; background: var(--surface-2); padding: var(--s-3); font-family: var(--font-mono); font-size: 13px; border-radius: var(--r-md); }

/* ---------- Responsivo (3.11) ---------- */
@media (max-width: 1279px) {
    html:not(.nav-expanded) .nav { flex-basis: var(--nav-width-collapsed); width: var(--nav-width-collapsed); padding: 28px 12px; }
    html:not(.nav-expanded) .nav__brand-row { flex-direction: column; align-items: center; gap: 14px; }
    html:not(.nav-expanded) .nav__brand { padding: 0; justify-content: center; }
    html:not(.nav-expanded) .nav .nav__word,
    html:not(.nav-expanded) .nav .nav__label,
    html:not(.nav-expanded) .nav .brand-tag { display: none; }
    html:not(.nav-expanded) .nav__item { justify-content: center; }
    html:not(.nav-expanded) .nav__toggle .icon-open { display: none; }
    html:not(.nav-expanded) .nav__toggle .icon-closed { display: block; }
}
@media (max-width: 1023px) {
    .columns__main, .columns__side { flex-basis: 100%; }
}
@media (max-width: 767px) {
    .shell { flex-direction: column; }
    .mobile-bar {
        display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
        background: var(--nav-bg); padding: var(--s-3) var(--s-4); position: sticky; top: 0; z-index: 30;
    }
    .mobile-bar__menu {
        min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
        background: var(--nav-active); border: 1px solid var(--nav-toggle-border); color: var(--surface);
        border-radius: var(--r-sm); font: inherit; font-weight: 700; font-size: 14px; padding: 0 var(--s-3); cursor: pointer;
    }
    /* Sin JavaScript el menú se ve completo arriba; con JavaScript es un panel lateral. */
    .nav, html.nav-collapsed .nav, html:not(.nav-expanded) .nav {
        position: static; width: 100%; flex-basis: auto; min-height: 0; max-height: none; padding: var(--s-4) 18px;
    }
    html.js .nav {
        position: fixed; inset: 0 auto 0 0; width: 280px; max-width: 86vw; z-index: 40; min-height: 100vh; max-height: 100vh;
        transform: translateX(-100%); transition: transform 0.2s ease; padding: 28px 18px;
    }
    html.js.nav-open .nav { transform: none; }
    html.js.nav-open .nav-scrim { display: block; }
    .nav .nav__word, .nav .nav__label, .nav .brand-tag { display: inline !important; }
    .nav .nav__item { justify-content: flex-start !important; }
    .nav .nav__brand-row { flex-direction: row !important; }
    .nav .nav__toggle { display: none; }
    .main { padding: var(--s-6) var(--s-4) var(--s-10); }
    .account { justify-content: flex-start; margin-bottom: 0; }
    .page-header h1 { font-size: 28px; }
    .facts { grid-template-columns: 1fr; }
    .share { grid-template-columns: 1fr; }
    .codes { grid-template-columns: 1fr; }
    .auth__side { display: none; }
    .card--narrow { padding: var(--s-6); }
}
.nav-scrim { display: none; position: fixed; inset: 0; background: var(--scrim); z-index: 35; border: 0; padding: 0; }

/* Pagos */
.table--payments { min-width: 900px; }
.row-id { font-weight: 700; text-decoration: none; font-family: var(--font-mono); font-size: 13px; }
.date-range { display: flex; align-items: center; gap: var(--s-2); }
.date-range input { min-width: 0; font-family: var(--font-mono); }
.filters__dates { flex: 1 1 300px; }
.field--narrow { flex: 1 1 140px; }
.card--filters > .field { flex: 1 1 170px; }
.card--filters > .filters__search { flex: 1 1 260px; }
.card--filters > .filters__dates { flex: 1 1 300px; }
.card--filters > .field--narrow { flex: 1 1 140px; }
fieldset.field > legend { float: left; width: 100%; margin-bottom: var(--s-2); }
fieldset.field > legend + * { clear: both; }

/* Detalle de pago (design/DetallePago.dc.html) */
.back-link { font-size: 14px; font-weight: 700; text-decoration: none; }
.mono-title { font-family: var(--font-mono); font-weight: 600; font-size: 0.8em; letter-spacing: -0.5px; overflow-wrap: anywhere; }
.facts--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.facts--1 { grid-template-columns: minmax(0, 1fr); }
.money--lg { font-size: 22px; }
.date-cell { font-family: var(--font-mono); font-weight: 500; font-size: 13px; }
.link-quiet { font-weight: 700; text-decoration: none; font-size: 14px; }
.card > .card__head + * { margin-top: 2px; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline__item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.timeline__item:last-child { border-bottom: 0; }
.timeline__item > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.timeline__item strong { font-size: 14px; }
.timeline__item span { font-size: 13px; color: var(--muted); }
.timeline__dot { flex: none; width: 10px; height: 10px; border-radius: var(--r-pill); margin-top: 6px; background: var(--muted); }
.timeline__dot--ok { background: var(--accent); }
.timeline__dot--bad { background: var(--bad-solid); }
.timeline__dot--warn { background: var(--warn-solid); }
.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.flow__step { background: var(--bg); border-radius: var(--r-lg); padding: 14px var(--s-4); display: flex; flex-direction: column; gap: var(--s-1); }
.flow__label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.flow__value { font-family: var(--font-mono); font-size: 17px; font-weight: 600; white-space: nowrap; }
.flow__note { font-size: 12px; color: var(--muted); }
.card-line { display: flex; align-items: center; gap: 10px; }
.logo-slot {
    flex: none; width: 44px; height: 28px; border: 1.5px dashed var(--icon-empty); border-radius: var(--r-xs);
    display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: var(--muted);
}
.activity { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.activity > div { display: flex; justify-content: space-between; gap: 10px; }
.activity__when { font-family: var(--font-mono); color: var(--muted); white-space: nowrap; }
@media (max-width: 767px) { .facts--3 { grid-template-columns: 1fr; } }

/* Nuevo link de pago: asistente (design/CrearLink.dc.html) */
.wizard-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.wizard-step {
    width: 100%; display: flex; align-items: center; gap: var(--s-3); text-align: left; font-family: inherit; color: var(--ink);
    cursor: pointer; border-radius: var(--r-lg); padding: 14px var(--s-4); background: var(--surface); border: 1px solid var(--border);
}
.wizard-step[aria-current="step"] { border: 2px solid var(--accent); padding: 13px 15px; }
.wizard-step__dot {
    flex: none; width: 32px; height: 32px; border-radius: var(--r-pill); display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px; background: var(--line); color: var(--ink-2);
}
.wizard-step[aria-current="step"] .wizard-step__dot, .wizard-step.is-done .wizard-step__dot { background: var(--accent); color: var(--surface); }
.wizard-step__text { display: flex; flex-direction: column; gap: 2px; }
.wizard-step__text strong { font-size: 15px; }
.wizard-step__text span { font-size: 13px; color: var(--muted); }
html:not(.wizard-js) .wizard-steps { display: none; }
.wizard-layout { display: flex; flex-wrap: wrap; gap: var(--s-6); align-items: flex-start; }
.wizard {
    flex: 999 1 480px; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
    padding: var(--s-7); display: flex; flex-direction: column; gap: 22px; min-height: 520px;
}
.wizard__panel { display: flex; flex-direction: column; gap: 22px; }
.wizard__panel[hidden] { display: none; }
html:not(.wizard-js) .wizard__panel + .wizard__panel { border-top: 1px solid var(--line-head); padding-top: 22px; }
.wizard .field input:not([type="checkbox"]):not([type="radio"]), .wizard .field textarea { padding: 13px 12px; }
.wizard textarea { resize: vertical; line-height: 1.5; }
.wizard__row { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; }
.wizard__amount { flex: 1 1 200px; }
.wizard__nav { margin-top: auto; display: flex; gap: var(--s-3); justify-content: space-between; flex-wrap: wrap; border-top: 1px solid var(--line-head); padding-top: var(--s-5); }
.wizard__nav .button--large { padding: 14px 24px; font-size: 15px; }
html:not(.wizard-js) [data-back], html:not(.wizard-js) [data-next] { display: none; }
html:not(.wizard-js) .wizard__nav { justify-content: flex-end; }
.wizard__nav [hidden] { display: none; }
.choice-seg { display: flex; gap: var(--s-2); }
.choice-seg__option { position: relative; }
.choice-seg__option input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice-seg__option span {
    display: inline-block; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--ink);
    border-radius: var(--r-md); padding: 12px var(--s-4); font-weight: 600; font-size: 15px; white-space: nowrap;
}
.choice-seg__option input:checked + span { border: 2px solid var(--ink); background: var(--ink); color: var(--surface); font-weight: 700; padding: 11.5px 15.5px; }
.choice-seg__option input:focus-visible + span { outline: 3px solid var(--accent-light); outline-offset: 2px; }
.input-prefix { display: flex; align-items: center; border: 1.5px solid var(--border-strong); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.input-prefix:focus-within { border-color: var(--accent); outline: 3px solid var(--accent-light); outline-offset: 2px; }
.input-prefix > span { padding: 0 var(--s-3); font-family: var(--font-mono); font-weight: 600; color: var(--muted); }
.wizard .field .input-prefix input:not([type="checkbox"]), .field .input-prefix input:not([type="checkbox"]) {
    flex: 1; min-width: 0; border: 0; outline: none; padding: 13px 12px 13px 0; font-family: var(--font-mono); font-size: 18px; font-weight: 600; border-radius: 0;
}
.field .input-prefix input:focus { outline: none; }
.field .input-prefix:has([aria-invalid="true"]) { border-color: var(--bad-solid); }
.option-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-3); }
.option-grid--3 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.option-grid .option { padding: var(--s-4); position: relative; }
.option-grid .option input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.option-grid .option > span { display: flex; flex-direction: column; gap: var(--s-1); }
.option-grid .option:has(input:checked) { padding: 15px; }
.option:has(input:focus-visible) { outline: 3px solid var(--accent-light); outline-offset: 2px; }
.checks-box { border: 0; margin: 0; padding: var(--s-4) 18px; background: var(--surface-2); border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 10px; }
.checks-box legend { font-size: 14px; font-weight: 700; padding: 0 6px; float: none; width: auto; margin: 0; }
.field-row--3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.combo { position: relative; }
.combo__list {
    position: absolute; left: 0; right: 0; top: 76px; z-index: 20; list-style: none; margin: 0; padding: var(--s-1);
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); max-height: 280px; overflow-y: auto;
}
.combo__list li { display: flex; flex-direction: column; padding: 10px var(--s-3); border-radius: var(--r-sm); cursor: pointer; }
.combo__list li span { font-size: 13px; color: var(--muted); }
.combo__list li[aria-selected="true"], .combo__list li:hover { background: var(--accent-soft); }
.wizard-aside { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: var(--s-4); }
.summary { padding: var(--s-6); gap: var(--s-4); }
.summary__merchant { display: flex; align-items: center; gap: var(--s-3); }
.avatar {
    flex: none; width: 44px; height: 44px; border-radius: var(--r-md); background: var(--ink); color: var(--surface);
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px;
}
.summary__who { display: flex; flex-direction: column; }
.summary__who span { font-size: 13px; color: var(--muted); }
.summary__amount { display: flex; flex-direction: column; gap: var(--s-1); }
.summary__amount .muted { font-size: 14px; }
.summary__amount .amount { font-size: 32px; overflow-wrap: anywhere; }
.summary__grid { display: grid; grid-template-columns: auto 1fr; gap: var(--s-2) 14px; font-size: 14px; border-top: 1px solid var(--line); padding-top: 14px; margin: 0; }
.summary__grid dt { color: var(--muted); }
.summary__grid dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.preview-card { padding: var(--s-5) var(--s-6); gap: var(--s-3); }
.preview-card strong { font-weight: 800; font-size: 15px; }
.preview-card__links { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.preview-card__links .button { flex: 1 1 90px; padding: 11px; }
.preview-card[hidden] { display: none; }
@media (max-width: 767px) {
    .wizard-steps { grid-template-columns: 1fr; }
    .wizard { padding: var(--s-5); }
}

/* Vistas previas: WhatsApp (referencial) y QR imprimible */
body.bare { background: var(--bg); padding: var(--s-6) var(--s-4); display: flex; flex-direction: column; align-items: center; gap: var(--s-4); }
.avatar--round { width: 38px; height: 38px; border-radius: var(--r-pill); font-size: 13px; }
.avatar--xs { width: 28px; height: 28px; border-radius: 7px; font-size: 11px; }
.avatar--sm { width: 36px; height: 36px; border-radius: var(--r-pill); font-size: 12px; }
.phone { width: 390px; max-width: 100%; min-height: 720px; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--r-2xl); overflow: hidden; }
.phone--wa { background: var(--line-head); }
.wa-top { background: var(--surface); padding: 14px var(--s-4); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.wa-top__back { font-size: 20px; color: var(--muted); }
.wa-top__who { display: flex; flex-direction: column; }
.wa-top__who strong { font-size: 15px; }
.wa-top__who span { font-size: 12px; color: var(--muted); }
.wa-chat { flex: 1; padding: 18px 14px; display: flex; flex-direction: column; gap: 10px; justify-content: flex-end; }
.wa-day { align-self: center; background: var(--surface); border-radius: var(--r-sm); padding: 5px 10px; font-size: 12px; color: var(--muted); }
.wa-bubble { align-self: flex-start; max-width: 300px; background: var(--surface); border-radius: 4px 14px 14px 14px; padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.wa-card { border-radius: var(--r-md); overflow: hidden; background: var(--bg); }
.wa-card__hero { background: var(--ink); min-height: 130px; display: flex; flex-direction: column; justify-content: center; gap: var(--s-2); padding: 14px 18px; }
.wa-card__brand { display: flex; align-items: center; gap: var(--s-2); color: var(--surface); font-weight: 700; font-size: 14px; }
.wa-card__amount { font-family: var(--font-mono); color: var(--surface); font-size: 26px; font-weight: 600; letter-spacing: -1px; }
.wa-card__tag { color: var(--accent-light); font-size: 12px; font-weight: 700; }
.wa-card__meta { padding: 10px var(--s-3); display: flex; flex-direction: column; gap: 2px; }
.wa-card__meta strong { font-size: 14px; }
.wa-card__meta span { font-size: 12px; color: var(--muted); }
.wa-text { font-size: 14.5px; line-height: 1.5; padding: 2px 6px; margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.wa-link { color: var(--ok-fg); text-decoration: underline; }
.wa-time { align-self: flex-end; font-size: 11px; color: var(--muted); padding: 0 6px 2px; }
.wa-input { background: var(--surface); padding: 10px var(--s-3); border-top: 1px solid var(--border); }
.wa-input span { display: block; background: var(--bg); border-radius: var(--r-pill); padding: 11px var(--s-4); font-size: 14px; color: var(--muted); }
.preview-note { font-size: 13px; color: var(--muted); }
.qr-sheet { width: 420px; max-width: 100%; background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; }
.qr-sheet__top { background: var(--ink); padding: 18px var(--s-6); display: flex; align-items: center; gap: var(--s-3); color: var(--surface); }
.qr-sheet__top strong { font-weight: 800; font-size: 17px; }
.qr-sheet__body { padding: var(--s-6); display: flex; flex-direction: column; align-items: center; gap: var(--s-4); text-align: center; }
.qr-sheet__body h1 { font-size: 24px; letter-spacing: -0.5px; }
.qr-sheet__code { padding: 14px; border: 2px solid var(--ink); border-radius: var(--r-xl); }
.qr-sheet__code svg { display: block; width: 200px; height: 200px; }
.qr-sheet__what { display: flex; flex-direction: column; gap: 2px; }
.qr-sheet__what span:first-child { font-size: 15px; color: var(--ink-2); }
.qr-sheet__amount { font-family: var(--font-mono); font-size: 30px; font-weight: 600; letter-spacing: -1px; }
.qr-sheet__hint { font-size: 13px; color: var(--muted); line-height: 1.5; }
.qr-sheet__hint .mono { color: var(--ink); }
.qr-sheet__foot { padding: 14px; border-top: 1px solid var(--line-head); display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--muted); }
.qr-sheet__foot strong { color: var(--ink); font-weight: 800; font-size: 14px; }
@media print {
    body.bare { background: var(--surface); padding: 0; }
    .no-imprimir { display: none; }
    .qr-sheet { border: 0; }
}
.grow { flex: 1 1 260px; }
.block-line { display: block; }
a.cell-stack { display: flex; flex-direction: column; color: var(--ink); }
a.cell-stack:hover .cell-title { color: var(--accent); }

/* Pantallas sin dibujo propio, vestidas con el sistema (decisión de Pablo, 2026-11-04) */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--s-4); }
.page-head > div:first-child { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.page-head__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.main > h1 + .lead, .main > .lead { margin-top: calc(-1 * var(--s-4)); }
.panel > h2 + p, .panel > h2 + .muted { margin-top: -6px; }
.panel .table th:first-child, .panel .table td:first-child { padding-left: 0; }
.panel .table th:last-child, .panel .table td:last-child { padding-right: 0; }
.panel { overflow-x: auto; }
.panel h3 { font-size: 15px; }
.panel form.inline, .panel .actions-menu { align-self: flex-start; }
.main > p:has(> .button) { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.select select:not([multiple]) { min-width: 0; }
.table .select select { padding: 8px 32px 8px 10px; font-size: 14px; border-radius: var(--r-sm); }
.card > .button, .card > form.inline { align-self: flex-start; }
.steps-row li > div { display: flex; flex-direction: column; gap: 2px; }
.tabs-inline--sub a { padding: 6px 12px; font-size: 12px; }

/* Pagador: página de pago, resultado y portal (390 px; en escritorio centrado a 480 px) */
body.pay { background: var(--bg); }
.pay__frame { max-width: 480px; min-height: 100vh; margin: 0 auto; display: flex; flex-direction: column; background: var(--bg); }
.pay__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-4) var(--s-5); background: var(--surface); border-bottom: 1px solid var(--line-head); }
.pay__merchant { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; min-width: 0; }
.avatar--pay { width: 36px; height: 36px; border-radius: 9px; font-size: 13px; }
.pay__secure { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ok-fg); white-space: nowrap; }
.pay__body { flex: 1; padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-4); }
.pay__foot { display: flex; align-items: center; justify-content: center; gap: var(--s-2); padding: var(--s-4); border-top: 1px solid var(--line-head); background: var(--surface); font-size: 12px; color: var(--muted); }
.pay__foot strong { font-weight: 800; font-size: 15px; letter-spacing: -0.3px; color: var(--ink); }
.pay__summary { display: flex; flex-direction: column; gap: var(--s-1); }
.pay__concept { font-size: 14px; font-weight: 400; color: var(--muted); margin: 0; letter-spacing: 0; }
.pay__ref { font-size: 12px; color: var(--muted); }
.pay__card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 18px; display: flex; flex-direction: column; gap: 14px; margin: 0; }
.pay__card .field { gap: 6px; }
.pay__card .field > label { font-size: 13px; }
.pay__email { border-top: 1px solid var(--line); padding-top: 14px; }
.pay__button { border-radius: var(--r-lg); padding: 16px; font-size: 16px; font-weight: 800; }
.pay__brands { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pay__brands > span:first-child { font-size: 12px; color: var(--muted); margin-right: var(--s-1); }
.pay__brands .logo-slot { width: 40px; height: 26px; }
.field-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pay__note { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.5; }
.pay__result { display: flex; flex-direction: column; align-items: center; gap: var(--s-4); text-align: center; padding: 16px 4px 0; }
.pay__result .pay__card { width: 100%; text-align: left; padding: var(--s-4); }
.pay__result .amount { font-size: 32px; }
.pay__title { font-size: 24px; font-weight: 800; line-height: 1.25; letter-spacing: 0; }
.pay__message { font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.pay__icon circle { stroke: none; }
.pay__icon path { fill: none; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.pay__icon--ok circle { fill: var(--ok-bg); } .pay__icon--ok path { stroke: var(--ok-fg); }
.pay__icon--bad circle { fill: var(--bad-bg); } .pay__icon--bad path { stroke: var(--bad-fg); }
.pay__icon--warn circle { fill: var(--warn-bg); } .pay__icon--warn path { stroke: var(--warn-fg); }
.pay__total { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); border-top: 1px solid var(--line); padding-top: 14px; }
.pay__total > span:first-child { font-size: 14px; color: var(--muted); }
.pay__total .amount { font-size: 28px; }
@media print {
    body.pay .no-imprimir, body.pay .pay__top .pay__secure { display: none; }
    .pay__frame { max-width: none; }
}
.pay__who { display: flex; flex-direction: column; }
.pay__who small { font-size: 12px; color: var(--muted); font-weight: 400; }
.portal { display: flex; flex-direction: column; gap: var(--s-4); }
.portal + .portal { border-top: 1px solid var(--line-head); padding-top: var(--s-6); margin-top: var(--s-2); }
.portal__who { display: flex; flex-direction: column; gap: 2px; }
.portal__name { font-size: 20px; font-weight: 800; letter-spacing: 0; }
.portal__due { background: var(--ink); color: var(--surface); border-radius: var(--r-2xl); padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); }
.portal__due-label { font-size: 13px; color: var(--nav-text); font-weight: 600; }
.portal__due-label + .portal__due-amount + .portal__due-label { font-weight: 400; }
.portal__due-amount { font-family: var(--font-mono); font-size: 32px; font-weight: 600; letter-spacing: -1px; }
.portal__auto { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s-4); display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.portal__auto > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.portal__auto strong { font-size: 14px; }
.portal__auto span { font-size: 13px; color: var(--muted); }
.portal__auto-actions { display: flex; gap: var(--s-3); align-items: center; flex: none; }
.portal__list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 6px var(--s-4); }
.portal__list h2 { margin: 12px 0 6px; font-size: 16px; }
.portal__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.portal__row > div:first-child { display: flex; flex-direction: column; }
.portal__row strong { font-size: 14px; }
.portal__row span { font-size: 12px; color: var(--muted); }
.portal__row-end { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s-1); }
.portal__row-end .money { font-size: 14px; color: var(--ink); }
.portal__empty { padding: 11px 0; }
.portal-logout { text-align: center; }
.pay__body > h1 { font-size: 24px; letter-spacing: 0; }
.pay__body > .lead { font-size: 15px; color: var(--ink-2); }
.pay__body > .form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 18px; gap: 14px; }
.pay__body > .form .button--primary { border-radius: var(--r-lg); padding: 16px; font-size: 16px; font-weight: 800; }
#card-number, #card-expiry, #card-cvc { font-family: var(--font-mono); }

/* Acceso (design/Login.dc.html, Verificacion2FA.dc.html): fluido */
.auth__side { padding: 56px; color: var(--surface); }
.auth__logo { display: flex; align-items: center; gap: var(--s-3); }
.auth__logo span { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; }
.auth__pitch { display: flex; flex-direction: column; gap: var(--s-4); max-width: 460px; }
.auth__headline { font-size: 40px; font-weight: 800; letter-spacing: -1px; line-height: 1.15; }
.auth__lead { font-size: 17px; color: var(--nav-text); line-height: 1.6; }
.auth__copy { font-size: 13px; color: var(--web-dark-muted); }
.auth__brand { display: flex; align-items: center; gap: 10px; }
.auth__brand span { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; }
.auth__title { gap: 6px; }
.auth__title h1 { font-size: 30px; }
.auth__fields { gap: var(--s-5); }
.auth__submit { padding: 15px; font-size: 16px; font-weight: 800; }
.auth__links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s-2); font-size: 14px; }
.auth__links .button--link { padding: 0; min-height: 0; font-size: 14px; }
.otp input[aria-invalid="true"] { border-color: var(--bad-solid); }
.otp[hidden], [data-otp-plain][hidden], [data-otp-recovery][hidden] { display: none; }
.auth .card--narrow, .auth .card { max-width: 100%; }
.auth__row { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); flex-wrap: wrap; font-size: 14px; }
.auth__row .choice-inline { font-size: 14px; gap: var(--s-2); }
.auth__row input[type="checkbox"] { width: 18px; height: 18px; }
.auth__row .link-strong, .auth__center .link-strong, .auth__links .link-strong { text-decoration: none; }
.auth__center { font-size: 14px; text-align: center; color: var(--ink-2); }
a.auth__logo, a.auth__brand { text-decoration: none; color: inherit; }
a.auth__logo { color: var(--surface); }

/* Registro (design/Registro.dc.html) */
body.signup { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.signup__top { background: var(--surface); border-bottom: 1px solid var(--border); padding: 18px var(--s-10); display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.signup__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.signup__brand span { font-size: 22px; font-weight: 800; }
.signup__help { font-size: 14px; color: var(--muted); }
.signup__body { flex: 1; padding: var(--s-10); display: flex; flex-wrap: wrap; gap: var(--s-8); align-items: flex-start; justify-content: center; }
.signup__side { flex: 0 1 260px; display: flex; flex-direction: column; gap: var(--s-5); }
.signup__side h1 { font-size: 28px; letter-spacing: -0.5px; }
.signup__steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-4); }
.signup__step { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.signup__dot { flex: none; width: 30px; height: 30px; border-radius: var(--r-pill); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; background: var(--line); color: var(--ink-2); }
.signup__step[aria-current="step"] .signup__dot, .signup__step.is-done .signup__dot { background: var(--accent); color: var(--surface); }
.signup__label { font-size: 14px; font-weight: 600; }
.signup__step[aria-current="step"] .signup__label { font-weight: 800; }
html:not(.wizard-js) .signup__steps button { cursor: default; }
.signup__form { flex: 0 1 640px; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s-7); display: flex; flex-direction: column; gap: var(--s-5); }
.signup__form h2 { font-size: 20px; }
.signup__form .wizard__panel { gap: var(--s-5); }
html:not(.wizard-js) .signup__form .wizard__panel + .wizard__panel { border-top: 1px solid var(--line-head); padding-top: var(--s-5); }
.signup__fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.signup__fieldset legend { font-size: 14px; font-weight: 700; padding: 0; margin-bottom: var(--s-2); }
.signup__nav { display: flex; justify-content: space-between; gap: var(--s-3); border-top: 1px solid var(--line-head); padding-top: var(--s-5); }
.signup__nav [hidden] { display: none; }
html:not(.wizard-js) .signup__nav [data-back], html:not(.wizard-js) .signup__nav [data-next] { display: none; }
html:not(.wizard-js) .signup__nav { justify-content: flex-end; }
.signup__aside { flex: 0 1 280px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 22px; display: flex; flex-direction: column; gap: var(--s-3); }
.signup__aside ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.signup__aside-note { font-size: 13px; color: var(--muted); line-height: 1.5; }
.signup__done { align-items: center; text-align: center; max-width: 560px; }
.signup__done h1 { font-size: 28px; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: var(--s-5); border: 1.5px dashed var(--border-strong); border-radius: var(--r-lg); background: var(--surface-2); cursor: pointer; }
.dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone:focus-within { outline: 3px solid var(--accent-light); outline-offset: 2px; border-color: var(--accent); }
.dropzone--over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone--filled { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.dropzone--error { border-color: var(--bad-solid); }
.dropzone__icon { color: var(--muted); }
.dropzone__text { font-size: 14px; color: var(--ink-2); }
.dropzone__hint { font-size: 12px; color: var(--muted); }
@media (max-width: 767px) { .signup__body { padding: var(--s-5) var(--s-4); } .signup__top { padding: var(--s-4); } .signup__form { padding: var(--s-5); } }

/* Sitio público: simulador y páginas legales */
.sim-seg { border: 0; border-radius: 9px; padding: 10px var(--s-4); font-family: inherit; font-weight: 600; font-size: 14px; cursor: pointer; background: transparent; color: var(--ink-2); }
.sim-seg.is-on { background: var(--ink); color: var(--surface); font-weight: 700; }
.sim-method { text-align: left; display: flex; flex-direction: column; gap: 2px; font-family: inherit; color: var(--ink); cursor: pointer; border-radius: var(--r-xl); padding: 14px; background: var(--surface); border: 1.5px solid var(--border-strong); }
.sim-method.is-on { background: var(--accent-soft); border: 2px solid var(--accent); padding: 13.5px; }
.sim-origin { display: flex; flex-direction: column; gap: 10px; }
.sim-origin[hidden], .sim-warn[hidden] { display: none; }
.sim-warn { background: var(--alert-warn-bg); color: var(--warn-fg); border-radius: var(--r-lg); padding: var(--s-3) 14px; font-size: 14px; font-weight: 600; }
.site-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.site-legal__hero { max-width: 1200px; margin: 0 auto; padding: 56px var(--s-8) 0; display: flex; flex-direction: column; gap: var(--s-3); }
.site-legal__eyebrow { color: var(--accent-light); font-weight: 700; font-size: 14px; }
.site-legal__title { font-size: 48px; font-weight: 800; letter-spacing: -1.2px; margin: 0; color: var(--surface); }
.site-legal { max-width: 1200px; margin: 0 auto; padding: 56px var(--s-8) 96px; display: flex; flex-direction: column; gap: var(--s-3); }
.site-legal__pending { font-size: 19px; font-weight: 700; }
.site-legal__note { color: var(--muted); font-size: 15px; }
@media (max-width: 767px) { .site-legal__title { font-size: 34px; } .site-legal__hero, .site-legal { padding-left: var(--s-4); padding-right: var(--s-4); } }

/* Conciliación (design/Conciliacion.dc.html) y Liquidaciones (design/Liquidaciones.dc.html) */
.recon-summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.recon-summary__item { padding: 18px var(--s-5); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.recon-summary__label { font-size: 13px; color: var(--muted); font-weight: 600; }
.recon-summary__value { font-family: var(--font-mono); font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.recon-summary__value--warn { color: var(--warn-fg); }
.recon-summary__note { font-size: 12px; color: var(--muted); }
.recon-trace { padding: var(--s-6); gap: 18px; }
.recon-trace__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); align-items: baseline; }
.recon-trace__sub { font-size: 14px; color: var(--muted); }
.recon-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.recon-step { background: var(--bg); border-radius: var(--r-lg); padding: 14px var(--s-4); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.recon-step--done { background: var(--ok-bg); }
.recon-step__label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.recon-step__value { font-family: var(--font-mono); font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.recon-step__value a { color: inherit; text-decoration: none; }
.recon-step__value a:hover { color: var(--accent); }
.recon-step__detail { font-size: 12px; color: var(--muted); }
.recon-note { display: flex; gap: var(--s-3); align-items: flex-start; background: var(--alert-ok-bg); border-radius: var(--r-md); padding: 14px var(--s-4); font-size: 14px; }
.recon-note svg { flex: none; margin-top: 1px; color: var(--ok-fg); }
.recon-note__body { display: flex; flex-direction: column; gap: var(--s-1); }
.recon-note__title { font-weight: 700; color: var(--ok-fg); }
.recon-note__text { color: var(--ink-2); }
.recon-note--warn { background: var(--alert-warn-bg); }
.recon-note--warn svg, .recon-note--warn .recon-note__title { color: var(--warn-fg); }
.recon-inbox .table { min-width: 820px; }
.recon-inbox .table td.reason { font-weight: 700; }
.recon-inbox .table td.date { font-family: var(--font-mono); font-size: 13px; white-space: nowrap; }
.recon-inbox .table td.num { font-family: var(--font-mono); font-weight: 600; white-space: nowrap; }
.recon-inbox .table td.hint { color: var(--ink-2); }
.recon-inbox .table td.actions { white-space: nowrap; }
.recon-inbox .table td.actions form { display: inline; }
.recon-sources { display: flex; flex-direction: column; gap: var(--s-2); font-size: 14px; }
.recon-source { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2); padding: var(--s-3) 14px; background: var(--bg); border-radius: var(--r-md); color: var(--ink); text-decoration: none; }
.recon-source:hover { background: var(--line); color: var(--ink); }
.recon-source__name { font-weight: 700; }
.recon-source__detail { color: var(--ink-2); }
.recon-source--warn .recon-source__detail { color: var(--warn-fg); font-weight: 600; }
.recon-filters { padding: var(--s-4) var(--s-5); flex-direction: row; flex-wrap: wrap; gap: var(--s-3); align-items: flex-end; }
.recon-filters > .field { flex: 1 1 200px; }
.recon-filters > .field--narrow { flex: 1 1 160px; }
.recon-map { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-4); }
.recon-preview { font-size: 13px; }
.recon-preview th { white-space: nowrap; }
.recon-preview td { white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.recon-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-3) var(--s-6); }
.recon-facts > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.recon-facts dt { font-size: 13px; color: var(--muted); font-weight: 600; }
.recon-facts dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.recon-facts dd.mono { font-family: var(--font-mono); font-weight: 600; }
.recon-hint { background: var(--warn-item-bg); border-radius: var(--r-md); padding: 14px var(--s-4); font-size: 14px; color: var(--ink-2); display: flex; flex-direction: column; gap: var(--s-1); }
.recon-hint strong { color: var(--ink); }
.settle-table { min-width: 1100px; }
.settle-table td.num { font-family: var(--font-mono); font-weight: 600; white-space: nowrap; }
.settle-origin { display: flex; flex-direction: column; }
.settle-origin span:first-child { font-weight: 600; }
.settle-origin span + span { font-size: 12px; color: var(--muted); }
.stat__sub--bad { font-weight: 700; color: var(--bad-fg); }
.badge--late { background: var(--bad-bg); color: var(--bad-fg); }
.badge--received { background: var(--ok-bg); color: var(--ok-fg); }
.badge--difference, .badge--snoozed { background: var(--warn-bg); color: var(--warn-fg); }
.badge--matched { background: var(--ok-bg); color: var(--ok-fg); }
.badge--exception { background: var(--warn-bg); color: var(--warn-fg); }
.badge--ignored, .badge--unmatched, .badge--resolved { background: var(--ref-bg); color: var(--ref-fg); }
.list-item--link { color: var(--ink); text-decoration: none; }
.list-item--link:hover { background: var(--warn-bg); color: var(--ink); }
.card__head--nowrap { flex-wrap: nowrap; }
.recon-trace__head h2 { overflow-wrap: anywhere; min-width: 0; }

/* ---------- Celular: tablas como tarjetas, filtros plegables, pestañas deslizables (TERA_DISENO 3.12, design/Pagos.dc.html) ---------- */
.filters__toggle { display: none; align-items: center; justify-content: center; gap: var(--s-2); width: 100%; background: var(--surface); color: var(--ink); border: 1.5px solid var(--border-strong); border-radius: var(--r-md); padding: var(--s-3); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; min-height: 44px; }
@media (max-width: 767px) {
    .main { padding: var(--s-5) var(--s-4) var(--s-8); gap: 18px; }
    .page-header h1 { font-size: 26px; }
    /* Tablas → tarjetas: cada fila es una tarjeta; la primera columna es el título. */
    .main .table-wrap { overflow: visible; }
    .main .table { min-width: 0 !important; }
    .main .table, .main .table tbody, .main .table tr, .main .table td { display: block; width: 100%; box-sizing: border-box; }
    .main .table thead { display: none; }
    .main .table tbody tr { padding: 14px 18px; border-bottom: 1px solid var(--line); }
    .main .table tbody tr:last-child { border-bottom: 0; }
    .main .table--inset tbody tr { padding-left: 0; padding-right: 0; }
    .main .table td { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); padding: 4px 0 !important; border: 0 !important; text-align: right !important; white-space: normal; min-width: 0; }
    .main .table td::before { content: attr(data-label); flex: none; max-width: 45%; font-size: 12px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: var(--muted); text-align: left; }
    .main .table td:first-child { justify-content: flex-start; padding: 0 0 6px !important; text-align: left !important; font-size: 15px; }
    .main .table td:first-child::before, .main .table td[data-label=""]::before { content: none; }
    .main .table td[data-label=""] { justify-content: flex-end; }
    .main .table td > * { min-width: 0; overflow-wrap: anywhere; }
    .main .table td.num, .main .table td .amount-cell { white-space: nowrap; }
    .main .table input, .main .table select { max-width: 60%; }
    /* Filtros plegables: solo el buscador a la vista; lo demás detrás de «Filtros (n)». */
    html.js [data-filters]:not(.is-open) > :not(.filters__search):not(.filters__toggle):not([type="hidden"]) { display: none !important; }
    html.js [data-filters] > .filters__search { flex-basis: 100% !important; }
    html.js [data-filters] .filters__toggle { display: flex; }
    html.js [data-filters].is-open > .filters__actions { width: 100%; }
    /* Pestañas: una sola fila que se desliza. */
    .pills, .tabs-inline { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; max-width: 100%; }
    .pills::-webkit-scrollbar, .tabs-inline::-webkit-scrollbar { display: none; }
    .pills > *, .tabs-inline > * { flex: none; }
    .card__head > .pills { width: 100%; }
}
@media (max-width: 767px) {
    html.js [data-filters] > .filters__search { order: -2; }
    html.js [data-filters] > .filters__toggle { order: -1; }
    .main .table td:not(:first-child) .cell-stack { align-items: flex-end; text-align: right; }
}
@media (max-width: 767px) { .main .table td::before { font-family: var(--font-ui); } }
@media (max-width: 767px) {
    /* Celda con varias piezas (texto y nota, o varias acciones): se apilan a la derecha de la etiqueta. */
    .main .table td:not(:first-child) { display: grid; grid-template-columns: fit-content(50%) minmax(0, 1fr); column-gap: var(--s-4); row-gap: 4px; align-items: center; justify-items: end; }
    .main .table td:not(:first-child)::before { grid-column: 1; grid-row: 1; justify-self: start; max-width: none; }
    .main .table td:not(:first-child) > * { grid-column: 2; }
    .main .table td:not(:first-child) > br { display: none; }
    .main .table td[data-label=""]:not(:first-child) { display: flex; flex-wrap: wrap; justify-content: flex-end; }
    .main .table td:first-child { flex-wrap: wrap; column-gap: var(--s-2); }
}

/* Desarrolladores (H5, design/Desarrolladores.dc.html) */
.badge--live { background: var(--ok-bg); color: var(--ok-fg); }
.strong { font-weight: 600; }
.break-all { overflow-wrap: anywhere; }
.inline-form { display: inline; margin: 0; }
.table td.actions { text-align: right; white-space: nowrap; }
.row--muted td { color: var(--muted); }
.code-block { margin: 0; padding: var(--s-4); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); overflow-x: auto; max-height: 520px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.55; white-space: pre; }
.api-doc { display: flex; flex-direction: column; gap: var(--s-6); }
.api-doc__nav { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.api-op { border-top: 1px solid var(--line); padding-top: var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); }
.api-op:first-of-type { border-top: 0; padding-top: 0; }
.api-op__line { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2); }
.api-method { display: inline-block; min-width: 46px; text-align: center; padding: 3px 8px; border-radius: var(--r-sm); font-family: var(--font-mono); font-size: 12px; font-weight: 700; }
.api-method--get { background: var(--info-bg); color: var(--info-fg); }
.api-method--post { background: var(--ok-bg); color: var(--ok-fg); }
.api-params { width: 100%; border-collapse: collapse; font-size: 13px; }
.api-params th, .api-params td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.api-params th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; }
@media (max-width: 767px) {
    .api-params, .api-params tbody, .api-params tr, .api-params td { display: block; width: 100%; }
    .api-params thead { display: none; }
    .api-params tr { padding: 6px 0; border-bottom: 1px solid var(--line); }
    .api-params td { border: 0; padding: 2px 0; }
}

/* Reportes (H6, design/Reportes.dc.html) */
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: var(--s-4); }
.report-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.report-card > strong { font-size: 16px; }
.report-card__text { font-size: 13px; color: var(--muted); flex: 1; }
.report-card__actions { display: flex; gap: var(--s-2); }
.field--range { border: 0; padding: 0; margin: 0; min-width: 0; flex: 1 1 260px; }
.field--range legend { font-size: 14px; font-weight: 700; margin-bottom: 8px; padding: 0; }
.range-row { display: flex; align-items: center; gap: var(--s-2); }
.range-row input { flex: 1 1 0; min-width: 0; }

/* Consola interna (H6, design/BO*.dc.html) */
.stat__delta--up { font-weight: 700; color: var(--ok-fg); }
.stat__delta--down { font-weight: 700; color: var(--bad-fg); }
.bo-split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.bo-split__main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.bo-split__side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.alert-stack { display: flex; flex-direction: column; gap: 10px; }
.alert-stack .notice { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.bar-chart { display: flex; gap: 10px; }
.bar-chart__axis { display: flex; flex-direction: column; justify-content: space-between; height: 200px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-align: right; min-width: 44px; }
.bar-chart__plot { flex: 1; height: 200px; border-bottom: 1.5px solid var(--ink); display: block; min-width: 0; }
.bar-chart__bar { fill: var(--accent); }
.bar-chart__bar--today { fill: var(--ink); }
.support-banner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); }
.support-banner span { flex: 1 1 260px; }
.choice-row--inline { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.ficha-status { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; margin: 0; }
.ficha-approve { display: flex; flex-direction: column; gap: var(--s-2); }
.ficha-config { margin-top: var(--s-3); }
.ficha-config > summary { list-style: none; display: inline-flex; }
.ficha-config > summary::-webkit-details-marker, .inline-details > summary::-webkit-details-marker { display: none; }
.ficha-config[open] > form { margin-top: var(--s-3); }
.inline-details { display: inline-block; }
.inline-details > summary { list-style: none; display: inline-flex; }
.inline-details[open] > form { margin-top: var(--s-2); min-width: 240px; text-align: left; }
.inline-select { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.select--small select { padding: 7px 34px 7px 10px; font-size: 13px; }
.chips { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip { padding: 4px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; background: var(--ok-bg); color: var(--ok-fg); }
.chip--off { background: var(--surface-2); color: var(--muted); font-weight: 600; }
.facts--1 { grid-template-columns: 1fr; }
.note-list { list-style: none; margin: 0 0 var(--s-3); padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.note-list li { border-left: 3px solid var(--warn-strong, var(--line)); padding-left: var(--s-3); }
.note-list p { margin: 2px 0 0; white-space: pre-line; }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-4); }
.stat__value--sm { font-size: 20px; }
.row--total td { font-weight: 800; border-top: 1.5px solid var(--ink); }
.plan-table input { width: 100%; min-width: 80px; font-family: var(--font-mono); }
.card__head--spaced { padding-top: var(--s-5); }
.row--selected td { background: var(--accent-soft); }
.case-panel { gap: var(--s-4); }
.thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.thread__item { background: var(--surface-2); border-radius: var(--r-md); padding: 12px 14px; }
.thread__item--reply { background: var(--accent-soft); }
.thread__item--note { background: var(--alert-warn-bg); }
.thread__meta { font-size: 12px; color: var(--muted); font-weight: 600; }
.thread__item p { margin: 4px 0 0; white-space: pre-line; font-size: 14px; }
.case-actions { display: flex; flex-direction: column; gap: var(--s-2); border-top: 1px solid var(--line); padding-top: var(--s-3); }
.case-actions input[type="text"] { padding: 7px 10px; font-size: 13px; border: 1.5px solid var(--border-strong); border-radius: var(--r-sm); min-width: 0; flex: 1 1 160px; }
.inline-details--right { position: relative; }
.inline-details--right[open] > form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-4); box-shadow: 0 8px 24px rgba(19, 32, 28, 0.12); min-width: 260px; display: flex; flex-direction: column; gap: var(--s-3); }
.recon-filters--inset { display: flex; padding: 0 var(--s-6) var(--s-4); border: 0; }
.stat__value .badge { font-family: var(--font-ui); letter-spacing: 0; }

/* Contracargos (especificación v2, 13.7) */
.chargeback { border-color: var(--bad-solid, var(--line)); border-width: 1.5px; }
.chargeback h3 { margin: var(--s-2) 0 0; font-size: 15px; }
.chargeback__forms { display: flex; flex-direction: column; gap: var(--s-4); border-top: 1px solid var(--line); padding-top: var(--s-4); }
.evidence-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.evidence-list li { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--r-md); }
.evidence-note { white-space: pre-line; }
.text-bad { color: var(--bad-fg); }

/* Conexiones (design/Conexiones.dc.html) */
.conn-title { margin: var(--s-2) 0 0; font-size: 18px; font-weight: 800; }
.conn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: var(--s-4); }
.conn-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.conn-card__head { display: flex; align-items: center; gap: 12px; }
.conn-card__name { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.conn-card__name strong { font-size: 16px; }
.conn-card__name span { font-size: 13px; color: var(--muted); }
.conn-card__text { font-size: 13px; color: var(--ink-2, var(--muted)); line-height: 1.5; flex: 1; }
.conn-card__actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.conn-logo { flex: none; width: 40px; height: 40px; border-radius: var(--r-xs); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; background: var(--surface-2); color: var(--ink); letter-spacing: 0.3px; }
.conn-logo--empty { border: 1.5px dashed var(--border-strong); background: transparent; color: var(--muted); font-size: 18px; }

/* Tablero de Conciliación (diseño aprobado 2026-11-08) */
.rb-search { display: flex; gap: var(--s-2); }
.rb-search input { flex: 1; min-width: 0; }
.rb-active { margin: 0; font-size: 14px; color: var(--muted); }
.rb-verdict { border-radius: var(--r-xl); padding: var(--s-4) var(--s-5); border: 1px solid; display: flex; flex-direction: column; gap: var(--s-1); }
.rb-verdict p { margin: 0; }
.rb-verdict__title { font-size: 20px; font-weight: 700; line-height: 1.35; text-wrap: balance; }
.rb-verdict__sub { font-size: 14px; }
.rb-verdict--warn { background: var(--alert-warn-bg); color: var(--warn-fg); border-color: var(--warn-solid); }
.rb-verdict--ok { background: var(--alert-ok-bg); color: var(--ok-fg); border-color: var(--ok-fg); }
.rb-verdict--info { background: var(--alert-info-bg); color: var(--info-fg); border-color: var(--info-fg); }
.rb-hint { margin: 0; font-size: 14px; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: var(--r-lg); padding: var(--s-3) var(--s-4); }
.rb-caption { margin: 0 0 calc(var(--s-2) * -1); font-size: 13px; font-weight: 700; color: var(--muted); }
.rb-kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
a.stat { text-decoration: none; color: inherit; }
.rb-stat--warn { border-color: var(--warn-solid) !important; }
a.stat:hover { border-color: var(--accent) !important; }
.rb-tasks { list-style: none; margin: 0; padding: 0; }
.rb-task { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-3); align-items: center; padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.rb-task:first-child { border-top: 0; }
.rb-task__text strong { font-weight: 700; }
.rb-task__detail { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.rb-small { font-size: 13px; }
.rb-pad { padding: 0 var(--s-5) var(--s-4); margin: 0; }
.rb-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; }
.rb-sales__total { margin: 0; font-size: 14px; color: var(--muted); }
.rb-sales__total .rb-num { font-size: 22px; color: var(--ink); margin-right: var(--s-2); }
.rb-stack { display: block; width: 100%; height: 12px; border-radius: 6px; overflow: hidden; margin: var(--s-3) 0; }
.rb-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s-3); }
.rb-method { display: flex; flex-direction: column; gap: 4px; background: var(--surface-2); border-radius: var(--r-md); padding: var(--s-3); }
.rb-method__name { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.rb-method__note { font-size: 12px; color: var(--muted); }
.rb-key { width: 10px; height: 10px; flex: none; vertical-align: -1px; margin-right: 4px; }
.rb-m--card { fill: var(--pay-card); } .rb-m--transfer { fill: var(--pay-transfer); } .rb-m--cash { fill: var(--pay-cash); } .rb-m--other { fill: var(--pay-other); }
.rb-chart { display: block; width: 100%; height: 160px; border-bottom: 1px solid var(--line-head); }
.rb-p--izipay { fill: var(--proc-izipay); } .rb-p--niubiz { fill: var(--proc-niubiz); } .rb-p--atix { fill: var(--proc-atix); } .rb-p--tera { fill: var(--proc-tera); }
.rb-p--otro { fill: var(--proc-otro); }
.rb-p--muted { fill-opacity: 0.4; }
.rb-flag { fill: var(--warn-solid); }
.rb-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
.rb-legend { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); font-size: 12px; color: var(--muted); margin-top: var(--s-2); }
.rb-group { flex-wrap: wrap; }
.rb-lines { list-style: none; margin: 0; padding: 0; }
.rb-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--s-3); align-items: center; padding: var(--s-2) 0; border-top: 1px solid var(--line); }
.rb-data { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-3) var(--s-5); margin: 0; }
.rb-data dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.rb-data dd { margin: 2px 0 0; font-family: var(--font-mono); font-size: 14px; overflow-wrap: anywhere; }
.mono { font-family: var(--font-mono); }
@media (max-width: 767px) { .rb-task { grid-template-columns: 1fr; } .rb-verdict__title { font-size: 17px; } .rb-search { flex-direction: column; } }

/* Aviso de carga en todo el panel (loading.js) */
html.is-loading body::before { content: ""; position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 1000; background: linear-gradient(90deg, transparent 0, var(--accent) 30%, var(--accent-light) 60%, transparent 100%); background-size: 50% 100%; background-repeat: no-repeat; animation: tera-loading 1.1s linear infinite; }
html.is-loading main, html.is-loading .main { opacity: 0.55; transition: opacity 0.2s 0.15s; pointer-events: none; }
html.is-loading, html.is-loading * { cursor: progress !important; }
@keyframes tera-loading { from { background-position: -50% 0; } to { background-position: 150% 0; } }
@media (prefers-reduced-motion: reduce) { html.is-loading body::before { animation: none; background: var(--accent); } }

/* Tablero: buscador en la barra de filtros, números y gráfico explicado (2026-11-09) */
.rb-kpis .stat { padding: var(--s-4); gap: 4px; }
.rb-kpis .stat__value--sm { font-size: 19px; letter-spacing: -0.3px; }
.rb-caption { margin: var(--s-2) 0 0; }
.rb-chart__lead { margin: 0 0 var(--s-3); font-size: 14px; color: var(--ink-2); }
.rb-chart { display: block; width: 100%; height: auto; border-bottom: 0; }
.rb-grid { stroke: var(--line-head); stroke-width: 1; }
.rb-tick { fill: var(--muted); font-family: var(--font-ui); font-size: 15px; }
.rb-tick--month { font-weight: 700; fill: var(--ink-2); }
.rb-hit { fill: transparent; }
.rb-bar:hover .rb-p { opacity: 0.8; }
.rb-bar--received .rb-p--izipay, .rb-bar--received .rb-p--tera, .rb-bar--received .rb-p--otro { fill: var(--ok-fg); }
.rb-bar--received .rb-p--niubiz { fill: #3F7E63; } .rb-bar--received .rb-p--atix { fill: #5E9C80; }
.rb-bar--no_bank .rb-p { fill: #B8C9C0; } .rb-bar--no_bank .rb-p--niubiz { fill: #9FB4A9; } .rb-bar--no_bank .rb-p--atix { fill: #CCD9D2; }
.rb-bar--pending .rb-p, .rb-bar--unsettled .rb-p { fill: var(--info-bg); stroke: var(--info-fg); stroke-width: 1; stroke-dasharray: 3 3; }
.rb-bar--missing .rb-p, .rb-bar--difference .rb-p { fill: var(--warn-solid); }
.rb-key--received { fill: var(--ok-fg); } .rb-key--no_bank { fill: #B8C9C0; } .rb-key--pending { fill: var(--info-bg); stroke: var(--info-fg); } .rb-key--missing { fill: var(--warn-solid); }
.rb-legend { font-size: 13px; }
.rb-val { fill: var(--ink-2); font-family: var(--font-ui); font-size: 13px; font-weight: 700; }

/* Gráfico de abonos en HTML: textos con la fuente y tamaño del panel (2026-11-09) */
.rb-cols { display: flex; align-items: stretch; gap: 6px; height: 220px; padding-top: var(--s-2); border-bottom: 0; }
.rb-col { flex: 1 1 0; min-width: 0; display: grid; grid-template-rows: auto 1fr auto auto; justify-items: center; gap: 4px; }
.rb-col__val { font-size: 12px; font-weight: 700; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rb-col__bar { width: 100%; max-width: 40px; height: 100%; display: block; border-bottom: 1px solid var(--line-head); }
.rb-col__day { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rb-col__month { font-size: 12px; font-weight: 700; color: var(--ink-2); min-height: 1em; }
.rb-col:hover .rb-p { opacity: 0.8; }
@media (max-width: 767px) { .rb-cols { gap: 2px; height: 180px; } .rb-col__val { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11px; } }
.rb-col__bar rect { vector-effect: non-scaling-stroke; }
.rb-col__day, .rb-col__month { height: 16px; line-height: 16px; }
.rb-col { grid-template-rows: 16px 1fr 16px 16px; }
.rb-method--empty .rb-num { color: var(--muted); }
.rb-sales .card__head { align-items: baseline; justify-content: flex-start; gap: var(--s-2); }
.rb-method .rb-num { font-size: 17px; } .rb-method__name { font-size: 13px; } .rb-sales__total .rb-num { font-size: 24px; }

/* Selector múltiple de los filtros (partials/multi-select.php) */
.ms { position: relative; }
.ms__box { position: relative; }
.ms__btn { list-style: none; display: flex; align-items: center; gap: 6px; height: 47px; padding: 0 36px 0 14px; border: 1.5px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); font-size: 15px; cursor: pointer; position: relative; white-space: nowrap; }
.ms__btn::-webkit-details-marker { display: none; }
.ms__btn::after { content: ""; position: absolute; right: 14px; top: 50%; margin-top: -3px; border: 4px solid transparent; border-top: 5px solid var(--ink-2); }
.ms__box[open] .ms__btn { border-color: var(--accent); outline: 3px solid var(--accent-light); outline-offset: 1px; }
.ms__value { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ms__count { flex: none; background: var(--accent); color: var(--surface); border-radius: var(--r-pill); font-size: 11px; font-weight: 800; padding: 1px 7px; }
.ms__panel { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; min-width: 100%; width: max-content; max-width: min(420px, 90vw); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: 0 12px 32px rgba(19, 32, 28, 0.16); padding: var(--s-2); }
.ms__search { width: 100%; height: 38px; margin-bottom: var(--s-2); }
.ms__list { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; }
.ms__opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: 14px; }
.ms__opt:hover { background: var(--surface-2); }
.ms__opt input { width: 18px; height: 18px; }
.ms__empty { margin: var(--s-2); font-size: 13px; color: var(--muted); }
.ms__foot { border-top: 1px solid var(--line); margin-top: var(--s-2); padding-top: var(--s-2); }
html.js .js-hide { display: none !important; }
.rb-results { display: flex; flex-direction: column; gap: var(--s-6); transition: opacity 0.15s; }
.rb-results.is-updating { opacity: 0.5; pointer-events: none; }

/* Menú: títulos de los dos productos (Tera Pay / Tera Operaciones) */
.nav__section { display: flex; flex-direction: column; gap: 1px; margin: var(--s-4) 0 2px; padding: var(--s-3) 12px 0; border-top: 1px solid var(--nav-line); }
.nav__section-name { font-size: 11px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--accent-light); }
.nav__section-sub { font-size: 12px; color: var(--nav-text); opacity: 0.75; }
html.nav-collapsed .nav__section { padding: var(--s-2) 0 0; margin: var(--s-2) 0 0; }
html.nav-collapsed .nav__section-name, html.nav-collapsed .nav__section-sub { display: none; }
@media (max-width: 1279px) { html:not(.nav-expanded) .nav__section-name, html:not(.nav-expanded) .nav__section-sub { display: none; } html:not(.nav-expanded) .nav__section { padding: var(--s-2) 0 0; margin: var(--s-2) 0 0; } }
@media (max-width: 767px) { .nav .nav__section-name, .nav .nav__section-sub { display: block !important; } .nav .nav__section { padding: var(--s-3) 12px 0 !important; margin: var(--s-4) 0 2px !important; } }

/* Aviso de archivos procesándose en segundo plano (bg-imports.js) */
.bg-imports { display: flex; flex-direction: column; gap: var(--s-2); }
.bgi { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; padding: 10px var(--s-4); border-radius: var(--r-lg); font-size: 14px; border: 1px solid var(--border); background: var(--surface); }
.bgi--busy { background: var(--alert-info-bg); border-color: transparent; color: var(--info-fg); }
.bgi--ok { background: var(--alert-ok-bg); border-color: transparent; color: var(--ok-fg); }
.bgi--bad { background: var(--alert-bad-bg); border-color: transparent; color: var(--bad-fg); }
.bgi__name { min-width: 0; overflow-wrap: anywhere; }
.bgi__bar { width: 160px; flex: none; }
.bgi__text { font-weight: 700; }
.bgi__link { margin-left: auto; font-weight: 700; }
.bgi__close { background: none; border: 0; font-size: 20px; line-height: 1; cursor: pointer; color: inherit; padding: 0 4px; }

/* «Tus ventas»: cuadre tarjeta sistema vs procesadores */
.rb-diff { background: var(--warn-item-bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-3) var(--s-4); margin-top: var(--s-3); }
.rb-diff__title { margin: 0 0 var(--s-2); font-weight: 700; font-size: 14px; color: var(--warn-fg); }
.rb-diff__table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rb-diff__table td { padding: 4px 0; vertical-align: top; }
.rb-diff__table td.rb-num { text-align: right; white-space: nowrap; padding-left: var(--s-4); }
.rb-diff__total td { border-top: 1px solid var(--border-strong); font-weight: 700; padding-top: 6px; }
.rb-diff__link { font-weight: 700; white-space: nowrap; margin-left: 6px; }
.rb-method__link { margin-left: 0; font-size: 13px; }

/* Cuadres de tarjeta y transferencia lado a lado (Pablo, 2026-11-09) */
.rb-diffs { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: var(--s-3); align-items: start; }
.rb-diffs:empty { display: none; }
.rb-diffs .rb-diff { margin-top: var(--s-3); height: calc(100% - var(--s-3)); }
@media (max-width: 767px) { .rb-diffs { grid-template-columns: 1fr; } }

/* Cuadres alineados: misma altura; total y nota al pie en ambos */
.rb-diffs { align-items: stretch; }
.rb-diffs .rb-diff { display: flex; flex-direction: column; height: auto; }
.rb-diff__table--total { margin-top: auto; }
.rb-diff__table--total .rb-diff__total td { border-top: 1px solid var(--border-strong); }
.rb-diff > .muted { margin: var(--s-2) 0 0; }

/* Gráfico de abonos: el detalle de cada barra al pasar el mouse o tocarla (el title nativo tardaba o no salía) */
.rb-col { position: relative; cursor: default; outline: none; }
.rb-col::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); z-index: 5;
    background: var(--ink); color: var(--surface); font-size: 12px; font-weight: 600; line-height: 1.4; padding: 6px 10px; border-radius: var(--r-sm);
    white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.1s; }
.rb-col:hover::after, .rb-col:focus::after { opacity: 1; }
.rb-col:first-child::after, .rb-col:nth-child(2)::after { left: 0; transform: none; }
.rb-col:last-child::after, .rb-col:nth-last-child(2)::after { left: auto; right: 0; transform: none; }
.rb-col:hover .rb-col__bar, .rb-col:focus .rb-col__bar { filter: brightness(0.9); }
.rb-cols { padding-top: 40px; }

/* Gráfico: tres colores para llegó / llegó con otro monto / no llegó */
.rb-bar--difference .rb-p, .rb-key--difference { fill: var(--warn-solid); }
.rb-bar--missing .rb-p, .rb-key--missing { fill: var(--bad-solid); }
.rb-chart__lead { max-width: none; }

/* «Lo que debía llegar a tu banco»: colores por vista (¿Llegó? / ¿De quién? / ¿Por dónde se vendió?) */
.rb-chart__views { margin: var(--s-2) 0 var(--s-3); flex-wrap: wrap; width: fit-content; }
.rb-c--estado-received { fill: var(--ok-fg); } .rb-c--estado-difference { fill: var(--warn-solid); } .rb-c--estado-missing { fill: var(--bad-solid); }
.rb-c--estado-no_bank { fill: #B8C9C0; } .rb-c--estado-pending { fill: #9DB8E0; }
.rb-c--origen-izipay { fill: #1D9E75; } .rb-c--origen-niubiz { fill: #6E62D9; } .rb-c--origen-atix { fill: #D85A30; }
.rb-c--origen-tera { fill: #B8862B; } .rb-c--origen-transfer { fill: #3B7FC4; } .rb-c--origen-otro { fill: #7C8782; }
/* Color de cada canal: el mismo en Conciliación y en Analítica. */
:root { --canal-pos: #1D9E75; --canal-totem: #6E62D9; --canal-app: #D85A30; --canal-web: #C2417A; --canal-link: #B8862B; --canal-transfer: #3B7FC4; --canal-otro: #7C8782; }
.rb-c--canal-pos { fill: var(--canal-pos); } .rb-c--canal-totem { fill: var(--canal-totem); } .rb-c--canal-app { fill: var(--canal-app); } .rb-c--canal-web { fill: var(--canal-web); }
.rb-c--canal-link { fill: var(--canal-link); } .rb-c--canal-transfer { fill: var(--canal-transfer); } .rb-c--canal-otro { fill: var(--canal-otro); }
.rb-legend--amounts { list-style: none; padding: 0; margin: var(--s-3) 0 0; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); font-size: 13px; color: var(--ink-2); }
.rb-legend--amounts li { display: flex; align-items: center; gap: 6px; }
.rb-legend--amounts strong { font-size: 13px; }
.rb-col::after { white-space: normal; width: max-content; max-width: 280px; }
.rb-col::after { white-space: pre-line; max-width: 340px; text-align: left; font-weight: 500; }

/* Gráfico día a día (2026-11-10): leyenda que enciende/apaga, barras como botones y detalle en tabla fija */
.rb-col::after { content: none; display: none; }
.rb-col { appearance: none; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; border-radius: var(--r-sm); }
.rb-col[aria-pressed="true"] { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.rb-col:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.rb-cols { padding-top: var(--s-2); }
.rb-toggles { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); margin: 0 0 var(--s-3); }
.rb-toggles__label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.rb-toggles__label .muted { font-weight: 500; }
.rb-toggles__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.rb-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: var(--r-pill);
    background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.rb-toggle strong { font-size: 13px; }
.rb-toggle[aria-pressed="false"] { background: var(--surface-2); color: var(--muted); border-style: dashed; text-decoration: line-through; }
.rb-toggle[aria-pressed="false"] .rb-key { opacity: 0.25; }
.rb-daydetail { margin-top: var(--s-4); border-top: 1px solid var(--line-head); padding-top: var(--s-3); }
.rb-day__title { font-size: 16px; font-weight: 700; margin: 0 0 var(--s-2); }
.rb-day__table { width: 100%; }
.rb-day__table td:first-child .rb-key { margin-right: 8px; }
.rb-said { display: inline-block; padding: 2px 10px; border-radius: var(--r-pill); font-size: 13px; font-weight: 700; }
.rb-said--ok { background: var(--ok-bg); color: var(--ok-fg); }
.rb-said--warn { background: var(--warn-bg); color: var(--warn-fg); }
.rb-said--bad { background: var(--bad-bg); color: var(--bad-fg); }
.rb-said--off { background: var(--surface-2); color: var(--muted); }
.rb-toggles__all[hidden] { display: none; }
.rb-daydetail__hint { margin: 0; padding: var(--s-3) var(--s-4); border: 1px dashed var(--border-strong); border-radius: var(--r-md); color: var(--ink-2); font-size: 14px; text-align: center; }

/* La cuenta de un abono (rb-proof): de dónde sale lo que falta, número por número */
.rb-proof { margin-top: var(--s-3); padding: var(--s-4); background: var(--surface-2); border-radius: var(--r-md); }
.rb-proof__calc { width: 100%; border-collapse: collapse; font-size: 14px; }
.rb-proof__calc th { text-align: left; font-weight: 600; padding: 8px 0; vertical-align: top; }
.rb-proof__calc th span { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 2px; }
.rb-proof__calc td { padding: 8px 0 8px var(--s-4); white-space: nowrap; vertical-align: top; font-weight: 600; }
.rb-proof__calc tr + tr { border-top: 1px solid var(--line); }
.rb-proof__sum th, .rb-proof__sum td { font-weight: 700; }
.rb-proof__sum { border-top: 1px solid var(--border-strong) !important; }
.rb-proof__gap { border-top: 2px solid var(--ink) !important; }
.rb-proof__gap th, .rb-proof__gap td { font-weight: 800; font-size: 16px; color: var(--bad-fg); }
.rb-proof__h { margin: var(--s-4) 0 var(--s-2); font-weight: 700; font-size: 14px; }
.rb-proof__checks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); font-size: 14px; }
.rb-proof__checks li { display: flex; gap: var(--s-2); align-items: baseline; }
.rb-proof__checks .rb-said { min-width: 36px; text-align: center; flex: none; }
.rb-proof__near { background: var(--surface); }
.rb-proof__end { margin: var(--s-3) 0 0; font-size: 14px; }
.rb-task__proof { grid-column: 1 / -1; }
.rb-task__proof > summary { display: inline-block; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; margin-top: 4px; }
/* La cuenta usa todo el ancho: la cuenta a la izquierda; qué operaciones y cómo reclamar a la derecha (2026-11-10) */
.rb-proof { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4) var(--s-6); }
@media (min-width: 1100px) { .rb-proof { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.rb-proof__side > .rb-proof__h:first-child { margin-top: 0; }
.rb-proof__text { margin: 0; font-size: 14px; line-height: 1.5; }
.rb-proof__steps { margin: 0; padding-left: 1.2em; display: grid; gap: var(--s-3); font-size: 14px; }
.rb-proof__claim { display: block; width: 100%; margin: var(--s-2) 0; font: inherit; font-size: 13px; line-height: 1.5; padding: var(--s-2) var(--s-3);
    border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); resize: vertical; }

/* ===== La cuenta de un abono (pf-*), rediseño 2026-11-10: ecuación arriba, dos tarjetas, reclamo abajo ===== */
.pf { display: grid; gap: var(--s-4); margin-top: var(--s-3); }
.pf-eq { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: var(--s-3); }
.pf-eq__box { display: flex; flex-direction: column; gap: 4px; padding: var(--s-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.pf-eq__label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.pf-eq__value { font-family: var(--font-mono); font-size: 24px; font-weight: 600; letter-spacing: -0.5px; color: var(--ink); white-space: nowrap; }
.pf-eq__src { font-size: 13px; color: var(--muted); }
.pf-eq__op { align-self: center; font-family: var(--font-mono); font-size: 28px; font-weight: 600; color: var(--muted); }
.pf-eq__box--bad { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad-solid) 35%, transparent); }
.pf-eq__box--bad .pf-eq__label, .pf-eq__box--bad .pf-eq__value { color: var(--bad-fg); }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: var(--s-4); align-items: stretch; }
.pf-card, .pf-claim { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-4) var(--s-5); }
.pf-card { display: flex; flex-direction: column; }
.pf-card__title { display: flex; align-items: center; gap: 8px; margin: 0 0 var(--s-1); font-size: 16px; font-weight: 700; color: var(--ink); }
.pf-card__lead { margin: 0 0 var(--s-3); font-size: 13px; color: var(--muted); }
.pf-card__sub { margin: var(--s-4) 0 var(--s-2); font-size: 13px; font-weight: 700; color: var(--ink-2); }
.pf-calc { width: 100%; border-collapse: collapse; font-size: 14px; }
.pf-calc td { padding: 10px 0; border-top: 1px solid var(--line); vertical-align: top; }
.pf-calc tr:first-child td { border-top: 0; }
.pf-calc td span { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.pf-calc td.rb-num { text-align: right; white-space: nowrap; padding-left: var(--s-4); font-weight: 600; }
.pf-calc__total td { border-top: 2px solid var(--ink) !important; font-weight: 800; font-size: 15px; }
.pf-calc--list td { padding: 6px 0; }
.pf-checks { list-style: none; margin: var(--s-2) 0 var(--s-3); padding: 0; display: grid; gap: 10px; font-size: 14px; color: var(--ink-2); }
.pf-check { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: start; line-height: 1.45; }
.pf-check__icon { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); color: var(--muted); }
.pf-check--hit .pf-check__icon { background: var(--warn-bg); color: var(--warn-fg); }
.pf-check--hit { color: var(--ink); font-weight: 600; }
.pf-answer { margin-top: auto; padding: var(--s-3) var(--s-4); border-left: 4px solid var(--ink); background: var(--surface-2); border-radius: 0 var(--r-md) var(--r-md) 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.pf-answer strong { color: var(--ink); }
.pf-answer--hit { border-left-color: var(--warn-solid); background: var(--warn-bg); }
.pf-claim { border-color: var(--ink); }
.pf-claim__steps { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); gap: var(--s-5); margin-top: var(--s-3); }
.pf-step { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: var(--s-3); align-items: start; }
.pf-step__n { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--surface); font-weight: 800; }
.pf-step__title { margin: 4px 0 2px; font-weight: 700; font-size: 15px; }
.pf-step__text { margin: 0 0 var(--s-3); font-size: 13px; color: var(--muted); }
.pf-step .button { display: inline-flex; align-items: center; gap: 6px; }
.pf-claim__text { display: block; width: 100%; margin: var(--s-2) 0 var(--s-3); padding: var(--s-3) var(--s-4); font: inherit; font-size: 14px; line-height: 1.55;
    color: var(--ink); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); resize: vertical; }
@media (max-width: 1000px) { .pf-eq { grid-template-columns: 1fr; } .pf-eq__op { justify-self: center; } .pf-claim__steps { grid-template-columns: 1fr; } }
/* El enlace que abre la cuenta en «Por revisar» */
.rb-task__proof > summary { display: inline-flex; align-items: center; gap: 6px; list-style: none; padding: 6px 12px; border: 1px solid var(--border-strong);
    border-radius: var(--r-pill); text-decoration: none; font-size: 13px; background: var(--surface); }
.rb-task__proof > summary::-webkit-details-marker { display: none; }
.rb-task__proof > summary::before { content: '+'; font-weight: 800; }
.rb-task__proof[open] > summary::before { content: '−'; }
.rb-task__proof[open] > summary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.rb-task__proof .pf { padding: var(--s-4); background: var(--warn-item-bg); border-radius: var(--r-lg); }

/* ===== Formularios a todo el ancho (TERA_DISENO 242–249: panel al 100 % sin ancho máximo, 2 columnas desde 1280).
   Pablo, 2026-11-10: «solo usas un pedazo». Los campos fluyen en columnas; títulos, textos y bloques grandes ocupan la fila. */
.form--wide { max-width: none; }
@media (min-width: 1100px) {
    .form--wide:not(.form--sections) { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px var(--s-5); align-items: start; }
    .form--wide:not(.form--sections) > .field-row { display: contents; }
    .form--wide:not(.form--sections) > :not(.field):not(.field-row),
    .form--wide:not(.form--sections) > fieldset,
    .form--wide:not(.form--sections) > .field:has(textarea, .choice-list, .dropzone, fieldset, table),
    .form--wide:not(.form--sections) > .field-row > .field:has(textarea, .choice-list, .dropzone, table) { grid-column: 1 / -1; }
}

/* Formulario por secciones: a la izquierda qué es y para qué sirve; a la derecha, los campos. */
.form--sections { gap: 0; padding: 0; }
.fsec { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3) var(--s-8); padding: var(--s-6) var(--s-6); border-top: 1px solid var(--line); }
.fsec:first-of-type { border-top: 0; }
.fsec__head h2 { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--ink); }
.fsec__head p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); max-width: 42ch; }
.fsec__body { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.fsec__body .field-row { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.fsec--actions { background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); padding-top: var(--s-4); padding-bottom: var(--s-4); }
.fsec--note { padding-top: var(--s-4); padding-bottom: var(--s-4); background: var(--info-bg); color: var(--info-fg); font-size: 14px; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.fsec--note p { margin: 0; }
@media (min-width: 1024px) {
    .fsec { grid-template-columns: minmax(240px, 1fr) minmax(0, 2.6fr); }
    .fsec--note { grid-template-columns: 1fr; }
    .fsec--actions .form__actions { grid-column: 2; }
}
@media (min-width: 1100px) {
    .form--wide:not(.form--sections) { align-items: start; }
    .form--wide:not(.form--sections) > button, .form--wide:not(.form--sections) > .button, .form--wide:not(.form--sections) > .form__actions { justify-self: start; }
    .form--wide:not(.form--sections) > h2 { margin-top: var(--s-3); }
}
.field-row--contact { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.field__sub { margin: var(--s-2) 0 0; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.input--short { max-width: 120px; }
.fsec__body .choice-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: var(--s-3); }
/* Filas repetidas (responsables de pago): encabezado una vez, una fila numerada por responsable */
.cgrid { display: grid; gap: var(--s-3); }
.cgrid__head { display: none; }
.cgrid__row { display: grid; grid-template-columns: 1fr; gap: var(--s-3); padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); }
.cgrid__n { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); font-size: 13px; font-weight: 800; }
@media (min-width: 900px) {
    .cgrid__head, .cgrid__row { grid-template-columns: 28px repeat(4, minmax(0, 1fr)); gap: var(--s-3); align-items: center; }
    .cgrid__head { display: grid; font-size: 13px; font-weight: 700; color: var(--ink); padding: 0 var(--s-3); }
    .cgrid__row { padding: 0 var(--s-3); border: 0; }
    .cgrid__row .field > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Formulario por secciones dentro de otro bloque (sin tarjeta propia): sin sangría lateral */
form.form--sections:not(.card):not(.panel) .fsec { padding-left: 0; padding-right: 0; }
form.form--sections:not(.card):not(.panel) .fsec--actions { background: none; }
/* Pantalla de Tera Pay para quien solo tiene Tera Operaciones */
.pl-card { padding: 0; gap: 0; }
.pl-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: var(--s-4); }
.pl-list li { display: flex; flex-direction: column; gap: 4px; padding: var(--s-4); border: 1px solid var(--border); border-radius: var(--r-md); }
.pl-list strong { font-size: 15px; }
.pl-list span { font-size: 14px; color: var(--muted); line-height: 1.5; }
.field-row--map { grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)) !important; align-items: start; }

/* ===== Inicio (hm-*), diseño aprobado 2026-11-10: gráficos y pocas cajas ===== */
.hm { display: flex; flex-direction: column; gap: 44px; }
.hm-month { display: flex; align-items: center; gap: 8px; }
.hm-month label { font-size: 13px; font-weight: 700; }
.hm-h2 { margin: 0; font-size: 20px; font-weight: 800; color: var(--ink); }
.hm-lead { margin: 2px 0 14px; font-size: 14px; color: var(--muted); }
.hm-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.hm-sec { display: flex; flex-direction: column; min-width: 0; }
.hm-svg { width: 100%; height: auto; display: block; overflow: visible; }
.hm-tick { font-family: var(--font-ui); font-size: 12px; fill: var(--muted); color: var(--muted); font-weight: 500; }
.hm-tick--strong { font-weight: 800; fill: var(--ink); }
.hm-kicker { margin: 0 0 2px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.hm-kicker--dark { color: #5FD3A8; }
.hm-label { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.hm-big { display: block; font-family: var(--font-mono); font-size: 28px; font-weight: 600; letter-spacing: -0.5px; }
.hm-sub { display: block; font-size: 12px; color: var(--muted); }
.hm-num { font-family: var(--font-mono); font-weight: 600; white-space: nowrap; }
.hm-num--bad { color: var(--bad-solid); }
.hm-small { margin: 14px 0 0; font-size: 13px; color: var(--ink-2); }
.hm-empty { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.hm-gap { margin: 12px 0 0; font-size: 13px; font-weight: 700; color: var(--warn-fg); }
.hm-ok { margin: 12px 0 0; font-size: 13px; font-weight: 700; color: var(--ok-fg); }
/* Tera Pay */
.hm-pay { display: flex; flex-wrap: wrap; gap: 40px; }
.hm-pay__main { flex: 2 1 480px; min-width: 0; }
.hm-pay__side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.hm-pay__figures { display: flex; gap: 40px; flex-wrap: wrap; margin: 10px 0 8px; }
/* Franja oscura: ¿llegó todo a tu banco? */
.hm-hero { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; background: var(--nav-bg); color: #E7ECE9; border-radius: 20px; padding: 36px 40px; }
.hm-ring { flex: none; }
.hm-ring__pct { font-family: var(--font-mono); font-size: 34px; font-weight: 600; fill: #FFFFFF; }
.hm-ring__lbl { font-family: var(--font-ui); font-size: 13px; fill: #C9D3CE; }
.hm-hero__text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.hm-hero__text p { margin: 0; font-size: 15px; }
.hm-hero__text b { color: #FFFFFF; }
.hm-hero__lead { color: #C9D3CE; }
.hm-hero__amount { font-family: var(--font-mono); font-size: 46px !important; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; color: #FFFFFF; }
.hm-hero__amount--bad { color: #F0715E; }
.hm-hero__amount--ok { color: #5FD3A8; font-family: var(--font-ui); font-size: 36px !important; font-weight: 800; }
.hm-hero__title { margin: 0; font-size: 26px; font-weight: 800; color: #FFFFFF; }
.hm-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.hm-btn-light { background: #5FD3A8; color: var(--nav-bg); border-color: #5FD3A8; font-weight: 800; }
.hm-btn-light:hover { background: #7BE0BB; color: var(--nav-bg); }
.hm-btn-ghost { background: transparent; color: #E7ECE9; border-color: #3A4F47; }
.hm-btn-ghost:hover { background: #22332D; color: #FFFFFF; }
.hm-steps { margin: 4px 0 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: 15px; color: #E7ECE9; }
/* Cascada */
.hm-wf--total { fill: #1D9E75; } .hm-wf--cut { fill: #7C8782; } .hm-wf--due { fill: var(--ink); } .hm-wf--ok { fill: #5FD3A8; } .hm-wf--bad { fill: var(--bad-solid); } .hm-wf--off { fill: #C9D1CC; }
.hm-wf__link { stroke: #C9D1CC; stroke-dasharray: 3 3; }
.hm-wf__val { font-family: var(--font-mono); font-size: 15px; font-weight: 600; fill: var(--ink); }
.hm-wf__val--cut, .hm-wf__val--off { fill: var(--muted); } .hm-wf__val--ok { fill: var(--ok-fg); } .hm-wf__val--bad { fill: var(--bad-solid); }
.hm-wf__lbl { font-family: var(--font-ui); font-size: 14px; font-weight: 700; fill: var(--ink-2); }
.hm-wf__lbl--bad { fill: var(--bad-solid); }
/* Barras de depósitos y de comisión */
.hm-bar--ok { fill: #1D9E75; } .hm-bar--warn { fill: var(--warn-solid); } .hm-bar--bad { fill: var(--bad-solid); } .hm-bar--off { fill: #C9D1CC; }
.hm-svg a:hover .hm-bar, .hm-svg a:focus .hm-bar { opacity: 0.8; }
.hm-bar__note { font-family: var(--font-ui); font-size: 12px; font-weight: 800; }
.hm-bar__note--bad { fill: var(--bad-solid); } .hm-bar__note--warn { fill: var(--warn-fg); }
.hm-pair { display: flex; flex-wrap: wrap; gap: 48px; }
.hm-pair > .hm-sec { flex: 1 1 380px; }
.hm-fees { display: grid; grid-template-columns: minmax(90px, auto) minmax(0, 1fr) 70px; gap: 16px 14px; align-items: center; }
.hm-fees__name { font-weight: 700; display: flex; flex-direction: column; line-height: 1.25; }
.hm-fees__bar { width: 100%; height: 14px; display: block; }
.hm-fees .hm-num { text-align: right; }
/* Donas y leyendas */
.hm-donut { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.hm-donut svg { flex: none; }
.hm-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.hm-legend li { display: flex; gap: 8px; align-items: flex-start; }
.hm-legend--row { flex-direction: row; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--ink-2); }
.hm-legend--row li { align-items: center; }
.hm-legend--big li > span:last-child { display: flex; flex-direction: column; }
.hm-key { width: 10px; height: 10px; border-radius: 3px; flex: none; margin-top: 5px; }
.hm-legend--row .hm-key { margin-top: 0; }
.hm-key--ok, .hm-key--card { background: #1D9E75; } .hm-key--warn { background: var(--warn-solid); } .hm-key--bad { background: var(--bad-solid); } .hm-key--off { background: #C9D1CC; }
.hm-key--cash { background: #7C8782; } .hm-key--transfer { background: #3B7FC4; } .hm-key--other { background: #C9D1CC; }
.hm-note { font-size: 12px; font-weight: 700; }
.hm-note--ok { color: var(--ok-fg); } .hm-note--warn { color: var(--warn-fg); } .hm-note--muted { color: var(--muted); font-weight: 500; }
/* Qué revisar primero */
.hm-todo { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.hm-todo a { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--border); color: var(--ink); text-decoration: none; }
.hm-todo a:hover { background: var(--surface); }
.hm-todo__sub { display: block; font-size: 13px; color: var(--muted); }
.hm-dot { width: 12px; height: 12px; border-radius: 50%; }
.hm-dot--bad { background: var(--bad-solid); } .hm-dot--warn { background: var(--warn-solid); } .hm-dot--info { background: #3B7FC4; } .hm-dot--muted { background: #7C8782; }
/* Hasta dónde tiene Tera tus datos */
.hm-cover { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px 16px; align-items: center; }
.hm-cover__name { font-weight: 700; display: flex; flex-direction: column; line-height: 1.25; }
.hm-cover__bar { width: 100%; height: 22px; display: block; border-radius: 6px; overflow: hidden; }
.hm-cover__axis { width: 100%; height: 10px; display: block; }
.hm-cover__labels { width: 100%; height: 20px; display: block; overflow: visible; }
.hm-cover--provider_report { fill: #1D9E75; } .hm-cover--bank_statement { fill: var(--ink); } .hm-cover--sales_report { fill: #3B7FC4; }
@media (max-width: 767px) { .hm-hero { padding: 24px; gap: 20px; } .hm-hero__amount { font-size: 34px !important; } .hm-cover { grid-template-columns: 110px minmax(0, 1fr); } .hm-fees { grid-template-columns: 80px minmax(0, 1fr) 60px; } }
.hm-month .select select { height: 42px; min-width: 150px; padding: 0 36px 0 12px; border: 1px solid var(--border-strong); border-radius: var(--r-md); background-color: var(--surface); font: inherit; font-size: 14px; color: var(--ink); }
.hm-sec > .hm-svg { max-height: 360px; }
/* Gráficos del Inicio: las letras con el tamaño del panel, sin escalar con el ancho (2026-11-10) */
.hm-svg { max-height: none !important; }
.hm-tick { font-size: 12px; }
.hm-wf__val { font-size: 14px; }
.hm-wf__lbl { font-size: 13px; }
.hm-bar__note { font-size: 12px; }
.hm-curve { width: 100%; height: 150px; display: block; }
.hm-curve__axis { display: flex; justify-content: space-between; margin-top: 4px; }

/* ---- Configuración: encabezado y secciones (design/Configuracion.dc.html) ---- */
.cfg__head { display: flex; flex-direction: column; gap: 4px; margin-bottom: var(--s-5); }
.cfg__who { font-size: 14px; font-weight: 600; color: var(--muted); }
.cfg__title { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -0.5px; }
.cfg { display: flex; flex-wrap: wrap; gap: var(--s-6); align-items: flex-start; }
.cfg__nav { flex: 0 1 220px; min-width: 180px; display: flex; flex-direction: column; gap: 4px; }
.cfg__nav a { text-decoration: none; padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink); border: 1px solid transparent; }
.cfg__nav a:hover { background: var(--surface-2); }
.cfg__nav a[aria-current="page"] { background: #FFFFFF; border-color: var(--line); font-weight: 700; }
.cfg__main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: var(--s-5); }
.cfg__main > .panel, .cfg__main > form.panel { margin: 0; }

/* ---- Configuración → Conciliación (tolerancias) ---- */
.tl-intro { padding: var(--s-6); display: flex; flex-direction: column; gap: 10px; }
.tl-intro h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.3px; }
.tl-intro p { margin: 0; font-size: 15px; line-height: 1.55; }
.tl-intro .tl-meta { font-size: 13px; color: var(--muted); }
.tl-step { display: block; font-size: 12px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; color: var(--ok-fg); margin-bottom: 6px; }
.tl-step--warn { color: var(--warn-fg); }
.tl-sentence { margin: 0; font-size: 16px; line-height: 2.3; }
.tl-num { width: 64px !important; text-align: center; font-family: var(--font-mono); font-weight: 600; display: inline-block; }
.tl-money { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-weight: 600; }
.tl-money input { width: 110px; text-align: right; font-family: var(--font-mono); font-weight: 600; }
.tl-money--inline input { width: 100px; }
.tl-example { margin: 0; background: var(--surface-2); border-radius: 10px; padding: 12px 14px; font-size: 14px; line-height: 1.5; }
.tl-example:empty { display: none; }
.tl-reco { margin: 0; font-size: 13px; color: var(--muted); }
.tl-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; width: 100%; }
.tl-actions__go { display: flex; flex-wrap: wrap; gap: 12px; }
.tl-try, .tl-preview { padding: var(--s-6); display: flex; flex-direction: column; gap: var(--s-4); }
.tl-try h2, .tl-preview h2 { margin: 0; font-size: 18px; font-weight: 800; }
.tl-try > p, .tl-preview > p { margin: 0; }
.tl-try__fields { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; }
.tl-try__fields .field { margin: 0; }
.tl-verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 10px; font-size: 15px; line-height: 1.5; }
.tl-verdict--ok { background: var(--ok-bg); color: var(--ok-fg); }
.tl-verdict--warn { background: var(--warn-bg); color: var(--warn-fg); }
.tl-verdict--bad { background: var(--bad-bg); color: var(--bad-fg); }
.tl-verdict__chip { flex: none; font-size: 13px; font-weight: 800; padding: 5px 10px; border-radius: 6px; background: #FFFFFF; }
.tl-moves { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 12px; }
.tl-move { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.tl-move span { font-size: 13px; font-weight: 600; color: var(--muted); }
.tl-move__n { font-family: var(--font-mono); font-size: 22px; font-weight: 600; }
.tl-move__n--ok { color: var(--ok-fg); } .tl-move__n--warn { color: var(--warn-fg); } .tl-move__n--bad { color: var(--bad-fg); }
.tl-note { margin: 0; font-size: 14px; }
.cfg__section { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.3px; }
/* Mismas cajitas en las frases y en los campos (Pablo: que no se vean distintas). */
.tl-num, .tl-money input, .tl-try input {
    box-sizing: border-box; height: 44px; padding: 10px 12px !important; border: 1.5px solid var(--border-strong) !important; border-radius: var(--r-md) !important;
    background: #FFFFFF; font: 600 15px/1 var(--font-mono) !important; color: var(--ink); vertical-align: middle;
}
.tl-num { width: 64px !important; text-align: center !important; }
.tl-money input { width: 120px !important; flex: none; text-align: right !important; }
.tl-money { flex-wrap: nowrap; }
.tl-num:focus, .tl-money input:focus, .tl-try input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.tl-num:disabled, .tl-money input:disabled { background: var(--surface-2); color: var(--muted); }

/* ---- Sedes, depósitos sin identificar, efectivo y asientos (diseño 2026-11-11) ---- */
.sd-how, .sd-box, .dp-new { padding: var(--s-6); display: flex; flex-direction: column; gap: 12px; margin: 0; }
.sd-how h2, .sd-box h2, .dp-new h2, .sd-table h2 { margin: 0; font-size: 18px; font-weight: 800; }
.sd-how p, .sd-box p, .dp-new p { margin: 0; }
.sd-choice { display: flex; align-items: flex-start; flex-wrap: nowrap; gap: 10px; font-size: 15px; line-height: 1.45; }
.sd-choice > span { flex: 1 1 auto; min-width: 0; }
.sd-choice input[type="radio"] { margin-top: 3px; }
.sd-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; border-radius: var(--r-lg); background: var(--info-bg); color: var(--info-fg); font-size: 15px; line-height: 1.5; }
.sd-banner form { margin: 0; }
.sd-table { padding: 22px 0 8px; margin: 0; }
.sd-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 0 24px 14px; }
.sd-head p { margin: 4px 0 0; }
.sd-pad { padding: 8px 24px; margin: 0; }
.sd-small { font-size: 13px; }
.sd-new { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.sd-new input { border: 1.5px solid var(--border-strong); border-radius: var(--r-md); padding: 8px 10px; font: inherit; font-size: 14px; }
.sd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sd-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; }
.sd-chip--x { padding-right: 6px; cursor: pointer; }
.sd-chip--x input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sd-chip--x span { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 999px; background: #FFFFFF; font-size: 15px; }
.sd-chip--x:has(input:checked) { text-decoration: line-through; opacity: 0.55; }
.sd-chip--x:has(input:focus-visible) { outline: 2px solid var(--accent); }
.sd-box--warn { border-color: var(--warn-solid); }
.sd-assign { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); margin: 0; }
.sd-assign__name { flex: 1 1 320px; }
.sd-assign .select { min-width: 220px; }
.dp-try { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 0; }
.dp-try .field { margin: 0; flex: 1 1 320px; max-width: 520px; }
.dp-form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.dp-kinds { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.dp-kinds legend { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.dp-inline { border: 1.5px solid var(--border-strong); border-radius: var(--r-md); padding: 7px 10px; font: inherit; font-size: 14px; }
.tl-move--warn { border-color: var(--warn-solid); background: var(--warn-bg); }
.tl-move--bad { border-color: var(--bad-solid); background: var(--bad-bg); }
.cs-verdict { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.35; letter-spacing: -0.3px; }
.cs-bad { color: var(--bad-fg); font-weight: 700; }
.cs-warn { color: var(--warn-fg); font-weight: 700; }
.cs-ok { color: var(--ok-fg); font-weight: 700; }
tr.is-selected td { background: var(--surface-2); }
.ac-warn { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-fg); font-size: 14px; line-height: 1.5; }
.ac-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ac-code { width: 110px; border: 1.5px solid var(--border-strong); border-radius: var(--r-md); padding: 9px 10px; font: 600 14px var(--font-mono); }
.ac-name { width: 100%; min-width: 220px; border: 1.5px solid var(--border-strong); border-radius: var(--r-md); padding: 9px 10px; font: inherit; font-size: 14px; }
tr.ac-first td { border-top: 2px solid var(--line-head); }

/* Tablas dentro de un panel sin relleno lateral (sd-table): la primera y la última columna llevan
   el mismo margen que el título; nada queda pegado al borde ni se sale (Pablo, 2026-11-11). */
@media (min-width: 768px) {
    .sd-table .table th:first-child, .sd-table .table td:first-child { padding-left: 24px; }
    .sd-table .table th:last-child, .sd-table .table td:last-child { padding-right: 24px; }
}
@media (max-width: 767px) { .sd-table .table-wrap { padding: 0 16px; } }
.sd-table > h2 { padding: 0 24px 14px; }
.tl-intro .cs-verdict { font-size: 22px; font-weight: 800; line-height: 1.35; letter-spacing: -0.3px; }

/* ---- Inicio: dos zonas (Tera Pay, Tera Operaciones) y cada gráfico en su tarjeta (Pablo, 2026-11-11:
   «no hay separación, es una sábana, los gráficos parecen de lo mismo»). ---- */
.hm { gap: 20px; }
.hm-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px 28px; box-sizing: border-box; }
.hm-pay { gap: 20px; align-items: stretch; }
.hm-pair { gap: 20px; align-items: stretch; }
.hm-zone { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 28px; padding-bottom: 12px; border-bottom: 2px solid var(--line); }
.hm-zone__tag { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.hm-zone__desc { font-size: 15px; color: var(--muted); }
.hm-zone--pay { border-bottom-color: #2FA67F; }
.hm-zone--pay .hm-zone__tag { background: var(--ok-bg); color: var(--ok-fg); }
.hm-zone--ops { border-bottom-color: var(--nav-bg); }
.hm-zone--ops .hm-zone__tag { background: var(--nav-bg); color: #FFFFFF; }
@media (max-width: 767px) { .hm-card { padding: 18px 16px; } }
.dp-groups tbody + tbody { border-top: 2px solid var(--line-head); }
.dp-group td { background: var(--surface-2); }
.dp-item td:first-child { padding-left: 40px !important; }
.dp-total { font-size: 12px; color: var(--muted); font-weight: 500; }
@media (max-width: 767px) { .dp-item td:first-child { padding-left: 0 !important; } }
.dp-step { display: flex; gap: 16px; align-items: flex-start; margin: 0; padding-top: 16px; border-top: 1px solid var(--line); }
.dp-step__n { flex: none; width: 32px; height: 32px; border-radius: 999px; background: var(--nav-bg); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; }
.dp-step__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 10px; border: 0; padding: 0; margin: 0; }
.dp-step__title { font-size: 16px; font-weight: 800; color: var(--ink); padding: 0; }
.dp-step__body p { margin: 0; }
.dp-caption { caption-side: top; text-align: left; font-weight: 700; padding: 12px 0 8px; }
.dp-kinds legend.dp-step__title { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
/* Usuarios y roles, Mi cuenta */
.account a.account__user { font-weight: 600; color: var(--ink-2); text-decoration: none; }
.account a.account__user:hover { text-decoration: underline; }
.tm-role { display: flex; gap: 8px; align-items: center; margin: 0; }
.tm-actions { white-space: nowrap; }
.tm-actions .inline-form { display: inline; margin-left: 12px; }
.cl-edit { margin-top: 6px; }
.cl-edit > summary { list-style: none; cursor: pointer; font-size: 13px; }
.cl-edit > summary::-webkit-details-marker { display: none; }
.cl-edit__form { display: grid; gap: 6px; margin-top: 8px; max-width: 280px; }
.cl-edit__form label { font-size: 12px; font-weight: 600; }
.cl-edit__form input { padding: 6px 8px; border: 1px solid var(--border, #d0d5dd); border-radius: 6px; font: inherit; }
.cl-edit__form .button { justify-self: start; }
.tm-matrix .tm-c { text-align: center; }
.tm-yes { color: var(--ok-fg); font-weight: 800; }
.tm-no { color: var(--muted); }
/* Cobro de Tera Operaciones: aviso de pago vencido */
.ob-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-radius: 14px; margin-bottom: var(--s-4); }
.ob-banner--warn { background: var(--warn-bg); color: var(--warn-fg); border: 1px solid var(--warn-solid); }
.ob-banner--bad { background: var(--bad-bg); color: var(--bad-fg); border: 1px solid var(--bad-solid); }
.ob-banner__text { display: flex; flex-direction: column; gap: 4px; font-size: 15px; line-height: 1.5; }
.ob-banner__text b { font-size: 16px; }
.button--danger-solid { background: var(--bad-solid); color: #FFFFFF; border-color: var(--bad-solid); }
/* Plan y pagos */
.pl-head { padding: var(--s-6); display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; margin: 0; }
.pl-head__text { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.pl-head__amount { font-size: 26px; font-weight: 800; letter-spacing: -0.3px; }
.pl-head__amount small { font-size: 15px; font-weight: 600; color: var(--muted); }
.pl-chip { font-size: 14px; padding: 8px 14px; }
.pl-pay { padding: var(--s-6); display: flex; flex-direction: column; gap: 14px; margin: 0; }
.pl-pay h2 { margin: 0; font-size: 18px; font-weight: 800; }
.pl-pay__ways { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.pl-pay__ways form { margin: 0; }
.pl-transfer { display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.5; padding: 12px 16px; background: var(--surface-2); border-radius: 10px; }
.pl-sum td { color: var(--muted); text-align: right; }
.pl-sum td.num { color: var(--ink); }
.pl-sum--total td { font-weight: 800; color: var(--ink); border-top: 2px solid var(--line-head); }
/* Comprobante */
.rc { max-width: 760px; margin: 40px auto; padding: 40px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px; font-size: 14px; }
.rc__head { display: flex; justify-content: space-between; align-items: baseline; }
.rc__brand { font-size: 26px; font-weight: 800; }
.rc__title { font-size: 18px; font-weight: 800; font-family: var(--font-mono); }
.rc__note { color: var(--muted); margin: 6px 0 20px; }
.rc__facts { display: grid; grid-template-columns: 140px 1fr; gap: 6px 16px; margin: 0 0 20px; }
.rc__facts div { display: contents; }
.rc__facts dt { color: var(--muted); }
.rc__facts dd { margin: 0; }
.rc__table { width: 100%; border-collapse: collapse; }
.rc__table th, .rc__table td { padding: 8px; border-bottom: 1px solid var(--line); text-align: right; }
.rc__table th:first-child, .rc__table td:first-child { text-align: left; }
.rc__total td { font-weight: 800; border-top: 2px solid var(--line-head); }
.rc__pay { margin-top: 20px; }
@media print { .rc { border: 0; margin: 0; } }

/* ---- Analítica (Tera Operaciones) ---- */
.an-intro { margin: -6px 0 16px; font-size: 15px; color: var(--ink-2); }
.an-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.an-kpi { display: flex; flex-direction: column; gap: 6px; }
.an-delta { font-size: 13px; font-weight: 800; }
.an-delta--up { color: var(--ok-fg); } .an-delta--down { color: var(--bad-solid); } .an-delta--flat { color: var(--muted); }
.an-page { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.an-seg--card { fill: #1D9E75; } .an-seg--transfer { fill: #3B7FC4; } .an-seg--cash { fill: #7C8782; } .an-seg--other { fill: #C9D1CC; }
.hm-svg g:hover .an-seg { opacity: 0.82; }
.an-val { font-family: var(--font-mono); font-size: 13px; font-weight: 600; fill: var(--ink-2); }
.an-val--now { fill: var(--ink); font-weight: 700; }
.an-verdict { margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; font-size: 15px; font-weight: 700; }
.an-verdict--bad { background: var(--bad-bg); color: var(--bad-fg); }
.an-verdict--ok { background: var(--ok-bg); color: var(--ok-fg); }
.an-verdict--flat { background: var(--surface-2); color: var(--ink); }
.an-table td.an-up { color: var(--bad-solid); font-weight: 700; white-space: nowrap; }
.an-table td.an-up::after { content: ' ▲'; font-size: 11px; }
.an-table td.an-down { color: var(--ok-fg); font-weight: 700; }
.an-table td.an-down::after { content: ' ▼'; font-size: 11px; }
.an-procs { width: fit-content; margin: 0 0 14px; flex-wrap: wrap; }
/* Donas por canal (diseño de Pablo 2026-11-14). El color de cada canal sale de --canal-*. */
.an-ch--pos { stroke: var(--canal-pos); fill: var(--canal-pos); background: var(--canal-pos); }
.an-ch--totem { stroke: var(--canal-totem); fill: var(--canal-totem); background: var(--canal-totem); }
.an-ch--app { stroke: var(--canal-app); fill: var(--canal-app); background: var(--canal-app); }
.an-ch--web { stroke: var(--canal-web); fill: var(--canal-web); background: var(--canal-web); }
.an-ch--link { stroke: var(--canal-link); fill: var(--canal-link); background: var(--canal-link); }
.an-ch--otro { stroke: var(--canal-otro); fill: var(--canal-otro); background: var(--canal-otro); }
.an-donuts { margin-bottom: 20px; }
.an-donuts > .hm-sec { flex: 1 1 380px; }
.an-dn-chart { position: relative; width: 100%; max-width: 260px; margin: 6px auto 24px; }
.an-dn-chart svg { display: block; width: 100%; height: auto; }
.an-dn-ring { stroke: var(--line); }
.an-dn-seg { fill: none; transition: opacity .15s, stroke-width .15s; cursor: pointer; }
.an-dn-chart.is-focus .an-dn-seg { opacity: .28; }
.an-dn-chart.is-focus .an-dn-seg.is-on { opacity: 1; stroke-width: 36; }
.an-dn-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; padding: 0 12%; }
.an-dn-center__lbl { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.an-dn-center__big { font-family: var(--font-mono); font-weight: 600; font-size: 15px; letter-spacing: -.02em; color: var(--ink); margin: 4px 0; white-space: nowrap; }
.an-dn-center__big--long { font-size: 13px; white-space: normal; }
.an-dn-center__small { font-size: 13px; color: var(--muted); }
.an-dn-lhead, .an-dn-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; column-gap: 12px; align-items: center; }
.an-dn-lhead { padding: 0 8px 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.an-dn-lhead span:nth-child(3), .an-dn-v1 { min-width: 64px; text-align: right; }
.an-dn-lhead span:nth-child(4), .an-dn-v2 { min-width: 132px; text-align: right; }
.an-dn-legend { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.an-dn-row { row-gap: 6px; padding: 10px 8px; border-bottom: 1px solid var(--line); border-radius: 8px; cursor: pointer; outline: none; transition: background .15s; }
.an-dn-row:hover, .an-dn-row:focus-visible, .an-dn-row.is-on { background: var(--surface-2); }
.an-dn-row:focus-visible { box-shadow: 0 0 0 2px var(--accent) inset; }
.an-dn-sw { width: 12px; height: 12px; border-radius: 3px; }
.an-dn-name { font-weight: 600; font-size: 15px; color: var(--ink); }
.an-dn-v1, .an-dn-v2 { font-family: var(--font-mono); font-weight: 600; font-size: 15px; white-space: nowrap; }
.an-dn-v1 { color: var(--ink-2); }
.an-dn-v2 { color: var(--ink); }
.an-dn-bar { grid-column: 2 / 5; display: block; width: 100%; height: 4px; }
.an-dn-bar__bg { fill: var(--line); }
@media (max-width: 420px) { .an-dn-lhead span:nth-child(4), .an-dn-v2 { min-width: 0; } .an-dn-lhead span:nth-child(3), .an-dn-v1 { min-width: 0; } }
.an-table tr.an-total td { font-weight: 700; }
.an-hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.an-hbars li { display: grid; grid-template-columns: 96px minmax(0, 1fr) 90px; gap: 12px; align-items: center; font-size: 14px; }
.an-hbars li .hm-num { text-align: right; }
.an-hbars li.is-top .an-hbars__lbl { font-weight: 800; }
.an-meter { width: 100%; height: 14px; display: block; appearance: none; -webkit-appearance: none; border: 0; background: var(--line); border-radius: 7px; }
.an-meter::-webkit-meter-bar { background: var(--line); border: 0; border-radius: 7px; height: 14px; }
.an-meter::-webkit-meter-optimum-value { background: #1D9E75; border-radius: 7px; }
.an-meter::-moz-meter-bar { background: #1D9E75; border-radius: 7px; }
.an-col-bar { width: 28%; min-width: 140px; }
@media (max-width: 767px) { .main .an-table td.an-up, .main .an-table td.an-down { grid-template-columns: fit-content(50%) minmax(0, 1fr) auto; column-gap: 6px; } .an-col-bar { width: auto; min-width: 0; } .an-hbars li { grid-template-columns: 80px minmax(0, 1fr) 76px; } }
.an-note { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-fg); font-size: 14px; font-weight: 600; }
.ac-formats { margin-top: 14px; padding: 14px 16px; border-radius: 10px; background: var(--surface-2); font-size: 14px; color: var(--ink-2); }
.ac-formats p { margin: 0 0 6px; }
.ac-formats ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }

/* ---- Tus empresas (estudios contables) ---- */
.co-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.co-kpi { display: flex; flex-direction: column; gap: 6px; }
.co-kpi__lbl { font-size: 13px; font-weight: 800; }
.co-kpi__lbl--ok { color: var(--ok-fg); } .co-kpi__lbl--bad { color: var(--bad-solid); } .co-kpi__lbl--warn { color: var(--warn-fg); } .co-kpi__lbl--light { color: #5FD3A8; }
.co-kpi--dark { background: var(--nav-bg); color: #E7ECE9; border-radius: 16px; padding: 24px 28px; justify-content: space-between; }
.co-kpi__txt { font-size: 14px; color: #C9D3CE; }
.co-kpi__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.co-kpi__btns .button { font-size: 14px; padding: 9px 12px; }
.co-go { display: inline; margin: 0; }
.co-name { all: unset; cursor: pointer; font-family: var(--font-ui); font-weight: 800; color: var(--ink); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.co-name:hover, .co-name:focus-visible { color: var(--accent); text-decoration-color: currentColor; }
.co-name:focus-visible, .co-act:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.co-act { all: unset; cursor: pointer; font-family: var(--font-ui); font-size: 15px; font-weight: 800; color: var(--accent); white-space: nowrap; }
.co-act:hover { color: var(--accent-hover); text-decoration: underline; }
.co-sub { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.co-sub--dark { color: var(--ink-2); }
.co-chip { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 800; }
.co-chip--bad { background: var(--bad-bg); color: var(--bad-fg); } .co-chip--warn { background: var(--warn-bg); color: var(--warn-fg); }
.co-chip--ok { background: var(--ok-bg); color: var(--ok-fg); } .co-chip--info { background: var(--info-bg); color: var(--info-fg); }
.co-table { padding-left: 0; padding-right: 0; }
.co-foot { margin: 0; padding: 14px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.ac-copy { background: #EEF4FD; border: 1.5px solid #B9CDF2; padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.ac-copy h2 { margin: 0; font-size: 18px; font-weight: 800; color: #1E3A8A; }
.ac-copy p { margin: 0; font-size: 15px; color: #1F2D4D; }
.ac-copy__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px 20px; }
.ac-copy__item { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; background: var(--surface); border: 1px solid #C9D7F0; border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.ac-copy__item input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.ac-copy__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 14px; color: var(--ink-2); }
.ac-copy__btn { background: #1E40AF; border-color: #1E40AF; color: #FFFFFF; font-weight: 800; }
.ac-copy__btn:hover { background: #1E3A8A; color: #FFFFFF; }

/* ---- Ruta de navegación (breadcrumb) ---- */
.crumbs ol { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); }
.crumbs li { display: flex; align-items: center; gap: 6px; }
.crumbs li + li::before { content: '›'; color: var(--border-strong); }
.crumbs a { color: var(--accent); font-weight: 600; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--ink); font-weight: 700; }
/* Cargar personas a un plan */
.plan-load { display: flex; flex-direction: column; gap: 14px; }
.plan-load__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.plan-load__head h2 { margin: 0; }
.plan-load__sample th { text-transform: none; font-family: var(--font-mono); }
.plan-load__notes { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: 15px; color: var(--ink-2); }

/* ---- Etiqueta de la prueba gratis (TERA_COMPRA_ONLINE 7.1) ---- */
.trial-tag { margin: 0 0 8px; align-self: flex-end; display: inline-flex; padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 800; }
.trial-tag--info { background: #E6F0FB; color: #1D4F86; }
.trial-tag--warn { background: var(--warn-bg); color: var(--warn-fg); }
.trial-tag--bad { background: var(--bad-bg); color: var(--bad-fg); }

/* ---- Primera vez: sube tu último mes (design/PanelPrimeraVez) ---- */
.ob-head h1 { margin: 0 0 6px; }
.ob-month { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin: 16px 0; }
.ob-month strong { display: block; font-size: 17px; }
.ob-month__bar { display: flex; align-items: center; gap: 12px; flex: 0 1 320px; }
.ob-month__bar .an-meter { flex: 1; }
.ob-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
@media (max-width: 900px) { .ob-cards { grid-template-columns: 1fr; } }
.ob-card { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.ob-card--next { border: 2px solid #3B7FC4; }
.ob-card--done { border: 2px solid var(--ok-bg); background: #F6FBF8; }
.ob-card--later { opacity: 0.85; }
.ob-card__head { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.ob-card__num { width: 32px; height: 32px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; background: var(--line); color: var(--ink-2); flex: none; }
.ob-card--next .ob-card__num { background: #3B7FC4; color: #FFFFFF; }
.ob-card--done .ob-card__num { background: var(--accent); color: #FFFFFF; }
.ob-card__text { margin: 0; color: var(--ink-2); font-size: 15px; }
.ob-card__file { margin: 0; font-weight: 700; font-size: 15px; color: var(--ok-fg); }
.ob-card__file--warn { color: var(--warn-fg); }
.ob-card__form { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.ob-card__help { margin-top: auto; font-size: 15px; }
.ob-card__help summary { color: var(--accent); font-weight: 700; cursor: pointer; }
.ob-card__help p { margin: 8px 0 0; color: var(--ink-2); }
.ob-result { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 20px 0 8px; padding: 18px 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }

/* Agregar una empresa / Comprar un usuario (PanelAgregarEmpresa, PanelComprarUsuario, 2026-11-13) */
.ss-head { margin: 4px 0 var(--s-5); }
.ss-head h1 { margin: 0 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -0.3px; }
.ss-head .lead { margin: 0; color: var(--muted); }
.ss-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); align-items: start; }
@media (min-width: 960px) { .ss-grid { grid-template-columns: minmax(0, 1fr) 340px; } .ss-side { position: sticky; top: var(--s-5); } }
.ss-main, .ss-side { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
.ss-box { padding: var(--s-6); display: flex; flex-direction: column; gap: 14px; margin: 0; }
.ss-box h2 { margin: 0; font-size: 17px; font-weight: 700; }
.ss-box__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: baseline; }
.ss-ruc { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.ss-ruc .field { flex: 1 1 200px; margin: 0; }
.ss-data { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px 24px; margin: 0; }
.ss-data dt { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.ss-data dd { margin: 0; font-size: 15px; font-weight: 600; }
.ss-msg { margin: 0; padding: 10px 14px; border-radius: var(--r-md); font-size: 14px; }
.ss-msg--bad { background: var(--bad-bg); color: var(--bad-fg); }
.ss-msg--warn { background: var(--warn-bg); color: var(--warn-fg); }
.ss-tip { background: var(--surface-2); }
.ss-tip p { margin: 0; font-size: 14px; color: var(--muted); }
.ss-checks, .ss-roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 10px; }
.ss-check, .ss-rolecard { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-md); cursor: pointer; }
.ss-check:has(input:checked), .ss-rolecard:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ss-check input, .ss-rolecard input { margin-top: 3px; }
.ss-check > span, .ss-rolecard > span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.45; }
.ss-sum { padding: var(--s-5); display: flex; flex-direction: column; gap: 12px; margin: 0; }
.ss-sum h2 { margin: 0; font-size: 16px; font-weight: 700; }
.ss-sum p { margin: 0; font-size: 14px; }
.ss-sum__item { display: flex; flex-direction: column; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.ss-sum__item strong { font-size: 22px; font-weight: 800; }
.ss-sum__item small, .ss-sum__total small { font-size: 13px; font-weight: 600; color: var(--muted); }
.ss-sum__rows { margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.ss-sum__rows div { display: flex; justify-content: space-between; gap: 12px; }
.ss-sum__rows dt { color: var(--muted); }
.ss-sum__rows dd { margin: 0; font-weight: 600; text-align: right; }
.ss-sum__total { padding-top: 8px; border-top: 1px solid var(--line); font-size: 16px; }
.ss-sum__total dt { color: var(--ink); font-weight: 700; }
.ss-sum__trial { background: var(--ok-bg); color: var(--ok-fg); padding: 10px 12px; border-radius: var(--r-md); }
.ss-pay { margin: 0; font-size: 13px; }
.ss-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ss-actions .button { flex: 1 1 auto; justify-content: center; }
.pl-cancel { padding: var(--s-6); display: flex; flex-direction: column; gap: 12px; margin: 0; }
.pl-cancel h2 { margin: 0; font-size: 17px; }
.pl-cancel p { margin: 0; font-size: 14px; }
.pl-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: var(--s-4); padding: 0 24px 24px; }
.pl-way { padding: var(--s-4); border: 1px solid var(--border); border-radius: var(--r-md); display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.pl-way--off { background: var(--surface-2); color: var(--muted); }
.pl-period { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding-bottom: 0; }

/* Barra de arriba (Pablo, 2026-11-13): en qué empresa estás y tu menú. */
.topbar { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 12px; margin: 0 0 var(--s-4); }
.topbar .trial-tag { margin: 0; align-self: center; }
.tb-company { display: flex; align-items: center; gap: 12px; min-width: 0; max-width: min(460px, 100%); padding: 8px 14px 8px 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; color: var(--ink); text-decoration: none; box-shadow: 0 1px 2px rgba(19, 32, 28, 0.05); }
a.tb-company:hover { border-color: var(--accent); color: var(--ink); }
a.tb-company:hover .tb-company__switch { text-decoration: underline; }
.tb-company__badge { flex: none; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--accent); color: #FFFFFF; font-weight: 800; font-size: 16px; }
.tb-company__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.tb-company__label { font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); }
.tb-company__name { font-size: 15px; font-weight: 800; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.tb-company__ruc { font-size: 12px; color: var(--muted); }
.tb-company__switch { flex: none; display: inline-flex; align-items: center; gap: 2px; margin-left: auto; padding-left: 8px; font-size: 13px; font-weight: 700; color: var(--accent); }
.tb-user { position: relative; }
.tb-user > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 12px; cursor: pointer; color: var(--ink); }
.tb-user > summary::-webkit-details-marker { display: none; }
.tb-user > summary:hover, .tb-user[open] > summary { background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.tb-user__avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--nav-bg); color: #FFFFFF; font-weight: 800; font-size: 13px; letter-spacing: 0.3px; }
.tb-user__text { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.tb-user__text strong { font-size: 14px; font-weight: 700; }
.tb-user__text span { font-size: 12px; color: var(--muted); }
.tb-chev { flex: none; color: var(--muted); }
.tb-user[open] .tb-chev { transform: rotate(180deg); }
.tb-user__menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 230px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(19, 32, 28, 0.14); display: flex; flex-direction: column; }
.tb-user__menu a, .tb-user__menu button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; }
.tb-user__menu a:hover, .tb-user__menu button:hover { background: var(--surface-2); color: var(--ink); }
.tb-user__menu form { margin: 0; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.tb-user__menu button { color: var(--bad-fg); }
@media (max-width: 720px) {
    .topbar { justify-content: stretch; }
    .tb-company { order: 2; flex: 1 1 100%; max-width: none; }
    .tb-user { order: 1; margin-left: auto; }
    .tb-user__text { display: none; }
    .topbar .trial-tag { order: 0; }
}

/* Conciliación mientras se procesa un archivo (2026-11-13) */
.upd { text-align: center; padding: var(--s-6) var(--s-5); }
.upd__title { font-size: 20px; margin: 0 0 var(--s-2); overflow-wrap: anywhere; }
.upd__text { color: var(--muted); max-width: 560px; margin: 0 auto var(--s-4); }
.upd__bar { width: 100%; max-width: 480px; }
.upd__pct { font-weight: 600; margin: var(--s-2) 0 0; }

/* Recordarme: fecha y botón en la misma línea, alineados abajo (2026-11-13) */
.remind__row { display: flex; align-items: flex-end; gap: var(--s-3); flex-wrap: wrap; }
.remind__row .field { margin: 0; }

/* «¿Qué pasó con este pago?» (2026-11-13): cada opción muestra sus datos solo al elegirla */
.wp__opt { display: block; cursor: default; }
.wp__head { display: flex; gap: var(--s-3); align-items: flex-start; cursor: pointer; }
.wp__head > span { display: flex; flex-direction: column; gap: 2px; }
.wp__sub { display: none; margin: var(--s-3) 0 0 28px; max-width: 280px; }
.wp__opt:has(input[type="radio"]:checked) .wp__sub { display: block; }
.wp__opt:has(input[type="radio"]:checked) { border: 2px solid var(--accent); background: var(--accent-soft); }

/* Sedes: asignar varios nombres a la vez (2026-11-13) */
.sd-bulk__row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.sd-bulk__row input { width: 18px; height: 18px; flex: none; }
.sd-bulk__actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.sd-bulk__actions .field { margin: 0; min-width: 260px; }


/* Agregar una empresa: ¿quién la maneja? (2026-11-14). */
.ss-who { display: grid; gap: 10px; }
.ss-who h2, .ss-who > p { margin: 0; }
.ss-who__opt { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px; cursor: pointer; }
.ss-who__opt:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ss-who__opt > input { margin-top: 4px; }
.ss-who__opt > span { display: grid; gap: 2px; flex: 1; min-width: 0; }
.ss-who__fields { display: none; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.ss-who__opt:has(input[value="other"]:checked) .ss-who__fields { display: grid; }
.ss-who__fields .field { margin: 0; }
@media (max-width: 560px) { .ss-who__fields { grid-template-columns: 1fr; } }

/* Consola → Libro de reclamaciones (2026-11-19): textos largos con sus saltos de línea. */
.cm-text { white-space: pre-line; font-weight: 400 !important; line-height: 1.55; overflow-wrap: anywhere; }
.facts .facts__wide { grid-column: 1 / -1; }

/* Ficha de una hoja: dos columnas iguales (lo que reclama | la respuesta). */
.cm-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.cm-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.cm-sub { font-size: 15px; margin: var(--s-4) 0 var(--s-2); }
@media (max-width: 1100px) { .cm-grid { grid-template-columns: minmax(0, 1fr); } }
/* Editor de texto (richtext.js). Sin JavaScript queda el <textarea>. */
.rt__bar, .rt__editor { display: none; }
.rt--on .rt__bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border: 1.5px solid var(--border-strong); border-bottom: 0; border-radius: var(--r-md) var(--r-md) 0 0; background: var(--surface-2); }
.rt--on .rt__editor { display: block; min-height: 260px; padding: 12px 14px; border: 1.5px solid var(--border-strong); border-radius: 0 0 var(--r-md) var(--r-md); background: var(--surface); line-height: 1.55; font-size: 15px; overflow-wrap: anywhere; }
.rt--on .rt__editor:focus { outline: 3px solid var(--accent-light); outline-offset: 1px; border-color: var(--accent); }
.rt--on .rt__source { display: none; }
.rt--invalid .rt__editor { border-color: #B42318; }
.rt__btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; }
.rt__btn:hover { background: var(--surface); }
.rt__btn[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.rt__editor p, .rt-view p { margin: 0 0 10px; }
.rt__editor ul, .rt__editor ol, .rt-view ul, .rt-view ol { margin: 0 0 10px; padding-left: 22px; }
.rt-view { line-height: 1.55; overflow-wrap: anywhere; }
.rt-view a, .rt__editor a { color: var(--accent); font-weight: 600; }
/* Lista de archivos elegidos o adjuntos. */
.files { list-style: none; margin: var(--s-2) 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.files:empty { display: none; }
.files__item { display: flex; align-items: center; gap: var(--s-3); padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); font-size: 14px; }
.files__item--bad { border-color: #B42318; }
.files__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.files__size { color: var(--muted); font-family: var(--font-mono); font-size: 13px; }
.rt__box { display: flex; flex-direction: column; }
