/* ============================================================
 * MIND MIAMI · Design Tokens
 * Colors + Typography for Mind Miami's marketing operations brand
 * and its client-skinned dashboards (e.g. Pink Pony).
 * ============================================================ */

/* ---- Fonts (Google Fonts) ----
 * Syne — display / headings / numerals.  400 / 500 / 600 / 700 / 800
 * DM Sans — body / UI.                   300 / 400 / 500 (italic 400)
 * JetBrains Mono — code / data / IDs.    400 / 600
 * --------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,400&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  /* ───────────── CORE BRAND PALETTE ─────────────
   * Mind Miami's own brand. Teal lightning on near-black.
   * These three are the agency's identity. Everything else
   * is supporting palette or per-client skin.
   */
  --mm-navy:       #1d232d;   /* signature dark — logo background, app bg */
  --mm-teal:       #34cec6;   /* signature accent — lightning bolt, CTAs */
  --mm-white:      #ffffff;

  /* ───────────── EXTENDED NEUTRALS (DARK) ─────────────
   * Layered surfaces from deepest to highest elevation.
   */
  --bg-0:          #0a0a0a;   /* deepest — app shell, login bg */
  --bg-1:          #141014;   /* topbar, hero band */
  --bg-2:          #1c1820;   /* card surface */
  --bg-3:          #262026;   /* hover lift */
  --bg-surface:    var(--bg-2);

  /* Text — alpha-on-white reads better on dark than pure greys.
   * Mind Miami's brand neutrals are clean greys (no rose tint).
   * Client skins may override these. */
  --fg-1:          #ffffff;                          /* primary text */
  --fg-2:          rgba(255, 255, 255, 0.78);        /* secondary */
  --fg-muted:      rgba(255, 255, 255, 0.62);        /* labels, descs */
  --fg-hint:       rgba(255, 255, 255, 0.38);        /* hints, captions */

  /* Borders — never solid, always low-alpha. Neutral white,
   * not rose-tinted (the Pink Pony source used a rose tint;
   * that belongs to the client skin, not Mind Miami). */
  --border:        rgba(255, 255, 255, 0.08);
  --border-mid:    rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.24);

  /* ───────────── SEMANTIC SIGNAL COLORS ─────────────
   * Mind Miami's signals lean cool/neutral. Info uses a soft
   * teal (NOT rose-pink like the Pink Pony skin). Success uses
   * the brand teal directly. Warn + danger stay warm-yellow + red. */
  --info:          #7CC6E8;                          /* soft sky blue */
  --info-dim:      rgba(124, 198, 232, 0.14);
  --warn:          #f0c060;                          /* attention */
  --warn-dim:      rgba(240, 192, 96, 0.12);
  --danger:        #e05a5a;                          /* error / pause */
  --danger-dim:    rgba(224, 90, 90, 0.12);
  --success:       #34cec6;                          /* uses brand teal */
  --success-dim:   rgba(52, 206, 198, 0.16);

  /* ───────────── ACCENT EXTENSIONS ─────────────
   * Tonal variations of the brand teal, used for category markers,
   * data viz, KPI groups inside Mind Miami's own surfaces. Stay
   * within the teal/neutral family — don't reach for pink/gold/
   * purple unless you are intentionally invoking a client skin. */
  --teal-light:    #7AE3DC;                          /* highlight */
  --teal-dark:     #1E8A84;                          /* hover / press */
  --teal-deep:     #0F4F4B;                          /* tinted surfaces */
  --slate:         #6B7785;                          /* neutral accent */
  --amber:         #E0B589;                          /* warm complement — use sparingly */

  /* ───────────── RADII ───────────── */
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  24px;
  --r-pill: 999px;

  /* ───────────── ELEVATION ─────────────
   * Mind Miami uses very subtle shadows; mostly relies on borders
   * + bg-shift for depth. Strong shadow reserved for modals / login.
   */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.20);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.30);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.50);
  --shadow-glow-teal: 0 6px 20px rgba(52, 206, 198, 0.40);

  /* ───────────── SPACING (4-pt scale) ───────────── */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;

  /* ───────────── TYPOGRAPHY FAMILIES ───────────── */
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* Type scale — calibrated to dashboard density */
  --fs-display:   32px;   /* hero numerals / brand wordmark */
  --fs-h1:        24px;   /* page title */
  --fs-h2:        22px;   /* section title */
  --fs-h3:        18px;   /* card title large */
  --fs-h4:        15px;   /* card title default */
  --fs-body:      13.5px; /* default UI text */
  --fs-body-lg:   15px;   /* prose */
  --fs-meta:      12px;   /* metadata */
  --fs-label:     10.5px; /* uppercase eyebrows / pills */
  --fs-stat:      28px;   /* KPI value */

  --lh-tight:   1.1;
  --lh-snug:    1.3;
  --lh-base:    1.6;
  --lh-loose:   1.8;
}

