/* =====================================================================
   ENCASA INVERSORES — Copia fiel estilo "Emporio" (liquid glass / dark)
   Tipografías: Playfair Display (títulos) + Inter (cuerpo) — cargadas en el HTML
   ===================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Tema oscuro */
  --bg: #070a12;
  --bg-2: #0a0e1a;

  /* Acentos Encasa (azul principal, rojo para pagos/urgencia) */
  --azul: #2e6fe0;
  --azul-osc: #1A4FA0;
  --azul-claro: #6ea8ff;
  --rojo: #CC2020;
  --rojo-claro: #e23b3b;
  --verde-wpp: #25D366;

  /* Liquid glass */
  --glass-bg: rgba(255,255,255,0.055);
  --glass-bg-2: rgba(255,255,255,0.08);
  --glass-border: rgba(255,255,255,0.14);
  --glass-blur: blur(22px) saturate(1.6);
  --glass-shadow: 0 24px 60px -20px rgba(0,0,0,0.65), inset 0 1px 0 0 rgba(255,255,255,0.10);

  /* Texto */
  --txt: #ffffff;
  --txt-mut: rgba(255,255,255,0.62);
  --txt-mut2: rgba(255,255,255,0.40);

  /* Compat. con portales (tema claro) */
  --gris: #3C3C3C;
  --gris-claro: #f7f8fc;
  --blanco: #ffffff;
  --sombra: 0 4px 24px rgba(0,0,0,0.07);
  --radio: 16px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--txt);
  background: var(--bg);
  overflow-x: hidden;
  position: relative;
}
/* Glow de fondo */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 600px at 12% -5%, rgba(46,111,224,0.22), transparent 60%),
    radial-gradient(800px 600px at 100% 8%, rgba(26,79,160,0.18), transparent 55%),
    radial-gradient(700px 500px at 50% 110%, rgba(204,32,32,0.10), transparent 60%),
    linear-gradient(180deg, #070a12 0%, #0a0e1a 100%);
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* Tipografía de títulos */
h1, h2, h3, .serif { font-family: 'Playfair Display', Georgia, serif; }
.it { font-style: italic; background: linear-gradient(90deg, var(--azul-claro), var(--azul)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.it-rojo { font-style: italic; color: var(--rojo-claro); }

/* Utilidad glass */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}

/* Eyebrow (— QUÉ HACEMOS) */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--azul-claro);
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase;
  margin-bottom: 18px;
}
.eyebrow::before { content: ''; width: 34px; height: 1.5px; background: var(--azul-claro); display: inline-block; }
.eyebrow.center { justify-content: center; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 28px; border-radius: 100px; border: none; cursor: pointer;
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 15px; color: #fff;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn-azul { background: linear-gradient(135deg, var(--azul) 0%, var(--azul-osc) 100%); box-shadow: 0 10px 30px -8px rgba(46,111,224,0.6); }
.btn-azul:hover { transform: translateY(-2px); box-shadow: 0 14px 36px -8px rgba(46,111,224,0.75); }
.btn-rojo { background: linear-gradient(135deg, var(--rojo-claro) 0%, var(--rojo) 100%); box-shadow: 0 10px 30px -8px rgba(204,32,32,0.6); }
.btn-rojo:hover { transform: translateY(-2px); box-shadow: 0 14px 36px -8px rgba(204,32,32,0.75); }
.btn-ghost {
  background: var(--glass-bg); border: 1px solid var(--glass-border); color: #fff;
  backdrop-filter: var(--glass-blur);
}
.btn-ghost:hover { background: var(--glass-bg-2); transform: translateY(-2px); }

/* ════════ NAVBAR (pill glass flotante) ════════ */
nav {
  position: sticky; top: 16px; z-index: 100;
  margin: 16px auto 0; max-width: 1240px;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px 12px 24px;
  border-radius: 100px;
  background: rgba(12,16,28,0.55);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.8), inset 0 1px 0 0 rgba(255,255,255,0.08);
}
nav .logo img { height: 46px; display: block; }
nav ul { list-style: none; display: flex; gap: 6px; align-items: center; }
nav ul > li > a {
  color: var(--txt-mut); font-weight: 600; font-size: 14.5px;
  padding: 9px 16px; border-radius: 100px; transition: all 0.2s;
}
nav ul > li > a:hover { color: #fff; }
nav ul > li > a.activo { background: var(--glass-bg-2); color: #fff; }
nav .nav-soporte { color: #fff !important; padding: 10px 18px !important; }
nav .nav-cta {
  background: linear-gradient(135deg, var(--rojo-claro), var(--rojo)) !important;
  color: #fff !important; padding: 11px 24px !important;
  box-shadow: 0 10px 26px -8px rgba(204,32,32,0.65);
}
nav .nav-cta:hover { transform: translateY(-1px); }

/* Dropdown accesos */
.nav-dropdown { position: relative; }
.nav-dropdown > a { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 16px); right: 0;
  background: rgba(14,18,30,0.92); border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  border-radius: 18px; padding: 10px; min-width: 256px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: all 0.22s ease; box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}
.nav-dropdown:hover .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown-menu a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; transition: background 0.18s; }
.nav-dropdown-menu a:hover { background: var(--glass-bg-2); }
.nav-dropdown-menu .dd-ico { font-size: 22px; }
.nav-dropdown-menu .dd-text strong { font-size: 14px; color: #fff; }
.nav-dropdown-menu .dd-text small { display: block; font-weight: 500; color: var(--txt-mut); font-size: 12px; margin-top: 1px; }

.nav-toggle { display: none; font-size: 26px; background: none; border: none; cursor: pointer; color: #fff; }

/* ════════ HERO ════════ */
.hero { position: relative; padding: 110px 40px 70px; max-width: 1240px; margin: 0 auto; }
.hero-contenido { max-width: 760px; }
.hero h1 {
  font-size: 78px; line-height: 1.05; font-weight: 700; letter-spacing: -1px;
  margin-bottom: 28px;
}
.hero p { font-size: 19px; color: var(--txt-mut); line-height: 1.6; max-width: 540px; margin-bottom: 34px; font-family: 'Inter', sans-serif; }
.hero-cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

/* Buscador glass */
.buscador {
  display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap;
  padding: 10px; border-radius: 20px; max-width: 1000px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.buscador .campo { flex: 1; min-width: 150px; padding: 10px 16px; position: relative; }
.buscador .campo label { display: block; font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--txt-mut2); font-weight: 700; margin-bottom: 4px; font-family: 'Inter', sans-serif; }
.buscador .campo select {
  width: 100%; background: transparent; border: none; color: #fff;
  font-size: 15px; font-weight: 600; font-family: 'Inter', sans-serif; cursor: pointer; outline: none;
  appearance: none; -webkit-appearance: none;
}
.buscador .campo select option { background: #0e1220; color: #fff; }
.buscador .campo::after { content: '⌄'; position: absolute; right: 16px; bottom: 14px; color: var(--txt-mut); pointer-events: none; }
.buscador .campo + .campo { border-left: 1px solid var(--glass-border); }
.buscador .btn-buscar { margin: 0; align-self: stretch; padding: 0 30px; border-radius: 14px; }

/* ════════ SECCIONES ════════ */
section { padding: 80px 40px; max-width: 1240px; margin: 0 auto; }
.sec-head { margin-bottom: 50px; }
.sec-head.center { text-align: center; }
.sec-head.center .eyebrow { justify-content: center; }
h2 { font-size: 50px; font-weight: 700; line-height: 1.1; letter-spacing: -0.5px; }
.sec-sub { color: var(--txt-mut); font-size: 17px; margin-top: 14px; max-width: 600px; font-family: 'Inter', sans-serif; }
.sec-head.center .sec-sub { margin-left: auto; margin-right: auto; }

/* Marca por completar */
.por-completar { outline: 2px dashed #f59e0b; outline-offset: 8px; border-radius: 8px; position: relative; }
.por-completar::after {
  content: "✏️ POR COMPLETAR"; position: absolute; top: -14px; left: 14px;
  background: #f59e0b; color: #1a1a1a; font-size: 10px; font-weight: 800; letter-spacing: 0.5px;
  padding: 3px 9px; border-radius: 6px; z-index: 9; font-family: 'Inter', sans-serif;
}

/* Credenciales */
.cred-grid { display: flex; flex-wrap: wrap; gap: 26px; align-items: center; }
.cred-item { display: flex; flex-direction: column; }
.cred-item strong { font-family: 'Playfair Display', serif; font-size: 40px; font-weight: 700; line-height: 1; }
.cred-item strong sup { font-size: 22px; color: var(--azul-claro); vertical-align: super; }
.cred-item small { color: var(--txt-mut); font-size: 13.5px; margin-top: 6px; }
.cred-sep { width: 1px; height: 44px; background: var(--glass-border); }
.cred-google { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-radius: 16px; }
.cred-google .stars { color: #ffc107; font-size: 18px; letter-spacing: 2px; }
.cred-google a { color: var(--azul-claro); font-size: 12px; }

/* ════════ SERVICIOS (qué hacemos) ════════ */
.qh-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.qh-card { border-radius: 22px; padding: 30px 26px; transition: transform 0.28s, border-color 0.28s; }
.qh-card:hover { transform: translateY(-8px); border-color: rgba(110,168,255,0.4); }
.glass-ico {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 26px;
  background: linear-gradient(135deg, rgba(46,111,224,0.35), rgba(26,79,160,0.18));
  border: 1px solid rgba(110,168,255,0.3); margin-bottom: 18px;
}
.qh-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.qh-card p { color: var(--txt-mut); font-size: 14px; line-height: 1.6; font-family: 'Inter', sans-serif; }

/* ════════ SPLIT (arrendatarios / propietarios) ════════ */
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.split-card { border-radius: 26px; padding: 44px; }
.split-card h3 { font-size: 34px; font-weight: 700; margin-bottom: 14px; line-height: 1.15; }
.split-card > p { color: var(--txt-mut); font-size: 16px; line-height: 1.6; margin-bottom: 24px; font-family: 'Inter', sans-serif; }
.split-bullets { list-style: none; display: grid; gap: 0; margin-bottom: 30px; }
.split-bullets li { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--glass-border); font-size: 15px; font-family: 'Inter', sans-serif; }
.split-bullets li:last-child { border-bottom: none; }
.split-bullets .ck { color: var(--azul-claro); font-weight: 800; }
.split-btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* ════════ PROBLEMA ════════ */
.problema-card { border-radius: 30px; padding: 70px 50px; text-align: center; }
.problema-card h2 { font-size: 46px; max-width: 800px; margin: 0 auto 18px; }
.problema-card p { color: var(--txt-mut); font-size: 18px; max-width: 600px; margin: 0 auto 30px; font-family: 'Inter', sans-serif; }

/* ════════ RESPALDO (marquee) ════════ */
.respaldo { text-align: center; }
.marquee { overflow: hidden; margin-top: 40px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; gap: 26px; width: max-content; animation: marquee 30s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.logo-item {
  height: 92px; min-width: 180px; display: grid; place-items: center; padding: 0 30px;
  background: #fff; border-radius: 18px; box-shadow: 0 14px 30px -12px rgba(0,0,0,0.5);
  font-weight: 800; color: #555; font-size: 15px; white-space: nowrap;
}
.logo-item img { max-height: 48px; object-fit: contain; }
@keyframes marquee { to { transform: translateX(calc(-50% - 13px)); } }

/* ════════ TESTIMONIOS ════════ */
.video-grid { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.video-card { width: 300px; border-radius: 24px; padding: 16px; }
.video-thumb { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 9/13; background: #111; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-thumb .play { position: absolute; inset: 0; display: grid; place-items: center; }
.video-thumb .play span { width: 64px; height: 46px; background: rgba(204,32,32,0.92); border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 20px; }
.video-card .vc-foot { display: flex; align-items: center; gap: 12px; padding: 16px 8px 6px; }
.video-card .vc-av { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg,var(--azul),var(--azul-osc)); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.video-card .vc-foot strong { display: block; font-size: 14px; font-family: 'Inter', sans-serif; }
.video-card .vc-foot small { color: var(--txt-mut); font-size: 12px; }

/* Reseñas Google */
.reviews-panel { border-radius: 26px; padding: 40px; margin-top: 10px; }
.reviews-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; margin-bottom: 30px; }
.reviews-top .rt-left h3 { font-size: 26px; font-weight: 700; margin-bottom: 8px; }
.reviews-top .rt-left p { color: var(--txt-mut); font-size: 14px; max-width: 560px; font-family: 'Inter', sans-serif; }
.reviews-top .rt-right { text-align: right; }
.reviews-top .rt-right .big { font-family: 'Playfair Display', serif; font-size: 46px; font-weight: 700; line-height: 1; }
.reviews-top .rt-right .stars { color: #ffc107; letter-spacing: 2px; }
.reviews-top .rt-right small { color: var(--txt-mut); font-size: 13px; }
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.review-card { background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border); border-radius: 16px; padding: 22px; font-family: 'Inter', sans-serif; }
.review-card .rc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.review-card .rc-head .stars { color: #ffc107; font-size: 14px; letter-spacing: 1px; }
.review-card .rc-head .date { color: var(--txt-mut2); font-size: 12px; }
.review-card p { color: rgba(255,255,255,0.8); font-size: 14px; line-height: 1.6; margin-bottom: 18px; }
.review-card .rc-foot { display: flex; align-items: center; gap: 10px; }
.review-card .rc-av { width: 30px; height: 30px; border-radius: 50%; background: var(--azul); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.review-card .rc-foot strong { font-size: 13px; flex: 1; }
.review-card .g { font-weight: 800; font-family: serif; color: #4285F4; }

/* ════════ CONTACTO ════════ */
.contacto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.contacto-stats { display: flex; gap: 50px; margin-top: 36px; }
.contacto-stats .cred-item strong { font-size: 56px; }
.form-card { border-radius: 26px; padding: 36px; }
.form-card h3 { text-align: center; font-size: 22px; font-weight: 700; margin-bottom: 26px; font-family: 'Playfair Display', serif; }
.form-line { margin-bottom: 22px; position: relative; }
.form-line input, .form-line select {
  width: 100%; background: transparent; border: none; border-bottom: 1px solid rgba(255,255,255,0.2);
  padding: 10px 2px; color: #fff; font-size: 15px; font-family: 'Inter', sans-serif; outline: none;
}
.form-line select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.form-line select option { background: #0e1220; }
.form-line input::placeholder { color: var(--txt-mut2); }
.form-line input:focus, .form-line select:focus { border-bottom-color: var(--azul); }
.form-card .btn { width: 100%; justify-content: center; margin-top: 8px; }

/* ════════ FOOTER ════════ */
footer { border-top: 1px solid var(--glass-border); margin-top: 40px; }
.footer-inner { max-width: 1240px; margin: 0 auto; padding: 60px 40px 30px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; font-family: 'Inter', sans-serif; }
.footer-inner .f-logo img { height: 44px; margin-bottom: 18px; }
.footer-inner .f-desc { color: var(--txt-mut); font-size: 14px; line-height: 1.7; max-width: 320px; margin-bottom: 20px; }
.f-social { display: flex; gap: 10px; }
.f-social a { width: 38px; height: 38px; border-radius: 50%; background: var(--glass-bg); border: 1px solid var(--glass-border); display: grid; place-items: center; font-size: 15px; transition: all 0.2s; }
.f-social a:hover { background: var(--azul); transform: translateY(-2px); }
.footer-col h4 { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--txt-mut2); margin-bottom: 18px; }
.footer-col a, .footer-col p { display: block; color: var(--txt-mut); font-size: 14px; margin-bottom: 12px; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { max-width: 1240px; margin: 0 auto; padding: 22px 40px; border-top: 1px solid var(--glass-border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--txt-mut2); font-size: 13px; font-family: 'Inter', sans-serif; }
.footer-bottom a { color: var(--txt-mut); }

/* ════════ FAQ ════════ */
.faq-wrap { max-width: 820px; margin: 0 auto; }
.faq-item { border-radius: 16px; margin-bottom: 14px; overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: none; padding: 22px 26px; font-size: 16.5px; font-weight: 700; color: #fff; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 14px; font-family: 'Inter', sans-serif; }
.faq-q .faq-icon { color: var(--azul-claro); font-size: 24px; transition: transform 0.25s; }
.faq-item.open .faq-q .faq-icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-a div { padding: 0 26px 24px; color: var(--txt-mut); line-height: 1.7; font-size: 15px; font-family: 'Inter', sans-serif; }
.faq-item.open .faq-a { max-height: 360px; }

/* ════════ DOCK FLOTANTE ════════ */
.fab-dock { position: fixed; right: 22px; bottom: 100px; z-index: 180; display: flex; flex-direction: column; gap: 12px; opacity: 0; visibility: hidden; transform: translateY(20px); transition: all 0.35s ease; }
.fab-dock.show { opacity: 1; visibility: visible; transform: translateY(0); }
.fab-item { display: flex; align-items: center; height: 52px; width: 52px; border-radius: 100px; overflow: hidden; white-space: nowrap; font-weight: 700; font-size: 14px; color: #fff; transition: width 0.3s ease; background: rgba(14,18,30,0.85); border: 1px solid var(--glass-border); backdrop-filter: blur(14px); box-shadow: 0 8px 22px rgba(0,0,0,0.5); }
.fab-item .fab-ico { min-width: 52px; height: 52px; display: grid; place-items: center; font-size: 21px; }
.fab-item .fab-label { opacity: 0; transition: opacity 0.2s; padding-right: 18px; }
.fab-item:hover { width: 230px; }
.fab-item:hover .fab-label { opacity: 1; }
.fab-item.rojo:hover { background: linear-gradient(135deg,var(--rojo-claro),var(--rojo)); }
.fab-item.azul:hover { background: linear-gradient(135deg,var(--azul),var(--azul-osc)); }
.fab-item.verde:hover { background: var(--verde-wpp); }

/* ════════ ASESOR IA ════════ */
.ai-launcher { position: fixed; right: 22px; bottom: 26px; z-index: 190; width: 62px; height: 62px; border-radius: 50%; background: linear-gradient(135deg, var(--azul), var(--azul-osc)); color: #fff; border: none; cursor: pointer; display: grid; place-items: center; font-size: 28px; box-shadow: 0 10px 30px rgba(46,111,224,0.5); transition: transform 0.2s; }
.ai-launcher:hover { transform: scale(1.08); }
.ai-launcher .ai-ping { position: absolute; top: -2px; right: -2px; width: 16px; height: 16px; background: var(--rojo); border-radius: 50%; border: 2px solid #0a0e1a; }
.ai-panel { position: fixed; right: 22px; bottom: 100px; z-index: 195; width: 384px; max-width: calc(100vw - 32px); height: 564px; max-height: calc(100vh - 130px); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; background: rgba(12,16,28,0.96); border: 1px solid var(--glass-border); backdrop-filter: blur(20px); box-shadow: 0 24px 70px rgba(0,0,0,0.7); opacity: 0; visibility: hidden; transform: translateY(20px) scale(0.97); transition: all 0.28s ease; }
.ai-panel.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.ai-head { background: linear-gradient(135deg, var(--azul-osc), var(--azul)); color: #fff; padding: 18px 20px; display: flex; align-items: center; gap: 12px; }
.ai-head .ai-bot { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,0.2); display: grid; place-items: center; font-size: 22px; }
.ai-head strong { display: block; font-size: 16px; font-family: 'Inter', sans-serif; }
.ai-head small { font-size: 12px; opacity: 0.9; display: flex; align-items: center; gap: 5px; }
.ai-head small::before { content: ''; width: 8px; height: 8px; background: #4ade80; border-radius: 50%; }
.ai-head .ai-close { margin-left: auto; background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; opacity: 0.8; }
.ai-msgs { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; font-family: 'Inter', sans-serif; }
.ai-msg { max-width: 85%; padding: 12px 15px; border-radius: 16px; font-size: 14px; line-height: 1.55; }
.ai-msg.bot { background: var(--glass-bg-2); border: 1px solid var(--glass-border); color: #eef; align-self: flex-start; border-bottom-left-radius: 4px; }
.ai-msg.user { background: linear-gradient(135deg,var(--azul),var(--azul-osc)); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.ai-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 12px; }
.ai-quick button { background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--azul-claro); font-size: 12.5px; font-weight: 600; padding: 7px 13px; border-radius: 50px; cursor: pointer; transition: all 0.18s; font-family: 'Inter', sans-serif; }
.ai-quick button:hover { background: var(--azul); color: #fff; }
.ai-input { display: flex; gap: 8px; padding: 14px; border-top: 1px solid var(--glass-border); }
.ai-input input { flex: 1; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 50px; padding: 11px 16px; font-size: 14px; color: #fff; font-family: 'Inter', sans-serif; outline: none; }
.ai-input input::placeholder { color: var(--txt-mut2); }
.ai-input button { background: var(--azul); color: #fff; border: none; width: 44px; height: 44px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.ai-typing { display: flex; gap: 4px; padding: 4px 2px; }
.ai-typing span { width: 7px; height: 7px; background: var(--txt-mut); border-radius: 50%; animation: blink 1.2s infinite; }
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%,60%,100% { opacity: 0.3; } 30% { opacity: 1; } }
.ai-disclaimer { font-size: 10.5px; color: var(--txt-mut2); text-align: center; padding: 8px; }

/* ════════ PROPIEDADES (cards en tema oscuro) ════════ */
.grid-props { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.prop-card { border-radius: 22px; overflow: hidden; transition: transform 0.25s; }
.prop-card:hover { transform: translateY(-6px); }
.prop-img-wrap { position: relative; overflow: hidden; }
.prop-img-wrap img { width: 100%; height: 220px; object-fit: cover; display: block; transition: transform 0.4s; }
.prop-card:hover .prop-img-wrap img { transform: scale(1.06); }
.prop-badge { position: absolute; top: 14px; left: 14px; background: linear-gradient(135deg,var(--rojo-claro),var(--rojo)); color: #fff; font-size: 11px; font-weight: 700; padding: 5px 13px; border-radius: 50px; text-transform: uppercase; letter-spacing: 0.5px; }
.prop-estrato { position: absolute; top: 14px; right: 14px; background: rgba(0,0,0,0.6); color: #fff; font-size: 11px; font-weight: 600; padding: 5px 11px; border-radius: 50px; backdrop-filter: blur(6px); }
.prop-info { padding: 22px; }
.prop-info h3 { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.prop-ubicacion { font-size: 13px; color: var(--txt-mut); margin-bottom: 14px; font-family: 'Inter', sans-serif; }
.prop-precio { font-size: 24px; font-weight: 700; color: var(--azul-claro); margin-bottom: 14px; font-family: 'Playfair Display', serif; }
.prop-detalles { display: flex; gap: 14px; font-size: 13px; color: var(--txt-mut); margin-bottom: 20px; flex-wrap: wrap; font-family: 'Inter', sans-serif; }
.btn-ver { display: block; text-align: center; background: var(--glass-bg-2); border: 1px solid var(--glass-border); color: #fff; padding: 12px; border-radius: 12px; font-weight: 700; font-size: 14px; transition: all 0.2s; font-family: 'Inter', sans-serif; }
.btn-ver:hover { background: linear-gradient(135deg,var(--azul),var(--azul-osc)); }

/* ═══════════════════════════════════════════════════════════════
   PORTALES / LOGIN / DASHBOARDS  (tema claro — se conservan)
   ═══════════════════════════════════════════════════════════════ */
.auth-page, .dash-body { color: var(--gris); font-family: 'Inter', Arial, sans-serif; }
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--gris-claro); }
.auth-aside { position: relative; color: white; padding: 60px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.auth-aside.clientes { background: linear-gradient(150deg, #0d2f6b 0%, #1A4FA0 60%, #2563cc 100%); }
.auth-aside.agentes { background: linear-gradient(150deg, #2a1006 0%, #7a1f1f 55%, #CC2020 100%); }
.auth-aside .auth-logo img { height: 54px; }
.auth-aside h1 { font-size: 38px; line-height: 1.2; font-weight: 800; margin-bottom: 16px; color: #fff; font-family: 'Playfair Display', serif; }
.auth-aside p { font-size: 16px; opacity: 0.9; line-height: 1.6; max-width: 420px; }
.auth-aside .auth-feats { list-style: none; display: grid; gap: 14px; margin-top: 30px; }
.auth-aside .auth-feats li { display: flex; gap: 12px; align-items: center; font-size: 15px; }
.auth-aside .auth-feats .fi { font-size: 22px; }
.auth-aside .auth-foot { font-size: 13px; opacity: 0.7; }
.auth-main { display: grid; place-items: center; padding: 40px; background: #fff; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box .back { font-size: 14px; color: #888; display: inline-block; margin-bottom: 30px; }
.auth-box .back:hover { color: var(--azul-osc); }
.auth-box h2 { text-align: left; font-size: 28px; color: var(--gris); margin-bottom: 6px; font-family: 'Playfair Display', serif; }
.auth-box .sub { color: #999; font-size: 15px; margin-bottom: 30px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: #555; }
.form-group input, .form-group select { width: 100%; padding: 13px 15px; border: 1.5px solid #e2e8f0; border-radius: 11px; font-size: 15px; font-family: inherit; transition: border 0.2s; color: var(--gris); background: #fff; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--azul-osc); }
.form-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 22px; }
.form-row a { color: var(--azul-osc); }
.form-row label { display: flex; align-items: center; gap: 6px; color: #777; cursor: pointer; }
.btn-full { width: 100%; padding: 14px; border: none; border-radius: 11px; font-size: 16px; font-weight: 700; color: white; cursor: pointer; transition: opacity 0.2s; }
.btn-full.azul { background: linear-gradient(135deg, #2563cc, #1A4FA0); }
.btn-full.rojo { background: linear-gradient(135deg, #a81818, #CC2020); }
.btn-full:hover { opacity: 0.9; }
.auth-error { background: #fdecec; color: #c0392b; padding: 11px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 18px; display: none; }
.auth-error.show { display: block; }
.demo-hint { margin-top: 24px; padding: 14px; background: #eef3fc; border-radius: 11px; font-size: 12.5px; color: #555; line-height: 1.7; }
.demo-hint strong { color: var(--azul-osc); }
.demo-hint.rojo-hint { background: #fdecec; }
.demo-hint.rojo-hint strong { color: var(--rojo); }

.dash-body { background: var(--gris-claro); min-height: 100vh; display: none; }
.dash-body.active { display: block; }
.dash-topbar { background: white; padding: 14px 36px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 14px rgba(0,0,0,0.06); position: sticky; top: 0; z-index: 50; }
.dash-topbar .logo img { height: 46px; }
.dash-user { display: flex; align-items: center; gap: 14px; }
.dash-user .avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--azul-osc); color: white; display: grid; place-items: center; font-weight: 700; }
.dash-user .avatar.rojo { background: var(--rojo); }
.dash-user .uinfo strong { display: block; font-size: 14px; }
.dash-user .uinfo small { color: #999; font-size: 12px; }
.btn-logout { background: var(--gris-claro); border: 1px solid #e2e8f0; color: #666; padding: 8px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-logout:hover { background: #fdecec; color: var(--rojo); border-color: #f5c6c6; }
.dash-wrap { max-width: 1180px; margin: 0 auto; padding: 36px; }
.dash-hello { margin-bottom: 30px; }
.dash-hello h1 { font-size: 28px; color: var(--gris); margin-bottom: 4px; font-family: 'Playfair Display', serif; }
.dash-hello p { color: #999; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; margin-bottom: 32px; }
.kpi-card { background: white; border-radius: var(--radio); padding: 24px; box-shadow: var(--sombra); position: relative; overflow: hidden; }
.kpi-card .kpi-ico { position: absolute; top: 20px; right: 20px; font-size: 26px; opacity: 0.85; }
.kpi-card .kpi-label { font-size: 13px; color: #999; font-weight: 600; margin-bottom: 8px; }
.kpi-card .kpi-value { font-size: 32px; font-weight: 800; color: var(--gris); line-height: 1; }
.kpi-card .kpi-delta { font-size: 12.5px; margin-top: 8px; font-weight: 600; }
.kpi-delta.up { color: #1f9d55; }
.kpi-delta.down { color: var(--rojo); }
.kpi-card.accent-azul { border-left: 4px solid var(--azul-osc); }
.kpi-card.accent-rojo { border-left: 4px solid var(--rojo); }
.kpi-card.accent-verde { border-left: 4px solid #1f9d55; }
.kpi-card.accent-naranja { border-left: 4px solid #f59e0b; }
.dash-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; }
.panel { background: white; border-radius: var(--radio); padding: 26px; box-shadow: var(--sombra); margin-bottom: 24px; }
.panel h3 { font-size: 17px; color: var(--gris); margin-bottom: 18px; display: flex; align-items: center; gap: 8px; }
.meta-row { margin-bottom: 20px; }
.meta-row .meta-head { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 7px; }
.meta-row .meta-head strong { color: var(--gris); }
.meta-row .meta-head span { color: #999; }
.bar { height: 10px; background: var(--gris-claro); border-radius: 50px; overflow: hidden; }
.bar > div { height: 100%; border-radius: 50px; transition: width 1s ease; }
.bar > div.b-azul { background: linear-gradient(90deg, #2563cc, #1A4FA0); }
.bar > div.b-rojo { background: linear-gradient(90deg, #a81818, #CC2020); }
.bar > div.b-verde { background: linear-gradient(90deg, #16a34a, #4ade80); }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th { text-align: left; color: #999; font-size: 12px; font-weight: 600; padding: 10px 12px; border-bottom: 2px solid var(--gris-claro); text-transform: uppercase; letter-spacing: 0.4px; }
.tabla td { padding: 13px 12px; border-bottom: 1px solid var(--gris-claro); }
.tabla tr:last-child td { border-bottom: none; }
.pill { display: inline-block; padding: 4px 11px; border-radius: 50px; font-size: 11.5px; font-weight: 700; }
.pill.ok { background: #e6f7ee; color: #1f9d55; }
.pill.pend { background: #fff5e6; color: #d97706; }
.pill.venc { background: #fdecec; color: var(--rojo); }
.pill.info { background: #eef3fc; color: var(--azul-osc); }
.acc-list { display: grid; gap: 12px; }
.acc-item { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1.5px solid var(--gris-claro); border-radius: 12px; transition: all 0.18s; }
.acc-item:hover { border-color: var(--azul-osc); background: #f9fbff; }
.acc-item .ai-ico { font-size: 22px; }
.acc-item .ai-text { flex: 1; }
.acc-item .ai-text strong { display: block; font-size: 14px; }
.acc-item .ai-text small { color: #999; font-size: 12px; }
.acc-item a, .acc-item button { background: var(--azul-osc); color: white; border: none; padding: 8px 16px; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; }
.ranking-item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--gris-claro); }
.ranking-item:last-child { border-bottom: none; }
.ranking-item .pos { width: 28px; height: 28px; border-radius: 50%; background: var(--gris-claro); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.ranking-item.me { background: #f9fbff; margin: 0 -10px; padding: 12px 10px; border-radius: 10px; }
.ranking-item.me .pos { background: var(--azul-osc); color: white; }
.ranking-item .r-name { flex: 1; font-weight: 600; font-size: 14px; }
.ranking-item .r-val { font-weight: 800; color: var(--azul-osc); }

/* ════════ RESPONSIVE ════════ */
@media (max-width: 1000px) {
  .qh-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: 1fr; }
  .grid-props { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  nav { padding: 10px 14px 10px 18px; margin-top: 10px; }
  nav ul { position: absolute; top: calc(100% + 10px); right: 0; left: 0; flex-direction: column; align-items: stretch; background: rgba(12,16,28,0.97); border: 1px solid var(--glass-border); backdrop-filter: blur(20px); border-radius: 20px; padding: 14px; gap: 4px; display: none; }
  nav ul.open { display: flex; }
  .nav-toggle { display: block; }
  .nav-dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: transparent; border: none; padding: 0; margin-top: 6px; }
  .hero { padding: 70px 22px 50px; }
  .hero h1 { font-size: 46px; }
  section { padding: 56px 22px; }
  h2 { font-size: 34px; }
  .problema-card h2 { font-size: 30px; }
  .qh-grid { grid-template-columns: 1fr; }
  .split-grid { grid-template-columns: 1fr; }
  .split-card { padding: 30px; }
  .contacto-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 30px; padding: 44px 22px 24px; }
  .footer-bottom { padding: 20px 22px; }
  .buscador .campo + .campo { border-left: none; border-top: 1px solid var(--glass-border); }
  .fab-dock { bottom: 92px; right: 16px; }
  .ai-panel { right: 12px; bottom: 92px; }
  /* portales */
  .auth-page { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .dash-cols { grid-template-columns: 1fr; }
}
