/* ═══════════════════════════════════════════════════════════════════════════
   Caurfesa — Portal de clientes · Design system
   Mundo visual propio del portal (NO el de los módulos internos de SunatHub):
   copiado de la app de Bench (bench.co) y documentado como referencia en
   caurfesa/web/src/layouts/PortalLayout.astro — canvas claro, tarjetas
   blancas con sombra, azul de marca, Hanken Grotesk. Botones radius 8px,
   tarjetas radius 14px, eyebrow al inicio de cada vista. Números monetarios
   SIEMPRE con tabular-nums.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Backgrounds */
  --canvas: #f5f7fa;
  --surface-1: #ffffff;
  --surface-2: #eef1f6;
  --surface-3: #e6e9ef;
  --surface-4: #d7dce4;
  /* Borders */
  --hairline: #e6e9ef;
  --hairline-soft: #eef1f6;
  /* Text */
  --ink: #121316;
  --ink-muted: #45505f;
  --ink-subtle: #6b7685;
  /* Marca del workspace (white-label, mig 0095). `--caurfesa` es el nombre
     histórico del token — se sobreescribe en runtime con el `acento` que
     trae `loginCliente`/`portalConfig` (fallback: azul Bench). `-deep`/
     `-soft` se derivan con color-mix(): al pisar solo `--caurfesa` en
     `:root`, las dos se recalculan solas. */
  --caurfesa: #08489b;
  --caurfesa-deep: color-mix(in srgb, var(--caurfesa) 82%, #000);
  --caurfesa-soft: color-mix(in srgb, var(--caurfesa) 9%, transparent);
  /* CTA verde — acción "agendar/confirmar", distinto del azul de marca. */
  --verde: #2f9e6a;
  --verde-deep: #268257;
  /* Semánticos (contraste pensado para superficie blanca) */
  --success: #1f7d51;
  --success-bg: rgba(47, 158, 106, 0.12);
  --warning: #a56d00;
  --warning-bg: rgba(224, 160, 30, 0.14);
  --danger: #b3311f;
  --danger-bg: rgba(179, 49, 31, 0.1);

  --font: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius: 8px;
  --radius-lg: 14px;
  --sidebar-w: 280px;
  --sidebar-w-collapsed: 68px;
  --topbar-h: 64px;
  --chat-w: 380px;
  --shadow-sm: 0 1px 2px rgba(6, 45, 96, 0.06);
  --shadow: 0 1px 2px rgba(6, 45, 96, 0.06), 0 8px 24px -16px rgba(6, 45, 96, 0.24);

  /* Motion — modo "Operate" (impeccable): feedback y continuidad, no
     coreografía. --ease-out es una desaceleración exponencial para
     entradas ya visibles (nunca bounce/elastic); --ease-in-out para
     transiciones de estado bidireccionales (hover, foco). */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 320ms;
}

/* Respeta la preferencia del sistema por encima de cualquier animación de
   este archivo — un solo interruptor, no una excepción por componente. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 {
  font-size: 24px;
  font-weight: 800;
}
h2 {
  font-size: 18px;
}
h3 {
  font-size: 15px;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* ── Foco accesible ────────────────────────────────────────────────────────
   `.input`/`.select` apagan el outline nativo (ver más abajo) para dar su
   propio feedback de foco por color de borde; sin esto, un usuario de
   teclado pierde toda pista de dónde está. El anillo del acento cubre TODO
   lo interactivo — incluidas las filas de tabla clicables, que no tienen
   feedback de foco propio. La regla calificada gana por especificidad sobre
   cualquier `outline: none` puntual, sin depender del orden en el archivo. */
:focus-visible {
  outline: 2px solid var(--caurfesa);
  outline-offset: 2px;
}
.input:focus-visible,
.select:focus-visible,
.table--clickable tbody tr:focus-visible td:first-child {
  outline: 2px solid var(--caurfesa);
  outline-offset: -2px;
}

/* ── Scrollbars discretos ─────────────────────────────────────────────────── */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--surface-4) transparent;
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-thumb {
  background: var(--surface-4);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-track {
  background: transparent;
}

/* ═══ Tipografía de apoyo ═══════════════════════════════════════════════════ */

.eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--caurfesa);
  margin-bottom: 6px;
}