/* ───────────── LIGHT THEME SKIN ─────────────
 * Mind Miami's dashboards ship with an optional light-mode toggle.
 * Light mode stays in Mind Miami's neutral family — off-white surfaces
 * with subtle teal-tinted borders. Not the canonical view; dark is.
 */
:root[data-theme="light"] {
  --bg-0:        #F7F9FA;
  --bg-1:        #FFFFFF;
  --bg-2:        #F1F4F6;
  --bg-3:        #E6EBEF;
  --bg-surface:  var(--bg-2);

  --fg-1:        #1d232d;
  --fg-2:        rgba(29, 35, 45, 0.78);
  --fg-muted:    rgba(29, 35, 45, 0.62);
  --fg-hint:     rgba(29, 35, 45, 0.42);

  --border:        rgba(29, 35, 45, 0.08);
  --border-mid:    rgba(29, 35, 45, 0.16);
  --border-strong: rgba(29, 35, 45, 0.28);

  --mm-teal:     #1AA29A; /* deeper teal for AA contrast on light */
  --teal-deep:   #C9EFEC; /* tinted surface for light mode */
}

/* ============================================================
 * SEMANTIC TYPE STYLES
 * Use these classes (or extend with @apply / mixins) on real
 * elements. They encode Mind Miami's preferences:
 *  - Syne for ANY heading or numeral block.
 *  - DM Sans for body and UI controls.
 *  - Tight tracking on caps eyebrows.
 *  - Tabular numerals for KPI values.
 * ============================================================ */

.t-display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: -0.5px;
}

.t-h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  letter-spacing: -0.4px;
}

.t-h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h2);
  line-height: var(--lh-snug);
  letter-spacing: -0.3px;
}

.t-h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h3);
  line-height: var(--lh-snug);
}

.t-h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h4);
  line-height: var(--lh-snug);
}

.t-body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-base);
}

.t-body-lg {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-body-lg);
  line-height: var(--lh-base);
}

.t-meta {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-meta);
  color: var(--fg-muted);
}

/* Uppercase eyebrows — used everywhere as labels, KPI captions,
 * pill text. Wide letter-spacing is the brand's signature.
 */
.t-eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--fg-hint);
}

.t-stat {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-stat);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.t-mono {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: var(--fs-meta);
}

.t-quote {
  font-family: var(--font-body);
  font-style: italic;
  font-size: var(--fs-body-lg);
  line-height: var(--lh-base);
  color: var(--fg-2);
}

/* Brand wordmark — used in login, topbar, slide titles.
 * Pairs with a client-specific gradient mask (the gradient is per-client).
 */
.t-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 28px;
  line-height: 1;
}

/* ============================================================
 * Premium Select / Dropdown — Apple-grade.
 * Rounded, glassy, spring animation, type-ahead search,
 * keyboard nav, mobile bottom sheet.
 * ============================================================ */
.ws-dropdown-content {
  background: var(--ws-bg-1);
  border: 1px solid var(--ws-border-mid, var(--ws-border));
  border-radius: 14px;
  padding: 4px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.08),
    0 10px 30px rgba(0, 0, 0, 0.40),
    0 30px 60px rgba(0, 0, 0, 0.22);
  font-family: var(--ws-font);
  color: var(--ws-fg-1);
  animation: ws-dropdown-in 220ms cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top center;
  max-height: 64vh;
  overflow: hidden;
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
}
.ws-dropdown-content[data-placement="top"] {
  transform-origin: bottom center;
  animation-name: ws-dropdown-in-up;
}

