/* Piezas comunes de las pantallas de la base y de las apps (Anexo L, ADR 0019; canon: proyectos/rt-base/tema.md). La usan la entrada, las vistas
   base, el panel del cliente y el panel de administración. Solo lee `--rt-*` (cero colores literales, Anexo D §D.6); va sin capas de cascada, para
   ganar a las de Filament sin forzar nada. Escrita a mano: sin Tailwind ni PostCSS. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--rt-fondo); color: var(--rt-texto);
  font: 400 var(--rt-t-16)/var(--rt-interlinea) var(--rt-fuente-texto);
  -webkit-font-smoothing: antialiased; font-synthesis: none;
}
a { color: var(--rt-enlace); text-underline-offset: 3px; }
a:hover { color: var(--rt-enlace-hover); }
:focus-visible { outline: 3px solid var(--rt-foco); outline-offset: 2px; }
.rt-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
svg.rt-ico { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.rt-ico--20 { width: 20px; height: 20px; }
svg.rt-ico--16 { width: 16px; height: 16px; stroke-width: 2.4; }

/* ── Tipografía ───────────────────────────────────────────── */
.rt-titulo {
  margin: var(--rt-esp-5) 0 var(--rt-esp-1); font: 600 var(--rt-t-titulo)/1.08 var(--rt-fuente-titulos);
  font-stretch: var(--rt-titulo-ancho); letter-spacing: -.005em; text-wrap: balance; overflow-wrap: anywhere;
}
.rt-frescura { margin: 0; color: var(--rt-texto-2); font-size: var(--rt-t-14); }
.rt-h2 {
  margin: var(--rt-esp-6) 0 var(--rt-esp-2); padding-inline: var(--rt-esp-1);
  font: 600 var(--rt-t-21)/1.2 var(--rt-fuente-titulos); font-stretch: var(--rt-titulo-ancho);
}
.rt-h2 small { font: 400 var(--rt-t-14)/1.4 var(--rt-fuente-texto); font-stretch: 100%; color: var(--rt-texto-2); margin-inline-start: var(--rt-esp-2); }
.rt-ayuda { margin: var(--rt-esp-2) 0 0; padding-inline: var(--rt-esp-1); color: var(--rt-texto-2); font-size: var(--rt-t-14); max-width: 60ch; }

/* ── Grupo y fila (el corazón: lista agrupada) ── gancho: .fi-section, .fi-in-entry, filas de la ficha ── */
.rt-grupo {
  margin: 0; padding: 0; list-style: none; background: var(--rt-sup); border-radius: var(--rt-radio-tarjeta);
  overflow: hidden; box-shadow: inset 0 1px 0 var(--rt-brillo);
}
.rt-fila {
  position: relative; display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center;
  column-gap: var(--rt-esp-3); min-height: var(--rt-alto-fila); padding: var(--rt-esp-2) var(--rt-esp-4);
  color: inherit; text-decoration: none;
}
.rt-fila + .rt-fila::before, .rt-grupo > li + li > .rt-fila::before {
  content: ""; position: absolute; top: 0; right: 0; left: var(--rt-esp-4); border-top: 1px solid var(--rt-linea);
}
.rt-fila--sangria + .rt-fila--sangria::before, .rt-grupo > li + li > .rt-fila--sangria::before { left: 52px; }
a.rt-fila:hover, button.rt-fila:hover { background: color-mix(in oklab, var(--rt-sup-2) 45%, var(--rt-sup)); color: inherit; }
.rt-grupo :focus-visible { outline-offset: -3px; border-radius: var(--rt-radio-tarjeta); }
.rt-fila__senal { grid-column: 1; color: var(--rt-texto-2); display: flex; }
.rt-fila__texto { grid-column: 2; min-width: 0; }
.rt-fila__nombre { display: block; font-weight: 600; overflow-wrap: anywhere; }
.rt-fila__sub { display: block; color: var(--rt-texto-2); font-size: var(--rt-t-14); line-height: 1.4; overflow-wrap: anywhere; }
.rt-fila__valor { grid-column: 3; color: var(--rt-texto-2); text-align: end; }
.rt-fila__valor--grande { color: var(--rt-texto); font: 600 var(--rt-t-24)/1 var(--rt-fuente-titulos); font-stretch: var(--rt-titulo-ancho); font-variant-numeric: tabular-nums; }
.rt-fila__chev { grid-column: 4; color: var(--rt-texto-2); display: flex; }
.rt-fila--peligro { color: var(--rt-peligro); font-weight: 600; width: 100%; border: 0; background: none; font: inherit; font-weight: 600; text-align: start; cursor: pointer; }
.rt-fila--peligro .rt-fila__senal { color: var(--rt-peligro); }
.rt-fila--accion { color: var(--rt-enlace); font-weight: 600; }
.rt-fila--accion .rt-fila__senal { color: var(--rt-enlace); }