.eyebrow--muted {
  color: var(--ink-subtle);
}

.muted {
  color: var(--ink-muted);
}
.subtle {
  color: var(--ink-subtle);
}

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.mono {
  font-family: 'Cascadia Mono', 'SF Mono', Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

/* ═══ Layout de vista ═══════════════════════════════════════════════════════ */

/* Elm exige un único nodo raíz por `view`; en las páginas que además pintan
   un modal como hermano de `.view`, ese nodo raíz es un `div` sin estilo.
   Sin `display: contents` ese div participa del layout como bloque normal
   (crece a su contenido, ignora el `flex: 1` de `.main`) y rompe la cadena
   de altura acotada: en vez de scrollear solo `.view`, termina scrolleando
   la página entera. `display: contents` lo saca de la caja sin sacarlo del
   árbol — sus hijos (`.view` y el modal) quedan como si colgaran directo
   de `.main`. */
.page-frag {
  display: contents;
}

/* Cada navegación a una página crea este nodo de cero (Elm reemplaza todo el
   subárbol de `pageContent`) — la animación entra una vez por navegación y
   nunca vuelve a dispararse por un cambio de estado interno de la misma
   página, porque ahí Elm parchea el mismo nodo en vez de recrearlo. */
.view {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 22px 26px 40px;
  gap: 18px;
  animation: view-in var(--dur-base) var(--ease-out);
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.view__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.view__title p {
  color: var(--ink-subtle);
  font-size: 13px;
  margin-top: 4px;
}

/* ═══ Superficies ═══════════════════════════════════════════════════════════ */

.card {
  background: var(--surface-1);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.card--pad {
  padding: 16px 18px;
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--hairline-soft);
}

.card__head h2 {
  font-size: 14px;
  font-weight: 700;
}

/* ═══ Botones ═══════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}

/* Feedback táctil: confirma el clic antes de que llegue la respuesta del
   servidor — el estado "cargando" del botón (spinner) llega después. */
.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--caurfesa);
  color: #fff;
  border-color: var(--caurfesa);
}
.btn--primary:hover:not(:disabled) {
  background: var(--caurfesa-deep);
  border-color: var(--caurfesa-deep);
}

.btn--secondary {
  background: var(--surface-3);
  color: var(--ink);
  border-color: var(--hairline);
}
.btn--secondary:hover:not(:disabled) {
  background: var(--surface-4);
}

.btn--ghost {
  background: transparent;
  color: var(--ink-muted);
  border-color: var(--hairline-soft);
}
.btn--ghost:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--hairline);
  background: var(--surface-2);
}

/* Acciones irreversibles/destructivas (cancelar cita, rechazar, etc.). */
.btn--danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(179, 49, 31, 0.35);
}
.btn--danger:hover:not(:disabled) {
  background: rgba(179, 49, 31, 0.22);
  border-color: var(--danger);
}

.btn--sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn--block {
  width: 100%;
}

/* ═══ Inputs ════════════════════════════════════════════════════════════════ */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.2px;
}

.input,
.select {
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
  width: 100%;
}

.input:focus,
.select:focus {
  border-color: var(--caurfesa);
  background: var(--surface-3);
}

.input::placeholder {
  color: var(--ink-subtle);
}

.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-subtle) 50%),
    linear-gradient(135deg, var(--ink-subtle) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% + 1px),
    calc(100% - 11px) calc(50% + 1px);
  background-size:
    5px 5px,
    5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
  cursor: pointer;
}

.select option {
  background: var(--surface-2);
  color: var(--ink);
}

input[type='date'] {
  min-width: 148px;
}

input[type='date']::-webkit-calendar-picker-indicator {
  filter: invert(0.65);
  cursor: pointer;
}

/* ═══ Badges ════════════════════════════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge--success {
  background: var(--success-bg);
  color: var(--success);
  border-color: rgba(47, 158, 106, 0.28);
}
.badge--warning {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: rgba(224, 160, 30, 0.28);
}
.badge--danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(179, 49, 31, 0.28);
}
.badge--neutral {
  background: var(--surface-3);
  color: var(--ink-muted);
  border-color: var(--hairline-soft);
}
.badge--accent {
  background: var(--caurfesa-soft);
  color: var(--caurfesa);
  border-color: rgba(8, 72, 155, 0.3);
}

/* ═══ Tablas densas ═════════════════════════════════════════════════════════ */

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink-subtle);
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
  background: var(--surface-1);
}

