/* Wofy Scout · componentes (lote 1.3). Usa solo los tokens de tokens.css; ningún color en bruto.
 * Las plantillas de partials/ui.html emiten estas clases. Tailwind (CDN) sigue para el layout. */

html { background: rgb(var(--wofy-bg)); }
body { background: rgb(var(--wofy-bg)); color: rgb(var(--wofy-text)); font-family: var(--font-sans); font-size: var(--text-sm); }
* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
button, a, [hx-post], [hx-get] { cursor: pointer; }
:focus-visible { outline: 2px solid rgb(var(--wofy-ring)); outline-offset: 2px; }
:where(svg.icono) { width: 16px; height: 16px; flex-shrink: 0; vertical-align: -3px; } /* tamaño por defecto de los iconos de la macro; cualquier regla de contexto o clase w-N lo cambia */
svg.icono { display: inline-block; } /* el preflight de Tailwind pone los svg en bloque: un icono junto a un texto quedaba en su propia línea */
.tabular { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* HTMX */
[hx-indicator] .htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-block; }
.htmx-request.htmx-indicator { display: inline-block; }

/* Navegación: enlaces y datos de sesión por etapas, para que nada se pise entre 320 y 1440 px.
 * < 1100 px: menú desplegable (botón de la derecha). >= 1100 px: enlaces en la barra. >= 1280 px: además usuario y tareas. */
.nav-desktop { display: none; }
.nav-wide { display: none; }
.nav-burger { display: inline-flex; }
.nav-movil { display: inline-flex; align-items: center; min-height: var(--target); }  /* lote 10.19: «Llamar» a un toque */
@media (max-width: 419px) { .nav-insignia { display: none !important; } .nav-movil { padding: 6px 8px; } }  /* y cabe a 375 px */
.nav-bar { gap: 8px; }
.nav-bar > * { min-width: 0; }
@media (min-width: 1100px) { .nav-desktop { display: flex; } .nav-burger, .nav-bar .nav-movil { display: none; } #mobile-menu { display: none !important; } }
@media (min-width: 1280px) { .nav-wide { display: flex; } .nav-wide-inline { display: inline; } }
.nav-link { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; color: rgb(var(--wofy-muted)); transition: color 150ms ease, background-color 150ms ease; white-space: nowrap; }
.nav-link:hover { color: rgb(var(--wofy-text)); background: rgb(var(--wofy-surface-2)); }
.nav-link.active { color: rgb(var(--wofy-text)); background: rgb(var(--wofy-accent-soft)); }
.nav-link.active::after { content: ''; position: absolute; bottom: -13px; left: 50%; transform: translateX(-50%); width: 24px; height: 2px;
  background: rgb(var(--wofy-accent)); border-radius: 1px; }
.nav-link svg { width: 16px; height: 16px; flex-shrink: 0; }
#mobile-menu .nav-link { min-height: var(--target); }
#mobile-menu .nav-link.active::after { display: none; }
.nav-scrolled { box-shadow: var(--shadow-sm); }
.skip-link { position: absolute; top: -48px; left: 0; background: rgb(var(--wofy-accent)); color: rgb(var(--wofy-on-accent));
  padding: 8px 16px; z-index: 100; font-size: 13px; border-radius: 0 0 6px 0; font-weight: 600; transition: top 200ms; }
.skip-link:focus { top: 0; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgb(var(--wofy-border-strong) / .6); border-radius: 3px; }

/* Botones: 44 px en táctil, 36 px con ratón */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; min-width: var(--target); min-height: var(--target);
  border-radius: var(--radius-md); color: rgb(var(--wofy-muted)); background: transparent; border: 0; }
.icon-btn:hover { color: rgb(var(--wofy-text)); background: rgb(var(--wofy-surface-2)); }
.icon-btn svg { width: 20px; height: 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--target); padding: 0 16px;
  border-radius: var(--radius-md); border: 1.5px solid transparent; font: 600 13px/1 var(--font-sans); white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease; text-decoration: none; }
@media (pointer: fine) { .btn { min-height: var(--target-fine); } }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: rgb(var(--wofy-accent)); color: rgb(var(--wofy-on-accent)); }
.btn-primary:hover:not(:disabled) { background: rgb(var(--wofy-accent-hover)); }
.btn-secondary { background: rgb(var(--wofy-surface)); color: rgb(var(--wofy-text)); border-color: rgb(var(--wofy-border-strong)); font-weight: 500; }
.btn-secondary:hover:not(:disabled) { background: rgb(var(--wofy-accent-soft)); border-color: rgb(var(--wofy-accent-ink)); }
.btn-ghost { background: transparent; color: rgb(var(--wofy-text-2)); font-weight: 500; }
.btn-ghost:hover:not(:disabled) { background: rgb(var(--wofy-surface-2)); color: rgb(var(--wofy-text)); }
.btn-danger { background: rgb(var(--wofy-surface)); color: rgb(var(--wofy-danger)); border-color: rgb(var(--wofy-danger)); font-weight: 500; }
.btn-danger:hover:not(:disabled) { background: rgb(var(--wofy-danger-bg)); }
.btn-danger-fill { background: rgb(var(--wofy-danger)); color: rgb(var(--wofy-surface)); }

/* Campos */
.field { min-height: var(--target); width: 100%; padding: 0 12px; border: 1.5px solid rgb(var(--wofy-border-strong)); border-radius: var(--radius-md);
  background: rgb(var(--wofy-surface)); color: rgb(var(--wofy-text)); font: 400 var(--text-sm)/1.4 var(--font-sans); }
@media (pointer: fine) { .field { min-height: var(--target-fine); } }
.field::placeholder { color: rgb(var(--wofy-muted)); }
.field:focus { border-color: rgb(var(--wofy-ring)); outline: none; box-shadow: 0 0 0 3px rgb(var(--wofy-ring) / .25); }
.label { display: block; margin-bottom: 4px; font-size: var(--text-xs); font-weight: 600; color: rgb(var(--wofy-text-2)); }

/* Paneles */
.panel { background: rgb(var(--wofy-surface)); border: 1px solid rgb(var(--wofy-border)); border-radius: var(--radius-lg); padding: 16px; }
.panel-title { margin: 0 0 12px; font-size: var(--text-base); font-weight: 600; color: rgb(var(--wofy-primary)); }
.kicker { font-size: var(--text-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: rgb(var(--wofy-muted)); }

/* Etiqueta de fiabilidad: forma + texto, nunca solo color */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; min-height: 22px; border-radius: 9999px; border: 1px solid transparent;
  font-size: var(--text-xs); font-weight: 600; line-height: 1.2; white-space: nowrap; }
.chip svg { width: 12px; height: 12px; flex-shrink: 0; }
.chip-medido { background: rgb(var(--wofy-accent-soft)); color: rgb(var(--wofy-accent-ink)); border-color: rgb(var(--wofy-accent-ink) / .35); }
.chip-estimado { background: rgb(var(--wofy-warn-bg)); color: rgb(var(--wofy-warn)); border-color: rgb(var(--wofy-warn) / .35); }
.chip-sin_dato { background: transparent; color: rgb(var(--wofy-muted)); border-color: rgb(var(--wofy-border-strong)); border-style: dashed; }
.chip-ok { background: rgb(var(--wofy-success-bg)); color: rgb(var(--wofy-success)); border-color: rgb(var(--wofy-success) / .35); }
.chip-aviso { background: rgb(var(--wofy-warn-bg)); color: rgb(var(--wofy-warn)); border-color: rgb(var(--wofy-warn) / .35); }
.chip-error { background: rgb(var(--wofy-danger-bg)); color: rgb(var(--wofy-danger)); border-color: rgb(var(--wofy-danger) / .35); }
.chip-info { background: rgb(var(--wofy-info-bg)); color: rgb(var(--wofy-info)); border-color: rgb(var(--wofy-info) / .35); }

/* Cifra con su fuente y fecha */
.cifras { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; margin: 0; }
.cifra { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px; background: rgb(var(--wofy-surface)); border: 1px solid rgb(var(--wofy-border)); border-radius: var(--radius-md); }
.cifra dt { font-size: var(--text-xs); font-weight: 600; color: rgb(var(--wofy-muted)); }
.cifra dd { margin: 0; }
.cifra-valor { font-size: var(--text-base); font-weight: 700; color: rgb(var(--wofy-text)); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cifra-grande .cifra-valor { font-size: var(--text-cifra); line-height: 1.2; }
.cifra-unidad { margin-left: 3px; font-size: var(--text-sm); font-weight: 500; color: rgb(var(--wofy-text-2)); }
.cifra-vacio { font-size: var(--text-sm); font-weight: 500; color: rgb(var(--wofy-muted)); }
.cifra-pie { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; font-size: var(--text-xs); color: rgb(var(--wofy-muted)); }

/* Tabla que pasa a tarjetas por debajo de 1100 px (el mismo punto que la barra de navegación): la página nunca se desplaza en horizontal */
.ui-table-wrap { background: rgb(var(--wofy-surface)); border: 1px solid rgb(var(--wofy-border)); border-radius: var(--radius-lg); }
.ui-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.ui-table th { padding: 10px 12px; text-align: left; font-size: var(--text-xs); font-weight: 600; color: rgb(var(--wofy-text-2)); background: rgb(var(--wofy-surface-2));
  border-bottom: 1px solid rgb(var(--wofy-border)); white-space: nowrap; }
.ui-table td { padding: var(--row-pad) 12px; border-bottom: 1px solid rgb(var(--wofy-border)); vertical-align: middle; }
.ui-table tbody tr:last-child td { border-bottom: 0; }
.ui-table tbody tr:hover { background: rgb(var(--wofy-accent-soft) / .5); }
.ui-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.ui-table th a.orden { display: inline-flex; align-items: center; gap: 4px; min-height: var(--target); color: inherit; text-decoration: none; }
@media (pointer: fine) { .ui-table th a.orden { min-height: 28px; } }
.ui-table th a.orden:hover { color: rgb(var(--wofy-text)); }
.ui-table th[aria-sort="ascending"] a.orden, .ui-table th[aria-sort="descending"] a.orden { color: rgb(var(--wofy-text)); }
.ui-table .titulo { font-weight: 600; color: rgb(var(--wofy-primary)); }
.ui-table .sub { display: block; font-size: var(--text-xs); color: rgb(var(--wofy-muted)); }
/* La línea de debajo se pliega aunque la cifra no («con habitaciones calculadas a partir de la superficie» no desborda a 375 px) */
.ui-table .titulo, .ui-table .sub { overflow-wrap: anywhere; }
.ui-table td.num .sub { white-space: normal; }
@media (min-width: 1100px) { .ui-table th { position: sticky; top: var(--nav-h); z-index: 1; } }
@media (max-width: 1099px) {
  .ui-table-wrap { background: transparent; border: 0; }
  .ui-table, .ui-table tbody, .ui-table tr, .ui-table td { display: block; }
  .ui-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .ui-table tbody tr { margin-bottom: 12px; padding: 4px 12px; background: rgb(var(--wofy-surface)); border: 1px solid rgb(var(--wofy-border)); border-radius: var(--radius-lg); }
  .ui-table td { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); column-gap: 12px; align-items: baseline; padding: 8px 0; text-align: right; }
  .ui-table td::before { content: attr(data-label); grid-column: 1; grid-row: 1 / span 3; align-self: start; text-align: left; font-size: var(--text-xs); font-weight: 600; color: rgb(var(--wofy-muted)); }
  .ui-table td.num { text-align: right; }
  .ui-table td[data-titulo] { display: block; text-align: left; padding-top: 10px; font-size: var(--text-base); }
  .ui-table td[data-titulo]::before { content: none; }
  .ui-table td[data-acciones] { display: flex; justify-content: flex-start; flex-wrap: wrap; text-align: left; }
  .ui-table td[data-acciones]::before { content: none; }
  .ui-table tbody tr:hover { background: rgb(var(--wofy-surface)); }
}

