/* ── MiraTuZona B2B — Design System ───────────────────────────────── */

:root {
  /* Brand palette */
  --primary: #2D5A3D;
  --primary-dark: #1B4332;
  --primary-light: #4A7C5E;
  --accent: #8FB07A;
  --accent-light: #C5D5A0;
  --accent-muted: #D4E4C4;

  /* Surfaces */
  --bg-warm: #F5F0E8;
  --bg-cream: #FAF7F2;
  --surface: #ffffff;
  --surface-warm: #FBF9F5;

  /* Text */
  --text: #2C3319;
  --text-secondary: #5C6B4F;
  --muted: #8A9474;

  /* Borders */
  --border: #DED8CA;
  --border-light: #EAE5DB;

  /* Semantic */
  --success: #3D8B5E;
  --success-bg: #ddf3e4;
  --warn: #93370d;
  --warn-bg: #fef0c7;
  --danger: #C1433E;
  --danger-bg: #fee4e2;

  /* Shadows */
  --shadow-soft: 0 1px 3px rgba(44, 51, 25, 0.06);
  --shadow: 0 4px 16px rgba(44, 51, 25, 0.08);
  --shadow-lg: 0 10px 32px rgba(44, 51, 25, 0.1);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg-warm);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: "Sora", "DM Sans", sans-serif; }
a { color: inherit; }

/* ═══════════════════════════════════════════════════════════════════
   LANDING PAGE (body.landing)
   ═══════════════════════════════════════════════════════════════════ */

body.landing {
  background: var(--surface);
}

/* ── Sticky nav ────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.nav-link:hover { color: var(--text); }

/* ── Hero (landing) ────────────────────────────────────────────────── */

.hero-landing {
  background:
    radial-gradient(ellipse at 0% 50%, rgba(143, 176, 122, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(212, 228, 196, 0.18) 0%, transparent 50%),
    var(--bg-warm);
}

.hero-landing-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 80px 32px 96px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-text h1 {
  margin: 0;
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--primary-dark);
}

.hero-text > p {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 48ch;
}

.hero-footnote {
  font-size: 13px !important;
  color: var(--muted) !important;
}

.hero-stats {
  font-size: 14px !important;
  color: var(--muted) !important;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Hero visual — floating data cards */

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-card-stack {
  position: relative;
  width: 320px;
  height: 320px;
}

.hero-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform var(--transition);
}

.hero-card:hover { transform: translateY(-4px); }

.hc-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.hc-value {
  font-family: "Sora", sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
}

.hc-value small {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
  display: block;
  margin-top: 2px;
}

.hc-1 { top: 0; left: 10px; }
.hc-2 { top: 100px; right: 0; }
.hc-3 { bottom: 10px; left: 40px; }

/* ── Sections ──────────────────────────────────────────────────────── */

.section {
  padding: 80px 0;
}

.section-warm {
  background: var(--bg-warm);
}

.section-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  margin: 12px 0 0;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
}

/* ── Steps grid ────────────────────────────────────────────────────── */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
}

.step-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--accent-muted);
  color: var(--primary);
  font-family: "Sora", sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.step-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--primary-dark);
}

.step-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* ── Features grid ─────────────────────────────────────────────────── */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent-muted);
  color: var(--primary);
  margin-bottom: 16px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  color: var(--primary-dark);
}

.feature-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* ── CTA section ───────────────────────────────────────────────────── */

.section-cta {
  padding: 64px 0;
}

.section-cta h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
}

/* ── Footer ────────────────────────────────────────────────────────── */

.footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.6);
  padding: 32px 0;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-inner p {
  margin: 0;
  font-size: 13px;
}

/* ── Prose section (the problem) ──────────────────────────────────── */

.section-prose .prose-body {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.section-prose .prose-body p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 16px;
}

.section-prose .prose-body p:last-child {
  margin-bottom: 0;
  color: var(--primary-dark);
  font-weight: 600;
}

/* ── Inline CTA (after how it works) ─────────────────────────────── */

.section-cta-inline {
  text-align: center;
  margin-top: 40px;
}

/* ── Zones table (the opportunity) ────────────────────────────────── */

.zones-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.zones-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.zones-table th {
  text-align: left;
  padding: 14px 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px solid var(--border-light);
  background: var(--surface-warm);
}

.zones-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}

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

.zones-table tr:hover td {
  background: rgba(143, 176, 122, 0.04);
}

.zones-table td strong {
  color: var(--primary-dark);
  font-weight: 600;
}

.zone-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.zone-status.available {
  color: var(--success);
}

.zone-status.available::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--success);
  flex-shrink: 0;
}

.table-footnote {
  text-align: center;
  margin: 20px 0 0;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

/* ── Persona cards ────────────────────────────────────────────────── */

.persona-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.persona-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
}

.persona-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.persona-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--accent-muted);
  color: var(--primary);
  margin-bottom: 16px;
}

.persona-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--primary-dark);
}

.persona-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* ── Stats grid ───────────────────────────────────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.stat-card {
  text-align: center;
  padding: 32px 20px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
}

.stat-value {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ── FAQ ───────────────────────────────────────────────────────────── */

.section-narrow {
  max-width: 720px;
  margin: 0 auto;
}

.faq-list {
  display: grid;
  gap: 0;
}

.faq-item {
  border-bottom: 1px solid var(--border-light);
  padding: 0;
}

.faq-item:first-child {
  border-top: 1px solid var(--border-light);
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-dark);
  cursor: pointer;
  list-style: none;
  transition: color var(--transition-fast);
}

.faq-q::-webkit-details-marker { display: none; }

.faq-q::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--muted);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item[open] .faq-q::after {
  transform: rotate(45deg);
}

.faq-q:hover { color: var(--primary); }

.faq-a {
  margin: 0;
  padding: 0 4px 20px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ── Final CTA section ────────────────────────────────────────────── */

.section-cta-final {
  padding: 80px 0;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(143, 176, 122, 0.12) 0%, transparent 60%),
    var(--bg-warm);
}

.section-cta-final h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
}

.cta-sub {
  color: var(--text-secondary);
  max-width: 48ch;
  margin: 12px auto 28px;
  font-size: 17px;
  line-height: 1.5;
}

.btn-xl {
  font-size: 18px;
  padding: 18px 36px;
}

.cta-micro {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* ── Footer links ─────────────────────────────────────────────────── */

.footer-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: rgba(255, 255, 255, 1);
}

/* ── Landing responsive ────────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero-landing-inner {
    grid-template-columns: 1fr;
    padding: 56px 24px 64px;
    gap: 48px;
  }
  .hero-visual { order: -1; }
  .hero-card-stack {
    width: 280px;
    height: 260px;
  }
  .hc-value { font-size: 22px; }
  .steps-grid,
  .features-grid,
  .persona-grid,
  .stats-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .section-inner { padding: 0 20px; }
  .section-narrow { padding: 0 20px; }
  .nav-inner { padding: 0 20px; }
  .footer-inner {
    flex-direction: column;
    text-align: center;
    padding: 0 20px;
  }
  .zones-table { font-size: 14px; }
  .zones-table th,
  .zones-table td { padding: 12px 14px; }
}

@media (max-width: 600px) {
  /* Nav: prevent overflow — hide non-essential links, shrink logo and
     primary CTA so both fit on narrow viewports. The hero itself already
     carries a "Ya tengo cuenta" CTA so we can safely drop the login
     button from the header. */
  .nav-link,
  .nav-actions .btn:not(.btn-primary) { display: none; }
  .nav-inner {
    padding: 0 16px;
    height: 56px;
    gap: 10px;
  }
  .logo {
    font-size: 0.95rem;
    white-space: nowrap;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .logo strong { font-weight: 700; }
  .nav-actions .btn-primary {
    padding: 8px 14px;
    font-size: 13px;
  }

  /* Hero */
  .hero-landing-inner { padding: 40px 20px 48px; gap: 32px; }
  .hero-visual { display: none; }
  .hero-text { gap: 14px; }
  .hero-text h1 { font-size: 30px; line-height: 1.12; }
  .hero-text > p { font-size: 16px; }
  .hero-stats { font-size: 13px !important; line-height: 1.5; }
  .actions { gap: 10px; width: 100%; }

  /* Sections */
  .section { padding: 48px 0; }
  .section-inner,
  .section-narrow { padding: 0 16px; }
  .section-header { margin-bottom: 32px; }
  .section-header h2 { font-size: 26px; }
  .section-cta-final { padding: 56px 0; }
  .section-cta-final h2 { font-size: 28px; }

  /* Zones table: compact layout on narrow viewports */
  .zones-table { font-size: 13px; }
  .zones-table th,
  .zones-table td { padding: 10px 12px; }
  .zones-table th:first-child,
  .zones-table td:first-child { padding-left: 16px; }
  .zones-table th:last-child,
  .zones-table td:last-child { padding-right: 16px; }

  /* Cards: a bit more breathing room on short screens */
  .step-card,
  .feature-card,
  .persona-card,
  .stat-card { padding: 24px 20px; }

  /* FAQ tap targets */
  .faq-q { font-size: 15px; padding: 18px 0; }

  /* Buttons: full-width CTAs feel native on mobile */
  .btn-xl {
    font-size: 16px;
    padding: 14px 24px;
    width: 100%;
  }
  .hero-landing .btn-lg { width: 100%; }
}