.table tbody td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--hairline-soft);
  color: var(--ink-muted);
  vertical-align: middle;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.table tbody tr:hover td {
  background: var(--surface-2);
  color: var(--ink);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* Una tabla que aparece es una lista apareciendo: un stagger sutil y con
   tope (nunca coreografía) confirma que son filas nuevas, no un salto
   brusco de contenido. Anima solo en la inserción real del <tr> (primera
   carga, o cuando cargando→listo cambia el árbol) — Elm parchea los nodos
   existentes en filtros/reordenamientos sin recrearlos, así que no
   retriggerea en cada tecla del buscador. */
.table tbody tr {
  animation: row-in var(--dur-base) var(--ease-out) backwards;
}
.table tbody tr:nth-child(1) {
  animation-delay: 0ms;
}
.table tbody tr:nth-child(2) {
  animation-delay: 16ms;
}
.table tbody tr:nth-child(3) {
  animation-delay: 32ms;
}
.table tbody tr:nth-child(4) {
  animation-delay: 48ms;
}
.table tbody tr:nth-child(5) {
  animation-delay: 64ms;
}
.table tbody tr:nth-child(6) {
  animation-delay: 80ms;
}
.table tbody tr:nth-child(7) {
  animation-delay: 96ms;
}
.table tbody tr:nth-child(n + 8) {
  animation-delay: 112ms;
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.table .t-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  white-space: nowrap;
}

.table .t-strong {
  color: var(--ink);
  font-weight: 600;
}

.table .t-actions {
  text-align: right;
  white-space: nowrap;
}

.table--clickable tbody tr {
  cursor: pointer;
}

/* Segunda línea, secundaria, dentro de una celda densa. */
.table .desc {
  display: block;
  font-size: 11px;
  color: var(--ink-subtle);
  margin-top: 1px;
}

/* ═══ Chips de dato (resúmenes junto a los filtros) ═════════════════════════ */

.resumen-chips {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

.chip-dato {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--surface-2);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius);
  padding: 6px 12px;
  min-width: 92px;
}

.chip-dato small {
  font-size: 10px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--ink-subtle);
  font-weight: 600;
}

.chip-dato strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ═══ Estados vacíos ════════════════════════════════════════════════════════ */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 46px 24px;
  color: var(--ink-subtle);
}

.empty__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--hairline-soft);
  display: grid;
  place-items: center;
  color: var(--ink-subtle);
  margin-bottom: 4px;
}

.empty__title {
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
}

.empty__hint {
  font-size: 12.5px;
  max-width: 400px;
  line-height: 1.55;
}

/* ═══ Skeletons shimmer ═════════════════════════════════════════════════════ */

.sk {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: 6px;
}

.sk::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(18, 19, 22, 0.05) 50%,
    transparent 100%
  );
  animation: sk-shimmer 1.35s infinite;
}

@keyframes sk-shimmer {
  100% {
    transform: translateX(100%);
  }
}

.sk--text {
  height: 11px;
}
.sk--line {
  height: 13px;
}

/* ═══ Avisos / notas ════════════════════════════════════════════════════════ */

.note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-radius: var(--radius);
  padding: 11px 14px;
  font-size: 12.5px;
  line-height: 1.55;
  border: 1px solid var(--hairline-soft);
  background: var(--surface-2);
  color: var(--ink-muted);
}

.note--warning {
  background: var(--warning-bg);
  border-color: rgba(224, 160, 30, 0.28);
  color: var(--warning);
}

.note--danger {
  background: var(--danger-bg);
  border-color: rgba(179, 49, 31, 0.28);
  color: var(--danger);
}

.note--accent {
  background: var(--caurfesa-soft);
  border-color: rgba(8, 72, 155, 0.28);
  color: var(--caurfesa);
}

.note strong {
  color: inherit;
}

/* ═══ Tarjetas KPI ══════════════════════════════════════════════════════════ */

/* Restaura el hover que sí tenía el componente Angular original (perdido al
   portar a una función de vista plana). */
