/* ============================================
   DESIGN TOKENS — Inspira Madrid PSI
   ============================================ */
:root {
  /* Brand palette — Inspira Madrid PSI logo (#96ced5 aqua + #303432 charcoal) */
  --brand-50:  #f1fafb;
  --brand-100: #def3f5;
  --brand-200: #bfe7eb;
  --brand-300: #96ced5; /* logo aqua */
  --brand-400: #66b6c1;
  --brand-500: #3f9caa;
  --brand-600: #2f8c99; /* primary action */
  --brand-700: #226d78; /* deep / hover */
  --brand-800: #1b545d;
  --brand-900: #163f46;
  --brand-ink: #2b302e; /* logo charcoal */
  --brand-rgb: 47, 140, 153;
  --brand-aqua-rgb: 150, 206, 213;

  /* Colors — Light Professional Theme */
  --bg-primary: #f6fafb;
  --bg-secondary: #eef3f4;
  --bg-card: #ffffff;
  --bg-card-hover: #f6fbfb;
  --bg-input: #eef3f5;
  --bg-header: rgba(255, 255, 255, 0.82);

  --text-primary: #1c2a2b;
  --text-secondary: #4e5d60;
  --text-muted: #8a979b;

  --accent-indigo: #2f8c99;
  --accent-violet: #1f6f7b;
  --accent-cyan: #3f9caa;
  --accent-emerald: #2f8c99;
  --accent-rose: #e2574c;
  --accent-amber: #1f6f7b;

  --gradient-primary: linear-gradient(135deg, #3f9caa 0%, #2f8c99 50%, #1f7a87 100%);
  --gradient-gold: linear-gradient(135deg, #2f8c99, #49a6b0, #226d78);
  --gradient-card: linear-gradient(145deg, #ffffff, #f4fafb);
  --gradient-glow: linear-gradient(135deg, rgba(47,140,153,0.16), rgba(150,206,213,0.08));
  --gradient-mesh: radial-gradient(ellipse at 20% 50%, rgba(47,140,153,0.08) 0%, transparent 50%),
                   radial-gradient(ellipse at 80% 20%, rgba(150,206,213,0.10) 0%, transparent 50%),
                   radial-gradient(ellipse at 60% 80%, rgba(47,140,153,0.05) 0%, transparent 50%);

  --border-color: rgba(22, 63, 70, 0.08);
  --border-active: rgba(47,140,153, 0.5);

  --shadow-sm: 0 1px 3px rgba(20, 45, 50, 0.05), 0 1px 2px rgba(20, 45, 50, 0.03);
  --shadow-md: 0 4px 16px rgba(20, 45, 50, 0.07), 0 2px 6px rgba(20, 45, 50, 0.04);
  --shadow-lg: 0 12px 40px rgba(20, 45, 50, 0.10), 0 4px 12px rgba(20, 45, 50, 0.05);
  --shadow-xl: 0 24px 60px rgba(20, 45, 50, 0.12), 0 8px 24px rgba(20, 45, 50, 0.06);
  --shadow-glow: 0 0 30px rgba(47,140,153, 0.20);
  --shadow-glow-gold: 0 0 30px rgba(47,140,153, 0.15);
  --shadow-card-hover: 0 22px 50px rgba(20, 45, 50, 0.12), 0 0 40px rgba(47,140,153, 0.14);

  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-blur: blur(20px) saturate(180%);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-2xl: 28px;

  --font: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-mesh);
  pointer-events: none;
  z-index: 0;
  animation: meshShift 20s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  top: -50%;
  right: -30%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47,140,153,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: ambientOrb1 15s ease-in-out infinite alternate;
}

@keyframes meshShift {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0.8; transform: scale(1.05); }
}

@keyframes ambientOrb1 {
  0% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50% { transform: translate(-80px, 60px) scale(1.2); opacity: 0.8; }
  100% { transform: translate(40px, -40px) scale(0.9); opacity: 0.4; }
}

/* ============================================
   HEADER
   ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: none;
  box-shadow: 0 1px 0 0 rgba(0,0,0,0.04);
}

.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(47,140,153,0.3), rgba(47,140,153,0.2), transparent);
}

.header__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 10px 24px;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}


.header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.header__logo a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.82));
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 8px 24px -12px rgba(15, 23, 42, 0.15);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.header__logo a::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.6) 50%, transparent 60%);
  transition: transform 0.6s ease;
  transform: translateX(-100%) rotate(0deg);
}

.header__logo a:hover::before {
  transform: translateX(100%) rotate(0deg);
}

.header__logo a:hover {
  box-shadow: 0 12px 32px -8px rgba(47,140,153, 0.25);
  border-color: rgba(47,140,153, 0.3);
}

.header__logo {
  display: flex;
  align-items: center;
}

.header__logo img {
  height: 40px;
  width: auto;
}

.header__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.header__status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 16px 34px -28px rgba(15, 23, 42, 0.28);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-amber);
  animation: pulse 2s infinite;
}

.status-dot.online {
  background: var(--accent-emerald);
}

.status-dot.error {
  background: var(--accent-rose);
  animation: none;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 16px rgba(47,140,153, 0.3);
  position: relative;
  overflow: hidden;
}

.btn--primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: btnShimmer 3s infinite;
}

@keyframes btnShimmer {
  0% { left: -100%; }
  20%, 100% { left: 100%; }
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(47,140,153, 0.45), var(--shadow-glow);
  background: linear-gradient(135deg, #26818f, #2f8c99, #1f7a87);
}

.btn--accent {
  background: rgba(47,140,153, 0.1);
  color: var(--accent-indigo);
  border: 1px solid rgba(47,140,153, 0.25);
}

.btn--accent:hover {
  background: rgba(47,140,153, 0.18);
  border-color: rgba(47,140,153, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(47,140,153, 0.15);
}

.btn--scrape {
  background: var(--gradient-gold);
  color: white;
  border: 1px solid rgba(180, 149, 48, 0.2);
  box-shadow: 0 4px 16px rgba(47,140,153, 0.3);
}

.btn--scrape::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmerLoop 3s ease-in-out infinite;
}

@keyframes shimmerLoop {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.btn--scrape:hover {
  background: linear-gradient(135deg, #49a6b0, #2f8c99, #226d78);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(47,140,153, 0.4), var(--shadow-glow-gold);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn--ghost:hover {
  background: rgba(47,140,153, 0.06);
  color: var(--text-primary);
  border-color: rgba(47,140,153, 0.2);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ============================================
   FILTERS
   ============================================ */
.filters {
  position: relative;
  z-index: 10;
  padding: 0 24px;
  margin-top: -32px;
}

.filters__inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 24px 28px;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-2xl);
  box-shadow: 0 24px 50px -12px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(47,140,153, 0.1);
  transform: translateY(0);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  animation: slideUpFade 0.6s ease-out 0.2s both;
}

.filters__inner:hover {
  transform: translateY(-4px);
  box-shadow: 0 32px 60px -15px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(47,140,153, 0.2);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 180px;
}

.filter-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-group input:not([type="checkbox"]),
.filter-group select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: all var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.filter-group select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b85' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.filter-group select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.filter-group input::placeholder {
  color: var(--text-muted);
}

.filter-group input:focus,
.filter-group select:focus {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px rgba(47,140,153, 0.15);
}

/* ============================================
   PRICE RANGE SLIDER
   ============================================ */
.filter-group--price {
  flex: 2;
  min-width: 260px;
}

.price-range {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.price-range__labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-range__value {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.08);
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
}

.price-range__track {
  position: relative;
  height: 36px;
  display: flex;
  align-items: center;
}

.price-range__fill {
  position: absolute;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
  pointer-events: none;
  z-index: 1;
}

.price-range__input {
  position: absolute;
  width: 100%;
  height: 4px;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: none;
  outline: none;
  margin: 0;
  padding: 0;
}

.price-range__input::-webkit-slider-runnable-track {
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
}

.price-range__input--max::-webkit-slider-runnable-track {
  background: transparent;
}

.price-range__input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-indigo);
  border: 2px solid var(--bg-secondary);
  box-shadow: 0 0 8px rgba(47,140,153, 0.4);
  cursor: pointer;
  pointer-events: all;
  position: relative;
  z-index: 2;
  margin-top: -7px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.price-range__input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 14px rgba(47,140,153, 0.6);
}

.price-range__input::-moz-range-track {
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  border: none;
}

.price-range__input--max::-moz-range-track {
  background: transparent;
}

.price-range__input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-indigo);
  border: 2px solid var(--bg-secondary);
  box-shadow: 0 0 8px rgba(47,140,153, 0.4);
  cursor: pointer;
  pointer-events: all;
}

/* ============================================
   COMPACT FILTER GROUPS (Rooms, m²²)
   ============================================ */
.filter-group--compact {
  min-width: 100px;
  flex: 0 0 auto;
}

.filter-group--sort {
  min-width: 210px;
  flex: 0 0 210px;
}

.filter-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.filter-select:focus {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px rgba(47,140,153, 0.15);
}