@keyframes ws-dropdown-in {
  0%   { opacity: 0; transform: translateY(-8px) scale(0.94); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes ws-dropdown-in-up {
  0%   { opacity: 0; transform: translateY(8px) scale(0.94); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Search input inside the menu */
.ws-select-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  margin: 4px 4px 4px;
  height: 36px;
  background: var(--ws-bg-2);
  border: 1px solid var(--ws-border);
  border-radius: 10px;
  transition: border-color 0.18s, background 0.18s;
}
.ws-select-search:focus-within {
  border-color: var(--ws-accent);
  background: var(--ws-bg-0);
}
.ws-select-search > i {
  color: var(--ws-fg-3);
  font-size: 11px;
  flex-shrink: 0;
}
.ws-select-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  color: var(--ws-fg-1);
  font-family: var(--ws-font);
  font-size: 12.5px;
  font-weight: 500;
  padding: 0;
}
.ws-select-search input::placeholder { color: var(--ws-fg-4); opacity: 0.9; }
.ws-select-search-clear {
  width: 20px; height: 20px;
  border-radius: 999px;
  background: var(--ws-border);
  border: none;
  color: var(--ws-fg-3);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px;
  flex-shrink: 0;
}
.ws-select-search-clear:hover { color: var(--ws-fg-1); background: var(--ws-border-mid, var(--ws-fg-4)); }

.ws-select-list {
  max-height: calc(64vh - 60px);
  overflow-y: auto;
  padding: 2px 4px 4px;
  scrollbar-width: thin;
}
.ws-select-list::-webkit-scrollbar { width: 6px; }
.ws-select-list::-webkit-scrollbar-thumb { background: var(--ws-border); border-radius: 999px; }
.ws-select-list::-webkit-scrollbar-thumb:hover { background: var(--ws-fg-4); }

.ws-select-empty {
  padding: 24px 14px;
  text-align: center;
  color: var(--ws-fg-3);
  font-size: 11.5px;
  line-height: 1.5;
}
.ws-select-empty > i { font-size: 18px; opacity: 0.5; display: block; margin-bottom: 8px; color: var(--ws-fg-4); }

/* Option row */
.ws-select-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ws-fg-1);
  font-family: var(--ws-font);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s, transform 0.08s ease-out, border-color 0.14s;
  outline: none;
  user-select: none;
}
.ws-select-option.active {
  background: var(--ws-accent-soft);
  border-color: var(--ws-accent);
}
.ws-select-option.active .ws-select-option-icon {
  background: var(--ws-accent); color: #06242b;
}
.ws-select-option.selected {
  background: var(--ws-accent-soft);
  color: var(--ws-fg-1);
  font-weight: 700;
  border-color: var(--ws-accent);
}
.ws-select-option.selected .ws-select-option-label { color: var(--ws-accent); }
.ws-select-option:active:not(.disabled) { transform: scale(0.985); }
.ws-select-option.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.ws-select-option-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--ws-bg-2);
  color: var(--ws-fg-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  transition: background 0.14s, color 0.14s;
}
.ws-select-option-text {
  display: flex; flex-direction: column;
  gap: 2px;
  flex: 1; min-width: 0;
}
.ws-select-option-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ws-fg-1);
}
.ws-select-option-desc {
  font-size: 10.5px;
  color: var(--ws-fg-3);
  font-weight: 400;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ws-select-option-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--ws-border);
  color: var(--ws-fg-2);
  text-transform: uppercase;
}
.ws-select-option-check {
  color: var(--ws-accent);
  font-size: 12px;
  flex-shrink: 0;
  margin-left: 4px;
}
.ws-select-match {
  background: rgba(52, 206, 198, 0.22);
  color: var(--ws-accent);
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 700;
}

/* Generic dropdown item */
.ws-dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 11px;
  border-radius: 9px;
  background: transparent;
  border: none;
  color: var(--ws-fg-1);
  cursor: pointer;
  font-family: var(--ws-font);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  transition: background 0.14s, color 0.14s, transform 0.08s;
  outline: none;
  user-select: none;
}
.ws-dropdown-item:hover:not(:disabled),
.ws-dropdown-item:focus-visible:not(:disabled) {
  background: var(--ws-bg-2);
  color: var(--ws-fg-1);
}
.ws-dropdown-item:active:not(:disabled) { transform: scale(0.985); }
.ws-dropdown-item.destructive { color: var(--ws-prio-high); }
.ws-dropdown-item.destructive:hover:not(:disabled) { background: rgba(239, 68, 68, 0.12); }
.ws-dropdown-item.disabled,
.ws-dropdown-item:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ws-dropdown-separator {
  height: 1px;
  background: var(--ws-border);
  margin: 5px 6px;
}

.ws-dropdown-label {
  padding: 10px 12px 5px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--ws-fg-3);
  text-transform: uppercase;
  position: sticky;
  top: 0;
  background: var(--ws-bg-1);
  z-index: 2;
}

/* Select trigger button */
.ws-select { position: relative; color: var(--ws-fg-1); }
.ws-select:hover:not(:disabled) {
  border-color: var(--ws-accent);
  background: var(--ws-bg-1);
}
.ws-select:focus-visible {
  outline: none;
  border-color: var(--ws-accent);
  box-shadow: 0 0 0 3px rgba(52, 206, 198, 0.30);
}
.ws-select[aria-expanded="true"] {
  border-color: var(--ws-accent);
  background: var(--ws-bg-1);
  box-shadow: 0 0 0 3px rgba(52, 206, 198, 0.22);
}
.ws-select[aria-expanded="true"] > i.fa-chevron-down {
  transform: rotate(180deg);
}