.kpi-card {
  transition: border-color var(--dur-fast) var(--ease-out);
}
.kpi-card:hover {
  border-color: var(--hairline);
}

/* El dato "llegó vivo": mismo lenguaje de entrada que filas de tabla y
   modales (fade + rise, backwards para no destellar antes del delay), en
   vez de un count-up por frame — ver el porqué en Ui/KpiCard.elm. */
.kpi-value {
  animation: kpi-value-in var(--dur-slow) var(--ease-out) backwards;
}

@keyframes kpi-value-in {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══ Grids utilitarios ═════════════════════════════════════════════════════ */

.grid-kpi {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

@media (max-width: 1080px) {
  .grid-kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .grid-kpi {
    grid-template-columns: minmax(0, 1fr);
  }
  .view {
    padding: 18px 14px 32px;
  }
}

/* ═══ Tabs ══════════════════════════════════════════════════════════════════ */

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--hairline-soft);
  border-radius: 10px;
}

.tabs button {
  border: none;
  background: transparent;
  color: var(--ink-subtle);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.tabs button:hover {
  color: var(--ink);
}

.tabs button.is-active {
  background: var(--surface-4);
  color: var(--ink);
}

/* ═══ Filtros ═══════════════════════════════════════════════════════════════ */

.filters {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.filters .field {
  min-width: 150px;
}

/* ═══ Modal ═════════════════════════════════════════════════════════════════ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 8, 0.66);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 60;
  animation: overlay-in var(--dur-fast) var(--ease-out);
}

.modal {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  width: min(640px, 100%);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  min-height: 0;
  animation: modal-in var(--dur-base) var(--ease-out);
}

@keyframes overlay-in {
  from {
    opacity: 0;
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--hairline-soft);
}

.modal__body {
  padding: 16px 18px;
  overflow-y: auto;
  min-height: 0;
}

.modal__foot {
  padding: 13px 18px;
  border-top: 1px solid var(--hairline-soft);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--hairline-soft);
  color: var(--ink-subtle);
  border-radius: var(--radius);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition:
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
}

.icon-btn:hover {
  color: var(--ink);
  border-color: var(--hairline);
  background: var(--surface-2);
}

/* ═══ Dropdown (menú de usuario del shell) ══════════════════════════════════ */

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 41;
  min-width: 232px;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transform-origin: top right;
  animation: menu-in var(--dur-fast) var(--ease-out);
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
}

.menu__head {
  padding: 11px 13px;
  border-bottom: 1px solid var(--hairline-soft);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu__head strong {
  font-size: 12.5px;
  color: var(--ink);
}

.menu__head small {
  font-size: 11px;
  color: var(--ink-subtle);
}

.menu__item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  background: transparent;
  border: none;
  padding: 10px 13px;
  font-size: 13px;
  color: var(--ink-muted);
  cursor: pointer;
  text-align: left;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.menu__item:hover {
  background: var(--surface-3);
  color: var(--ink);
}

/* ═══ Listas de definición (detalle) ════════════════════════════════════════ */

.dl {
  display: grid;
  grid-template-columns: minmax(0, 150px) minmax(0, 1fr);
  gap: 9px 16px;
  font-size: 13px;
}

.dl dt {
  color: var(--ink-subtle);
  font-size: 12px;
}

.dl dd {
  margin: 0;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Estilos por vista — en Angular vivían `:host`-scoped en cada componente
   (login.css, shell.css, resumen.css…). Elm no tiene encapsulación de
   estilos por vista, así que se aplanan acá como clases globales; cada
   `:host { ... }` de origen pasa a una clase explícita en el div raíz de esa
   vista (`.login-view`, `.shell-root`) — los nombres del resto de clases NO
   cambian, ya eran lo bastante específicos como para no chocar entre sí.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Login (ex :host de login.css) ───────────────────────────────────────── */

.login-view {
  display: flex;
  flex: 1;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
  background:
    radial-gradient(900px 460px at 50% -12%, rgba(8, 72, 155, 0.09), transparent 70%),
    var(--canvas);
}

.login-view .wrap {
  width: min(408px, 100%);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-view .card {
  background: var(--surface-1);
  border: 1px solid var(--hairline-soft);
  border-radius: 14px;
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-view .brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 6px;
}

.login-view .brand__logo {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.login-view .brand__c {
  color: var(--caurfesa);
}

.login-view .brand__tag {
  font-size: 12.5px;
  color: var(--ink-subtle);
}

.login-view h1 {
  font-size: 20px;
}

.login-view .sub {
  font-size: 13px;
  color: var(--ink-subtle);
  margin-top: -6px;
  margin-bottom: 2px;
}

.login-view .pass {
  position: relative;
}

.login-view .pass .input {
  padding-right: 42px;
}

.login-view .pass__ojo {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--ink-subtle);
  cursor: pointer;
  padding: 6px;
  display: grid;
  place-items: center;
  border-radius: 6px;
}

.login-view .pass__ojo:hover {
  color: var(--ink);
}

.login-view .btn--block {
  margin-top: 4px;
  padding: 10px 14px;
}

/* Global (no scopeado a .login-view): Ui.Confirmar también lo usa, sobre
   .btn--danger — un color fijo (el navy de .btn--primary) se habría vuelto
   invisible ahí. currentColor lo adapta automáticamente al botón donde caiga. */
.spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  opacity: 0.85;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.login-view .ayuda {
  font-size: 12px;
  color: var(--ink-subtle);
  text-align: center;
  line-height: 1.5;
  margin-top: 2px;
}

.login-view .pie {
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-subtle);
}

/* ── Shell (topbar + sidebar agrupado + drawer de chat) ───────────────────── */

.shell-root {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 0;
  background: var(--canvas);
}

.shell-root .topbar {
  height: var(--topbar-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  background: rgba(245, 247, 250, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
  position: relative;
  z-index: 30;
}

.shell-root .logo {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.shell-root .logo__c {
  color: var(--caurfesa);
}

.shell-root .collapse,
.shell-root .hamburger {
  background: transparent;
  border: none;
  color: var(--ink-subtle);
  border-radius: var(--radius);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.shell-root .collapse:hover,
.shell-root .hamburger:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.shell-root .hamburger {
  display: none;
}

.shell-root .spacer {
  flex: 1;
}

.shell-root .topbar__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius);
  background: var(--verde);
  color: #fff;
  font-weight: 700;
  font-size: 12.5px;
  white-space: nowrap;
  transition:
    background var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}
.shell-root .topbar__cta:hover {
  background: var(--verde-deep);
}
.shell-root .topbar__cta:active {
  transform: scale(0.97);
}

.icon-btn.is-active {
  color: var(--caurfesa);
  background: var(--caurfesa-soft);
  border-color: transparent;
}

.shell-root .chip {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 4px 14px 4px 4px;
  max-width: 300px;
}

.shell-root .chip__avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.shell-root .chip__txt {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.shell-root .chip__txt strong {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell-root .chip__txt small {
  font-size: 10.5px;
  color: var(--ink-subtle);
}

.shell-root .user {
  position: relative;
  flex-shrink: 0;
}

.shell-root .user__btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 3px 7px 3px 3px;
  cursor: pointer;
  color: var(--ink-subtle);
  transition:
    border-color var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
}

.shell-root .user__btn:hover {
  border-color: var(--hairline);
  background: var(--surface-2);
  color: var(--ink);
}

.shell-root .user__avatar {
  width: 25px;
  height: 25px;
  border-radius: 999px;
  background: var(--caurfesa-soft);
  color: var(--caurfesa);
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 800;
}

.shell-root .body {
  flex: 1;
  display: flex;
  min-height: 0;
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */

.shell-root .sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface-1);
  border-right: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  gap: 2px;
  transition: width var(--dur-slow) var(--ease-out);
  overflow-x: hidden;
  overflow-y: auto;
}

.shell-root .sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.shell-root .nav-item,
.shell-root .nav-group__summary {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 11px;
  border-radius: 9px;
  color: var(--ink-muted);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.shell-root .nav-group__summary::-webkit-details-marker {
  display: none;
}

.shell-root .nav-item:hover:not(.is-disabled),
.shell-root .nav-group__summary:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.shell-root .nav-item.is-active {
  background: var(--caurfesa-soft);
  color: var(--caurfesa);
  font-weight: 700;
}

.shell-root .nav-item.is-disabled {
  opacity: 0.5;
  cursor: default;
}

.shell-root .nav-item__ico {
  flex-shrink: 0;
}

.shell-root .nav-item__txt {
  overflow: hidden;
  text-overflow: ellipsis;
}

.shell-root .nav-group__summary .nav-item__txt {
  flex: 1;
}

.shell-root .nav-group__caret {
  flex-shrink: 0;
  display: flex;
  color: var(--ink-subtle);
  transition: transform var(--dur-fast) var(--ease-out);
}

.shell-root .nav-group[open] > .nav-group__summary .nav-group__caret {
  transform: rotate(180deg);
}

/* Expande/colapsa con una transición real en vez del salto instantáneo del
   `<details>` nativo: se pisa el `display: none` que el navegador aplica al
   contenido cerrado (por eso `display: grid` fijo acá, no solo en `[open]`)
   y se anima `grid-template-rows` 0fr→1fr — la única forma de animar una
   altura "auto" en CSS puro, sin JS ni medir el contenido a mano. */
.shell-root .nav-group__sub {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-base) var(--ease-out);
}

.shell-root .nav-group[open] > .nav-group__sub {
  grid-template-rows: 1fr;
}

.shell-root .nav-group__sub-inner {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 2px 0 4px 41px;
}

.shell-root .nav-subitem {
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--ink-subtle);
  font-size: 13px;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.shell-root .nav-subitem:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.shell-root .nav-subitem.is-active {
  color: var(--caurfesa);
  font-weight: 700;
}

.shell-root .sidebar__bottom {
  border-top: 1px solid var(--hairline-soft);
  padding-top: 6px;
  margin-top: 6px;
}

.shell-root .sidebar__foot {
  font-size: 11px;
  color: var(--ink-subtle);
  padding: 10px 11px 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 861px) {
  .shell-root .sidebar.is-collapsed {
    width: var(--sidebar-w-collapsed);
  }

  .shell-root .sidebar.is-collapsed .nav-item__txt,
  .shell-root .sidebar.is-collapsed .nav-group__caret,
  .shell-root .sidebar.is-collapsed .nav-group__sub,
  .shell-root .sidebar.is-collapsed .sidebar__foot {
    display: none;
  }

  .shell-root .sidebar.is-collapsed .nav-item,
  .shell-root .sidebar.is-collapsed .nav-group__summary {
    justify-content: center;
    padding: 9px 0;
  }
}

.shell-root .main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.shell-root .drawer-backdrop,
.shell-root .chat-backdrop {
  display: none;
}

/* ── Drawer de chat (Asistente, persistente junto al contenido) ───────────── */

.shell-root .chat-drawer {
  position: relative;
  width: var(--chat-w);
  flex-shrink: 0;
  background: var(--surface-1);
  border-left: 1px solid var(--hairline);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    width var(--dur-slow) var(--ease-out),
    border-color var(--dur-slow) var(--ease-out);
}

.shell-root .chat-drawer.is-closed {
  width: 0;
  border-left-color: transparent;
}

.shell-root .chat-drawer__body {
  width: var(--chat-w);
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.shell-root .chat-drawer__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  color: var(--ink-subtle);
  border-radius: var(--radius);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition:
    color var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
}
.shell-root .chat-drawer__close:hover {
  color: var(--ink);
  background: var(--surface-3);
}

/* Recorta el header full-page de Page.Asistente para que quepa en el
   drawer angosto — sin tocar ese módulo, que también se usa a pantalla
   completa si algún día se linkea `/asistente` directo. */
.chat-drawer .view {
  padding: 20px 18px 16px;
  gap: 14px;
}
.chat-drawer .eyebrow,
.chat-drawer .view__title p {
  display: none;
}
.chat-drawer .view__title h1 {
  font-size: 17px;
  padding-right: 32px;
}
.chat-drawer .card.chat {
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin: -20px -18px -16px;
  flex: 1;
}
.chat-drawer .chat__scroll {
  padding: 4px 18px 16px;
}
.chat-drawer .msg__burbuja {
  max-width: 88%;
}

@media (max-width: 1180px) {
  .shell-root .chat-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    box-shadow: -20px 0 60px -30px rgba(6, 45, 96, 0.5);
  }

  .shell-root .chat-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(18, 19, 22, 0.32);
    z-index: 55;
  }
}

@media (max-width: 860px) {
  .shell-root .hamburger {
    display: grid;
  }

  .shell-root .collapse {
    display: none;
  }

  .shell-root .topbar__cta span {
    display: none;
  }

  .shell-root .chip__txt {
    display: none;
  }

  .shell-root .chip {
    padding: 4px;
  }

  .shell-root .sidebar {
    position: fixed;
    top: var(--topbar-h);
    bottom: 0;
    left: 0;
    z-index: 50;
    width: var(--sidebar-w);
    transform: translateX(-100%);
    transition: transform var(--dur-slow) var(--ease-out);
    border-right: 1px solid var(--hairline);
  }

  .shell-root .sidebar.is-open {
    transform: translateX(0);
  }

  .shell-root .drawer-backdrop {
    display: block;
    position: fixed;
    inset: var(--topbar-h) 0 0 0;
    background: rgba(18, 19, 22, 0.32);
    z-index: 49;
  }

  .shell-root .chat-drawer {
    width: min(360px, 92vw);
  }
}

/* ── Buzón (tabla seleccionada + detalle de mensaje) ─────────────────────── */

.table tbody tr.is-selected td {
  background: var(--caurfesa-soft);
}

.msg__punto {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--caurfesa);
  margin-right: 8px;
  vertical-align: middle;
}

.msg__punto.is-leida {
  background: transparent;
  border: 1px solid var(--hairline);
}

.msg__cuerpo {
  border: 1px solid var(--hairline-soft);
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 14px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-muted);
  max-height: 420px;
  overflow: auto;
  max-width: 100%;
  display: block;
}

.msg__cuerpo img {
  max-width: 100%;
  height: auto;
}
.msg__cuerpo table {
  max-width: 100%;
}

.msg__adjuntos {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msg__adjunto {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink-muted);
  font-size: 12.5px;
  font-weight: 600;
  transition:
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
}

.msg__adjunto:hover {
  color: var(--ink);
  border-color: var(--hairline);
  background: var(--surface-3);
}

.msg__adjunto svg {
  flex-shrink: 0;
  color: var(--caurfesa);
}

/* ── Citas (slots del formulario de agendar/reprogramar) ─────────────────── */

.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 7px;
  margin-top: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding: 2px;
}