.filter-select option {
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* ============================================
   PORTAL MULTI-SELECT DROPDOWN
   ============================================ */
.filter-group--portal {
  position: relative;
}

.filter-group--rooms,
.filter-group--sqm {
  position: relative;
  flex: 0 0 auto;
  min-width: 160px;
}

/* Bottom row: sort on the left, action buttons on the right */
.filters__bottom {
  flex: 1 1 100%;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px solid rgba(15, 23, 42, 0.07);
}

.filters__actions {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Make the primary search button stand out and separate it from the rest */
.filters__actions #btn-search {
  padding: 12px 34px;
  font-size: 0.95rem;
  box-shadow: 0 6px 20px rgba(47, 140, 153, 0.38);
  margin-right: 14px;
}

.filters__actions #btn-search:hover {
  box-shadow: 0 10px 30px rgba(47, 140, 153, 0.5), var(--shadow-glow);
}

.filters__actions #btn-clear {
  margin-left: auto;
}

.rooms-dropdown .portal-dropdown__menu,
.sqm-dropdown .portal-dropdown__menu {
  left: auto;
  right: 0;
  min-width: 210px;
}

.rooms-dropdown .portal-dropdown__item,
.sqm-dropdown .portal-dropdown__item {
  white-space: nowrap;
}

.portal-dropdown {
  position: relative;
}

.portal-dropdown__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
  outline: none;
}

.portal-dropdown__toggle:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.portal-dropdown__toggle:focus,
.portal-dropdown.open .portal-dropdown__toggle {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px rgba(47,140,153, 0.15);
}

.portal-dropdown__toggle svg {
  flex-shrink: 0;
  opacity: 0.5;
  transition: transform var(--transition);
}

.portal-dropdown.open .portal-dropdown__toggle svg {
  transform: rotate(180deg);
}

.portal-dropdown__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-dropdown__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-sm);
  padding: 6px 0;
  box-shadow: var(--shadow-lg);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
}

.portal-dropdown.open .portal-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.portal-dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.portal-dropdown__item:hover {
  background: rgba(47,140,153, 0.1);
  color: var(--text-primary);
}

.portal-checkbox,
.rooms-checkbox,
.sqm-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--text-muted);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.portal-checkbox:checked,
.rooms-checkbox:checked,
.sqm-checkbox:checked {
  background: #2f8c99;
  border-color: #2f8c99;
}

.portal-checkbox:checked::after,
.rooms-checkbox:checked::after,
.sqm-checkbox:checked::after {
  content: '';
  position: absolute;
  top: 1.5px;
  left: 4.5px;
  width: 4.5px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
  position: relative;
  z-index: 5;
  margin-top: 24px;
}

.stats-bar__inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  position: relative;
  flex: 1;
  min-width: 160px;
  background: var(--bg-card);
  border: 1px solid rgba(47,140,153, 0.15);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: slideUpFade 0.6s ease-out 0.3s both;
}

.stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px -10px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(47,140,153, 0.3);
}

.stat__value {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.stat__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* ============================================
   MAIN / GRID
   ============================================ */
.main {
  position: relative;
  z-index: 5;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

/* ============================================
   PROPERTY CARD
   ============================================ */
.card {
  background: var(--bg-card);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  transition: all var(--transition-smooth);
  cursor: default;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius-lg) + 1px);
  background: conic-gradient(from var(--card-border-angle, 0deg), transparent 60%, rgba(47,140,153,0.5) 75%, rgba(47,140,153,0.4) 85%, transparent 95%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: -1;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(47,140,153,0.03) 0%, transparent 40%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.card:hover {
  border-color: transparent;
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-card-hover);
}

.card:hover::before {
  opacity: 0;
}

.card:hover::after {
  opacity: 1;
}

@keyframes borderRotate {
  0% { --card-border-angle: 0deg; }
  100% { --card-border-angle: 360deg; }
}

@property --card-border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.card--notification-target {
  border-color: rgba(47,140,153, 0.72);
  box-shadow: 0 0 0 3px rgba(47,140,153, 0.18), var(--shadow-lg);
  transform: translateY(-2px);
}

.card__image {
  width: 100%;
  height: 190px;
  overflow: hidden;
  position: relative;
}

.card__image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, rgba(255,255,255,0.9), transparent);
  pointer-events: none;
  z-index: 1;
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover .card__image img {
  transform: scale(1.08);
}

.card__image--placeholder {
  background: linear-gradient(135deg, rgba(47,140,153, 0.08), rgba(47,140,153, 0.04));
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__header {
  padding: 20px 20px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card__source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #235f6b;
  background: rgba(47,140,153, 0.12);
  padding: 5px 12px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  border: 1px solid rgba(47,140,153, 0.15);
}

.card__id {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: monospace;
}

.card__body {
  padding: 14px 20px 20px;
}

.card__title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 12px;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__price {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
}

.card__price::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: priceShimmer 4s ease-in-out infinite;
}

@keyframes priceShimmer {
  0%, 100% { left: -100%; }
  50% { left: 150%; }
}

.card__meta {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
}

.card__meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.card__meta-item svg {
  opacity: 0.5;
  flex-shrink: 0;
}

.card__description {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.card__footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card__link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-indigo);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition);
}

.card__link:hover {
  color: var(--accent-violet);
}

.card__date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.empty-state h3 {
  font-size: 1.25rem;
  margin: 20px 0 8px;
  color: var(--text-secondary);
}

.empty-state p {
  font-size: 0.9rem;
}

/* ============================================
   LOADING
   ============================================ */
.loading {
  text-align: center;
  padding: 80px 20px;
  display: none;
}

.loading.active {
  display: block;
}

.loading__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-indigo);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================
   TOAST
   ============================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 0.85rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  animation: slideInToast 0.4s var(--transition-spring);
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast--success {
  border-left: 3px solid var(--accent-emerald);
}

.toast--error {
  border-left: 3px solid var(--accent-rose);
}

.toast--info {
  border-left: 3px solid var(--accent-indigo);
}

@keyframes slideInToast {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================
   CARD ENTER ANIMATION
   ============================================ */
.card {
  animation: cardFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.card:nth-child(1) { animation-delay: 0.02s; }
.card:nth-child(2) { animation-delay: 0.06s; }
.card:nth-child(3) { animation-delay: 0.1s; }
.card:nth-child(4) { animation-delay: 0.14s; }
.card:nth-child(5) { animation-delay: 0.18s; }
.card:nth-child(6) { animation-delay: 0.22s; }
.card:nth-child(7) { animation-delay: 0.26s; }
.card:nth-child(8) { animation-delay: 0.3s; }
.card:nth-child(9) { animation-delay: 0.34s; }

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .header__inner {
    padding: 0 16px;
  }

  .filters__inner {
    padding: 16px;
    flex-direction: column;
    /* Override desktop's align-items: flex-end — otherwise each filter group
       sizes to its content width (the price fields force ~550px) and overflows
       the viewport, pushing everything to the right and cutting it off. */
    align-items: stretch;
  }

  .filter-group,
  .filter-group--location,
  .filter-group--price,
  .filter-group--portal,
  .filter-group--rooms,
  .filter-group--sqm,
  .filter-group--sort {
    min-width: 0;
    width: 100%;
    flex: 1 1 100%;
  }

  /* Stack the bottom row (sort + actions) instead of cramming it into one line */
  .filters__bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .filters__actions {
    flex-wrap: wrap;
    gap: 8px;
  }

  .filters__actions .btn {
    flex: 1 1 100%;
    justify-content: center;
  }

  .filters__actions #btn-search {
    margin-right: 0;
    padding: 12px 24px;
  }

  .filters__actions #btn-clear {
    margin-left: 0;
  }

  .stats-bar__inner {
    padding: 16px;
    gap: 24px;
    flex-wrap: wrap;
  }

  .main {
    padding: 0 16px 40px;
  }

  .listings-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .header__title {
    display: none;
  }

  .btn-text {
    display: none;
  }

  /* Keep labels on the filter action buttons — "Limpiar" has no icon, so
     hiding its text would leave an empty button. */
  .filters__actions .btn-text {
    display: inline;
  }
}

@media (max-width: 480px) {
  .card__price {
    font-size: 1.3rem;
  }

  .stat__value {
    font-size: 1.2rem;
  }
}

/* ============================================
   DOCKED CHAT CONSTRAINED PAGE LAYOUT
   ============================================ */
body.ai-chat-layout-constrained .header,
body.ai-chat-layout-constrained .hero,
body.ai-chat-layout-constrained .filters,
body.ai-chat-layout-constrained .stats-bar,
body.ai-chat-layout-constrained .main {
  width: calc(100vw - var(--ai-chat-docked-width, 50vw));
  max-width: calc(100vw - var(--ai-chat-docked-width, 50vw));
}

body.ai-chat-layout-constrained .header__inner {
  max-width: none;
  min-height: 68px;
  padding: 8px 12px;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow: hidden;
}

body.ai-chat-layout-constrained .header__brand {
  min-width: 0;
  flex: 0 0 auto;
}

body.ai-chat-layout-constrained .header__logo img {
  height: 36px;
  max-width: 94px;
  object-fit: contain;
}

body.ai-chat-layout-constrained .header__logo a {
  padding: 8px 10px;
  border-radius: 14px;
}

body.ai-chat-layout-constrained .header__title,
body.ai-chat-layout-constrained .header__status .status-text {
  display: none;
}

body.ai-chat-layout-constrained .header__actions {
  flex: 0 0 auto;
  margin-left: 0;
  gap: 8px;
  min-width: 0;
}

body.ai-chat-layout-constrained .header__auth {
  min-width: 0;
}

body.ai-chat-layout-constrained .header__auth .user-profile {
  max-width: 112px;
  min-width: 0;
  padding-inline: 6px 10px;
}