@media (max-width: 380px) {
  /* Ultra-narrow (iPhone SE 1st gen, etc.) — keep the nav readable */
  .logo { font-size: 0.88rem; gap: 8px; }
  .logo-dot { width: 8px; height: 8px; }
  .nav-actions .btn-primary { padding: 7px 12px; font-size: 12.5px; }
  .hero-text h1 { font-size: 26px; }
}


/* ═══════════════════════════════════════════════════════════════════
   AUTH & APP PAGES (non-landing)
   ═══════════════════════════════════════════════════════════════════ */

body:not(.landing) {
  background:
    radial-gradient(ellipse at 0% -10%, rgba(143, 176, 122, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 0%, rgba(212, 228, 196, 0.2) 0%, transparent 40%),
    var(--bg-warm);
}

/* ── Page shell (centered card layout for auth/app) ────────────────── */

.page-shell {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 32px 20px 64px;
  display: grid;
  gap: 20px;
}

/* ── Top bar (auth pages) ──────────────────────────────────────────── */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* ── Shared components ─────────────────────────────────────────────── */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.logo strong {
  font-weight: 700;
}

.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--primary);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

/* ── Cards ─────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
}

/* ── Hero card (auth pages) ────────────────────────────────────────── */

.hero {
  display: grid;
  gap: 10px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--primary-dark);
}

.hero p {
  margin: 0;
  color: var(--text-secondary);
  max-width: 48ch;
  font-size: 15px;
  line-height: 1.55;
}

/* ── Kicker pill ───────────────────────────────────────────────────── */

.kicker {
  display: inline-block;
  width: fit-content;
  border-radius: var(--radius-full);
  background: var(--accent-muted);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 12px;
}

/* ── Buttons ───────────────────────────────────────────────────────── */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: var(--surface-warm);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(45, 90, 61, 0.2);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
  box-shadow: 0 4px 12px rgba(45, 90, 61, 0.25);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(45, 90, 61, 0.2);
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #a3342f;
  border-color: #a3342f;
  color: #fff;
}

.btn-sm {
  font-size: 13px;
  padding: 7px 16px;
}

.btn-lg {
  font-size: 16px;
  padding: 14px 28px;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
  padding: 8px 12px;
}

.btn-ghost:hover {
  background: rgba(143, 176, 122, 0.12);
  border-color: transparent;
}

/* ── Form elements ─────────────────────────────────────────────────── */

.label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.input {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 11px 14px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

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

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(143, 176, 122, 0.2);
}

.form-grid {
  display: grid;
  gap: 16px;
}

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

/* ── Actions row ───────────────────────────────────────────────────── */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* ── Alerts ────────────────────────────────────────────────────────── */

.alert {
  display: none;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
}

.alert.show { display: block; }
.alert.success { background: var(--success-bg); color: var(--success); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert.error { background: var(--danger-bg); color: var(--danger); }

/* ── Meta text ─────────────────────────────────────────────────────── */

.meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.meta strong { color: var(--text-secondary); }

/* ── Badge ─────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border-light);
  background: var(--surface-warm);
  color: var(--text-secondary);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--muted);
  flex-shrink: 0;
}

.badge-dot.ok { background: var(--success); }
.badge-dot.bad { background: var(--danger); }

/* ── Split layout ──────────────────────────────────────────────────── */

.split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Organization list ─────────────────────────────────────────────── */

.simple-list {
  display: grid;
  gap: 12px;
}

.simple-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--surface-warm);
  padding: 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.simple-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-soft);
}

.simple-item h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--primary-dark);
}

.simple-item p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.simple-item p + p { margin-top: 2px; }

/* ── Instruction list (check-email, etc.) ──────────────────────────── */

.instruction-list {
  display: grid;
  gap: 14px;
  counter-reset: steps;
}

.instruction-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.instruction-step::before {
  counter-increment: steps;
  content: counter(steps);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--accent-muted);
  color: var(--primary);
  font-family: "Sora", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.instruction-step p {
  margin: 0;
  padding-top: 4px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.instruction-step strong { color: var(--text); }

/* ── Card headings ─────────────────────────────────────────────────── */

.card h2 {
  margin: 0;
  font-size: 20px;
  color: var(--primary-dark);
  letter-spacing: -0.01em;
}

/* ── Utility ───────────────────────────────────────────────────────── */

.hidden { display: none !important; }

/* ── Auth / app responsive ─────────────────────────────────────────── */

@media (max-width: 600px) {
  .page-shell { padding: 20px 16px 48px; }
  .grid-2 { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .hero h1 { font-size: 24px; }
  .actions { flex-direction: column; }
  .actions .btn { width: 100%; }
}


/* ═══════════════════════════════════════════════════════════════════
   AUTH SPLIT LAYOUT (login / register / check-email)
   ═══════════════════════════════════════════════════════════════════ */

body.auth-split {
  margin: 0;
  background: var(--primary);
}

.auth-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Left panel (image) ───────────────────────────────────────────── */

.auth-left {
  flex: 0 0 50%;
  background: var(--bg-warm);
  display: flex;
  flex-direction: column;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.auth-left-img {
  flex: 1;
  /* First declaration is the legacy fallback: any browser that doesn't
     understand image-set() falls back to the JPG automatically. Modern
     browsers (Chrome/Edge, Firefox, Safari 14+) override it with the
     WebP — same image, ~58% smaller payload (328 KB vs 783 KB), no
     visible quality loss on this stylized map. Resized to 1400px wide
     at q80 during the webp encode; any wider is wasted bits for a
     50%-viewport panel. */
  background: url('/img/partners-hero.jpg') center center / cover no-repeat;
  background-image: image-set(
    url('/img/partners-hero.webp') type('image/webp'),
    url('/img/partners-hero.jpg') type('image/jpeg')
  );
}

.auth-logo {
  padding: 20px 24px;
  color: var(--primary-dark) !important;
  background: var(--bg-warm);
  flex-shrink: 0;
  z-index: 1;
}

/* ── Right panel (form) ──────────────────────────────────────────── */

.auth-right {
  flex: 0 0 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
}

.auth-right-inner {
  width: 100%;
  max-width: 500px;
}

.auth-right-inner h1 {
  margin: 0 0 8px;
  font-family: "Sora", sans-serif;
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  line-height: 1.5;
}

.auth-meta {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

/* ── Auth form ───────────────────────────────────────────────────── */

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-label {
  color: rgba(255, 255, 255, 0.8) !important;
  font-size: 13px;
}

.auth-input {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
  border-radius: var(--radius-full) !important;
  padding: 13px 20px !important;
  font-size: 15px;
}

.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.4) !important;
}

.auth-input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(143, 176, 122, 0.25) !important;
}

/* ── Auth buttons ────────────────────────────────────────────────── */

.btn-auth-primary {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: none;
  border-radius: var(--radius-full);
  background: #fff;
  color: var(--primary-dark);
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 24px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-auth-primary:hover {
  background: var(--bg-cream);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

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

.btn-auth-primary[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

.btn-auth-outline {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  background: transparent;
  color: #fff;
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-auth-outline:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

/* ── Auth divider ────────────────────────────────────────────────── */

.auth-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 28px 0;
}

/* ── Auth switch (register/login toggle) ─────────────────────────── */

.auth-switch {
  text-align: center;
}

.auth-switch p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  font-weight: 600;
}

.auth-free {
  margin-top: 12px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: rgba(255, 255, 255, 0.45) !important;
}

/* ── Auth check-email steps ──────────────────────────────────────── */

.auth-instructions {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.auth-step {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-step-num {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.auth-step p {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  line-height: 1.4;
}

.auth-step strong {
  color: #fff;
}

/* Terms checkbox on dark bg */
.auth-terms-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 4px 0;
}
.auth-terms-label a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-terms-label a:hover {
  opacity: 0.85;
}
.auth-terms-check {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}
.auth-terms-check:checked {
  background: var(--accent, #8fb07a);
  border-color: var(--accent, #8fb07a);
}
.auth-terms-check:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.auth-terms-shake {
  animation: terms-shake 0.4s ease;
}
@keyframes terms-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

/* Alerts on dark bg */
.auth-right .alert.error {
  background: rgba(220, 60, 55, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 120, 115, 0.35);
  border-radius: var(--radius-full);
  text-align: center;
  font-weight: 600;
  font-size: 13px;
}

.auth-right .alert.warn {
  background: rgba(255, 180, 50, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 200, 100, 0.3);
  border-radius: var(--radius-full);
  text-align: center;
  font-weight: 600;
  font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════════════
   ONBOARDING WIZARD (multi-step on auth-split layout)
   ═══════════════════════════════════════════════════════════════════ */

/* Right panel as flex column: nav top, content centered */
.ob-right {
  flex-direction: column;
  padding: 0;
}

.ob-right > .auth-right-inner {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px 48px;
}

.ob-container {
  max-width: 500px;
  width: 100%;
}

.ob-step {
  animation: ob-fade-in 0.3s ease;
}

@keyframes ob-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Progress nav bar ─────────────────────────────────────────────── */

.ob-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  flex-shrink: 0;
}

.ob-nav-arrow {
  appearance: none;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ob-nav-arrow:hover:not([disabled]) {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.ob-nav-arrow[disabled] {
  opacity: 0.2;
  cursor: not-allowed;
}

.ob-nav-center {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ob-dots {
  display: flex;
  gap: 6px;
}

.ob-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
  transition: all var(--transition);
}

.ob-dot.current {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.ob-dot.done {
  background: rgba(255, 255, 255, 0.5);
}

.ob-nav-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}

/* ── Form groups ─────────────────────────────────────────────────── */

.ob-form-group {
  display: grid;
  gap: 16px;
  margin: 20px 0;
}

.ob-section {
  margin-bottom: 20px;
}

.ob-section:last-of-type {
  margin-bottom: 24px;
}

/* ── Gender chips (dark bg) ──────────────────────────────────────── */

.ob-gender-toggle {
  display: flex;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 46px;
}

.ob-gender-opt {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 0 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex: 1;
  text-align: center;
}

.ob-gender-opt:first-child {
  border-right: 1.5px solid rgba(255, 255, 255, 0.2);
}

.ob-gender-opt:hover:not(.active) {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.05);
}

.ob-gender-opt.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.ob-chip {
  appearance: none;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ob-chip:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.ob-chip.active {
  background: #fff;
  border-color: #fff;
  color: var(--primary-dark);
}

.ob-chip-sm {
  font-size: 13px;
  padding: 6px 14px;
}

.ob-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.ob-lang-more {
  display: none;
}

.ob-lang-expanded .ob-lang-more {
  display: inline-flex;
}

.ob-lang-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-full);
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 7px 14px;
  margin-top: 10px;
  transition: all var(--transition-fast);
}

/* Chevron pointing down — rotates up when the list is expanded so
   the affordance mirrors the action (show more → hide more). */
.ob-lang-toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
  transition: transform 0.2s ease;
}

.ob-lang-expanded + .ob-lang-toggle::after {
  transform: translateY(2px) rotate(-135deg);
}

.ob-lang-toggle:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.06);
}

.ob-lang-toggle:active {
  background: rgba(255, 255, 255, 0.1);
}

/* ── Name row ────────────────────────────────────────────────────── */

.ob-name-row {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 12px;
  align-items: end;
}

/* ── Avatar upload area ──────────────────────────────────────────── */

.ob-avatar-upload {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1.5px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ob-avatar-upload:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.ob-avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.ob-avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.ob-avatar-upload:hover .ob-avatar-overlay {
  opacity: 1;
}

.ob-avatar-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ob-avatar-cta {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.ob-avatar-upload:hover .ob-avatar-cta {
  color: #fff;
}

/* Hide placeholder icon once a photo is set */
.ob-avatar-preview[style*="background-image"] .ob-avatar-placeholder {
  display: none;
}

.ob-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

.btn-sm-ob {
  font-size: 13px;
  padding: 7px 16px;
}

/* ── Experience slider ───────────────────────────────────────────── */

.ob-slider-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.ob-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
}

.ob-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: transparent;
}

.ob-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  margin-top: -9px;
}

.ob-slider::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: transparent;
  border: none;
}

.ob-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.ob-slider::-moz-range-progress {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 3px;
  height: 6px;
}

.ob-slider-value {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 600;
  min-width: 64px;
  text-align: right;
}

/* ── Org preview card ────────────────────────────────────────────── */

.ob-org-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 14px;
}

.ob-org-preview > div {
  flex: 1;
}

.ob-org-preview-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  object-fit: contain;
  flex-shrink: 0;
}