/* Mobile bottom sheet */
.ws-select-sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.68);
  z-index: 210;
  animation: ws-fade-in 200ms ease-out;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.ws-select-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 211;
  background: var(--ws-bg-1);
  border-top: 1px solid var(--ws-border-mid, var(--ws-border));
  border-radius: 22px 22px 0 0;
  padding: 0 0 env(safe-area-inset-bottom);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  animation: ws-slide-up 280ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.ws-select-sheet-handle {
  width: 38px; height: 4px;
  background: var(--ws-fg-4);
  opacity: 0.5;
  border-radius: 999px;
  margin: 9px auto 4px;
}
.ws-select-sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px 12px;
  border-bottom: 1px solid var(--ws-border);
}
.ws-select-sheet-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ws-fg-1);
}
.ws-select-sheet-close {
  width: 32px; height: 32px;
  border-radius: 999px;
  background: var(--ws-bg-2);
  border: none;
  color: var(--ws-fg-2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.ws-select-sheet-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 6px 12px;
  -webkit-overflow-scrolling: touch;
}
.ws-select-option.sheet {
  padding: 12px 12px;
  border-radius: 12px;
  font-size: 13.5px;
}
.ws-select-option.sheet .ws-select-option-icon {
  width: 34px; height: 34px;
  font-size: 14.5px;
}

/* Wide screens (iPad / tablets / landscape): a centered modal reads far
   better than a full-bleed bottom sheet that stretches edge-to-edge. */
@keyframes ws-select-pop {
  from { opacity: 0; transform: translate(-50%, -48%) scale(0.96); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@media (min-width: 640px) {
  .ws-select-sheet {
    left: 50%; right: auto; bottom: auto; top: 50%;
    transform: translate(-50%, -50%);
    width: min(460px, 92vw);
    max-height: min(560px, 80vh);
    border: 1px solid var(--ws-border-mid, var(--ws-border));
    border-radius: 20px;
    overflow: hidden;
    animation: ws-select-pop 240ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  }
  .ws-select-sheet-handle { display: none; }
  .ws-select-sheet-head { padding-top: 16px; }
  .ws-select-sheet-list { padding-bottom: 8px; }
}
/* Short landscape phones: let it use more height so options stay reachable. */
@media (orientation: landscape) and (max-height: 460px) {
  .ws-select-sheet { max-height: 92vh; }
}

/* ============================================================
 * MobileNav — bottom bar with 4 primary + "Más" button
 * Plus the swipe-up customization sheet
 * ============================================================ */
.ws-mobile-nav {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 70;
  height: calc(64px + env(safe-area-inset-bottom));
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
  background: var(--ws-bg-1);
  border-top: 1px solid var(--ws-border);
  display: flex;
  align-items: stretch;
  gap: 2px;
}
:root[data-theme="light"] .ws-mobile-nav {
  background: rgba(255, 255, 255, 0.86);
}
.app.desktop .ws-mobile-nav { display: none; }

.ws-mobile-nav-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--ws-fg-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  font-family: var(--ws-font);
  padding: 4px 2px;
  min-width: 0;
  border-radius: 12px;
  transition: color 0.15s, background 0.15s;
}
.ws-mobile-nav-btn:active {
  background: var(--ws-bg-2);
}
.ws-mobile-nav-btn .ico {
  font-size: 17px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  transition: transform 0.15s;
}
.ws-mobile-nav-btn .lbl {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2px;
  max-width: 100%;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.ws-mobile-nav-btn.active {
  color: var(--ws-accent);
}
.ws-mobile-nav-btn.active .ico { transform: translateY(-1px); }
.ws-mobile-nav-btn.active .lbl { font-weight: 800; }

/* Customize sheet */
.ws-nav-sheet-backdrop {
  position: fixed; inset: 0;
  z-index: 110;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: ws-fade-in 180ms ease-out;
}
.ws-nav-sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 111;
  max-height: 86vh;
  background: var(--ws-bg-1);
  border-top: 1px solid var(--ws-border);
  border-radius: 22px 22px 0 0;
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  flex-direction: column;
  font-family: var(--ws-font);
  overflow: hidden;
  animation: ws-slide-up 220ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.35);
}
@keyframes ws-fade-in { from { opacity: 0 } to { opacity: 1 } }
@keyframes ws-slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.ws-nav-sheet-handle {
  width: 38px; height: 4px; border-radius: 999px;
  background: var(--ws-fg-4);
  opacity: 0.4;
  margin: 8px auto 4px;
}
.ws-nav-sheet-head {
  padding: 8px 18px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--ws-border);
}

.ws-nav-section-label {
  display: flex;
  align-items: center;
  padding: 14px 18px 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--ws-fg-4);
  text-transform: uppercase;
}

.ws-nav-primary-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0 14px 4px;
}
.ws-nav-others-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0 14px 6px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.ws-nav-others-grid.drop-target {
  background: var(--ws-accent-soft);
  border-radius: 14px;
  outline: 2px dashed var(--ws-accent);
  outline-offset: -4px;
}