body.ai-chat-layout-constrained .header__auth .user-profile__name,
body.ai-chat-layout-constrained .header__auth .user-profile > span:not(.user-profile__avatar) {
  max-width: 54px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.ai-chat-layout-constrained .header__status {
  display: none;
}

body.ai-chat-layout-constrained #btn-scrape {
  width: 42px;
  height: 42px;
  padding: 0;
  justify-content: center;
  overflow: hidden;
  font-size: 0;
}

body.ai-chat-layout-constrained #btn-scrape svg {
  flex-shrink: 0;
}

body.ai-chat-layout-constrained .header__nav {
  order: initial;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px;
  scrollbar-width: none;
}

body.ai-chat-layout-constrained .header__nav::-webkit-scrollbar {
  display: none;
}

body.ai-chat-layout-constrained .nav__link {
  width: auto;
  flex: 0 0 auto;
  justify-content: flex-start;
  padding: 8px 10px;
  font-size: 0.78rem;
  gap: 5px;
}

body.ai-chat-layout-constrained .nav__link svg {
  width: 14px;
  height: 14px;
}

body.ai-chat-layout-constrained .hero__inner {
  padding: 34px 24px;
  gap: 24px;
  align-items: flex-start;
}

body.ai-chat-layout-constrained .hero__content {
  max-width: 680px;
}

body.ai-chat-layout-constrained .hero__title {
  max-width: 680px;
  font-size: 1.85rem;
}

body.ai-chat-layout-constrained .hero__desc {
  max-width: 620px;
}

body.ai-chat-layout-constrained .hero__visual {
  display: none;
}

body.ai-chat-layout-constrained .filters__inner {
  max-width: none;
  padding: 18px 24px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
  gap: 14px;
}

body.ai-chat-layout-constrained .filter-group {
  width: 100%;
  min-width: 0;
  flex: none;
}

body.ai-chat-layout-constrained .filter-group--location,
body.ai-chat-layout-constrained .filter-group--price {
  grid-column: span 3;
}

body.ai-chat-layout-constrained .filter-group--portal,
body.ai-chat-layout-constrained .filter-group--sort {
  grid-column: span 2;
}

body.ai-chat-layout-constrained .filter-group--compact {
  grid-column: span 1;
}

body.ai-chat-layout-constrained .filters__actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.ai-chat-layout-constrained .filters__actions .btn {
  min-height: 42px;
  padding: 10px 16px;
}

body.ai-chat-layout-constrained .stats-bar__inner {
  max-width: none;
  padding: 18px 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

body.ai-chat-layout-constrained .main {
  max-width: none;
  padding: 0 24px 50px;
}

body.ai-chat-layout-constrained .listings-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

@media (max-width: 900px) {
  body.ai-chat-layout-constrained .filters__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.ai-chat-layout-constrained .filter-group--location,
  body.ai-chat-layout-constrained .filter-group--price,
  body.ai-chat-layout-constrained .filter-group--portal,
  body.ai-chat-layout-constrained .filter-group--sort {
    grid-column: span 2;
  }

  body.ai-chat-layout-constrained .stats-bar__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ============================================
   HERO / AI ASSISTANT CTA
   ============================================ */
.hero {
  position: relative;
  z-index: 5;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(47,140,153, 0.12) 0%, rgba(250, 251, 253, 0.85) 50%, rgba(47,140,153, 0.1) 100%);
  border-bottom: none;
  padding-bottom: 40px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(47,140,153, 0.18) 0%, transparent 65%);
  pointer-events: none;
  animation: heroGlow 8s ease-in-out infinite alternate;
  filter: blur(40px);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(47,140,153, 0.12) 0%, transparent 65%);
  pointer-events: none;
  animation: heroGlow 10s ease-in-out infinite alternate-reverse;
  filter: blur(40px);
}

@keyframes heroGlow {
  from {
    opacity: 0.4;
    transform: scale(1) translate(0, 0);
  }
  to {
    opacity: 1;
    transform: scale(1.4) translate(30px, -20px);
  }
}

.hero__inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 72px 24px 64px;
  display: flex;
  align-items: center;
  gap: 48px;
  position: relative;
}

.hero__content {
  flex: 1;
  min-width: 0;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
  border: 1px solid rgba(47,140,153, 0.3);
  border-radius: 100px;
  padding: 8px 18px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent-indigo);
  margin-bottom: 24px;
  letter-spacing: 0.04em;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px -10px rgba(47,140,153, 0.3);
  animation: slideUpFade 0.6s ease-out both;
}

.hero__badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
  animation: badgeSweep 3s ease-in-out infinite;
}

@keyframes badgeSweep {
  0%, 100% { left: -100%; }
  50% { left: 100%; }
}

.hero__badge svg {
  opacity: 0.9;
}

.hero__title {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  margin-bottom: 20px;
  animation: slideUpFade 0.6s ease-out 0.1s both;
}

.hero__highlight {
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-amber), var(--accent-cyan));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientText 4s ease-in-out infinite;
}