/* ── Email list (invite step) ────────────────────────────────────── */

.ob-email-list {
  display: grid;
  gap: 8px;
}

.ob-email-row {
  display: flex;
  gap: 8px;
}

.ob-email-row input {
  flex: 1;
}

/* ── Button row ──────────────────────────────────────────────────── */

.ob-btn-row {
  display: flex;
  gap: 10px;
}

.ob-btn-row .btn {
  flex: 1;
}

/* ── Invite welcome card ─────────────────────────────────────────── */

.ob-invite-card {
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  margin-bottom: 24px;
}

.ob-invite-org {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.ob-invite-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.ob-invite-org-name {
  font-family: "Sora", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

/* ── Auth split responsive ───────────────────────────────────────── */

@media (max-width: 768px) {
  .auth-layout {
    flex-direction: column;
  }

  .auth-left {
    flex: none;
    min-height: 200px;
    padding: 0;
  }

  /* Onboarding steps: drop the decorative map banner to reclaim the
     vertical space the form needs. The image only carries branding on
     the first register/login screen; inside the flow the progress bar
     + form take over and the image just pushes content off-screen.
     Uses :has() to scope the rule to layouts that contain .ob-right
     (onboarding's right panel), leaving the register/login page
     untouched. */
  .auth-layout:has(.ob-right) .auth-left {
    display: none;
  }

  .auth-logo {
    padding: 16px 20px;
  }

  .auth-right {
    flex: 1;
    padding: 32px 24px 48px;
  }

  /* Onboarding right panel has its own internal layout (sticky nav +
     centered step). Kill the generic top/side padding so the sticky
     header sits flush against the viewport top and gains back the
     vertical real estate. */
  .auth-right.ob-right {
    padding: 0;
  }

  .auth-right-inner {
    max-width: 100%;
  }

  .auth-form .grid-2 {
    grid-template-columns: 1fr;
  }

  /* Name step — stack Trato / Nombre / Apellido vertically on mobile
     so each field gets the full available width. On the previous
     2-column layout Apellido wrapped awkwardly to a second row while
     Trato and Nombre crowded the first row. */
  .ob-name-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .ob-gender-toggle {
    max-width: 180px;
  }

  /* Onboarding progress bar becomes a sticky app header on mobile so
     the step indicator stays visible while the form scrolls. Solid
     primary background covers the content sliding behind it. */
  .ob-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 14px 20px;
    background: var(--primary);
  }

  .ob-right > .auth-right-inner {
    padding: 0 24px 40px;
  }

  .ob-btn-row {
    flex-direction: column;
  }

  /* Swap primary/skip order on mobile — Continuar on top, Omitir
     below. Mobile users expect the primary action first; the skip
     option remains reachable without competing for attention. */
  .ob-btn-row .btn-auth-primary { order: 0; }
  .ob-btn-row .btn-auth-outline { order: 1; }

  /* Languages: show only the first 5 chips by default on mobile
     (instead of 9) to keep the step compact. "Ver más idiomas"
     reveals the rest via the existing .ob-lang-expanded toggle. */
  .ob-chip-grid:not(.ob-lang-expanded) .ob-chip:nth-child(n+6) {
    display: none;
  }

  /* Avatar upload card — trim height so the full profile step fits
     on a single mobile viewport. Smaller preview circle, tighter
     padding, and the hint stays on one line. */
  .ob-avatar-upload {
    padding: 10px 14px;
    gap: 12px;
  }
  .ob-avatar-preview {
    width: 48px;
    height: 48px;
  }
  .ob-avatar-placeholder { width: 28px; height: 28px; }
  .ob-avatar-cta { font-size: 13px; }
  .ob-avatar-text .ob-hint { font-size: 11px; }

  /* Auth page — vertical space is tight on mobile, so drop the
     horizontal divider between the submit button and the register/login
     switch, and pull the switch block closer so it isn't clipped below
     the fold. */
  .auth-divider {
    background: transparent;
    margin: 12px 0 0;
    height: 0;
  }
  .auth-switch p {
    margin: 0 0 8px;
    font-size: 14px;
  }
}


/* ═══════════════════════════════════════════════════════════════════
   DASHBOARD — Sidebar Layout
   ═══════════════════════════════════════════════════════════════════ */

.dash {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────────────────────────────── */

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 200;
}

/* Org switcher (top) */

.sb-org {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.sb-org-btn {
  appearance: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 12px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.sb-org-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sb-org-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.sb-org-name {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sb-org-chevron {
  flex-shrink: 0;
  opacity: 0.5;
  font-size: 12px;
}

/* Org popup */

.sb-popup {
  display: none;
  position: absolute;
  left: 12px;
  right: 12px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  overflow: hidden;
}

.sb-popup.open { display: block; }

.sb-popup-org { top: calc(100% + 4px); }
.sb-popup-profile { bottom: calc(100% + 4px); }

.sb-popup-label {
  padding: 10px 14px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.sb-popup-item {
  appearance: none;
  background: none;
  border: none;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  padding: 10px 14px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background var(--transition-fast);
  text-decoration: none;
}

.sb-popup-item:hover { background: var(--bg-cream); }

.sb-popup-item.active {
  font-weight: 600;
  color: var(--primary);
}

.sb-popup-item .check {
  margin-left: auto;
  color: var(--primary);
  font-size: 16px;
}

.sb-popup-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}

.sb-popup-item-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent-muted);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

/* Nav links (middle) */

.sb-nav {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sb-nav-item {
  appearance: none;
  background: none;
  border: none;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  width: 100%;
  text-align: left;
}

.sb-nav-item:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
}

.sb-nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 600;
}

.sb-nav-icon {
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  font-size: 15px;
  opacity: 0.7;
}

.sb-nav-item.active .sb-nav-icon { opacity: 1; }

.sb-nav-svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.6;
}

.sb-nav-item.active .sb-nav-svg { opacity: 1; }

/* Mobile-only nav items (Organización, Perfil) — hidden on desktop,
   revealed inside the mobile media query below. */
.sb-nav-mobile-only { display: none; }

.sb-popup-svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--muted);
}

/* Profile (bottom) */

