/* facturas.css — hoja propia de DMC Facturas sobre el design system DMC
   (tokens.css + dmc-header.css + dmc-icons.css + dmc-surfaces.css, copiados sin cambios en /static/ds/).
   Solo valores de los tokens DMC / Superficies v2. Inter en todo. */

/* ── Base ──────────────────────────────────────────────────────────── */
:root { --dh-pad: 24px; --dh-z: 100; --fx-tint: #E4EEFA; --fx-hover-row: #F8FAFC; --fx-skel: #E8EDF3; }
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); background: var(--ds-page); color: var(--ds-text-2); line-height: 1.45; min-height: 100vh; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--ds-blue); }
[hidden] { display: none !important; }
html.fx-lock { overflow: hidden; }
html.dh-lock body { overflow-x: visible; }

/* La máscara del logo vive en /static/ds/ */
.dh-mark { -webkit-mask: url(/static/ds/logo-dmc-mark.png) center / contain no-repeat; mask: url(/static/ds/logo-dmc-mark.png) center / contain no-repeat; }
/* Popover de Módulos en tablet: anclado a la derecha para no generar scroll horizontal */
@media (min-width: 768px) and (max-width: 1099px) { .dh-dd { position: static; } .dh-pop { left: auto; right: var(--dh-pad, 24px); top: calc(100% - 4px); } }

.fx-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.fx-skip { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--ds-navy); color: #fff; padding: 10px 16px; border-radius: var(--ds-r-pill); font-weight: 600; text-decoration: none; }
.fx-skip:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--ds-blue); outline-offset: 2px; }
main:focus { outline: none; }

