/* ============================================================================
   fact-mereba — tokens de color, tema oscuro y ajustes de maquetación (E14).

   Se carga el ÚLTIMO. Bulma 0.9.3 no usa variables CSS, así que cada color
   que pinta Bulma y que tiene que cambiar con el tema se reescribe aquí sobre
   un token. El tema claro reproduce exactamente los colores de antes; el
   oscuro solo redefine los tokens.

   El tema lo decide `js/tema.js` con `data-tema` en <html>. Sin JavaScript no
   hay atributo y manda `prefers-color-scheme`; por eso el bloque oscuro está
   dos veces —atributo y media query— con los mismos valores.
   ========================================================================== */

:root {
  color-scheme: light;

  --fm-fondo: var(--mereba-cream);
  --fm-superficie: var(--mereba-cream-soft);
  --fm-superficie-alta: #FFFFFF;
  --fm-texto: var(--mereba-ink);
  --fm-texto-fuerte: #1F1F1C;
  --fm-tenue: #6B6A62;
  --fm-apagado: #9A998F;
  --fm-linea: var(--mereba-line);
  --fm-control-borde: #D8D3C4;
  --fm-titulo: var(--mereba-green-dark);
  --fm-verde-texto: var(--mereba-green);
  --fm-morado-texto: var(--mereba-purple);
  --fm-enlace: var(--mereba-purple);
  --fm-enlace-hover: var(--mereba-purple-dark);
  --fm-acento-suave: #E2EFE7;
  --fm-barra: var(--mereba-green-dark);
  --fm-barra-texto: #F2EFE6;

  --fm-aviso-fondo: #FBEFD8;
  --fm-aviso-fondo-2: #F6E6C8;
  --fm-aviso-borde: #E0CFA5;
  --fm-aviso-texto: #7A5312;
  --fm-ambar: #94631A;
  --fm-peligro: #A32222;
  --fm-peligro-fondo: #F7E1E1;
  --fm-peligro-borde: #E8C4C4;
  --fm-info-fondo: #E6E2F0;
  --fm-info-borde: #CFC5E3;
  --fm-neutro-fondo: #EFEDE4;
  --fm-gris-fondo: #E7E9EC;
  --fm-gris: #4A5058;
  --fm-exito-fondo: #E2EFE7;
  --fm-exito-texto: var(--mereba-green-dark);
}

/* Paleta oscura: verdes de marca llevados a la noche, blancos y negros con
   un punto de verde para que no parezcan grises de otra aplicación. */
:root[data-tema="oscuro"] {
  color-scheme: dark;
  --mereba-cream: #0F1613;
  --mereba-cream-soft: #151E1A;
  --mereba-ink: #E4E2DA;
  --mereba-line: #2A3832;
  --mereba-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --mereba-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  --mereba-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.45);

  --fm-superficie-alta: #1B2621;
  --fm-texto-fuerte: #F3F1EA;
  --fm-tenue: #A3A89F;
  --fm-apagado: #737A73;
  --fm-control-borde: #34443D;
  --fm-titulo: #9ED5B5;
  --fm-verde-texto: #6CC495;
  --fm-morado-texto: #C7ADEA;
  --fm-enlace: #C7ADEA;
  --fm-enlace-hover: #DDCBF4;
  --fm-acento-suave: #1B3327;
  --fm-barra: #0A100D;
  --fm-barra-texto: #E4E2DA;

  --fm-aviso-fondo: #33291A;
  --fm-aviso-fondo-2: #2B2316;
  --fm-aviso-borde: #564627;
  --fm-aviso-texto: #EBC98C;
  --fm-ambar: #E3B563;
  --fm-peligro: #F0A3A3;
  --fm-peligro-fondo: #3A1F20;
  --fm-peligro-borde: #5C3133;
  --fm-info-fondo: #272136;
  --fm-info-borde: #41355A;
  --fm-neutro-fondo: #232B27;
  --fm-gris-fondo: #242A2E;
  --fm-gris: #B4BBC3;
  --fm-exito-fondo: #1B3327;
  --fm-exito-texto: #9ED5B5;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-tema]) {
    color-scheme: dark;
    --mereba-cream: #0F1613;
    --mereba-cream-soft: #151E1A;
    --mereba-ink: #E4E2DA;
    --mereba-line: #2A3832;
    --mereba-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --mereba-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    --mereba-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.45);

    --fm-superficie-alta: #1B2621;
    --fm-texto-fuerte: #F3F1EA;
    --fm-tenue: #A3A89F;
    --fm-apagado: #737A73;
    --fm-control-borde: #34443D;
    --fm-titulo: #9ED5B5;
    --fm-verde-texto: #6CC495;
    --fm-morado-texto: #C7ADEA;
    --fm-enlace: #C7ADEA;
    --fm-enlace-hover: #DDCBF4;
    --fm-acento-suave: #1B3327;
    --fm-barra: #0A100D;
    --fm-barra-texto: #E4E2DA;

    --fm-aviso-fondo: #33291A;
    --fm-aviso-fondo-2: #2B2316;
    --fm-aviso-borde: #564627;
    --fm-aviso-texto: #EBC98C;
    --fm-ambar: #E3B563;
    --fm-peligro: #F0A3A3;
    --fm-peligro-fondo: #3A1F20;
    --fm-peligro-borde: #5C3133;
    --fm-info-fondo: #272136;
    --fm-info-borde: #41355A;
    --fm-neutro-fondo: #232B27;
    --fm-gris-fondo: #242A2E;
    --fm-gris: #B4BBC3;
    --fm-exito-fondo: #1B3327;
    --fm-exito-texto: #9ED5B5;
  }
}