.ws-nav-slot {
  position: relative;
  background: var(--ws-bg-2);
  border: 1px solid var(--ws-border);
  border-radius: 14px;
  padding: 12px 6px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: grab;
  font-family: var(--ws-font);
  color: var(--ws-fg-1);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.ws-nav-slot:active { cursor: grabbing; }
.ws-nav-slot.empty {
  background: transparent;
  border: 2px dashed var(--ws-border);
  cursor: default;
}
.ws-nav-slot.active {
  border-color: var(--ws-accent);
  background: var(--ws-accent-soft);
}
.ws-nav-slot.dragging {
  opacity: 0.25;
  transform: scale(0.92);
}
.ws-nav-slot.drop-target {
  border-color: var(--ws-accent);
  background: var(--ws-accent-soft);
  transform: scale(1.04);
}
.ws-nav-slot .slot-icon {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: var(--ws-bg-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--ws-fg-2);
}
.ws-nav-slot .slot-label {
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.2px;
  line-height: 1.15;
  color: var(--ws-fg-2);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-nav-slot .slot-badge {
  position: absolute;
  top: 6px; right: 6px;
  width: 16px; height: 16px;
  border-radius: 999px;
  background: #FCD34D;
  color: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Drag ghost (the floating preview that follows the finger) */
.ws-nav-drag-ghost {
  background: var(--ws-bg-1);
  border: 2px solid var(--ws-accent);
  border-radius: 14px;
  padding: 12px 6px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
  transform: scale(1.05) rotate(-3deg);
  opacity: 0.94;
}
.ws-nav-drag-ghost .slot-icon {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: var(--ws-accent-soft);
  color: var(--ws-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.ws-nav-drag-ghost .slot-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--ws-fg-1);
}

/* Wallet item in sidebar — green tint to stand out as a financial entry */
.sidebar-nav button.sidebar-wallet {
  color: #10B981;
}
.sidebar-nav button.sidebar-wallet .ico {
  color: #10B981;
}
.sidebar-nav button.sidebar-wallet:hover {
  background: rgba(16, 185, 129, 0.10);
  color: #34D399;
}

/* ============================================================
 * UI/UX polish — global focus rings, tap targets, chip animation
 * ============================================================ */

/* Focus visibility — keyboard-navigated focus shows accent ring */
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--ws-accent);
  outline-offset: 2px;
  border-radius: 8px;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--ws-accent);
  outline-offset: 1px;
}

/* Mobile tap targets — buttons under 36px get padded */
@media (pointer: coarse) {
  button.btn.sm,
  button.btn.icon.sm {
    min-height: 38px;
    min-width: 38px;
  }
}

/* Chip transitions — smoother hover and active state */
.chip {
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}
.chip:hover:not(.active) {
  background: var(--ws-bg-2);
  border-color: var(--ws-fg-4);
}
.chip:active { transform: scale(0.96); }
.chip.active {
  background: var(--ws-accent-soft);
  color: var(--ws-accent);
  border-color: var(--ws-accent);
}

/* Skeleton shimmer for loading states */
@keyframes ws-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.ws-skeleton {
  background: linear-gradient(
    90deg,
    var(--ws-bg-2) 25%,
    var(--ws-bg-3, var(--ws-border)) 50%,
    var(--ws-bg-2) 75%
  );
  background-size: 200% 100%;
  animation: ws-shimmer 1.5s infinite ease-in-out;
  border-radius: 6px;
}

/* Card hover lift */
.card-lift {
  transition: transform 0.15s, box-shadow 0.15s;
}
.card-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

/* Disabled inputs/buttons softer */
button:disabled,
input:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Smoother scroll for scrollable containers */
.hscroll, .scroll {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.hscroll::-webkit-scrollbar { height: 4px; }
.hscroll::-webkit-scrollbar-thumb {
  background: var(--ws-border);
  border-radius: 999px;
}
.hscroll::-webkit-scrollbar-thumb:hover {
  background: var(--ws-fg-4);
}

/* Reduce motion respect */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
 * Spacing & sizing — comfortable, consistent targets
 * ============================================================ */

/* Roomier, consistent touch targets on phones/tablets.
   Primary actions and form controls get a full 44px hit area. */
@media (pointer: coarse) {
  button.btn:not(.icon):not(.sm),
  .btn.primary:not(.sm) {
    min-height: 44px;
  }
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    min-height: 44px;
  }
}

/* Stop iOS Safari from auto-zooming form fields (<16px triggers zoom). */
@media (max-width: 480px) {
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    font-size: max(16px, 1em);
  }
}

/* Empty-state action button: a touch more presence + lift on press. */
.fade .btn.primary { letter-spacing: 0.1px; }

/* ============================================================
 * Ecosystem Hub — landing launcher (light + dark)
 * ============================================================ */
.hub {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  max-width: 1180px;
  margin: 0 auto;
}
.hub-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.hub-greet {
  font-size: 24px; font-weight: 800; letter-spacing: -0.5px; margin-top: 5px;
  color: var(--ws-fg-1);
}
.hub-greet-name {
  background: linear-gradient(135deg, #2563EB, #22D3EE);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hub-sub { font-size: 12.5px; color: var(--ws-fg-3); margin-top: 4px; }
.hub-header-actions { display: flex; align-items: center; gap: 8px; }
.hub-search {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 12px; border-radius: 11px;
  background: var(--ws-bg-2); border: 1px solid var(--ws-border);
  color: var(--ws-fg-3); font-family: var(--ws-font); font-size: 12.5px; cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}
.hub-search:hover { border-color: var(--ws-fg-4); }
.hub-search kbd {
  font-family: var(--ws-font); font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 6px; background: var(--ws-bg-3, var(--ws-border)); color: var(--ws-fg-4);
}
.hub-icon-btn {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--ws-bg-2); border: 1px solid var(--ws-border);
  color: var(--ws-fg-2); cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: border-color 0.18s, color 0.18s;
}
.hub-icon-btn:hover { color: var(--ws-fg-1); border-color: var(--ws-fg-4); }
.hub-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background-size: cover; background-position: center;
  color: #fff; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18); cursor: pointer; flex-shrink: 0;
}

