/* ============================================================================
   InmoRadar · theme-v2.css  (rediseño v2 · alineado con la landing)
   Capa SOLO visual: se carga al final de cada página. No cambia lógica.
   Para revertir: quitar el <link> de theme-v2.css de las páginas
   (backup: /home/inmoradar/backups/pre_redesign_*).
   ============================================================================ */

/* ── Tokens de marca (mismos de inmoradar.tech) ───────────────────────────── */
:root{
  --lime:#c8f23d; --lime-hi:#d6ff55; --lime-lo:#b4e021; --ink:#05102a; --cyan-brand:#2fe3ef;
  --radius-md:12px; --radius-lg:18px;
}

/* ── Tema claro: azul-blanco en vez de gris + verde oliva ─────────────────── */
[data-theme="light"]{
  --bg:#eef3fb; --bg-elev:#f6f9fe; --surface:#e3ebf8; --surface-2:#d6e2f5;
  --card:#ffffff; --card-elev:#ffffff; --hover:rgba(10,30,70,.06);
  --border:rgba(10,30,70,.22); --border-strong:rgba(10,30,70,.38); --border-soft:rgba(10,30,70,.13);
  --text:#020a1f; --text-mute:#2a3a5c; --text-dim:#43547a;
  --shadow-sm:0 1px 2px rgba(10,30,70,.06); --shadow-md:0 6px 20px rgba(10,30,70,.08);
  --shadow-lg:0 20px 50px rgba(10,30,70,.12); --shadow-glow:0 0 60px rgba(26,91,214,.10);
  --backdrop:rgba(255,255,255,.88); --scrim:rgba(5,16,42,.5);
  --brand:#1a5bd6; --brand-deep:#1a4aa8; --brand-bright:#2f74e8;
  --info:#0a6fb5; --info-bg:rgba(10,111,181,.10);
}

/* ── Botones primarios = lima de la landing (ambos temas) ─────────────────── */
.btn-primary,.btn-brand,.btn-add,.btn-new,.btn-save-edit,.rf-buscar,.barrio-btn-pri,
.nav-cta,.plan-btn.primary,.tab-btn.active,.tab.active,.cfg-btn-save,#copyAllBtn,.btn-corr.primary{
  background:var(--lime)!important; color:var(--ink)!important; border-color:transparent!important;
  font-weight:800; letter-spacing:.01em;
}
.btn-primary:hover,.btn-brand:hover,.btn-add:hover,.btn-new:hover,.btn-save-edit:hover,.rf-buscar:hover,
.barrio-btn-pri:hover,.nav-cta:hover,.plan-btn.primary:hover,.cfg-btn-save:hover,#copyAllBtn:hover,.btn-corr.primary:hover{
  background:var(--lime-hi)!important; color:var(--ink)!important;
  box-shadow:0 0 24px rgba(200,242,61,.35);
}
.btn-primary:active,.btn-brand:active,.btn-add:active,.btn-new:active,.rf-buscar:active{background:var(--lime-lo)!important}

/* ── Forma: botones y navegación en píldora ───────────────────────────────── */
.btn,.btn-primary,.btn-brand,.btn-secondary,.btn-ghost,.btn-danger,.btn-add,.btn-new,.btn-save-edit,
.rf-buscar,.barrio-btn-pri,.nav-cta,.plan-btn,.cfg-btn-save,.nav-btn,.nav-group-btn,.tab-btn,.tab{
  border-radius:999px;
}
.btn-sm{border-radius:999px}