/* ── Estado: forma + palabra ── gancho: .fi-badge (color success/warning/danger/gray/info) ── */
.rt-estado { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: var(--rt-t-14); line-height: 1.3; white-space: nowrap; }
.rt-estado--ok { color: var(--rt-ok); } .rt-estado--aviso { color: var(--rt-aviso); }
.rt-estado--error { color: var(--rt-error); } .rt-estado--info { color: var(--rt-info); } .rt-estado--neutro { color: var(--rt-texto-2); }
.rt-insignia {
  display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 10px 0 7px; border-radius: var(--rt-radio-pastilla);
  font-size: var(--rt-t-13); font-weight: 600; line-height: 1; white-space: nowrap; border: 1px solid transparent;
}
.rt-insignia.rt-estado--ok { background: var(--rt-ok-fondo); } .rt-insignia.rt-estado--aviso { background: var(--rt-aviso-fondo); }
.rt-insignia.rt-estado--error { background: var(--rt-error-fondo); } .rt-insignia.rt-estado--info { background: var(--rt-info-fondo); }
.rt-insignia.rt-estado--neutro { background: var(--rt-sup-2); color: var(--rt-texto); }

/* ── Botones ── gancho: .fi-btn (primary / gray / danger), .fi-icon-btn, .fi-link ── */
.rt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--rt-esp-2);
  min-height: var(--rt-alto-control); padding: 0 var(--rt-esp-5); border: 2px solid transparent; border-radius: var(--rt-radio-tarjeta);
  font: 600 var(--rt-t-16)/1.2 var(--rt-fuente-texto); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.rt-btn--primario { background: var(--rt-accion); color: var(--rt-sobre-accion); }
.rt-btn--primario:hover { background: var(--rt-accion-hover); color: var(--rt-sobre-accion); }
.rt-btn--primario:active { background: var(--rt-accion-activa); }
.rt-btn--suave { background: var(--rt-accion-suave); color: var(--rt-sobre-accion-suave); }
.rt-btn--suave:hover { color: var(--rt-sobre-accion-suave); background: color-mix(in oklab, var(--rt-accion-suave) 85%, var(--rt-accion)); }
.rt-btn--texto { background: none; color: var(--rt-enlace); padding-inline: var(--rt-esp-3); }
.rt-btn--peligro { background: var(--rt-peligro); color: var(--rt-sobre-peligro); }
.rt-btn--peligro:hover { background: var(--rt-peligro-hover); color: var(--rt-sobre-peligro); }
.rt-btn--ancho { width: 100%; }
.rt-btn[aria-busy="true"] { opacity: .75; cursor: progress; }
.rt-btn-icono {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: var(--rt-radio-tarjeta);
  background: none; color: var(--rt-texto-2); cursor: pointer; text-decoration: none;
}
.rt-btn-icono:hover { background: var(--rt-sup-2); color: var(--rt-texto); }
.rt-acciones { display: flex; flex-direction: column; gap: var(--rt-esp-2); margin-top: var(--rt-esp-5); }
@media (min-width:1024px) {
  .rt-acciones { flex-direction: row; justify-content: flex-start; }
  .rt-btn--ancho { width: auto; min-width: 160px; }
}
@media (prefers-reduced-motion:no-preference) {
  .rt-btn, .rt-btn-icono, a.rt-fila, .rt-segmento__op { transition: background-color var(--rt-mov-t1) var(--rt-mov-std), color var(--rt-mov-t1) var(--rt-mov-std); }
}

/* ── Campos ── gancho: .fi-fo-field, .fi-input-wrp, .fi-input, .fi-fo-field-wrt-error-message ── */
.rt-campo { margin-top: var(--rt-esp-5); }
.rt-campo:first-child { margin-top: 0; }
.rt-validacion { display: flex; gap: 6px; align-items: flex-start; margin: var(--rt-esp-2) 0 0; color: var(--rt-error); font-size: var(--rt-t-14); font-weight: 600; }
.rt-campo .rt-ayuda { padding-inline: 0; }
.rt-seccion { background: var(--rt-sup); border-radius: var(--rt-radio-tarjeta); padding: var(--rt-esp-4); box-shadow: inset 0 1px 0 var(--rt-brillo); }
@media (min-width:600px) { .rt-seccion { padding: var(--rt-pad-tarjeta); } }

/* ── Banda (aviso en sitio) ── gancho: .fi-callout; errores siempre aquí, nunca en tostada (UI-12) ── */
.rt-banda {
  display: grid; grid-template-columns: 20px 1fr; gap: 4px var(--rt-esp-3); padding: var(--rt-esp-4);
  border: 1px solid transparent; border-radius: var(--rt-radio-tarjeta); font-size: var(--rt-t-14); color: var(--rt-texto);
}
.rt-banda > svg { margin-top: 1px; }
.rt-banda strong { display: block; font-size: var(--rt-t-16); }
.rt-banda p { margin: 0; color: var(--rt-texto); }
.rt-banda--error { background: var(--rt-error-fondo); } .rt-banda--error > svg { color: var(--rt-error); }