/* Module cards */
.hub-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px;
  margin-bottom: 18px;
}
.hub-card {
  text-align: left; border: 1px solid var(--ws-border); background: var(--ws-bg-1);
  border-radius: 18px; overflow: hidden; cursor: pointer; padding: 0;
  display: flex; flex-direction: column; font-family: var(--ws-font); color: inherit;
}
.hub-card-media { position: relative; height: 108px; overflow: hidden; }
.hub-card-glow {
  position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 80% -10%, rgba(255,255,255,0.38), transparent 60%);
}
.hub-card-icon {
  position: absolute; left: 16px; bottom: 14px;
  width: 50px; height: 50px; border-radius: 15px;
  background: rgba(255, 255, 255, 0.22); border: 1px solid rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
.hub-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.hub-card-title { font-size: 15.5px; font-weight: 800; letter-spacing: -0.2px; color: var(--ws-fg-1); }
.hub-card-desc { font-size: 12px; color: var(--ws-fg-3); margin: 5px 0 12px; line-height: 1.5; flex: 1; }
.hub-card-cta { font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }

/* Overview + activity */
.hub-overview { display: grid; grid-template-columns: 1fr; gap: 14px; }
.hub-panel {
  background: var(--ws-bg-1); border: 1px solid var(--ws-border); border-radius: 18px; padding: 16px;
}
.hub-panel-title { font-size: 12.5px; font-weight: 800; color: var(--ws-fg-2); margin-bottom: 12px; letter-spacing: 0.2px; }
.hub-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hub-stat { background: var(--ws-bg-2); border: 1px solid var(--ws-border); border-radius: 14px; padding: 12px; }
.hub-stat-label { font-size: 11px; color: var(--ws-fg-3); }
.hub-stat-value { font-size: 20px; font-weight: 800; letter-spacing: -0.4px; margin-top: 2px; color: var(--ws-fg-1); }
.hub-stat-delta { font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.hub-activity-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-top: 1px solid var(--ws-border);
}
.hub-activity-row:first-of-type { border-top: none; }
.hub-activity-icon {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.hub-activity-text { flex: 1; font-size: 12.5px; color: var(--ws-fg-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-activity-time { font-size: 11px; color: var(--ws-fg-4); flex-shrink: 0; }
.hub-activity-empty { font-size: 12.5px; color: var(--ws-fg-4); padding: 10px 0; }

@media (min-width: 760px) {
  .hub { padding: 26px 24px calc(26px + env(safe-area-inset-bottom)); }
  .hub-greet { font-size: 28px; }
  .hub-overview { grid-template-columns: 1.7fr 1fr; }
  .hub-stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
 * PortalDock — desktop bottom dock to switch portals
 * ============================================================ */
.portal-dock {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 90; display: block;
}
.portal-dock-inner {
  display: flex; align-items: flex-end; gap: 4px; padding: 8px 10px;
  background: var(--ws-bg-1);
  border: 1px solid var(--ws-border-mid, var(--ws-border));
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  transition: transform 0.32s cubic-bezier(0.2, 0.85, 0.25, 1), opacity 0.26s;
  transform-origin: bottom center;
}
:root[data-theme="light"] .portal-dock-inner { background: rgba(255, 255, 255, 0.82); }
.portal-dock:not(.open) .portal-dock-inner {
  transform: translateY(135%) scale(0.92); opacity: 0; pointer-events: none;
}
.portal-dock-handle {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 6px 12px 6px 8px; border-radius: 999px;
  background: var(--ws-bg-1);
  border: 1px solid var(--ws-border-mid, var(--ws-border));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  color: var(--ws-fg-2); opacity: 0; pointer-events: none;
  transition: opacity 0.26s; font-family: var(--ws-font);
}
:root[data-theme="light"] .portal-dock-handle { background: rgba(255, 255, 255, 0.85); }
.portal-dock:not(.open) .portal-dock-handle { opacity: 1; pointer-events: auto; }
.portal-dock-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer; padding: 4px 8px; border-radius: 13px;
  color: var(--ws-fg-3); font-family: var(--ws-font);
  transition: background 0.15s, color 0.15s, transform 0.14s;
}
.portal-dock-item:hover { background: var(--ws-bg-2); color: var(--ws-fg-1); transform: translateY(-3px); }
.portal-dock-item.active { color: var(--ws-fg-1); }
.portal-dock-item.active .portal-dock-ic { box-shadow: 0 0 0 2px var(--ws-bg-1), 0 0 0 3.5px var(--pt); }
.portal-dock-ic {
  width: 42px; height: 42px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 17px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}
.portal-dock-ic.sm { width: 26px; height: 26px; border-radius: 8px; font-size: 12px; box-shadow: none; }
.portal-dock-lbl { font-size: 10px; font-weight: 600; letter-spacing: 0.2px; }

/* Only meaningful on desktop; never show on touch/mobile layouts. */
@media (max-width: 979px) { .portal-dock { display: none; } }

/* ============================================================
   PORTAL DASHBOARD (client-portal-dashboard.jsx)
   Micro-interacciones del dashboard del cliente. Todas las
   animaciones se apagan solas con prefers-reduced-motion (ver
   kill-switch global más arriba).
   ============================================================ */

@keyframes cpd-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
.cpd-pop { animation: cpd-pop 0.55s cubic-bezier(0.16, 1, 0.3, 1) both; }

@keyframes cpd-aurora-a {
  0%   { transform: translate(-14%, -10%) scale(1); }
  50%  { transform: translate(12%, 8%) scale(1.18); }
  100% { transform: translate(-14%, -10%) scale(1); }
}
@keyframes cpd-aurora-b {
  0%   { transform: translate(16%, 12%) scale(1.1); }
  50%  { transform: translate(-10%, -6%) scale(0.95); }
  100% { transform: translate(16%, 12%) scale(1.1); }
}
@keyframes cpd-sheen {
  0%, 55% { transform: translateX(-140%) rotate(8deg); }
  100%    { transform: translateX(260%) rotate(8deg); }
}

.cpd-hero {
  position: relative; overflow: hidden;
  border-radius: 20px; border: 1px solid var(--ws-border);
}
.cpd-hero-blob {
  position: absolute; width: 360px; height: 360px; border-radius: 50%;
  filter: blur(70px); opacity: 0.5; pointer-events: none; will-change: transform;
}
.cpd-hero-blob.a { animation: cpd-aurora-a 16s ease-in-out infinite; }
.cpd-hero-blob.b { animation: cpd-aurora-b 21s ease-in-out infinite; }
.cpd-sheen::after {
  content: ''; position: absolute; top: -40%; bottom: -40%; left: 0; width: 34%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.09), transparent);
  animation: cpd-sheen 6.5s ease-in-out infinite; pointer-events: none;
}

/* Tile con lift + spotlight que sigue el mouse (vars --mx/--my desde JS). */
.cpd-tile {
  position: relative; overflow: hidden; text-align: left;
  border-radius: 16px; padding: 14px;
  background: var(--ws-bg-1); border: 1px solid var(--ws-border);
  font-family: var(--ws-font); color: var(--ws-fg-1);
  transition: transform 0.18s cubic-bezier(0.2, 0.7, 0.2, 1),
              box-shadow 0.18s, border-color 0.18s;
}
.cpd-tile:hover {
  transform: translateY(-2px);
  border-color: var(--ws-border-mid);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}
:root[data-theme="light"] .cpd-tile:hover { box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10); }
.cpd-spot::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 0%),
              var(--cpd-spot-color, rgba(52, 206, 198, 0.10)), transparent 65%);
  opacity: 0; transition: opacity 0.25s; pointer-events: none;
}
.cpd-spot:hover::before { opacity: 1; }