.slot {
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  color: var(--ink-muted);
  border-radius: var(--radius);
  padding: 7px 4px;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition:
    background var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.slot:hover:not(:disabled) {
  border-color: var(--caurfesa);
  color: var(--ink);
}

.slot.is-selected {
  background: var(--caurfesa);
  border-color: var(--caurfesa);
  color: #fff;
}

.slot:disabled {
  opacity: 0.32;
  cursor: not-allowed;
  text-decoration: line-through;
}

.spinner-inline {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
  margin-right: 2px;
  vertical-align: -1px;
}

/* ── Estado de cuenta (escalera comercial) ────────────────────────────────── */

.plan {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan__escalera {
  list-style: none;
  margin: 4px 0 2px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.plan__escalera li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--hairline-soft);
  font-size: 13px;
}

.plan__escalera li:last-child {
  border-bottom: none;
}

.plan__nivel {
  color: var(--ink);
  font-weight: 600;
}

.plan__nivel-precio {
  color: var(--ink-muted);
  font-size: 12.5px;
}

/* ── Proveedores (contrapartes + simulador de pronto pago) ───────────────── */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 16px;
  align-items: start;
}

@media (max-width: 1100px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
}

.panel {
  display: flex;
  flex-direction: column;
}

.table tbody tr.is-sel td {
  background: var(--caurfesa-soft);
  color: var(--ink);
}