.sb-profile {
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.sb-profile-btn {
  appearance: none;
  background: none;
  border: none;
  font: inherit;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  padding: 8px 4px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: color var(--transition-fast);
  text-align: left;
}

.sb-profile-btn:hover { color: rgba(255, 255, 255, 0.9); }

.sb-profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
}

.sb-profile-email {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

/* ── Main content area ────────────────────────────────────────────── */

.dash-main {
  flex: 1;
  margin-left: 240px;
  width: calc(100% - 240px);
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg-cream);
}

.dash-page {
  display: none;
}

.dash-page.active { display: flex; flex-direction: column; min-height: 100vh; }

/* ── Top bar (per page) ──────────────────────────────────────────── */

.dash-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 40px;
  background: var(--bg-cream);
  border-bottom: 1px solid var(--border-light);
}

.dash-topbar-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
}

.dash-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Page content area ───────────────────────────────────────────── */

.dash-content {
  flex: 1;
  padding: 32px 40px 64px;
  max-width: 960px;
}

.dash-empty {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

/* ── Chip selector ────────────────────────────────────────────────── */

.chip-group {
  display: flex;
  gap: 8px;
}

.chip {
  appearance: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text-secondary);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chip:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.chip-sm {
  font-size: 13px;
  padding: 6px 14px;
}

.chip-group-wrap {
  flex-wrap: wrap;
}

/* ── Field hints ──────────────────────────────────────────────────── */

.field-hint {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

/* ── Language search autocomplete ─────────────────────────────────── */

.lang-search-wrap {
  position: relative;
}

.lang-suggestions {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 240px;
  max-height: 180px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 50;
  margin-top: 4px;
}

.lang-suggestions.open { display: block; }

.lang-suggestion {
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.lang-suggestion:hover {
  background: var(--bg-cream);
}

/* ── Profile avatar (large, perfil page) ─────────────────────────── */

/* ── Profile page: lang toggle + slider ────────────────────────────── */

.perfil-lang-more {
  display: none !important;
}

.perfil-lang-expanded .perfil-lang-more {
  display: inline-flex !important;
}

.perfil-lang-toggle {
  appearance: none;
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  margin-top: 4px;
  transition: color var(--transition-fast);
}

.perfil-lang-toggle:hover {
  color: var(--primary);
}

.perfil-save-muted {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--muted) !important;
  box-shadow: none !important;
  cursor: default !important;
  opacity: 1;
  font-size: 13px;
}

.perfil-save-muted:hover {
  transform: none !important;
  background: transparent !important;
  color: var(--muted) !important;
  box-shadow: none !important;
}

/* ── Profile page 2-column layout ── */
.perfil-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  max-width: 820px;
}
.perfil-col-left {
  display: grid;
  gap: 16px;
  align-content: start;
}
.perfil-col-right {
  display: grid;
  gap: 16px;
  align-content: start;
}
@media (max-width: 768px) {
  .perfil-layout {
    grid-template-columns: 1fr;
  }
  /* Flatten the two columns into the parent grid so CSS `order` below
     can interleave cards from left/right in a single visual sequence.
     Desktop keeps the two-column layout (the rule above only kicks in
     on narrow viewports). */
  .perfil-col-left,
  .perfil-col-right { display: contents; }

  /* Mobile ordering: profile form is primary content, "Sesión" and
     "Zona de peligro" are utility actions and belong at the bottom. */
  .perfil-card-photo   { order: 1; }
  .perfil-card-form    { order: 2; }
  .perfil-card-legal   { order: 3; }
  .perfil-card-session { order: 4; }
  .perfil-card-danger  { order: 5; }

  /* /organizacion ajustes reuses .perfil-layout + .perfil-col-*,
     so display:contents is already applied above. Just declare
     the card order so "Zona de peligro" sinks to the bottom. */
  .org-settings-card-logo   { order: 1; }
  .org-settings-card-form   { order: 2; }
  .org-settings-card-admin  { order: 3; }
  .org-settings-card-danger { order: 4; }
}

.perfil-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
}

.perfil-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  margin-top: -8px;
}

.perfil-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: transparent;
}

.perfil-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  cursor: pointer;
}

.perfil-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--accent-muted);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 24px;
  flex-shrink: 0;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.org-logo-preview {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  background: var(--accent-muted);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 24px;
  flex-shrink: 0;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* ── Member rows (org page) ───────────────────────────────────────── */

.member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

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

.member-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--accent-muted);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.member-info {
  flex: 1;
  min-width: 0;
}

.member-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-email {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-role {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.member-role.admin {
  background: var(--accent-muted);
  color: var(--primary);
}

.member-role.member {
  background: var(--bg-cream);
  color: var(--muted);
}

/* ── Info tooltip ─────────────────────────────────────────────────── */

.info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  font-size: 15px;
  color: var(--muted);
  position: relative;
  vertical-align: middle;
  margin-left: 2px;
}

.info-tip-bubble {
  position: fixed;
  background: var(--primary-dark);
  color: #fff;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  width: min(260px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  white-space: normal;
  pointer-events: none;
  z-index: 9999;
  box-shadow: var(--shadow-lg);
}

/* ── Org panels (two-column layout) ───────────────────────────────── */

.dash-page-fullpanel.active {
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.org-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.org-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-light);
  min-height: 0;
}

.org-panel:last-child { border-right: none; }

.org-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-cream);
}

.org-panel-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.org-panel-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.org-panel-body {
  flex: 1;
  padding: 20px 24px;
  overflow: hidden;
}

/* Members grid (2 cols) */

.org-members-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Member card */

.org-member-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}

.org-member-card:hover { border-color: var(--accent); }

.org-member-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--accent-muted);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 15px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.org-member-info {
  flex: 1;
  min-width: 0;
}

.org-member-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-member-role {
  font-size: 12px;
  color: var(--muted);
}

.org-member-badge {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Sora", sans-serif;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Skeleton placeholders */

.org-skeleton {
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--border-light);
  opacity: 0.5;
}

@media (max-width: 768px) {
  .org-panels {
    grid-template-columns: 1fr;
    /* On mobile the two stacked panels may exceed the viewport with
       many members/zones — let the page scroll naturally instead of
       clipping inside a fixed-height fullpanel container. */
    overflow: visible;
    flex: none;
  }
  .org-panel { border-right: none; border-bottom: 1px solid var(--border-light); }
  .org-panel:last-child { border-bottom: none; }
  .org-panel-body { overflow: visible; padding: 16px 16px 20px; }
  .org-members-grid { grid-template-columns: 1fr; }

  /* Let the organizacion page scroll naturally on mobile rather
     than clipping content inside the desktop fullpanel box. */
  #page-organizacion.dash-page-fullpanel.active {
    height: auto;
    min-height: calc(100vh - 56px);
    max-height: none;
    overflow: visible;
  }
}

/* ── Zones page (split with map) ─────────────────────────────────── */

.zones-panels {
  display: grid;
  grid-template-columns: clamp(260px, 32%, 400px) 1fr;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.zones-list-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-light);
  min-height: 0;
  min-width: 0; /* allow grid child to shrink below content width */
  overflow-y: auto;
  overflow-x: hidden;
}

.zones-map-panel {
  position: relative;
  min-height: 0;
}

.zones-map-panel #zones-map {
  width: 100%;
  height: 100%;
  min-height: 400px;
}

/* ── Map legend (floating overlay, consumer-app style) ──────── */
.zones-map-panel .map-legend {
  position: absolute;
  bottom: 28px;
  right: 12px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  max-width: 220px;
  min-width: 170px;
  font-size: 0.78rem;
  transition: box-shadow 0.2s, opacity 0.25s, transform 0.25s;
  cursor: pointer;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}
.zones-map-panel .map-legend.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.zones-map-panel .map-legend:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
}
.zones-map-panel .map-legend-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  gap: 6px;
}
.zones-map-panel .map-legend-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-dark);
  font-family: 'Sora', sans-serif;
}
.zones-map-panel .map-legend-chevron {
  transition: transform 0.25s ease;
  color: var(--muted);
  flex-shrink: 0;
}
.zones-map-panel .map-legend.is-collapsed .map-legend-chevron {
  transform: rotate(-90deg);
}
.zones-map-panel .map-legend-body {
  padding: 0 12px 10px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
  max-height: 400px;
  opacity: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.zones-map-panel .map-legend.is-collapsed .map-legend-body {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}
.zones-map-panel .map-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.76rem;
  color: var(--text-secondary);
}
.zones-map-panel .map-legend .legend-color {
  width: 22px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.zones-map-panel .map-legend-footer {
  padding: 0 12px 10px;
  font-size: 0.68rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.35;
}
.zones-map-panel .map-legend.is-collapsed .map-legend-footer {
  display: none;
}

/* Force compact attribution (i icon) regardless of map width */
.zones-map-panel .maplibregl-ctrl-attrib:not(.maplibregl-compact-show) .maplibregl-ctrl-attrib-inner {
  display: none;
}
.zones-map-panel .maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button {
  display: block;
}

/* Subtle attribution — matches the consumer-app treatment so the
   watermark isn't distracting. Fades in on hover if the user wants
   to read it. */
.zones-map-panel .maplibregl-ctrl-attrib {
  font-size: 10px !important;
  opacity: 0.45;
  transition: opacity 0.2s;
  background: transparent !important;
}
.zones-map-panel .maplibregl-ctrl-attrib:hover {
  opacity: 0.85;
}

/* Shared pane header card (used for "Mis zonas" in /tus-zonas and
   "Todos los leads" in /leads). Keeps both submenus visually aligned. */

.my-zones-card,
.pane-card {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  background: var(--surface-warm);
}

.my-zones-header,
.pane-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.my-zones-title,
.pane-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-dark);
}