@keyframes gradientText {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.hero__desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 28px;
  max-width: 520px;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* ============================================
   ADVANCED FEATURES: FAVORITES & MATCH BADGE
   ============================================ */

/* Favorites toggle button in filter bar */
.btn--fav-toggle.active {
  background: rgba(244, 63, 94, 0.15);
  border-color: var(--accent-rose);
  color: var(--accent-rose);
}

.btn--fav-toggle.active svg {
  fill: var(--accent-rose);
}

.card__top-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

.card__favorite-btn,
.card__menu-trigger {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(15, 15, 20, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: white;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.card__favorite-btn:hover,
.card__menu-trigger:hover {
  background: rgba(15, 15, 20, 0.88);
  transform: translateY(-1px) scale(1.04);
}

.card__favorite-btn.active {
  color: var(--accent-rose);
}

.card__favorite-btn.active svg {
  fill: var(--accent-rose);
  stroke: var(--accent-rose);
}

.card__menu {
  position: absolute;
  top: 48px;
  right: 0;
  min-width: 240px;
  display: none;
  gap: 4px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(16px);
}

.card__menu.active {
  display: grid;
}

.card__menu-item {
  width: 100%;
  border: none;
  background: transparent;
  padding: 11px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.card__menu-item:hover {
  background: rgba(47,140,153, 0.12);
  color: var(--accent-indigo);
  transform: translateX(1px);
}

.card__menu-item i {
  width: 16px;
  text-align: center;
  color: var(--text-muted);
}

.action-modal {
  max-width: 720px;
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
}

.action-modal .auth-modal__header {
  padding: 32px 32px 18px;
  text-align: left;
}

.action-modal .auth-modal__body {
  padding: 0 32px 28px;
  overflow-y: auto;
}

.action-modal__listing {
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-card-hover);
}

.action-modal__preview {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.action-modal__preview-image,
.action-modal__preview-placeholder {
  width: 84px;
  height: 84px;
  border-radius: 14px;
  flex-shrink: 0;
}

.action-modal__preview-image {
  object-fit: cover;
}

.action-modal__preview-placeholder {
  background: rgba(47,140,153, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-indigo);
}

.action-modal__preview-content {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.action-modal__preview-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
}

.action-modal__preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.action-modal__preview-price {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--accent-violet);
}

.action-modal__body {
  display: grid;
  gap: 18px;
}

.action-modal__form {
  gap: 14px;
}

.action-modal__form input,
.action-modal__form select,
.action-modal__form textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.92rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.action-modal__form input:focus,
.action-modal__form select:focus,
.action-modal__form textarea:focus {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px rgba(47,140,153, 0.15);
}

.action-modal__client-hint {
  margin: 8px 0 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.action-modal__section {
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.action-modal__section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.action-modal__section-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.action-modal__section-copy label,
.action-modal__section-copy strong {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-transform: none;
}

.action-modal__section-copy span:last-child {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.action-modal__section-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(47,140,153, 0.16);
  color: var(--accent-indigo);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.action-modal__selection-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.action-modal__selection-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-modal__selection-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 700;
}

.action-modal__collapsible {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(47,140,153, 0.08), rgba(255, 255, 255, 0.98));
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.action-modal__collapsible-summary {
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  cursor: pointer;
}

.action-modal__collapsible-summary::-webkit-details-marker {
  display: none;
}

.action-modal__collapsible-summary::after {
  content: '+';
  position: absolute;
  top: 16px;
  right: 16px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.action-modal__collapsible[open] .action-modal__collapsible-summary::after {
  content: '−';
}

.action-modal__collapsible-summary {
  position: relative;
  padding-right: 54px;
}

.action-modal__collapsible-body {
  padding: 0 16px 16px;
  display: grid;
  gap: 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.action-modal__client-list {
  display: grid;
  gap: 10px;
  max-height: 236px;
  overflow-y: auto;
  padding-right: 4px;
}

.action-modal__client-list--compact {
  max-height: 280px;
}

.action-modal__client-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.action-modal__client-option:hover {
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
  background: rgba(239, 246, 255, 0.78);
}

.action-modal__client-option.is-selected {
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.12);
  background: rgba(239, 246, 255, 0.92);
}

.action-modal__client-option.is-disabled {
  opacity: 0.72;
  cursor: default;
  background: rgba(248, 250, 252, 0.96);
}

.action-modal__client-option.is-disabled:hover {
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: none;
  background: rgba(248, 250, 252, 0.96);
}

.action-modal__client-option input {
  margin-top: 4px;
  flex-shrink: 0;
}

.action-modal__client-option-content,
.action-modal__client-option-copy {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 4px;
}

.action-modal__client-option-name {
  color: var(--text-primary);
  font-size: 0.93rem;
  font-weight: 800;
  line-height: 1.35;
}

.action-modal__client-option-meta {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.45;
}

.action-modal__client-option-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.action-modal__status-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.action-modal__status-badge--success {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.action-modal__status-badge--muted {
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-secondary);
}

.action-modal__client-multi-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.action-modal__inline-btn {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: var(--text-primary);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.action-modal__inline-btn:hover:not(:disabled) {
  border-color: rgba(37, 99, 235, 0.24);
  background: rgba(239, 246, 255, 0.86);
}

.action-modal__inline-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.action-modal__client-empty {
  padding: 18px 16px;
  border-radius: 14px;
  border: 1px dashed rgba(15, 23, 42, 0.14);
  background: rgba(248, 250, 252, 0.92);
  color: var(--text-secondary);
  font-size: 0.84rem;
  text-align: center;
}

@media (max-width: 768px) {
  .action-modal {
    width: min(100%, calc(100vw - 16px));
    max-height: 92vh;
  }

  .action-modal .auth-modal__header,
  .action-modal .auth-modal__body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .action-modal__preview {
    flex-direction: column;
  }

  .action-modal__preview-image,
  .action-modal__preview-placeholder {
    width: 100%;
    height: 164px;
  }

  .action-modal__section-head,
  .action-modal__collapsible-summary,
  .action-modal__client-multi-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .action-modal__selection-count {
    white-space: normal;
  }

  .action-modal__client-list,
  .action-modal__client-list--compact {
    max-height: 220px;
  }
}

.hidden {
  display: none !important;
}

/* AI Match Badge */
.card__match-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(47,140,153, 0.9);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  z-index: 10;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(47,140,153, 0.3);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card__match-badge svg {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .header__inner {
    padding: 0 16px;
  }

  .btn--hero {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
  }
}

.btn--hero {
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  background: var(--gradient-gold);
  color: white;
  box-shadow: 0 4px 20px rgba(47,140,153, 0.3);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.btn--hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: heroButtonShimmer 3s ease-in-out infinite;
}

@keyframes heroButtonShimmer {
  0%, 100% { left: -100%; }
  50% { left: 100%; }
}

.btn--hero::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: calc(var(--radius-md) + 3px);
  background: linear-gradient(135deg, rgba(47,140,153,0.4), rgba(212,185,78,0.2), rgba(47,140,153,0.4));
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition);
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.02); }
}

.btn--hero:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 36px rgba(47,140,153, 0.5), var(--shadow-glow-gold);
}

.btn--hero:hover::after {
  opacity: 1;
}

.btn--hero:active {
  transform: translateY(0);
}

.hero__hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Hero visual - animated chat preview */
.hero__visual {
  flex: 0 0 340px;
  display: flex;
  justify-content: center;
}

.hero__chat-preview {
  width: 300px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: heroPreviewFloat 4s ease-in-out infinite;
}

@keyframes heroPreviewFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.hero__preview-msg {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.82rem;
  line-height: 1.4;
  max-width: 85%;
  animation: chatMsgIn 0.5s ease both;
}

.hero__preview-msg--user {
  align-self: flex-end;
  background: var(--gradient-primary);
  color: white;
  border-bottom-right-radius: 4px;
  animation-delay: 0.3s;
}

.hero__preview-msg--bot {
  align-self: flex-start;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
  animation-delay: 0.8s;
}

.hero__preview-typing {
  display: flex;
  gap: 3px;
  margin-bottom: 6px;
}

.hero__preview-typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.4s infinite ease-in-out;
}

.hero__preview-typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.hero__preview-typing span:nth-child(3) {
  animation-delay: 0.4s;
}

.hero__preview-card {
  background: rgba(47,140,153, 0.08);
  border: 1px solid rgba(47,140,153, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  animation: chatMsgIn 0.5s ease both;
  animation-delay: 1.3s;
}

.hero__preview-card-price {
  font-size: 1rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 2px;
}

.hero__preview-card-title {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Hero responsive */
@media (max-width: 768px) {
  .hero__inner {
    flex-direction: column;
    padding: 32px 16px;
    gap: 24px;
  }

  .hero__title {
    font-size: 1.5rem;
  }

  .hero__visual {
    flex: none;
    width: 100%;
  }

  .hero__chat-preview {
    width: 100%;
    max-width: 320px;
  }

  .hero__actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================
   CHAT FAB
   ============================================ */
.chat-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--gradient-gold);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(47,140,153, 0.35);
  transition: all var(--transition-spring);
}

.chat-fab::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47,140,153, 0.3), transparent 70%);
  animation: fabGlow 2.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes fabGlow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

.chat-fab:hover {
  transform: scale(1.12) rotate(8deg);
  box-shadow: 0 10px 36px rgba(47,140,153, 0.5), var(--shadow-glow-gold);
}

.chat-fab.hidden {
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
}

/* ============================================
   CHAT PANEL
   ============================================ */
.chat-panel {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 300;
  width: 420px;
  height: 580px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(47,140,153, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Fullscreen mode */
.chat-panel.fullscreen {
  bottom: 0;
  right: 0;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  box-shadow: none;
  z-index: 9999;
}

.chat-panel.fullscreen .chat-panel__messages {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.chat-panel.fullscreen .chat-panel__input {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.chat-panel.fullscreen .chat-panel__header {
  padding: 16px 32px;
}

.chat-panel.fullscreen .chat-msg__bubble {
  max-width: 70%;
}

.chat-panel.fullscreen .chat-prop-card {
  flex: 0 0 calc(50% - 5px);
}

.chat-panel.fullscreen .chat-card-image {
  height: 140px;
}

.chat-panel.fullscreen .chat-valuation-wrapper {
  max-width: 700px;
}

/* Header */
.chat-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(47,140,153, 0.08);
  border-bottom: 1px solid var(--border-color);
}

.chat-panel__header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-panel__header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-panel__avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.chat-panel__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.chat-panel__subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

.chat-panel__close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  display: flex;
}

.chat-panel__close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.chat-panel__expand {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  display: flex;
}

.chat-panel__expand:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-indigo);
}

/* "Ver todas" button in chat */
.chat-view-all-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  margin-top: 12px;
  background: linear-gradient(135deg, rgba(47,140,153, 0.1), rgba(47,140,153, 0.08));
  border: 1px solid rgba(47,140,153, 0.3);
  border-radius: var(--radius-md);
  color: var(--accent-indigo);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  animation: chatMsgIn 0.3s ease-out;
}

.chat-view-all-btn:hover {
  background: linear-gradient(135deg, rgba(47,140,153, 0.18), rgba(47,140,153, 0.14));
  border-color: rgba(47,140,153, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(47,140,153, 0.2);
}

.chat-view-all-btn:active {
  transform: translateY(0);
}

.chat-view-all-btn svg {
  flex-shrink: 0;
  opacity: 0.8;
}

/* Messages area */
.chat-panel__messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.chat-panel__messages::-webkit-scrollbar {
  width: 5px;
}

.chat-panel__messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-panel__messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

/* Messages */
.chat-msg {
  display: flex;
  animation: chatMsgIn 0.3s ease both;
}

.chat-msg--bot {
  justify-content: flex-start;
}

.chat-msg--user {
  justify-content: flex-end;
}

.chat-msg__bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.85rem;
  line-height: 1.55;
  word-wrap: break-word;
}

.chat-msg--bot .chat-msg__bubble {
  background: var(--bg-card);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border-color);
}

.chat-msg--user .chat-msg__bubble {
  background: var(--gradient-primary);
  color: white;
  border-bottom-right-radius: 4px;
}

/* Typing indicator */
.chat-typing {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border-color);
  width: fit-content;
}

.chat-typing__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.4s infinite ease-in-out;
}

.chat-typing__dot:nth-child(2) {
  animation-delay: 0.2s;
}

.chat-typing__dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {

  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }

  40% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

@keyframes chatMsgIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Input area */
.chat-panel__input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.chat-panel__input input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  padding: 10px 18px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition);
}

.chat-panel__input input::placeholder {
  color: var(--text-muted);
}

.chat-panel__input input:focus {
  border-color: var(--border-active);
}

.chat-panel__send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}

.chat-panel__send:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 12px rgba(47,140,153, 0.4);
}

.chat-panel__send:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Property cards inside chat */
.chat-property {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 8px;
  transition: border-color var(--transition);
}

.chat-property:hover {
  border-color: rgba(47,140,153, 0.3);
}

.chat-property__title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.chat-property__price {
  font-size: 0.95rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.chat-property__meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.chat-property__link {
  font-size: 0.75rem;
  color: var(--accent-indigo);
  text-decoration: none;
  font-weight: 600;
}

.chat-property__link:hover {
  color: var(--accent-violet);
}

/* Chat responsive */
@media (max-width: 480px) {
  .chat-panel {
    width: calc(100vw - 16px);
    height: calc(100vh - 100px);
    bottom: 8px;
    right: 8px;
    border-radius: var(--radius-lg);
  }

  .chat-fab {
    bottom: 16px;
    right: 16px;
  }
}

/* ============================================
   CHAT — PROPERTY SLIDER
   ============================================ */
.chat-slider-wrapper {
  width: 100%;
  animation: chatMsgIn 0.4s ease-out;
}

.chat-slider-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.chat-results-badge {
  background: linear-gradient(135deg, rgba(47,140,153, 0.15), rgba(47,140,153, 0.1));
  border: 1px solid rgba(47,140,153, 0.25);
  color: var(--accent-indigo);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.chat-results-summary {
  color: var(--text-secondary);
  font-size: 0.75rem;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-slide-counter {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
}

.chat-slider-track-container {
  position: relative;
}

.chat-slider-track {
  display: flex;
  gap: 10px;
  overflow: hidden;
  scroll-behavior: smooth;
}

/* ============================================
   CHAT — PROPERTY CARD
   ============================================ */
.chat-prop-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  flex: 0 0 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition);
  box-shadow: var(--shadow-sm);
}

.chat-prop-card:hover {
  border-color: rgba(47,140,153, 0.3);
}

.chat-card-image {
  width: 100%;
  height: 100px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, rgba(47,140,153, 0.08), rgba(47,140,153, 0.06));
  flex-shrink: 0;
}