.cpd-grid-kpi {
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 760px) {
  .cpd-grid-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.cpd-grid-2 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) {
  .cpd-grid-2 { grid-template-columns: 1.4fr 1fr; align-items: stretch; }
}

/* El kill-switch global sólo pone las *duraciones* a 0.01ms — no toca los
   delays escalonados ni las animaciones infinitas (aurora/sheen), que
   seguirían corriendo. Aquí las apagamos de verdad para reduced-motion. */
@media (prefers-reduced-motion: reduce) {
  .cpd-pop { animation-delay: 0ms !important; }
  .cpd-hero-blob.a, .cpd-hero-blob.b { animation: none !important; }
  .cpd-sheen::after { display: none !important; }
}

/* ============================================================
   NEURON (neuron.jsx) — HUD del centro de mando del superadmin
   ============================================================ */

@keyframes nr-blink { 0%, 55% { opacity: 1; } 70%, 100% { opacity: 0.15; } }
.nr-blink { animation: nr-blink 1.6s ease-in-out infinite; }

@keyframes nr-scan-move {
  0%   { transform: translateX(-30%); }
  100% { transform: translateX(130%); }
}
.nr-scan { overflow: hidden; pointer-events: none; }
.nr-scan::before {
  content: ''; position: absolute; top: 0; bottom: 0; width: 30%;
  background: linear-gradient(90deg, transparent, #34CEC6, transparent);
  animation: nr-scan-move 3.8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* pop-in de neuronas del cerebro (SVG <g>) */
@keyframes nr-node-in {
  from { opacity: 0; transform: scale(0.4); }
  to   { opacity: 1; transform: scale(1); }
}
.nr-node-pop {
  transform-box: fill-box; transform-origin: center;
  animation: nr-node-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* marco HUD: ticks en las esquinas del contenedor del cerebro */
.nr-frame::before, .nr-frame::after {
  content: ''; position: absolute; width: 18px; height: 18px; z-index: 2;
  border: 2px solid rgba(52, 206, 198, 0.55); pointer-events: none;
}
.nr-frame::before { top: 8px; left: 8px; border-right: none; border-bottom: none; border-radius: 6px 0 0 0; }
.nr-frame::after  { bottom: 8px; right: 8px; border-left: none; border-top: none; border-radius: 0 0 6px 0; }

/* tilt 3D del cerebro (transform lo maneja JS, aquí la transición) */
.nr-tilt { transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1); will-change: transform; }

/* glow cónico rotando lentamente detrás del cerebro */
@keyframes nr-conic-spin { to { transform: rotate(360deg); } }
.nr-conic {
  position: absolute; inset: -35%; pointer-events: none; opacity: 0.16;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(52,206,198,0.5) 40deg, transparent 90deg,
              transparent 180deg, rgba(124,58,237,0.5) 230deg, transparent 280deg);
  animation: nr-conic-spin 26s linear infinite;
}

/* orbe de NEURON — respira; al hablar palpita más fuerte */
@keyframes nr-orb-breathe {
  0%, 100% { transform: scale(1);    filter: brightness(1); }
  50%      { transform: scale(1.07); filter: brightness(1.25); }
}
@keyframes nr-orb-talk {
  0%, 100% { transform: scale(1); }
  30%      { transform: scale(1.16); }
  60%      { transform: scale(0.96); }
}
.nr-orb { position: relative; flex-shrink: 0; }
.nr-orb-core {
  width: 100%; height: 100%; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,0.9), rgba(52,206,198,0.9) 30%, rgba(124,58,237,0.95) 75%, rgba(11,11,16,0.9));
  box-shadow: 0 0 18px rgba(52,206,198,0.55), 0 0 40px rgba(124,58,237,0.35), inset 0 0 12px rgba(255,255,255,0.25);
  animation: nr-orb-breathe 3.4s ease-in-out infinite;
}
.nr-orb.speaking .nr-orb-core { animation: nr-orb-talk 0.5s ease-in-out infinite; }
.nr-orb.listening .nr-orb-core { box-shadow: 0 0 18px rgba(239,68,68,0.7), 0 0 40px rgba(239,68,68,0.4); }