/* ---------- Base ---------- */
html,
body {
  background-color: var(--fm-fondo);
  color: var(--fm-texto);
}

a {
  color: var(--fm-enlace);
}

a:hover {
  color: var(--fm-enlace-hover);
}

strong,
.table th,
.label,
.checkbox:hover,
.radio:hover {
  color: var(--fm-texto-fuerte);
}

.title {
  color: var(--fm-texto-fuerte);
}

.subtitle,
.content {
  color: var(--fm-texto);
}

.nota,
.help {
  color: var(--fm-tenue);
}

hr {
  background-color: var(--fm-linea);
}

code,
pre {
  background-color: var(--fm-neutro-fondo);
  color: var(--fm-texto-fuerte);
}

/* ---------- Barra y pie ---------- */
.navbar.is-dark,
.footer.nota,
.footer {
  background-color: var(--fm-barra) !important;
}

.navbar.is-dark .navbar-item,
.footer,
.footer p {
  color: var(--fm-barra-texto);
}

/* El menú plegado de Bulma es blanco en móvil: con el texto claro de la barra
   quedaba ilegible. */
@media screen and (max-width: 1023px) {
  .navbar.is-dark .navbar-menu {
    background-color: var(--fm-barra);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  }
}

/* La barra ya no cabe con todos los apartados a 1280 px: el correo del
   usuario la empujaba fuera de la ventana. Por debajo de 1408 px se
   quedan los iconos del menú más juntos y el correo se oculta. */
@media screen and (min-width: 1024px) and (max-width: 1407px) {
  .navbar .navbar-start .navbar-item {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
  }
  .navbar .usuario-barra {
    display: none;
  }
}

.navbar .navbar-end .navbar-item {
  gap: var(--mereba-space-2);
}

.navbar .usuario-barra {
  color: var(--fm-barra-texto);
  font-size: 0.9rem;
  margin: 0 var(--mereba-space-2);
}

.navbar .usuario-barra:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

/* El enlace de salto asomaba 2 px bajo la barra en el tema oscuro. */
.skip-link:not(:focus) {
  top: -100px;
}

.navbar-brand .tema-movil {
  margin-left: auto;
  padding-right: 0;
}

.navbar-brand .tema-movil + .navbar-burger {
  margin-left: 0;
}

/* «Salir» y «Entrar» en la barra, con el mismo trazo que el botón de tema.
   Antes eran botones blancos con el icono pasado a blanco por el filtro de
   la barra: en el tema claro el icono de salir no se veía. */