.chat-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.chat-prop-emoji {
  font-size: 2rem;
  opacity: 0.7;
}

.chat-img-placeholder span {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 500;
}

.chat-portal-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(15, 15, 20, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--accent-indigo);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chat-operation-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chat-operation-badge.alquiler {
  background: rgba(47,140,153, 0.85);
  color: #fff;
}

.chat-operation-badge.compra {
  background: rgba(47,140,153, 0.85);
  color: #fff;
}

.chat-card-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.chat-card-price {
  font-size: 1.1rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.chat-card-title {
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chat-card-location {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.chat-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.chat-stat-chip {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 0.68rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.chat-chip-icon {
  font-size: 0.72rem;
}

.chat-card-extras {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.chat-extra-tag {
  background: rgba(47,140,153, 0.08);
  border: 1px solid rgba(47,140,153, 0.18);
  color: var(--accent-indigo);
  font-size: 0.62rem;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 10px;
}

.chat-card-description {
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chat-card-footer {
  padding: 8px 12px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-card-link {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-indigo);
  text-decoration: none;
  transition: color var(--transition);
}

.chat-card-link:hover {
  color: var(--accent-violet);
}

.chat-card-source {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 500;
}

/* ============================================
   CHAT — SLIDER NAVIGATION
   ============================================ */
.chat-slider-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  justify-content: center;
}

.chat-slider-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.chat-slider-btn:hover:not(:disabled) {
  background: rgba(47,140,153, 0.12);
  border-color: var(--accent-indigo);
  color: var(--accent-indigo);
}

.chat-slider-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.chat-slider-dots {
  display: flex;
  gap: 4px;
  align-items: center;
  max-width: 200px;
  overflow: hidden;
}

.chat-slider-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border-color);
  transition: background 0.25s, transform 0.25s;
  cursor: pointer;
  flex-shrink: 0;
}

.chat-slider-dot.active {
  background: var(--accent-indigo);
  transform: scale(1.4);
}

/* ============================================
   CHAT — VALUATION CARD
   ============================================ */
.chat-valuation-wrapper {
  background: linear-gradient(145deg, var(--bg-card), var(--bg-card-hover));
  border: 1px solid rgba(47,140,153, 0.25);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  width: 100%;
  animation: chatMsgIn 0.4s ease-out;
}

.chat-val-header {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-val-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-indigo);
}

.chat-val-property-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.chat-val-tag {
  background: rgba(47,140,153, 0.1);
  border: 1px solid rgba(47,140,153, 0.2);
  color: var(--accent-indigo);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 14px;
}

.chat-val-location {
  color: var(--text-secondary);
  font-size: 0.72rem;
  margin-left: 2px;
}

.chat-val-price-block {
  padding: 14px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-val-price-label {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.chat-val-price-main {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.chat-val-price-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-val-range-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 60px;
}

.chat-range-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chat-range-value {
  font-size: 0.78rem;
  font-weight: 700;
}

.chat-range-min {
  color: var(--text-secondary);
}

.chat-range-max {
  color: var(--text-primary);
}

.chat-val-range-bar {
  flex: 1;
}

.chat-val-range-track {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  position: relative;
}

.chat-val-range-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(47,140,153, 0.4), rgba(47,140,153, 0.5));
  border-radius: 2px;
}

.chat-val-range-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: var(--accent-indigo);
  border: 2px solid var(--bg-primary);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(47,140,153, 0.5);
}

.chat-val-rent-ref,
.chat-val-perm2 {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.chat-val-rent-ref strong,
.chat-val-perm2 strong {
  color: var(--text-secondary);
}

.chat-val-confidence {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-conf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-conf-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.chat-conf-based {
  font-size: 0.64rem;
  color: var(--text-muted);
}

.chat-conf-bar-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.chat-conf-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

.chat-val-section-title {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.chat-val-analysis {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
}

.chat-val-analysis p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.chat-val-factors {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
}

.chat-val-factors-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.chat-val-factor {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 14px;
}

.chat-factor-pos {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: var(--accent-emerald);
}

.chat-factor-neg {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.22);
  color: var(--accent-rose);
}

.chat-factor-icon {
  font-weight: 900;
  font-size: 0.72rem;
}

.chat-val-comparables {
  padding: 12px 14px;
}

.chat-comp-table {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-comp-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: background var(--transition);
}

.chat-comp-row:hover {
  background: rgba(47,140,153, 0.04);
  border-color: rgba(47,140,153, 0.2);
}

.chat-comp-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-comp-details {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.chat-comp-price {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-indigo);
}

.chat-comp-chip {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.64rem;
  color: var(--text-muted);
}

.chat-comp-portal {
  margin-left: auto;
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Chat-specific bot text with HTML formatting */
.chat-msg--bot .chat-msg__bubble strong {
  color: var(--accent-indigo);
  font-weight: 600;
}

.chat-msg--bot .chat-msg__bubble a {
  color: var(--accent-indigo);
  text-decoration: none;
  border-bottom: 1px solid rgba(47,140,153, 0.3);
  transition: border-color var(--transition);
}

.chat-msg--bot .chat-msg__bubble a:hover {
  border-bottom-color: var(--accent-indigo);
}

/* Searching indicator in chat */
.chat-searching {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(47,140,153, 0.06);
  border: 1px solid rgba(47,140,153, 0.15);
  border-radius: var(--radius-md);
  color: var(--accent-indigo);
  font-size: 0.78rem;
  animation: chatMsgIn 0.3s ease-out;
}

.chat-searching .chat-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(47,140,153, 0.2);
  border-top-color: var(--accent-indigo);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

/* ============================================
   NAVIGATION BAR (shared across all pages)
   ============================================ */
.header__nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.2vw, 20px);
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.header__nav::-webkit-scrollbar {
  display: none;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 1px;
  border-radius: 0;
  border: 0;
  font-size: 0.875rem;
  font-weight: 720;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  position: relative;
}

.nav__link::after {
  content: none;
}

.nav__link--wp {
  gap: 0;
}

.nav__link:hover {
  color: var(--text-primary);
  transform: translateY(-1px);
}

.nav__link--active {
  color: var(--accent-indigo);
  text-shadow: 0 0 16px rgba(47,140,153, 0.18);
}

.nav__link:hover::after,
.nav__link--active::after {
  content: none;
}

/* ============================================
   HOME PAGE — HERO
   ============================================ */
.home-hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  padding: 28px 0 36px;
}

.home-hero__bg-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 30%, rgba(47,140,153, 0.12) 0%, transparent 24%),
    radial-gradient(ellipse at 30% 50%, rgba(47,140,153, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse at 78% 34%, rgba(47,140,153, 0.06) 0%, transparent 52%);
  pointer-events: none;
}

.home-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1380px;
  margin: 0 auto;
  padding: 44px 24px 60px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 40px;
  align-items: center;
}

.home-hero__content {
  position: relative;
  z-index: 1;
}

.home-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(47,140,153, 0.12);
  border: 1px solid rgba(47,140,153, 0.25);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-indigo);
  margin-bottom: 24px;
  animation: fadeInDown 0.6s ease-out;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-hero__title {
  max-width: 11ch;
  font-size: clamp(3rem, 6vw, 5.6rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.055em;
  color: var(--text-primary);
  margin-bottom: 22px;
  animation: fadeInUp 0.7s ease-out 0.1s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-hero__highlight {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-hero__desc {
  font-size: 1.08rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 620px;
  margin: 0 0 34px;
  animation: fadeInUp 0.7s ease-out 0.2s both;
}

.home-hero__actions {
  display: flex;
  gap: 14px;
  justify-content: flex-start;
  flex-wrap: wrap;
  animation: fadeInUp 0.7s ease-out 0.3s both;
}

.home-hero__secondary {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
}

.home-hero__microcopy {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 22px;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.home-hero__microcopy span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.home-hero__microcopy i {
  color: var(--accent-emerald);
}

.home-hero__trust-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 720px;
  margin-top: 28px;
}

.home-hero__trust-item {
  padding: 16px 18px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  backdrop-filter: blur(12px);
}

.home-hero__trust-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
}

.home-hero__trust-item span {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.home-hero__visual {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-dashboard {
  position: relative;
  width: min(100%, 560px);
  min-height: 560px;
}

.hero-dashboard__orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.9;
  pointer-events: none;
}

.hero-dashboard__orb--one {
  top: 14px;
  right: 24px;
  width: 170px;
  height: 170px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.32), transparent 70%);
}

.hero-dashboard__orb--two {
  bottom: 36px;
  left: 10px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(47,140,153, 0.28), transparent 70%);
}