/* Estados vacío, cargando y error */
.estado { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 16px; text-align: center;
  background: rgb(var(--wofy-surface)); border: 1px dashed rgb(var(--wofy-border-strong)); border-radius: var(--radius-lg); }
.estado svg { width: 28px; height: 28px; color: rgb(var(--wofy-muted)); }
.estado h3 { margin: 0; font-size: var(--text-base); font-weight: 600; color: rgb(var(--wofy-primary)); }
.estado p { margin: 0; max-width: 46ch; font-size: var(--text-sm); color: rgb(var(--wofy-text-2)); }
.estado-error { border-style: solid; border-color: rgb(var(--wofy-danger) / .5); background: rgb(var(--wofy-danger-bg)); }
.estado-error svg, .estado-error h3 { color: rgb(var(--wofy-danger)); }
.skeleton { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 420px; margin-top: 8px; }
.skeleton span { display: block; height: 12px; border-radius: 6px; background: rgb(var(--wofy-border)); animation: wofy-pulse 1.4s ease-in-out infinite; }
.skeleton span:nth-child(2) { width: 80%; }
.skeleton span:nth-child(3) { width: 60%; }
@keyframes wofy-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* Diálogo de confirmación con saldos */
.dialogo { width: min(32rem, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid rgb(var(--wofy-border)); border-radius: var(--radius-lg);
  background: rgb(var(--wofy-surface)); color: rgb(var(--wofy-text)); box-shadow: var(--shadow-lg); overflow: auto; }
.dialogo::backdrop { background: rgb(var(--wofy-scrim) / .55); }
.dialogo form { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.dialogo h2 { margin: 0; font-size: var(--text-base); font-weight: 700; color: rgb(var(--wofy-primary)); }
.dialogo p { margin: 0; color: rgb(var(--wofy-text-2)); }
.dialogo-acciones { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.dialogo-acciones .btn { width: 100%; }
@media (min-width: 480px) { .dialogo-acciones { flex-direction: row-reverse; justify-content: flex-start; } .dialogo-acciones .btn { width: auto; } }
.saldos { margin: 0; padding: 12px; display: grid; gap: 10px; background: rgb(var(--wofy-surface-2)); border-radius: var(--radius-md); }
.saldo-fila { display: grid; gap: 4px; }
.saldo-texto { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: var(--text-xs); color: rgb(var(--wofy-text-2)); }
.saldo-texto strong { color: rgb(var(--wofy-text)); font-variant-numeric: tabular-nums; }
.medidor { height: 6px; border-radius: 3px; background: rgb(var(--wofy-border)); overflow: hidden; }
.medidor > span { display: block; height: 100%; background: rgb(var(--wofy-accent-ink)); }
.medidor.alto > span { background: rgb(var(--wofy-warn)); }
.medidor.lleno > span { background: rgb(var(--wofy-danger)); }
.aviso { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; border-radius: var(--radius-md); font-size: var(--text-xs); font-weight: 500;
  background: rgb(var(--wofy-warn-bg)); color: rgb(var(--wofy-warn)); }
.panel > .aviso { margin-bottom: 8px; }
.aviso svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

/* Capa de compatibilidad con el modo oscuro: las pantallas anteriores al lote 1.3 usan clases de Tailwind con colores fijos
 * (bg-white, text-gray-500, bg-emerald-50…). Se reasignan a los tokens para que el tema oscuro las cubra sin tocarlas.
 * Las plantillas nuevas usan solo las clases wofy-* y estas reglas dejan de hacer falta cuando se retiren las antiguas. */
:root[data-theme="dark"] .bg-white { background-color: rgb(var(--wofy-surface)); }
:root[data-theme="dark"] .bg-gray-50, :root[data-theme="dark"] .bg-slate-50, :root[data-theme="dark"] .bg-gray-100,
:root[data-theme="dark"] .bg-gray-50\/70 { background-color: rgb(var(--wofy-surface-2)); }
:root[data-theme="dark"] .bg-gray-300 { background-color: rgb(var(--wofy-border-strong)); }
:root[data-theme="dark"] .bg-wofy-primary { background-color: rgb(var(--wofy-primary-fill)); }
:root[data-theme="dark"] .text-gray-400, :root[data-theme="dark"] .text-gray-500, :root[data-theme="dark"] .text-gray-600,
:root[data-theme="dark"] .text-slate-600 { color: rgb(var(--wofy-muted)); }
:root[data-theme="dark"] .text-gray-700, :root[data-theme="dark"] .text-slate-700 { color: rgb(var(--wofy-text-2)); }
:root[data-theme="dark"] .border-gray-200 { border-color: rgb(var(--wofy-border)); }
:root[data-theme="dark"] .bg-emerald-50, :root[data-theme="dark"] .bg-emerald-100, :root[data-theme="dark"] .bg-green-100 { background-color: rgb(var(--wofy-success-bg)); }
:root[data-theme="dark"] .text-emerald-600, :root[data-theme="dark"] .text-emerald-700, :root[data-theme="dark"] .text-emerald-800,
:root[data-theme="dark"] .text-green-600, :root[data-theme="dark"] .text-green-700, :root[data-theme="dark"] .text-green-800 { color: rgb(var(--wofy-success)); }
:root[data-theme="dark"] .border-emerald-200 { border-color: rgb(var(--wofy-success) / .4); }
:root[data-theme="dark"] .bg-amber-50, :root[data-theme="dark"] .bg-yellow-100, :root[data-theme="dark"] .bg-orange-100 { background-color: rgb(var(--wofy-warn-bg)); }
:root[data-theme="dark"] .text-amber-600, :root[data-theme="dark"] .text-amber-700, :root[data-theme="dark"] .text-amber-800,
:root[data-theme="dark"] .text-yellow-600, :root[data-theme="dark"] .text-yellow-700, :root[data-theme="dark"] .text-yellow-800,
:root[data-theme="dark"] .text-orange-600, :root[data-theme="dark"] .text-orange-700 { color: rgb(var(--wofy-warn)); }
:root[data-theme="dark"] .border-amber-200 { border-color: rgb(var(--wofy-warn) / .4); }
:root[data-theme="dark"] .bg-red-50, :root[data-theme="dark"] .bg-red-100 { background-color: rgb(var(--wofy-danger-bg)); }
:root[data-theme="dark"] .text-red-400, :root[data-theme="dark"] .text-red-500, :root[data-theme="dark"] .text-red-600,
:root[data-theme="dark"] .text-red-700, :root[data-theme="dark"] .text-red-800 { color: rgb(var(--wofy-danger)); }
:root[data-theme="dark"] .border-red-200 { border-color: rgb(var(--wofy-danger) / .4); }
:root[data-theme="dark"] .bg-blue-50 { background-color: rgb(var(--wofy-info-bg)); }
:root[data-theme="dark"] .text-blue-600, :root[data-theme="dark"] .text-blue-700 { color: rgb(var(--wofy-info)); }
:root[data-theme="dark"] .border-blue-200 { border-color: rgb(var(--wofy-info) / .4); }
:root[data-theme="dark"] .hover\:bg-slate-50:hover, :root[data-theme="dark"] .hover\:bg-gray-50:hover, :root[data-theme="dark"] .hover\:bg-gray-100:hover { background-color: rgb(var(--wofy-surface-2)); }
:root[data-theme="dark"] .hover\:bg-red-50:hover { background-color: rgb(var(--wofy-danger-bg)); }
.logo-badge { display: inline-flex; align-items: center; padding: 3px 6px; border-radius: var(--radius-sm); background: rgb(var(--wofy-logo-bg)); }

/* Oportunidades (lote 1.5): pestañas de vistas, filtros y casos de descartados */
.vistas { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid rgb(var(--wofy-border)); }
.vistas a { display: inline-flex; align-items: center; gap: 6px; min-height: var(--target); padding: 0 12px; margin-bottom: -1px;
  font-size: var(--text-sm); font-weight: 500; color: rgb(var(--wofy-text-2)); text-decoration: none; border-bottom: 2px solid transparent; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
@media (pointer: fine) { .vistas a { min-height: var(--target-fine); } }
.vistas a:hover { color: rgb(var(--wofy-text)); background: rgb(var(--wofy-surface-2)); }
.vistas a[aria-current="page"] { color: rgb(var(--wofy-text)); font-weight: 600; border-bottom-color: rgb(var(--wofy-accent-ink)); }
.vistas .cuenta { font-size: var(--text-xs); font-weight: 600; font-variant-numeric: tabular-nums; color: rgb(var(--wofy-muted)); }
/* Embudo de Oportunidades (lote 10.10): un separador visual entre «Booking - Lucy» y «Revenue», y Descartadas aparte a la derecha. */
.vistas-sep { align-self: center; width: 1px; height: 20px; margin: 0 6px; background: rgb(var(--wofy-border)); }
.vistas .vistas-aparte { margin-left: auto; }
/* En el móvil el separador parte la fila: Inmobiliaria · Booking - Lucy arriba; Revenue · Negociando y Descartadas abajo. */
@media (max-width: 639px) { .vistas-embudo .vistas-sep { flex-basis: 100%; width: auto; height: 0; margin: 0; }
  .vistas-embudo a { padding: 0 8px; } }
@media (max-width: 1099px) { .ui-table td[data-acciones]:empty { display: none; } }
.filtros { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); align-items: end; }
@media (min-width: 640px) { .filtros { grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) auto; } }
.filtros-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fila-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.enlace { color: rgb(var(--wofy-accent-ink)); text-decoration: underline; text-underline-offset: 2px; }
.enlace:hover { color: rgb(var(--wofy-text)); }
.enlace-tactil { display: inline-flex; align-items: center; min-height: var(--target); }
@media (pointer: fine) { .enlace-tactil { min-height: 0; } }
.caso-acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgb(var(--wofy-border)); }
.repetidos summary { cursor: pointer; font-size: var(--text-xs); color: rgb(var(--wofy-text-2)); min-height: var(--target); display: flex; align-items: center; }
@media (pointer: fine) { .repetidos summary { min-height: 0; } }
.repetidos ul { margin: 4px 0 0; padding: 0; list-style: none; font-size: var(--text-xs); color: rgb(var(--wofy-text-2)); }
.repetidos li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 2px 0; }
[data-decidido]:focus { outline: none; }
[data-decidido]:focus-visible { outline: 2px solid rgb(var(--wofy-ring)); outline-offset: 2px; }