.navbar .navbar-end .button {
  background: transparent;
  border: 1px solid rgba(242, 239, 230, 0.35);
  color: var(--fm-barra-texto);
  height: 2.25rem;
}

.navbar .navbar-end .button:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(242, 239, 230, 0.6);
  color: #FFFFFF;
}

/* ---------- Botón de tema ---------- */
.boton-tema {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid rgba(242, 239, 230, 0.35);
  border-radius: var(--mereba-radius-sm);
  background: transparent;
  color: var(--fm-barra-texto);
  cursor: pointer;
  transition: background-color var(--mereba-transition-fast), border-color var(--mereba-transition-fast);
}

.boton-tema:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(242, 239, 230, 0.6);
}

.boton-tema:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
}

.boton-tema .glifo {
  width: 1.05rem;
  height: 1.05rem;
  background-color: currentColor;
  -webkit-mask: url(../icons/moon.svg) center / contain no-repeat;
  mask: url(../icons/moon.svg) center / contain no-repeat;
}

:root[data-tema="oscuro"] .boton-tema .glifo {
  -webkit-mask-image: url(../icons/sun.svg);
  mask-image: url(../icons/sun.svg);
}

/* ---------- Controles de formulario ---------- */
.input,
.textarea,
.select select,
.formulario select.select {
  background-color: var(--fm-superficie-alta);
  border-color: var(--fm-control-borde);
  color: var(--fm-texto-fuerte);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--fm-apagado);
}

.input:hover,
.textarea:hover,
.select select:hover {
  border-color: var(--fm-apagado);
}

.input[disabled],
.input[readonly],
.textarea[disabled],
.select select[disabled] {
  background-color: var(--fm-neutro-fondo);
  border-color: var(--fm-linea);
  color: var(--fm-tenue);
}

/* La flecha del desplegable de Bulma es turquesa (#00d1b2), el color por
   defecto de Bulma, no el de MEREBA. */
.select:not(.is-multiple):not(.is-loading)::after {
  border-color: var(--fm-verde-texto);
}

/* Los `input[type=date]` pintan el icono del calendario en negro fijo. */
:root[data-tema="oscuro"] input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.85);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-tema]) input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.85);
  }
}

/* ---------- Botones ---------- */
.button {
  background-color: var(--fm-superficie-alta);
  border-color: var(--fm-control-borde);
  color: var(--fm-texto-fuerte);
}

.button:hover {
  border-color: var(--fm-apagado);
  color: var(--fm-texto-fuerte);
}

.button.is-light {
  background-color: var(--fm-neutro-fondo);
  border-color: transparent;
  color: var(--fm-texto-fuerte);
}

.button.is-light:hover {
  background-color: var(--fm-linea);
}

.button.is-text {
  background-color: transparent;
  border-color: transparent;
  color: var(--fm-texto);
}

.button.is-text:hover {
  background-color: var(--fm-neutro-fondo);
  color: var(--fm-texto-fuerte);
}

.button.is-primary.is-light {
  background-color: var(--fm-acento-suave);
  color: var(--fm-titulo);
}

.button.is-danger {
  background-color: #B42D2D;
  border-color: transparent;
  color: #FFFFFF;
}

.button.is-danger.is-light {
  background-color: var(--fm-peligro-fondo);
  color: var(--fm-peligro);
}

.button.is-primary,
.button.is-primary:hover {
  border-color: transparent;
}

/* ---------- Tablas ---------- */
.table {
  background-color: var(--fm-superficie-alta);
  color: var(--fm-texto);
}

.table td,
.table th {
  border-color: var(--fm-linea);
}

.table thead td,
.table thead th {
  color: var(--fm-tenue);
}

.table.is-hoverable tbody tr:not(.is-selected):hover {
  background-color: var(--fm-neutro-fondo);
}

.table.is-striped tbody tr:not(.is-selected):nth-child(even) {
  background-color: var(--fm-superficie);
}

/* ---------- Etiquetas, avisos, migas ---------- */
.tag:not(body) {
  background-color: var(--fm-neutro-fondo);
  color: var(--fm-texto);
}