.hero-dashboard__panel {
  position: absolute;
  border-radius: 26px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(249, 249, 249, 0.9));
  box-shadow: 0 28px 50px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(18px);
}

.hero-dashboard__panel--search {
  top: 0;
  left: 0;
  width: 76%;
  padding: 22px;
  animation: fadeInUp 0.7s ease-out 0.2s both;
}

.hero-dashboard__panel--results {
  top: 132px;
  right: 0;
  width: 82%;
  padding: 22px;
  animation: fadeInUp 0.7s ease-out 0.35s both;
}

.hero-dashboard__panel--valuation {
  left: 48px;
  bottom: 8px;
  width: 70%;
  padding: 20px;
  animation: fadeInUp 0.7s ease-out 0.5s both;
}

.hero-dashboard__label {
  margin-bottom: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.hero-dashboard__searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-weight: 600;
}

.hero-dashboard__searchbar i {
  color: var(--accent-cyan);
}

.hero-dashboard__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hero-dashboard__chips span,
.hero-dashboard__delta,
.hero-dashboard__source,
.hero-dashboard__match {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.hero-dashboard__chips span {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-secondary);
}

.hero-dashboard__panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-dashboard__panel-head strong {
  display: block;
  margin-top: 4px;
  font-size: 1.1rem;
}

.hero-dashboard__delta {
  background: rgba(52, 211, 153, 0.14);
  color: var(--accent-emerald);
}

.hero-dashboard__listing {
  padding: 16px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.hero-dashboard__listing + .hero-dashboard__listing {
  margin-top: 12px;
}

.hero-dashboard__listing--muted {
  opacity: 0.88;
}

.hero-dashboard__listing-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.hero-dashboard__source {
  background: rgba(47,140,153, 0.15);
  color: #26818f;
}

.hero-dashboard__match {
  background: rgba(34, 211, 238, 0.12);
  color: var(--accent-cyan);
}

.hero-dashboard__price {
  margin-bottom: 4px;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-dashboard__listing p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.hero-dashboard__valuation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

.hero-dashboard__valuation-grid span {
  display: block;
  margin-bottom: 5px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.hero-dashboard__valuation-grid strong {
  font-size: 0.96rem;
  color: var(--text-primary);
}

/* ============================================
   HOME PAGE — FEATURES
   ============================================ */
.features {
  padding: 80px 24px;
  position: relative;
  z-index: 1;
}

.features__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.features__header {
  text-align: center;
  margin-bottom: 56px;
}

.features__title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.features__subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(47,140,153, 0.04), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.feature-card:hover {
  border-color: rgba(47,140,153, 0.2);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.feature-card__icon--indigo {
  background: rgba(47,140,153, 0.15);
  color: var(--accent-indigo);
}

.feature-card__icon--violet {
  background: rgba(47,140,153, 0.12);
  color: var(--accent-violet);
}

.feature-card__icon--emerald {
  background: rgba(47,140,153, 0.15);
  color: var(--accent-emerald);
}

.feature-card__icon--cyan {
  background: rgba(122, 176, 187, 0.15);
  color: var(--accent-cyan);
}

.feature-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.feature-card__desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.feature-card__link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-indigo);
  text-decoration: none;
  transition: color var(--transition);
}

.feature-card__link:hover {
  color: var(--accent-violet);
}

/* ============================================
   HOME PAGE — PORTALS SECTION
   ============================================ */
.portals-section {
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
  padding: 28px 24px;
}

.portals-section__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}

.portals-section__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.portals-section__logos {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.portal-badge {
  padding: 6px 16px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.portal-badge:hover {
  border-color: rgba(47,140,153, 0.4);
  color: var(--text-primary);
  background: rgba(47,140,153, 0.08);
}

/* ============================================
   HOME PAGE — STATS
   ============================================ */
.home-stats {
  padding: 60px 24px;
}

.home-stats__inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 2px;
  background: var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.home-stat {
  background: var(--bg-card);
  padding: 32px 24px;
  text-align: center;
}

.home-stat__value {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

.home-stat__label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   HOME PAGE — CTA FINAL
   ============================================ */
.home-cta {
  background: linear-gradient(135deg, rgba(47,140,153, 0.1), rgba(47,140,153, 0.06));
  border-top: 1px solid rgba(47,140,153, 0.15);
  padding: 80px 24px;
}

.home-cta__inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.home-cta__title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.home-cta__desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* ============================================
   PAGE HERO (shared, compact — for inner pages)
   ============================================ */
.page-hero {
  position: relative;
  background: linear-gradient(135deg, rgba(47,140,153, 0.08), rgba(47,140,153, 0.04));
  border-bottom: 1px solid var(--border-color);
  padding: 48px 24px;
  text-align: center;
}

.page-hero__inner {
  max-width: 640px;
  margin: 0 auto;
}

.page-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-emerald);
  margin-bottom: 18px;
}

.page-hero__title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.page-hero__desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ============================================
   VALORACIONES PAGE
   ============================================ */
.val-main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.val-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .val-layout {
    grid-template-columns: 1fr;
  }
}

/* --- Form Panel --- */
.val-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: sticky;
  top: 80px;
}

.val-form-card__header {
  padding: 24px 24px 0;
  margin-bottom: 20px;
}

.val-form-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.val-form-card__subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.val-form {
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.val-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.val-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.val-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.val-required {
  color: var(--accent-rose);
}

.val-input,
.val-select,
.val-textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.875rem;
  outline: none;
  transition: all var(--transition);
  width: 100%;
}

.val-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b85' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.val-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

.val-input::placeholder,
.val-textarea::placeholder {
  color: var(--text-muted);
}

.val-input:focus,
.val-select:focus,
.val-textarea:focus {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px rgba(47,140,153, 0.1);
}

.val-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* Features checkboxes */
.val-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.val-features__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.val-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.83rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  user-select: none;
}

.val-checkbox-item:hover {
  background: rgba(47,140,153, 0.06);
  color: var(--text-primary);
}

.val-checkbox-item input[type="checkbox"] {
  display: none;
}

.val-checkbox__custom {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--text-muted);
  border-radius: 4px;
  background: transparent;
  flex-shrink: 0;
  position: relative;
  transition: all 0.15s ease;
}

.val-checkbox-item input[type="checkbox"]:checked+.val-checkbox__custom {
  background: var(--accent-indigo);
  border-color: var(--accent-indigo);
}

.val-checkbox-item input[type="checkbox"]:checked+.val-checkbox__custom::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.val-submit {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 0.95rem;
  margin-top: 4px;
}

/* --- Result Panel --- */
.val-result-panel {
  min-height: 400px;
}

/* Placeholder */
.val-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.val-placeholder__icon {
  margin-bottom: 20px;
  color: var(--text-muted);
}

.val-placeholder__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.val-placeholder__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 340px;
  line-height: 1.6;
  margin-bottom: 36px;
}

.val-placeholder__steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  width: 100%;
  max-width: 320px;
}

.val-step {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.val-step__num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(47,140,153, 0.12);
  border: 1px solid rgba(47,140,153, 0.2);
  color: var(--accent-indigo);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Loading */
.val-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  gap: 16px;
}

.val-loading__spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(47,140,153, 0.15);
  border-top-color: var(--accent-indigo);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.val-loading__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.val-loading__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.val-loading__steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  width: 100%;
  max-width: 300px;
}

.val-loading__step {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 0.4s ease;
  text-align: left;
}

.val-loading__step.active {
  background: rgba(47,140,153, 0.08);
  border-color: rgba(47,140,153, 0.2);
  color: var(--accent-indigo);
  font-weight: 600;
}

/* Result */
.val-result {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.val-result__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.val-result__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-emerald);
}

.val-result__reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.val-result__reset:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* Price card */
.val-price-card {
  background: linear-gradient(135deg, rgba(47,140,153, 0.08), rgba(47,140,153, 0.06));
  border: 1px solid rgba(47,140,153, 0.2);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
}

.val-price-card__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.val-price-card__value {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.val-price-card__range {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.val-price-card__range-low {
  color: var(--accent-amber);
}

.val-price-card__range-high {
  color: var(--accent-emerald);
}

.val-price-card__sqm {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Confidence bar */
.val-confidence {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.val-confidence__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.val-confidence__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.val-confidence__value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

.val-confidence__bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

.val-confidence__fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

/* Analysis card */
.val-analysis-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

.val-analysis-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-violet);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.val-analysis-card__body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Factors */
.val-factors {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

.val-factors__title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.val-factors__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.val-factor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
}

.val-factor--positive {
  background: rgba(52, 211, 153, 0.06);
  border: 1px solid rgba(52, 211, 153, 0.12);
}

.val-factor--negative {
  background: rgba(244, 63, 94, 0.06);
  border: 1px solid rgba(244, 63, 94, 0.12);
}

.val-factor__label {
  color: var(--text-secondary);
}

.val-factor--positive .val-factor__impact {
  color: var(--accent-emerald);
  font-weight: 700;
}


.val-factor--negative .val-factor__impact {
  color: var(--accent-rose);
  font-weight: 700;
}

/* ============================================
   BUTTON VARIANTS — Hero & Secondary
   ============================================ */
.btn--hero {
  background: #2f8c99;
  color: white;
  box-shadow: 0 4px 20px rgba(47,140,153, 0.3);
  padding: 13px 26px;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  text-decoration: none;
}

.btn--hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(47,140,153, 0.45);
  background: #226d78;
}

.btn--secondary {
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 13px 26px;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  text-decoration: none;
}

.btn--secondary:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
  border-color: rgba(0, 0, 0, 0.12);
}

.btn--fav-toggle.active {
  background: rgba(244, 63, 94, 0.12);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.25);
}

