/* GonitoDM, dirección "ciruela": barra lateral oscura color ciruela (la sala de control),
   página clara y cálida, una sola letra (Hanken Grotesk, ya en el servidor) y un albaricoque
   solo para lo que pide atención (no leído, cifra principal).
   Distinto a propósito de GoniMail (azul marino y rojo sello).
   Carga después de dist/styles.css y ritmo.css, así que gana sin !important. */

:root {
  --brand-font-display: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --brand-font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: var(--brand-font-display);
  --font-body: var(--brand-font-body);

  /* Marca */
  --plum: #7B2D5F;
  --plum-dark: #5E2148;
  --plum-soft: #F6E9F0;
  --plum-night: #23161F;
  --plum-night-2: #3D2636;
  --apricot: #E8834A;

  --brand-50:  #FBF3F7;
  --brand-75:  #F9EFF4;
  --brand-100: #F6E9F0;
  --brand-200: #EBCCDD;
  --brand-300: #D9A2C1;
  --brand-400: #B4628F;
  --brand-500: #7B2D5F;
  --brand-600: #6A2652;
  --brand-700: #5E2148;
  --brand-800: #471836;
  --brand-900: #301024;
  --brand-500-rgb: 123, 45, 95;
  --primary-tint-border: #EBCCDD;

  --brand-green-50:  #E8F4EE;
  --brand-green-100: #D3EADD;
  --brand-green-200: #ADD7BF;
  --brand-green-500: #1F7A4D;
  --brand-green-600: #19663F;
  --brand-green-700: #145233;
  --success-500-rgb: 31, 122, 77;

  /* Neutros cálidos con un toque rosado */
  --neutral-950: #170F14;
  --neutral-900: #1F1A1D;
  --neutral-800: #2E272B;
  --neutral-700: #423A3F;
  --neutral-600: #5A4F55;
  --neutral-500: #6B6066;
  --neutral-400: #A0959B;
  --neutral-300: #D3CBCF;
  --neutral-200: #E4DDE0;
  --neutral-150: #E8E2E4;
  --neutral-125: #EFEAEC;
  --neutral-100: #F0ECEE;
  --neutral-75:  #FAF8F9;
  --neutral-50:  #FAF8F9;

  --surface-0: #FFFFFF;
  --surface-page: #F6F4F3;
  --surface-1: #FAF8F9;
  --surface-2: #F0ECEE;
  --surface-3: #E4DDE0;
  --surface-sunken: #F6F3F4;
  --border: #E6E0E2;
  --border-hover: #CFC5CA;
  --border-strong: #D9D0D4;
  --divider: #EFEAEC;
  --scrim-rgb: 31, 26, 29;

  --text-primary: #1F1A1D;
  --text-secondary: #5A4F55;
  --text-tertiary: #6B6066;
  --text-ghost: #6B6066;
  --text-inverse: #FFFFFF;

  --cta: var(--plum);
  --cta-hover: var(--plum-dark);
  --ink: #1F1A1D;
  --selected-fill: var(--plum-soft);
  --primary: var(--plum);
  --primary-hover: var(--plum-dark);
  --primary-soft: var(--brand-50);
  --primary-muted: var(--brand-100);
  --primary-ring: rgba(123, 45, 95, 0.35);

  /* Variables de ritmo.css */
  --ink-soft: #5A4F55;
  --ink-faint: #6B6066;
  --line: #E6E0E2;
  --line-soft: #EFEAEC;
  --wash: #FAF8F9;

  /* Radios más chicos: herramienta, no tarjeta de felicitación */
  --radius-control: 0.5rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-tile: 0.625rem;
  --radius-2xl: 0.75rem;

  /* Sin sombras en lo plano; solo lo que flota (menús, modales) */
  --shadow-xs: none;
  --shadow-sm: none;
  --shadow-md: 0 6px 18px rgba(31, 26, 29, 0.10);
  --shadow-lg: 0 14px 36px rgba(31, 26, 29, 0.14);
  --shadow-xl: 0 20px 48px rgba(31, 26, 29, 0.16);
  --shadow-primary: none;
  --shadow-card: none;

  --focus-ink: var(--plum);
  --focus-halo: rgba(123, 45, 95, 0.22);
}

body {
  font-family: var(--font-body);
  background: var(--surface-page);
}

