/* Umbral: estilo "centro de mando" (boceto v3). Gris carbón, líneas finas,
   Geist, lima solo en acciones. Colores de datos validados para daltonismo:
   verde #1FAA8A (beneficio/score), ámbar #C77C26 (avisos), violeta #8A7AF0 (alquiler). */

:root {
  --fondo: #181818;
  --panel: #1F1F1F;
  --panel-2: #232323;
  --campo: #262626;
  --linea: rgba(255, 255, 255, 0.09);
  --linea-suave: rgba(255, 255, 255, 0.06);
  --texto: #E8E8E8;
  --texto-fuerte: #FFFFFF;
  --texto-2: #BDBDBD;
  --texto-3: #9E9E9E;
  --apagado: #8A8A8A;
  --lima: #E5FF5D;
  --verde: #1FAA8A;
  --verde-texto: #6EE0B8;
  --ambar: #C77C26;
  --ambar-texto: #F0B170;
  --violeta: #8A7AF0;
  --violeta-texto: #B9AEFF;
  --rojo-texto: #F2877D;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--fondo); }
body { margin: 0; font-family: var(--sans); color: var(--texto); background: var(--fondo); font-size: 15px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--lima); outline-offset: 2px; }

/* --- Estructura --- */
.cabecera { height: 64px; display: flex; align-items: center; gap: 16px; padding: 0 clamp(16px, 6vw, 90px); border-bottom: 1px solid var(--linea); position: sticky; top: 0; z-index: 10; background: rgba(24, 24, 24, 0.92); backdrop-filter: blur(8px); }
.marca { font-family: var(--mono); font-size: 20px; font-weight: 500; letter-spacing: 0.12em; color: var(--texto-fuerte); }
.marca span { color: var(--lima); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; background: #202020; border-radius: 6px; padding: 6px; font-size: 12px; font-weight: 500; }
.nav a { padding: 10px 14px; border-radius: 4px; color: var(--texto-2); white-space: nowrap; }
.nav a:hover { color: var(--texto-fuerte); }
.nav a.cta, .nav a.cta:hover { color: #111; padding: 0 16px 0 7px; margin-left: 6px; }
.nav a.activo { background: rgba(255, 255, 255, 0.08); color: var(--texto-fuerte); }
.nav .contador { font-family: var(--mono); color: var(--ambar-texto); }
.marco { margin: 0 clamp(0px, 5vw, 90px); border-left: 1px solid var(--linea); border-right: 1px solid var(--linea); min-height: calc(100vh - 64px); }
.bloque { padding: 26px 24px; border-bottom: 1px solid var(--linea); }
.rejilla { display: grid; }
.rejilla > * { border-right: 1px solid var(--linea); }
.rejilla > *:last-child { border-right: none; }
.r2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.r3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.r4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.r-ficha { grid-template-columns: minmax(0, 1fr) 420px; }

/* --- Texto --- */
.titulo-xl { margin: 0; font-size: clamp(38px, 5vw, 64px); font-weight: 500; letter-spacing: -0.045em; line-height: 1; color: rgba(255, 255, 255, 0.92); }
.titulo { margin: 0; font-size: 30px; font-weight: 500; letter-spacing: -0.035em; color: var(--texto-fuerte); }
.titulo-s { margin: 0; font-size: 24px; font-weight: 500; letter-spacing: -0.035em; color: var(--texto-fuerte); }
.etiqueta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--apagado); text-transform: uppercase; }
.cifra { font-size: 44px; font-weight: 400; letter-spacing: -0.03em; color: var(--texto-2); }
.cifra-m { font-size: 26px; letter-spacing: -0.03em; color: var(--texto-2); }
.mono { font-family: var(--mono); }
.suave { color: var(--texto-3); }
.apagado { color: var(--apagado); }
.positivo { color: var(--verde-texto); }
.aviso-texto { color: var(--ambar-texto); }
.violeta-texto { color: var(--violeta-texto); }
.nota { font-size: 13px; color: var(--texto-3); margin: 0; }
.fuente-catastro { font-size: 11px; color: #6F6F6F; }

/* --- Botones y campos --- */
.cta { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 7px; border: none; border-radius: 4px; background: var(--lima); color: #111; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; cursor: pointer; transition: filter .2s ease; }
.cta:hover { filter: brightness(1.08); }
.cta .icono { width: 30px; height: 30px; border-radius: 3px; background: #111; display: flex; align-items: center; justify-content: center; }
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 14px; border: none; border-radius: 4px; background: var(--campo); color: var(--texto); font-size: 12px; font-weight: 500; letter-spacing: 0.02em; cursor: pointer; }
.boton:hover { background: #2E2E2E; }
.boton.peligro { color: var(--rojo-texto); }
.chip { height: 34px; padding: 0 14px; border-radius: 4px; border: none; background: transparent; color: var(--texto-3); font-size: 12px; font-weight: 500; letter-spacing: 0.02em; display: inline-flex; align-items: center; cursor: pointer; }
.chip:hover { color: var(--texto-fuerte); }
.chip.activo { background: rgba(255, 255, 255, 0.1); color: var(--texto-fuerte); }
.campo { height: 44px; padding: 0 14px; background: var(--campo); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 6px; color: var(--texto-fuerte); font-size: 15px; width: 100%; }
.campo:focus { outline: none; border-color: rgba(229, 255, 93, 0.6); }
.etiquetado { display: flex; flex-direction: column; gap: 6px; }
.buscador { display: flex; align-items: center; gap: 10px; height: 38px; width: 300px; max-width: 100%; padding: 0 12px; background: #202020; border-radius: 4px; color: var(--apagado); }
.buscador input { border: none; outline: none; background: transparent; flex-grow: 1; color: var(--texto); font-size: 13px; }

/* --- Tarjetas --- */
.tarjeta { background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.tarjeta.destacada { border-color: rgba(31, 170, 138, 0.55); }
.tarjeta.alquiler { border-color: rgba(138, 122, 240, 0.55); }
.tarjeta.ambar { border-color: rgba(199, 124, 38, 0.45); }
.caja { background: linear-gradient(180deg, #212121, #1B1B1B); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; }
.beneficio-caja { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 10px; background: rgba(31, 170, 138, 0.1); border: 1px solid rgba(31, 170, 138, 0.35); }

/* --- Lista de oportunidades --- */
.lista { border: 1px solid var(--linea); border-radius: 14px; overflow: hidden; background: linear-gradient(180deg, #1F1F1F, #1A1A1A); }
.lista-cabecera, .fila { display: grid; grid-template-columns: 76px minmax(0, 1fr) 150px 170px 170px 140px 44px; gap: 18px; align-items: center; }
.lista-cabecera { padding: 0 16px 10px; }
.fila { padding: 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); transition: background .25s ease; }
.fila:last-child { border-bottom: none; }
.fila:hover { background: rgba(255, 255, 255, 0.035); }
.fila:hover .ir { transform: translateX(3px); }
.fila.descartada { opacity: 0.5; }
.fila .nombre { font-size: 20px; letter-spacing: -0.02em; color: var(--texto-fuerte); }
.fila .detalle { font-size: 12px; color: var(--apagado); }
.fila .num { text-align: right; font-size: 20px; letter-spacing: -0.02em; color: var(--texto-3); }
.fila .num-l { text-align: right; font-size: 24px; letter-spacing: -0.03em; color: var(--texto); }
.ir { width: 30px; height: 30px; border-radius: 3px; background: #2A2A2A; display: flex; align-items: center; justify-content: center; justify-self: end; transition: transform .25s ease; }
.ir.lima { background: var(--lima); }
.vacio { padding: 48px 24px; text-align: center; color: var(--texto-3); }

/* --- Indicadores --- */
.arco { position: relative; display: inline-block; }
.arco .valor { position: absolute; left: 0; right: 0; bottom: -2px; text-align: center; font-size: 14px; font-weight: 500; color: var(--texto-fuerte); }
.arco-grande .valor { bottom: 8px; display: flex; flex-direction: column; align-items: center; }
.barra-pesos { display: flex; gap: 2px; height: 8px; }
.barra-pesos span { transform-origin: left center; animation: crecer 1.1s cubic-bezier(.2, .7, .2, 1) .5s both; }
.barra-progreso { position: relative; overflow: hidden; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); }
.barra-progreso .relleno { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--lima); transition: width .6s cubic-bezier(.2, .7, .2, 1); }
.barra-progreso .destello { position: absolute; top: 0; bottom: 0; width: 25%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent); animation: destello 1.3s ease-in-out infinite; }
.vivo { width: 7px; height: 7px; border-radius: 1px; background: var(--verde); display: inline-block; animation: parpadeo 1.6s ease-in-out infinite; }
.estado { font-size: 12px; color: var(--apagado); }
.estado.precario, .estado.pendiente_posesion { color: var(--ambar-texto); }
.estado.libre { color: var(--verde-texto); }

/* --- Tablas simples --- */
.lineas { display: flex; flex-direction: column; font-size: 14px; }
.lineas > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--linea-suave); }
.lineas > div:last-child { border-bottom: none; }
.tabla { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabla th { text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: 0.06em; color: #6F6F6F; padding: 8px 10px; border-bottom: 1px solid var(--linea); }
.tabla td { padding: 10px; border-bottom: 1px solid var(--linea-suave); }
.tabla td.num { text-align: right; font-family: var(--mono); }
.desplazable { overflow-x: auto; }

/* --- Avisos --- */
.aviso { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px; }
.aviso .punto { width: 34px; height: 34px; border-radius: 17px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--ambar); }
.aviso .punto.info { background: var(--violeta); }
.aviso .punto.ok { background: var(--verde); }
.mensaje { padding: 12px 16px; border-radius: 8px; font-size: 14px; }
.mensaje.ok { background: rgba(31, 170, 138, 0.12); border: 1px solid rgba(31, 170, 138, 0.35); color: var(--verde-texto); }
.mensaje.error { background: rgba(242, 135, 125, 0.1); border: 1px solid rgba(242, 135, 125, 0.35); color: var(--rojo-texto); }
.mensaje.aviso-m { background: rgba(199, 124, 38, 0.1); border: 1px solid rgba(199, 124, 38, 0.35); color: var(--ambar-texto); }

/* --- Lluvia de cifras de la cabecera --- */
.lluvia { position: absolute; inset: 0; display: flex; justify-content: space-around; font-family: var(--mono); font-size: 12px; line-height: 20px; color: rgba(229, 255, 93, 0.12); white-space: pre; pointer-events: none; overflow: hidden; }
.lluvia div { animation: lluvia 24s linear infinite; }
.lluvia div:nth-child(2n) { animation-duration: 31s; padding-top: 60px; }
.lluvia div:nth-child(3n) { animation-duration: 18s; }
.escaneo { position: absolute; left: 0; right: 0; height: 1px; background: var(--lima); box-shadow: 0 0 12px 2px rgba(229, 255, 93, 0.5); opacity: 0.6; animation: escaneo 3s linear infinite; }

/* --- Pasos de importación --- */
.paso { display: flex; align-items: center; gap: 14px; padding: 14px; animation: entrar .5s cubic-bezier(.2, .7, .2, 1) both; }
.paso .circulo { width: 38px; height: 38px; border-radius: 19px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #2A2A2A; }
.paso.hecho .circulo { background: var(--verde); }
.girando { animation: girar .9s linear infinite; transform-origin: center; }

/* --- Animaciones --- */
.entra { animation: subir .8s cubic-bezier(.2, .7, .2, 1) both; }
.e1 { animation-delay: .08s; } .e2 { animation-delay: .16s; } .e3 { animation-delay: .24s; } .e4 { animation-delay: .32s; } .e5 { animation-delay: .4s; } .e6 { animation-delay: .48s; }
.arco-anim { animation: arco 1.4s cubic-bezier(.2, .7, .2, 1) .5s both; }
.crece { transform-origin: left center; transform-box: fill-box; animation: crecer 1.1s cubic-bezier(.2, .7, .2, 1) .6s both; }
.cae { animation: caer .6s ease-out 1.2s both; } .cae2 { animation: caer .6s ease-out 1.45s both; }
@keyframes subir { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes entrar { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes crecer { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes arco { from { stroke-dashoffset: var(--longitud); } }
@keyframes caer { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes lluvia { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes escaneo { 0% { top: -4%; } 100% { top: 104%; } }
@keyframes destello { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
@keyframes parpadeo { 0%, 100% { opacity: .9; } 50% { opacity: .5; } }
@keyframes girar { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* --- Móvil --- */
@media (max-width: 900px) {
  .nav a:not(.activo):not(.cta) { display: none; }
  .r2, .r3, .r4, .r-ficha { grid-template-columns: minmax(0, 1fr); }
  .rejilla > * { border-right: none; border-bottom: 1px solid var(--linea); }
  .lista-cabecera { display: none; }
  .fila { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; }
  .fila .solo-escritorio { display: none; }
  .fila .num-l { font-size: 18px; }
  .cifra { font-size: 34px; }
}

/* --- Utilidades de composición --- */
.pila { display: flex; flex-direction: column; gap: 18px; }
.pila-s { display: flex; flex-direction: column; gap: 10px; }
.pila-xs { display: flex; flex-direction: column; gap: 3px; }
.crece-1 { flex-grow: 1; min-width: 0; }
.centrado { display: flex; align-items: center; justify-content: center; }
.separado { display: flex; justify-content: space-between; }
.acciones { display: flex; flex-wrap: wrap; gap: 8px; }
.der { text-align: right; }
.fuerte { color: var(--texto-fuerte); }
.cifra-l { font-size: 30px; letter-spacing: -0.035em; color: #D6D6D6; }
.enlace { color: var(--lima); }
.enlace:hover { text-decoration: underline; }
.enlace-lima { padding: 0; border: none; background: none; color: var(--lima); font-size: 13px; cursor: pointer; text-align: left; }
.enlace-lima:hover { text-decoration: underline; }
.boton.lima { background: var(--lima); color: #111; font-weight: 600; }
.boton.lima:hover { filter: brightness(1.08); background: var(--lima); }
.boton.mini { height: 30px; padding: 0 10px; font-size: 11px; }
.boton.ancho, .cta.ancho { width: 100%; justify-content: center; }
.boton.alto { height: 46px; }
.cta .icono:empty::before { content: ""; width: 12px; height: 12px; background: linear-gradient(var(--lima), var(--lima)) 0 0 / 4px 4px no-repeat, linear-gradient(var(--lima), var(--lima)) 5px 5px / 4px 4px no-repeat, linear-gradient(var(--lima), var(--lima)) 0 8px / 4px 4px no-repeat; }

/* --- Panel --- */
.portada { position: relative; overflow: hidden; height: 250px; border-bottom: 1px solid var(--linea); display: flex; align-items: flex-end; padding: 0 20px 34px; }
.portada-texto { position: relative; display: flex; flex-direction: column; gap: 12px; }
.kpis { border-bottom: 1px solid var(--linea); }
.kpi { padding: 22px 20px; display: flex; flex-direction: column; gap: 10px; }
.filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--linea); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-right: auto; }
.fila .inmueble { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fila .inmueble .nombre { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila .beneficio { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.fila .num-s { text-align: right; font-size: 16px; color: var(--apagado); }
.fila .sin-valoracion { grid-column: span 4; text-align: right; font-size: 13px; color: var(--texto-3); }

/* --- Ficha --- */
.ficha-titulo { display: flex; flex-direction: column; gap: 16px; }
.migas:hover { color: var(--texto-fuerte); }
.subtitulo { margin: 0; font-size: 16px; color: var(--texto-3); }
.rejilla-tarjetas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.rejilla-tarjetas.dos { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }
.merece { width: 100%; padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 12px; border-radius: 16px; }
.merece-titulo { font-size: 15px; color: #D6D6D6; text-align: center; }
.arco-grande .cifra-arco { font-size: 40px; font-weight: 500; letter-spacing: -0.04em; color: var(--texto-fuerte); }
.pestanas { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pestana { height: 44px; border: none; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; background: var(--campo); color: var(--texto-2); }
.pestana:disabled { opacity: 0.4; cursor: not-allowed; }
.pestana.reventa[aria-selected="true"] { background: var(--lima); color: #111; }
.pestana.alquiler[aria-selected="true"] { background: var(--violeta); color: #111; }
.rango { margin: 0; }
.rango text { font-family: var(--sans); }
.caja-violeta { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 10px; background: rgba(138, 122, 240, 0.08); border: 1px solid rgba(138, 122, 240, 0.3); }
.simulador-precio { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.campo-precio { width: 150px; height: 38px; font-size: 15px; }
.simulacion { padding: 6px 16px; border-radius: 12px; }
.lineas > .total { font-weight: 500; padding: 11px 0; }
.beneficio-caja.negativo { background: rgba(242, 135, 125, 0.08); border-color: rgba(242, 135, 125, 0.35); }
.beneficio-caja.negativo .positivo { color: var(--rojo-texto); }
.plegable { border: 1px solid var(--linea); border-radius: 10px; padding: 0 16px; background: var(--panel); }
.plegable > summary { cursor: pointer; padding: 14px 0; font-size: 14px; color: var(--texto-2); list-style: none; }
.plegable > summary::before { content: "+ "; font-family: var(--mono); color: var(--lima); }
.plegable[open] > summary::before { content: "− "; }
.plegable[open] { padding-bottom: 16px; }
.plegable.peligro > summary { color: var(--rojo-texto); }
.rejilla-campos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rejilla-campos .ancho { grid-column: 1 / -1; }
.rejilla-campos .fin { justify-content: flex-end; }
.leyenda { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.leyenda > div { display: flex; align-items: center; gap: 8px; color: #D6D6D6; }
.leyenda .mono { margin-left: auto; white-space: nowrap; }
.muestra { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.barra-pesos span:first-child { border-radius: 4px 0 0 4px; }
.barra-pesos span:last-child { border-radius: 0 4px 4px 0; }
.testigo { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--linea-suave); }
.form-testigo { display: grid; grid-template-columns: minmax(0, 1fr) 80px; gap: 8px; }
.form-testigo .campo { height: 38px; font-size: 13px; }
.form-testigo .nota-testigo { grid-column: 1 / -1; }
.form-testigo .boton { grid-column: 1 / -1; }
.imagenes-catastro { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.foto-catastro { position: relative; overflow: hidden; margin: 0; border-radius: 10px; background: #202020; border: 1px solid rgba(255, 255, 255, 0.08); min-height: 120px; }
.foto-catastro img { display: block; width: 100%; height: 140px; object-fit: cover; }
.foto-catastro figcaption { position: absolute; left: 8px; bottom: 6px; color: var(--texto-fuerte); text-shadow: 0 1px 3px #000; }
.datos { margin: 0; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 10px; font-size: 13px; }
.datos dd { margin: 0; overflow-wrap: anywhere; }
.aviso.tenue { opacity: 0.55; }
a.aviso:hover { background: #242424; }

/* --- Importación --- */
.zona-archivo { position: relative; display: flex; align-items: center; justify-content: center; min-height: 180px; padding: 24px; border: 1px dashed rgba(229, 255, 93, 0.35); border-radius: 14px; background: linear-gradient(180deg, #1F1F1F, #1A1A1A); cursor: pointer; text-align: center; transition: border-color .2s ease; }
.zona-archivo:hover, .zona-archivo:focus-within { border-color: var(--lima); }
.zona-archivo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.zona-texto { display: flex; flex-direction: column; gap: 8px; }
.dialogo { width: 100%; max-width: 520px; padding: 26px; border-radius: 16px; background: linear-gradient(180deg, #232323, #1C1C1C); border: 1px solid rgba(199, 124, 38, 0.45); }
.rejilla-botones { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin-top: 6px; }
.imagen-revision { display: block; max-height: 520px; margin: 0 auto; border-radius: 8px; }
.tabla-edicion td { padding: 4px; }
.celda { width: 100%; min-width: 90px; height: 34px; padding: 0 8px; background: var(--campo); border: 1px solid transparent; border-radius: 4px; font-size: 13px; }
.celda:focus { outline: none; border-color: rgba(229, 255, 93, 0.6); }
.celda.dudosa { border-color: var(--ambar); background: rgba(199, 124, 38, 0.15); }
.fila-roja td:first-child { box-shadow: inset 3px 0 0 var(--rojo-texto); }
.fila-nueva .celda { background: transparent; border: 1px dashed rgba(255, 255, 255, 0.15); }
.paso .circulo { font-size: 13px; color: var(--texto-2); }
.estado-paso { font-size: 12px; color: var(--lima); white-space: nowrap; }
.borrar-paquete { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.tarea { max-width: 760px; }

/* --- Navegación móvil --- */
.nav-movil { display: none; }
@media (max-width: 900px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .nav { display: none; }
  .nav-movil { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 20; padding: 6px; border-radius: 8px; background: #202020; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5); font-size: 11px; font-weight: 500; }
  .nav-movil a { height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 4px; color: var(--texto-3); }
  .nav-movil a.activo { background: rgba(255, 255, 255, 0.1); color: var(--texto-fuerte); }
  .nav-movil a.lima { background: var(--lima); color: #111; }
  .marco { margin: 0; border: none; }
  .portada { height: 170px; padding-bottom: 22px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis > * { border-right: 1px solid var(--linea); }
  .kpis > *:nth-child(2n) { border-right: none; }
  .rejilla-tarjetas { grid-template-columns: minmax(0, 1fr); }
  .rejilla-tarjetas.dos, .rejilla-campos { grid-template-columns: minmax(0, 1fr); }
  .fila .sin-valoracion { grid-column: auto; }
  .buscador { width: 100%; }
  .bloque { padding: 22px 16px; }
}

/* --- Zona --- */
.r-zona { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
.alinear { align-items: baseline; }
.zona-cabecera { display: flex; align-items: center; gap: 16px; }
.tramo-complicado { color: var(--rojo-texto); }
.tramo-valorable { color: var(--ambar-texto); }
.tramo-oportunidad, .tramo-buena-oportunidad { color: var(--verde-texto); }
.noticia { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--linea-suave); }
.noticia .titular { font-size: 14px; color: var(--texto); line-height: 1.35; }
a.titular:hover { color: var(--texto-fuerte); text-decoration: underline; }
.chip-tema { flex-shrink: 0; min-width: 88px; padding: 4px 8px; border-radius: 4px; background: var(--campo); text-align: center; }
.chip-tema.negativa { background: rgba(242, 135, 125, 0.12); color: var(--rojo-texto); }
.chip-tema.positiva { background: rgba(31, 170, 138, 0.14); color: var(--verde-texto); }
@media (max-width: 900px) { .r-zona { grid-template-columns: minmax(0, 1fr); } }
.lineas > div > .mono { white-space: nowrap; }
.analizar-zona { padding: 18px; border-color: rgba(229, 255, 93, 0.3); }
.foto-catastro a { display: block; position: relative; }
.foto-catastro a:hover img { filter: brightness(1.08); }
.foto-catastro a:hover::after { content: "↗"; position: absolute; top: 6px; right: 8px; color: var(--texto-fuerte); text-shadow: 0 1px 3px #000; }
.nota-enlace { font-size: 13px; }

/* --- Visitas --- */
.visita { padding: 14px 16px; border-radius: 10px; }
.texto-visita { margin: 0; font-size: 14px; color: var(--texto); line-height: 1.45; }
.mini-plegable { padding: 0 12px; }
.mini-plegable > summary { padding: 8px 0; font-size: 12px; }
.area { height: auto; padding: 10px 14px; line-height: 1.45; resize: vertical; font-size: 14px; }
.fila-edicion { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px; }
.fila-edicion.tres { grid-template-columns: 170px minmax(0, 1fr) 130px; }
.fila-edicion .campo { height: 40px; font-size: 14px; }
.punto-grabar { width: 10px; height: 10px; border-radius: 5px; background: var(--rojo-texto); }
.grabando .punto-grabar { animation: parpadeo 1s ease-in-out infinite; }
@media (max-width: 900px) { .fila-edicion, .fila-edicion.tres { grid-template-columns: minmax(0, 1fr); } }
.cta:disabled, .boton:disabled { opacity: 0.35; cursor: not-allowed; filter: none; }

/* --- Características --- */
.caracteristicas { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.caracteristicas > div { padding: 8px 12px; border-radius: 8px; background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.06); min-width: 110px; }
.caracteristicas dt { margin-bottom: 2px; }
.caracteristicas dd { margin: 0; font-size: 16px; color: var(--texto-fuerte); }
.caracteristicas dd.origen { font-size: 11px; color: var(--apagado); }
.tabla-datos .campo { height: 36px; font-size: 14px; min-width: 110px; }

/* --- Inicio de sesión --- */
.login { min-height: 70vh; }
.dialogo-login { width: 100%; max-width: 380px; padding: 28px; border-radius: 16px; background: linear-gradient(180deg, #232323, #1C1C1C); border: 1px solid rgba(255, 255, 255, 0.09); }
.marca.grande { font-size: 26px; }
.salir { margin: 0; }
.salir button { padding: 10px 12px; border: none; background: none; color: var(--texto-3); font-size: 12px; font-weight: 500; cursor: pointer; }
.salir button:hover { color: var(--texto-fuerte); }