/* ── Segmentado (filtros de estado y Apariencia) ── gancho: .fi-tabs (pestañas de la tabla) ── */
.rt-segmento { display: flex; background: var(--rt-sup-2); border-radius: var(--rt-radio-tarjeta); overflow-x: auto; scrollbar-width: none; }
.rt-segmento__op {
  flex: 1 0 auto; display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 var(--rt-esp-4); border-radius: var(--rt-radio-tarjeta);
  color: var(--rt-texto); text-decoration: none; font-weight: 500; white-space: nowrap; border: 0; background: none; font: inherit; font-weight: 500; cursor: pointer;
}
.rt-segmento__op[aria-current="page"], .rt-segmento__op[aria-pressed="true"] {
  background: var(--rt-sup); font-weight: 700; box-shadow: inset 0 0 0 4px var(--rt-sup-2), var(--rt-sombra-barra);
}
.rt-segmento__op:hover { color: var(--rt-texto); }
.rt-segmento__op .rt-cuenta { color: var(--rt-texto-2); font-weight: 500; margin-inline-start: 6px; }
@media (min-width:1024px) { .rt-segmento { display: inline-flex; } .rt-segmento__op { flex: 0 0 auto; } }

/* Cabecera de página ── gancho: .fi-header (.fi-header-heading, .fi-header-subheading, .fi-header-actions-ctn) */
.rt-cabecera { display: grid; gap: var(--rt-esp-4); margin-bottom: var(--rt-esp-5); }
.rt-cabecera .rt-btn { width: 100%; }
@media (min-width:1024px) {
  .rt-cabecera { grid-template-columns: minmax(0,1fr) auto; align-items: end; padding-top: var(--rt-esp-4); }
  .rt-cabecera .rt-btn { width: auto; }
}

