/* Fuente base — NO CAMBIAR */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
/* Fuente financiera — SOLO para Money Typography */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&display=swap');
/* Fuente técnica — SOLO para stats numéricos en Rama 2 */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

/* =============================================================
   TaxDeed Lion — Design System
   Color palette: Navy #1E3A5F | Gold #C9A84C | Off-white #F5F7FA
   Typography: Inter (Google Fonts)
   ============================================================= */

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

:root {
  --color-navy:        #1E3A5F;
  --color-navy-light:  #2C5282;
  --color-navy-dark:   #152A47;
  /* A8 — Brand unify: the live app brand is GREEN (research layout
     `--accent: oklch(0.48 0.11 158)`), not gold. These "gold" tokens are
     auth-only (referenced solely in application.css) so we repoint their VALUE
     to the brand green; the logo "togo", plan prices, badges and link hovers
     now match the authenticated app. (Legacy name kept to avoid churn.) */
  --color-gold:        oklch(0.52 0.13 158);
  --color-gold-light:  oklch(0.62 0.14 158);
  --color-bg:          #F5F7FA;
  --color-surface:     #FFFFFF;
  --color-text:        #1A202C;
  --color-text-muted:  #6B7280;
  --color-error:       #E53E3E;
  --color-success:     #38A169;
  --color-border:      #E2E8F0;

  --font:              'Inter', system-ui, sans-serif;
  --radius:            10px;
  --radius-lg:         16px;
  --shadow-sm:         0 1px 3px rgba(0,0,0,.08);
  --shadow-md:         0 4px 16px rgba(0,0,0,.12);
  --shadow-lg:         0 12px 40px rgba(0,0,0,.18);
  --transition:        0.18s ease;
}

html, body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-navy); text-decoration: none; }
a:hover { color: var(--color-gold); }

/* ── AUTH PAGES ────────────────────────────────────────────── */
.auth-page {
  display: flex;
  min-height: 100vh;
}

.auth-page__brand {
  display: none;
  flex: 1;
  /* A8 (full) — desktop brand panel unified to green (was navy gradient). */
  background: linear-gradient(145deg, oklch(0.26 0.05 158) 0%, oklch(0.34 0.08 158) 55%, oklch(0.46 0.11 158) 100%);
  padding: 3rem;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-page__brand::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: oklch(0.72 0.13 158 / 0.10);   /* A8 — green glow (was gold tint) */
}

.brand-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.brand-logo span { color: var(--color-gold); }

.brand-tagline {
  color: rgba(255,255,255,.85);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
  margin-top: auto;
}

.brand-tagline small {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255,255,255,.55);
  margin-top: 0.75rem;
}

.auth-page__form-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1;
  padding: 2rem 1.5rem;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
}

.auth-card__logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-navy);
  margin-bottom: 1.5rem;
  display: inline-block;
}

.auth-card__logo span { color: var(--color-gold); }

.auth-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 0.35rem;
}

.auth-card__subtitle {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

/* ── FORM ELEMENTS ─────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

.form-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9375rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: oklch(0.48 0.11 158);                 /* A8 — green focus */
  box-shadow: 0 0 0 3px oklch(0.48 0.11 158 / 0.15);
  background: #fff;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
}

.btn--primary {
  background: oklch(0.48 0.11 158);   /* A8 — brand green (matches app --accent) */
  color: #fff;
  width: 100%;
  padding: 0.85rem;
  font-size: 1rem;
}

.btn--primary:hover {
  background: oklch(0.42 0.12 158);   /* A8 — darker green on hover */
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: #fff;
}

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

.btn--ghost {
  background: transparent;
  color: var(--color-navy);
  border: 1.5px solid var(--color-border);
}

.btn--ghost:hover { border-color: var(--color-navy); background: var(--color-bg); }

/* ── PLAN SELECTOR ─────────────────────────────────────────── */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.plan-card {
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  position: relative;
}

.plan-card:hover { border-color: var(--color-navy-light); }

.plan-card input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }

.plan-card.selected {
  border-color: var(--color-navy);
  background: rgba(30,58,95,.04);
}

.plan-card.selected .plan-name { color: var(--color-navy); }

.plan-name { font-weight: 700; font-size: 0.875rem; color: var(--color-text); margin-bottom: 0.2rem; }
.plan-price { font-size: 1rem; font-weight: 800; color: var(--color-gold); }
.plan-price small { font-size: 0.7rem; font-weight: 400; color: var(--color-text-muted); }
.plan-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-gold);
  color: var(--color-navy-dark);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  white-space: nowrap;
}