/* ============================================
   RESPONSIVE — Nav colapsable
   ============================================ */
@media (max-width: 768px) {
  .home-hero {
    min-height: auto;
    padding-top: 12px;
  }

  .home-hero__inner {
    grid-template-columns: 1fr;
    padding: 28px 16px 34px;
    gap: 28px;
  }

  .home-hero__title {
    max-width: none;
    font-size: 2.55rem;
    line-height: 1.02;
  }

  .home-hero__desc {
    font-size: 1rem;
  }

  .home-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .home-hero__actions .btn {
    justify-content: center;
  }

  .home-hero__trust-row {
    grid-template-columns: 1fr;
  }

  .home-hero__visual {
    min-height: auto;
  }

  .hero-dashboard {
    min-height: auto;
    display: grid;
    gap: 14px;
  }

  .hero-dashboard__panel {
    position: relative;
    inset: auto;
    width: 100%;
  }

  .hero-dashboard__panel--valuation {
    left: auto;
    bottom: auto;
  }

  .hero-dashboard__valuation-grid {
    grid-template-columns: 1fr 1fr;
  }

  .header__nav {
    display: none;
  }

  .header__nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    margin: 0 12px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    padding: 12px;
    z-index: 99;
    gap: 6px;
    box-shadow: 0 24px 48px -36px rgba(15, 23, 42, 0.34);
  }

  .nav__link {
    width: 100%;
    justify-content: flex-start;
  }

  .home-hero__title {
    font-size: 2rem;
  }

  .val-form__row {
    grid-template-columns: 1fr;
  }

  .val-features__grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   CHAT RESTORE NOTICE
   ============================================ */
.chat-restore-notice {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 6px 12px;
  margin: 4px auto;
  background: rgba(47,140,153, 0.06);
  border: 1px dashed rgba(47,140,153, 0.15);
  border-radius: 100px;
  width: fit-content;
  animation: fadeInUp 0.4s ease-out;
}

/* ============================================
   NEW CHAT BUTTON
   ============================================ */
.chat-panel__new {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chat-panel__new:hover {
  background: rgba(52, 211, 153, 0.12);
  color: var(--accent-emerald);
}

.chat-panel__new:active {
  transform: scale(0.9);
}

/* ============================================
   VALUATION — New sections (v2)
   ============================================ */

/* Form section labels */
.val-form__section-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 16px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
}

/* Data source badge */
.val-data-source {
  margin-bottom: 14px;
}

.val-ds-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 100px;
}

.val-ds-badge--real {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.val-ds-badge--index {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Price meta chips */
.val-price-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.val-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  padding: 4px 10px;
}

/* Comparables count */
.val-comparables-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Adjustments section */
.val-adjustments {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 16px;
}

.val-adjustments__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.val-adj-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.83rem;
}

.val-adj-row:last-child {
  border-bottom: none;
}

.val-adj-label {
  color: var(--text-secondary);
}

.val-adj-pct {
  font-weight: 700;
  font-size: 0.8rem;
  min-width: 40px;
  text-align: right;
}

.val-adj-eur {
  font-size: 0.78rem;
  color: var(--text-muted);
  min-width: 72px;
  text-align: right;
}

.val-adj-row--pos .val-adj-pct {
  color: var(--accent-emerald);
}

.val-adj-row--neg .val-adj-pct {
  color: var(--accent-rose);
}

.val-adjustments__total {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: right;
}

/* Comparables table */
.val-comparables {
  margin-top: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
}

.val-comparables__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.val-comp-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-sm);
}

.val-comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.val-comp-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-color);
}

.val-comp-table td {
  padding: 9px 10px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.val-comp-table tr:last-child td {
  border-bottom: none;
}

.val-comp-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.val-comp-link {
  color: var(--accent-indigo);
  text-decoration: none;
  font-weight: 500;
  max-width: 200px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.val-comp-link:hover {
  text-decoration: underline;
}

.val-comp-ppm2 {
  font-weight: 600;
  color: var(--text-primary) !important;
}

.val-portal-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  background: rgba(47,140,153, 0.1);
  color: var(--accent-indigo);
  border: 1px solid rgba(47,140,153, 0.15);
  text-transform: capitalize;
}

.val-comp-median td {
  background: rgba(47,140,153, 0.05) !important;
  border-top: 1px solid rgba(47,140,153, 0.15);
  color: var(--text-primary) !important;
  font-size: 0.78rem;
}

/* ============================================
   CATASTRO FLOW — Step cards (v2)
   ============================================ */

/* Step badge */
.val-step-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(47,140,153, 0.12);
  color: var(--accent-indigo);
  border: 1px solid rgba(47,140,153, 0.2);
  margin-bottom: 10px;
}

.val-step-badge--ok {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.2);
}

/* Address search box */
.cat-search-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
  padding: 0 24px 24px;
}

.val-input--lg {
  font-size: 1rem;
  padding: 12px 16px;
}

/* Skip to manual link */
.cat-skip-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 4px 0;
  text-align: center;
  transition: color 0.2s;
}

.cat-skip-link:hover {
  color: var(--accent-indigo);
}

/* Catastro result card */
.cat-result-card {
  border-color: rgba(34, 197, 94, 0.2) !important;
}

/* Catastro data grid */
.cat-data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
  cursor: pointer;
}

.cat-data-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: background 0.2s;
}

.cat-data-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.cat-data-item--full {
  grid-column: 1 / -1;
}

.cat-data-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cat-data-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.cat-data-rc {
  font-size: 0.78rem;
  font-family: monospace;
  letter-spacing: 0.04em;
  color: var(--accent-indigo);
}

/* Catastro card actions */
.cat-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* Secondary button */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}



/* ============================================
   MAP MARKERS & CLUSTERS
   ============================================ */
.price-marker-wrapper {
  background: transparent !important;
  border: none !important;
  pointer-events: auto;
}

.price-marker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
  cursor: pointer;
  z-index: 10;
}

.price-marker__content {
  background: linear-gradient(135deg, rgba(15, 15, 20, 0.85) 0%, rgba(30, 30, 45, 0.9) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 7px 14px;
  border-radius: 24px;
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  position: relative;
  z-index: 2;
}

.price-marker--approx .price-marker__label {
  background: rgba(249, 249, 249, 0.85);
  backdrop-filter: blur(4px);
  border-style: dashed;
  color: var(--text-secondary);
}

.price-marker__text {
  background: linear-gradient(to bottom, #fff, #f1f5f9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.price-marker__tip {
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 7px solid rgba(15, 15, 20, 0.85);
  margin-top: -1px;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
}

/* Hover & Selected States */
.price-marker:hover {
  transform: translateY(-5px) scale(1.08);
  z-index: 100;
  filter: drop-shadow(0 8px 24px rgba(99, 102, 241, 0.35));
}

.price-marker--selected {
  transform: translateY(-6px) scale(1.15);
  z-index: 101;
  filter: drop-shadow(0 12px 32px rgba(99, 102, 241, 0.5));
}

.price-marker--selected .price-marker__content {
  background: var(--gradient-primary);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.45);
}

.price-marker--selected .price-marker__text {
   -webkit-text-fill-color: #fff;
}

.price-marker--selected .price-marker__tip {
  border-top-color: var(--accent-indigo);
}

/* Approximate style */
.price-marker--approx .price-marker__content {
  background: rgba(30, 41, 59, 0.5);
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.3);
  color: #cbd5e1;
}

/* Clusters */
.marker-cluster-custom {
  background: rgba(47,140,153, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 12px rgba(47,140,153, 0.4);
  transition: all 0.2s ease;
}

.marker-cluster-custom:hover {
  transform: scale(1.1);
  background: rgba(47,140,153, 0.95);
  box-shadow: 0 6px 16px rgba(47,140,153, 0.5);
}

.marker-cluster-medium {
  font-size: 1rem;
}

.marker-cluster-large {
  font-size: 1.1rem;
}

/* ============================================
   MAP POPUPS & DIMMING
   ============================================ */
.leaflet-popup-content-wrapper {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.leaflet-popup-tip-container {
  display: none;
}

.custom-popup {
  width: 300px;
  animation: popupScaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popupScaleIn {
  from { opacity: 0; transform: scale(0.9) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.popup-card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 
              0 0 1px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  color: #1e293b;
}

.popup-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  opacity: 1;
}

.popup-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.popup-card__price {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #0f172a, var(--accent-indigo));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.popup-card__source {
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 8px;
  background: rgba(47,140,153, 0.15);
  color: var(--accent-indigo);
  border-radius: 100px;
  letter-spacing: 0.06em;
}

.popup-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 14px;
  line-height: 1.4;
}

.popup-card__details {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.popup-card__chip {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  padding: 7px 14px;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
  transition: all 0.2s ease;
}

.popup-card__chip:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #1e293b;
}

.popup-card__chip svg {
  color: var(--accent-indigo);
  opacity: 0.9;
}

.popup-card__address {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 18px;
  line-height: 1.6;
}

.popup-card__address svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: #94a3b8;
}

.popup-card__precision {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 22px;
  padding: 7px 14px;
  border-radius: 10px;
  background: #f1f5f9;
}

.precision-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.popup-card__precision--exact {
  color: #059669;
}
.popup-card__precision--exact .precision-dot {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.popup-card__precision--approx {
  color: #d97706;
}
.popup-card__precision--approx .precision-dot {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.popup-card__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  background: var(--gradient-primary);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.35);
}

.popup-card__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.45);
  filter: brightness(1.05);
}