.table tbody tr.is-sel td:first-child {
  box-shadow: inset 2px 0 0 var(--caurfesa);
}

.pie-nota {
  font-size: 11.5px;
  color: var(--ink-subtle);
  padding: 10px 18px 14px;
  line-height: 1.5;
  border-top: 1px solid var(--hairline-soft);
}

.sim {
  border-top: 1px solid var(--hairline-soft);
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface-2);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.sim__params {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sim__hint {
  font-size: 12.5px;
  color: var(--ink-subtle);
  line-height: 1.5;
}

.sim__calc {
  background: var(--surface-1);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.sim__desc {
  color: var(--success);
  font-weight: 700;
}

.sim__hoy {
  color: var(--caurfesa);
  font-weight: 800;
  font-size: 15px;
}

/* ── Asistente (chat) ─────────────────────────────────────────────────────── */

.chat {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg {
  display: flex;
  justify-content: flex-start;
  animation: msg-in var(--dur-base) var(--ease-out) backwards;
}

@keyframes msg-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
}

.msg--propio {
  justify-content: flex-end;
}

.msg__burbuja {
  max-width: min(560px, 82%);
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  background: var(--surface-2);
  border: 1px solid var(--hairline-soft);
  color: var(--ink);
}

.msg--propio .msg__burbuja {
  background: var(--caurfesa);
  color: #fff;
  border-color: var(--caurfesa);
}

.msg--error .msg__burbuja {
  background: var(--danger-bg);
  border-color: rgba(179, 49, 31, 0.28);
  color: var(--danger);
}

.msg__burbuja--pensando {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 13px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--ink-subtle);
  animation: chat-bounce 1.1s infinite ease-in-out;
}
.dot:nth-child(2) {
  animation-delay: 0.15s;
}
.dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes chat-bounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.chat__demora {
  font-size: 11.5px;
  color: var(--ink-subtle);
  padding-left: 4px;
}

.chat__form {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--hairline-soft);
}