.my-zones-badge,
.pane-card-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-muted);
  color: var(--primary);
}

.my-zones-list {
  display: grid;
  gap: 8px;
  padding: 16px 16px 0;
}

/* Panel views */
.hidden { display: none !important; }

/* Tip carousel */
.tip-carousel {
  margin: 16px 16px 16px;
  padding: 20px 20px 16px;
  background: var(--bg-warm);
  border-radius: var(--radius-md);
  text-align: center;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.tip-icon {
  color: var(--primary-light);
  margin-bottom: 8px;
  opacity: 0.7;
}

.tip-slides {
  position: relative;
  height: 42px;
  width: 100%;
}

.tip-slide {
  position: absolute;
  inset: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--primary-dark);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.tip-slide.active {
  opacity: 1;
  pointer-events: auto;
}

@keyframes tip-fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.tip-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.tip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-light);
  transition: background 0.3s;
  cursor: pointer;
}

.tip-dot:hover {
  background: var(--primary-light);
}

.tip-dot.active {
  background: var(--primary);
}

/* Inline cities hint */
.zv-cities-inline {
  text-align: center;
  padding: 0;
}

.zv-cities-inline .city-list {
  text-align: left;
}

.zv-cities-hint {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
  margin: 0 0 4px;
}

.zv-hint-arrow {
  color: var(--primary-light);
  margin-bottom: 12px;
  animation: zv-bounce 1.5s ease-in-out infinite;
}

@keyframes zv-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* Claim more CTA */
.zv-claim-more {
  padding: 8px 20px 16px;
}

.zv-claim-more-btn {
  appearance: none;
  background: var(--success-bg);
  border: 1.5px solid var(--accent-muted);
  border-radius: var(--radius-md);
  font: inherit;
  font-size: 14px;
  color: var(--text);
  padding: 14px 18px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.zv-claim-more-btn:hover {
  border-color: var(--primary);
  background: var(--accent-muted);
  box-shadow: var(--shadow-soft);
}

.zv-cm-label {
  font-weight: 700;
  color: var(--primary-dark);
}

.zv-cm-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.zv-cm-pill {
  background: var(--primary);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

/* Mobile: drop the "Ver ciudades" pill — just show the centered
   "Reclamar más zonas" label. Avoids the cramped two-line wrap on
   narrow screens. */
@media (max-width: 768px) {
  .zv-claim-more-btn { justify-content: center; }
  .zv-claim-more-btn .zv-cm-right { display: none; }
}

/* Invite CTA button */
.zv-invite-cta-btn {
  appearance: none;
  background: var(--surface);
  border: 1.5px dashed var(--accent-muted);
  border-radius: var(--radius-md);
  font: inherit;
  font-size: 14px;
  color: var(--text);
  padding: 14px 18px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.zv-invite-cta-btn:hover {
  border-color: var(--primary);
  border-style: solid;
  background: var(--success-bg);
  box-shadow: var(--shadow-soft);
}

.zv-invite-cta-left {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--primary);
  text-align: left;
}

.zv-invite-cta-title {
  display: block;
  font-weight: 700;
  font-size: 14px;
  color: var(--primary-dark);
  line-height: 1.3;
}

.zv-invite-cta-sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.3;
  margin-top: 2px;
}

.zv-cm-chevron {
  font-size: 18px;
  color: var(--primary-light);
}


/* Mode B: Rich claim cards */
.my-zone-card {
  background: var(--surface);
  border: 1.5px solid var(--accent-muted);
  border-radius: var(--radius-md);
  padding: 0;
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.my-zone-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

/* Header row: name + city + status badge */
.mzc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px 10px;
  flex-wrap: wrap;
}

.mzc-info {
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.mzc-name {
  display: block;
  font-weight: 700;
  font-size: 15px;
  color: var(--primary-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mzc-info:hover .mzc-name {
  color: var(--primary);
}

.mzc-city {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* Review quote section */
.mzc-review-section {
  padding: 0 16px 12px;
}

.mzc-review-quote {
  background: var(--surface-warm);
  border-left: 3px solid var(--accent-muted);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 12px;
  position: relative;
}

.mzc-review-text {
  font-size: 13px;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Mobile: stack the action row below the title so the Editar button
   and status badge stop being clipped on narrow screens. */
@media (max-width: 768px) {
  .mzc-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .mzc-info { width: 100%; }
  .mzc-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .mzc-name { white-space: normal; }
}

/* Top-right actions (edit + status) */
.mzc-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Edit button */
.mzc-edit-btn {
  appearance: none;
  border: 1px solid var(--border-light);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.mzc-edit-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--success-bg);
}

.mzc-edit-btn svg {
  flex-shrink: 0;
}

/* Stats bar */
.mzc-stats {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--accent-muted);
  background: var(--surface);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.mzc-stat {
  flex: 1;
  text-align: center;
  padding: 10px 4px;
}

.mzc-stat:not(:last-child) {
  border-right: 1px solid var(--border-light);
}

.mzc-stat-val {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
  font-family: "Sora", sans-serif;
}

.mzc-stat-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Stat tooltip */
.mzc-stat[data-tip] {
  cursor: help;
  position: relative;
}

.mzc-stat[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-dark);
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  width: 200px;
  white-space: normal;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: 10;
  box-shadow: var(--shadow);
}

.mzc-stat[data-tip]:hover::after {
  opacity: 1;
}

/* Review status badge */
.mzc-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.mzc-status--approved {
  background: var(--success-bg);
  color: var(--success);
}

.mzc-status--pending {
  background: var(--warn-bg);
  color: var(--warn);
}

.mzc-status--rejected {
  background: var(--danger-bg);
  color: var(--danger);
}

/* Rejected card overrides */
.my-zone-card--rejected {
  border-color: #e8b4b2;
}

.my-zone-card--rejected:hover {
  border-color: var(--danger);
}

.my-zone-card--rejected .mzc-review-quote {
  background: var(--danger-bg);
  border-left-color: var(--danger);
}

.my-zone-card--rejected .mzc-review-text {
  color: var(--danger);
  text-decoration: line-through;
  text-decoration-color: rgba(193, 67, 62, 0.3);
}

.mzc-rejected-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--danger-bg);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 8px;
}

.mzc-rejected-notice svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--danger);
}

.mzc-rejected-notice-text {
  font-size: 12px;
  line-height: 1.5;
  color: var(--danger);
}

.mzc-rejected-notice-text strong {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
}

/* Delete zone button inside modal */
.cm-delete-zone {
  appearance: none;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cm-delete-zone:hover {
  color: var(--danger);
  background: var(--danger-bg);
}

/* Confirm delete state */
.cm-confirm-delete {
  display: none;
  background: var(--danger-bg);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 0 28px 16px;
}

.cm-confirm-delete.visible {
  display: block;
}

.cm-confirm-delete p {
  font-size: 13px;
  color: var(--danger);
  line-height: 1.5;
  margin: 0 0 10px;
}

.cm-confirm-delete-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.cm-confirm-delete-actions .btn-sm {
  font-size: 12px;
  padding: 5px 14px;
}

/* Skeleton loading card */
.mzc-skeleton {
  position: relative;
  overflow: hidden;
  padding: 16px;
}

.mzc-skeleton-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.mzc-skeleton-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.mzc-skeleton-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-light);
  animation: sk-pulse 1s ease-in-out infinite;
}

@keyframes sk-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.mzc-skeleton-msg {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.mzc-skeleton-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mzc-skeleton-bar {
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--border-light) 25%, var(--bg-warm) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: sk-shimmer 1.5s ease-in-out infinite;
}

.mzc-skeleton-bar.short {
  width: 60%;
}