/* Secundario: contorno (tema claro con tinta azul noche) */
.btn-secondary{background:transparent;border-color:var(--border-strong);color:var(--text)}
.btn-secondary:hover:not(:disabled){background:var(--hover);border-color:var(--cyan-brand)}
[data-theme="light"] .btn-secondary{background:#fff;border-color:var(--ink);color:var(--ink)}
[data-theme="light"] .btn-secondary:hover:not(:disabled){background:var(--ink);color:#fff}

/* Foco visible (cyan de la landing) */
:where(button,a,input,select,textarea):focus-visible{outline:2px solid var(--cyan-brand);outline-offset:2px}
[data-theme="light"] :where(button,a,input,select,textarea):focus-visible{outline-color:#1a5bd6}

/* Campos */
[data-theme="light"] :where(input,select,textarea){border-color:var(--border-strong)}

/* ── Estados seleccionados pintados por JS con azul/índigo → lima ─────────── */
button[style*="background:#3b7af7"],button[style*="background: #3b7af7"],
button[style*="background:#3b82f6"],button[style*="background: #3b82f6"],
button[style*="background:#2563eb"],button[style*="background: #2563eb"],
button[style*="background:var(--accent)"],button[style*="background: var(--accent)"]{
  background:var(--lime)!important; color:var(--ink)!important;
}
.crm-tab.active{background:var(--lime)!important;color:var(--ink)!important}
.sub-tab.active{color:var(--cyan-brand)!important;background:rgba(47,227,239,.14)!important}
[data-theme="light"] .sub-tab.active{color:#1a4aa8!important;background:#e1ebfc!important}
.sb-city-btn,.btn-provincia{border-radius:999px}

/* JS normaliza los colores inline a rgb(): mismas reglas en ese formato */
button[style*="background: rgb(59, 122, 247)"],button[style*="background: rgb(59, 130, 246)"],
button[style*="background: rgb(37, 99, 235)"],button[style*="background-color: rgb(59, 122, 247)"],
button[style*="background-color: rgb(59, 130, 246)"],button[style*="background-color: rgb(37, 99, 235)"]{
  background:var(--lime)!important; color:var(--ink)!important;
}
.apply-btn{background:var(--lime)!important;color:var(--ink)!important;border-radius:999px;font-weight:800}
.apply-btn:hover{background:var(--lime-hi)!important}
.plan-popular{background:var(--lime)!important;color:var(--ink)!important}
.badge-new{background:rgba(47,227,239,.16)!important;color:var(--cyan-brand)!important}
[data-theme="light"] .badge-new{background:#e1ebfc!important;color:#1a4aa8!important}

.btn-sm-primary,.prop-card-link,.vista-btn.active{background:var(--lime)!important;color:var(--ink)!important;border-color:transparent!important}
.btn-sm-primary:hover,.prop-card-link:hover{background:var(--lime-hi)!important}
.btn-sm-primary,.prop-card-link,.vista-btn{border-radius:999px}

.sb-mode-btn.active,.sb-city-active,.sb-btn-primary,#chat-send{background:var(--lime)!important;color:var(--ink)!important;border-color:transparent!important}
.sb-btn-primary:hover,#chat-send:hover{background:var(--lime-hi)!important}
.sb-mode-btn,.sb-btn-primary,.sb-btn-sec,.sb-btn-teal,.sb-btn-ghost{border-radius:999px}
.chat-msg.user{background:#1a5bd6!important;color:#fff!important}

/* Botones con degradado violeta/índigo inline → lima */
[style*="linear-gradient(135deg,#7c3aed"],[style*="linear-gradient(135deg, #7c3aed"],
[style*="linear-gradient(135deg,#3b7af7"],[style*="linear-gradient(135deg, #3b7af7"],
#tourCard .tc-btn-next{background:var(--lime)!important;color:var(--ink)!important;border-radius:999px!important;font-weight:800}
#tourCard .tc-progress-dot.done{background:var(--cyan-brand)!important}
.sb-btn-sec{border-color:rgba(47,227,239,.45);background:rgba(47,227,239,.10);color:var(--cyan-brand)}
[data-theme="light"] .sb-btn-sec{border-color:rgba(26,91,214,.5);background:rgba(26,91,214,.08);color:#1a4aa8}

/* ── Tema claro: más contraste (textos tenues, bordes y botones de ficha) ─── */
[data-theme="light"] [style*="color:#94a3b8"],[data-theme="light"] [style*="color: #94a3b8"],
[data-theme="light"] [style*="color:#9ca3af"],[data-theme="light"] [style*="color: #9ca3af"],
[data-theme="light"] [style*="color:#aaa"],[data-theme="light"] [style*="color: #aaa"],
[data-theme="light"] [style*="color:#888"],[data-theme="light"] [style*="color: #888"]{color:#3d4f70!important}
[data-theme="light"] [style*="color:#64748b"],[data-theme="light"] [style*="color: #64748b"]{color:#2a3a5c!important}
[data-theme="light"] [style*="color:#93b4ff"],[data-theme="light"] [style*="color: #93b4ff"]{color:#1a4aa8!important}
[data-theme="light"] .detail-fav-btn{color:#a11d1d;background:rgba(239,68,68,.12);border-color:rgba(185,28,28,.55);font-weight:700}
[data-theme="light"] .detail-fav-btn:hover,[data-theme="light"] .detail-fav-btn.active{background:rgba(239,68,68,.22)}
[data-theme="light"] .detail-radar-btn{color:#123f99;background:rgba(26,91,214,.12);border-color:rgba(26,91,214,.6);font-weight:700}
[data-theme="light"] .detail-radar-btn:hover{background:rgba(26,91,214,.22)}
[data-theme="light"] .card,[data-theme="light"] .prop-card{box-shadow:0 1px 3px rgba(10,30,70,.12)}
[data-theme="light"] .badge-new{color:#123f99!important}
[data-theme="light"] ::placeholder{color:#5a6a8a!important;opacity:1}

/* Tema claro: colores de acento pálidos pintados inline → versiones oscuras legibles */
[data-theme="light"] [style*="color:#fbbf24"]:not([style*="background"]){color:#8a4b05!important}
[data-theme="light"] [style*="color: #fbbf24"]:not([style*="background"]){color:#8a4b05!important}
[data-theme="light"] [style*="color: rgb(251, 191, 36)"]:not([style*="background"]){color:#8a4b05!important}
[data-theme="light"] [style*="color:rgb(251, 191, 36)"]:not([style*="background"]){color:#8a4b05!important}
[data-theme="light"] [style*="color:#7aa5ff"]:not([style*="background"]){color:#1a4aa8!important}
[data-theme="light"] [style*="color: #7aa5ff"]:not([style*="background"]){color:#1a4aa8!important}
[data-theme="light"] [style*="color: rgb(122, 165, 255)"]:not([style*="background"]){color:#1a4aa8!important}
[data-theme="light"] [style*="color:rgb(122, 165, 255)"]:not([style*="background"]){color:#1a4aa8!important}
[data-theme="light"] [style*="color:#60a5fa"]:not([style*="background"]){color:#1d4ed8!important}
[data-theme="light"] [style*="color: #60a5fa"]:not([style*="background"]){color:#1d4ed8!important}
[data-theme="light"] [style*="color: rgb(96, 165, 250)"]:not([style*="background"]){color:#1d4ed8!important}
[data-theme="light"] [style*="color:rgb(96, 165, 250)"]:not([style*="background"]){color:#1d4ed8!important}
[data-theme="light"] [style*="color:#4ade80"]:not([style*="background"]){color:#047857!important}
[data-theme="light"] [style*="color: #4ade80"]:not([style*="background"]){color:#047857!important}
[data-theme="light"] [style*="color: rgb(74, 222, 128)"]:not([style*="background"]){color:#047857!important}
[data-theme="light"] [style*="color:rgb(74, 222, 128)"]:not([style*="background"]){color:#047857!important}
[data-theme="light"] [style*="color:#34d399"]:not([style*="background"]){color:#047857!important}
[data-theme="light"] [style*="color: #34d399"]:not([style*="background"]){color:#047857!important}
[data-theme="light"] [style*="color: rgb(52, 211, 153)"]:not([style*="background"]){color:#047857!important}
[data-theme="light"] [style*="color:rgb(52, 211, 153)"]:not([style*="background"]){color:#047857!important}
[data-theme="light"] [style*="color:#f87171"]:not([style*="background"]){color:#b91c1c!important}
[data-theme="light"] [style*="color: #f87171"]:not([style*="background"]){color:#b91c1c!important}
[data-theme="light"] [style*="color: rgb(248, 113, 113)"]:not([style*="background"]){color:#b91c1c!important}
[data-theme="light"] [style*="color:rgb(248, 113, 113)"]:not([style*="background"]){color:#b91c1c!important}
[data-theme="light"] [style*="color:#a78bfa"]:not([style*="background"]){color:#6d28d9!important}
[data-theme="light"] [style*="color: #a78bfa"]:not([style*="background"]){color:#6d28d9!important}
[data-theme="light"] [style*="color: rgb(167, 139, 250)"]:not([style*="background"]){color:#6d28d9!important}
[data-theme="light"] [style*="color:rgb(167, 139, 250)"]:not([style*="background"]){color:#6d28d9!important}
[data-theme="light"] [style*="color:#fb923c"]:not([style*="background"]){color:#c2410c!important}
[data-theme="light"] [style*="color: #fb923c"]:not([style*="background"]){color:#c2410c!important}
[data-theme="light"] [style*="color: rgb(251, 146, 60)"]:not([style*="background"]){color:#c2410c!important}
[data-theme="light"] [style*="color:rgb(251, 146, 60)"]:not([style*="background"]){color:#c2410c!important}
[data-theme="light"] [style*="color:#facc15"]:not([style*="background"]){color:#854d0e!important}
[data-theme="light"] [style*="color: #facc15"]:not([style*="background"]){color:#854d0e!important}
[data-theme="light"] [style*="color: rgb(250, 204, 21)"]:not([style*="background"]){color:#854d0e!important}
[data-theme="light"] [style*="color:rgb(250, 204, 21)"]:not([style*="background"]){color:#854d0e!important}
[data-theme="light"] [style*="color:#fcd34d"]:not([style*="background"]){color:#854d0e!important}
[data-theme="light"] [style*="color: #fcd34d"]:not([style*="background"]){color:#854d0e!important}
[data-theme="light"] [style*="color: rgb(252, 211, 77)"]:not([style*="background"]){color:#854d0e!important}
[data-theme="light"] [style*="color:rgb(252, 211, 77)"]:not([style*="background"]){color:#854d0e!important}