.chat__form .input {
  flex: 1;
}

/* ── Resumen (tl/feed; su propio :host es redundante con .view) ─────────── */

.tl {
  display: flex;
  flex-direction: column;
}

.tl__row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--hairline-soft);
  animation: row-in var(--dur-base) var(--ease-out) backwards;
}

.tl__row:last-child {
  border-bottom: none;
}

.tl__row:nth-child(1),
.feed__row:nth-child(1) {
  animation-delay: 0ms;
}
.tl__row:nth-child(2),
.feed__row:nth-child(2) {
  animation-delay: 16ms;
}
.tl__row:nth-child(3),
.feed__row:nth-child(3) {
  animation-delay: 32ms;
}
.tl__row:nth-child(4),
.feed__row:nth-child(4) {
  animation-delay: 48ms;
}
.tl__row:nth-child(5),
.feed__row:nth-child(5) {
  animation-delay: 64ms;
}
.tl__row:nth-child(n + 6),
.feed__row:nth-child(n + 6) {
  animation-delay: 80ms;
}

.tl__dia {
  width: 38px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--hairline-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1.1;
}

.tl__dia strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.tl__dia small {
  font-size: 9.5px;
  color: var(--ink-subtle);
  letter-spacing: 0.3px;
}

.tl__dia.is-danger {
  background: var(--danger-bg);
  border-color: rgba(179, 49, 31, 0.28);
}
.tl__dia.is-danger strong {
  color: var(--danger);
}

.tl__dia.is-warning {
  background: var(--warning-bg);
  border-color: rgba(224, 160, 30, 0.28);
}
.tl__dia.is-warning strong {
  color: var(--warning);
}

.tl__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tl__info strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.tl__info span {
  font-size: 12px;
  color: var(--ink-subtle);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed {
  display: flex;
  flex-direction: column;
}

.feed__row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--hairline-soft);
  animation: row-in var(--dur-base) var(--ease-out) backwards;
}

.feed__row:last-child {
  border-bottom: none;
}

.feed__ico {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--surface-3);
  color: var(--ink-subtle);
  margin-top: 1px;
}

.feed__ico.is-declaracion {
  background: var(--success-bg);
  color: var(--success);
}

.feed__ico.is-comprobante {
  background: var(--caurfesa-soft);
  color: var(--caurfesa);
}

.feed__ico.is-buzon {
  background: var(--warning-bg);
  color: var(--warning);
}

.feed__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feed__info strong {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed__info span {
  font-size: 11.5px;
  color: var(--ink-subtle);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed__fecha {
  font-size: 11px;
  color: var(--ink-subtle);
  flex-shrink: 0;
  margin-top: 2px;
}