.tag:not(body).is-success.is-light,
.tag:not(body).is-primary.is-light {
  background-color: var(--fm-exito-fondo);
  color: var(--fm-exito-texto);
}

.tag:not(body).is-warning,
.tag:not(body).is-warning.is-light {
  background-color: var(--fm-aviso-fondo);
  color: var(--fm-aviso-texto);
}

.navbar .tag:not(body).is-warning {
  background-color: #FFE08A;
  color: rgba(0, 0, 0, 0.7);
}

.tag:not(body).is-danger.is-light {
  background-color: var(--fm-peligro-fondo);
  color: var(--fm-peligro);
}

.tag:not(body).is-info.is-light {
  background-color: var(--fm-info-fondo);
  color: var(--fm-morado-texto);
}

.notification {
  background-color: var(--fm-neutro-fondo);
  color: var(--fm-texto);
}

.notification.is-success.is-light,
.notification.is-primary.is-light {
  background-color: var(--fm-exito-fondo);
  color: var(--fm-exito-texto);
}

.notification.is-warning,
.notification.is-warning.is-light {
  background-color: var(--fm-aviso-fondo);
  color: var(--fm-aviso-texto);
}

.notification.is-danger.is-light {
  background-color: var(--fm-peligro-fondo);
  color: var(--fm-peligro);
}

.notification.is-info.is-light {
  background-color: var(--fm-info-fondo);
  color: var(--fm-morado-texto);
}

.has-text-danger {
  color: var(--fm-peligro) !important;
}

.has-background-danger-light {
  background-color: var(--fm-peligro-fondo) !important;
}

.help.is-danger {
  color: var(--fm-peligro);
}

.input.is-danger,
.textarea.is-danger {
  border-color: var(--fm-peligro);
}

.breadcrumb a {
  color: var(--fm-enlace);
}

.breadcrumb li + li::before {
  color: var(--fm-apagado);
}

.breadcrumb li.is-active a {
  color: var(--fm-texto);
}

/* ---------- Maquetación de formularios ----------
   La causa de las cajas que se salían por la derecha (Serie, Vencimiento,
   Provincia, Teléfono, Descripción) solo pasaba en los paneles de alta
   plegables. Bulma pone `box-sizing: border-box` en <html> y el resto lo
   hereda con `*`, pero Chrome mete el contenido de un <details> dentro del
   pseudoelemento `::details-content`, que `*` no alcanza y se queda en
   `content-box`: todo lo que cuelga del panel lo hereda. Así una
   `.column.is-5` medía su 5/12 MÁS los 24 px de relleno y la última columna
   se salía. Además, un hijo flex tiene `min-width: auto` —no encoge por
   debajo de su contenido, y un <select> mide su opción más larga—, y un
   <fieldset> nace con `min-width: min-content`. */
details > .cuerpo {
  box-sizing: border-box;
}

.columns,
.columns > .column {
  box-sizing: border-box;
}

.columns > .column {
  min-width: 0;
}

.formulario fieldset {
  min-width: 0;
}

.formulario .control .input,
.formulario .control .textarea,
.formulario .control > .select,
.formulario .control > .select select {
  width: 100%;
  max-width: 100%;
}

/* Cada sección del formulario arranca con su pregunta sobre una línea fina:
   la <legend> se asienta en el borde superior del <fieldset>. */
.formulario fieldset + fieldset {
  padding-top: var(--mereba-space-1);
  border-top: 1px solid var(--fm-linea);
}

.formulario legend {
  font-size: 1.05rem;
  padding-right: var(--mereba-space-3);
  margin-bottom: var(--mereba-space-2);
}

/* Una casilla suelta en una columna junto a campos con etiqueta quedaba a
   la altura de la etiqueta, no del control. */
@media screen and (min-width: 769px) {
  .formulario .columns > .column > label.checkbox:first-child {
    margin-top: 2.2rem !important;
  }
}

.formulario .label .opcional,
.formulario legend .opcional {
  font-weight: 400;
  color: var(--fm-tenue);
}

/* Las columnas sin el fieldset de separación pegaban su último campo al de
   abajo: el margen de `.columns:last-child` es negativo. */