/* Tabla ── gancho: .fi-ta-ctn, .fi-ta-table, .fi-ta-header-cell, .fi-ta-row, .fi-ta-cell, .fi-ta-actions */
.rt-tabla-caja { background: var(--rt-sup); border-radius: var(--rt-radio-tarjeta); overflow: clip; box-shadow: inset 0 1px 0 var(--rt-brillo); }
.rt-tabla-pie { display: flex; align-items: center; justify-content: space-between; gap: var(--rt-esp-3); padding: var(--rt-esp-2) var(--rt-esp-2) var(--rt-esp-2) var(--rt-esp-4); border-top: 1px solid var(--rt-linea); color: var(--rt-texto-2); font-size: var(--rt-t-14); }
.rt-tabla { width: 100%; border-collapse: collapse; }
.rt-tabla thead { display: none; }
/* < 1024: cada fila es una fila de lista (UI-14) */
.rt-tabla tr { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto 48px; align-items: center; column-gap: var(--rt-esp-2); min-height: 72px; padding: var(--rt-esp-2) 0 var(--rt-esp-2) var(--rt-esp-4); }
.rt-tabla tbody tr + tr::before { content: ""; position: absolute; top: 0; left: var(--rt-esp-4); right: 0; border-top: 1px solid var(--rt-linea); }
.rt-tabla td { padding: 0; }
.rt-tabla td[data-rt-lista="nombre"] { grid-column: 1; grid-row: 1; }
.rt-tabla td[data-rt-lista="estado"] { grid-column: 2; grid-row: 1 / span 2; }
.rt-tabla td[data-rt-lista="acciones"] { grid-column: 3; grid-row: 1 / span 2; }
.rt-tabla td[data-rt-lista="resumen"] { grid-column: 1; grid-row: 2; color: var(--rt-texto-2); font-size: var(--rt-t-14); }
.rt-tabla td:not([data-rt-lista]) { display: none; }
.rt-tabla td[data-rt-lista="vacio"] { grid-column: 1 / -1; grid-row: 1 / span 2; color: var(--rt-texto-2); }
[data-rt-lista="nombre"] a { color: var(--rt-texto); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
[data-rt-lista="nombre"] a::after { content: ""; position: absolute; inset: 0 48px 0 0; }
[data-rt-lista="nombre"] a:focus-visible { outline: none; }
[data-rt-lista="nombre"] a:focus-visible::after { outline: 3px solid var(--rt-foco); outline-offset: -3px; border-radius: var(--rt-radio-tarjeta); }
.rt-tabla tbody tr:hover { background: color-mix(in oklab, var(--rt-sup-2) 40%, var(--rt-sup)); }
[data-rt-lista="acciones"] .rt-btn-icono { position: relative; z-index: 1; }
@media (min-width:1024px) {
  .rt-tabla thead { display: table-header-group; }
  .rt-tabla tr { display: table-row; min-height: 0; padding: 0; }
  .rt-tabla tbody tr + tr::before { content: none; }
  .rt-tabla th {
    position: sticky; top: calc(var(--rt-alto-barra) + env(safe-area-inset-top)); z-index: 2; height: 40px; padding: 0 var(--rt-esp-4);
    background: var(--rt-sup); border-bottom: 1px solid var(--rt-linea); text-align: start; color: var(--rt-texto-2); font-size: var(--rt-t-13); font-weight: 600; white-space: nowrap;
  }
  .rt-tabla td { height: 56px; padding: 0 var(--rt-esp-4); border-bottom: 1px solid var(--rt-linea); vertical-align: middle; }
  .rt-tabla tbody tr:last-child td { border-bottom: 0; }
  .rt-tabla td[data-rt-lista="resumen"] { display: none; }
  .rt-tabla td:not([data-rt-lista]) { display: table-cell; color: var(--rt-texto-2); }
  .rt-tabla td[data-rt-lista="acciones"] { width: 64px; padding: 0 var(--rt-esp-2); text-align: end; }
  [data-rt-lista="nombre"] a::after { inset: 0 64px 0 0; }
}
.rt-filtros { display: grid; gap: var(--rt-esp-3); margin-bottom: var(--rt-esp-4); }
@media (min-width:1024px) { .rt-filtros { grid-template-columns: auto 1fr; align-items: center; } }

/* Menú de fila ── gancho: .fi-dropdown-panel, .fi-dropdown-list-item (danger) */
.rt-menu { position: relative; }
.rt-menu__panel {
  position: absolute; right: 8px; top: 52px; z-index: 30; min-width: 248px; padding: var(--rt-esp-1); margin: 0; list-style: none;
  background: var(--rt-sup-elevada); border-radius: var(--rt-radio-tarjeta); box-shadow: var(--rt-sombra-menu), 0 0 0 1px var(--rt-linea), inset 0 1px 0 var(--rt-brillo);
}
.rt-menu__op { display: flex; align-items: center; gap: var(--rt-esp-3); width: 100%; min-height: 48px; padding: 0 var(--rt-esp-3); border: 0; border-radius: var(--rt-radio-control); background: none; color: var(--rt-texto); font: inherit; text-align: start; text-decoration: none; cursor: pointer; }
.rt-menu__op:hover { background: var(--rt-sup-2); color: var(--rt-texto); }
.rt-menu__op .rt-ico { color: var(--rt-texto-2); }

/* Modal de confirmación ── gancho: .fi-modal, .fi-modal-window, .fi-modal-close-overlay */
.rt-velo { position: fixed; inset: 0; z-index: 40; background: var(--rt-velo); display: grid; align-items: end; }
.rt-modal {
  width: 100%; max-height: calc(100dvh - 24px); overflow-y: auto; padding: var(--rt-esp-5) var(--rt-esp-4) calc(var(--rt-esp-4) + env(safe-area-inset-bottom));
  background: var(--rt-sup-elevada); border-radius: var(--rt-radio-hoja) var(--rt-radio-hoja) 0 0; box-shadow: var(--rt-sombra-capa), inset 0 1px 0 var(--rt-brillo);
}
.rt-modal h2 { margin: 0 0 var(--rt-esp-4); font: 600 var(--rt-t-21)/1.2 var(--rt-fuente-titulos); font-stretch: var(--rt-titulo-ancho); overflow-wrap: anywhere; }
.rt-modal p { margin: var(--rt-esp-4) 0 0; }
@media (min-width:600px) {
  .rt-velo { align-items: center; justify-items: center; padding: var(--rt-esp-5); }
  .rt-modal { width: 480px; border-radius: var(--rt-radio-hoja); padding: var(--rt-esp-5); }
  .rt-modal .rt-acciones { flex-direction: row-reverse; justify-content: flex-start; }
  .rt-modal .rt-btn--ancho { width: auto; min-width: 0; }
}
@media (prefers-reduced-motion:no-preference) {
  .rt-modal { animation: rt-sube var(--rt-mov-t3) var(--rt-mov-entra); }
  .rt-velo { animation: rt-aparece var(--rt-mov-t2) var(--rt-mov-entra); }
}
@keyframes rt-sube { from { transform: translateY(24px); opacity: 0; } }
@keyframes rt-aparece { from { opacity: 0; } }
.rt-operacion {
  display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 6px var(--rt-esp-3); margin: 0; padding: var(--rt-esp-3);
  background: var(--rt-fondo); border-radius: var(--rt-radio-control); font-size: var(--rt-t-14);
}
.rt-operacion dt { color: var(--rt-texto-2); }
.rt-operacion dd { margin: 0; color: var(--rt-texto); font-weight: 600; overflow-wrap: anywhere; }

/* Tostada ── gancho: .fi-no-notification (solo resultados, nunca errores) */
.rt-tostada {
  position: fixed; z-index: 50; left: 50%; bottom: calc(var(--rt-alto-pestanas) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; align-items: center; gap: var(--rt-esp-3); width: calc(100% - 32px); max-width: 480px; min-height: 56px; padding: 4px 4px 4px var(--rt-esp-4);
  background: var(--rt-inversa); color: var(--rt-sobre-inversa); border-radius: var(--rt-radio-tarjeta); box-shadow: var(--rt-sombra-capa), inset 0 1px 0 var(--rt-brillo);
}
.rt-tostada p { margin: 0; flex: 1; font-weight: 500; }
.rt-tostada .rt-btn--texto { color: var(--rt-sobre-inversa); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width:1024px) { .rt-tostada { bottom: var(--rt-esp-5); left: calc(var(--rt-ancho-riel) + (100% - var(--rt-ancho-riel)) / 2); } }
@media (prefers-reduced-motion:no-preference) { .rt-tostada { animation: rt-tostada var(--rt-mov-t2) var(--rt-mov-entra); } }
@keyframes rt-tostada { from { opacity: 0; transform: translate(-50%, 16px); } }

/* Vacío ── gancho: .fi-ta-empty-state (heading, description, actions) */
.rt-vacio { display: grid; justify-items: center; gap: var(--rt-esp-2); padding: var(--rt-esp-7) var(--rt-esp-5); text-align: center; }
.rt-vacio__ilus { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: var(--rt-esp-2); border-radius: var(--rt-radio-pastilla); background: var(--rt-sup-2); color: var(--rt-texto-2); }
.rt-vacio__ilus .rt-ico { width: 32px; height: 32px; stroke-width: 1.6; }
.rt-vacio h2 { margin: 0; font: 600 var(--rt-t-18)/1.3 var(--rt-fuente-texto); }
.rt-vacio p { margin: 0 0 var(--rt-esp-3); max-width: 40ch; color: var(--rt-texto-2); }

/* Veredicto de Inicio ── gancho: widget propio del paquete en Inicio */
.rt-veredicto { display: grid; grid-template-columns: 32px 1fr; gap: 0 var(--rt-esp-3); margin: var(--rt-esp-5) 0 var(--rt-esp-2); }
.rt-veredicto > svg { width: 32px; height: 32px; margin-top: 4px; }
.rt-veredicto .rt-titulo { margin: 0 0 var(--rt-esp-1); }
.rt-aviso-fila { display: grid; grid-template-columns: 24px minmax(0,1fr); gap: var(--rt-esp-1) var(--rt-esp-3); padding: var(--rt-esp-3) var(--rt-esp-4); position: relative; }
.rt-aviso-fila + .rt-aviso-fila::before { content: ""; position: absolute; top: 0; left: 52px; right: 0; border-top: 1px solid var(--rt-linea); }
.rt-aviso-fila .rt-btn { grid-column: 2; justify-self: start; min-height: 48px; padding-inline: var(--rt-esp-4); margin-top: var(--rt-esp-2); }
@media (min-width:600px) {
  .rt-aviso-fila { grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; }
  .rt-aviso-fila .rt-btn { grid-column: 3; grid-row: 1 / span 2; margin: 0; }
}
.rt-rejilla { display: grid; gap: var(--rt-esp-4); }
@media (min-width:1024px) { .rt-rejilla--2 { grid-template-columns: repeat(2, minmax(0,1fr)); align-items: start; column-gap: var(--rt-esp-5); } }

/* ── Pantallas del cliente (entrada, código, panel) ── gancho: plantilla/resources/views/{entrar,acceso}.blade.php ── */
.rt-cliente { min-height: 100dvh; padding: var(--rt-esp-6) var(--rt-margen) var(--rt-esp-7); }
.rt-cliente__caja { max-width: 400px; margin: 0 auto; }
.rt-marca { display: flex; align-items: center; gap: var(--rt-esp-3); margin-bottom: var(--rt-esp-5); font-weight: 600; }
.rt-marca .rt-monograma { grid-row: auto; width: 32px; height: 32px; font-size: var(--rt-t-18); border-radius: 10px; }
.rt-tarjeta { background: var(--rt-sup); border-radius: var(--rt-radio-hoja); padding: var(--rt-esp-5) var(--rt-esp-4) var(--rt-esp-4); box-shadow: inset 0 1px 0 var(--rt-brillo); }
@media (min-width:600px) { .rt-tarjeta { padding: var(--rt-esp-6); } .rt-cliente { padding-top: var(--rt-esp-8); } }
.rt-tarjeta .rt-titulo { margin-top: 0; }
.rt-tarjeta .rt-intro { margin: var(--rt-esp-2) 0 var(--rt-esp-5); color: var(--rt-texto-2); }
.rt-o { display: flex; align-items: center; gap: var(--rt-esp-3); margin: var(--rt-esp-4) 0; color: var(--rt-texto-2); font-size: var(--rt-t-14); }
.rt-o::before, .rt-o::after { content: ""; flex: 1; border-top: 1px solid var(--rt-linea); }
.rt-guardar {
  position: fixed; inset: auto 0 0 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: var(--rt-esp-3);
  padding: var(--rt-esp-3) var(--rt-margen) calc(var(--rt-esp-3) + env(safe-area-inset-bottom)); background: var(--rt-sup); border-top: 1px solid var(--rt-linea);
}
.rt-guardar .rt-estado { white-space: normal; }
@media (min-width:1024px) {
  .rt-guardar { left: auto; right: auto; position: sticky; bottom: 0; margin-top: var(--rt-esp-5); border: 0; border-radius: var(--rt-radio-tarjeta); padding: var(--rt-esp-3) var(--rt-esp-3) var(--rt-esp-3) var(--rt-esp-4); box-shadow: var(--rt-sombra-menu), inset 0 1px 0 var(--rt-brillo); }
}



.rt-tono--aviso { color: var(--rt-aviso); } .rt-tono--ok { color: var(--rt-ok); }
.rt-riel .rt-segmento__op { padding-inline: var(--rt-esp-2); }
.rt-tabla td.rt-c-fecha { white-space: nowrap; }
.rt-filtros .rt-segmento { display: none; }
@media (min-width:1024px) { .rt-filtros .rt-segmento { display: inline-flex; } }

@media (max-width:1023px) { .rt-barra__titulo span { display: none; } }

/* ── Entrada y vistas base del cliente (Anexo L §L.4): una pieza blanca centrada, campos de 48 y errores en banda ── */
.rt-monograma {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--rt-inversa); color: var(--rt-sobre-inversa);
  font: 600 var(--rt-t-18)/1 var(--rt-fuente-titulos); font-stretch: var(--rt-titulo-ancho);
}
.rt-cliente__caja { max-width: min(400px, var(--rt-ancho-texto)); }
.rt-tarjeta h1 { margin: 0 0 var(--rt-esp-2); font: 600 var(--rt-t-titulo)/1.08 var(--rt-fuente-titulos); font-stretch: var(--rt-titulo-ancho); text-wrap: balance; overflow-wrap: anywhere; }
.rt-tarjeta p, .rt-tarjeta li { margin: var(--rt-esp-2) 0 var(--rt-esp-4); color: var(--rt-texto-2); }
.rt-tarjeta label { display: block; margin: var(--rt-esp-4) 0 var(--rt-esp-2); font-weight: 600; color: var(--rt-texto); }
.rt-tarjeta :is(input:not([type="hidden"], [type="checkbox"], [type="radio"]), select) {
  display: block; width: 100%; min-height: var(--rt-alto-control); padding: 0 var(--rt-esp-4); border: 1px solid var(--rt-borde-control);
  border-radius: var(--rt-radio-control); background: var(--rt-sup); color: var(--rt-texto); font: 400 var(--rt-t-16)/1.4 var(--rt-fuente-texto);
}
.rt-tarjeta input[autocomplete="one-time-code"] { min-height: 64px; text-align: center; font-size: var(--rt-t-30); font-weight: 600; font-variant-numeric: tabular-nums; }
.rt-tarjeta :is(a, button, input, select):focus-visible { outline: 3px solid var(--rt-foco); outline-offset: 2px; }
.rt-b {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: var(--rt-alto-control); margin-top: var(--rt-esp-5); padding: 0 var(--rt-esp-5);
  border: 2px solid transparent; border-radius: var(--rt-radio-tarjeta); background: var(--rt-accion); color: var(--rt-sobre-accion);
  font: 600 var(--rt-t-16)/1.2 var(--rt-fuente-texto); text-align: center; text-decoration: none; cursor: pointer;
}
.rt-b:hover { background: var(--rt-accion-hover); color: var(--rt-sobre-accion); }
.rt-b-suave { background: var(--rt-accion-suave); color: var(--rt-sobre-accion-suave); }
.rt-b-suave:hover { background: var(--rt-accion-suave); color: var(--rt-sobre-accion-suave); }
.rt-tarjeta a:not(.rt-b) { display: inline-flex; align-items: center; min-height: 48px; }
.rt-e { margin: var(--rt-esp-2) 0 0; color: var(--rt-error); font-size: var(--rt-t-14); font-weight: 600; }
.rt-e[role="alert"] { padding: var(--rt-esp-3) var(--rt-esp-4); border-radius: var(--rt-radio-tarjeta); background: var(--rt-error-fondo); color: var(--rt-texto); font-size: var(--rt-t-16); }
.rt-ok { color: var(--rt-texto); font-weight: 600; }
.rt-codigos { display: grid; grid-template-columns: 1fr 1fr; gap: var(--rt-esp-2); padding: 0; list-style: none; }
.rt-codigos li { margin: 0; padding: var(--rt-esp-3); border-radius: var(--rt-radio-control); background: var(--rt-sup-2); color: var(--rt-texto); font: 600 var(--rt-t-16)/1.2 var(--rt-fuente-texto); font-variant-numeric: tabular-nums; text-align: center; }
.rt-sec { overflow-wrap: anywhere; color: var(--rt-texto); font-weight: 600; font-variant-numeric: tabular-nums; }

.rt-fila--forma { display: block; padding-block: var(--rt-esp-3); }
.rt-fila--forma label { margin-top: 0; }
.rt-fila--forma .rt-acciones { flex-direction: row; margin-top: var(--rt-esp-3); }
.rt-fila--forma .rt-btn { width: auto; }
.rt-fila > .rt-btn { grid-column: 3; }
.rt-atras { display: inline-flex; align-items: center; min-height: 48px; gap: var(--rt-esp-1); font-weight: 500; }
.rt-validacion { margin: var(--rt-esp-2) 0 0; color: var(--rt-error); font-size: var(--rt-t-14); font-weight: 600; }
.rt-e:empty { display: none; }
.rt-fila .rt-btn { width: auto; margin: 0; }
.rt-marca { margin-bottom: var(--rt-esp-5); }
.rt-tabla td[data-rt-lista="nombre"], .rt-tabla td[data-rt-lista="resumen"] { min-width: 0; }
@media (max-width: 1023.98px) {
  .rt-tabla tr { padding-block: 0; }
  .rt-tabla td[data-rt-lista="nombre"] a { display: flex; align-items: center; min-height: 48px; overflow: hidden; white-space: nowrap; }
  .rt-tabla td[data-rt-lista="resumen"] { display: block; min-height: 24px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 24px; }
}
.rt-apariencia { padding: var(--rt-esp-3) var(--rt-esp-2) 0; }
.rt-apariencia__t { margin: 0 0 var(--rt-esp-2); color: var(--rt-texto-2); font-size: var(--rt-t-13); font-weight: 600; }
.rt-btn-icono { vertical-align: middle; }
.rt-tabla td[data-rt-lista="acciones"] { line-height: 0; }

/* ── Identidad del riel y filas de peligro/acción ── */
.rt-identidad { display: grid; grid-template-columns: 40px 1fr; gap: 2px var(--rt-esp-3); align-items: center; padding: var(--rt-esp-2) var(--rt-esp-2) var(--rt-esp-3); }
.rt-identidad .rt-monograma { grid-row: span 2; width: 40px; height: 40px; border-radius: var(--rt-radio-tarjeta); font-size: var(--rt-t-21); }
.rt-identidad b { font-weight: 600; line-height: 1.2; }
.rt-identidad > span:not(.rt-monograma) { color: var(--rt-texto-2); font-size: var(--rt-t-13); line-height: 1.2; }
.rt-ambiente { margin: 0 var(--rt-esp-2) var(--rt-esp-3); }
.rt-ambiente--pruebas .rt-insignia { border: 1.5px dashed var(--rt-borde-control); background: none; color: var(--rt-texto); }
.rt-estado--publicada { color: var(--rt-ok); } .rt-estado--borrador { color: var(--rt-aviso); }
.rt-fila--accion { display: grid; width: 100%; border: 0; background: none; font: inherit; font-weight: 600; text-align: start; cursor: pointer; }
.rt-segmento__op .rt-cuenta { color: var(--rt-texto-2); font-weight: 500; margin-inline-start: 6px; }
.rt-estado { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: var(--rt-t-14); }

/* Lista de Usuarios: búsqueda, estado segmentado y columnas con puntos suspensivos */
.rt-filtros { display: grid; gap: var(--rt-esp-3); margin-bottom: var(--rt-esp-4); }
.rt-buscar-caja--pagina { position: relative; display: flex; align-items: center; }
.rt-buscar-caja--pagina .rt-ico { position: absolute; left: 12px; color: var(--rt-texto-2); pointer-events: none; }
.rt-buscar-caja--pagina .rt-buscar { padding-inline-start: 40px; }
.rt-mas-filtros summary { cursor: pointer; list-style: none; }
.rt-mas-filtros[open] { display: grid; gap: var(--rt-esp-2); }
.rt-tabla td[data-rt-lista="nombre"] a { font-weight: 600; color: var(--rt-texto); text-decoration: none; display: flex; align-items: center; min-height: 48px; max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-tabla td { overflow: hidden; text-overflow: ellipsis; }
.rt-tabla td:not([data-rt-lista]) { white-space: nowrap; }
@media (min-width: 1024px) { .rt-filtros { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } .rt-mas-filtros, .rt-filtros > .rt-validacion { grid-column: 1 / -1; } }
.rt-fila--accion-fuerte { width: 100%; border: 0; background: none; font: inherit; font-weight: 600; text-align: start; cursor: pointer; color: var(--rt-texto); }
.rt-fila--accion-fuerte .rt-fila__senal { color: var(--rt-texto-2); }
.rt-tabla th { position: static; }
.rt-tabla { table-layout: fixed; }
@media (max-width: 1023.98px) { .rt-tabla { table-layout: auto; } }
.rt-filtros .rt-segmento { display: none; }
.rt-estado-movil select { width: 100%; min-height: 48px; }
@media (min-width: 1024px) { .rt-filtros .rt-segmento { display: inline-flex; } .rt-estado-movil { display: none; } }

/* Lista de Usuarios en escritorio: anchos por columna; el correo cabe con su dominio y las fechas no se truncan */
@media (min-width: 1024px) {
  .rt-tabla--usuarios td { padding-inline: var(--rt-esp-3); }
  .rt-tabla--usuarios th { padding-inline: var(--rt-esp-3); }
  .rt-tabla--usuarios th:nth-child(1) { width: 28%; }
  .rt-tabla--usuarios th:nth-child(3) { width: 116px; }
  .rt-tabla--usuarios th:nth-child(4) { width: 76px; }
  .rt-tabla--usuarios th:nth-child(5), .rt-tabla--usuarios th:nth-child(6) { width: 116px; }
  .rt-tabla--usuarios th:nth-child(7) { width: 76px; }
  .rt-tabla--usuarios td[data-rt-lista="nombre"] a { max-width: none; }
}

/* Cuenta con sesión al pie del riel */
.rt-cuenta-riel { display: flex; align-items: center; gap: var(--rt-esp-3); min-height: 56px; margin: var(--rt-esp-3) var(--rt-esp-2) 0; padding: var(--rt-esp-2) var(--rt-esp-3); border-radius: var(--rt-radio-tarjeta); color: var(--rt-texto); text-decoration: none; }
.rt-cuenta-riel:hover { background: var(--rt-sup-2); }
.rt-cuenta-riel__texto { display: grid; min-width: 0; }
.rt-cuenta-riel__texto b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-cuenta-riel__texto span { color: var(--rt-texto-2); font-size: var(--rt-t-13); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Ficha en dos columnas desde 1024: cuenta, sesiones y acceso a la izquierda; acciones y zona de cuidado a la derecha */
.rt-columna-ficha { display: grid; gap: var(--rt-esp-4); align-content: start; min-width: 0; }
.rt-salir-riel { display: none; margin: 0 var(--rt-esp-2); }
@media (min-width: 1024px) { .rt-salir-riel { display: block; } }

/* Correo de la lista: una línea que termina en «…» antes de lo que sigue */
.rt-tabla td[data-rt-lista="nombre"] a { display: block; line-height: 48px; min-height: 48px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* La lupa del buscador, centrada en vertical */
.rt-buscar-caja--pagina { margin: 0; }
.rt-buscar-caja--pagina .rt-ico { top: 50%; transform: translateY(-50%); }
/* Riel: sin hueco de arriba, compacto y con la cuenta junto al pie */
.fi-sidebar-nav { padding-block: var(--rt-esp-2); }
.rt-ambiente { margin-bottom: var(--rt-esp-2); }
.rt-cuenta-riel__texto b { line-height: 1.2; }

/* Tablas de Filament (Muestra y las de cada app) bajo 1024: la misma fila de lista que `.rt-tabla` — nombre, resumen, estado y «…» (Anexo L §L.3) */
@media (max-width: 1023.98px) {
  .fi-ta-table thead { display: none; }
  .fi-ta-table, .fi-ta-table tbody { display: block; width: 100%; }
  .fi-ta-table tbody tr { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto 48px; align-items: center; column-gap: var(--rt-esp-2); min-height: 72px; padding: var(--rt-esp-2) 0 var(--rt-esp-2) var(--rt-esp-4); }
  .fi-ta-table tbody tr + tr::before { content: ""; position: absolute; top: 0; left: var(--rt-esp-4); right: 0; border-top: 1px solid var(--rt-linea); }
  .fi-ta-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .fi-ta-table td > * { padding: 0; }
  .fi-ta-table td .fi-ta-text-item { display: block; padding: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fi-ta-table td:has(.fi-ta-text-has-badges) { overflow: visible; }
  .fi-ta-table td[data-rt-lista="nombre"] { grid-column: 1; grid-row: 1; font-weight: 600; }
  .fi-ta-table td[data-rt-lista="resumen"] { grid-column: 1; grid-row: 2; color: var(--rt-texto-2); font-size: var(--rt-t-14); }
  .fi-ta-table td[data-rt-lista="estado"] { grid-column: 2; grid-row: 1 / span 2; }
  .fi-ta-table td:has(.fi-ta-actions) { grid-column: 3; grid-row: 1 / span 2; }
  .fi-ta-table td:not([data-rt-lista], :has(.fi-ta-actions)) { display: none; }
  .fi-ta-table td[data-rt-lista="nombre"], .fi-ta-table td[data-rt-lista="resumen"] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Tablas de Filament desde 1024: filas de 56 con celdas sin relleno propio */
@media (min-width: 1024px) {
  .fi-ta-table .fi-ta-cell { height: 56px; padding: 0 var(--rt-esp-3); vertical-align: middle; }
  .fi-ta-table .fi-ta-text-item { padding: 0; }
}

/* Formularios en pieza: el primer campo abre al ras del relleno y el botón queda a 16 px del último campo */
.rt-seccion .rt-campo:first-child > label:first-child { margin-top: 0; }
.rt-seccion > .rt-btn, .rt-seccion > :is(p, .rt-campo) + .rt-btn { margin-top: var(--rt-esp-4); }

/* Apariencia en el riel: sus tres opciones se reparten el ancho del riel, con su relleno */
.rt-apariencia { box-sizing: border-box; max-width: 100%; }
.rt-apariencia .rt-segmento { display: flex; width: 100%; }
.rt-apariencia .rt-segmento__op { flex: 1 1 0; min-width: 0; padding-inline: var(--rt-esp-2); }
/* El segmentado de filtros no pasa del borde derecho del contenido */
.rt-filtros .rt-segmento { max-width: 100%; }