@keyframes sk-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Reveal animation for new claim card */
.mzc-reveal {
  animation: mzc-reveal-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes mzc-reveal-in {
  from { opacity: 0; transform: scale(0.95) translateY(-8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Add zone card */
.my-zone-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border: 1.5px dashed var(--border-light);
  border-radius: var(--radius-md);
  color: var(--primary-light);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.my-zone-add:hover {
  border-color: var(--primary);
  background: var(--accent-muted);
  color: var(--primary);
}

.mza-plus {
  font-size: 18px;
  line-height: 1;
}

.my-zones-empty {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 0;
}

/* Title as back button */
.my-zones-title,
.pane-card-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.my-zones-title.mzt-clickable {
  cursor: pointer;
  transition: color var(--transition-fast);
}

.my-zones-title.mzt-clickable:hover {
  color: var(--primary);
}

.mzt-arrow {
  flex-shrink: 0;
}

.mzt-arrow.hidden {
  display: none;
}

/* City accordion */

.city-list {
  padding: 8px 0;
}

.city-item {
  padding: 2px 0;
}

.city-btn {
  appearance: none;
  background: var(--surface);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  font: inherit;
  font-size: 14px;
  color: var(--text);
  padding: 14px 18px;
  margin: 4px 16px;
  width: calc(100% - 32px);
  max-width: calc(100% - 32px);
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.city-btn:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-soft);
}

.city-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.city-btn.active .city-name-label {
  color: #fff;
}

.city-btn.active .city-searches {
  color: rgba(255, 255, 255, 0.8);
}

.city-btn.active .city-cta {
  color: rgba(255, 255, 255, 0.85);
}

.city-btn-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.city-name-label {
  font-weight: 700;
  color: var(--primary-dark);
}

.city-searches {
  font-size: 12px;
  font-weight: 500;
  color: var(--primary-light);
  display: flex;
  align-items: center;
  gap: 4px;
}

.city-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-light);
  flex-shrink: 0;
}

.city-btn.active .city-dot {
  background: rgba(255, 255, 255, 0.7);
}

.city-cta {
  font-size: 13px;
  font-weight: 500;
  color: var(--primary-light);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.city-cta-pill {
  background: var(--accent-muted);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.city-btn:hover .city-cta-pill {
  background: var(--primary);
  color: #fff;
}

.city-btn.active .city-cta-pill {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.city-btn:hover .city-cta {
  color: var(--primary);
}

.city-chevron {
  font-size: 18px;
  line-height: 1;
  transition: transform var(--transition-fast);
}

.city-btn.active .city-chevron {
  transform: rotate(90deg);
}

.n-search-bar-slot {
  display: none;
  padding: 4px 16px 0;
  animation: n-item-in 0.25s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.n-search-bar-slot:has(.n-search-bar) + .neighborhood-list.open ~ .n-search-bar-slot,
.neighborhood-list.open ~ .n-search-bar-slot { display: none; }

/* Show search slot when its sibling list is open */
.city-item:has(.neighborhood-list.open) .n-search-bar-slot {
  display: block;
}

.neighborhood-list {
  display: none;
  padding: 4px 16px 12px;
  gap: 4px;
  max-height: 55vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.neighborhood-list.open {
  display: grid;
  /* minmax(0, 1fr) lets the column shrink below the max-content of
     long barrio names, otherwise the grid column would balloon past
     the container width. */
  grid-template-columns: minmax(0, 1fr);
}

.neighborhood-list.open > .neighborhood-item {
  animation: n-item-in 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes n-item-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.n-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}

.n-search-bar svg {
  flex-shrink: 0;
  color: var(--text-muted);
}

.n-search-input {
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  width: 100%;
}

.n-search-input::placeholder {
  color: var(--text-muted);
}

.n-search-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--border-light);
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.n-search-clear:hover {
  background: var(--text-muted);
  color: #fff;
}

.n-search-clear:active {
  transform: scale(0.9);
}

.n-search-clear.hidden {
  display: none;
}

.neighborhood-item {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 13px;
  color: var(--text);
  padding: 10px 14px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all var(--transition-fast);
  text-align: left;
}

.neighborhood-item:hover {
  border-color: var(--primary-light);
  background: var(--surface-warm);
}

.neighborhood-item.active {
  border-color: var(--primary);
  background: var(--accent-muted);
}

.neighborhood-item.is-claimed {
  border-left: 3px solid var(--success);
}

.neighborhood-item .n-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  min-width: 0;
}

.neighborhood-item .n-name {
  font-weight: 600;
  color: var(--primary-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.neighborhood-item:hover .n-name {
  color: var(--primary);
}

.neighborhood-item .n-searches {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.neighborhood-item .n-search-count {
  font-weight: 700;
}

/* Pulsing dot indicator — color synced with map gradient via inline --dot-color */
.neighborhood-item .n-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dot-color, var(--primary-light));
  flex-shrink: 0;
}

.neighborhood-item .n-dot-pulse {
  animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--dot-color, #e74c3c); }
  50% { opacity: 0.6; box-shadow: 0 0 0 5px rgba(210, 70, 50, 0); }
}

.neighborhood-item .n-action {
  flex-shrink: 0;
  white-space: nowrap;
}

.neighborhood-item .n-action-claim {
  appearance: none;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.neighborhood-item .n-action-claim:hover {
  background: var(--primary-dark);
}

.neighborhood-item .n-action-claimed {
  font-size: 11px;
  font-weight: 600;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 4px;
}


/* Map tooltip */

.zones-map-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--primary-dark);
  color: #fff;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  z-index: 10;
  transform: translate(-50%, -100%);
  margin-top: -8px;
  box-shadow: var(--shadow);
  display: none;
}

.zones-map-tooltip.visible { display: block; }

/* Coming soon section */

.coming-soon-section {
  margin: 8px 16px 20px;
  padding: 20px;
  background: var(--bg-warm);
  border-radius: var(--radius-md);
  text-align: center;
}

.coming-soon-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 14px;
}

.coming-soon-form {
  display: flex;
  gap: 8px;
}

.coming-soon-input {
  flex: 1 1 0;
  min-width: 0;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color var(--transition-fast);
}

.coming-soon-input:focus {
  border-color: var(--primary);
}

.coming-soon-input::placeholder {
  color: var(--text-muted);
}

.coming-soon-submit {
  appearance: none;
  border: none;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition-fast);
}

.coming-soon-submit:hover {
  background: var(--primary-dark);
}

.coming-soon-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.coming-soon-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--success);
}

.coming-soon-success.hidden,
.coming-soon-form.hidden {
  display: none;
}

/* ── Claim celebration ───────────────────────────────────────── */

.celeb-popup .maplibregl-popup-content {
  background: transparent;
  box-shadow: none;
  padding: 0;
  pointer-events: none;
}

.celeb-popup .maplibregl-popup-tip {
  display: none;
}