/* Directorio (lote 5.3a): filtros con varias columnas, casilla con objetivo táctil y paginación */
.filtros-directorio { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .filtros-directorio { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .filtros-directorio { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr) auto; } }
.filtros-tamano { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; margin: 0; padding: 0; border: 0; min-width: 0; }
.filtros-tamano legend { flex-basis: 100%; padding: 0; margin-bottom: 2px; }
.filtros-tamano p { flex-basis: 100%; margin: 0; }
.filtros-directorio .filtros-acciones { grid-column: 1 / -1; }
.campo-check { display: inline-flex; align-items: center; gap: 8px; min-height: var(--target); font-size: var(--text-sm); color: rgb(var(--wofy-text)); cursor: pointer; }
.campo-check input { width: 20px; height: 20px; accent-color: rgb(var(--wofy-accent-ink)); flex-shrink: 0; }
.paginacion { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.paginacion-enlaces { display: flex; gap: 8px; }
.paginacion [aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* Ficha del alojamiento (lote 4.6a): cabecera con el contacto a mano, lista de contacto con «Copiar» y fórmula */
/* Ficha del alojamiento (lote 9.5): arriba la fila de la lista de Lucía en grande; debajo la facturación y los plegados. */
.ficha-aloj { display: grid; gap: 16px; }
.ficha-aloj > details.plegado { padding-top: 4px; padding-bottom: 4px; }
.ficha-aloj > details.plegado > summary { font-size: var(--text-base); color: rgb(var(--wofy-primary)); }
.ficha-cabecera { display: grid; gap: 20px; }
.fc-nombre { margin: 0; font-size: var(--text-cifra); font-weight: 700; line-height: 1.2; color: rgb(var(--wofy-primary)); overflow-wrap: anywhere; }
.fc-lugar { margin: 4px 0 0; font-size: var(--text-sm); color: rgb(var(--wofy-text-2)); }
.fc-portales { display: grid; gap: 12px; }
@media (min-width: 640px) { .fc-portales { grid-template-columns: repeat(2, minmax(18rem, max-content)); } }
.fc-portal { display: grid; gap: 6px; align-content: end; }
.btn-grande { min-height: 56px; padding: 0 20px; font-size: var(--text-base); font-weight: 600; }
.btn-grande svg { width: 18px; height: 18px; flex-shrink: 0; }
.fc-portal .btn-grande { flex-wrap: wrap; max-width: 100%; padding-block: 8px; white-space: normal; text-align: center; line-height: 1.3; }
.fc-nota { margin-left: 6px; padding-left: 10px; border-left: 1px solid currentColor; font-weight: 700; }
.fc-estado { font-size: var(--text-sm); font-weight: 600; color: rgb(var(--wofy-text-2)); }  /* lo que pasa con Booking, sin alarma (lote 10.22) */
.fc-sub { font-size: var(--text-xs); font-weight: 400; color: rgb(var(--wofy-text-2)); }
.fc-contacto { display: grid; gap: 8px; }
.fc-linea { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.fc-etq { min-width: 4.5rem; font-size: var(--text-xs); color: rgb(var(--wofy-muted)); }
.fc-dueno { font-weight: 600; color: rgb(var(--wofy-text)); }
.ficha-cabecera > *, .fc-linea > * { min-width: 0; }
.fc-dueno, .fc-correo { overflow-wrap: anywhere; }  /* un correo largo corta: la ficha no se desplaza a 375 px (ronda 9, M6) */
.fc-tel svg { width: 16px; height: 16px; flex-shrink: 0; }
/* Contacto del dueño escrito a mano (lote 9.7a): «Añadir contacto» plegado y «Quitar». */
.fc-quitar { display: inline; margin: 0; }
.fc-anadir > summary { display: inline-flex; align-items: center; min-height: var(--target); font-size: var(--text-sm); cursor: pointer; list-style: none; }
.fc-anadir > summary::-webkit-details-marker { display: none; }
@media (pointer: fine) { .fc-anadir > summary { min-height: var(--target-fine); } }
.fc-form { display: grid; gap: 12px; max-width: 40rem; margin-top: 4px; }
.fc-form .btn { justify-self: start; }
@media (min-width: 640px) { .fc-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fc-form .btn { grid-column: 1 / -1; } }
.fc-datos { display: grid; grid-template-columns: repeat(3, minmax(0, max-content)); gap: 8px 40px; margin: 0; }
.fc-datos dt { font-size: var(--text-xs); color: rgb(var(--wofy-muted)); }
.fc-datos dd { margin: 2px 0 0; font-size: var(--text-base); font-weight: 600; color: rgb(var(--wofy-text)); }
@media (max-width: 479px) { .fc-datos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; } .fc-datos dd { font-size: var(--text-base); } }
.fc-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fc-acciones form { margin: 0; }
.fc-marca { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); font-weight: 600; color: rgb(var(--wofy-success)); }
.fc-marca svg { width: 16px; height: 16px; }
.fc-marcas { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.fc-pie { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.cifras-cuatro { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .cifras-cuatro { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.contacto-lista { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.contacto-lista li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-bottom: 12px; border-bottom: 1px solid rgb(var(--wofy-border)); }
.contacto-lista li:last-child { padding-bottom: 0; border-bottom: 0; }
.contacto-dato { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.contacto-dato > a { overflow-wrap: anywhere; }
.contacto-valor { display: inline-flex; align-items: center; min-height: var(--target); font-size: var(--text-base); font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (pointer: fine) { .contacto-valor { min-height: 0; } }
.formula { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: var(--text-sm); color: rgb(var(--wofy-text)); }
.formula .ejemplo { display: block; margin-top: 2px; font-size: var(--text-xs); color: rgb(var(--wofy-text-2)); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.comparacion { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 640px) { .comparacion { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.comparacion-titulo { margin: 0 0 8px; font-size: var(--text-sm); font-weight: 600; color: rgb(var(--wofy-primary)); }
.comparacion .cifras { grid-template-columns: minmax(0, 1fr); }
.hipotesis { display: grid; gap: 8px; margin: 0; }
.hipotesis dt { font-size: var(--text-xs); font-weight: 600; color: rgb(var(--wofy-muted)); }
.hipotesis dd { display: flex; flex-direction: column; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Oportunidades › Inmobiliaria (lote 5.G): tarjeta por oportunidad, con las cifras, el contacto y el vínculo a mano */
.filtros-broker { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .filtros-broker { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .filtros-broker { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.filtros-broker .filtros-acciones { grid-column: 1 / -1; }
@media (min-width: 1100px) { .filtros-broker .filtros-acciones { grid-column: auto; } }
.bl-lista { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .bl-lista { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.bl-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bl-cabecera { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 480px) { .bl-cabecera { grid-template-columns: minmax(0, 1fr) auto; align-items: start; } }
.bl-titulo { margin: 0; font-size: var(--text-base); font-weight: 600; color: rgb(var(--wofy-primary)); overflow-wrap: anywhere; }
.bl-margen { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
@media (min-width: 480px) { .bl-margen { align-items: flex-end; text-align: right; } }
.bl-margen-valor { font-size: 24px; line-height: 1.1; font-weight: 700; color: rgb(var(--wofy-text)); }
.bl-cifras { display: grid; gap: 8px 16px; margin: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); font-size: var(--text-sm); }
@media (min-width: 640px) { .bl-cifras { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bl-cifras > div { min-width: 0; }
.bl-cifras dt { font-size: var(--text-xs); font-weight: 600; color: rgb(var(--wofy-muted)); }
.bl-cifras dd { margin: 0; display: flex; flex-direction: column; font-weight: 600; color: rgb(var(--wofy-text)); overflow-wrap: anywhere; }
.bl-cifras .sub, .bl-card .sub { font-weight: 400; font-size: var(--text-xs); color: rgb(var(--wofy-text-2)); }
.bl-falta { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 8px 12px; border-radius: var(--radius-md); font-size: var(--text-xs);
  background: rgb(var(--wofy-surface-2)); color: rgb(var(--wofy-text)); }
.bl-falta svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.bl-bloque { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid rgb(var(--wofy-border)); min-width: 0; }
.bl-contacto { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bl-contacto-nombre { font-size: var(--text-sm); font-weight: 600; color: rgb(var(--wofy-text)); overflow-wrap: anywhere; }
.bl-contacto-enlace { max-width: 100%; overflow-wrap: anywhere; text-align: left; }
.bl-contacto-enlace svg { width: 16px; height: 16px; flex-shrink: 0; }
.bl-candidatos { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.bl-candidatos li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 8px 12px;
  border: 1px solid rgb(var(--wofy-border)); border-radius: var(--radius-md); }
.bl-candidatos li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 180px; font-size: var(--text-sm); }
.bl-pistas { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: var(--text-xs); color: rgb(var(--wofy-text-2)); }
.bl-pistas .tabular { font-weight: 600; color: rgb(var(--wofy-text)); }
.bl-acciones { display: flex; flex-wrap: wrap; gap: 8px; }
.bl-acciones:empty { display: none; }
.bl-descripcion { border-top: 1px solid rgb(var(--wofy-border)); padding-top: 4px; }
.bl-descripcion-texto { margin: 4px 0 0; font-size: var(--text-sm); color: rgb(var(--wofy-text-2)); white-space: pre-line; overflow-wrap: anywhere; }
.bl-margen-fila { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.bl-margen-fila .bl-margen-valor { font-size: 20px; }
.filtros-plegable > summary { cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: var(--target); font-size: var(--text-sm); font-weight: 600; color: rgb(var(--wofy-primary)); }
@media (pointer: fine) { .filtros-plegable > summary { min-height: 0; padding-bottom: 4px; } }
.filtros-plegable[open] > summary { margin-bottom: 8px; }

/* Flujo de oportunidades (ronda 6, lote 6.1): cabecera de pantalla, listado con «Lo siguiente», descarte con vista previa del correo.
 * Se escribió con los tokens de tokens.css (nada de colores en bruto). Los lotes siguientes amplían esta sección. */
.cabecera { display: grid; gap: 12px; }
@media (min-width: 760px) { .cabecera { grid-template-columns: minmax(0, 1fr) auto; align-items: start; } }
.hallazgo { margin: 2px 0 0; font-size: var(--text-sm); color: rgb(var(--wofy-text-2)); }
.sub { font-size: var(--text-xs); color: rgb(var(--wofy-text-2)); font-weight: 400; }
.fuerte { font-weight: 600; color: rgb(var(--wofy-text)); }
.ok { color: rgb(var(--wofy-success)); } .mal { color: rgb(var(--wofy-danger)); } .ojo { color: rgb(var(--wofy-warn)); } .gris { color: rgb(var(--wofy-muted)); }
.fila { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pila { display: grid; gap: 12px; min-width: 0; }
.linea { border: 0; border-top: 1px solid rgb(var(--wofy-border)); margin: 0; }
.lista-limpia { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.lista-limpia li { display: flex; gap: 8px; align-items: flex-start; }
.lista-limpia svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
textarea.field { padding: 10px 12px; min-height: 96px; resize: vertical; }
details.plegado > summary { display: flex; align-items: center; gap: 8px; min-height: var(--target); cursor: pointer; font-size: var(--text-sm); font-weight: 600; color: rgb(var(--wofy-text-2)); list-style: none; }
details.plegado > summary::-webkit-details-marker { display: none; }
details.plegado > summary::before { content: "▸"; color: rgb(var(--wofy-muted)); }
details.plegado[open] > summary::before { content: "▾"; }
.td-acciones { white-space: nowrap; text-align: right; }
.ui-table td .btn + .btn { margin-left: 4px; }
@media (max-width: 1099px) { .ui-table td[data-acciones] { display: flex; flex-wrap: wrap; gap: 8px; } .ui-table td .btn + .btn { margin-left: 0; } .ui-table td .chip { white-space: normal; } .ui-table td { overflow-wrap: anywhere; } }
.ui-table td.num { white-space: nowrap; }
.ui-table td .fuerte svg, .ui-table td .gris svg { width: 14px; height: 14px; vertical-align: -2px; }
.cifra-fila { display: inline-flex; align-items: baseline; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cifra-fila .fuerte { font-size: var(--text-base); font-variant-numeric: tabular-nums; }
.ui-table tr[data-espera] td, .ui-table tr[data-espera] .titulo, .ui-table tr[data-espera] .fuerte { color: rgb(var(--wofy-muted)); }
.ui-table tr.corte td { padding: 8px 12px; background: rgb(var(--wofy-danger-bg)); color: rgb(var(--wofy-danger)); font-size: var(--text-xs); font-weight: 600; }
@media (max-width: 1099px) { .ui-table tr.corte { border-radius: var(--radius-md); padding: 0 4px; } .ui-table tr.corte td { display: flex; gap: 8px; align-items: flex-start; justify-content: flex-start; text-align: left; } .ui-table tr.corte td::before { content: none; } }
.ui-table tr.corte svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; }
.dialogo-ancho { width: min(40rem, calc(100vw - 32px)); }
.motivos { display: flex; flex-wrap: wrap; gap: 8px; }
.origen-btn { display: inline-flex; align-items: center; gap: 6px; min-height: var(--target); padding: 0 14px; border-radius: 9999px; border: 1.5px solid rgb(var(--wofy-border-strong)); background: rgb(var(--wofy-surface)); color: rgb(var(--wofy-text)); font-size: var(--text-sm); font-weight: 500; cursor: pointer; }
@media (pointer: fine) { .origen-btn { min-height: var(--target-fine); } }
.origen-btn:has(input:checked) { border-color: rgb(var(--wofy-accent-ink)); background: rgb(var(--wofy-accent-soft)); font-weight: 700; }
.origen-btn:has(input:focus-visible) { outline: 2px solid rgb(var(--wofy-ring)); outline-offset: 2px; }
.origen-btn .origen-marca { display: none; width: 14px; height: 14px; }
.origen-btn:has(input:checked) .origen-marca { display: inline-block; }
.correo-mini { border: 1px solid rgb(var(--wofy-border)); border-radius: var(--radius-md); overflow: hidden; }
.correo-mini .cab { padding: 8px 12px; background: rgb(var(--wofy-surface-2)); font-size: var(--text-xs); color: rgb(var(--wofy-text-2)); display: grid; gap: 2px; overflow-wrap: anywhere; }
.correo-mini textarea { border: 0; border-radius: 0; min-height: 220px; width: 100%; }
.nota-estado { padding: 10px 14px; border-radius: var(--radius-md); background: rgb(var(--wofy-success-bg)); color: rgb(var(--wofy-success)); font-size: var(--text-sm); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.nota-estado svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn svg, .ui-table td svg { width: 16px; height: 16px; flex-shrink: 0; }
.ui-table td .chip svg { width: 12px; height: 12px; }

/* Subir una oportunidad (lote 6.2) */
.pagina-estrecha { max-width: 760px; width: 100%; margin: 0 auto; }
.origen-btn .origen-marca-mas { width: 14px; height: 14px; }
.origen-linea { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: var(--text-sm); margin: 0; }
.origen-linea[hidden], [data-origen-panel][hidden] { display: none; }
.si-no { display: inline-flex; border: 1.5px solid rgb(var(--wofy-border-strong)); border-radius: var(--radius-md); overflow: hidden; }
.si-no label { display: inline-flex; align-items: center; justify-content: center; min-height: var(--target); min-width: 64px; padding: 0 14px; background: rgb(var(--wofy-surface)); color: rgb(var(--wofy-text)); font-size: var(--text-sm); font-weight: 500; cursor: pointer; }
@media (pointer: fine) { .si-no label { min-height: var(--target-fine); } }
.si-no label + label { border-left: 1.5px solid rgb(var(--wofy-border-strong)); }
.si-no label:has(input:checked) { background: rgb(var(--wofy-primary-fill)); color: rgb(var(--wofy-surface)); font-weight: 700; }
.si-no label:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.si-no label:has(input:focus-visible) { outline: 2px solid rgb(var(--wofy-ring)); outline-offset: 2px; }
.soltar { display: grid; justify-items: center; gap: 6px; padding: 24px 16px; text-align: center; border: 1.5px dashed rgb(var(--wofy-border-strong)); border-radius: var(--radius-lg); background: rgb(var(--wofy-surface)); color: rgb(var(--wofy-text-2)); cursor: pointer; }
.soltar svg { width: 28px; height: 28px; color: rgb(var(--wofy-muted)); }
.soltar:hover, .soltar[data-arrastrando] { border-color: rgb(var(--wofy-accent-ink)); background: rgb(var(--wofy-accent-soft)); }
.progreso { height: 8px; border-radius: 9999px; background: rgb(var(--wofy-surface-2)); overflow: hidden; }
.progreso span { display: block; width: 55%; height: 100%; background: rgb(var(--wofy-accent-ink)); animation: wofy-pulse 1.4s ease-in-out infinite; }
.campo-error { display: flex; gap: 6px; align-items: flex-start; margin: 6px 0 0; font-size: var(--text-xs); font-weight: 600; color: rgb(var(--wofy-danger)); }
.campo-error svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; }
.field[aria-invalid="true"] { border-color: rgb(var(--wofy-danger)); }
.campos-dos { display: grid; gap: 12px; }
@media (min-width: 640px) { .campos-dos { grid-template-columns: 1fr 1fr; } }

/* Ficha de una oportunidad (lote 6.3): la respuesta, «lo siguiente», las cinco piezas y las secciones */
.respuesta { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .respuesta { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.ebitda { display: grid; gap: 6px; align-content: start; }
.ebitda dl, .ebitda dd, .ebitda dt { margin: 0; }
.ebitda dt { font-size: var(--text-xs); font-weight: 600; color: rgb(var(--wofy-muted)); }
.ebitda-fila { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 4px !important; }
.ebitda-valor { font-size: 40px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; color: rgb(var(--wofy-text)); }
.ebitda-valor.vacio { font-size: 24px; color: rgb(var(--wofy-muted)); }
.datos-base { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 4px 0 0; font-size: var(--text-sm); }
.datos-base div { display: flex; gap: 6px; align-items: baseline; }
.datos-base dt { font-size: var(--text-xs); color: rgb(var(--wofy-muted)); font-weight: 600; }
.datos-base dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.siguiente { display: grid; gap: 10px; align-content: start; padding: 14px 16px; border-radius: var(--radius-lg); border: 1px solid rgb(var(--wofy-accent-ink) / .45); background: rgb(var(--wofy-accent-soft)); }
.siguiente .kicker { color: rgb(var(--wofy-accent-ink)); }
.siguiente p { margin: 0; }
.siguiente p.que { font-size: var(--text-base); font-weight: 600; color: rgb(var(--wofy-text)); }
.siguiente[data-tono="espera"] { border-color: rgb(var(--wofy-border-strong)); background: rgb(var(--wofy-surface-2)); }
.siguiente[data-tono="espera"] .kicker { color: rgb(var(--wofy-text-2)); }
.siguiente p.que svg { width: 16px; height: 16px; vertical-align: -3px; }
.cita { margin: 0; padding: 10px 12px; border-left: 3px solid rgb(var(--wofy-border-strong)); background: rgb(var(--wofy-surface-2)); border-radius: 0 var(--radius-md) var(--radius-md) 0; color: rgb(var(--wofy-text-2)); white-space: pre-line; overflow-wrap: anywhere; }
.tiene { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .tiene { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.tiene a { display: grid; gap: 2px; min-height: 64px; padding: 10px 12px; border-radius: var(--radius-md); text-decoration: none; color: inherit; border: 1px solid rgb(var(--wofy-border)); background: rgb(var(--wofy-surface)); }
.tiene a:hover { border-color: rgb(var(--wofy-accent-ink)); }
.tiene .pz { display: flex; align-items: center; gap: 6px; font-size: var(--text-sm); font-weight: 600; }
.tiene .pz svg { width: 14px; height: 14px; flex-shrink: 0; }
.tiene .pz-txt { font-size: var(--text-xs); color: rgb(var(--wofy-text-2)); overflow-wrap: anywhere; }
.tiene [data-pz="si"] .pz { color: rgb(var(--wofy-success)); }
.tiene [data-pz="si"] { border-color: rgb(var(--wofy-success) / .45); }
.tiene [data-pz="no"] { border-style: dashed; border-color: rgb(var(--wofy-border-strong)); background: transparent; }
.tiene [data-pz="no"] .pz { color: rgb(var(--wofy-text-2)); }
.tiene [data-pz="espera"] .pz { color: rgb(var(--wofy-info)); }
.tiene [data-pz="aviso"] .pz { color: rgb(var(--wofy-warn)); }
.tiene [data-pz="aviso"] { border-color: rgb(var(--wofy-warn) / .5); }
.tiene [data-pz="bloq"] { border-style: dashed; border-color: rgb(var(--wofy-border-strong)); background: rgb(var(--wofy-surface-2)); }
.tiene [data-pz="bloq"] .pz { color: rgb(var(--wofy-muted)); }
.todo-ok { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; padding: 12px 14px; border-radius: var(--radius-md); border: 1px solid rgb(var(--wofy-success) / .45); background: rgb(var(--wofy-surface)); color: rgb(var(--wofy-success)); font-size: var(--text-sm); font-weight: 600; }
.todo-ok svg { width: 16px; height: 16px; vertical-align: -3px; }
.todo-ok .sub { font-weight: 400; }
.seccion { display: grid; gap: 12px; scroll-margin-top: 72px; }
.seccion h2 { margin: 0; }
.seccion-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
h2.s { font-size: var(--text-base); font-weight: 600; color: rgb(var(--wofy-primary)); margin: 0; }
.resuelto { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; color: rgb(var(--wofy-text-2)); font-size: var(--text-sm); }
.resuelto svg { width: 16px; height: 16px; vertical-align: -3px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: var(--text-xs); color: rgb(var(--wofy-muted)); }
.compara { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.compara th, .compara td { padding: 8px 10px; border-bottom: 1px solid rgb(var(--wofy-border)); text-align: right; font-variant-numeric: tabular-nums; }
.compara th:first-child, .compara td:first-child { text-align: left; }
.compara thead th { font-size: var(--text-xs); color: rgb(var(--wofy-text-2)); font-weight: 600; }
.compara tbody tr:last-child td { font-weight: 700; }
.costes { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.costes th { text-align: left; font-size: var(--text-xs); font-weight: 600; color: rgb(var(--wofy-text-2)); padding: 6px 8px; border-bottom: 1px solid rgb(var(--wofy-border)); }
.costes td { padding: 6px 8px; border-bottom: 1px solid rgb(var(--wofy-border)); vertical-align: middle; }
.costes .num { text-align: right; font-variant-numeric: tabular-nums; }
.costes tfoot td { font-weight: 700; border-bottom: 0; }
.costes .field { width: 110px; text-align: right; }
.costes select.field { width: 150px; text-align: left; }
.costes tr[data-cambiado] td:first-child { box-shadow: inset 3px 0 0 rgb(var(--wofy-info)); }
@media (max-width: 639px) {
  .costes thead { display: none; }
  .costes, .costes tbody, .costes tfoot, .costes tr { display: block; }
  .costes tr { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 6px 8px; padding: 10px 0; border-bottom: 1px solid rgb(var(--wofy-border)); }
  .costes td { border: 0; padding: 0; }
  .costes td:first-child { grid-column: 1 / -1; font-weight: 600; }
  .costes td.al-ano { grid-column: 1 / -1; text-align: left; color: rgb(var(--wofy-text-2)); }
  .costes select.field { width: 100%; }
  .costes tfoot tr { grid-template-columns: 1fr auto; }
  .costes tfoot td:first-child { grid-column: auto; }
}
.efecto { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 14px; border-radius: var(--radius-md); background: rgb(var(--wofy-surface-2)); font-size: var(--text-sm); margin: 0; }
.vivo { padding: 8px 12px; border-radius: var(--radius-md); background: rgb(var(--wofy-surface-2)); font-size: var(--text-sm); font-variant-numeric: tabular-nums; margin: 0; }
.pagina-ancha { max-width: 760px; }
.campo-url { display: flex; flex-wrap: wrap; gap: 8px; }
.campo-url .field { flex: 1 1 240px; width: auto; }
.rent-control { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rent-control .field { width: 130px; font-size: 20px; font-weight: 700; text-align: center; }
.visto-inversor { display: grid; gap: 8px 24px; margin: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); font-size: var(--text-sm); }
.visto-inversor dt { font-size: var(--text-xs); font-weight: 600; color: rgb(var(--wofy-muted)); }
.visto-inversor dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.visto-inversor .ancho { grid-column: 1 / -1; }

/* A quién llamar (lote 7.6; rediseño del 23 nov 2026): lista de filas anchas, no tabla. Cada fila se lee como una línea de una hoja
 * de llamadas: a quién, por qué en una frase, cuánto podría valer, teléfono y dos acciones. Sin chips por celda. */
.ll-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ll-barra .field { width: auto; min-width: 14rem; max-width: 100%; }
.ll-lista { background: rgb(var(--wofy-surface)); border: 1px solid rgb(var(--wofy-border)); border-radius: var(--radius-lg); }
.ll-filas { list-style: none; margin: 0; padding: 0; }
.ll-cab, .ll-fila { display: grid; gap: 8px 24px; padding: 14px 16px; }
.ll-cab .ll-nw { white-space: nowrap; }
.ll-cab { display: none; padding-top: 10px; padding-bottom: 10px; font-size: var(--text-xs); color: rgb(var(--wofy-text-2)); border-bottom: 1px solid rgb(var(--wofy-border)); }
.ll-fila + .ll-fila { border-top: 1px solid rgb(var(--wofy-border)); }
.ll-quien { min-width: 0; }
.ll-nombre { font-size: var(--text-base); font-weight: 600; color: rgb(var(--wofy-primary)); text-decoration: none; }
.ll-nombre:hover { color: rgb(var(--wofy-accent-ink)); text-decoration: underline; text-underline-offset: 2px; }
.ll-lugar { display: block; margin-top: 2px; font-size: var(--text-xs); color: rgb(var(--wofy-muted)); }
.ll-nuevo { margin-left: 6px; vertical-align: 2px; }
.ll-sub { font-size: var(--text-xs); color: rgb(var(--wofy-text-2)); }
.ll-tel { display: flex; flex-wrap: wrap; align-content: start; gap: 8px; }
.ll-telefono svg { width: 16px; height: 16px; flex-shrink: 0; }
.ll-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ll-acciones form { margin: 0; }
.ll-etq { font-size: var(--text-xs); color: rgb(var(--wofy-muted)); }
.ll-vistas { border-bottom: 0; }
.ll-cp { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; max-width: 100%; }
.ll-cp .field { width: 10rem; min-width: 0; }
.ll-cp .ll-campo-lugar { width: 14rem; max-width: 100%; }
@media (min-width: 1000px) {
  .ll-cab, .ll-fila { grid-template-columns: minmax(0, 1fr) 10.5rem 7rem 6.5rem 6rem 6rem 13rem; align-items: start; gap: 8px 16px; }
  .ll-hoy .ll-cab, .ll-hoy .ll-fila { grid-template-columns: minmax(0, 1fr) 10.5rem 7rem 6.5rem 6rem 6rem 19rem; }
  .ll-cab { display: grid; }
  .ll-etq { display: none; }
  .ll-acciones { justify-content: flex-end; flex-wrap: nowrap; }
}
@media (max-width: 999px) {
  /* Tarjeta (lote 9.5; 10.16 sin alquiler): nombre y teléfono a lo ancho; Booking, Google, zona y habitaciones a medias. */
  .ll-fila { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px 12px; }
  .ll-quien, .ll-tel, .ll-acciones { grid-column: span 6; }
  .ll-booking, .ll-google, .ll-zona, .ll-hab { grid-column: span 3; }
  .ll-google, .ll-zona, .ll-hab { display: grid; align-content: start; gap: 2px; font-size: var(--text-sm); }
}

/* Fuente de las cifras (William, 23 nov 2026): la fuente en texto llano, una vez por columna o bloque; solo se destaca una mejor */
.fuente { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-xs); font-weight: 400; color: rgb(var(--wofy-muted)); }
.fuente-mejor { padding: 1px 8px; border-radius: 9999px; font-weight: 600; background: rgb(var(--wofy-success-bg)); color: rgb(var(--wofy-success)); }
.fuente svg, .fuente-retorno svg { width: 12px; height: 12px; flex-shrink: 0; }
.titulo-retorno { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fuente-retorno { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: var(--radius-sm); font-size: var(--text-xs); font-weight: 600;
  line-height: 1.4; letter-spacing: .01em; background: rgb(var(--wofy-surface-2)); color: rgb(var(--wofy-text-2)); border: 1px solid rgb(var(--wofy-border)); white-space: nowrap; }
.fuente-retorno-ezequiel { background: rgb(var(--wofy-info-bg)); color: rgb(var(--wofy-info)); border-color: rgb(var(--wofy-info) / .35); }
.fuente-retorno-pms { background: rgb(var(--wofy-success-bg)); color: rgb(var(--wofy-success)); border-color: rgb(var(--wofy-success) / .45); }
.cifra-detalle { flex-basis: 100%; color: rgb(var(--wofy-text-2)); }
.dir-retorno { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; font-size: var(--text-xs); color: rgb(var(--wofy-text-2)); }
.dir-retorno .titulo-retorno { font-size: var(--text-sm); font-weight: 600; color: rgb(var(--wofy-text)); }
.dir-retorno > span:last-child { flex: 1 1 32rem; }

@media (min-width: 1100px) {
}
.retorno-cabecera .panel-title { margin: 0; }

/* Flujo de oportunidades sin chips de fiabilidad (William, 23 nov 2026): el EBITDA dice sus euros y de dónde salen ingresos y costes */
.ebitda-fuente { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-top: 6px !important; font-size: var(--text-sm); }
.ui-table td.num [data-fuente-fila] { display: block; }

/* Costes por defecto (/costes; 23 nov 2026): una tabla limpia por tipo; lo cambiado se marca, el ejemplo va al pie en gris */
.cb-pagina { gap: 16px; max-width: 64rem; margin: 0 auto; overflow-wrap: anywhere; }
.cb-confirmar { border: 2px solid rgb(var(--wofy-warn)); }
.cb-tipo { padding-bottom: 8px; }
.cb-lista { list-style: none; margin: 0; padding: 0; }
.cb-cab, .cb-form { display: grid; gap: 8px 12px; align-items: center; grid-template-columns: minmax(0, 1fr); }
.cb-cab { display: none; padding: 0 0 6px; font-size: var(--text-xs); font-weight: 600; color: rgb(var(--wofy-muted)); border-bottom: 1px solid rgb(var(--wofy-border)); }
.cb-fila { padding: 8px 0; border-bottom: 1px solid rgb(var(--wofy-border)); }
.cb-fila:last-child { border-bottom: 0; }
.cb-partida { font-size: var(--text-sm); font-weight: 600; color: rgb(var(--wofy-text)); }
.cb-cambio { font-weight: 500; color: rgb(var(--wofy-info)); }
.cb-unidad { font-size: var(--text-sm); color: rgb(var(--wofy-text-2)); }
.cb-valor { text-align: right; }
.cb-meta { margin: 4px 0 0; font-size: var(--text-xs); color: rgb(var(--wofy-muted)); }
.cb-inline { display: inline; }
.cb-enlace { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.cb-ejemplo { margin: 8px 0 0; font-size: var(--text-xs); color: rgb(var(--wofy-muted)); }
@media (min-width: 640px) {
  .cb-cab, .cb-form { grid-template-columns: minmax(0, 1fr) 13rem 7rem auto; }
  .cb-cab { display: grid; }
  .cb-cab .num { text-align: right; }
}
@media (min-width: 900px) {
  .costes th:nth-child(2) { width: 13rem; } .costes th:nth-child(3) { width: 8rem; } .costes th:nth-child(4) { width: 9rem; }
  .pliegues { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
}
.pliegues { display: grid; gap: 16px; }
details.plegado.cita-plegada > summary { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 4px; font-weight: 400; color: rgb(var(--wofy-text-2)); }
details.plegado.cita-plegada > summary::before { content: none; }
.cita-inicio { padding-left: 12px; border-left: 3px solid rgb(var(--wofy-border-strong)); }
.cita-plegada[open] > summary .cita-inicio { display: none; }
.cita-plegada[open] > summary .enlace { display: none; }
@media (max-width: 759px) {
  .datos-base { display: grid; gap: 6px; }
  .datos-base div { display: grid; grid-template-columns: 8rem minmax(0, 1fr); column-gap: 10px; }
  .datos-base div > dd { grid-column: 2; }
}
.datos-base dd.sub { font-weight: 400; color: rgb(var(--wofy-text-2)); }

/* Etiqueta del EBITDA de una oportunidad (William, 23 nov 2026): neutra salvo «Wofy», que lleva el color de su franja con icono */
.etq-ebitda { display: inline-flex; flex: none; align-items: center; gap: 3px; padding: 1px 7px; border-radius: var(--radius-sm); font-size: var(--text-xs);
  font-weight: 600; line-height: 1.5; white-space: nowrap; vertical-align: 1px; background: rgb(var(--wofy-surface-2)); color: rgb(var(--wofy-text-2));
  border: 1px solid rgb(var(--wofy-border)); }
.etq-ebitda svg { width: 12px; height: 12px; }
.etq-no_calculable { background: transparent; color: rgb(var(--wofy-muted)); border-style: dashed; }
.etq-wofy.etq-alto { background: rgb(var(--wofy-success-bg)); color: rgb(var(--wofy-success)); border-color: rgb(var(--wofy-success) / .45); }
.etq-wofy.etq-medio { background: rgb(var(--wofy-warn-bg)); color: rgb(var(--wofy-warn)); border-color: rgb(var(--wofy-warn) / .45); }
.etq-wofy.etq-bajo { background: rgb(var(--wofy-danger-bg)); color: rgb(var(--wofy-danger)); border-color: rgb(var(--wofy-danger) / .45); }
.ebitda-celda { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* Lote 8.3: Directorio más simple, cobertura («De dónde salen los datos») */
.dir-que { margin: 4px 0 0; font-size: var(--text-sm); color: rgb(var(--wofy-text)); max-width: 72rem; }
.filtros-directorio { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .filtros-directorio { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .filtros-directorio { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr); } }
.filtros-mas { grid-column: 1 / -1; }
.filtros-mas > summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: var(--target); font-size: var(--text-sm); font-weight: 600; color: rgb(var(--wofy-primary)); }
@media (pointer: fine) { .filtros-mas > summary { min-height: 0; } }
.filtros-mas-cuerpo { display: grid; gap: 12px; margin-top: 8px; grid-template-columns: minmax(0, 1fr); align-items: end; }
@media (min-width: 640px) { .filtros-mas-cuerpo { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .filtros-mas-cuerpo { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cob-titulo { margin: 8px 0 0; font-size: var(--text-base); font-weight: 600; color: rgb(var(--wofy-primary)); }
/* Lote 9.2: lista «Primero» (ciudades en foco) */
.foco { display: grid; gap: 8px; max-width: 28rem; }
.foco-lista { margin: 0; padding: 0; list-style: none; border: 1px solid rgb(var(--wofy-border)); border-radius: var(--radius-md); background: rgb(var(--wofy-surface)); }
.foco-fila { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 0 12px; font-size: var(--text-sm); }
.foco-fila + .foco-fila { border-top: 1px solid rgb(var(--wofy-border)); }
.foco-nombre { min-width: 0; overflow-wrap: anywhere; color: rgb(var(--wofy-text)); font-weight: 500; }
.foco-acciones { display: inline-flex; flex-shrink: 0; }
.foco-acciones form { margin: 0; }
.foco-anadir { display: flex; gap: 8px; margin: 0; }
.foco-anadir .field { flex: 1; min-width: 0; }
.ll-booking { display: grid; align-content: start; gap: 2px; font-size: var(--text-sm); }
.ficha-detalle-calculo { margin-top: 12px; }
.ficha-detalle-calculo > summary { cursor: pointer; font-size: var(--text-sm); font-weight: 600; color: rgb(var(--wofy-primary)); min-height: var(--target); display: inline-flex; align-items: center; }
@media (pointer: fine) { .ficha-detalle-calculo > summary { min-height: 0; } }
.filtros-mas > summary svg { width: 16px; height: 16px; }
.filtros-mas > summary .text-wofy-muted { font-weight: 400; }
.ui-table td[data-label="Booking"] { min-width: 13rem; }
@media (max-width: 639px) { .filtros-mas > summary .text-wofy-muted { display: none; } }

/* Marca discreta de un dato calculado y no oficial (Habitaciones = plazas ÷ 2): el asterisco con la fórmula en title y una nota al pie. */
.ui-table .marca-calculado { margin-left: 2px; font-weight: 600; color: rgb(var(--wofy-text-2)); cursor: help; }
.ui-table .marca-calculado:focus-visible { outline: 2px solid rgb(var(--wofy-accent)); outline-offset: 2px; border-radius: 2px; }

/* Lote 9.16 · facturación esperada en tres cifras (INE, optimista, muy optimista) y el alquiler; sin color ni veredicto. */
.fact { display: grid; gap: 8px 16px; margin: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fact:has(.fact-alquiler) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .fact:has(.fact-alquiler) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fact > div { min-width: 0; }
.fact dt { font-size: var(--text-xs); font-weight: 600; color: rgb(var(--wofy-muted)); }
.fact .fact-mas { font-weight: 400; white-space: nowrap; }
.fact dd { margin: 0; font-size: 18px; line-height: 1.25; font-weight: 600; color: rgb(var(--wofy-text)); overflow-wrap: anywhere; }
.fact .fact-ine dd { font-weight: 700; }
@media (min-width: 640px) { .fact dd { font-size: 20px; } }
.fact .fact-alquiler { padding-left: 12px; border-left: 1px solid rgb(var(--wofy-border)); }
.fact-fila-ine { font-weight: 600; }
.bl-buscar { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.bl-extra > summary { cursor: pointer; font-size: var(--text-xs); color: rgb(var(--wofy-text-2)); min-height: var(--target); display: inline-flex; align-items: center; }
@media (pointer: fine) { .bl-extra > summary { min-height: 0; } }
.bl-extra[open] { display: flex; flex-direction: column; gap: 4px; }
@media (min-width: 1100px) { .filtros-directorio { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1fr); } }

/* Ronda 9 · 9.15b: cola de revisión de Booking (un caso por panel; candidatas en filas; «No es ninguno» plegado). */
.revision-caso { display: flex; flex-direction: column; gap: 8px; }
.revision-cabecera { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 4px 12px; }
.revision-cabecera > div { min-width: 0; overflow-wrap: anywhere; }
.revision-candidatos { list-style: none; margin: 0; padding: 0; }
.revision-candidatos > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 8px 0; border-top: 1px solid rgb(var(--wofy-border)); }
.revision-candidatos > li > div { min-width: 0; flex: 1 1 16rem; overflow-wrap: anywhere; }
.revision-candidatos .sub { display: block; }
.revision-ninguno > .fila { padding-top: 6px; }
.revision-caso > .htmx-indicator { display: none; }
.revision-caso.htmx-request > .htmx-indicator { display: inline-block; }

/* Lote 9.8 · Cobertura: mapa de casillas por provincia (más oscura cuanto más leída, con su % escrito), interruptor
   Booking / Google, municipios de la provincia con su estado en la cola y «Poner delante». */
.cob-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.cob-fuente { display: inline-flex; padding: 2px; border: 1px solid rgb(var(--wofy-border-strong)); border-radius: var(--radius-md); background: rgb(var(--wofy-surface)); }
.cob-fuente a { display: inline-flex; align-items: center; min-height: var(--target); padding: 0 14px; border-radius: var(--radius-sm);
  font-size: var(--text-sm); font-weight: 500; color: rgb(var(--wofy-text-2)); text-decoration: none; }
@media (pointer: fine) { .cob-fuente a { min-height: var(--target-fine); } }
.cob-fuente a:hover { color: rgb(var(--wofy-text)); background: rgb(var(--wofy-surface-2)); }
.cob-fuente a[aria-current="page"] { background: rgb(var(--wofy-accent-soft)); color: rgb(var(--wofy-text)); font-weight: 600; box-shadow: inset 0 0 0 1px rgb(var(--wofy-accent-ink)); }
.cob-fuente a:focus-visible, .casilla:focus-visible { outline: 2px solid rgb(var(--wofy-ring)); outline-offset: 2px; }
.cob-layout { display: grid; gap: 24px; align-items: start; }
@media (min-width: 1100px) { .cob-layout { grid-template-columns: minmax(0, 760px) minmax(0, 1fr); } }
.cob-mapa-bloque { display: grid; gap: 8px; }
.cob-total { margin: 0; font-size: var(--text-sm); color: rgb(var(--wofy-text-2)); }
.cob-total .tabular { font-size: var(--text-cifra); font-weight: 700; color: rgb(var(--wofy-primary)); }
.cob-mapa { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-template-rows: repeat(var(--filas), auto);
  gap: 3px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .cob-mapa { gap: 4px; } }
.casilla { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; aspect-ratio: 1;
  min-width: 0; padding: 2px; border: 1px solid rgb(var(--wofy-border)); border-radius: var(--radius-sm); text-align: center;
  font-size: var(--text-xs); line-height: 1.15; text-decoration: none; color: rgb(var(--wofy-text)); overflow: hidden; }
a.casilla:hover { border-color: rgb(var(--wofy-border-strong)); }
.casilla[aria-current="true"] { outline: 2px solid rgb(var(--wofy-primary)); outline-offset: 1px; }
.casilla-vacia { border-style: dashed; color: rgb(var(--wofy-muted)); }
.casilla-nombre { display: none; font-weight: 500; overflow-wrap: anywhere; hyphens: auto; }
.casilla-abrev { font-weight: 600; }
.casilla-pct { font-weight: 700; }
.casilla-signo { display: none; }
@media (min-width: 640px) {
  .casilla-nombre { display: block; }
  .casilla-abrev { display: none; }
  .casilla-signo { display: inline; }
}
:is(.casilla, .cob-leyenda i)[data-nivel="0"] { background: rgb(var(--wofy-surface)); }
:is(.casilla, .cob-leyenda i)[data-nivel="1"] { background: rgb(var(--wofy-accent) / .16); }
:is(.casilla, .cob-leyenda i)[data-nivel="2"] { background: rgb(var(--wofy-accent) / .38); }
:is(.casilla, .cob-leyenda i)[data-nivel="3"] { background: rgb(var(--wofy-accent) / .72); color: rgb(var(--wofy-on-accent)); }
:is(.casilla, .cob-leyenda i)[data-nivel="4"] { background: rgb(var(--wofy-accent)); color: rgb(var(--wofy-on-accent)); }
.cob-leyenda { display: flex; align-items: center; gap: 4px; font-size: var(--text-xs); color: rgb(var(--wofy-muted)); }
.cob-leyenda i { display: inline-block; width: 22px; height: 12px; border: 1px solid rgb(var(--wofy-border)); border-radius: 3px; }
.cob-leyenda span:first-child { margin-right: 2px; }
.cob-leyenda span:last-child { margin-left: 2px; }
.cob-lado { display: grid; gap: 24px; align-content: start; }
.cob-prov { display: grid; gap: 8px; scroll-margin-top: calc(var(--nav-h) + 8px); }
.cob-prov-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.cob-prov-cab .cob-titulo { margin: 0; }
.cob-delante { margin: 0; }
.cob-estado[data-estado="en_cola"] { color: rgb(var(--wofy-accent-ink)); font-weight: 600; }
.cob-estado[data-estado="sin_fecha"] { color: rgb(var(--wofy-muted)); }
.cob-mas > summary { cursor: pointer; display: inline-flex; align-items: center; min-height: var(--target); font-size: var(--text-sm); font-weight: 600; color: rgb(var(--wofy-primary)); }
@media (pointer: fine) { .cob-mas > summary { min-height: 0; padding: 6px 0; } }
.cob-mas[open] > summary { margin-bottom: 8px; }
.cob-prov .ui-table .titulo { overflow-wrap: break-word; }
.cob-prov .ui-table td[data-label="Booking"] { min-width: 0; white-space: nowrap; }
.cob-prov .ui-table td[data-acciones] { text-align: right; }
.cob-prov td[data-acciones] .btn { padding: 0 10px; white-space: nowrap; }
@media (max-width: 1099px) {
  .cob-prov .ui-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center; margin-bottom: 8px; padding: 6px 12px; }
  .cob-prov .ui-table td { grid-column: 1; grid-template-columns: auto minmax(0, 1fr); padding: 2px 0; text-align: left; }
  .cob-prov .ui-table td.num { text-align: left; }
  .cob-prov .ui-table td[data-titulo] { padding-top: 4px; }
  .cob-prov .ui-table td[data-acciones] { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
  .cob-prov .ui-table td[data-acciones]:empty { display: none; }
}

/* Lote 10.2 · Análisis Booking: la línea de actividad del índice, «A medias» y la cabecera del Directorio (fuente,
   «Con Booking» que filtra y el botón al mapa). */
.cob-actividad { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 4px 0 0; font-size: var(--text-sm); color: rgb(var(--wofy-text-2)); }
.cob-actividad > span + span::before { content: "·"; margin: 0 8px; color: rgb(var(--wofy-muted)); }
.cob-actividad strong { font-weight: 700; color: rgb(var(--wofy-text)); }
.cob-total-de { font-variant-numeric: tabular-nums; }
.cob-estado[data-estado="a_medias"] { color: rgb(var(--wofy-warn)); font-weight: 600; }
.dir-cabecera { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.dir-fuente { margin: 2px 0 0; font-size: var(--text-xs); color: rgb(var(--wofy-muted)); }
.dir-booking { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.dir-con-booking { display: inline-flex; align-items: baseline; gap: 6px; min-height: var(--target); color: rgb(var(--wofy-text-2));
  font-size: var(--text-sm); text-decoration: none; }
.dir-con-booking strong { font-size: var(--text-cifra); font-weight: 700; color: rgb(var(--wofy-primary)); font-variant-numeric: tabular-nums; }
/* La tabla de municipios gana «Con Booking»: el mapa cede sitio y «A medias · 20 de 483» puede partirse. */
@media (min-width: 1100px) { .cob-layout { grid-template-columns: minmax(0, 660px) minmax(0, 1fr); } }
.cob-prov .ui-table td[data-label="Booking"] { white-space: normal; }
/* Lote 10.17 · Directorio: «En Booking» (Todos · Sí · No) y «Ordenar por» con su botón de sentido, en la primera fila. */
.filtros-booking { margin: 0; padding: 0; border: 0; min-width: 0; }
.filtros-booking legend { padding: 0; }
.filtros-booking .si-no label:has(input:checked) { background: rgb(var(--wofy-accent)); color: rgb(var(--wofy-on-accent)); }  /* legible en claro y en oscuro */
.orden-control { display: flex; gap: 8px; align-items: stretch; min-width: 0; }
.orden-control .field { flex: 1 1 auto; min-width: 0; }
.orden-sentido { flex: 0 0 auto; white-space: nowrap; }
@media (min-width: 1100px) { .filtros-directorio { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.1fr) auto minmax(0, 1.3fr); } }

/* Lote 10.7 · Ficha del alojamiento: fuente arriba, teléfono como píldora, tres líneas de facturación (Wofy editable) y
   Explotación con su semáforo (el color siempre con su número). Cada bloque sin dato, abierto con su acción. */
.fc-pildoras { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), max-content)); align-items: end; }
.fc-tel { justify-content: flex-start; gap: 8px; }
.fc-tel-quien { font-weight: 600; overflow-wrap: anywhere; }
.fc-tel .fc-nota { margin-left: 0; }
.fc-anadir > summary.btn { min-height: var(--target); }
.fc-fuente { display: grid; gap: 12px; padding: 12px 16px; border-left: 3px solid rgb(var(--wofy-accent-ink)); background: rgb(var(--wofy-surface-2)); border-radius: var(--radius-md); }
.fc-fuente > h2 { margin: 0; }
.fuente { display: grid; gap: 8px; min-width: 0; }
.fuente + .fuente { padding-top: 12px; border-top: 1px solid rgb(var(--wofy-border)); }
.fuente-quien { margin: 0; font-weight: 700; color: rgb(var(--wofy-primary)); }
.fuente-texto { margin: 0; font-size: var(--text-sm); color: rgb(var(--wofy-text)); white-space: pre-line; overflow-wrap: anywhere; max-width: 72ch; }
.fuente-cifras { display: flex; flex-wrap: wrap; gap: 4px 28px; margin: 0; }
.fuente-cifras dt { font-size: var(--text-xs); color: rgb(var(--wofy-muted)); }
.fuente-cifras dd { margin: 0; font-weight: 600; color: rgb(var(--wofy-text)); }
.fl-tabla { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.fl-tabla thead th { padding: 0 8px 8px; font-size: var(--text-xs); font-weight: 600; color: rgb(var(--wofy-muted)); text-align: right; border-bottom: 1px solid rgb(var(--wofy-border)); }
.fl-tabla thead th:first-child { text-align: left; }
.fl-tabla tbody th { padding: 12px 8px 2px 0; text-align: left; font-weight: 600; color: rgb(var(--wofy-text)); vertical-align: top; }
.fl-tabla tbody td { padding: 12px 8px 2px; text-align: right; vertical-align: top; color: rgb(var(--wofy-text)); }
.fl-tabla .fl-explica td { padding: 0 8px 12px 0; text-align: left; border-bottom: 1px solid rgb(var(--wofy-border)); }
.fl-tabla tbody:last-child .fl-explica td { border-bottom: 0; }
.fl-explica, .fl-explica td { font-size: var(--text-xs); color: rgb(var(--wofy-text-2)); }
p.fl-explica { margin: 12px 0 0; }
.fl-fact { font-size: var(--text-base); font-weight: 700; color: rgb(var(--wofy-text)); }
.fl-sub { display: block; font-size: var(--text-xs); font-weight: 500; color: rgb(var(--wofy-text-2)); }
.fl-falta { display: block; font-size: var(--text-xs); font-weight: 600; color: rgb(var(--wofy-warn)); }
.fl-etq { display: inline-block; margin-top: 2px; padding: 1px 8px; border-radius: 999px; font-size: var(--text-xs); font-weight: 600;
  background: rgb(var(--wofy-surface-2)); color: rgb(var(--wofy-text-2)); }
.fl-etq-autor { background: rgb(var(--wofy-success-bg)); color: rgb(var(--wofy-success)); }
.fl-tabla tbody th .fl-etq { display: table; margin-top: 4px; }
.fl-wofy th, .fl-wofy td { background: rgb(var(--wofy-surface-2) / .55); }
.fl-wofy th { padding-left: 8px; }
.fl-campo { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; }
.fl-campo .field { width: 6.5rem; min-height: var(--target-fine); text-align: right; padding: 0 8px; }
.fl-unidad { font-size: var(--text-xs); color: rgb(var(--wofy-muted)); }
.fl-tabla .campo-error { justify-content: flex-end; text-align: right; }
.fl-orientativo p { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.fl-orientativo-etq { font-size: var(--text-sm); font-weight: 600; color: rgb(var(--wofy-primary)); }
@media (max-width: 759px) {
  .fl-tabla, .fl-tabla tbody, .fl-tabla tr, .fl-tabla th, .fl-tabla td { display: block; }
  .fl-tabla thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .fl-tabla tbody { padding: 12px 0; border-bottom: 1px solid rgb(var(--wofy-border)); }
  .fl-tabla tbody:last-child { border-bottom: 0; }
  .fl-tabla tbody > tr:first-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
  .fl-tabla tbody th { grid-column: 1 / -1; padding: 0; }
  .fl-tabla tbody td { padding: 0; text-align: left; }
  .fl-tabla tbody td::before { content: attr(data-label); display: block; font-size: var(--text-xs); color: rgb(var(--wofy-muted)); }
  .fl-tabla .fl-explica td { padding: 8px 0 0; border: 0; }
  .fl-tabla .fl-explica td::before { content: none; }
  .fl-tabla .fl-total { grid-column: 1 / -1; }
  .fl-campo { justify-content: flex-start; }
  .fl-campo .field { width: 100%; min-height: var(--target); text-align: left; }
  .fl-tabla .campo-error { justify-content: flex-start; text-align: left; }
  .fl-wofy { margin: 0 -12px; padding: 12px !important; border-radius: var(--radius-md); background: rgb(var(--wofy-surface-2) / .55); }
  .fl-wofy th, .fl-wofy td { background: transparent; }
}
.ex-filas { display: grid; gap: 0; margin: 0; }
.ex-fila { display: grid; grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr); gap: 4px 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgb(var(--wofy-border)); }
.ex-fila:last-child { border-bottom: 0; }
.ex-fila dt { font-size: var(--text-sm); font-weight: 600; color: rgb(var(--wofy-text)); }
.ex-fila dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.ex-fila dd .campo-error { flex-basis: 100%; margin: 0; }
.ex-campo .field { width: 9rem; }
.ex-cifra { font-size: var(--text-base); font-weight: 700; color: rgb(var(--wofy-text)); min-width: 6.5rem; }
@media (max-width: 479px) { .ex-fila { grid-template-columns: minmax(0, 1fr); } .ex-campo .field { width: 100%; } .ex-campo { flex: 1 1 100%; } }
.dialogo-ancho { width: min(46rem, calc(100vw - 32px)); }
/* Diálogo «Costes de explotación» (aceptación de la ronda 10, Beto M3): una partida por línea, sin tabla; en el móvil, una
   columna corta (nombre e importe arriba, valor y unidad debajo) y «General» para volver al valor de /costes. */
.ex-partidas { list-style: none; margin: 0 0 12px; padding: 0; display: grid; }
.ex-partida { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 8px 0;
  border-bottom: 1px solid rgb(var(--wofy-border)); }
.ex-partida-nombre { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; min-width: 0; }
.ex-partida-nombre label { font-weight: 600; font-size: var(--text-sm); }
.ex-partida-al-ano { font-size: var(--text-sm); }
.ex-partida-valor { display: flex; gap: 6px; align-items: center; }
.ex-partida-valor input.field { width: 5.5rem; min-height: var(--target-fine); text-align: right; }
.ex-partida-valor select.field { width: auto; min-height: var(--target-fine); }
.ex-partida-general { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
@media (max-width: 479px) {
  .ex-partida { grid-template-columns: minmax(0, 1fr); padding: 6px 0; }
  .ex-partida-valor input.field { flex: 1 1 auto; width: auto; min-width: 0; }
}
.ficha-hueco .panel-title { margin-bottom: 0; }
.ficha-hueco { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.ficha-hueco > p { margin: 0 !important; }

/* Ficha de una oportunidad (ronda 10, lote 10.11): la etapa y su único botón principal arriba; después, la ficha del alojamiento. */
.ficha-op { display: grid; gap: 16px; }
.ficha-op > * { min-width: 0; }
.op-etapa { display: grid; gap: 12px; }
.op-volver { justify-self: start; }
.op-etapa-fila { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.op-estado { display: grid; gap: 4px; min-width: 0; }
.op-estado .kicker { margin: 0; color: rgb(var(--wofy-accent-ink)); }
.op-que { margin: 0; font-size: var(--text-base); font-weight: 600; color: rgb(var(--wofy-text)); overflow-wrap: anywhere; }
.op-que svg { width: 16px; height: 16px; vertical-align: -3px; }
.op-botones { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.op-botones form { margin: 0; }
@media (max-width: 639px) {
  .op-botones { width: 100%; }
  .op-botones > .btn-primary, .op-botones > form:has(.btn-primary) { flex: 1 1 100%; }
  .op-botones > form:has(.btn-primary) .btn { width: 100%; }
  .op-botones > .btn-primary { justify-content: center; }
}
.op-paso { display: grid; gap: 12px; }
.op-paso .panel-title { margin: 0; }
.op-url { display: grid; gap: 6px; }
.op-propuesta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0; }
.op-linea { margin: 0; font-size: var(--text-sm); color: rgb(var(--wofy-text-2)); }
#ezequiel { display: grid; gap: 12px; }
#ezequiel .panel-title { margin: 0; }
.op-cuentas .panel { border: 0; padding: 0; box-shadow: none; background: transparent; }
/* Lote 10.20: orden y filtro de la pestaña Inmobiliaria; en móvil cada control a todo el ancho. */
.embudo-orden .orden-control { flex: 1 1 18rem; }
@media (max-width: 639px) { .embudo-orden .ll-campo-lugar, .embudo-orden .field { width: 100%; } }

/* Arreglos de la aceptación de Lucía (ronda 10, lote 10.19): la lista se usa en el móvil. Filtros en una línea (lo demás en
 * «Filtros»), tarjetas compactas (3-4 por pantalla), Booking y Google como botones de 44 px, acciones con borde y a lo
 * ancho, aviso breve con «Deshacer» y la fila siguiente a la vista bajo la barra fija. */
.ll-fila { scroll-margin-top: calc(var(--nav-h) + 12px); }
.ll-cp { flex-direction: column; align-items: stretch; gap: 8px; }
.ll-linea { display: flex; gap: 8px; min-width: 0; }
.ll-linea .ll-campo-lugar { flex: 1 1 auto; min-width: 0; width: auto; }
.ll-buscar svg { width: 18px; height: 18px; }
.ll-filtros > summary { list-style: none; }
.ll-filtros > summary::-webkit-details-marker { display: none; }
.ll-filtros-cuerpo { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
.ll-filtros-cuerpo .field { flex: 1 1 8rem; min-width: 0; width: auto; }
.ll-portal { display: inline-flex; align-items: center; gap: 4px; min-height: var(--target); padding: 0 12px; border: 1px solid rgb(var(--wofy-border-strong)); border-radius: var(--radius-md);
  color: rgb(var(--wofy-primary)); font-weight: 600; text-decoration: none; white-space: nowrap; background: rgb(var(--wofy-surface)); }
.ll-portal:hover { background: rgb(var(--wofy-accent-soft)); border-color: rgb(var(--wofy-accent-ink)); }
.ll-portal:focus-visible { outline: 2px solid rgb(var(--wofy-accent-ink)); outline-offset: 2px; }
.ll-portal-nombre { font-weight: 500; color: rgb(var(--wofy-text-2)); }
.ll-acciones { gap: 8px 12px; }
.ll-aviso { position: fixed; z-index: 60; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 32px); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 8px 8px 8px 16px;
  border-radius: var(--radius-md); background: rgb(var(--wofy-surface)); color: rgb(var(--wofy-text)); border: 1px solid rgb(var(--wofy-border-strong));
  box-shadow: var(--shadow-lg); font-size: var(--text-sm); }
.ll-aviso form { margin: 0; }
.ll-aviso .ll-deshacer svg { width: 16px; height: 16px; }
.ll-aviso[hidden] { display: none; }
@media (min-width: 1000px) {
  .ll-cp { flex-direction: row; align-items: center; }
  .ll-linea .ll-campo-lugar { width: 14rem; }
  .ll-filtros > summary { display: none; }
  .ll-filtros-cuerpo { padding-top: 0; flex-wrap: nowrap; }
  .ll-filtros-cuerpo .field { width: 10rem; flex: 0 0 auto; }
  .ll-portal { min-height: 0; padding: 2px 0; border: 0; background: transparent; }
  .ll-portal:hover { text-decoration: underline; }
  .ll-portal-nombre { display: none; }
  .ll-salto { display: none; }
}
@media (max-width: 999px) {
  .ll-cp { width: 100%; margin-left: 0; }
  .ll-buscar-texto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .ll-buscar { padding: 0; width: var(--target); flex: 0 0 auto; }
  .ll-filtros-boton { min-height: var(--target); padding: 0 8px; font-size: var(--text-sm); }
  /* «Filtros» en la misma línea que el lugar (a la derecha); lo que pliega cae debajo al abrirlo. */
  .ll-cp { position: relative; }
  .ll-linea { padding-right: 92px; }
  .ll-filtros > summary { position: absolute; top: 0; right: 0; }
  .ll-cabecera-movil { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .ll-cab, .ll-fila { padding: 12px; }
  /* Tarjeta compacta: nombre; teléfono, Booking y Google en una línea (si caben); zona y habitaciones en una línea pequeña. */
  .ll-fila { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .ll-quien, .ll-acciones { flex: 1 1 100%; }
  .ll-tel, .ll-booking, .ll-google { flex: 0 0 auto; display: flex; align-items: center; }
  .ll-booking > span, .ll-google > span { font-size: var(--text-sm); }
  .ll-vacio, .ll-booking:has(> .gris) { display: none !important; }
  .ll-salto { flex: 1 1 100%; height: 0; }
  .ll-zona, .ll-hab { display: inline-flex; gap: 4px; align-items: baseline; font-size: var(--text-xs); color: rgb(var(--wofy-text-2)); }
  .ll-luz { flex: 1 1 100%; }
  .ll-acciones form { flex: 1 1 0; }
  .ll-acciones .btn { width: 100%; padding: 0 8px; }
}
.ll-orden { min-width: 0; flex: 1 1 16rem; }

/* ── Pasada de diseño (ronda 10, lote 10.21) ────────────────────────────────────────────────────────────────────────────
 * Solo presentación. En el móvil: un botón principal por fila (el teléfono en Llamar), objetivos de 44 px y nada que se
 * estire; en escritorio: filas alineadas al centro y las acciones de la ficha arriba a la derecha. */

/* Llamar: la fila de escritorio, centrada en vertical (los números ya no quedan por encima de los botones) */
@media (min-width: 1000px) { .ll-fila { align-items: center; } }
@media (max-width: 999px) {
  /* Lo que se espera de Lucía, lo primero y a lo ancho: llamar. Booking y Google, a medias debajo; nunca uno suelto en su línea. */
  .ll-tel { flex: 1 1 100%; }
  .ll-telefono { flex: 1 1 100%; min-height: 48px; font-size: var(--text-base); font-weight: 600; background: rgb(var(--wofy-accent));
    color: rgb(var(--wofy-on-accent)); border-color: rgb(var(--wofy-accent)); }
  .ll-telefono:hover:not(:disabled) { background: rgb(var(--wofy-accent-hover)); border-color: rgb(var(--wofy-accent-hover)); color: rgb(var(--wofy-on-accent)); }
  .ll-telefono svg { width: 18px; height: 18px; }
  .ll-booking, .ll-google { flex: 0 1 calc(50% - 4px); min-width: 0; }
  .ll-booking > .ll-portal, .ll-google > .ll-portal { width: 100%; justify-content: center; }
  /* «Filtros» parece un botón */
  .ll-filtros-boton { border: 1.5px solid rgb(var(--wofy-border-strong)); background: rgb(var(--wofy-surface)); color: rgb(var(--wofy-text)); padding: 0 14px; }
  .ll-filtros[open] > .ll-filtros-boton { background: rgb(var(--wofy-accent-soft)); border-color: rgb(var(--wofy-accent-ink)); }
  /* El aviso con «Deshacer», a lo ancho sobre el pulgar */
  .ll-aviso { width: calc(100vw - 24px); justify-content: space-between; }
}

/* Portada: con la columna del móvil, el «flex-basis: 18rem» del orden se volvía altura (un selector de 290 px) */
@media (max-width: 999px) { .embudo-orden .orden-control { flex: 0 0 auto; } }

/* Tablas que pasan a tarjetas: la facturación INE, la cifra que se busca, justo bajo el nombre y más grande */
@media (max-width: 1099px) {
  .ui-table tbody tr:has(> td[data-label="Facturación INE"]) { display: flex; flex-direction: column; }
  .ui-table tbody tr:has(> td[data-label="Facturación INE"]) > td { order: 2; }
  .ui-table tbody tr:has(> td[data-label="Facturación INE"]) > td[data-titulo] { order: 0; }
  .ui-table tbody tr:has(> td[data-label="Facturación INE"]) > td[data-label="Facturación INE"] { order: 1; font-size: var(--text-base); font-weight: 700; }
}

/* Ficha del alojamiento: en el móvil la nota de Booking o Google baja entera bajo «Ver en …» (sin la raya suelta delante) */
@media (max-width: 639px) {
  .fc-portal a.btn-grande:not(.fc-tel) .fc-nota { flex-basis: 100%; margin: 0; padding: 0; border: 0; font-size: var(--text-sm); }
}
/* En escritorio, «Me interesa» y «Archivar» arriba a la derecha, junto al nombre: sin una línea muerta al pie de la cabecera */
@media (min-width: 1100px) {
  .ficha-cabecera { position: relative; }
  .ficha-cabecera > .fc-acciones { position: absolute; top: 16px; right: 16px; }
  .ficha-cabecera:has(> .fc-acciones) > .fc-quien { padding-right: 16rem; }
}

/* Campos a 16 px en el teléfono: con menos, Safari amplía la página al tocar un campo y deja la vista movida */
@media (max-width: 759px) { .field { font-size: 16px; } }
/* …y un campo de 16 px no ensancha su fila: la base del campo de lugar es 0 y crece, y nada de la pila empuja su ancho */
.pila > * { min-width: 0; }
.ll-linea .ll-campo-lugar { flex: 1 1 0; width: 0; }
@media (min-width: 1000px) { .ll-linea .ll-campo-lugar { flex: 0 0 14rem; width: 14rem; } }

/* Directorio: «Más filtros» a 44 px en el móvil (con ratón quedaba en 21 px) */
@media (max-width: 759px) { .filtros-mas > summary { min-height: var(--target); } }

/* Costes en el móvil: la unidad entera y, debajo, valor y «Guardar» en una línea (antes, cuatro filas por partida) */
@media (max-width: 639px) {
  .cb-form { grid-template-columns: minmax(0, 1fr) auto; }
  .cb-partida, .cb-form select { grid-column: 1 / -1; }
  .cb-form .btn { padding: 0 12px; }
  .cb-enlace { display: inline-flex; align-items: center; min-height: var(--target); }
}

/* Acceso: la misma marca y los mismos tokens que la app (claro y oscuro) */
body.login, body.login *, body.login *::before, body.login *::after { box-sizing: border-box; }  /* sin el preflight de Tailwind */
body.login { margin: 0; display: grid; place-items: center; padding: 24px 16px; }
.login-caja { width: 100%; max-width: 24rem; display: grid; gap: 24px; }
.login-marca { display: flex; justify-content: center; }
.login-logo { height: 32px; width: auto; }
.login-panel { padding: 28px 24px; box-shadow: var(--shadow-sm); }
.login-titulo { margin: 0 0 20px; text-align: center; font-size: 18px; font-weight: 700; color: rgb(var(--wofy-primary)); }
.login-error { margin-bottom: 16px; padding: 10px 12px; border-radius: var(--radius-md); background: rgb(var(--wofy-danger-bg)); color: rgb(var(--wofy-danger));
  border: 1px solid rgb(var(--wofy-danger) / .35); font-size: var(--text-sm); font-weight: 500; }
.login-form { display: grid; gap: 16px; }
.login-form .field { min-height: 48px; font-size: 16px; }  /* 16 px: iOS no amplía la página al tocar el campo */
.btn-ancho { width: 100%; min-height: 48px; font-size: var(--text-base); }

/* ── Lote 10.22 · Directorio en el móvil ─────────────────────────────────────────────────────────────────────────────────
 * Como la lista de Lucía (lote 10.19): una línea visible (nombre y buscar) y el resto en «Filtros», que dice cuántos hay
 * aplicados; desde 1000 px todo a la vista (ui.js abre el <details data-abierto-en-ancho>). */
.filtros-directorio { grid-template-columns: minmax(0, 1fr); }
.dir-pagina { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.dir-cp { position: relative; display: grid; gap: 8px; min-width: 0; }
.dir-linea { display: flex; align-items: flex-end; gap: 8px; min-width: 0; }
.dir-nombre { flex: 1 1 0; min-width: 0; }
.dir-buscar { flex: 0 0 auto; }
.dir-buscar svg { width: 18px; height: 18px; }
.dir-filtros > summary { list-style: none; cursor: pointer; }
.dir-filtros > summary::-webkit-details-marker { display: none; }
.dir-filtros-cuerpo { display: grid; gap: 12px; margin-top: 4px; grid-template-columns: minmax(0, 1fr); align-items: end; }
.dir-filtros-cuerpo > .filtros-tamano, .dir-filtros-cuerpo > .filtros-mas, .dir-filtros-cuerpo > .dir-acciones { grid-column: 1 / -1; }
.dir-filtros-cuerpo > * { min-width: 0; }
@media (min-width: 640px) { .dir-filtros-cuerpo { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) {
  .dir-nombre { flex: 0 1 28rem; }
  .dir-filtros > summary { display: none; }
  .dir-filtros-cuerpo { margin-top: 0; grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1fr) minmax(0, 1.3fr); }
  .dir-buscar-pie { display: none; }
}
@media (max-width: 999px) {
  /* «Filtros» en la misma línea (a la derecha); lo que pliega cae debajo al abrirlo. El nombre se anuncia por su marcador. */
  .dir-etq { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .dir-buscar { padding: 0; width: var(--target); }
  .dir-buscar-texto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .dir-linea { padding-right: 108px; }
  .dir-filtros > summary { position: absolute; top: 0; right: 0; min-height: var(--target); padding: 0 14px; font-size: var(--text-sm);
    border: 1.5px solid rgb(var(--wofy-border-strong)); background: rgb(var(--wofy-surface)); color: rgb(var(--wofy-text)); }
  .dir-filtros[open] > summary { background: rgb(var(--wofy-accent-soft)); border-color: rgb(var(--wofy-accent-ink)); }
}
/* La cabecera del Directorio en el móvil, en dos líneas: el título con «Configurar análisis Booking» y, debajo, los recuentos.
 * Así la primera tarjeta empieza en el primer tercio de la pantalla (sin «Fuente» ni el orden: el orden está en «Filtros»). */
@media (max-width: 759px) {
  .dir-cabecera { align-items: center; gap: 0 12px; }
  .dir-cabecera > div { display: contents; }
  .dir-cabecera h1 { order: 1; flex: 1 1 auto; }
  .dir-cabecera .dir-booking .btn { order: 2; min-height: var(--target); padding: 0 12px; font-size: var(--text-sm); }
  .dir-cabecera::after { content: ""; order: 2; flex-basis: 100%; height: 0; }
  .dir-cabecera [role="status"] { order: 3; margin: 0; }
  .dir-cabecera .dir-con-booking { order: 4; font-size: var(--text-sm); min-height: 0; gap: 4px; }
  .dir-cabecera .dir-con-booking strong { font-size: inherit; }
  .dir-cabecera .dir-ocultos { order: 5; margin: 0; }
  .dir-cabecera .dir-fuente, .dir-cabecera [role="status"] > span + span { display: none; }
  .filtros-directorio { padding: 12px; }
  .dir-pagina { gap: 12px; }
  .dir-cp { gap: 0; }
  .dir-filtros[open] > .dir-filtros-cuerpo { margin-top: 12px; }
}