/* ── TRIAL NOTICE ──────────────────────────────────────────── */
.trial-notice {
  background: linear-gradient(135deg, rgba(30,58,95,.06), rgba(201,168,76,.08));
  border: 1px solid rgba(201,168,76,.3);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-size: 0.8125rem;
  color: var(--color-text);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.trial-notice strong { color: var(--color-navy); }

/* ── DIVIDER ───────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* ── FLASH MESSAGES ────────────────────────────────────────── */
.flash {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 480px;
  width: calc(100% - 2rem);
  animation: slideDown 0.25s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.flash--notice { background: var(--color-navy); color: #fff; }
.flash--alert  { background: var(--color-error); color: #fff; }
.flash__close  { background: none; border: none; color: inherit; cursor: pointer; font-size: 1.2rem; margin-left: auto; padding: 0; }

/* ── AUTH FOOTER ───────────────────────────────────────────── */
.auth-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.auth-footer a { color: var(--color-navy); font-weight: 600; }
.auth-footer a:hover { color: var(--color-gold); }

/* ── AUTH ALERTS (password reset / form errors) ───────────── */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  animation: slideDown 0.25s ease;
}

.auth-alert--error {
  background: rgba(229, 62, 62, 0.08);
  border: 1px solid rgba(229, 62, 62, 0.25);
  color: var(--color-error);
}

.auth-alert--success {
  background: rgba(56, 161, 105, 0.08);
  border: 1px solid rgba(56, 161, 105, 0.25);
  color: var(--color-success);
}

/* ── STEP INDICATOR ────────────────────────────────────────── */
.steps {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.step {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.step__num {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

.step.active .step__num { background: var(--color-navy); color: #fff; }
.step.active { color: var(--color-navy); font-weight: 600; }
.step-line { flex: 1; height: 2px; background: var(--color-border); }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (min-width: 900px) {
  .auth-page__brand { display: flex; }
  .auth-page__form-wrap { padding: 3rem; }
}

@media (max-width: 520px) {
  .auth-card { padding: 2rem 1.5rem; }
  .form-row { grid-template-columns: 1fr; }

  /* A5 — keep the 3 plans as a compact segmented row instead of 3 stacked cards
     (~700px) that pushed the form far below the fold. Tighter padding + type so
     they fit at 360–390px. Radios / form value / JS highlight are untouched. */
  .plan-grid { grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
  .plan-card { padding: 0.7rem 0.3rem; }
  .plan-name { font-size: 0.8rem; }
  .plan-price { font-size: 0.85rem; }
  .plan-price small { font-size: 0.6rem; }
  .plan-badge { font-size: 0.5625rem; padding: 0.1rem 0.35rem; top: -8px; }
}

/* QW8 (mobile) — anchor auth card higher (kill dead vertical space) +
   raise input/placeholder contrast against the white card. Additive only. */
@media (max-width: 768px) {
  .auth-page__form-wrap { justify-content: flex-start; padding-top: 2.25rem; }
  .form-input { border-color: #CBD5E1; }
  .form-input::placeholder { color: var(--color-text-muted); opacity: .85; }
}

/* ═══════════════════════════════════════════════════════════════
   RESEARCH MODULE — Design System
   ═══════════════════════════════════════════════════════════════ */

/* ── EXTRA TOKENS ────────────────────────────────────────────── */
:root {
  --color-primary:       #1E3A5F;
  --color-primary-hover: #2A4F82;
  --color-accent:        #2E86C1;
  --color-accent-light:  #EBF5FB;
  --color-success:       #28A745;
  --color-warning:       #FFC107;
  --color-danger:        #DC3545;
  --color-info:          #17A2B8;

  /* CTA Monetario (Regla Naranja) */
  --color-cta:            #E67E22;
  --color-cta-hover:      #F39C12;
  --color-cta-dark:       #D35400;
  --color-cta-shadow:     rgba(211, 84, 0, 0.3);

  /* Zonas de la Ficha de Propiedad */
  --color-zone-crm:       #F5F3F0;  /* Col 1: gris cálido */
  --color-zone-data:      #FFFFFF;  /* Col 2: blanco puro */
  --color-zone-visual:    transparent; /* Col 3: sin fondo */

  /* CRM Tag States */
  --color-tag-target:     #2E86C1;
  --color-tag-diligence:  #E67E22;
  --color-tag-ready:      #27AE60;
  --color-tag-dismissed:  #6C757D;
  --color-tag-won:        #1E8449;
  --color-tag-lost:       #922B21;

  /* Pines del Mapa diferenciados */
  --color-pin-default:    #1E3A5F;
  --color-pin-crm-saved:  #F1C40F;
  --color-pin-report-bought: #27AE60;

  /* Overlay / Glassmorphism selectivo */
  --overlay-blur:         blur(12px) saturate(0.6);
  --overlay-bg:           rgba(0, 0, 0, 0.2);

  /* Transiciones estándar */
  --transition-fast:      150ms ease;
  --transition-normal:    300ms ease-in-out;
  --transition-drawer:    400ms cubic-bezier(0.16, 1, 0.3, 1);

  --rn-header-h:         60px;
  
  --font-money:   'DM Serif Display', serif;
  --font-numeric: 'JetBrains Mono', monospace;
}

/* ── LAYOUT ──────────────────────────────────────────────────── */
.research-layout { display: flex; flex-direction: column; min-height: 100vh; background: var(--color-bg, #F8F9FA); }
.rn-main { flex: 1; overflow: auto; }

/* ── HEADER / NAV ────────────────────────────────────────────── */
.rn-header {
  height: var(--rn-header-h);
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

.rn-header__left { display: flex; align-items: center; gap: 2rem; }
.rn-header__right { display: flex; align-items: center; gap: 1rem; }

.rn-logo {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.rn-logo span { color: var(--color-gold, #C9A84C); }

.rn-nav { display: flex; gap: 0.25rem; }
.rn-nav__link {
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  transition: all 0.15s;
}
.rn-nav__link:hover, .rn-nav__link.active {
  background: rgba(255,255,255,.12);
  color: #fff;
}

.rn-plan-badge {
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.9);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rn-user-menu { position: relative; }
.rn-user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,.1);
  border: none;
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  color: #fff;
  font-family: var(--font);
  font-size: 0.875rem;
  transition: background 0.15s;
}
.rn-user-btn:hover { background: rgba(255,255,255,.18); }

.rn-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-gold, #C9A84C);
  color: var(--color-primary);
  font-weight: 800;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rn-username { font-weight: 500; }

.rn-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
  min-width: 180px;
  overflow: hidden;
  border: 1px solid var(--color-border, #DEE2E6);
}
.rn-dropdown.open { display: block; }
.rn-dropdown__item {
  display: block;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  color: var(--color-text, #212529);
  text-decoration: none;
  transition: background 0.12s;
}
.rn-dropdown__item:hover { background: var(--color-accent-light); color: var(--color-primary); }
.rn-dropdown__item--danger { color: var(--color-danger) !important; }
.rn-dropdown__divider { height: 1px; background: var(--color-border, #DEE2E6); margin: 0.25rem 0; }

/* ── PAGE SHELL ─────────────────────────────────────────────── */
.rn-page { display: flex; height: calc(100vh - var(--rn-header-h)); overflow: hidden; }
.rn-sidebar {
  width: 260px;
  min-width: 220px;
  background: #fff;
  border-right: 1px solid var(--color-border, #DEE2E6);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex-shrink: 0;
}
.rn-content { flex: 1; overflow-y: auto; padding: 1.5rem; }

/* ── PAGE HEADER ─────────────────────────────────────────────── */
.rn-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.rn-page-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
}
.rn-page-subtitle {
  font-size: 0.875rem;
  color: var(--color-text-muted, #6C757D);
  margin: 0.2rem 0 0;
}

/* ── VIEW TOGGLE ─────────────────────────────────────────────── */
.view-toggle {
  display: inline-flex;
  border: 1.5px solid var(--color-border, #DEE2E6);
  border-radius: 8px;
  overflow: hidden;
}
.view-toggle__btn {
  padding: 0.45rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: #fff;
  color: var(--color-text-muted, #6C757D);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.view-toggle__btn.active {
  background: var(--color-primary);
  color: #fff;
}
.view-toggle__btn:hover:not(.active) { background: var(--color-accent-light); color: var(--color-primary); }

/* ── DATA TABLE ─────────────────────────────────────────────── */
.data-table-wrap {
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--color-border, #DEE2E6);
  overflow: hidden;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table th {
  background: #F1F3F4;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--color-text, #212529);
  white-space: nowrap;
  border-bottom: 1px solid var(--color-border, #DEE2E6);
}
.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border, #DEE2E6);
  color: var(--color-text, #212529);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--color-accent-light); }
.data-table .cell-link {
  color: var(--color-accent);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.data-table .cell-link:hover { text-decoration: underline; }
.data-table-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-muted, #6C757D);
  font-size: 0.9375rem;
}

/* ── BADGES ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-upcoming { background: #FFF3CD; color: #856404; }
.badge-active   { background: #D4EDDA; color: #155724; }
.badge-completed { background: #F1F3F4; color: #495057; }
.badge-success  { background: #D4EDDA; color: #155724; }
.badge-warning  { background: #FFF3CD; color: #856404; }
.badge-danger   { background: #F8D7DA; color: #721C24; }
.badge-info     { background: #D1ECF1; color: #0C5460; }
.badge-pending  { background: #FFF3CD; color: #856404; }
.badge-ordered  { background: #D1ECF1; color: #0C5460; }
.badge-generated { background: #D4EDDA; color: #155724; }
.badge-failed   { background: #F8D7DA; color: #721C24; }

/* ── FILTER SIDEBAR ─────────────────────────────────────────── */
.filter-sidebar { padding: 1rem; }
.filter-sidebar__title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted, #6C757D);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border, #DEE2E6);
}
.filter-group { margin-bottom: 1.1rem; }
.filter-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text, #212529);
  margin-bottom: 0.35rem;
}
.filter-select, .filter-input {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1.5px solid var(--color-border, #DEE2E6);
  border-radius: 6px;
  font-family: var(--font);
  font-size: 0.8125rem;
  color: var(--color-text, #212529);
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
}
.filter-select:focus, .filter-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(30,58,95,.08);
}
.filter-btn-apply {
  width: 100%;
  padding: 0.55rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 0.5rem;
}
.filter-btn-apply:hover { background: var(--color-primary-hover); }
.filter-btn-clear {
  width: 100%;
  padding: 0.45rem;
  background: transparent;
  color: var(--color-text-muted, #6C757D);
  border: 1px solid var(--color-border, #DEE2E6);
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  margin-top: 0.35rem;
  transition: all 0.15s;
}
.filter-btn-clear:hover { color: var(--color-danger); border-color: var(--color-danger); }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-sm-primary { background: var(--color-primary); color: #fff; }
.btn-sm-primary:hover { background: var(--color-primary-hover); color: #fff; }
.btn-sm-outline { background: #fff; color: var(--color-primary); border: 1.5px solid var(--color-primary); }
.btn-sm-outline:hover { background: var(--color-accent-light); }
.btn-sm-success { background: var(--color-success); color: #fff; }
.btn-sm-danger  { background: var(--color-danger); color: #fff; }

/* ── MAP CONTAINER ───────────────────────────────────────────── */
.map-container {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-border, #DEE2E6);
}

/* ── MODAL ───────────────────────────────────────────────────── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  width: 100%;
  max-width: 700px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(-12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal--wide { max-width: 950px; }
.modal__header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border, #DEE2E6);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}
.modal__title { font-size: 1.1rem; font-weight: 700; color: var(--color-primary); margin: 0; }
.modal__subtitle { font-size: 0.8125rem; color: var(--color-text-muted, #6C757D); margin: 0.2rem 0 0; }
.modal__close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--color-text-muted, #6C757D);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}
.modal__close:hover { color: var(--color-danger); }
.modal__body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}
.modal__footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-border, #DEE2E6);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* ── ACCORDION ───────────────────────────────────────────────── */
.accordion { border: 1px solid var(--color-border, #DEE2E6); border-radius: 8px; overflow: hidden; margin-bottom: 0.75rem; }
.accordion__trigger {
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--color-bg, #F8F9FA);
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-primary);
  text-align: left;
  transition: background 0.15s;
}
.accordion__trigger:hover { background: var(--color-accent-light); }
.accordion__icon { transition: transform 0.2s ease; font-size: 0.75rem; }
.accordion.is-open .accordion__icon { transform: rotate(180deg); }
.accordion__body {
  display: none;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--color-border, #DEE2E6);
}
.accordion.is-open .accordion__body { display: block; }

/* ── DETAIL GRID ─────────────────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
}
.detail-item__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted, #6C757D);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}
.detail-item__value {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text, #212529);
}

/* ── PROGRESS BARS ───────────────────────────────────────────── */
.progress-bar-wrap { margin-bottom: 1.25rem; }
.progress-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  margin-bottom: 0.35rem;
}
.progress-bar-label span:first-child { font-weight: 500; color: var(--color-text, #212529); }
.progress-bar-label span:last-child { color: var(--color-text-muted, #6C757D); }
.progress-bar-track {
  height: 8px;
  border-radius: 4px;
  background: var(--color-border, #DEE2E6);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}
.progress-bar-fill.green  { background: var(--color-success); }
.progress-bar-fill.yellow { background: var(--color-warning); }
.progress-bar-fill.red    { background: var(--color-danger); }

/* ── TABS ────────────────────────────────────────────────────── */
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border, #DEE2E6);
  margin-bottom: 1.5rem;
}
.tab-nav__btn {
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted, #6C757D);
  cursor: pointer;
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
  font-family: var(--font);
}
.tab-nav__btn:hover { color: var(--color-primary); }
.tab-nav__btn.active { color: var(--color-primary); border-bottom-color: var(--color-primary); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* QW3/A3 (mobile) — tab bar scrolls horizontally with a peek instead of
   clipping the last tab ("Payment" in Settings, report tabs in Report Center). */
@media (max-width: 768px) {
  .tab-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .tab-nav::-webkit-scrollbar { display: none; }
  .tab-nav__btn { flex: 0 0 auto; white-space: nowrap; padding-inline: 1rem; }
}

/* ── PAGINATION ──────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--color-border, #DEE2E6);
  font-size: 0.8125rem;
  color: var(--color-text-muted, #6C757D);
  flex-wrap: wrap;
  gap: 0.75rem;
}
.pagination__btns { display: flex; gap: 0.4rem; }
.pagination__btn {
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--color-border, #DEE2E6);
  background: #fff;
  font-size: 0.8125rem;
  cursor: pointer;
  color: var(--color-text, #212529);
  transition: all 0.12s;
}
.pagination__btn:hover { background: var(--color-accent-light); border-color: var(--color-accent); }
.pagination__btn.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.pagination__btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── STAT CARDS ──────────────────────────────────────────────── */
.stat-card {
  background: #fff;
  border: 1px solid var(--color-border, #DEE2E6);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
}
.stat-card__label { font-size: 0.75rem; font-weight: 600; color: var(--color-text-muted, #6C757D); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.35rem; }
.stat-card__value { font-size: 1.5rem; font-weight: 800; color: var(--color-primary); }
.stat-card__sub   { font-size: 0.8rem; color: var(--color-text-muted, #6C757D); margin-top: 0.2rem; }

/* ── EMPTY STATE ─────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}
.empty-state__icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state__title { font-size: 1.1rem; font-weight: 700; color: var(--color-primary); margin-bottom: 0.5rem; }
.empty-state__desc { font-size: 0.9rem; color: var(--color-text-muted, #6C757D); max-width: 360px; line-height: 1.6; margin-bottom: 1.5rem; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .rn-sidebar { display: none; }
  .rn-nav { display: none; }
  .rn-username { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   SPRINT 3 — Parcels Module additions
   ═══════════════════════════════════════════════════════════════ */

/* ── DETAIL GRID (inside parcel modal) ───────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}
.detail-item {
  background: #F8F9FA;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
}
.detail-item__label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-muted, #6C757D);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}
.detail-item__value {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--color-primary);
}

/* ── ACCORDION ───────────────────────────────────────────────── */
.accordion + .accordion { border-top: 1px solid var(--color-border, #DEE2E6); }
.accordion__trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 0;
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  text-align: left;
}
.accordion__trigger:hover { color: var(--color-accent); }
.accordion__icon {
  font-size: 0.8rem;
  transition: transform 0.2s;
}
.accordion .accordion__body {
  display: none;
  padding-bottom: 1rem;
}
.accordion.is-open .accordion__body { display: block; }
.accordion.is-open .accordion__icon { transform: rotate(180deg); }

/* ── BTN-SM variants ─────────────────────────────────────────── */
.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--font);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-sm-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn-sm-primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); color: #fff; }
.btn-sm-outline {
  background: #fff;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-sm-outline:hover { background: var(--color-accent-light); color: var(--color-accent); border-color: var(--color-accent); }
.btn-sm-success {
  background: var(--color-success);
  color: #fff;
  border-color: var(--color-success);
}
.btn-sm-success:hover { background: #218838; border-color: #218838; color: #fff; }

/* ── MODAL wide variant ──────────────────────────────────────── */
.modal--wide { max-width: 860px; }

/* ── AUCTION VISIBLE SCOPE (stub) ────────────────────────────── */
/* Auction.visible is defined in the model; no UI-only CSS needed */

/* ── STAT-ROW (row of stat cards) ────────────────────────────── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.85rem;
}

/* ═══════════════════════════════════════════════════════════════
   SPRINT 4+5 — Reports & Settings additions
   ═══════════════════════════════════════════════════════════════ */

/* ── SETTINGS CARD ───────────────────────────────────────────── */
.settings-card {
  background: #fff;
  border: 1px solid var(--color-border, #DEE2E6);
  border-radius: 12px;
  overflow: hidden;
}
.settings-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border, #DEE2E6);
  background: #FAFAFA;
}
.settings-card__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
}
.settings-card__body {
  padding: 1.25rem;
}
.settings-card__footer {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--color-border, #DEE2E6);
  background: #FAFAFA;
}

/* ── USAGE METERS ────────────────────────────────────────────── */
.usage-meter { margin-bottom: 1rem; }
.usage-meter:last-child { margin-bottom: 0; }
.usage-meter__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.4rem;
}
.usage-meter__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text, #212529);
}
.usage-meter__count {
  font-size: 0.85rem;
  font-weight: 700;
}
.usage-meter__bar {
  height: 8px;
  background: #E9ECEF;
  border-radius: 99px;
  overflow: hidden;
}
.usage-meter__fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
}

/* ── PLAN SUMMARY GRID ──────────────────────────────────────── */
.plan-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.85rem;
}
.plan-summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.plan-summary-item__label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-muted, #6C757D);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.plan-summary-item__value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
}

/* ── REPORT TYPE BADGES ──────────────────────────────────────── */
.report-type-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.report-type-avm            { background: #DBEAFE; color: #1E40AF; }
.report-type-property_scope { background: #EDF1EE; color: #3B5C4F; }
.report-type-title_search   { background: #FEF3C7; color: #92400E; }

/* ── REPORT STATUS BADGES ────────────────────────────────────── */
.badge-report-pending   { background: #FEF3C7; color: #92400E; }
.badge-report-ordered   { background: #DBEAFE; color: #1E40AF; }
.badge-report-generated { background: #D1FAE5; color: #064E3B; }
.badge-report-failed    { background: #FEE2E2; color: #991B1B; }

/* ── FLASH MESSAGES ──────────────────────────────────────────── */
.flash {
  padding: 0.75rem 1.1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
}
.flash-success { background: #D1FAE5; color: #064E3B; border: 1px solid #A7F3D0; }
.flash-danger  { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.flash-warning { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }

/* ── BADGE COUNT (tab indicators) ────────────────────────────── */
.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 0.35rem;
}
.tab-nav__btn.active .badge-count { background: var(--color-accent); }

/* ── CARD DISPLAY (payment method) ──────────────────────────── */
.card-display {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #F8F9FA;
  border-radius: 10px;
  border: 1px solid var(--color-border, #DEE2E6);
}
.card-display__icon { font-size: 2rem; }
.card-display__info { flex: 1; }
.card-display__brand { font-weight: 700; color: var(--color-primary); }

.badge-upcoming  { background: #EBF5FB; color: #1A5276; }
.badge-active    { background: #D1FAE5; color: #064E3B; }
.badge-completed { background: #F3F4F6; color: #374151; }
.badge-canceled  { background: #FEE2E2; color: #991B1B; }
.badge-inactive  { background: #F3F4F6; color: #6C757D; }
.badge-past_due  { background: #FEF3C7; color: #92400E; }
.badge-trial     { background: #EDF1EE; color: #3B5C4F; }

/* ═══════════════════════════════════════════════════════════════
   REPORTS MODULE
   ═══════════════════════════════════════════════════════════════ */

/* ── Report Status Badges ────────────────────────────────────── */
.badge-report-pending   { background: #FEF3C7; color: #92400E; }
.badge-report-ordered   { background: #DBEAFE; color: #1E40AF; }
.badge-report-generated { background: #D1FAE5; color: #065F46; }
.badge-report-failed    { background: #FEE2E2; color: #991B1B; }

/* ── Report Type Badges ──────────────────────────────────────── */
.report-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  font-size: 0.73rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.report-type-avm            { background: #EBF5FB; color: #1A5276; }
.report-type-property_scope { background: #EDF1EE; color: #3B5C4F; }
.report-type-title_search   { background: #FEF3C7; color: #92400E; }

/* ── Prior Sale Badges ───────────────────────────────────────── */
.badge-sold   { background: #D1FAE5; color: #065F46; }
.badge-unsold { background: #FEE2E2; color: #991B1B; }

/* ── Tab badge count ─────────────────────────────────────────── */
.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.35rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  margin-left: 0.3rem;
}
.tab-nav__btn.active .badge-count {
  background: #fff;
  color: var(--color-primary);
}

/* ── Credit Summary Bar ──────────────────────────────────────── */
.credit-summary-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 1.25rem;
  background: #fff;
  border: 1px solid var(--color-border, #DEE2E6);
  border-radius: 10px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.credit-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
}
.credit-label {
  font-weight: 700;
  color: var(--color-primary);
  min-width: 38px;
}
.credit-track {
  width: 80px;
  height: 6px;
  background: #E9ECEF;
  border-radius: 3px;
  overflow: hidden;
}
.credit-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.credit-fill--avm   { background: #1A5276; }
.credit-fill--scope { background: #3B5C4F; }
.credit-fill--title { background: #92400E; }
.credit-count {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  min-width: 60px;
}
.credit-reset {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-left: auto;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .credit-reset { margin-left: 0; width: 100%; }
}

/* ── Error Modal (usado desde JS, reemplaza alert()) ─────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.modal-box {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  width: 100%;
  max-width: 480px;
  animation: modalIn 0.18s ease;
}
.modal-box--sm { max-width: 380px; }
.modal-box__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border, #DEE2E6);
}
.modal-box__body  { padding: 1rem 1.25rem; }
.modal-box__footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--color-border, #DEE2E6);
  display: flex;
  justify-content: flex-end;
}
.modal-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--color-text-muted);
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--color-danger); }

/* =============================================================
   MASTER DESIGN PLAN UI CLASSES
   ============================================================= */

/* ── PROPERTY DETAIL OVERLAY (Floating Card) ────────────────── */
.property-detail-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  width: min(90vw, 1200px);
  height: 90vh;
  z-index: 1000;
  background: var(--color-surface, #fff);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25),
              0 8px 32px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1),
              opacity 300ms ease,
              visibility 300ms ease;
  overflow: hidden;
}

.property-detail-overlay.is-open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.map-backdrop-blur {
  position: fixed;
  inset: 0;
  backdrop-filter: var(--overlay-blur, blur(12px) saturate(0.6));
  background: var(--overlay-bg, rgba(0, 0, 0, 0.35));
  z-index: 999;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 400ms cubic-bezier(0.16, 1, 0.3, 1),
              visibility 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.map-backdrop-blur.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}



/* ── MONEY TYPOGRAPHY ──────────────────────────────────────── */
.money-value {
  font-family: var(--font-money);
  font-size: 2rem;
  font-weight: 400;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}
.property-opening-bid .money-value { font-size: 2.25rem; }
.property-assessed-value .money-value { font-size: 1.5rem; }



/* ── FILTER MATCH COUNT ────────────────────────────────────── */
.filter-match-count {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-numeric);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-accent);
  transition: color 200ms;
}
.filter-match-count--updated { animation: count-pulse 400ms ease; }
@keyframes count-pulse {
  0%   { color: var(--color-accent); transform: scale(1); }
  50%  { color: var(--color-warning); transform: scale(1.1); }
  100% { color: var(--color-accent); transform: scale(1); }
}

/* ── CTA DE REPORTE (REGLA NARANJA) ────────────────────────── */
.btn-order-report {
  background: linear-gradient(135deg, var(--color-cta), var(--color-cta-dark));
  color: #FFFFFF;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  width: 100%;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--color-cta-shadow);
  transition: all 200ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-order-report:hover {
  background: linear-gradient(135deg, var(--color-cta-hover), var(--color-cta));
  box-shadow: 0 6px 20px rgba(211, 84, 0, 0.4);
  transform: translateY(-1px);
}
.btn-order-report--ordered {
  background: transparent;
  color: var(--color-info);
  border: 1px solid var(--color-info);
  box-shadow: none;
}
.btn-order-report--generated {
  background: var(--color-success);
  box-shadow: 0 4px 14px rgba(40, 167, 69, 0.3);
}

/* ── MINI CRM CHIPS ────────────────────────────────────────── */
.crm-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-family: var(--font);
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms ease;
  border: 1.5px solid transparent;
}
.crm-tag-chip--inactive {
  background: var(--color-bg);
  color: var(--color-text-secondary);
  opacity: 0.6;
}
.crm-tag-chip--target {
  background: rgba(46, 134, 193, 0.15);
  color: var(--color-tag-target);
  border-color: var(--color-tag-target);
  opacity: 1;
}
.crm-tag-chip--due-diligence {
  background: rgba(243, 156, 18, 0.15);
  color: var(--color-tag-diligence);
  border-color: var(--color-tag-diligence);
  opacity: 1;
}
.crm-tag-chip--ready-to-bid {
  background: rgba(39, 174, 96, 0.15);
  color: var(--color-tag-ready);
  border-color: var(--color-tag-ready);
  opacity: 1;
}
.crm-tag-chip--dismissed {
  background: rgba(108, 117, 125, 0.15);
  color: var(--color-tag-dismissed);
  border-color: var(--color-tag-dismissed);
  opacity: 1;
}
.crm-tag-chip--won {
  background: rgba(30, 132, 73, 0.15);
  color: var(--color-tag-won);
  border-color: var(--color-tag-won);
  opacity: 1;
}
.crm-tag-chip--lost {
  background: rgba(146, 43, 33, 0.15);
  color: var(--color-tag-lost);
  border-color: var(--color-tag-lost);
  opacity: 1;
}

/* ── ANIMACIONES MAP PINS Y CRM ────────────────────────────── */
.map-pin--selected { animation: pin-anchor-pulse 600ms ease-out; }
@keyframes pin-anchor-pulse {
  0%   { transform: scale(1);   filter: brightness(1); }
  40%  { transform: scale(1.6); filter: brightness(1.5); }
  100% { transform: scale(1.2); filter: brightness(1.2); }
}

.map-pin--refocus { animation: pin-refocus 400ms ease-out; }
@keyframes pin-refocus {
  0%   { transform: scale(1.4); filter: brightness(1.6); }
  100% { transform: scale(1);   filter: brightness(1); }
}

.save-to-crm-icon { cursor: pointer; transition: transform 150ms ease; }
.save-to-crm-icon:hover { transform: scale(1.15); }
.save-to-crm-icon--flying { animation: fly-to-crm 500ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
@keyframes fly-to-crm {
  0%   { opacity: 1; transform: scale(1) translate(0, 0); }
  60%  { opacity: 0.8; transform: scale(0.5) translate(-60px, -40px); }
  100% { opacity: 0; transform: scale(0.3) translate(-120px, -80px); }
}

/* ── CRM STAGE SELECTOR (replaces tag chips) ─────────────────── */
.crm-stage-selector {
  position: relative;
  margin-bottom: 14px;
}
.crm-stage-label {
  display: block;
  font: 700 10px var(--font-sans);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.crm-stage-current {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface-1);
  cursor: pointer;
  font: 500 13px var(--font-sans);
  color: var(--ink-1);
  transition: all 200ms;
}
.crm-stage-current:hover { border-color: var(--accent); }
.crm-stage-current.loading { opacity: 0.6; pointer-events: none; }
.crm-stage-emoji { font-size: 16px; }
.crm-stage-name { flex: 1; text-align: left; }
.crm-stage-badge {
  font: 600 10px var(--font-sans);
  color: var(--success);
  background: var(--success-soft);
  padding: 2px 7px;
  border-radius: 6px;
}
.crm-stage-chevron {
  color: var(--ink-3);
  font-size: 12px;
  transition: transform 200ms;
}

/* Dropdown */
.crm-stage-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 32px rgba(0,0,0,0.12);
  z-index: 100;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
  animation: crmDropIn 150ms ease;
}
@keyframes crmDropIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.crm-stage-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: none;
  border-radius: 7px;
  cursor: pointer;
  font: 500 13px var(--font-sans);
  color: var(--ink-1);
  transition: background 150ms;
  text-align: left;
}
.crm-stage-option:hover { background: var(--accent-soft, #EBF5FB); }
.crm-stage-option.active {
  background: var(--accent-soft, #EBF5FB);
  font-weight: 700;
}
.crm-stage-check {
  margin-left: auto;
  color: var(--accent);
  font-weight: 700;
}
.crm-stage-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 8px;
}
.crm-stage-option--create {
  color: var(--accent);
  font-weight: 600;
}

/* Inline Create Stage */
.crm-create-stage-inline {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  margin-top: 8px;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--border);
  animation: crmDropIn 150ms ease;
}
.crm-create-stage-input {
  flex: 1;
  min-width: 120px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: 500 13px var(--font-sans);
  color: var(--ink-1);
  background: var(--surface-1);
  outline: none;
}
.crm-create-stage-input:focus { border-color: var(--accent); }
.crm-create-stage-emoji-input {
  width: 52px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 16px;
  text-align: center;
  background: var(--surface-1);
  outline: none;
}
.crm-create-stage-emoji-input:focus { border-color: var(--accent); }
.crm-create-stage-actions {
  display: flex;
  gap: 6px;
  width: 100%;
}
.crm-create-stage-btn {
  flex: 1;
  padding: 7px 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font: 600 12px var(--font-sans);
  cursor: pointer;
  transition: background 150ms;
}
.crm-create-stage-btn:hover { filter: brightness(0.92); }
.crm-create-stage-cancel {
  padding: 7px 12px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: 500 12px var(--font-sans);
  color: var(--ink-2);
  cursor: pointer;
}
.crm-create-stage-cancel:hover { background: var(--surface-2); }

/* Notes lock hint */
.crm-notes-lock-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  margin-top: 6px;
  background: #FEF9E7;
  border: 1px solid #F9E79F;
  border-radius: 6px;
  font: 500 11px var(--font-sans);
  color: #B7950B;
}
.crm-save-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}


/* =============================================================
   RAMA 1: AUCTIONS MODULE — Component Styles
   Migrated from approved prototype: rama1-auctions-test.html
   ============================================================= */

/* ─── Rama 1 Design Tokens (supplement production tokens) ────────────── */
:root {
  --r1-color-primary:       #1E3A5F;
  --r1-color-primary-hover: #2A4F82;
  --r1-color-accent:        #2E86C1;
  --r1-color-accent-light:  #EBF5FB;
  --r1-color-text-primary:  #212529;
  --r1-color-text-secondary:#6C757D;
  --r1-color-text-muted:    #ADB5BD;
  --r1-color-danger:        #DC3545;
  --r1-font-ui:             'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --r1-font-money:          'DM Serif Display', serif;
  --r1-font-numeric:        'JetBrains Mono', monospace;
  --r1-text-xs:             0.75rem;
  --r1-text-sm:             0.875rem;
  --r1-transition-fast:     150ms ease;
  --r1-transition-normal:   300ms ease-in-out;
  --r1-radius-sm:           4px;
  --r1-radius-md:           6px;
  --r1-radius-lg:           8px;
}

/* ─── SUB-NAVIGATION TABS ─────────────────────────────────────────────── */
.r1-sub-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border);
  padding: 0 24px;
  background: var(--color-surface);
}
.r1-sub-tab {
  padding: 12px 22px;
  font-weight: 600;
  color: var(--r1-color-text-secondary);
  font-size: var(--r1-text-sm);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  text-decoration: none;
  transition: all var(--r1-transition-fast);
}
.r1-sub-tab:hover { color: var(--r1-color-primary); }
.r1-sub-tab.active {
  color: var(--r1-color-primary);
  border-bottom-color: var(--r1-color-primary);
  font-weight: 700;
}

/* ─── FILTER BAR ──────────────────────────────────────────────────────── */
.r1-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}
.r1-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.r1-filter-spacer { flex: 1; }

.r1-filter-select {
  appearance: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--r1-color-text-secondary);
  font-family: var(--r1-font-ui);
  font-size: var(--r1-text-xs);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--r1-radius-md);
  cursor: pointer;
  height: 32px;
  transition: all var(--r1-transition-fast);
}
.r1-filter-select:hover { background: #f8f9fa; }
.r1-filter-select.has-value { background: #e8f4fd; border-color: var(--r1-color-accent); color: var(--r1-color-accent); font-weight: 600; }

.r1-filter-date-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.r1-filter-date {
  appearance: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--r1-color-text-secondary);
  font-family: var(--r1-font-ui);
  font-size: var(--r1-text-xs);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--r1-radius-md);
  cursor: pointer;
  height: 32px;
  width: 135px;
}
.r1-filter-clear {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--r1-color-text-muted);
  cursor: pointer;
  padding: 0 4px;
  font-size: 10px;
}
.r1-filter-clear:hover { color: var(--r1-color-danger); }

/* ─── VIEW TOGGLE BUTTONS ─────────────────────────────────────────────── */
.r1-view-btn-group {
  display: flex;
  gap: 2px;
  background: #f8f9fa;
  border-radius: var(--r1-radius-md);
  padding: 2px;
  position: relative;
}
.r1-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: var(--r1-radius-sm);
  cursor: pointer;
  color: var(--r1-color-text-secondary);
  transition: all var(--r1-transition-fast);
}
.r1-view-btn:hover { background: #e9ecef; }
.r1-view-btn.active { background: var(--r1-color-primary); color: #fff; }

/* ─── VIEW PANELS ─────────────────────────────────────────────────────── */
.r1-main-content { padding: 16px 24px; }
.r1-view-panel { display: none; animation: r1FadeIn 0.3s ease; }
.r1-view-panel.active { display: block; }
@keyframes r1FadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ─── CHOROPLETH MAP ──────────────────────────────────────────────────── */
.r1-map-container {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r1-radius-lg);
  padding: 24px;
}
.r1-map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.r1-map-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--r1-color-text-primary);
}
.r1-map-legend {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--r1-color-text-secondary);
}
.r1-legend-item { display: flex; align-items: center; gap: 5px; }
.r1-legend-dot { width: 10px; height: 10px; border-radius: 3px; }

.r1-map-svg-wrap {
  display: flex;
  justify-content: center;
  background: #1B2A3D;
  border-radius: 6px;
  padding: 16px 8px;
}

/* SVG state paths */
.r1-state-path {
  stroke: #2C3E54;
  stroke-width: 1;
  cursor: pointer;
  transition: fill 0.2s ease, filter 0.2s ease;
}
.r1-state-path:hover { filter: brightness(0.85); stroke-width: 1.5; }
.r1-state-path.no-auction    { fill: #FFFFFF; }
.r1-state-path.has-auction   { fill: #27AE60; }

/* Florida: dark border to distinguish from background */
.r1-state-path[data-state="FL"] {
  stroke: #1A252F;
  stroke-width: 2;
}



/* State popup tooltip */
.r1-state-popup {
  position: fixed;
  background: var(--r1-color-primary);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--r1-radius-lg);
  font-size: var(--r1-text-xs);
  z-index: 999;
  display: none;
  pointer-events: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  min-width: 220px;
  max-width: 320px;
}
.r1-state-popup h4 { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.r1-popup-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  color: rgba(255,255,255,0.8);
}
.r1-popup-row strong { text-align: right; }
.r1-popup-divider {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin: 8px 0;
}
.r1-popup-venue-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}
.r1-popup-venue-badge.online { background: rgba(3,105,161,0.3); color: #7DD3FC; }
.r1-popup-venue-badge.in-person { background: rgba(126,34,206,0.3); color: #D8B4FE; }
.r1-popup-section-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.r1-popup-county-list {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
  margin-bottom: 6px;
}
.r1-popup-county-list span {
  display: inline-block;
  background: rgba(126,34,206,0.25);
  color: #D8B4FE;
  padding: 1px 6px;
  border-radius: 3px;
  margin: 1px 2px;
  font-size: 10px;
  font-weight: 500;
}
.r1-popup-link {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #7DD3FC;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  margin-top: 4px;
}
.r1-popup-link:hover { color: #BAE6FD; text-decoration: underline; }
.r1-popup-cta {
  margin-top: 10px;
  display: block;
  text-align: center;
  padding: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--r1-radius-md);
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  pointer-events: auto;
}
.r1-popup-cta:hover { background: rgba(255,255,255,0.25); color: #fff; }

/* ─── SUMMARY STATS ROW ──────────────────────────────────────────────── */
.r1-stats-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.r1-stat-card {
  flex: 1;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 14px 18px;
}
.r1-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--r1-color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.r1-stat-value {
  font-size: 28px;
  font-family: var(--r1-font-money);
  color: var(--r1-color-primary);
}
.r1-stat-sub {
  font-size: 10px;
  color: var(--r1-color-text-secondary);
  margin-top: 3px;
  opacity: 0.75;
}
/* Primary stat card — hero metric (Próximas propiedades a subastar) */
.r1-stat-card--primary {
  background: linear-gradient(135deg, #1E3A5F 0%, #2A4F82 100%);
  border-color: transparent;
  flex: 1.4;
}
.r1-stat-card--primary .r1-stat-label {
  color: rgba(255,255,255,0.7);
}
.r1-stat-card--primary .r1-stat-value {
  color: #fff;
  font-size: 32px;
  font-weight: 800;
}
.r1-stat-card--primary .r1-stat-sub {
  color: rgba(255,255,255,0.55);
}
.r1-table-count-sub {
  font-size: 11px;
  color: var(--r1-color-text-secondary);
  margin-left: 4px;
  font-style: italic;
  opacity: 0.7;
}

/* ─── CALENDAR VIEW ───────────────────────────────────────────────────── */
.r1-calendar-container {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r1-radius-lg);
  padding: 20px;
}
.r1-calendar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.r1-cal-nav-btn {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r1-radius-sm);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--r1-color-text-secondary);
}
.r1-cal-nav-btn:hover { background: #f8f9fa; }
.r1-cal-today-btn {
  background: transparent;
  border: 1px solid var(--color-border);
  padding: 4px 14px;
  font-size: var(--r1-text-xs);
  font-weight: 600;
  border-radius: var(--r1-radius-sm);
  cursor: pointer;
  color: var(--r1-color-text-primary);
}
.r1-cal-today-btn:hover { background: #f8f9fa; }
.r1-cal-month-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--r1-color-text-primary);
  margin-right: auto;
}
.r1-cal-legend {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--r1-color-text-secondary);
  margin-right: 12px;
}
.r1-cal-legend-item { display: flex; align-items: center; gap: 4px; }
.r1-cal-legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.r1-cal-view-toggle { display: flex; gap: 2px; }
.r1-cal-view-btn {
  border: none;
  background: transparent;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--r1-radius-sm);
  cursor: pointer;
  color: var(--r1-color-text-secondary);
}
.r1-cal-view-btn.active { background: var(--r1-color-primary); color: #fff; }

.r1-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border: 1px solid var(--color-border);
  border-radius: var(--r1-radius-md);
  overflow: hidden;
}
.r1-cal-day-header {
  background: #f8f9fa;
  padding: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--r1-color-text-secondary);
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}
.r1-cal-cell {
  position: relative;
  min-height: 100px;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: default;
  background: #fff;
}
.r1-cal-cell:nth-child(7n) { border-right: none; }
.r1-cal-cell.other-month { background: #fafafa; }
.r1-cal-cell.other-month .r1-cal-day-num { color: var(--r1-color-text-muted); }
.r1-cal-cell.today { background: #eff6ff; }
.r1-cal-cell.today .r1-cal-day-num {
  background: var(--r1-color-accent);
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.r1-cal-day-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--r1-color-text-primary);
  margin-bottom: 4px;
}
.r1-cal-event {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.r1-cal-event:hover { filter: brightness(0.9); }
.r1-cal-event.type-deed { background: #D1FAE5; color: #15803D; }
.r1-cal-event-more {
  font-size: 9px;
  color: var(--r1-color-text-muted);
  font-weight: 600;
  padding: 2px 5px;
}

/* ─── DATA TABLE ──────────────────────────────────────────────────────── */
.r1-table-container {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r1-radius-lg);
  overflow: hidden;
}
.r1-table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--color-border);
}
.r1-table-count {
  font-size: var(--r1-text-xs);
  color: var(--r1-color-text-secondary);
}
.r1-table-wrap { overflow-x: auto; }

.r1-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--r1-text-xs);
}
.r1-table-wrap thead th {
  background: #f8f9fa;
  padding: 10px 14px;
  font-weight: 600;
  text-align: left;
  color: var(--r1-color-text-secondary);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.r1-th-inner {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.r1-th-inner:hover { color: var(--r1-color-primary); }
.r1-sort-icon { color: var(--r1-color-text-muted); }
.r1-sort-icon.active { color: var(--r1-color-accent); }

.r1-table-wrap tbody tr {
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: background var(--r1-transition-fast);
}
.r1-table-wrap tbody tr:hover { background: #f8f9fa; }
.r1-table-wrap tbody td {
  padding: 10px 14px;
  color: var(--r1-color-text-primary);
  font-weight: 500;
}

.r1-td-jurisdiction { font-weight: 700; color: var(--r1-color-primary); }
.r1-td-state { font-weight: 600; color: var(--r1-color-text-secondary); }
.r1-td-date {
  font-family: var(--r1-font-numeric);
  font-size: 12px;
  color: var(--r1-color-text-secondary);
}
.r1-td-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}
.r1-badge-deed { background: #D1FAE5; color: #15803D; }
.r1-badge-online { background: #DBEAFE; color: #1E40AF; }
.r1-badge-inperson { background: #FEF3C7; color: #92400E; }
.r1-badge-hybrid { background: #EDF1EE; color: #3B5C4F; }

.r1-parcels-count {
  font-family: var(--r1-font-numeric);
  font-weight: 700;
  color: var(--r1-color-primary);
}
.r1-agg-amount {
  font-family: var(--r1-font-money);
  font-weight: 400;
  color: var(--r1-color-primary);
  white-space: nowrap;
}

/* ─── PAGINATION ──────────────────────────────────────────────────────── */
.r1-pagination-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
  gap: 12px;
}
.r1-pagination-info {
  font-size: var(--r1-text-xs);
  color: var(--r1-color-text-secondary);
}
.r1-pagination-btns { display: flex; gap: 4px; }
.r1-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--r1-radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--r1-color-text-secondary);
  text-decoration: none;
  transition: all var(--r1-transition-fast);
}
.r1-page-btn:hover { background: #f8f9fa; color: var(--r1-color-primary); }
.r1-page-btn.active { background: var(--r1-color-primary); color: #fff; border-color: var(--r1-color-primary); }
.r1-page-btn.disabled { opacity: 0.4; pointer-events: none; }

/* ─── CUSTOM DROPDOWN FILTERS ─────────────────────────────────────────── */
.r1-custom-dropdown {
  position: relative;
  display: inline-block;
}
.r1-custom-dropdown-btn {
  appearance: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--r1-color-text-secondary);
  font-family: var(--r1-font-ui);
  font-size: var(--r1-text-xs);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--r1-radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  transition: all var(--r1-transition-fast);
}
.r1-custom-dropdown-btn:hover { background: #f8f9fa; }
.r1-custom-dropdown-btn.open { background: #e9ecef; }

.r1-custom-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 250px;
  margin-top: 4px;
  border-radius: var(--r1-radius-md);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border: 1px solid var(--color-border);
  z-index: 1000;
}
.r1-custom-dropdown-menu.show { display: block; }
.r1-custom-dropdown-search {
  padding: 10px;
  border-bottom: 1px solid var(--color-border);
}
.r1-custom-dropdown-search input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--r1-radius-sm);
  font-size: var(--r1-text-xs);
  font-family: var(--r1-font-ui);
  outline: none;
  color: var(--r1-color-text-primary);
}
.r1-custom-dropdown-search input:focus { border-color: var(--r1-color-accent); }
.r1-custom-dropdown-list {
  max-height: 250px;
  overflow-y: auto;
  padding: 4px 0;
}
.r1-custom-dropdown-item {
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--r1-color-primary);
}
.r1-custom-dropdown-item:hover { background: #f8f9fa; }
.r1-custom-dropdown-item input[type="checkbox"] { cursor: pointer; width: 14px; height: 14px; }
.r1-custom-dropdown-item .r1-badge {
  margin-left: auto;
  background: var(--r1-color-accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

/* ─── SETTINGS POPUP ─────────────────────────────────────────────────── */
.r1-btn-active-red { background: #D9534F !important; color: #fff !important; }
.r1-settings-popup {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  left: auto;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--r1-radius-md);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 16px;
  width: 380px;
  z-index: 1000;
  cursor: default;
}
.r1-settings-popup.show { display: block; }
.r1-settings-popup h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--r1-color-text-primary);
  margin-top: 0;
  margin-bottom: 12px;
}
.r1-settings-list { display: flex; flex-direction: column; gap: 2px; }
.r1-settings-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--r1-color-text-primary);
}
.r1-settings-row .r1-row-label { flex: 1; }
.r1-settings-row label {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-weight: 600;
}
.r1-settings-row input[type="radio"],
.r1-settings-row input[type="checkbox"] { cursor: pointer; }
.r1-settings-row .r1-drag-icon {
  color: var(--r1-color-text-muted);
  cursor: grab;
  margin-left: 6px;
}
.r1-btn-save-popup {
  background: #3A82C3;
  color: white;
  border: none;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--r1-transition-fast);
}
.r1-btn-save-popup:hover { background: #1E4E8C; }

/* ─── SAVE SEARCH POPUP ──────────────────────────────────────────────── */
.r1-btn-active-blue { background: #3A82C3 !important; color: #fff !important; }
.r1-save-popup {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--r1-radius-md);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 16px;
  width: 350px;
  z-index: 1000;
  cursor: default;
  text-align: left;
}
.r1-save-popup.show { display: block; }
.r1-save-popup h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--r1-color-text-primary);
  margin-top: 0;
  margin-bottom: 12px;
}
.r1-save-form-row {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.r1-save-form-row input {
  flex: 1;
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: var(--r1-font-ui);
  font-size: 13px;
  color: var(--r1-color-text-secondary);
}
.r1-save-form-row button {
  background: #3A82C3;
  color: white;
  border: none;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--r1-transition-fast);
}
.r1-save-form-row button:hover { background: #1E4E8C; }
.r1-save-popup-divider {
  border-top: 1px solid var(--color-border);
  margin: 16px 0;
}
.r1-saved-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 8px 12px;
  background: #fdfdfd;
}
.r1-saved-search-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--r1-color-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.r1-saved-search-badge {
  background: #777;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 12px;
}
.r1-saved-search-actions { display: flex; }
.r1-saved-search-actions button {
  border: none;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: white;
  cursor: pointer;
}
.r1-saved-search-actions button.r1-btn-edit {
  background: #5CB85C;
  border-radius: 4px 0 0 4px;
}
.r1-saved-search-actions button.r1-btn-edit:hover { background: #4cae4c; }
.r1-saved-search-actions button.r1-btn-delete {
  background: #D9534F;
  border-radius: 0 4px 4px 0;
}
.r1-saved-search-actions button.r1-btn-delete:hover { background: #c9302c; }

/* ─── PRESET CHIP ─────────────────────────────────────────────────────── */
.r1-preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px 3px 8px;
  background: var(--r1-color-accent-light);
  border: 1px solid rgba(46,134,193,0.3);
  border-radius: 20px;
  font-size: var(--r1-text-xs);
  font-weight: 500;
  color: var(--r1-color-accent);
  cursor: pointer;
}
.r1-preset-chip:hover { background: #D6EAF8; }

@media (max-width: 768px) {
  .r1-filter-bar { flex-wrap: wrap; padding: 8px 12px; }
  .r1-main-content { padding: 12px; }
  .r1-cal-cell { min-height: 70px; }
  .r1-stats-row { flex-direction: column; }
}

/* =============================================================
   RAMA 2: GEOGRAPHIC SEARCH MODULE — Component Styles
   Migrated from approved prototype: rama2-internal-flow.html
   Two-phase flow: Phase 1 (Geographic Overview) → Phase 2 (County Detail)
   ============================================================= */

/* ─── Rama 2 Design Tokens ───────────────────────────────────────────── */
:root {
  --r2-pin-bg:         #1E3A5F;
  --r2-pin-border:     #2E86C1;
  --r2-pin-text:       #FFFFFF;
  --r2-sidebar-width:  380px;
  --r2-transition:     400ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── R2 APP SHELL ───────────────────────────────────────────────────── */
.r2-shell {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--rn-header-h, 56px));
  overflow: hidden;
  position: relative;
}
.r2-map-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.r2-map-container #r2-map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* ─── COUNTY PIN (DivIcon) ───────────────────────────────────────────── */
.r2-county-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--r2-pin-bg);
  border: 3px solid var(--r2-pin-border);
  color: var(--r2-pin-text);
  font-family: 'JetBrains Mono', 'Inter', monospace;
  font-weight: 700;
  text-align: center;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), 0 0 0 2px rgba(46, 134, 193, 0.2);
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
  position: relative;
}
.r2-county-pin:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), 0 0 0 4px rgba(46, 134, 193, 0.3);
  z-index: 1000 !important;
}
.r2-county-pin--sm { width: 36px; height: 36px; font-size: 11px; }
.r2-county-pin--md { width: 44px; height: 44px; font-size: 13px; }
.r2-county-pin--lg { width: 54px; height: 54px; font-size: 15px; }
.r2-county-pin--xl { width: 64px; height: 64px; font-size: 17px; }

/* Pin label tooltip */
.r2-county-pin__label {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--r2-pin-bg);
  color: #fff;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 150ms ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.r2-county-pin:hover .r2-county-pin__label { opacity: 1; }

/* ─── EVENTS SELECTOR BUTTON (overlay on map) ────────────────────────── */
.r2-events-btn {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 800;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  background: var(--r2-pin-bg);
  color: #fff;
  border: 2px solid var(--r2-pin-border);
  border-radius: 50px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  transition: all 200ms ease;
  text-decoration: none;
}
.r2-events-btn:hover {
  background: #2A4F82;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.5);
  transform: translateX(-50%) translateY(-2px);
  color: #fff;
}
.r2-events-btn .r2-events-badge {
  background: #1E3A5F;
  color: #fff;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
}

/* ─── PHASE 2: SIDEBAR ───────────────────────────────────────────────── */
.r2-phase2-sidebar {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--r2-sidebar-width);
  height: 100%;
  background: #fff;
  border-right: 1px solid var(--color-border, #DEE2E6);
  z-index: 600;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform var(--r2-transition);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
}
.r2-phase2-sidebar.is-open {
  transform: translateX(0);
}

/* Sidebar header */
.r2-sidebar-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--color-border, #DEE2E6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  background: #FAFBFC;
}
.r2-sidebar-header__info h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1E3A5F;
  margin: 0 0 2px;
}
.r2-sidebar-header__info span {
  font-size: 12px;
  color: #6C757D;
}
.r2-sidebar-back {
  background: none;
  border: none;
  color: #6C757D;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 150ms ease;
}
.r2-sidebar-back:hover { background: #f0f0f0; color: #1E3A5F; }

/* Sidebar search */
.r2-sidebar-search {
  padding: 12px 18px;
  border-bottom: 1px solid var(--color-border, #DEE2E6);
  flex-shrink: 0;
}
.r2-sidebar-search input {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid var(--color-border, #DEE2E6);
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  outline: none;
  box-sizing: border-box;
  transition: border-color 150ms ease;
}
.r2-sidebar-search input:focus { border-color: #2E86C1; }

/* Sidebar list */
.r2-sidebar-list {
  flex: 1;
  overflow-y: auto;
}
.r2-parcel-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid #F0F0F0;
  cursor: pointer;
  transition: background 100ms ease;
}
.r2-parcel-row:hover { background: #F8FBFF; }
.r2-parcel-row__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #EBF5FB;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.r2-parcel-row__info {
  flex: 1;
  min-width: 0;
}
.r2-parcel-row__address {
  font-size: 13px;
  font-weight: 600;
  color: #1E3A5F;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.r2-parcel-row__meta {
  font-size: 11px;
  color: #6C757D;
  margin-top: 2px;
}
.r2-parcel-row__bid {
  font-family: 'DM Serif Display', serif;
  font-size: 15px;
  color: #1E3A5F;
  font-weight: 400;
  white-space: nowrap;
}

/* Sidebar footer / pagination */
.r2-sidebar-footer {
  padding: 10px 18px;
  border-top: 1px solid var(--color-border, #DEE2E6);
  font-size: 12px;
  color: #6C757D;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  background: #FAFBFC;
}

/* ─── MAP POPUP (Google Maps InfoWindow) ──────────────────────────────── */
.r2-popup {
  font-family: 'Inter', sans-serif;
  min-width: 220px;
  max-width: 300px;
  padding: 4px 2px;
  line-height: 1.5;
}
.r2-popup h4 {
  font-size: 14px;
  font-weight: 700;
  color: #1E3A5F;
  margin: 0 0 8px;
  line-height: 1.3;
}
.r2-popup-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  color: #6C757D;
  margin-bottom: 4px;
  gap: 12px;
}
.r2-popup-row strong {
  color: #1E3A5F;
  text-align: right;
}
.r2-popup-cta {
  display: block;
  margin-top: 12px;
  padding: 9px 16px;
  background: #1E3A5F;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 200ms ease, transform 150ms ease;
  border: none;
  width: 100%;
}
.r2-popup-cta:hover { background: #2A4F82; color: #fff; transform: translateY(-1px); }

/* ─── PHASE TRANSITIONS ──────────────────────────────────────────────── */
.r2-phase1-active .r2-phase2-sidebar { transform: translateX(-100%); }
.r2-phase2-active .r2-phase2-sidebar { transform: translateX(0); }

/* Map repositions when sidebar opens */
.r2-phase2-active .r2-map-container #r2-map {
  transition: padding-left var(--r2-transition);
}

/* ─── LOADING OVERLAY ────────────────────────────────────────────────── */
.r2-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(248, 249, 250, 0.9);
  z-index: 700;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  color: #6C757D;
}
.r2-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #DEE2E6;
  border-top-color: #1E3A5F;
  border-radius: 50%;
  animation: r2spin 0.7s linear infinite;
}
@keyframes r2spin { to { transform: rotate(360deg); } }

/* ─── GOOGLE MAPS INFOWINDOW OVERRIDES ───────────────────────────────── */
.gm-style .gm-style-iw-c {
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  padding-bottom: 0;
  max-width: 320px;
}
.gm-style .gm-style-iw-d { padding: 14px 16px 8px; overflow: auto !important; }
.gm-style .gm-style-iw-t::after {
  background: linear-gradient(45deg, #fff 50%, transparent 51%, transparent);
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .r2-phase2-sidebar {
    width: 100%;
    height: 50%;
    top: auto;
    bottom: 0;
    left: 0;
    transform: translateY(100%);
    border-right: none;
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  }
  .r2-phase2-sidebar.is-open { transform: translateY(0); }
  .r2-events-btn { font-size: 13px; padding: 10px 22px; bottom: 16px; }
}