/* Usuario en el header */
.fx-user { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; margin-right: 4px; min-width: 0; }
.fx-user-n { font-size: 12.5px; font-weight: 600; color: var(--ds-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.fx-user-r { font-size: 11px; color: var(--ds-text-3); white-space: nowrap; }
.fx-sheet-user { display: flex; flex-direction: column; padding: 8px 12px 12px; }

/* ── Shell ─────────────────────────────────────────────────────────── */
.fx-shell { min-height: calc(100vh - 56px); }
.fx-side .ds-nav-item { position: relative; }
.fx-nav-t { flex: 1; min-width: 0; }
.fx-nav-n { min-width: 22px; height: 20px; padding: 0 7px; border-radius: var(--ds-r-pill); background: var(--ds-panel); color: var(--ds-navy); font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.fx-side .ds-nav-item[aria-current="page"] .fx-nav-n { background: rgba(255,255,255,.18); color: #fff; }
.fx-side-foot { margin: 14px 8px 8px; padding: 12px; border-radius: 16px; background: var(--ds-page); display: flex; flex-direction: column; gap: 2px; }
.fx-side-k { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ds-text-3); }
.fx-side-v { font-size: 12.5px; color: var(--ds-text); font-variant-numeric: tabular-nums; }
.fx-side-p { font-size: 12px; color: var(--ds-text-3); font-variant-numeric: tabular-nums; }
.fx-side-p:empty { display: none; }
.fx-lect { font-size: 12.5px; color: var(--ds-text-3); margin-top: 4px; font-variant-numeric: tabular-nums; }
.fx-lect:empty { display: none; }
.fx-panel { min-height: calc(100vh - 80px); }
@media (max-width: 1024px) {
  .fx-shell { display: block; padding: 12px; }
  .fx-shell .ds-sidebar { display: none; }
}

/* ── Cabecera de página ────────────────────────────────────────────── */
.fx-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.fx-head-l { min-width: 0; }
.fx-head-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fx-title { font-size: 32px; font-weight: 600; letter-spacing: -.02em; color: var(--ds-text); line-height: 1.1; }
.fx-sub { font-size: 13.5px; color: var(--ds-text-3); margin-top: 6px; }
.fx-intro { font-size: 14px; color: var(--ds-text-2); max-width: 720px; margin: -6px 0 24px; line-height: 1.55; }
.fx-h2 { font-size: 21px; font-weight: 600; letter-spacing: -.01em; color: var(--ds-text); line-height: 1.2; }
.fx-h2-sub { font-size: 13px; color: var(--ds-text-3); margin-top: 3px; max-width: 640px; }
.fx-sec-page { margin-top: 40px; }
.fx-sec-page > .fx-h2 { margin-bottom: 14px; }
.fx-sec-page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

/* ── Botones ───────────────────────────────────────────────────────── */
.ds-btn { white-space: nowrap; }
.ds-btn .ic { width: 16px; height: 16px; }
.ds-btn[disabled], .fx-btn-quiet[disabled] { opacity: .55; cursor: not-allowed; }
.ds-btn-primary[disabled]:hover { background: var(--ds-navy); }
.fx-btn-quiet { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--ds-hit); padding: 8px 12px; border: 0; background: transparent; border-radius: var(--ds-r-pill); color: var(--ds-text-2); font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none; }
.fx-btn-quiet:hover { background: var(--ds-panel); color: var(--ds-navy); }
.fx-btn-quiet:focus-visible { outline: 2px solid var(--ds-blue); outline-offset: 2px; }
.fx-icon-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--ds-line-2); background: #fff; color: var(--ds-navy); cursor: pointer; flex-shrink: 0; }
.fx-icon-btn:hover { background: var(--ds-panel); }
.fx-icon-btn[disabled] { opacity: .4; cursor: default; }
.fx-icon-btn .ic { width: 18px; height: 18px; }
.fx-icon-sm { width: 32px; height: 32px; }
.fx-row-end { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.fx-row-start { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.fx-row-start:empty { display: none; }

/* ── Campos ────────────────────────────────────────────────────────── */
.fx-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fx-field-l { font-size: 11.5px; font-weight: 500; color: var(--ds-text-3); }
input[type="text"], input[type="search"], input[type="month"], input[type="date"], input[type="password"], input:not([type]), select, textarea {
  min-height: 38px; padding: 8px 12px; border: 1px solid var(--ds-line-2); border-radius: 12px; background: #fff; color: var(--ds-text);
  font-size: 13.5px; width: 100%; min-width: 0; transition: border-color .15s, box-shadow .15s;
}
select { padding-right: 30px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; }
textarea { resize: vertical; min-height: 84px; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ds-blue); box-shadow: 0 0 0 3px rgba(27,79,138,.14); }
::placeholder { color: #A8B3C2; }

/* ── Chips de estado (solo lo no-verde lleva fondo) ───────────────── */
.fx-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--ds-r-pill); border: 1px solid var(--ds-line-2); background: #fff; font-size: 12px; font-weight: 500; color: var(--ds-text-2); white-space: nowrap; line-height: 1.3; }
.fx-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ds-text-3); flex-shrink: 0; }
.fx-chip-todo { color: var(--ds-navy); }
.fx-chip-todo::before { background: var(--ds-blue); }
.fx-chip-warn { background: #FFFBEB; border-color: #FDE68A; color: #92400E; font-weight: 600; }
.fx-chip-warn::before { background: var(--ds-warn); }
.fx-chip-err { background: #FEF2F2; border-color: #FECACA; color: #991B1B; font-weight: 600; }
.fx-chip-err::before { background: var(--ds-err); }
.fx-chip-ok { border-color: transparent; background: transparent; color: #15803D; padding-left: 2px; }
.fx-chip-ok::before { background: var(--ds-ok); }
.fx-chip-off { border-color: transparent; background: transparent; color: var(--ds-text-3); padding-left: 2px; }
.fx-chip-off::before { background: #CBD5E1; }

/* Chips de razón social: rectángulo redondeado (distinto de los estados) con marca de color de la marca DMC */
.fx-ent { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border-radius: 8px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.35; color: var(--ds-navy); background: var(--color-surface-2); border: 1px solid transparent; }
.fx-ent::before { content: ""; width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; background: var(--ds-text-3); }
.fx-ent-dmc { background: var(--fx-tint); }
.fx-ent-dmc::before { background: var(--color-primary); }
.fx-ent-andy { background: rgba(245,183,49,.16); }
.fx-ent-andy::before { background: var(--color-accent); }
.fx-ent-paulina { background: rgba(59,107,165,.10); }
.fx-ent-paulina::before { background: var(--color-primary-lt); border-radius: 50%; }
.fx-ent-none { background: transparent; border: 1px dashed #FDE68A; color: #92400E; font-weight: 500; }
.fx-ent-none::before { background: var(--ds-warn); }

.fx-sent { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--ds-text-3); }
.fx-sent-emitida { color: var(--color-primary-lt); }

/* ── KPIs ──────────────────────────────────────────────────────────── */
.fx-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.fx-kpi { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 18px 20px; min-height: 118px; background: var(--ds-card); border: 1px solid var(--ds-line); border-radius: var(--ds-r-card); cursor: pointer; transition: box-shadow .2s, border-color .15s; min-width: 0; }
.fx-kpi:hover { box-shadow: var(--ds-shadow-hover); }
.fx-kpi.is-on { border-color: var(--ds-navy); box-shadow: inset 0 0 0 1px var(--ds-navy); }
.fx-kpi .ds-kpi-label { font-weight: 500; }
.fx-kpi-n { font-size: 34px; }
.fx-kpi.is-alert .fx-kpi-n { color: #92400E; }
.fx-kpi-s { font-size: 12px; color: var(--ds-text-3); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (max-width: 1180px) { .fx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── Pestañas y filtros ───────────────────────────────────────────── */
.fx-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: 0 -2px 14px; }
.fx-tabs::-webkit-scrollbar { display: none; }
.fx-tab { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 8px 16px; border-radius: var(--ds-r-pill); border: 1px solid var(--ds-line-2); background: #fff; color: var(--ds-text-2); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.fx-tab:hover { color: var(--ds-navy); border-color: rgba(15,35,96,.3); }
.fx-tab[aria-pressed="true"] { background: var(--ds-navy); border-color: var(--ds-navy); color: #fff; font-weight: 600; }
.fx-tab-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--ds-r-pill); background: var(--ds-panel); color: var(--ds-navy); font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.fx-tab-n:empty { display: none; }
.fx-tab[aria-pressed="true"] .fx-tab-n { background: rgba(255,255,255,.2); color: #fff; }

.fx-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-bottom: 16px; }
.fx-filters .fx-field { width: 150px; }
.fx-filters .fx-field-q { flex: 1 1 160px; width: auto; }
.fx-seg { display: inline-flex; padding: 3px; border-radius: var(--ds-r-pill); background: #fff; border: 1px solid var(--ds-line-2); align-self: flex-end; }
.fx-seg-b { min-height: 32px; padding: 6px 14px; border: 0; border-radius: var(--ds-r-pill); background: transparent; color: var(--ds-text-2); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.fx-seg-b:hover { color: var(--ds-navy); }
.fx-seg-b[aria-pressed="true"] { background: var(--ds-panel); color: var(--ds-navy); font-weight: 600; box-shadow: inset 0 0 0 1px var(--ds-line-2); }

/* ── Tabla de facturas ────────────────────────────────────────────── */
.fx-lista { min-height: 120px; }
.fx-lista[aria-busy="true"] { opacity: .6; transition: opacity .15s; }
.fx-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--ds-card); border: 1px solid var(--ds-line); border-radius: var(--ds-r-card); overflow: hidden; table-layout: auto; }
.fx-table th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ds-text-3); padding: 14px 14px 10px; border-bottom: 1px solid var(--ds-line); white-space: nowrap; }
.fx-table td { padding: 12px 14px; border-bottom: 1px solid var(--ds-line); vertical-align: middle; font-size: 13px; }
.fx-table tbody tr:last-child td { border-bottom: 0; }
.fx-tr { cursor: pointer; transition: background .12s; }
.fx-tr:hover { background: var(--fx-hover-row); }
.fx-tr.is-active { background: #EEF4FB; }
.fx-tr.is-off { color: var(--ds-text-3); }
.fx-tr.is-off .fx-rowlink { color: var(--ds-text-3); font-weight: 500; }
.fx-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
th.fx-num { text-align: right; }
.fx-c { width: 54px; text-align: right; }
.fx-td-fecha { white-space: nowrap; color: var(--ds-text-2); font-variant-numeric: tabular-nums; }
.fx-td-num { white-space: nowrap; }
.fx-doc { display: block; font-size: 11px; color: var(--ds-text-3); }
.fx-nro { font-variant-numeric: tabular-nums; color: var(--ds-text); }
.fx-td-who { width: 100%; max-width: 0; min-width: 160px; }
.fx-rowlink { display: block; max-width: 100%; padding: 2px 0; border: 0; background: none; text-align: left; font-size: 13.5px; font-weight: 600; color: var(--ds-text); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 6px; }
.fx-tr:hover .fx-rowlink, .fx-rowlink:focus-visible { color: var(--ds-blue); }
.fx-meta { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: #A8B3C2; font-variant-numeric: tabular-nums; margin-top: 1px; }
.fx-flag { display: inline-flex; color: #B45309; }
.fx-flag .ic { width: 14px; height: 14px; }
.fx-td-total { font-weight: 600; color: var(--ds-text); font-size: 13.5px; }
.fx-com { display: inline-flex; align-items: center; gap: 4px; color: var(--ds-text-2); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fx-com .ic { width: 15px; height: 15px; }
.fx-more { display: flex; justify-content: center; margin-top: 16px; }

@media (max-width: 1600px) {
  /* ronda 6: el Número se ve también a 1281–1600 (ver fluidez.css) */
}
/* Tablet y móvil: la tabla se vuelve tarjetas sueltas */
@media (max-width: 1280px) {
  .fx-table, .fx-table tbody { display: block; background: transparent; border: 0; border-radius: 0; overflow: visible; }
  .fx-table thead { display: none; }
  .fx-tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 14px 16px; margin-bottom: 10px; background: var(--ds-card); border: 1px solid var(--ds-line); border-radius: var(--ds-r-row); }
  .fx-tr:hover { background: var(--ds-card); box-shadow: var(--ds-shadow-hover); }
  .fx-tr.is-active { background: #EEF4FB; }
  .fx-table td { display: block; padding: 0; border: 0; }
  .fx-td-who { order: 1; flex: 1 1 0; min-width: 0; max-width: none; }
  .fx-td-total { order: 2; font-size: 15px; }
  .fx-td-num { display: block !important; order: 3; flex: 1 1 100%; font-size: 12px; color: var(--ds-text-3); }
  .fx-td-num .fx-doc { display: inline; }
  .fx-td-num .fx-doc::after { content: " · "; }
  .fx-td-num .fx-nro { color: var(--ds-text-2); }
  .fx-td-fecha { order: 4; font-size: 12px; color: var(--ds-text-3); flex: 1 1 100%; margin-top: -4px; }
  .fx-td-ent { order: 5; }
  .fx-td-est { order: 6; }
  .fx-td-pago { order: 7; }
  .fx-td-com { order: 8; margin-left: auto; width: auto; }
  .fx-rowlink { white-space: normal; font-size: 14.5px; min-height: 32px; }
}

/* ── Estados de vista ─────────────────────────────────────────────── */
.fx-skel { display: flex; flex-direction: column; gap: 10px; }
.fx-skel-row { display: flex; align-items: center; gap: 18px; padding: 18px 20px; background: var(--ds-card); border: 1px solid var(--ds-line); border-radius: var(--ds-r-row); }
.fx-skel-row span { display: block; height: 12px; border-radius: 6px; background: var(--fx-skel); }
.fx-skel-a { width: 80px; } .fx-skel-b { flex: 1; max-width: 360px; } .fx-skel-c { width: 90px; margin-left: auto; }
.fx-skel-drawer .fx-skel-row { border: 0; background: var(--ds-page); }
.fx-empty, .fx-error { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 44px 24px; background: var(--ds-card); border: 1px solid var(--ds-line); border-radius: var(--ds-r-card); }
.fx-empty-ic { width: 48px; height: 48px; border-radius: 16px; background: var(--ds-panel); color: var(--ds-navy); display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.fx-error-ic { background: #FEF2F2; color: #B91C1C; }
.fx-empty-t { font-size: 15px; font-weight: 600; color: var(--ds-text); }
.fx-empty-d { font-size: 13px; color: var(--ds-text-3); max-width: 420px; margin-bottom: 8px; }
.fx-muted { font-size: 13px; color: var(--ds-text-3); }

/* ── Notas y avisos ───────────────────────────────────────────────── */
.fx-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; font-size: 13px; background: var(--ds-panel); color: var(--ds-text-2); margin-top: 12px; }
.fx-note .ic { width: 18px; height: 18px; margin-top: 1px; }
.fx-note strong { color: inherit; font-weight: 600; display: block; }
.fx-note p { margin-top: 2px; }
.fx-note-warn { background: #FFFBEB; color: #92400E; }
.fx-note-err { background: #FEF2F2; color: #991B1B; }
.fx-avisos { display: flex; flex-direction: column; gap: 6px; }
.fx-aviso { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; font-size: 13px; background: var(--ds-page); color: var(--ds-text-2); }
.fx-aviso .ic { width: 17px; height: 17px; margin-top: 1px; flex-shrink: 0; }
.fx-aviso-warn { background: #FFFBEB; color: #92400E; }
.fx-aviso-err { background: #FEF2F2; color: #991B1B; }

/* ── Capas: scrim, drawer, diálogo ────────────────────────────────── */
.fx-scrim { position: fixed; inset: 0; background: rgba(15,23,42,.32); z-index: 190; opacity: 0; transition: opacity .2s var(--ds-ease); }
.fx-scrim.is-open { opacity: 1; }
.fx-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(780px, 100%); z-index: 200; background: #fff; box-shadow: -24px 0 60px -30px rgba(15,23,42,.35); display: flex; flex-direction: column; transform: translateX(24px); opacity: 0; transition: transform .26s var(--ds-ease), opacity .2s var(--ds-ease); border-radius: 24px 0 0 24px; outline: none; }
.fx-drawer.is-open { transform: none; opacity: 1; }
.fx-dr-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px 14px 28px; border-bottom: 1px solid var(--ds-line); flex-shrink: 0; }
.fx-dr-t { font-size: 13px; font-weight: 600; color: var(--ds-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.fx-dr-nav { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.fx-dr-pos { font-size: 12px; color: var(--ds-text-3); margin-right: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx-dr-b { flex: 1; overflow-y: auto; padding: 22px 28px 48px; overscroll-behavior: contain; }
.fx-dr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.fx-dr-who { min-width: 0; }
.fx-dr-kicker { font-size: 12px; color: var(--ds-text-3); font-weight: 500; }
.fx-dr-name { font-size: 24px; font-weight: 600; letter-spacing: -.01em; color: var(--ds-text); line-height: 1.25; margin-top: 2px; overflow-wrap: anywhere; }
.fx-dr-sub { font-size: 13px; color: var(--ds-text-2); margin-top: 3px; font-variant-numeric: tabular-nums; }
.fx-dr-amt { text-align: right; flex-shrink: 0; }
.fx-dr-amt-l { display: block; font-size: 12px; color: var(--ds-text-3); }
.fx-dr-amt-n { display: block; font-size: 32px; font-weight: 600; letter-spacing: -.02em; color: var(--ds-navy); font-variant-numeric: tabular-nums; line-height: 1.1; }
.fx-dr-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.fx-dr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.fx-dr-by { font-size: 12px; color: var(--ds-text-3); }
.fx-ask { margin-top: 12px; padding: 14px; border-radius: 18px; background: var(--ds-page); display: flex; flex-direction: column; gap: 6px; }
.fx-sec { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--ds-line); }
.fx-sec-t { font-size: 15px; font-weight: 600; color: var(--ds-text); margin-bottom: 12px; letter-spacing: -.01em; }
.fx-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.fx-sec-h .fx-sec-t { margin-bottom: 0; }
.fx-sub-t { font-size: 12px; font-weight: 600; color: var(--ds-text-3); margin: 16px 0 8px; }

.fx-clasif-v { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fx-clasif-k { font-size: 13px; font-weight: 600; color: var(--ds-text); margin-right: 2px; }
.fx-clasif-f { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 12px; padding: 14px; border-radius: 18px; background: var(--ds-page); }
.fx-clasif-f .fx-row-end { grid-column: 1 / -1; margin-top: 0; }

.fx-pdf { border-radius: 16px; overflow: hidden; border: 1px solid var(--ds-line-2); background: var(--ds-panel); }
.fx-pdf iframe { display: block; width: 100%; height: 560px; border: 0; background: var(--ds-panel); }
.fx-pdf-none { display: flex; align-items: center; gap: 10px; padding: 18px; border-radius: 16px; background: var(--ds-page); color: var(--ds-text-3); font-size: 13px; }
.fx-doc-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.fx-dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 20px; }
.fx-kv { min-width: 0; }
.fx-kv dt { font-size: 11.5px; color: var(--ds-text-3); margin-bottom: 2px; }
.fx-kv dd { font-size: 13.5px; color: var(--ds-text); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.fx-kv dd small { display: block; font-size: 12px; color: var(--ds-text-3); }
.fx-kv-wide { grid-column: 1 / -1; }
.fx-clave { font-variant-numeric: tabular-nums; letter-spacing: .02em; word-break: break-all; font-size: 12.5px; }
.fx-big { font-size: 20px; font-weight: 600; color: var(--ds-navy); letter-spacing: -.01em; }

.fx-lines-w { overflow-x: auto; border: 1px solid var(--ds-line); border-radius: 16px; }
.fx-lines { width: 100%; border-collapse: collapse; font-size: 13px; }
.fx-lines th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ds-text-3); text-align: left; padding: 10px 12px; background: var(--ds-page); }
.fx-lines td { padding: 10px 12px; border-top: 1px solid var(--ds-line); color: var(--ds-text); }

.fx-rel { display: flex; flex-direction: column; gap: 6px; }
.fx-rel-it { display: flex; justify-content: space-between; width: 100%; gap: 12px; min-height: 40px; padding: 9px 14px; border-radius: 14px; border: 1px solid var(--ds-line-2); background: #fff; cursor: pointer; text-align: left; font-size: 13px; color: var(--ds-navy); font-weight: 500; }
.fx-rel-it:hover { background: var(--ds-page); }

.fx-movcard { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: var(--ds-page); }
.fx-movcard-ic { width: 34px; height: 34px; border-radius: 12px; background: #fff; display: flex; align-items: center; justify-content: center; color: var(--ds-navy); flex-shrink: 0; }
.fx-movcard-k { font-size: 11.5px; color: var(--ds-text-3); }
.fx-movcard-t { font-size: 13.5px; color: var(--ds-text); font-variant-numeric: tabular-nums; }
.fx-movcard-d { font-size: 12.5px; color: var(--ds-text-2); overflow-wrap: anywhere; }

.fx-cands { display: flex; flex-direction: column; gap: 8px; }
.fx-cand { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--ds-line); background: #fff; }
.fx-cand:hover .ds-btn-secondary, .fx-cand:focus-within .ds-btn-secondary { background: var(--ds-navy); border-color: var(--ds-navy); color: #fff; }
.fx-cand-score { width: 48px; height: 48px; border-radius: 14px; background: var(--fx-tint); color: var(--ds-navy); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.fx-cand-score b { font-size: 17px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.fx-cand-score small { font-size: 9.5px; color: var(--ds-text-3); margin-top: 2px; }
.fx-cand-b { flex: 1; min-width: 0; }
.fx-cand-t { font-size: 13.5px; color: var(--ds-text); font-variant-numeric: tabular-nums; }
.fx-cand-d { font-size: 12.5px; color: var(--ds-text-2); overflow-wrap: anywhere; }
.fx-motivos { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
.fx-motivos li { font-size: 11.5px; color: var(--ds-text-3); }
.fx-motivos li::before { content: "· "; }
.fx-cand-tag { font-size: 12px; font-weight: 600; color: #15803D; }
.fx-payform { margin-top: 12px; padding: 14px; border-radius: 18px; background: var(--ds-page); display: flex; flex-direction: column; gap: 10px; }
.fx-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }

/* Conversación */
.fx-bubbles { display: flex; flex-direction: column; gap: 10px; }
.fx-bubbles-empty { font-size: 13px; color: var(--ds-text-3); padding: 14px; border-radius: 16px; background: var(--ds-page); }
.fx-bubble { max-width: 85%; padding: 10px 14px; border-radius: 18px 18px 18px 6px; background: var(--fx-tint); align-self: flex-start; }
.fx-bubble-cecorp { background: #fff; border: 1px solid var(--ds-line-2); }
.fx-bubble.is-mine { align-self: flex-end; border-radius: 18px 18px 6px 18px; }
.fx-bubble-h { font-size: 11.5px; color: var(--ds-text-3); }
.fx-bubble-h strong { color: var(--ds-text-2); font-weight: 600; }
.fx-bubble-t { font-size: 13.5px; color: var(--ds-text); white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.fx-compose { margin-top: 12px; }
.fx-compose-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.fx-hint, .fx-count { font-size: 11.5px; color: var(--ds-text-3); font-variant-numeric: tabular-nums; }

/* Historial */
.fx-details > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ds-text); min-height: 36px; display: flex; align-items: center; border-radius: 8px; list-style: none; }
.fx-details > summary::-webkit-details-marker { display: none; }
.fx-details > summary::before { content: ""; width: 16px; height: 16px; margin-right: 8px; flex-shrink: 0; transform: rotate(-90deg); transition: transform .15s;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / 16px no-repeat; }
.fx-details[open] > summary::before { transform: none; }
.fx-hist { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.fx-hist li { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px; font-size: 12.5px; }
.fx-hist-w { color: var(--ds-text-3); font-variant-numeric: tabular-nums; }
.fx-hist-a { color: var(--ds-text-2); overflow-wrap: anywhere; }
.fx-hist-a strong { color: var(--ds-text); font-weight: 600; }
.fx-hist-a small { display: block; color: var(--ds-text-3); font-size: 12px; }

/* Diálogo */
.fx-dialog { position: fixed; z-index: 220; left: 50%; top: 50%; width: min(560px, calc(100% - 32px)); max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: #fff; border-radius: 24px; box-shadow: 0 30px 80px -30px rgba(15,23,42,.45); transform: translate(-50%, -48%); opacity: 0; transition: transform .2s var(--ds-ease), opacity .18s var(--ds-ease); outline: none; }
.fx-dialog.is-open { transform: translate(-50%, -50%); opacity: 1; }
.fx-dialog-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 6px 24px; }
.fx-dialog-t { font-size: 17px; font-weight: 600; color: var(--ds-text); }
.fx-dialog-b { padding: 8px 24px 8px; overflow-y: auto; }
.fx-dialog-p { font-size: 13.5px; color: var(--ds-text-2); }
.fx-dialog-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px 20px; flex-wrap: wrap; }
.fx-scrim-dlg { z-index: 210; }

.fx-drop { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 28px 20px; border: 2px dashed var(--ds-line-2); border-radius: 20px; background: var(--ds-page); cursor: pointer; transition: border-color .15s, background .15s; }
.fx-drop:hover, .fx-drop.is-over { border-color: var(--ds-blue); background: #EEF4FB; }
.fx-sr:focus-visible + .fx-drop, .fx-drop:focus-within { outline: 2px solid var(--ds-blue); outline-offset: 2px; }
.fx-drop-ic { width: 44px; height: 44px; border-radius: 14px; background: #fff; color: var(--ds-navy); display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.fx-drop-t { font-size: 14px; font-weight: 600; color: var(--ds-text); }
.fx-drop-d { font-size: 12.5px; color: var(--ds-text-3); }
.fx-files { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.fx-files li { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border-radius: 14px; border: 1px solid var(--ds-line); font-size: 13px; }
.fx-files-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ds-text); }
.fx-files-s { color: var(--ds-text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.fx-up-res:not(:empty) { margin-top: 14px; }
.fx-up-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fx-up-sum > div { padding: 12px; border-radius: 16px; background: var(--ds-page); display: flex; flex-direction: column; }
.fx-up-sum b { font-size: 24px; font-weight: 600; color: var(--ds-navy); font-variant-numeric: tabular-nums; }
.fx-up-sum span { font-size: 12px; color: var(--ds-text-3); }
.fx-up-res .fx-rel { margin-top: 10px; }

/* Menú Exportar */
.fx-menu { position: relative; }
.fx-menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; width: 280px; padding: 6px; background: #fff; border: 1px solid var(--ds-line-2); border-radius: 18px; box-shadow: var(--ds-shadow-hover); }
.fx-menu-it { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border-radius: 12px; text-decoration: none; }
.fx-menu-it:hover, .fx-menu-it:focus-visible { background: var(--ds-panel); outline: none; }
.fx-menu-t { font-size: 13.5px; font-weight: 600; color: var(--ds-text); }
.fx-menu-d { font-size: 12px; color: var(--ds-text-3); }

/* Toast */
.fx-toast { position: fixed; left: 50%; bottom: 24px; z-index: 400; max-width: min(520px, calc(100% - 32px)); padding: 12px 18px; border-radius: 16px; background: var(--ds-navy); color: #fff; font-size: 13px; font-weight: 500; box-shadow: 0 16px 40px -16px rgba(15,23,42,.5); transform: translate(-50%, 12px); opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s var(--ds-ease); }
.fx-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.fx-toast-err { background: #991B1B; }

/* ── Pagos ─────────────────────────────────────────────────────────── */
.fx-mov { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; background: var(--ds-card); border: 1px solid var(--ds-line); border-radius: var(--ds-r-row); margin-bottom: 10px; }
.fx-mov:hover { box-shadow: var(--ds-shadow-hover); }
.fx-mov-top { display: flex; align-items: flex-start; gap: 14px; }
.fx-mov-ic { width: 40px; height: 40px; border-radius: 14px; background: var(--ds-panel); color: var(--ds-navy); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fx-mov-b { flex: 1; min-width: 0; }
.fx-mov-t { font-size: 14.5px; font-weight: 600; color: var(--ds-text); overflow-wrap: anywhere; }
.fx-mov-d { font-size: 12.5px; color: var(--ds-text-3); font-variant-numeric: tabular-nums; margin-top: 1px; overflow-wrap: anywhere; }
.fx-mov-amt { text-align: right; flex-shrink: 0; }
.fx-mov-amt b { display: block; font-size: 20px; font-weight: 600; color: var(--ds-navy); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.fx-mov-amt span { font-size: 11.5px; color: var(--ds-text-3); }
.fx-mov-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fx-mov-link { font-size: 13px; font-weight: 600; color: var(--ds-blue); text-decoration: none; }
.fx-mov-link:hover { text-decoration: underline; }
.fx-otra { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; padding: 12px; border-radius: 16px; background: var(--ds-page); }
.fx-otra .fx-field { flex: 1 1 260px; }
.fx-res { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fx-res > div { padding: 12px; border-radius: 16px; background: var(--ds-page); display: flex; flex-direction: column; }
.fx-res b { font-size: 24px; font-weight: 600; color: var(--ds-navy); font-variant-numeric: tabular-nums; }
.fx-res span { font-size: 12px; color: var(--ds-text-3); }

/* ── Lecturas ─────────────────────────────────────────────────────── */
.fx-progress { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 18px; background: var(--fx-tint); color: var(--ds-navy); font-size: 13.5px; font-weight: 500; margin-bottom: 18px; }
.fx-progress .ic { width: 20px; height: 20px; }
.fx-last { padding: 22px 24px; }
.fx-last-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.fx-last-t { font-size: 17px; font-weight: 600; color: var(--ds-text); }
.fx-last-d { font-size: 12.5px; color: var(--ds-text-3); margin-top: 2px; }
.fx-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.fx-stat { padding: 12px 14px; border-radius: 16px; background: var(--ds-page); min-width: 0; }
.fx-stat b { display: block; font-size: 26px; font-weight: 600; color: var(--ds-navy); font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.15; }
.fx-stat span { font-size: 12px; color: var(--ds-text-3); }
.fx-stat.is-warn b { color: #92400E; }
.fx-errs { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.fx-errs li { padding: 10px 12px; border-radius: 14px; background: #FEF2F2; color: #991B1B; font-size: 12.5px; overflow-wrap: anywhere; }
.fx-errs li strong { display: block; font-weight: 600; }
.fx-lrow { display: flex; align-items: center; gap: 16px; padding: 14px 20px; background: var(--ds-card); border: 1px solid var(--ds-line); border-radius: var(--ds-r-row); margin-bottom: 8px; flex-wrap: wrap; }
.fx-lrow-w { min-width: 170px; }
.fx-lrow-w b { display: block; font-size: 13.5px; color: var(--ds-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.fx-lrow-w span { font-size: 12px; color: var(--ds-text-3); }
.fx-lrow-n { display: flex; gap: 18px; flex-wrap: wrap; flex: 1; font-size: 12.5px; color: var(--ds-text-2); font-variant-numeric: tabular-nums; }
.fx-lrow-n b { color: var(--ds-text); font-weight: 600; }
@media (max-width: 1180px) { .fx-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ── Ajustes ──────────────────────────────────────────────────────── */
.fx-ent-card { padding: 18px 20px; background: var(--ds-card); border: 1px solid var(--ds-line); border-radius: var(--ds-r-row); margin-bottom: 10px; }
.fx-ent-card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.fx-ent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.fx-ent-grid .fx-field-hint { font-size: 11.5px; color: var(--ds-text-3); }
.fx-savebar { position: sticky; bottom: 16px; z-index: 30; display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px 10px 18px; background: #fff; border: 1px solid var(--ds-line-2); border-radius: var(--ds-r-pill); box-shadow: var(--ds-shadow-hover); }
.fx-savebar > span { margin-right: auto; font-size: 13px; color: var(--ds-text-2); font-weight: 500; }
.fx-user-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; background: var(--ds-card); border: 1px solid var(--ds-line); border-radius: var(--ds-r-row); margin-bottom: 8px; flex-wrap: wrap; }
.fx-user-row-b { flex: 1; min-width: 160px; }
.fx-user-row-b b { display: block; font-size: 14px; color: var(--ds-text); font-weight: 600; }
.fx-user-row-b span { font-size: 12px; color: var(--ds-text-3); }
.fx-user-row-a { display: flex; gap: 6px; flex-wrap: wrap; }
.fx-secret { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 16px; background: var(--ds-page); margin-top: 10px; flex-wrap: wrap; }
.fx-secret code { font-family: var(--font-body); font-size: 18px; font-weight: 600; letter-spacing: .06em; color: var(--ds-navy); font-variant-numeric: tabular-nums; flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* ── Login ────────────────────────────────────────────────────────── */
.fx-login { min-height: calc(100vh - 56px); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 48px; }
.fx-login-card { width: min(420px, 100%); background: var(--ds-card); border: 1px solid var(--ds-line); border-radius: 28px; padding: 32px 30px; box-shadow: var(--ds-shadow-float); display: flex; flex-direction: column; gap: 4px; }
.fx-login-t { font-size: 30px; font-weight: 600; letter-spacing: -.015em; color: var(--ds-text); }
.fx-login-d { font-size: 13.5px; color: var(--ds-text-3); margin-bottom: 10px; }
.fx-login-k { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ds-text-3); margin: 18px 0 8px; }
.fx-login-dev-b { display: flex; flex-direction: column; gap: 8px; }
.fx-login-dev-b .ds-btn, .fx-login-sub { width: 100%; min-height: 44px; }
.fx-login-gbtn { min-height: 44px; }
.fx-login-s { font-size: 12px; color: var(--ds-text-3); margin-top: 6px; }
.fx-login-f { display: flex; flex-direction: column; gap: 10px; }
.fx-login-f .fx-login-sub { margin-top: 4px; }

/* ── Cómo funciona ────────────────────────────────────────────────── */
.cf-flow { padding: 28px 24px 18px; }
.cf-svg { display: block; width: 100%; height: auto; font-family: var(--font-body); }
.cf-v { display: none; max-width: 360px; margin: 0 auto; }
.cf-node { fill: #fff; stroke: var(--ds-line-2); stroke-width: 1.5; }
.cf-node-hi { fill: var(--ds-navy); stroke: var(--ds-navy); }
.cf-num { fill: var(--ds-navy); font-size: 24px; font-weight: 600; }
.cf-num-hi { fill: #fff; }
.cf-lbl { fill: var(--ds-text); font-size: 16px; font-weight: 600; }
.cf-sub { fill: var(--ds-text-3); font-size: 13.5px; }
.cf-arrow { fill: none; stroke: var(--color-primary-lt); stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; }
.cf-ahp { fill: var(--color-primary-lt); }
.cf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cf-card { padding: 22px 24px; }
.cf-k { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ds-text-3); }
.cf-t { font-size: 17px; font-weight: 600; color: var(--ds-text); margin: 4px 0 10px; }
.cf-ul { display: flex; flex-direction: column; gap: 8px; }
.cf-ul li { position: relative; padding-left: 16px; font-size: 13.5px; color: var(--ds-text-2); }
.cf-ul li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--ds-blue); }
.cf-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.cf-level { display: flex; gap: 14px; align-items: flex-start; padding: 20px 22px; }
.cf-level p { font-size: 13.5px; color: var(--ds-text-2); margin-bottom: 12px; }
.cf-level-n { width: 40px; height: 40px; border-radius: 14px; background: var(--fx-tint); color: var(--ds-navy); display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 600; flex-shrink: 0; }
.cf-level:nth-child(2) .cf-level-n { background: linear-gradient(160deg, #E4EEFA, #D3E4F7); }
.cf-level:nth-child(3) .cf-level-n { background: var(--ds-navy); color: #fff; }
.cf-level .cf-t { margin-top: 8px; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .cf-grid, .cf-levels { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .fx-user { display: none; }
}
@media (max-width: 768px) {
  .fx-shell { padding: 0; }
  .fx-panel { border-radius: 0; padding: 20px 16px 96px; min-height: calc(100vh - 52px); }
  .fx-title { font-size: 26px; }
  .fx-h2 { font-size: 19px; }
  .fx-dr-name { font-size: 21px; }
  .fx-head { align-items: stretch; flex-direction: column; gap: 12px; margin-bottom: 18px; }
  .fx-head-r { width: 100%; }
  .fx-head-r > .ds-btn, .fx-head-r > .fx-menu { flex: 1 1 0; }
  .fx-head-r .fx-menu > .ds-btn { width: 100%; }
  .fx-head-r .ds-btn { min-height: var(--ds-hit-mob); }
  .fx-kpis { gap: 10px; margin-bottom: 18px; }
  .fx-kpi { padding: 14px 14px; min-height: 104px; }
  .fx-kpi-n { font-size: 28px; }
  .fx-kpi .ds-kpi-label { font-size: 12px; line-height: 1.25; }
  .fx-filters .fx-field { width: calc(50% - 6px); }
  .fx-filters .fx-field-q { flex: 1 1 100%; }
  .fx-seg { width: 100%; }
  .fx-seg-b { flex: 1; min-height: 38px; }
  .fx-tab { min-height: 40px; }
  .fx-drawer { width: 100%; border-radius: 0; }
  .fx-dr-bar { padding: 10px 12px 10px 16px; }
  .fx-dr-b { padding: 18px 16px 48px; }
  .fx-dr-head { flex-direction: column; gap: 10px; }
  .fx-dr-amt { text-align: left; }
  .fx-dr-amt-n { font-size: 28px; }
  .fx-dr-actions .ds-btn { flex: 1 1 auto; min-height: var(--ds-hit-mob); }
  .fx-pdf iframe { height: 420px; }
  .fx-dl, .fx-clasif-f, .fx-grid-2, .fx-ent-grid { grid-template-columns: minmax(0, 1fr); }
  .fx-hist li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .fx-bubble { max-width: 92%; }
  .fx-cand { flex-wrap: wrap; }
  .fx-cand .ds-btn { flex: 1 1 100%; min-height: var(--ds-hit-mob); }
  .fx-dialog { top: auto; bottom: 0; left: 0; width: 100%; max-height: 92vh; border-radius: 24px 24px 0 0; transform: translateY(16px); }
  .fx-dialog.is-open { transform: none; }
  .fx-dialog-f .ds-btn { flex: 1 1 0; min-height: var(--ds-hit-mob); }
  .fx-res { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fx-mov { padding: 14px 16px; }
  .fx-mov-top { flex-wrap: wrap; }
  .fx-mov-amt { text-align: left; width: 100%; padding-left: 54px; }
  .fx-mov-foot .ds-btn { flex: 1 1 auto; min-height: var(--ds-hit-mob); }
  .fx-savebar { border-radius: 20px; }
  .fx-lrow { padding: 14px 16px; }
  .cf-h { display: none; }
  .cf-v { display: block; }
  .cf-flow { padding: 20px 12px 8px; }
  .fx-login-card { padding: 26px 20px; }
  .fx-menu-pop { width: 100%; min-width: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  .fx-drawer, .fx-dialog, .fx-scrim, .fx-toast, .fx-kpi, .fx-tr, .fx-drop, .fx-details > summary::before, .fx-lista { transition: none !important; }
}

/* ── Ronda 2: verificación SRI, avisos graves, remitente, conversación ── */
.fx-sri { font-size: 11px; font-weight: 600; white-space: nowrap; }
.fx-sri-ok { color: #15803D; font-weight: 500; }
.fx-sri-pend { color: #B45309; font-weight: 500; }
.fx-sri-no { color: #B91C1C; }
.fx-flag { gap: 3px; font-size: 11px; font-weight: 600; color: #B91C1C; }
.fx-tr.is-grave .fx-rowlink { color: #991B1B; }
.fx-tr.is-grave { background: #FFFBFB; }
.fx-tr.is-grave:hover { background: #FEF2F2; }
.fx-grave { margin-top: 16px; }
.fx-grave p { margin-top: 4px; }
.fx-sri-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: var(--ds-page); }
.fx-sri-box-b { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; flex: 1 1 260px; }
.fx-sri-box-b p { font-size: 12.5px; color: var(--ds-text-2); }
.fx-sri-box-pend { background: #FFFBEB; }
.fx-sri-box-no { background: #FEF2F2; }
.fx-sri-box-ok .fx-chip-ok { padding-left: 0; }
.fx-cand-chip { margin-top: 6px; }
.fx-res-note { margin-top: 10px; }
/* El pie de la caja de mensaje queda siempre visible mientras la caja está en pantalla */
.fx-compose-f { position: sticky; bottom: 0; z-index: 2; background: #fff; padding: 8px 0 12px; margin-top: 0; }
.fx-dr-b { scroll-padding-bottom: 24px; }
.cf-levels-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cf-foot { font-size: 13px; color: var(--ds-text-2); margin-top: 14px; max-width: 720px; }
.cf-sri { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.cf-sri li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; background: var(--ds-card); border: 1px solid var(--ds-line); border-radius: var(--ds-r-row); font-size: 13.5px; color: var(--ds-text-2); }
.cf-sri .fx-chip { min-width: 190px; }
@media (max-width: 1100px) { .cf-levels-2 { grid-template-columns: minmax(0, 1fr); } }

/* ── Ronda 3 (adenda): categorías, urgente, resumen diario ─────────── */
/* KPI de urgentes (solo aparece cuando hay) */
.fx-kpis.has-urg { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.fx-kpi.fx-kpi-urg.is-alert .fx-kpi-n { color: #991B1B; }
@media (max-width: 1180px) { .fx-kpis.has-urg { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fx-kpis.has-urg .fx-kpi-urg { grid-column: 1 / -1; min-height: 0; } }

/* Fila de categorías de la razón social */
.fx-cats { margin: -4px 0 16px; padding: 14px 16px 16px; background: var(--ds-card); border: 1px solid var(--ds-line); border-radius: var(--ds-r-card); display: flex; flex-direction: column; gap: 12px; }
.fx-cats-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fx-cats-k { font-size: 12.5px; color: var(--ds-text-3); }
.fx-cats-k strong { color: var(--ds-text); font-weight: 600; }
.fx-cats-acts { display: flex; gap: 4px; flex-wrap: wrap; }
.fx-cats-acts .fx-btn-quiet { min-height: 36px; }
.fx-cats-g { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 10px 14px; align-items: start; }
.fx-cats-g + .fx-cats-g { padding-top: 12px; border-top: 1px solid var(--ds-line); }
.fx-cats-gl { display: flex; flex-direction: column; padding-top: 6px; line-height: 1.25; }
.fx-cats-gl strong { font-size: 13px; font-weight: 600; color: var(--ds-text); }
.fx-cats-gl span { font-size: 11.5px; color: var(--ds-text-3); }
.fx-cats-l { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.fx-cats-empty { font-size: 12.5px; color: var(--ds-text-3); padding: 8px 0; }
.fx-catf { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 44px; max-width: 100%; padding: 6px 14px 7px; border-radius: 14px; border: 1px solid var(--ds-line-2); background: #fff; color: var(--ds-text-2); cursor: pointer; text-align: left; transition: border-color .15s, background .15s; }
.fx-catf:hover { border-color: rgba(15,35,96,.3); color: var(--ds-navy); }
.fx-catf-t { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.fx-catf-n { font-size: 13px; font-weight: 600; color: var(--ds-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-catf-c { min-width: 20px; height: 18px; padding: 0 6px; border-radius: var(--ds-r-pill); background: var(--ds-panel); color: var(--ds-navy); font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.fx-catf-m { font-size: 11.5px; color: var(--ds-text-3); font-variant-numeric: tabular-nums; }
.fx-catf-dot { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--ds-blue); flex-shrink: 0; }
.fx-catf-sin { border-style: dashed; }
.fx-catf.is-zero { opacity: .62; }
.fx-catf.is-zero .fx-catf-c { background: transparent; color: var(--ds-text-3); }
.fx-catf[aria-pressed="true"] { background: var(--ds-navy); border-color: var(--ds-navy); border-style: solid; opacity: 1; }
.fx-catf[aria-pressed="true"] .fx-catf-n { color: #fff; }
.fx-catf[aria-pressed="true"] .fx-catf-c { background: rgba(255,255,255,.2); color: #fff; }
.fx-catf[aria-pressed="true"] .fx-catf-m { color: rgba(255,255,255,.78); }
.fx-catf[aria-pressed="true"] .fx-catf-dot { border-color: #fff; }

/* Chip de categoría en la fila y el detalle: rectángulo neutro (distinto de estados y de razón social) */
.fx-cat { display: inline-flex; align-items: center; gap: 6px; max-width: 200px; padding: 3px 9px; border-radius: 8px; border: 1px solid var(--ds-line-2); background: #fff; font-size: 12px; font-weight: 500; color: var(--ds-text); line-height: 1.35; white-space: nowrap; }
.fx-cat-n { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.fx-cat-sug { border-style: dashed; color: var(--ds-text-2); background: var(--ds-page); }
.fx-cat-tag { font-size: 10.5px; font-weight: 600; color: var(--ds-text-3); letter-spacing: .02em; flex-shrink: 0; }
.fx-cat-none { border-color: transparent; background: transparent; color: var(--ds-text-3); padding-left: 0; }
.fx-urg { flex-shrink: 0; }
.fx-meta .fx-urg { padding: 1px 8px; font-size: 11px; }

/* Con una razón social elegida no hace falta su columna: entra la categoría */
.fx-td-cat { white-space: nowrap; }
@media (max-width: 1280px) { .fx-td-cat { order: 5; } .fx-td-cat:empty { display: none; } }

/* Filtro "Solo urgentes" */
.fx-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 14px; border-radius: var(--ds-r-pill); border: 1px solid var(--ds-line-2); background: #fff; color: var(--ds-text-2); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; align-self: flex-end; }
.fx-toggle:hover { color: var(--ds-navy); border-color: rgba(15,35,96,.3); }
.fx-toggle-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ds-err); }
.fx-toggle[aria-pressed="true"] { background: #FEF2F2; border-color: #FECACA; color: #991B1B; font-weight: 600; }

/* Detalle: urgente y categoría */
.fx-urg-box { align-items: flex-start; flex-wrap: wrap; margin-top: 16px; }
.fx-urg-b { flex: 1 1 240px; min-width: 0; }
.fx-urg-b p { overflow-wrap: anywhere; }
.fx-urg-by { font-size: 12px; opacity: .85; }
.fx-urg-box .ds-btn { margin-left: auto; }
.fx-catsec-b { display: flex; flex-direction: column; gap: 10px; }
.fx-catsec-b .fx-field { max-width: 460px; }
.fx-catsec-b .fx-row-start { margin-top: 2px; }
.fx-cat-why { font-size: 13px; color: var(--ds-text-2); padding: 10px 12px; border-radius: 14px; background: var(--ds-page); overflow-wrap: anywhere; }
.fx-cat-why strong { font-weight: 600; color: var(--ds-text); }
.fx-cat-help { font-size: 12.5px; color: var(--ds-text-3); margin-top: -4px; }
.fx-cat-nota { margin-top: 0; }
.fx-cat-cur { margin-bottom: 6px; }
.fx-check { display: flex; align-items: flex-start; gap: 10px; min-height: 36px; padding: 6px 0; cursor: pointer; font-size: 13.5px; color: var(--ds-text); }
.fx-check input { width: 18px; height: 18px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--ds-navy); cursor: pointer; }
.fx-check-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fx-check-h { font-size: 12px; color: var(--ds-text-3); }
.fx-field-err { font-size: 12.5px; color: #991B1B; }
.fx-field-hint { font-size: 11.5px; color: var(--ds-text-3); }

/* Ajustes: pestañas */
.fx-aj-tabs { margin-bottom: 4px; }
.fx-tab[aria-selected="true"] { background: var(--ds-navy); border-color: var(--ds-navy); color: #fff; font-weight: 600; }
.fx-aj-panel:focus { outline: none; }
.fx-aj-panel > .fx-sec-page:first-child { margin-top: 24px; }

/* Ajustes: catálogo */
.fx-catgrp { margin-bottom: 26px; }
.fx-catgrp-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.fx-catgrp-t { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--ds-text); letter-spacing: -.01em; }
.fx-catgrp-n { min-width: 22px; height: 20px; padding: 0 7px; border-radius: var(--ds-r-pill); background: var(--ds-panel); color: var(--ds-navy); font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.fx-catgrp-d { font-size: 12.5px; color: var(--ds-text-3); margin-top: 2px; }
.fx-catlist { display: flex; flex-direction: column; gap: 6px; }
.fx-catrow { display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 20px; background: var(--ds-card); border: 1px solid var(--ds-line); border-radius: var(--ds-r-row); }
.fx-catrow.is-edit { display: block; padding: 16px 20px; border-color: var(--ds-line-2); }
.fx-catrow-b { flex: 1; min-width: 0; }
.fx-catrow-t { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fx-catrow-t b { font-size: 14px; font-weight: 600; color: var(--ds-text); }
.fx-catrow-d { font-size: 12.5px; color: var(--ds-text-2); margin-top: 2px; }
.fx-catrow-nota { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; color: var(--ds-text-3); margin-top: 4px; }
.fx-catrow-nota .ic { width: 14px; height: 14px; margin-top: 1px; flex-shrink: 0; }
.fx-catrow-u { font-size: 12px; color: var(--ds-text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fx-catrow-a { display: flex; gap: 2px; }
.fx-catrow-id { font-size: 13px; color: var(--ds-text-2); padding: 9px 0; font-variant-numeric: tabular-nums; }
.fx-regla-m { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fx-regla-ar { color: var(--ds-text-3); }

/* Ajustes: resumen diario */
.fx-rd-sim { margin: 0 0 16px; }
.fx-rd-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 14px; align-items: start; }
.fx-rd-card { padding: 22px 24px; min-width: 0; }
.fx-rd-h { font-size: 15px; font-weight: 600; color: var(--ds-text); letter-spacing: -.01em; }
.fx-rd-swrow { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; }
.fx-rd-swl { font-size: 14px; font-weight: 600; color: var(--ds-text); cursor: pointer; }
.fx-rd-swd { font-size: 12.5px; color: var(--ds-text-3); margin-top: 2px; }
.fx-switch { position: relative; width: 52px; height: 32px; flex-shrink: 0; padding: 0; border: 0; border-radius: var(--ds-r-pill); background: #CBD5E1; cursor: pointer; transition: background .18s var(--ds-ease); }
.fx-switch::after { content: ""; position: absolute; inset: -6px; }
.fx-switch-k { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.25); transition: transform .18s var(--ds-ease); }
.fx-switch[aria-checked="true"] { background: var(--ds-navy); }
.fx-switch[aria-checked="true"] .fx-switch-k { transform: translateX(20px); }
.fx-rd-f { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.fx-rd-fh { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.fx-rd-cnt { font-size: 11.5px; color: var(--ds-text-3); font-variant-numeric: tabular-nums; }
.fx-rd-list { display: flex; flex-direction: column; gap: 6px; }
.fx-rd-list li { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 12px; border-radius: 14px; border: 1px solid var(--ds-line); font-size: 13px; min-height: 42px; }
.fx-rd-list li .ic { width: 16px; height: 16px; color: var(--ds-text-3); flex-shrink: 0; }
.fx-rd-list li.fx-rd-none { border-style: dashed; color: var(--ds-text-3); padding: 10px 12px; }
.fx-rd-mailn { flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--ds-text); }
.fx-rd-add { display: flex; gap: 8px; }
.fx-rd-add input { flex: 1; }
.fx-rd-add .ds-btn { flex-shrink: 0; }
input[type="email"], input[type="time"] { min-height: 38px; padding: 8px 12px; border: 1px solid var(--ds-line-2); border-radius: 12px; background: #fff; color: var(--ds-text); font-size: 13.5px; width: 100%; min-width: 0; }
input[type="email"]:disabled { background: var(--ds-page); }
.fx-rd-hora .fx-field { max-width: 180px; }
.fx-rd-card > .fx-check { margin-top: 14px; }
.fx-rd-save { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--ds-line); }
.fx-rd-save > span { margin-right: auto; font-size: 13px; color: var(--ds-text-2); font-weight: 500; }
.fx-rd-ph { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fx-rd-ph .fx-btn-quiet .ic { width: 16px; height: 16px; }
.fx-rd-state { font-size: 12.5px; color: var(--ds-text-3); margin: 6px 0 12px; }
.fx-mail { border: 1px solid var(--ds-line-2); border-radius: 18px; overflow: hidden; background: #fff; }
.fx-mail-h { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--ds-page); border-bottom: 1px solid var(--ds-line); }
.fx-mail-h > div { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; font-size: 12.5px; }
.fx-mail-h dt { color: var(--ds-text-3); }
.fx-mail-h dd { color: var(--ds-text-2); overflow-wrap: anywhere; }
.fx-mail-subj dd { font-weight: 600; color: var(--ds-text); font-size: 13.5px; }
.fx-mail-b { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; font-size: 13.5px; color: var(--ds-text); }
.fx-mail-l { display: flex; flex-direction: column; gap: 6px; }
.fx-mail-l li { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.fx-mail-urg { padding: 12px 14px; border-radius: 14px; background: #FEF2F2; color: #991B1B; }
.fx-mail-urg-t { font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.fx-mail-urg ul { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; font-size: 13px; }
.fx-mail-urg b { font-weight: 600; }
.fx-mail-link { font-size: 12.5px; color: var(--ds-text-2); }
.fx-mail-link span { color: var(--ds-blue); overflow-wrap: anywhere; }
.fx-mail-foot { font-size: 11.5px; color: var(--ds-text-3); padding-top: 10px; border-top: 1px solid var(--ds-line); }
.fx-rd-test { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.fx-rd-test .fx-field-hint { flex: 1 1 220px; }
.fx-rd-histw { margin-top: 28px; }
.fx-rd-histw .fx-catgrp-t { margin-bottom: 10px; }
.fx-rd-row-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fx-rd-row-d { font-size: 13px; color: var(--ds-text); overflow-wrap: anywhere; }
.fx-rd-row-s { font-size: 12px; color: var(--ds-text-3); overflow-wrap: anywhere; }
.fx-rd-row-e { font-size: 12px; color: #991B1B; overflow-wrap: anywhere; }

@media (max-width: 1100px) { .fx-rd-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 768px) {
  .fx-cats { padding: 12px; }
  .fx-cats-g { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .fx-cats-gl { flex-direction: row; align-items: baseline; gap: 6px; padding-top: 0; }
  .fx-catf { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .fx-catf-t { align-items: flex-start; }
  .fx-catf-n { white-space: normal; overflow-wrap: anywhere; }
  .fx-toggle { min-height: 40px; }
  .fx-catrow { flex-wrap: wrap; padding: 12px 14px; }
  .fx-catrow-b { flex: 1 1 100%; }
  .fx-catrow-a { margin-left: auto; }
  .fx-rd-card { padding: 18px 16px; }
  .fx-rd-add .ds-btn, .fx-rd-test .ds-btn, .fx-rd-save .ds-btn { min-height: var(--ds-hit-mob); }
  .fx-rd-test .ds-btn { flex: 1 1 100%; }
  .fx-urg-box .ds-btn { margin-left: 0; min-height: var(--ds-hit-mob); }
  .fx-rd-row { gap: 6px 12px; }
  .fx-rd-row .fx-lrow-w { min-width: 0; flex: 1 1 auto; }
  .fx-rd-row-b { flex: 1 1 100%; order: 3; }
}
@media (prefers-reduced-motion: reduce) {
  .fx-switch, .fx-switch-k, .fx-catf { transition: none !important; }
}

/* ── Adenda 2: comprobantes de pago llegados por correo ─────────────── */
/* Pestañas de la página Pagos (segmentado) */
.fx-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--ds-r-pill); background: var(--ds-card); border: 1px solid var(--ds-line); margin: 0 0 20px; max-width: 100%; }
.fx-seg-b { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 18px; border: 0; border-radius: var(--ds-r-pill); background: transparent; color: var(--ds-text-2); font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.fx-seg-b:hover { color: var(--ds-navy); background: var(--ds-page); }
.fx-seg-b[aria-selected="true"] { background: var(--ds-navy); color: #fff; font-weight: 600; }
.fx-seg-b[aria-selected="true"] .fx-tab-n { background: rgba(255,255,255,.2); color: #fff; }
.fx-seg-b:focus-visible { outline: 2px solid var(--ds-blue); outline-offset: 2px; }
[role="tabpanel"]:focus { outline: none; }
.fx-cp-explica { font-size: 13px; color: var(--ds-text-2); margin: -4px 0 14px; max-width: 720px; }

/* Miniatura / tarjeta de PDF (botón que abre el visor) */
.fx-cp-thumb { position: relative; flex-shrink: 0; width: 104px; height: 140px; padding: 0; border: 1px solid var(--ds-line-2); border-radius: 14px; background: var(--ds-panel); overflow: hidden; cursor: zoom-in; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--ds-navy); transition: box-shadow .15s var(--ds-ease), border-color .15s var(--ds-ease); }
.fx-cp-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.fx-cp-thumb:hover { border-color: rgba(15,52,96,.35); box-shadow: var(--ds-shadow-hover); }
.fx-cp-thumb:focus-visible { outline: 2px solid var(--ds-blue); outline-offset: 2px; }
.fx-cp-zoom { position: absolute; right: 6px; bottom: 6px; width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.92); display: flex; align-items: center; justify-content: center; color: var(--ds-navy); box-shadow: 0 2px 8px -2px rgba(15,23,42,.25); }
.fx-cp-zoom .ic { width: 16px; height: 16px; }
.fx-cp-thumb-sm { width: 56px; height: 72px; border-radius: 12px; }
.fx-cp-thumb-sm .fx-cp-zoom { display: none; }
.fx-cp-thumb-pdf { background: #fff; padding: 10px 8px; text-align: center; }
.fx-cp-pdf-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--fx-tint); display: flex; align-items: center; justify-content: center; }
.fx-cp-thumb-sm .fx-cp-pdf-ic { width: 30px; height: 30px; border-radius: 10px; }
.fx-cp-pdf-ic .ic { width: 20px; height: 20px; }
.fx-cp-pdf-t { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--ds-navy); }
.fx-cp-pdf-n { font-size: 11px; color: var(--ds-text-2); line-height: 1.25; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.fx-cp-pdf-d { font-size: 11px; color: var(--ds-blue); font-weight: 600; }
.fx-cp-thumb-none { cursor: default; color: var(--ds-text-3); font-size: 11px; text-align: center; padding: 8px; line-height: 1.3; }
.fx-cp-thumb-none .ic { width: 20px; height: 20px; }

/* Bloque del comprobante asignado en el detalle */
.fx-cp { display: flex; gap: 16px; align-items: flex-start; margin-top: 14px; padding: 14px; border-radius: 18px; background: var(--ds-page); }
.fx-cp-b { flex: 1; min-width: 0; }
.fx-cp-line { font-size: 13px; color: var(--ds-text-2); }
.fx-cp-line strong { color: var(--ds-text); font-weight: 600; }
.fx-cp-subj { font-size: 12.5px; color: var(--ds-text-3); margin-top: 2px; overflow-wrap: anywhere; }
.fx-cp-subj span { color: var(--ds-text-2); }
.fx-cp-dl { margin-top: 10px; gap: 8px 16px; }
.fx-cp-dl dd strong { font-size: 16px; font-weight: 600; color: var(--ds-navy); }
.fx-cp-diff { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 12.5px; color: var(--ds-text-2); line-height: 1.45; }
.fx-cp-diff .ic { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; color: var(--ds-blue); }
.fx-cp-diff-ok { color: #15803D; }
.fx-cp-diff-ok .ic { color: #15803D; }
.fx-cp-diff-warn { color: #92400E; }
.fx-cp-diff-warn .ic { color: #B45309; }
.fx-cp-terc { margin-top: 12px; }
.fx-cp-acts { margin-top: 8px; }

/* Comprobante sugerido dentro de la lista de candidatos */
.fx-cand-cp { align-items: flex-start; }
.fx-cand-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.fx-cand-cp .fx-cp-diff { margin-top: 6px; }

/* Visor ampliado */
.fx-visor { width: min(880px, calc(100% - 32px)); }
.fx-visor-h { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fx-visor-b { padding: 8px 24px; overflow: auto; flex: 1; min-height: 0; }
.fx-visor-media { border-radius: 16px; background: var(--ds-panel); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.fx-visor-media img { display: block; max-width: 100%; max-height: calc(100vh - 230px); object-fit: contain; }
.fx-visor-media.is-pdf { display: block; }
.fx-visor-media iframe { display: block; width: 100%; height: calc(100vh - 230px); min-height: 360px; border: 0; background: #fff; }

/* Tarjeta de comprobante en Pagos */
.fx-cpc-top { display: flex; gap: 16px; align-items: flex-start; }
.fx-cpc-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fx-cpc-amt { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fx-cpc-amt b { font-size: 22px; font-weight: 600; color: var(--ds-navy); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.fx-cpc-amt span { font-size: 13px; color: var(--ds-text-2); }
.fx-cpc-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.fx-cpc-de { font-size: 12.5px; color: var(--ds-text-2); overflow-wrap: anywhere; min-width: 0; }
.fx-cpc-motivo { font-size: 13px; color: var(--ds-text-2); padding: 10px 14px; border-radius: 14px; background: var(--ds-page); }
.fx-cpc-motivo strong { color: var(--ds-text); font-weight: 600; }
.fx-cpc .fx-note { margin-top: 0; }
.fx-cp-otra { flex-direction: column; align-items: stretch; }
.fx-cp-otra .fx-field { flex: none; }
.fx-cp-otra input[type="search"] { min-height: var(--ds-hit); }
.fx-cp-res { display: flex; flex-direction: column; gap: 6px; }
.fx-cp-res-it { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--ds-line); }
.fx-cp-dfield { margin-top: 12px; }
.fx-cp-dfield input { min-height: var(--ds-hit); }
.fx-hint-err { color: #B91C1C; }
.fx-dialog .fx-hint { display: block; margin-top: 6px; }

@media (max-width: 768px) {
  .fx-seg { display: flex; width: 100%; }
  .fx-seg-b { flex: 1 1 0; justify-content: center; min-height: var(--ds-hit-mob); padding: 8px 10px; }
  .fx-cpc-top { gap: 12px; }
  .fx-cpc .fx-cp-thumb { width: 84px; height: 112px; }
  .fx-cp { flex-direction: column; }
  .fx-cp > .fx-cp-thumb { width: 100%; height: 220px; }
  .fx-cand-cp { flex-wrap: wrap; }
  .fx-cand-side { flex-direction: row; align-items: center; width: 100%; }
  .fx-cand-side .ds-btn { flex: 1 1 auto; }
  .fx-cp-res-it { flex-wrap: wrap; }
  .fx-cp-res-it .ds-btn { flex: 1 1 100%; min-height: var(--ds-hit-mob); }
  .fx-cpc .fx-mov-foot .fx-btn-quiet { min-height: var(--ds-hit-mob); }
  .fx-visor { width: 100%; }
  .fx-visor-media img { max-height: calc(92vh - 220px); }
  .fx-visor-media iframe { height: calc(92vh - 220px); min-height: 300px; }
  .fx-visor .fx-dialog-f .ds-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .fx-cp-thumb, .fx-seg-b { transition: none !important; }
}
/* Cómo funciona: comprobante por correo */
.cf-cp { margin-top: 14px; padding: 22px 24px; }
.cf-cp-sub { font-size: 13.5px; color: var(--ds-text-2); margin-top: 4px; }
.cf-cp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.cf-cp-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: var(--ds-text-2); line-height: 1.5; }
.cf-cp-steps strong { color: var(--ds-text); font-weight: 600; }
.cf-cp-n { width: 30px; height: 30px; border-radius: 10px; background: var(--fx-tint); color: var(--ds-navy); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.cf-cp-terc { margin-top: 16px; padding: 12px 14px; border-radius: 16px; background: #FFFBEB; color: #92400E; font-size: 13.5px; line-height: 1.5; }
.cf-cp-terc strong { font-weight: 600; }
@media (max-width: 900px) { .cf-cp-steps { grid-template-columns: minmax(0, 1fr); } .cf-cp { padding: 18px; } }
.fx-td-pago .fx-chip { white-space: normal; max-width: 132px; }
.fx-cand-chip .fx-chip { white-space: normal; }