.popup-card__link span {
  display: inline-block;
}

/* Map dimming effect */
.map-dimmed .leaflet-tile-pane {
  filter: brightness(0.4) saturate(0.8);
  transition: filter 0.5s ease;
}

.leaflet-tile-pane {
  transition: filter 0.5s ease;
}


@media (max-width: 480px) {
  .home-hero__title {
    font-size: 2.15rem;
  }

  .home-hero__microcopy {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .hero-dashboard__valuation-grid {
    grid-template-columns: 1fr;
  }

  .hero-dashboard__panel-head,
  .hero-dashboard__listing-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================
   TICKET SYSTEM
   ============================================ */

/* Admin Tab Switcher */
.admin-tab-switcher {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  width: fit-content;
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.admin-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.admin-tab.active {
  background: rgba(47,140,153, 0.14);
  color: var(--accent-indigo);
  box-shadow: 0 2px 8px rgba(47,140,153, 0.15);
}

/* Ticket Status Badges */
.ticket-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: capitalize;
}

.ticket-status-badge--open {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: var(--accent-emerald);
}

.ticket-status-badge--closed {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text-muted);
}

/* Ticket Toggle Status Button */
.btn--ticket-toggle-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
}

.btn--ticket-toggle-status:hover {
  background: rgba(47,140,153, 0.12);
  border-color: rgba(47,140,153, 0.3);
  color: var(--accent-indigo);
}

/* Admin Ticket Description */
.admin-ticket-description {
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin: 0 16px 12px;
}

.admin-ticket-description strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.admin-ticket-description p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.ticket-rich-description {
  display: grid;
  gap: 14px;
}

.ticket-rich-copy {
  display: grid;
  gap: 8px;
}

.ticket-rich-copy p {
  margin: 0;
}

.ticket-rich-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.ticket-rich-media {
  width: 120px;
  height: 120px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.ticket-rich-image {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  display: block;
}

.ticket-rich-image-fallback {
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  text-align: center;
  color: var(--text-muted);
  background: linear-gradient(180deg, rgba(47,140,153, 0.08), rgba(255, 255, 255, 0.04));
}

.ticket-rich-image-fallback i {
  font-size: 1.2rem;
  color: var(--accent-indigo);
}

.ticket-rich-image-fallback span {
  font-size: 0.78rem;
  line-height: 1.35;
}

.ticket-rich-media.is-fallback .ticket-rich-image-fallback {
  display: flex;
}

.ticket-rich-content {
  min-width: 0;
  display: grid;
  gap: 10px;
  align-content: start;
}

.ticket-rich-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.ticket-rich-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.ticket-rich-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(47,140,153, 0.12);
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.ticket-rich-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--accent-indigo);
  font-weight: 700;
  text-decoration: none;
}

.ticket-rich-link:hover {
  text-decoration: underline;
}

/* Conversation item bottom row */
.conversation-item__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ============================================
   CLIENT TICKETS PAGE
   ============================================ */
.tickets-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
}

.tickets-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
}

.tickets-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-indigo);
  margin-bottom: 8px;
}

.tickets-hero__title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.tickets-hero__desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 520px;
}

/* Ticket Cards List */
.tickets-list-section {
  margin-bottom: 32px;
}

.tickets-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ticket-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  cursor: pointer;
  transition: all var(--transition);
}

.ticket-card:hover {
  border-color: rgba(47,140,153, 0.25);
  box-shadow: 0 4px 16px rgba(2, 6, 23, 0.2);
  transform: translateY(-2px);
}

.ticket-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.ticket-card__subject {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.ticket-card__desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 12px;
}

.ticket-card__footer {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.ticket-card__footer i {
  margin-right: 4px;
}

/* Tickets Empty State */
.tickets-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.tickets-empty i {
  font-size: 2.5rem;
  margin-bottom: 16px;
  color: var(--accent-indigo);
  opacity: 0.5;
}

.tickets-empty p {
  font-size: 0.92rem;
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Ticket Detail Panel */
.ticket-detail-panel {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 24px;
}

.ticket-detail {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ticket-detail__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
}

.ticket-detail__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--accent-indigo);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity var(--transition);
}

.ticket-detail__back:hover {
  opacity: 0.8;
}

.ticket-detail__subject {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  padding: 20px 24px 4px;
  margin: 0;
}

.ticket-detail__description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  padding: 0 24px 12px;
  margin: 0;
}

.ticket-detail__meta {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0 24px 20px;
  border-bottom: 1px solid var(--border-color);
}

@media (max-width: 640px) {
  .ticket-rich-card {
    grid-template-columns: 1fr;
  }

  .ticket-rich-media,
  .ticket-rich-image {
    width: 100%;
    height: 180px;
  }
}

.ticket-detail__replies {
  padding: 16px 24px;
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 180px;
}

.ticket-reply {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  max-width: 85%;
}

.ticket-reply--admin {
  background: rgba(47,140,153, 0.08);
  border: 1px solid rgba(47,140,153, 0.15);
  align-self: flex-start;
}

.ticket-reply--user {
  background: rgba(52, 211, 153, 0.06);
  border: 1px solid rgba(52, 211, 153, 0.12);
  align-self: flex-end;
}

.ticket-reply__author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.ticket-reply__content {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.55;
  margin: 0;
}

.ticket-reply__time {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: right;
}

.ticket-reply__empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 24px 0;
}

.ticket-detail__reply-form {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  position: sticky;
  bottom: 0;
  background: var(--bg-card);
  z-index: 2;
  margin-top: auto;
}

.ticket-detail__reply-form input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color var(--transition);
}

.ticket-detail__reply-form input:focus {
  outline: none;
  border-color: rgba(47,140,153, 0.4);
}

/* Ticket Modal */
.ticket-modal {
  max-width: 520px;
}

/* ============================================
   PREMIUM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thum
/* =====================================================================
   PANEL · BRAND POLISH 2026 — Inspira Madrid PSI
   Foco de marca, micro-interacciones y movimiento (aditivo).
   ===================================================================== */
:root {
  --imp-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --imp-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Foco accesible y coherente con la marca */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(var(--brand-rgb), 0.45);
  outline-offset: 2px;
  border-radius: 10px;
}

/* Botones primarios: brillo de marca al pasar */
.btn--primary,
.btn-primary,
button.primary,
.btn--login,
.btn-auth {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s var(--imp-spring), box-shadow 0.35s var(--imp-smooth), filter 0.3s ease;
}
.btn--primary::after,
.btn-primary::after,
button.primary::after,
.btn--login::after,
.btn-auth::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,0.35) 50%, transparent 100%);
  transform: translateX(-130%);
  transition: transform 0.7s var(--imp-smooth);
  z-index: -1;
}
.btn--primary:hover,
.btn-primary:hover,
button.primary:hover,
.btn--login:hover,
.btn-auth:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -16px rgba(var(--brand-rgb), 0.75);
  filter: saturate(1.05);
}
.btn--primary:hover::after,
.btn-primary:hover::after,
button.primary:hover::after,
.btn--login:hover::after,
.btn-auth:hover::after { transform: translateX(130%); }

/* Tarjetas con realce suave */
.card,
.stat-card,
.dashboard-card,
.listing-card,
.property-card,
.report-card,
.client-card,
.ticket-card {
  transition: transform 0.4s var(--imp-spring), box-shadow 0.4s var(--imp-smooth);
}
.card:hover,
.stat-card:hover,
.dashboard-card:hover,
.listing-card:hover,
.property-card:hover,
.report-card:hover,
.client-card:hover,
.ticket-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

/* Selección y barra de scroll de marca */
::selection { background: rgba(var(--brand-rgb), 0.22); color: var(--brand-900); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--brand-500), var(--brand-700));
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(var(--brand-600), var(--brand-800)); background-clip: padding-box; }

/* Entrada suave de contenido al cargar */
@keyframes impFadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .redesign-main > *,
  main > .container > *,
  .page-content > * { animation: impFadeUp 0.5s var(--imp-smooth) both; }
}
@media (prefers-reduced-motion: reduce) {
  .btn--primary::after, .btn-primary::after, .btn--login::after, .btn-auth::after { display: none; }
  .redesign-main > *, main > .container > *, .page-content > * { animation: none; }
}

/* ============================================
   Disable constantly-looping decorative animations.
   Kept on purpose: loading spinners (spin), the chat typing
   indicator (typingBounce) and the live status dot (.status-dot).
   ============================================ */
body::before,                 /* ambient mesh background */
body::after,                  /* ambient orb background */
.btn--primary::before,        /* button shimmer sweep */
.btn--scrape::before,         /* scrape button shimmer */
.btn--hero::before,           /* hero button shimmer */
.btn--hero::after,            /* hero button glow pulse */
.card__price::after,          /* price shimmer on cards */
.card__match-badge svg,       /* pulsing match badge icon */
.hero::before,                /* hero background glow */
.hero::after,                 /* hero background glow */
.hero__badge::after,          /* badge sweep */
.hero__highlight,             /* animated gradient text */
.hero__chat-preview,          /* floating chat preview */
.chat-fab::before {           /* floating action button glow */
  animation: none;
}