.formulario .columns:last-child {
  margin-bottom: 0;
}

.formulario .acciones-formulario .nota {
  flex: 1 1 18rem;
}

details.panel-alta > .cuerpo {
  padding: var(--mereba-space-5) clamp(1rem, 3vw, 1.75rem);
}

details.panel-alta > summary {
  padding-left: clamp(1rem, 3vw, 1.75rem);
  padding-right: clamp(1rem, 3vw, 1.75rem);
}

.mereba-card {
  padding: clamp(1.1rem, 3vw, 1.75rem);
}

.barra-filtros > * {
  min-width: 0;
}

@media screen and (max-width: 768px) {
  .barra-filtros .control,
  .barra-filtros .select,
  .barra-filtros .select select,
  .barra-filtros .button {
    width: 100%;
  }
  .cabecera-pagina .acciones,
  .cabecera-pagina .acciones .button {
    width: 100%;
  }
}

/* Subida de ficheros (logo del emisor). El texto del control lo pinta el
   navegador y heredaba la tipografía de titulares del tema, en versalitas. */
.formulario input[type="file"] {
  font-family: var(--mereba-font-body);
  font-size: 0.9rem;
  letter-spacing: normal;
  text-transform: none;
  font-variant: normal;
  color: var(--fm-tenue);
  max-width: 100%;
}

.formulario input[type="file"]::file-selector-button {
  font: inherit;
  font-weight: 600;
  color: var(--fm-texto-fuerte);
  background: var(--fm-neutro-fondo);
  border: 1px solid var(--fm-control-borde);
  border-radius: var(--mereba-radius-sm);
  padding: 0.45rem 0.9rem;
  margin-right: var(--mereba-space-3);
  cursor: pointer;
}

.formulario input[type="file"]::file-selector-button:hover {
  background: var(--fm-linea);
}

/* El rótulo vacío que deja el widget antes del <input type=file>. */
.formulario .control label:empty {
  display: none;
}

.formulario .control input[name^="_delete_"] {
  margin: 0 0.35rem 0 0.75rem;
  accent-color: var(--mereba-green);
}

.opciones-segmento label {
  background: var(--fm-superficie-alta);
}

/* ---------- Pantallas de acceso ---------- */
.tarjeta-auth .logo-auth {
  width: 180px;
  max-width: 70%;
  height: auto;
}

:root[data-tema="oscuro"] .tarjeta-auth .logo-auth,
:root[data-tema="oscuro"] img[src$="Mereba-letras.svg"] {
  filter: invert(1) hue-rotate(180deg) brightness(1.1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-tema]) img[src$="Mereba-letras.svg"] {
    filter: invert(1) hue-rotate(180deg) brightness(1.1);
  }
}

.titulo-auth {
  font-family: var(--mereba-font-body);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fm-titulo);
  text-align: center;
  margin-bottom: var(--mereba-space-2);
}

.ayuda-auth {
  color: var(--fm-tenue);
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: var(--mereba-space-4);
}

.formulario-auth .field {
  margin-bottom: var(--mereba-space-4);
}

.formulario-auth .enlace-py4web {
  display: none;
}

.formulario-auth .help:empty {
  display: none;
}

/* El botón de enviar ocupa todo el ancho; los enlaces secundarios van
   debajo, separados por una línea, en vez de un segundo botón pegado. */
.formulario-auth .field:last-of-type .control {
  display: flex;
  flex-direction: column;
  gap: var(--mereba-space-2);
}

.formulario-auth input[type="submit"] {
  width: 100%;
  height: 2.75rem;
  font-weight: 600;
}

.enlaces-auth {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--mereba-space-2) var(--mereba-space-5);
  margin-top: var(--mereba-space-4);
  padding-top: var(--mereba-space-4);
  border-top: 1px solid var(--fm-linea);
  font-size: 0.9rem;
}

.enlaces-auth:empty {
  display: none;
}

.enlaces-auth a {
  font-weight: 600;
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
}

/* ---------- Mostrar u ocultar contraseña ---------- */
.campo-clave {
  position: relative;
  display: block;
}