.celeb-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: celeb-drop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes celeb-drop {
  0% { opacity: 0; transform: scale(0.3) translateY(-30px); }
  60% { opacity: 1; transform: scale(1.08) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.celeb-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 3px solid #fff;
  box-shadow: 0 4px 24px rgba(180, 134, 11, 0.4), 0 0 0 3px #D4A830;
  animation: celeb-ring 1.5s ease-out 0.3s both;
}

.celeb-avatar-init {
  background: linear-gradient(135deg, #D4A830, #B8860B);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  font-family: "Sora", sans-serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

@keyframes celeb-ring {
  0% { box-shadow: 0 4px 24px rgba(180, 134, 11, 0.4), 0 0 0 3px #D4A830; }
  30% { box-shadow: 0 4px 24px rgba(180, 134, 11, 0.5), 0 0 0 14px rgba(212, 168, 48, 0.2); }
  60% { box-shadow: 0 4px 24px rgba(180, 134, 11, 0.4), 0 0 0 6px rgba(212, 168, 48, 0.1); }
  100% { box-shadow: 0 4px 24px rgba(180, 134, 11, 0.4), 0 0 0 3px #D4A830; }
}

.celeb-label {
  text-align: center;
  background: linear-gradient(135deg, #B8860B, #8B6508);
  color: #fff;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 20px rgba(180, 134, 11, 0.35);
  animation: celeb-label-in 0.4s ease-out 0.5s both;
}

@keyframes celeb-label-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.celeb-title {
  font-family: "Sora", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.celeb-name {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.8;
}

/* ── Claim modal ─────────────────────────────────────────────── */

.claim-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(27, 67, 50, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.claim-modal-backdrop.open {
  display: flex;
}

.claim-modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.claim-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  appearance: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  z-index: 1;
}

.claim-modal-close:hover {
  background: var(--bg-warm);
  color: var(--text);
}

.claim-modal-header {
  padding: 28px 28px 0;
}

.claim-modal-header h2 {
  margin: 0;
  font-size: 22px;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
}

.cm-city {
  font-size: 14px;
  color: var(--muted);
}

.claim-modal-body {
  padding: 20px 28px;
}

.cm-form-section {
  margin-bottom: 24px;
}

.cm-form-section .label {
  margin-bottom: 4px;
}

.cm-form-section .field-hint {
  margin-bottom: 12px;
}

.cm-textarea {
  resize: vertical;
  min-height: 160px;
  font-size: 14px;
  line-height: 1.55;
}

.cm-textarea::placeholder {
  font-style: italic;
  color: var(--muted);
  opacity: 0.7;
}

.cm-char-count {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.cm-char-ring {
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.cm-char-ring-fill {
  transition: stroke-dashoffset 0.2s ease, stroke 0.2s ease;
}

.cm-char-num {
  font-variant-numeric: tabular-nums;
}

.cm-char-min {
  font-size: 11px;
  color: var(--danger);
  margin-right: auto;
  transition: opacity var(--transition-fast);
}

.cm-char-count--ok {
  color: var(--success);
}

.cm-char-count--warn {
  color: var(--danger);
}

.cm-preview-section {
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
}

.cm-preview-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 12px;
}

.cm-preview-card {
  background: var(--bg-cream);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
}

.cm-preview-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.cm-preview-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--accent-muted);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 17px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.cm-preview-info {
  flex: 1;
  min-width: 0;
}

.cm-preview-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-dark);
}

.cm-preview-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cm-preview-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
  min-height: 40px;
}

.claim-modal-footer {
  padding: 0 28px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.claim-modal-footer .meta {
  flex: 1;
}

/* ── Map popup (floating on polygon) ─────────────────────────── */

.map-claim-popup .maplibregl-popup-close-button {
  font-size: 20px;
  color: var(--text-muted);
  padding: 4px 10px;
  line-height: 1;
  right: 2px;
  top: 2px;
  background: transparent;
  outline: none;
  border: none;
}

/* Kill every interactive state — MapLibre's default + browser focus
   ring were painting a pale highlight on the × on page load because
   the close button receives focus when the popup is injected into
   the DOM programmatically (init auto-focus). */
.map-claim-popup .maplibregl-popup-close-button:hover,
.map-claim-popup .maplibregl-popup-close-button:focus,
.map-claim-popup .maplibregl-popup-close-button:focus-visible,
.map-claim-popup .maplibregl-popup-close-button:active {
  color: var(--text);
  background: transparent;
  outline: none;
  box-shadow: none;
}

.map-claim-popup .maplibregl-popup-content {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 18px 20px;
  min-width: 220px;
}

.map-claim-popup .maplibregl-popup-tip {
  border-top-color: var(--surface);
}

.map-popup-name {
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 2px;
}

.map-popup-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.map-popup-claim-btn {
  appearance: none;
  width: 100%;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-full);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(45, 90, 61, 0.2);
}

.map-popup-claim-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(45, 90, 61, 0.3);
}

.map-popup-claimed {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--success);
}

@media (max-width: 768px) {
  /* Mobile claim/review modal: full-screen sheet so it feels like
     part of the page (no floating padding around the edges). The
     header and footer are pinned, the body scrolls inside. */
  .claim-modal-backdrop {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }
  .claim-modal {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .claim-modal-header {
    padding: 16px 20px 0;
    flex-shrink: 0;
  }
  .claim-modal-header h2 {
    font-size: 18px;
    padding-right: 40px;
  }
  .claim-modal-body {
    padding: 16px 20px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
  }
  .claim-modal-footer {
    padding: 12px 20px 16px;
    flex-shrink: 0;
    border-top: 1px solid var(--border-light);
    background: var(--surface);
  }
  .claim-modal-close {
    top: 14px;
    right: 14px;
    font-size: 22px;
    padding: 6px 10px;
  }
  .cm-textarea { min-height: 140px; }
  .cm-confirm-delete { margin: 0 20px 12px; }

  /* Preview card's "Hacer una pregunta al experto" sample button:
     .btn defaults to white-space: nowrap, which overflows the narrow
     mobile preview. Allow wrapping inside the preview card. */
  .cm-preview-card .btn {
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
  }
}

@media (max-width: 768px) {
  /* On mobile we don't stack list+map; we show one or the other
     based on the .tab-active-list / .tab-active-map class on
     #page-zonas (toggled by the .zones-tabs buttons). */
  .zones-panels {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }
  .zones-list-panel {
    border-right: none;
    border-bottom: none;
    max-height: none;
  }

  /* City card: keep on a single row, drop the verbose CTA pill,
     show only the chevron + give the text room to ellipsis. */
  .city-btn {
    padding: 12px 14px;
    margin: 4px 12px;
    width: calc(100% - 24px);
    gap: 12px;
  }
  .city-btn-left {
    flex: 1 1 0;
    min-width: 0;
  }
  .city-name-label,
  .city-searches {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .city-cta-pill { display: none; }
  .city-cta { gap: 0; flex-shrink: 0; }

  /* Coming-soon section: tighter on mobile so the input + Enviar
     button comfortably fit inside the box. */
  .coming-soon-section {
    margin: 8px 12px 16px;
    padding: 16px 14px;
  }

  /* Barrio item: keep on one row, action stays right, info ellipsis */
  .neighborhood-item { padding: 10px 12px; gap: 8px; }
  .neighborhood-item .n-info { min-width: 0; flex: 1 1 0; }
  .neighborhood-item .n-name {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .neighborhood-item .n-action-claim {
    flex-shrink: 0;
    padding: 6px 12px;
  }

  /* Mobile tab toggle (segmented control style) */
  .zones-tabs {
    display: flex;
    flex-shrink: 0;
    padding: 8px 12px;
    gap: 6px;
    background: var(--bg-cream);
    border-bottom: 1px solid var(--border-light);
  }
  .zt-tab {
    flex: 1 1 0;
    appearance: none;
    border: 1px solid var(--border-light);
    background: var(--surface);
    color: var(--text-secondary);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
  }
  .zt-tab svg { opacity: 0.7; flex-shrink: 0; }
  .zt-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
  }
  .zt-tab.active svg { opacity: 1; }

  /* Show only one panel based on the active tab class */
  #page-zonas.tab-active-list .zones-map-panel { display: none; }
  #page-zonas.tab-active-map .zones-list-panel { display: none; }

  /* Map needs a definite height when it's the only visible panel */
  .zones-map-panel #zones-map {
    min-height: 0;
    height: 100%;
  }
}

/* Hide the mobile tab toggle on desktop — list and map sit side by
   side via .zones-panels grid like before. */
.zones-tabs { display: none; }

/* ── Backdrop for closing popups ──────────────────────────────────── */

.sb-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 199;
}

.sb-backdrop.open { display: block; }

/* ── Dashboard responsive (mobile top bar) ─────────────────────────
   On mobile the vertical sidebar becomes a fixed 56px top bar that
   holds a unified 4-item nav: [Tus Zonas] [Leads] [Organización] [Perfil].
   Each item is an equal-width flex cell with icon above label, so
   the nav reads like a classic mobile tab bar.
   The desktop-only .sb-org (branding) and .sb-profile (identity +
   popup) sections are hidden; their destinations are now reachable
   via the "Organización" and "Perfil" nav items. */

@media (max-width: 768px) {
  /* Hard guard: prevent horizontal page scroll on mobile.
     Any errant child wider than the viewport (long URLs, oversized
     map widgets, etc.) gets clipped instead of forcing the whole
     page to side-scroll. */
  html, body { overflow-x: hidden; max-width: 100%; }
  body { width: 100%; }
  .dash { max-width: 100vw; overflow-x: hidden; }
  .dash-main { max-width: 100vw; overflow-x: hidden; }

  .dash { flex-direction: column; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 56px;
    flex-direction: row;
    align-items: stretch;
    padding: 0;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 200;
  }

  /* Org + profile sections are replaced by nav items on mobile */
  .sb-org { display: none; }
  .sb-profile { display: none; }

  /* Nav fills the whole bar, 4 equal-width cells */
  .sb-nav {
    flex: 1;
    min-width: 0;
    flex-direction: row;
    padding: 0;
    gap: 0;
    align-items: stretch;
  }

  /* Show the mobile-only nav items (Organización, Perfil) */
  .sb-nav-mobile-only { display: flex; }

  /* Each nav item is an equal-width cell with stacked icon + label */
  .sb-nav-item {
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    padding: 6px 4px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.15;
    text-align: center;
    border-radius: 0;
    position: relative;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .sb-nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
  }
  .sb-nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
  }
  .sb-nav-item.active::after {
    content: '';
    position: absolute;
    left: 18%;
    right: 18%;
    bottom: 0;
    height: 2px;
    background: var(--accent, #8FB07A);
    border-radius: 2px 2px 0 0;
  }
  .sb-nav-item .sb-nav-svg {
    width: 19px;
    height: 19px;
  }

  /* Nav badge: positioned absolutely over the icon in the stacked
     layout so it doesn't break the text row. */
  .sb-nav-item .nav-badge {
    position: absolute;
    top: 5px;
    right: calc(50% - 18px);
    margin-left: 0;
    min-width: 14px;
    height: 14px;
    padding: 0 4px;
    font-size: 9px;
    font-weight: 700;
  }

  /* Main content offset for the fixed top bar */
  .dash-main {
    margin-left: 0;
    margin-top: 56px;
    /* Cancel the desktop `width: calc(100% - 240px)` sidebar offset —
       on mobile the sidebar is a fixed top bar, not a side column, so
       the main content must span the full viewport width. Without this
       the page rendered at viewport-width minus 240px, leaving a large
       empty band to the right of all content. */
    width: 100%;
  }

  /* On mobile the page title is redundant with the active nav tab,
     so the dash-topbar is hidden by default. Pages that carry
     dynamic content (org name, admin actions) opt back in below. */
  .dash-topbar { display: none; }
  #page-organizacion .dash-topbar {
    display: flex;
    /* Drop sticky positioning — the base .dash-topbar uses
       position: sticky, and sticky's `top` offset is applied at rest
       too, which was pushing this topbar 56px below its natural
       position and creating an empty band above it. */
    position: static;
    padding: 10px 16px;
    gap: 10px;
  }
  .dash-topbar-title {
    font-size: 16px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .dash-topbar-actions { flex-shrink: 0; }
  .dash-content { padding: 16px 16px 48px; }

  /* Fullpanel pages (leads, tus-zonas, organizacion) must subtract
     the fixed sidebar height from the 100vh the desktop design used. */
  .dash-page-fullpanel.active {
    height: calc(100vh - 56px);
    min-height: calc(100vh - 56px);
    max-height: calc(100vh - 56px);
  }
  .dash-page.active { min-height: calc(100vh - 56px); }
}

/* ── Org Zones panel ──────────────────────────────────────── */
.org-zonas-metrics {
  display: flex;
  border-radius: 12px;
  overflow: hidden;
  margin: 0 0 16px;
  border: 1px solid var(--border, #e5e7eb);
}
.org-zonas-metric {
  flex: 1;
  background: #fff;
  padding: 16px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.org-zonas-metric + .org-zonas-metric {
  border-left: 1px solid var(--border, #e5e7eb);
}
.org-zonas-metric-val {
  font-size: 26px;
  font-weight: 700;
  color: var(--accent, #2c6e2f);
}
.org-zonas-metric-label {
  font-size: 11px;
  color: var(--text-muted, #9ca3af);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.org-zonas-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #ecf0e8;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 500;
  color: #2c6e2f;
}
.org-zonas-filter button {
  background: none;
  border: none;
  font-size: 18px;
  color: #2c6e2f;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  margin-left: auto;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.org-zonas-filter button:hover { opacity: 1; }
.org-zonas-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 768px) {
  .org-zonas-list { grid-template-columns: 1fr; }
}
.org-zonas-list .my-zone-card {
  box-shadow: 0 1px 4px rgba(0,0,0,0.05), 0 4px 12px rgba(0,0,0,0.03);
  transition: box-shadow 0.2s, transform 0.2s;
}
.org-zonas-list .my-zone-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.07), 0 8px 20px rgba(0,0,0,0.05);
  transform: translateY(-1px);
}
.org-zonas-empty {
  grid-column: 1 / -1;
  padding: 40px 16px;
  text-align: center;
  color: var(--text-muted, #9ca3af);
  font-size: 13px;
}
.org-member-card--active {
  border-color: var(--accent, #2c6e2f);
  box-shadow: 0 0 0 1px var(--accent, #2c6e2f);
}
/* Member attribution at the bottom of a zone card — mini avatar + kicker + name */
.mzc-member-tag {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  background: var(--surface-warm);
  border-top: 1px solid var(--border-light);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.mzc-member-tag .mzc-member-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-muted) center/cover no-repeat;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.mzc-member-tag-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}
.mzc-member-tag-kicker {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
}
.mzc-member-tag-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── /organizacion page overrides ────────────────────────────── */

/* Members: single wide column (orgs rarely have >5 members, and we want
   room inside each card to show the zones that member has claimed). */
#page-organizacion .org-members-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}
#page-organizacion .org-panel > .pane-card {
  border-top: 1px solid var(--border-light);
}

/* Member card: vertical stack — top row (avatar/name/role/rank)
   then a divided "zones reclamadas" section. */
#page-organizacion .org-member-card {
  flex-direction: column;
  align-items: stretch;
  padding: 14px 16px;
  gap: 0;
}
#page-organizacion .omc-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
#page-organizacion .omc-zones {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}
#page-organizacion .omc-zones-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: #8c8578;
  margin-bottom: 7px;
}
#page-organizacion .omc-zones-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
#page-organizacion .omc-zone-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-dark);
  background: var(--accent-muted);
  border-radius: var(--radius-full);
  white-space: nowrap;
}
#page-organizacion .omc-zone-chip svg {
  width: 11px;
  height: 11px;
  opacity: 0.85;
  flex-shrink: 0;
}
#page-organizacion .omc-zones-empty {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

/* Ghost invite tile — placeholder card next to real members, dashed border
   and + avatar. Shown until the org has 3+ members; nudges admins to invite. */
#page-organizacion .org-member-card.org-member-ghost {
  background: var(--bg-warm);
  border: 1.5px dashed var(--border-light);
  cursor: default;
}
#page-organizacion .org-member-card.org-member-ghost:hover {
  border-color: var(--accent);
  background: #fff;
}
#page-organizacion .org-member-ghost .org-member-avatar {
  background: transparent;
  border: 1.5px dashed var(--accent);
  color: var(--primary);
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
}
#page-organizacion .org-member-ghost .org-member-name {
  color: var(--primary);
}
#page-organizacion .org-member-ghost .org-member-role {
  color: var(--muted);
  font-style: italic;
}
#page-organizacion .omc-ghost-body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}
#page-organizacion .omc-ghost-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: #8c8578;
  margin-bottom: 8px;
}
#page-organizacion .omc-ghost-intro {
  font-size: 13px;
  color: var(--primary-dark);
  line-height: 1.5;
  margin: 0 0 10px;
}
#page-organizacion .omc-ghost-math {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--primary-dark);
  line-height: 1.6;
}
#page-organizacion .omc-ghost-math b {
  color: var(--primary);
}
#page-organizacion .omc-ghost-kicker {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.45;
}
#page-organizacion .omc-ghost-cta-row {
  display: flex;
  justify-content: flex-end;
}