/* ── Títulos: misma letra, más peso ──────────────────────────────── */
.page-title,
.st-title {
  font-family: var(--font-display);
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.section-title,
.card h2,
html .st-card h2,
.fp-title,
.wizard-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.page-lede,
.st-lede { color: var(--text-secondary); }

html .st-eyebrow {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.875rem;
  font-weight: 650;
  color: var(--plum);
}

/* ── Botones ─────────────────────────────────────────────────────── */
.btn-pill-primary,
.btn-pill-secondary { border-radius: var(--radius-control); font-weight: 650; }
.btn-pill-primary { background: var(--cta); box-shadow: none; }
.btn-pill-primary:hover { background: var(--cta-hover); }
.btn-pill-secondary {
  background: #fff;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}
.btn-pill-secondary:hover { background: var(--plum-soft); border-color: var(--plum); color: var(--plum); }
.btn-pill-primary:active,
.btn-pill-secondary:active { transform: translateY(1px); }
.btn-pill-primary:focus-visible,
.btn-pill-secondary:focus-visible { outline: 2px solid var(--plum); outline-offset: 2px; }
.fb-toolbar .btn-pill-primary { background: var(--plum); border-color: var(--plum); }
.fb-toolbar .btn-pill-primary:hover:not(:disabled) { background: var(--plum-dark); border-color: var(--plum-dark); }
.fb-toolbar .btn-pill-secondary,
.fb-toolbar .fb-problems-button,
.fb-toolbar .fb-test-channel > button.btn-link { background: #fff; border-color: var(--border-strong); color: var(--ink); }
.fb-toolbar .btn-pill-secondary:hover:not(:disabled),
.fb-toolbar .fb-problems-button:hover,
.fb-toolbar .fb-test-channel > button.btn-link:hover:not(:disabled) { background: var(--plum-soft); border-color: var(--plum); color: var(--plum); }

/* ── Barra lateral oscura ────────────────────────────────────────────
   Se cambian las variables solo dentro de la barra: las reglas de styles.css
   siguen iguales y se pintan claras sobre ciruela. Los dos menús que abre
   (.sidebar-menu) vuelven a los valores claros porque son tarjetas blancas. */
aside.sidebar-initial,
.sidebar {
  --surface-0: var(--plum-night);
  --surface-sunken: #2F1F2A;
  --text-primary: #FFFFFF;
  --text-secondary: #EADDE4;
  --text-tertiary: #BFAAB6;
  --text-ghost: #BFAAB6;
  --ink: #FFFFFF;
  --selected-fill: var(--plum-night-2);
  --divider: rgba(255, 255, 255, 0.10);
  --border: rgba(255, 255, 255, 0.08);
  --scrim-rgb: 255, 255, 255;
  --focus-ink: #FFFFFF;
  background: var(--plum-night);
  border-right-color: var(--plum-night);
  color: #EADDE4;
}
.sidebar-menu {
  --surface-0: #FFFFFF;
  --surface-sunken: #F6F3F4;
  --text-primary: #1F1A1D;
  --text-secondary: #5A4F55;
  --text-tertiary: #6B6066;
  --text-ghost: #6B6066;
  --ink: #1F1A1D;
  --selected-fill: var(--plum-soft);
  --divider: #EFEAEC;
  --border: #E6E0E2;
  --scrim-rgb: 31, 26, 29;
  --focus-ink: var(--plum);
  color: #1F1A1D;
}
/* En celular el menú cerrado queda fuera de pantalla; su sombra asomaba por el borde izquierdo. */
aside.sidebar.-translate-x-full { box-shadow: none; }
.sidebar-nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.sidebar-nav-item.active { background: var(--plum-night-2); color: #fff; font-weight: 650; }
.sidebar-nav-item.active svg { color: var(--apricot); }
.sidebar-section-label { color: #BFAAB6; }
.sidebar-logo-mark {
  background: var(--apricot);
  color: var(--plum-night);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  border-radius: 9px;
  box-shadow: none;
}
img.sidebar-logo-mark { background: none; }
.sidebar-badge { background: var(--apricot); color: var(--plum-night); }
.sidebar-channel-flag,
.sidebar-connect-plus { box-shadow: 0 0 0 2px var(--plum-night); }
.mobile-topbar { background: var(--plum-night); border-bottom-color: var(--plum-night); color: #fff; }
.mobile-topbar .sidebar-toggle { color: #fff; }
.mobile-topbar span { color: #fff !important; }

/* ── Pestañas: lo activo lleva subrayado ciruela ─────────────────── */
.tab.active,
.tab[aria-current="page"],
.tab[aria-selected="true"] {
  color: var(--plum);
  font-weight: 650;
  box-shadow: inset 0 -2px 0 var(--plum);
}
.tab:hover { color: var(--plum); }

/* ── Superficies ─────────────────────────────────────────────────── */
.card { background: #fff; border-color: var(--border); }
.tile-selected { border-color: var(--plum); }
.filter-pill[aria-pressed="true"] { background: var(--plum); border-color: var(--plum); color: #fff; }

/* Bandeja: etiquetas de etapa y punto de no leído */
.ib-stage-attention { background: var(--apricot); border-color: var(--apricot); color: var(--plum-night); }
.ib-stage-follower { border-color: var(--brand-300); color: var(--plum); background: transparent; }
.ib-seg-btn[aria-selected="true"] { border-color: var(--plum); background: var(--plum); color: #fff; }
.ib-dot { background: var(--apricot); }

html .cc-switch:checked { background: var(--plum); }
input[type="checkbox"],
input[type="radio"] { accent-color: var(--plum); }

/* ── Estadísticas ────────────────────────────────────────────────── */
html .st-card { background: #fff; }
html .st-card:hover,
html .st-kpi:hover { transform: none; box-shadow: none; border-color: var(--border-hover); }
html .st-kpi { background: #fff; }
html .st-kpi-n { font-family: var(--font-display); font-weight: 750; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
html .st-fig b { font-family: var(--font-display); font-weight: 750; }

/* La cifra principal (una por pantalla) va sobre ciruela, como la barra lateral */
html .st-kpi.is-main {
  background: var(--plum-night);
  border-color: var(--plum-night);
  color: #fff;
  box-shadow: none;
}
html .st-kpi.is-main .st-kpi-label,
html .st-kpi.is-main .st-delta { color: var(--apricot); }
html .st-kpi.is-main .st-kpi-hint { color: #EADDE4; }

html .st-track { background: var(--surface-2); }
html .st-track > span { background: var(--plum); }
html .st-flow { background: var(--surface-1); }
html .st-pill { background: var(--plum-soft); color: var(--plum); }
html .st-l1 { background: #F6E9F0; }
html .st-l2 { background: #D9A2C1; }
html .st-l3 { background: #B4628F; color: #fff; }
html .st-l4 { background: var(--plum); color: #fff; }
html .st-periods { background: var(--surface-2); }
html .st-periods a[aria-current="page"] { color: var(--plum); box-shadow: inset 0 -2px 0 var(--plum); background: #fff; }

html .fl-guided-link { background: var(--plum); }
html .fl-guided-link:hover { background: var(--plum-dark); }

/* ── Selector "Nuevo flujo" ──────────────────────────────────────── */
.bb-modal.fp { background: #fff; border-radius: 0.75rem; }
.fp-nav { background: var(--surface-1); }
.fp-card { background: #fff; border-radius: 0.75rem; }
.fp-card:hover { border-color: var(--plum); box-shadow: none; }
.fp-nav-item.is-active { background: var(--plum-soft); color: var(--plum); border-color: transparent; box-shadow: none; }
.fp-row:hover { background: var(--surface-2); }
.fp-group { text-transform: none; letter-spacing: 0; font-size: 0.875rem; color: var(--text-secondary); }

@media (max-width: 639px) {
  .list-toolbar > .search-field { flex: 1 1 100%; }
}

/* ── Celular: todo al tamaño del dedo ────────────────────────────── */
@media (max-width: 1023px) {
  /* 16 px o más: con menos, Safari del iPhone hace zoom al tocar el campo. */
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea { font-size: 16px; }
  input[type="number"] { min-height: 40px; }
  input[type="checkbox"]:not(.cc-switch),
  input[type="radio"] { width: 20px; height: 20px; }
  .cc-tab { display: inline-flex; align-items: center; min-height: 44px; }
  .bb-split-main,
  .bb-split-toggle { min-height: 40px; }
  .ia-toggle { min-height: 36px; }
}

/* ── Acceso: la pantalla de entrada usa la noche ciruela entera ──── */
.auth-bg { background: var(--plum-night); background-image: none; }
.auth-card { background: #fff; box-shadow: none; border-radius: 0.75rem; }

@media (prefers-reduced-motion: reduce) {
  html .st-track > span { animation: none; }
}