.campo-clave .input {
  padding-right: 3rem;
}

/* El indicador de fortaleza de `utils.js` (`Q.score_input`, en los campos
   `password` y `new_password`) es un círculo de color pintado como fondo del
   <input> con `background-position: center right` en línea: quedaba debajo
   del ojo. Se corre a la izquierda del botón —de ahí el `!important`, contra
   un estilo en línea— y se reserva hueco para que el texto no lo pise. */
.campo-clave .input.password,
.campo-clave .input[name="password"],
.campo-clave .input[name="new_password"] {
  padding-right: 4.75rem;
  background-position: right 2.6rem center !important;
}

.ver-clave {
  position: absolute;
  top: 50%;
  right: 0.3rem;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: var(--mereba-radius-sm);
  background: transparent;
  color: var(--fm-tenue);
  cursor: pointer;
}

.ver-clave:hover {
  color: var(--fm-texto-fuerte);
  background-color: var(--fm-neutro-fondo);
}

.ver-clave::before {
  content: "";
  width: 1.15rem;
  height: 1.15rem;
  background-color: currentColor;
  -webkit-mask: url(../icons/eye.svg) center / contain no-repeat;
  mask: url(../icons/eye.svg) center / contain no-repeat;
}

.ver-clave[aria-pressed="true"]::before {
  -webkit-mask-image: url(../icons/eye-off.svg);
  mask-image: url(../icons/eye-off.svg);
}

/* ---------- Pie con enlaces legales ---------- */
.pie-app {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--mereba-space-3) var(--mereba-space-5);
  font-size: 0.85rem;
}

.pie-app p {
  margin: 0;
}

.pie-app .enlaces-legales {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mereba-space-2) var(--mereba-space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}

.pie-app .enlaces-legales a {
  color: var(--fm-barra-texto);
  text-decoration: underline;
  text-decoration-color: rgba(242, 239, 230, 0.4);
  text-underline-offset: 3px;
}

.pie-app .enlaces-legales a:hover {
  color: #FFFFFF;
  text-decoration-color: currentColor;
}

@media screen and (max-width: 768px) {
  .pie-app {
    justify-content: center;
    text-align: center;
  }
  .pie-app .enlaces-legales {
    justify-content: center;
  }
}

.footer {
  padding: 1.75rem 1.5rem;
}

/* ---------- Aviso de cookies ---------- */
.aviso-cookies {
  max-width: 34rem;
  margin: var(--mereba-space-4) auto 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--fm-tenue);
}

/* ---------- Texto legal ---------- */
.texto-legal {
  max-width: 72ch;
  line-height: 1.7;
}

.texto-legal h2 {
  font-family: var(--mereba-font-body);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fm-titulo);
  margin: var(--mereba-space-6) 0 var(--mereba-space-2);
}

.texto-legal h2:first-child {
  margin-top: 0;
}

.texto-legal h3 {
  font-family: var(--mereba-font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--fm-texto-fuerte);
  margin: var(--mereba-space-4) 0 var(--mereba-space-1);
}

.texto-legal p,
.texto-legal ul,
.texto-legal ol,
.texto-legal .table-container {
  margin-bottom: var(--mereba-space-3);
}

.texto-legal ul {
  list-style: disc;
  padding-left: 1.4rem;
}

.texto-legal ol {
  list-style: decimal;
  padding-left: 1.4rem;
}

.texto-legal li + li {
  margin-top: 0.25rem;
}

.texto-legal .table {
  font-size: 0.88rem;
}

/* En móvil la tabla del inventario se desplaza en su caja; sin un ancho
   mínimo por columna, el texto se partía palabra a palabra. */
.texto-legal .table td,
.texto-legal .table th {
  min-width: 8rem;
}

.texto-legal .table td:first-child {
  white-space: nowrap;
  min-width: 0;
}

.texto-legal .actualizado {
  color: var(--fm-tenue);
  font-size: 0.85rem;
}

/* ---------- Impresión: siempre en claro ---------- */
@media print {
  :root {
    color-scheme: light;
  }
  html,
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }
  .boton-tema {
    display: none !important;
  }
}