/* ── Leads / Messaging ──────────────────────────────────────────── */
.leads-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.lead-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light, #e5e7eb);
  transition: background 0.15s;
  position: relative;
}
.lead-card:hover {
  background: #f9fafb;
}
.lead-card.lead-selected {
  background: #ecfdf5;
  border-left: 3px solid var(--accent, #2c6e2f);
}
.lead-card.lead-unread {
  background: #f0fdf4;
}
.lead-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #d1d5db;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  font-weight: 600;
  font-size: 15px;
}
.lead-info {
  flex: 1;
  min-width: 0;
}
.lead-name-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.lead-name {
  font-weight: 600;
  font-size: 14px;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lead-time {
  font-size: 12px;
  color: #9ca3af;
  flex-shrink: 0;
}
.lead-zone {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}
.lead-search-query {
  font-size: 11px;
  color: #2c6e2f;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lead-preview {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lead-unread .lead-preview {
  color: #111827;
  font-weight: 500;
}
.lead-badge {
  background: var(--accent, #2c6e2f);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  flex-shrink: 0;
}
.leads-empty, .leads-loading {
  padding: 32px 16px;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
  line-height: 1.5;
}
.leads-chat-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: #9ca3af;
  font-size: 14px;
}
.leads-chat-thread {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 400px;
}
.leads-chat-thread-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light, #e5e7eb);
  flex-shrink: 0;
}
.leads-thread-user strong {
  font-size: 14px;
  color: #111827;
}
.leads-thread-user .meta {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}
.leads-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.leads-bubble {
  max-width: 80%;
  display: flex;
  flex-direction: column;
}
.leads-bubble-consumer {
  align-self: flex-start;
}
.leads-bubble-member {
  align-self: flex-end;
}
.leads-bubble-body {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.leads-bubble-consumer .leads-bubble-body {
  background: #f3f4f6;
  color: #111827;
  border-bottom-left-radius: 4px;
}
.leads-bubble-member .leads-bubble-body {
  background: var(--accent, #2c6e2f);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.leads-bubble-time {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
  padding: 0 4px;
}
.leads-bubble-member .leads-bubble-time {
  text-align: right;
}
.leads-chat-reply {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-light, #e5e7eb);
  flex-shrink: 0;
}
.leads-chat-input {
  flex: 1;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  overflow-y: auto;
  max-height: 120px;
  line-height: 1.4;
  outline: none;
  transition: border-color 0.2s;
}
.leads-chat-input:focus {
  border-color: var(--accent, #2c6e2f);
}
.leads-chat-send {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: var(--accent, #2c6e2f);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.leads-chat-send:disabled {
  opacity: 0.4;
  cursor: default;
}
.leads-chat-send:not(:disabled):hover {
  background: #245a27;
}

/* Nav badge */
.nav-badge {
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  margin-left: 8px;
}

/* ── Email verification banner ─────────────────────────────────────
   Rendered by sidebar.js::renderVerifyBanner when the current user has
   email_verified=0. Two placements:
     Desktop (>768px): pinned to the top of the main content area,
       offset by the 240px fixed sidebar so it doesn't obstruct the
       org switcher / logo.
     Mobile (<=768px): pinned to the bottom so it doesn't obscure the
       56px top-bar nav (which is the whole navigation on mobile).
   We add padding to .dash-main (via a body flag) so fixed-position
   content doesn't overlap the first/last row of the page content. */
.mtz-verify-banner {
  position: fixed;
  top: 0;
  left: 240px;
  right: 0;
  z-index: 150; /* below sidebar (200) so sidebar still renders above it at intersections, above content */
  background: #fef3c7;
  border-bottom: 1px solid #fcd34d;
  color: #78350f;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  line-height: 1.4;
}
.mtz-verify-banner-msg { flex: 1; min-width: 0; }
.mtz-verify-banner-btn {
  flex-shrink: 0;
  background: #f59e0b;
  color: #fff;
  border: 1px solid #f59e0b;
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}
.mtz-verify-banner-btn:disabled { opacity: 0.7; cursor: default; }

/* Push content down so fixed banner doesn't overlap it on desktop. */
body.mtz-has-verify-banner .dash-main { padding-top: 48px; }

@media (max-width: 768px) {
  .mtz-verify-banner {
    left: 0;
    top: auto;
    bottom: 0;
    border-top: 1px solid #fcd34d;
    border-bottom: none;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
  body.mtz-has-verify-banner .dash-main {
    padding-top: 0;
    padding-bottom: 120px; /* room for multi-line banner on narrow screens */
  }
}

/* ─────────────────────────────────────────────────────────────────
   iOS Safari: prevent auto-zoom on input focus.
   iOS Safari zooms the viewport whenever a user focuses any form
   field whose computed font-size is < 16px, and the zoom does not
   auto-reverse when the keyboard closes — that crops UI elements
   like submit buttons, progress bars, and the onboarding CTAs.
   Fix: ensure every text input / textarea used across the B2B app
   is ≥ 16px on mobile. Desktop sizes are unchanged.
   ───────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .input,
  .auth-input,
  .n-search-input,
  .coming-soon-input,
  .cm-textarea,
  .leads-chat-input {
    font-size: 16px;
  }
}