/* ondas del ecualizador cuando NEURON habla */
@keyframes nr-wave-bar { 0%, 100% { height: 3px; } 50% { height: 12px; } }
.nr-wave {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; gap: 2px;
}
.nr-wave span {
  width: 2.5px; height: 3px; border-radius: 2px; background: #fff;
  animation: nr-wave-bar 0.8s ease-in-out infinite;
  box-shadow: 0 0 4px rgba(255,255,255,0.8);
}

@media (prefers-reduced-motion: reduce) {
  .nr-blink { animation: none !important; opacity: 1; }
  .nr-scan::before { animation: none !important; display: none; }
  .nr-node-pop { animation-delay: 0ms !important; }
  .nr-conic { animation: none !important; }
  .nr-orb-core { animation: none !important; }
  .nr-wave span { animation: none !important; height: 8px; }
  .nr-tilt { transition: none !important; }
}

/* ============================================================
   SOCIAL HUB (social-hub.jsx) — menú lateral + secciones
   ============================================================ */
.sf-sidebar {
  position: sticky; top: 20px; align-self: start;
  display: flex; flex-direction: column; gap: 3px;
}
.sf-nav {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 11px; cursor: pointer;
  background: transparent; border: 1px solid transparent;
  color: var(--ws-fg-3); font-family: var(--ws-font); font-size: 13px; font-weight: 600;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}
.sf-nav:hover { background: var(--ws-bg-2); color: var(--ws-fg-1); }
.sf-nav.on {
  color: var(--ws-fg-1); font-weight: 800;
  background: linear-gradient(90deg, var(--ws-accent-soft), transparent);
  border-color: var(--ws-border);
  box-shadow: inset 3px 0 0 var(--ws-accent);
}
.sf-nav.on i { color: var(--ws-accent); }
.sf-nav-badge {
  background: #EF4444; color: #fff; font-size: 9.5px; font-weight: 800;
  min-width: 18px; height: 18px; border-radius: 999px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* colapso a una columna en móvil/tablet */
@media (max-width: 900px) {
  .sf-layout { grid-template-columns: 1fr !important; }
  .sf-grid-2 { grid-template-columns: 1fr !important; }
  .sf-inbox { grid-template-columns: 1fr !important; }
}
