/* ════════════════════════════════════════════════════════════════════
 * COLEGIO DIGITAL CRYPTO — Design System v3 "Aurora Premium"
 * Mobile-first · No overflow horizontal · App-like
 * Sweep borders · Ambient particles · Spring transitions
 * Low-battery & prefers-reduced-motion safe
 * ════════════════════════════════════════════════════════════════════ */

/* ── 0. Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video, canvas, audio { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

/* ── 1. Tokens ─────────────────────────────────────────────────────── */
:root {
  /* Primary palette: BLUE NAVY ROYAL (re-asignada a --teal-* para
     compatibilidad con todo el código existente) */
  --teal-50:  #EFF4FF;
  --teal-100: #DBE6FE;
  --teal-200: #B5C9FD;
  --teal-300: #89A6FA;
  --teal-400: #5982F4;
  --teal-500: #2B5BD9; /* primario royal */
  --teal-600: #1849C5;
  --teal-700: #0E2F8A; /* navy */
  --teal-800: #0A1F62;
  --teal-900: #07153D;

  --gold-50:  #FFF8E6;
  --gold-100: #FAEBC2;
  --gold-200: #EFD27D;
  --gold-300: #DDB749;
  --gold-500: #C9A227; /* champagne */
  --gold-700: #8E7012;
  --gold-900: #4A3A05;

  --indigo-500: #5B6CFF;
  --rose-500:   #E0556C;
  --emerald-500:#21BF73;

  /* Blue premium (azul lujoso navy → royal) */
  --blue-50:  #EFF4FF;
  --blue-100: #DBE6FE;
  --blue-200: #B5C9FD;
  --blue-300: #89A6FA;
  --blue-400: #5982F4;
  --blue-500: #3F77FF; /* electric */
  --blue-600: #1849C5; /* royal */
  --blue-700: #0E2F8A; /* navy */
  --blue-800: #0A1F62;
  --blue-900: #07153D;

  /* Neutral aurora (warm slate) */
  --ink-950: #0B1220;
  --ink-900: #0F172A;
  --ink-800: #1E293B;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #64748B;
  --ink-400: #94A3B8;
  --ink-300: #CBD5E1;
  --ink-200: #E2E8F0;
  --ink-100: #F1F5F9;
  --ink-50:  #F8FAFC;

  --bg-app:    #F6F8FB;
  --bg-card:   #FFFFFF;
  --bg-soft:   #FAFBFD;
  --bg-pop:    #FFFFFF;

  --border:        rgba(15, 23, 42, 0.06);
  --border-strong: rgba(15, 23, 42, 0.10);
  --border-glow:   rgba(31, 73, 197, 0.18);

  /* Spring shadows (tinted azul) */
  --sh-1: 0 1px 0 rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.04);
  --sh-2: 0 6px 14px -8px rgba(31, 73, 197, 0.18), 0 2px 6px rgba(15, 23, 42, 0.04);
  --sh-3: 0 18px 40px -22px rgba(15, 23, 42, 0.18), 0 6px 18px -10px rgba(31, 73, 197, 0.10);
  --sh-4: 0 30px 80px -40px rgba(15, 23, 42, 0.32), 0 12px 30px -16px rgba(31, 73, 197, 0.18);
  --sh-glow-teal: 0 12px 30px -10px rgba(31, 73, 197, 0.40);
  --sh-glow-gold: 0 12px 30px -10px rgba(201, 162, 39, 0.40);

  /* Radii */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-2xl: 36px;
  --r-full: 9999px;

  /* Spacing 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;
  --s-16: 64px; --s-20: 80px;

  /* Layout */
  --sidebar-w: 248px;
  --topbar-h:  68px;
  --bottom-h:  72px;
  --max-w:     1320px;

  /* Motion */
  --t-spring:  cubic-bezier(0.22, 1, 0.36, 1);
  --t-snap:    cubic-bezier(0.16, 1, 0.3, 1);
  --t-ease:    cubic-bezier(0.4, 0, 0.2, 1);
  --d-fast: 180ms;
  --d-norm: 320ms;
  --d-slow: 520ms;

  /* Type */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --text-1: var(--ink-900);
  --text-2: var(--ink-700);
  --text-3: var(--ink-500);
  --text-mute: var(--ink-400);
}

body {
  background: var(--bg-app);
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

/* ── 2. Tipografía ─────────────────────────────────────────────────── */
h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; color: var(--text-1); }
h1 { font-size: clamp(28px, 4.4vw, 44px); font-weight: 800; }
h2 { font-size: clamp(22px, 3vw, 32px); }
h3 { font-size: clamp(18px, 2.4vw, 22px); }
h4 { font-size: 16px; font-weight: 600; }
p { margin: 0; color: var(--text-2); }
small { color: var(--text-3); font-size: 12px; }
.mono { font-family: var(--font-mono); font-feature-settings: "tnum"; letter-spacing: -0.01em; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--teal-700);
}
.eyebrow::before {
  content: ''; width: 18px; height: 1.5px; background: linear-gradient(90deg, var(--teal-500), transparent);
}

.muted { color: var(--text-3); }
.strong { color: var(--text-1); font-weight: 600; }

.gradient-text {
  background: linear-gradient(120deg, var(--blue-500, #2B5BD9) 0%, var(--blue-700, #1849C5) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── 3. Utilidades atómicas ────────────────────────────────────────── */
.flex { display: flex; } .iflex { display: inline-flex; }
.items-c { align-items: center; } .items-s { align-items: flex-start; } .items-e { align-items: flex-end; }
.justify-b { justify-content: space-between; } .justify-c { justify-content: center; } .justify-e { justify-content: flex-end; }
.flex-col { flex-direction: column; } .flex-wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; } .shrink-0 { flex-shrink: 0; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 20px; } .gap-6 { gap: 24px; } .gap-8 { gap: 32px; }
.grid { display: grid; }
.text-c { text-align: center; } .text-r { text-align: right; }
.w-full { width: 100%; } .h-full { height: 100%; }
.relative { position: relative; } .absolute { position: absolute; } .sticky { position: sticky; }
.hidden { display: none !important; }
.show-mobile { display: none; } .show-desktop { display: initial; }
.overflow-h { overflow: hidden; }

.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; } .mt-12 { margin-top: 48px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.p-3 { padding: 12px; } .p-4 { padding: 16px; } .p-5 { padding: 20px; } .p-6 { padding: 24px; } .p-8 { padding: 32px; }
.px-3 { padding-left: 12px; padding-right: 12px; } .px-4 { padding-left: 16px; padding-right: 16px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; } .py-4 { padding-top: 16px; padding-bottom: 16px; }

.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 12px; }
.stack { display: grid; gap: 16px; }
.stack-sm { display: grid; gap: 8px; }

/* ── 4. App shell ──────────────────────────────────────────────────── */
.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100dvh;
  isolation: isolate;
}
.app-main {
  display: flex; flex-direction: column;
  min-width: 0;
  min-height: 100dvh;
  position: relative;
  z-index: 1;
}
.page {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px clamp(16px, 3vw, 36px) 56px;
  display: flex; flex-direction: column; gap: 24px;
  min-width: 0;
}

/* Ambient / particles eliminados a petición del usuario */
.ambient, .particles { display: none !important; }

/* ── 5. Sidebar ────────────────────────────────────────────────────── */
.sidebar {
  position: sticky; top: 0;
  height: 100dvh;
  width: var(--sidebar-w);
  background: #FBFBFC;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 30;
  overflow-y: auto; overflow-x: hidden;
  /* Gutter estable: reserva siempre el espacio del scrollbar para que el
     contenido NO se desplace cuando aparece/desaparece. */
  scrollbar-gutter: stable;
  /* Scrollbar fina permanente, color transparente por defecto y sutil al hover. */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  transition: width 280ms cubic-bezier(0.22, 1, 0.36, 1), scrollbar-color 200ms ease;
}
/* WebKit: scrollbar finita y discreta */
.sidebar::-webkit-scrollbar { width: 6px; height: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
  transition: background 200ms ease;
}
.sidebar:hover { scrollbar-color: rgba(15, 23, 42, 0.18) transparent; }
.sidebar:hover::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.20); }
.sidebar:hover::-webkit-scrollbar-thumb:hover { background: rgba(15, 23, 42, 0.32); }

.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 16px 16px;
  border-bottom: 1px solid var(--border);
  min-height: 64px;
}
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--ink-900);
  color: white;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.brand-mark svg { position: relative; z-index: 1; }
.brand-name { font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; font-size: 14.5px; color: var(--ink-900); }
.brand-tag { font-size: 9.5px; font-weight: 700; color: var(--ink-400); letter-spacing: 0.20em; text-transform: uppercase; margin-top: 2px; }

.nav { padding: 12px 10px 16px; display: flex; flex-direction: column; gap: 1px; }
.nav-section {
  font-size: 10px; font-weight: 700; letter-spacing: 0.20em;
  text-transform: uppercase; color: var(--ink-400);
  padding: 16px 14px 8px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--ink-700);
  font-weight: 500; font-size: 13.5px;
  transition: background 180ms ease, color 180ms ease;
  position: relative;
  white-space: nowrap;
}
.nav-item:hover { background: rgba(15, 23, 42, 0.045); color: var(--ink-900); }
.nav-item .ic { width: 19px; height: 19px; flex-shrink: 0; opacity: 0.78; transition: opacity 180ms ease; }
.nav-item:hover .ic { opacity: 1; }
.nav-item.is-active {
  background: rgba(15, 23, 42, 0.06);
  color: var(--ink-900);
  font-weight: 600;
}
.nav-item.is-active .ic { opacity: 1; color: var(--blue-600, #2B5BD9); }
.nav-item.is-active::after {
  content: ''; position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--blue-600, #2B5BD9);
}

.sidebar-foot {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border);
}
.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  transition: background 180ms ease, border-color 180ms ease;
}
.user-chip:hover { background: rgba(15, 23, 42, 0.04); border-color: var(--border); }
.avatar {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--blue-600, #2B5BD9);
  color: white;
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}
.user-name { font-weight: 600; font-size: 13px; line-height: 1.2; }
.user-email { font-size: 11px; color: var(--ink-500); }

/* Mobile drawer */
.menu-toggle, .menu-close { display: none; }
.backdrop {
  position: fixed; inset: 0; background: rgba(11, 18, 32, 0.42);
  backdrop-filter: blur(6px); z-index: 25;
  opacity: 0; visibility: hidden;
  transition: opacity var(--d-norm) var(--t-ease), visibility 0s linear var(--d-norm);
}
body.is-drawer-open .backdrop { opacity: 1; visibility: visible; transition-delay: 0s; }

/* ── 6. Topbar ─────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 clamp(16px, 3vw, 28px);
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.topbar .brand-compact { display: none; align-items: center; gap: 10px; font-weight: 700; }
.topbar .brand-compact .brand-mark { width: 32px; height: 32px; border-radius: 10px; }
.topbar .brand-compact span { font-size: 14px; }

.gsearch {
  flex: 1 1 auto;
  position: relative;
  min-width: 0;
  max-width: 560px;
}
.gsearch input {
  width: 100%;
  height: 42px;
  border-radius: 14px;
  background: var(--ink-50);
  border: 1px solid var(--border);
  padding: 0 44px 0 44px;
  font-size: 14px;
  color: var(--text-1);
  transition: background var(--d-fast) var(--t-ease), border-color var(--d-fast) var(--t-ease), box-shadow var(--d-fast) var(--t-ease);
}
.gsearch input::placeholder { color: var(--ink-400); }
.gsearch input:focus {
  outline: none;
  background: white;
  border-color: var(--teal-300);
  box-shadow: 0 0 0 4px rgba(14, 175, 161, 0.10);
}
.gsearch .ic-search { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-400); width: 18px; height: 18px; }
.gsearch .kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 10px; padding: 3px 6px; border-radius: 6px; background: var(--ink-100); color: var(--ink-500); border: 1px solid var(--border); font-family: var(--font-mono); }
.gsearch .results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--sh-3);
  padding: 8px;
  max-height: 60vh;
  overflow-y: auto;
  display: none;
  z-index: 40;
}
.gsearch.is-open .results { display: block; animation: pop-in var(--d-norm) var(--t-spring); }
.gsearch .res-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink-700);
  font-size: 14px;
}
.gsearch .res-item:hover { background: var(--ink-50); color: var(--teal-700); }
.gsearch .res-group { padding: 12px 12px 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-400); }
.gsearch .res-empty { padding: 24px 16px; text-align: center; color: var(--ink-500); font-size: 13px; }

@keyframes pop-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.bell-btn, .icon-btn {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: white;
  border: 1px solid var(--border);
  color: var(--ink-600);
  transition: background var(--d-fast) var(--t-ease), color var(--d-fast) var(--t-ease), transform var(--d-fast) var(--t-spring), box-shadow var(--d-fast) var(--t-ease);
  position: relative;
}
.bell-btn:hover, .icon-btn:hover { color: var(--teal-700); border-color: var(--teal-300); transform: translateY(-1px); box-shadow: var(--sh-2); }
.bell-btn .dot {
  position: absolute; top: 9px; right: 10px; width: 8px; height: 8px;
  background: var(--rose-500); border-radius: 50%; border: 2px solid white;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }

.btn-deposit {
  height: 42px; padding: 0 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
  color: white; font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: var(--sh-glow-teal);
  transition: transform var(--d-fast) var(--t-spring), box-shadow var(--d-fast) var(--t-ease);
}
.btn-deposit:hover { transform: translateY(-1px); box-shadow: 0 16px 36px -10px rgba(14, 175, 161, 0.55); }
.btn-deposit:active { transform: translateY(0) scale(0.98); }

/* ── 7. Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px;
  border-radius: 12px;
  font-weight: 600; font-size: 14px;
  border: 1px solid transparent;
  transition: transform var(--d-fast) var(--t-spring), background var(--d-fast) var(--t-ease), color var(--d-fast) var(--t-ease), box-shadow var(--d-fast) var(--t-ease), border-color var(--d-fast) var(--t-ease);
  position: relative;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.985); }
.btn-primary {
  background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
  color: white;
  box-shadow: var(--sh-glow-teal);
}
.btn-primary:hover { box-shadow: 0 16px 36px -10px rgba(14, 175, 161, 0.55); transform: translateY(-1px); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-700));
  color: white;
  box-shadow: var(--sh-glow-gold);
}
.btn-gold:hover { transform: translateY(-1px); }
.btn-outline {
  background: white; color: var(--ink-700); border-color: var(--border-strong);
}
.btn-outline:hover { color: var(--teal-700); border-color: var(--teal-300); box-shadow: var(--sh-2); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink-700); }
.btn-ghost:hover { background: var(--ink-100); color: var(--teal-700); }
.btn-danger { background: var(--rose-500); color: white; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-lg { height: 50px; padding: 0 24px; font-size: 15px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: 0.55; pointer-events: none; }

/* ── 8. Cards ──────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--sh-1);
  position: relative;
  overflow: hidden;
  transition: transform var(--d-norm) var(--t-spring), box-shadow var(--d-norm) var(--t-ease);
}
.card:hover { box-shadow: var(--sh-3); transform: translateY(-2px); }
.card-flat:hover { transform: none; box-shadow: var(--sh-1); }
.card-pad-lg { padding: 28px; }
.card-pad-sm { padding: 16px; }

/* Sweep border (animated top border que recorre de izquierda a derecha) */
.card.sweep::before {
  content: '';
  position: absolute; left: 0; top: 0; height: 2px;
  width: 30%;
  background: linear-gradient(90deg, transparent, var(--teal-500), transparent);
  animation: sweep 4.5s linear infinite;
}
.card.sweep--gold::before { background: linear-gradient(90deg, transparent, var(--gold-500), transparent); }
.card.sweep--indigo::before { background: linear-gradient(90deg, transparent, var(--indigo-500), transparent); }
.card.sweep--rose::before { background: linear-gradient(90deg, transparent, var(--rose-500), transparent); }
.card.sweep--emerald::before { background: linear-gradient(90deg, transparent, var(--emerald-500), transparent); }
@keyframes sweep {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

.card-glass {
  background: rgba(255,255,255,0.68);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.6),
    0 18px 40px -22px rgba(15, 23, 42, 0.18);
}

.card-hero {
  background:
    radial-gradient(140% 120% at 0% 0%, rgba(14, 175, 161, 0.18), transparent 55%),
    radial-gradient(120% 100% at 100% 100%, rgba(201, 162, 39, 0.14), transparent 55%),
    linear-gradient(135deg, #0E2D2A 0%, #08191A 100%);
  color: white;
  border: 1px solid rgba(255,255,255,0.10);
  padding: 32px;
  border-radius: var(--r-xl);
  position: relative;
}
.card-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(80% 60% at 80% 20%, rgba(255,255,255,0.05), transparent 60%);
}

.card-title {
  font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 4px;
}
.card-sub { color: var(--text-3); font-size: 13px; }
.card-sep { height: 1px; background: var(--border); margin: 16px -22px; }

/* ── 9. Bento / KPI ───────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.kpi {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  overflow: hidden;
  transition: transform var(--d-norm) var(--t-spring), box-shadow var(--d-norm) var(--t-ease);
}
.kpi:hover { transform: translateY(-3px); box-shadow: var(--sh-3); }
.kpi::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--teal-500), transparent);
  transform: translateX(-100%);
  animation: sweep 5.6s linear infinite;
}
.kpi--gold::before { background: linear-gradient(90deg, transparent, var(--gold-500), transparent); animation-duration: 6.2s; }
.kpi--indigo::before { background: linear-gradient(90deg, transparent, var(--indigo-500), transparent); animation-duration: 6.8s; }
.kpi--rose::before { background: linear-gradient(90deg, transparent, var(--rose-500), transparent); animation-duration: 7.4s; }
.kpi--emerald::before { background: linear-gradient(90deg, transparent, var(--emerald-500), transparent); animation-duration: 5.2s; }
.kpi--ink::before { background: linear-gradient(90deg, transparent, var(--ink-700), transparent); animation-duration: 8s; }

.kpi-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-500); font-weight: 700;
  margin-bottom: 10px;
}
.kpi-icon {
  width: 36px; height: 36px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(14, 175, 161, 0.10);
  color: var(--teal-700);
  flex-shrink: 0;
}
.kpi--gold .kpi-icon { background: rgba(201, 162, 39, 0.12); color: var(--gold-700); }
.kpi--indigo .kpi-icon { background: rgba(91, 108, 255, 0.10); color: var(--indigo-500); }
.kpi--rose .kpi-icon { background: rgba(224, 85, 108, 0.10); color: var(--rose-500); }
.kpi--emerald .kpi-icon { background: rgba(33, 191, 115, 0.10); color: var(--emerald-500); }
.kpi--ink .kpi-icon { background: rgba(15, 23, 42, 0.06); color: var(--ink-700); }

.kpi-value {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.025em;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--text-1);
}
.kpi-sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.kpi--featured {
  background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
  color: white;
  border: 0;
  box-shadow: var(--sh-glow-teal);
}
.kpi--featured .kpi-head { color: rgba(255,255,255,0.7); }
.kpi--featured .kpi-icon { background: rgba(255,255,255,0.15); color: white; }
.kpi--featured .kpi-value { color: white; }
.kpi--featured .kpi-sub { color: rgba(255,255,255,0.8); }

/* Bento grid asymmetric */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}
.bento .b-6 { grid-column: span 6; } .bento .b-4 { grid-column: span 4; } .bento .b-8 { grid-column: span 8; }
.bento .b-3 { grid-column: span 3; } .bento .b-5 { grid-column: span 5; } .bento .b-7 { grid-column: span 7; }
.bento .b-12 { grid-column: span 12; }

/* ── 10. Steps / Checklist ─────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.step {
  position: relative;
  padding: 18px 18px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  transition: transform var(--d-norm) var(--t-spring), box-shadow var(--d-norm) var(--t-ease), border-color var(--d-norm) var(--t-ease);
  display: flex; flex-direction: column; gap: 8px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}
.step::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--blue-600, #2B5BD9);
  transform: scaleX(0); transform-origin: left;
  transition: transform 320ms var(--t-spring);
}
.step:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -10px rgba(31, 73, 197, 0.18);
  border-color: rgba(31, 73, 197, 0.22);
}
.step:hover::before { transform: scaleX(1); }
.step .ic-wrap {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: rgba(31, 73, 197, 0.10);
  color: var(--blue-700, #1849C5);
  box-shadow: inset 0 0 0 1px rgba(31, 73, 197, 0.16);
}
.step h4 {
  font-size: 14px; font-weight: 700;
  color: var(--ink-900);
  margin: 4px 0 0;
  letter-spacing: -0.01em;
}
.step p {
  font-size: 12px;
  color: var(--ink-500);
  line-height: 1.45;
  margin: 0;
  flex: 1;
}
.step .step-cta {
  font-size: 12px; font-weight: 700;
  color: var(--blue-700, #1849C5);
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  transition: gap 200ms var(--t-spring);
}
.step:hover .step-cta { gap: 8px; }
.step.is-done {
  background: rgba(33, 191, 115, 0.04);
  border-color: rgba(33, 191, 115, 0.28);
}
.step.is-done::before { background: #117A4A; transform: scaleX(1); }
.step.is-done .ic-wrap {
  background: #117A4A;
  color: #fff;
  box-shadow: 0 4px 10px -3px rgba(33, 191, 115, 0.32);
}
.step.is-done .step-cta { color: #117A4A; }

.progress {
  height: 8px; background: var(--ink-100); border-radius: 99px; overflow: hidden;
}
.progress > i {
  display: block; height: 100%;
  background: var(--blue-600, #2B5BD9);
  border-radius: inherit;
  transition: width var(--d-slow) var(--t-spring);
}

/* ── 11. Renewal banner ───────────────────────────────────────────── */
.renewal {
  position: relative;
  border-radius: var(--r-xl);
  padding: 20px 22px;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(14, 175, 161, 0.30), transparent 50%),
    radial-gradient(80% 100% at 100% 100%, rgba(201, 162, 39, 0.30), transparent 60%),
    linear-gradient(135deg, #0B2A28, #08191A);
  color: white;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 30px 60px -28px rgba(11, 142, 132, 0.4);
}
.renewal::before {
  content: ''; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(115deg, transparent 0 20px, rgba(255,255,255,0.03) 20px 21px);
  pointer-events: none;
}
.renewal h3 { color: white; }
.renewal-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; position: relative; }
.renewal-meta { color: rgba(255,255,255,0.7); font-size: 13px; }
.countdown {
  display: inline-flex; gap: 8px;
  font-family: var(--font-mono);
}
.countdown .seg {
  min-width: 56px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 8px 10px;
  text-align: center;
}
.countdown .seg b {
  display: block; font-size: 22px; font-weight: 800; color: white; letter-spacing: -0.02em;
}
.countdown .seg span { font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.6); }
.renewal.is-soon { background: radial-gradient(120% 120% at 0% 0%, rgba(224, 85, 108, 0.30), transparent 50%), linear-gradient(135deg, #2A0B16, #1A0810); }

/* ──── Bloque educativo del dashboard ─────────────────────────────── */
.edu-block {
  position: relative;
  margin: 18px 0 24px;
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, #0B1530 0%, #0F1F4D 100%);
  color: #fff;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 30px 70px -28px rgba(15, 27, 60, 0.55);
  display: grid;
  grid-template-columns: 320px 1fr 280px;
  gap: 0;
  isolation: isolate;
  animation: edu-rise 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes edu-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.edu-cover {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  background:
    radial-gradient(60% 80% at 80% 20%, rgba(43,91,217,0.40) 0%, transparent 60%),
    linear-gradient(135deg, #1F49C5 0%, #0B2470 100%);
}
.edu-cover.gold  { background: radial-gradient(60% 80% at 80% 20%, rgba(255,255,255,0.18) 0%, transparent 60%), linear-gradient(135deg, #D8B23F 0%, #8C6F1A 100%); }
.edu-cover.green { background: radial-gradient(60% 80% at 80% 20%, rgba(255,255,255,0.18) 0%, transparent 60%), linear-gradient(135deg, #14935A 0%, #0E5F39 100%); }
.edu-cover.navy  { background: radial-gradient(60% 80% at 80% 20%, rgba(255,255,255,0.10) 0%, transparent 60%), linear-gradient(135deg, #0B2470 0%, #0E2F8A 100%); }
.edu-cover-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}
.edu-block:hover .edu-cover-img { transform: scale(1.05); }
.edu-cover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(11,21,48,0.10) 0%, rgba(15,27,60,0.85) 100%);
  z-index: 1;
}
.edu-cover-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(60% 60% at 50% 50%, #000 30%, transparent 95%);
  -webkit-mask-image: radial-gradient(60% 60% at 50% 50%, #000 30%, transparent 95%);
  z-index: 1;
}
.edu-cover-orb {
  position: absolute;
  width: 220px; height: 220px;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.55;
  z-index: 1;
  animation: edu-orb-float 12s ease-in-out infinite;
  will-change: transform;
}
.edu-cover-orb-1 { background: radial-gradient(circle, #2B5BD9 0%, transparent 60%); top: -30%; left: -10%; }
.edu-cover-orb-2 { background: radial-gradient(circle, #C9A227 0%, transparent 60%); bottom: -30%; right: -15%; animation-delay: 5s; }
@keyframes edu-orb-float {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(20px, 18px); }
}
.edu-cover-art {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: clamp(48px, 6vw, 92px);
  font-weight: 900;
  letter-spacing: -0.045em;
  color: rgba(255,255,255,0.10);
  text-transform: uppercase;
  -webkit-text-stroke: 1px rgba(255,255,255,0.18);
  z-index: 2;
  user-select: none;
}

.edu-content {
  position: relative;
  z-index: 2;
  padding: 28px 30px;
  display: flex; flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.edu-content-top { min-width: 0; }
.edu-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin-bottom: 14px;
}
.edu-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #2DCB7E;
  box-shadow: 0 0 0 0 rgba(45, 203, 126, 0.7);
  animation: edu-pulse 1.6s ease-out infinite;
}
@keyframes edu-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(45, 203, 126, 0.55); }
  70%  { box-shadow: 0 0 0 12px rgba(45, 203, 126, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 203, 126, 0); }
}
.edu-title {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: #fff;
  margin: 0 0 8px;
  background: linear-gradient(135deg, #fff 0%, #C9D6FF 70%, #F4D88A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.edu-summary {
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(255,255,255,0.78);
  margin: 0;
}

.edu-progress-row {
  display: flex; align-items: center; gap: 12px;
  margin-top: 4px;
}
.edu-progress-bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  overflow: hidden;
  position: relative;
}
.edu-progress-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, #2DCB7E, #14935A);
  box-shadow: 0 0 10px rgba(45, 203, 126, 0.55);
  border-radius: 999px;
  transition: width 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
.edu-progress-fill.is-completed {
  background: linear-gradient(90deg, #F4D88A, #C9A227);
  box-shadow: 0 0 10px rgba(201, 162, 39, 0.55);
}
.edu-progress-val {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  min-width: 44px;
  text-align: right;
}
.edu-progress-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.66);
  display: flex; gap: 8px; flex-wrap: wrap;
}

.edu-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.edu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 12px;
  font-size: 13.5px; font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: all 240ms cubic-bezier(0.32, 0.72, 0, 1);
  border: 1px solid transparent;
  line-height: 1;
}
.edu-btn.primary {
  background: linear-gradient(135deg, #2B5BD9, #163A9E);
  color: #fff;
  box-shadow: 0 10px 28px -10px rgba(43,91,217,0.65);
}
.edu-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px -10px rgba(43,91,217,0.85);
  color: #fff;
}
.edu-btn.ghost {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.edu-btn.ghost:hover {
  background: rgba(255,255,255,0.14);
  color: #fff;
  transform: translateY(-1px);
}

.edu-stats {
  position: relative;
  z-index: 2;
  padding: 28px 26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  align-content: center;
  background: rgba(255,255,255,0.04);
  border-left: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.edu-stat .v {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #fff;
  line-height: 1;
}
.edu-stat .v small {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  font-weight: 600;
  letter-spacing: 0;
}
.edu-stat .l {
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.62);
  margin-top: 4px;
  font-weight: 600;
}
.edu-stat-bar {
  height: 4px; border-radius: 999px;
  background: rgba(255,255,255,0.10);
  overflow: hidden;
  margin-top: 8px;
}
.edu-stat-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2DCB7E, #14935A);
  transition: width 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 1180px) {
  .edu-block {
    grid-template-columns: 280px 1fr;
  }
  .edu-stats {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 820px) {
  .edu-block { grid-template-columns: 1fr; }
  .edu-cover { min-height: 160px; height: 160px; }
  .edu-content { padding: 22px 20px; }
  .edu-stats { grid-template-columns: repeat(2, 1fr); padding: 20px; }
  .edu-title { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .edu-cover-orb, .edu-dot { animation: none !important; }
}

/* ── 12. Bottom nav cápsula ───────────────────────────────────────── */
.bottom-cap {
  display: none;
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: calc(100% - 24px); max-width: 460px;
  z-index: 50;
}
.bottom-cap-inner {
  background: #0F1F2A;
  color: white;
  border-radius: 999px;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  box-shadow: 0 22px 40px -18px rgba(11, 18, 32, 0.55), 0 8px 20px -8px rgba(14, 175, 161, 0.25);
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
}
.bottom-cap-inner a {
  display: grid; place-items: center;
  height: 48px; border-radius: 999px;
  color: rgba(255,255,255,0.65);
  font-size: 11px; font-weight: 600;
  position: relative;
  transition: color var(--d-fast) var(--t-ease), background var(--d-fast) var(--t-ease);
}
.bottom-cap-inner a .ic { width: 22px; height: 22px; }
.bottom-cap-inner a:hover { color: white; }
.bottom-cap-inner a.is-active {
  color: white;
  background: var(--blue-600, #2B5BD9);
  box-shadow: 0 6px 14px -4px rgba(43, 91, 217, 0.55);
}

/* ── 13. Inputs / Forms ───────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 12px; font-weight: 600; color: var(--ink-700); letter-spacing: 0.01em; }
.help { font-size: 11px; color: var(--ink-500); }
.error { font-size: 11px; color: var(--rose-500); }
.input, .select, .textarea {
  height: 44px;
  background: white;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--text-1);
  transition: border-color var(--d-fast) var(--t-ease), box-shadow var(--d-fast) var(--t-ease), background var(--d-fast) var(--t-ease);
  width: 100%;
}
.textarea { height: auto; padding: 12px 14px; min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--teal-400);
  box-shadow: 0 0 0 4px rgba(14, 175, 161, 0.10);
}
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 44px; }
.input-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 8px;
  color: var(--ink-500);
}
.input-eye:hover { color: var(--teal-700); background: var(--ink-100); }
.input-with-prefix { position: relative; }
.input-with-prefix .prefix {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--ink-500); font-size: 13px;
}
.input-with-prefix .input { padding-left: 36px; }
.checkbox, .radio {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer;
}
.checkbox input, .radio input { width: 18px; height: 18px; accent-color: var(--teal-500); }

/* Search input compact */
.search-inline {
  position: relative; max-width: 320px;
}
.search-inline input { height: 38px; border-radius: 10px; padding-left: 36px; background: var(--ink-50); }
.search-inline .ic-search { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-400); width: 16px; height: 16px; }

/* ── 14. Tables (responsive cards en mobile) ──────────────────────── */
.tbl-wrap {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: white;
  overflow: hidden;
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.tbl thead th {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-500); font-weight: 700;
  text-align: left;
  padding: 14px 16px;
  background: var(--ink-50);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.tbl thead th a { color: inherit; display: inline-flex; align-items: center; gap: 4px; }
.tbl tbody td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--bg-soft); }
.tbl .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ── 15. Badges / Chips ───────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--ink-100); color: var(--ink-700);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--teal    { background: rgba(14, 175, 161, 0.10); color: var(--teal-700); }
.badge--gold    { background: rgba(201, 162, 39, 0.12); color: var(--gold-700); }
.badge--rose    { background: rgba(224, 85, 108, 0.10); color: var(--rose-500); }
.badge--emerald { background: rgba(33, 191, 115, 0.10); color: var(--emerald-500); }
.badge--indigo  { background: rgba(91, 108, 255, 0.10); color: var(--indigo-500); }
.badge--ink     { background: rgba(15, 23, 42, 0.06); color: var(--ink-700); }
.badge--lg      { padding: 6px 12px; font-size: 12px; }

/* Status pill (con dot pulsante) */
.status {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 999px;
}
.status::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: pulse-status 2s ease-out infinite;
}
.status.s-active   { color: var(--emerald-500); background: rgba(33, 191, 115, 0.10); }
.status.s-pending  { color: var(--gold-500); background: rgba(201, 162, 39, 0.12); }
.status.s-expired  { color: var(--rose-500); background: rgba(224, 85, 108, 0.10); }
.status.s-grace    { color: var(--gold-500); background: rgba(201, 162, 39, 0.12); }
.status.s-paid     { color: var(--teal-700); background: rgba(14, 175, 161, 0.10); }
@keyframes pulse-status {
  0% { box-shadow: 0 0 0 0 currentColor; }
  100% { box-shadow: 0 0 0 6px transparent; }
}

/* ── 16. Flash / Toast ────────────────────────────────────────────── */
.flash {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  z-index: 60;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 18px;
  box-shadow: var(--sh-3);
  font-weight: 500; font-size: 13.5px;
  animation: pop-in var(--d-norm) var(--t-spring), fade-out 380ms ease 4.6s forwards;
  display: flex; align-items: center; gap: 10px;
  max-width: calc(100% - 24px);
}
.flash::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--teal-500); }
.flash.error::before { background: var(--rose-500); }
.flash.success::before { background: var(--emerald-500); }
@keyframes fade-out { to { opacity: 0; transform: translate(-50%, 12px); } }

/* ── 17. Charts wrapper ──────────────────────────────────────────── */
.chart-wrap { position: relative; height: 280px; }
.chart-wrap.h-200 { height: 200px; }
.chart-wrap.h-360 { height: 360px; }

/* ── 18. Auth — Premium 2 columnas (login + register) ────────────── */
.auth-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
  isolation: isolate;
  background: linear-gradient(180deg, #FAFCFE 0%, #F2F6FB 100%);
}
@media (min-width: 980px) {
  .auth-shell { grid-template-columns: 1.05fr 1fr; }
}

/* Panel izquierdo (decorativo: azul premium puro · dorado solo como detalle) */
.auth-art {
  position: relative;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px clamp(32px, 4vw, 64px);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  min-height: 100vh;
  background:
    radial-gradient(110% 90% at 12% 88%, #2148B6 0%, transparent 55%),
    radial-gradient(95% 80% at 88% 14%, #1632A2 0%, transparent 55%),
    linear-gradient(160deg, #0B1F58 0%, #0E2A6E 45%, #0A1B49 100%);
}
@media (min-width: 980px) { .auth-art { display: flex; } }
.auth-art::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(closest-side at 88% 18%, rgba(108, 152, 248, 0.22), transparent 70%),
    radial-gradient(closest-side at 8% 92%, rgba(43, 91, 217, 0.28), transparent 70%);
  pointer-events: none;
}
.auth-art::after {
  content: ''; position: absolute; right: -8%; top: -18%;
  width: 540px; height: 540px; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, rgba(94, 132, 232, 0.22), transparent 70%);
  filter: blur(8px);
}
.auth-art > * { position: relative; z-index: 1; }
.auth-art h2 { color: #fff; }
.auth-art p { color: rgba(255,255,255,0.78); }
.auth-art .badge {
  background: rgba(244, 226, 160, 0.14) !important;
  color: var(--gold-200) !important;
  border: 1px solid rgba(244, 226, 160, 0.30) !important;
}

/* Panel derecho (form) */
.auth-form-wrap {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 48px clamp(20px, 4vw, 56px);
  overflow: hidden;
}
.auth-form-wrap::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 100% 0%, rgba(43, 91, 217, 0.06), transparent 60%),
    radial-gradient(60% 60% at 0% 100%, rgba(22, 58, 158, 0.05), transparent 70%);
  pointer-events: none;
}
.auth-form {
  position: relative;
  width: 100%; max-width: 440px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: clamp(28px, 4vw, 40px);
  box-shadow: 0 20px 50px -28px rgba(15, 23, 42, 0.18);
}
.auth-form h1 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 6px;
}
.auth-sub {
  color: var(--ink-500);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.5;
}
.auth-brand {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
}

/* Brand mobile inside form (visible cuando art se oculta) */
@media (max-width: 979px) {
  .auth-form .auth-brand { display: flex !important; }
}

/* Steps bar (register) — línea fina simple */
.steps-bar {
  display: flex; gap: 8px;
  margin-bottom: 24px;
}
.steps-bar .step {
  flex: 1; height: 2px;
  background: var(--ink-200);
  border-radius: 999px;
  transition: background var(--d-norm) var(--t-ease);
}
.steps-bar .step.active,
.steps-bar .step.done {
  background: var(--blue-600);
}

/* Stepper (alternativo) */
.stepper { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; justify-content: center; }
.stepper .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--ink-100); color: var(--ink-500); }
.stepper .dot.is-active { background: var(--teal-500); color: white; box-shadow: 0 0 0 4px rgba(14, 175, 161, 0.18); }
.stepper .dot.is-done { background: var(--teal-500); color: white; }
.stepper .line { width: 36px; height: 2px; background: var(--ink-200); }
.stepper .line.is-done { background: var(--teal-500); }

/* Auth-card legacy (algunas vistas pueden usarlo) */
.auth-card {
  width: 100%; max-width: 460px;
  margin: auto;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--r-xl);
  padding: 32px clamp(20px, 4vw, 36px);
  box-shadow: 0 30px 60px -22px rgba(15, 23, 42, 0.18);
  position: relative;
  z-index: 1;
}
.auth-head { text-align: center; margin-bottom: 24px; }
.auth-head .brand-mark { margin: 0 auto 12px; width: 52px; height: 52px; border-radius: 16px; }
.auth-head h1 { font-size: 26px; }
.auth-foot { margin-top: 20px; font-size: 13px; color: var(--ink-500); text-align: center; }

/* ── Form fields para auth (input con icono, eye, etc.) ──────────── */
.auth-form .field { margin-bottom: 16px; }
.auth-form .field label {
  display: block;
  font-size: 12.5px; font-weight: 600;
  color: var(--ink-700);
  margin-bottom: 6px;
}
.auth-form .field label small.ash { color: var(--ink-400); font-weight: 500; }
.auth-form .input-wrap { position: relative; }
.auth-form .input,
.auth-form .select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-card);
  font: 500 14px/1.4 var(--font-sans);
  color: var(--ink-900);
  transition: border-color var(--d-fast) var(--t-ease), box-shadow var(--d-fast) var(--t-ease), background var(--d-fast) var(--t-ease);
  -webkit-appearance: none; appearance: none;
}
.auth-form .input.has-icon { padding-left: 42px; padding-right: 44px; }
.auth-form .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.auth-form .input:focus,
.auth-form .select:focus {
  outline: 0;
  border-color: var(--teal-400);
  box-shadow: 0 0 0 4px rgba(14, 175, 161, 0.12);
  background: #fff;
}
.auth-form .input::placeholder { color: var(--ink-400); }
.input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--ink-500);
  pointer-events: none;
}
.input-wrap .input:focus ~ .input-icon { color: var(--teal-600); }
.input-wrap input:focus + .input-action { color: var(--teal-700); }

/* Toggle password button: estilo dentro de auth-form */
.auth-form .input-action {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink-500);
  transition: background var(--d-fast) var(--t-ease), color var(--d-fast) var(--t-ease);
}
.auth-form .input-action:hover { background: var(--ink-100); color: var(--teal-700); }
.auth-form .input-action.show-close .eye-open { display: none; }
.auth-form .input-action.show-close .eye-close { display: block !important; }

/* Row de campos lado a lado */
.row-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) { .row-fields { grid-template-columns: 1fr; } }

/* Checkbox custom (auth) */
.checkbox, .radio {
  display: inline-flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--ink-700);
  cursor: pointer;
  line-height: 1.5;
}
.checkbox input, .radio input {
  width: 18px; height: 18px;
  accent-color: var(--teal-500);
  margin-top: 1px;
  flex-shrink: 0;
}
.checkbox a { color: var(--teal-700); font-weight: 600; }
.checkbox a:hover { text-decoration: underline; }

/* Meta line (remember + forgot) */
.meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  flex-wrap: wrap;
}
.meta-line a { font-weight: 500; }

/* Spacing utilities */
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

/* Gap utilities (px-based) */
.gap-4  { gap: 4px; }
.gap-6  { gap: 6px; }
.gap-8  { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-14 { gap: 14px; }
.gap-16 { gap: 16px; }
.gap-18 { gap: 18px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }

/* Error label */
.err {
  font-size: 12px;
  color: var(--rose-500);
  margin-top: 6px;
  font-weight: 500;
}

/* Botón submit en auth: full + grande */
.auth-form .btn-block { width: 100%; }
.auth-form .btn-lg { height: 50px; font-size: 15px; }

/* Footer link "¿No tienes cuenta?" */
.auth-form .text-center { text-align: center; }
.auth-form .text-turq { color: var(--teal-700); }

/* Mobile: panel art se oculta, panel form ocupa todo */
@media (max-width: 979px) {
  .auth-form-wrap { padding: 28px 18px; }
  .auth-form { box-shadow: var(--sh-3); }
}

/* ── Auth premium: logo + display + stats + trust line (AI-Infinity-style) ── */
.auth-logo {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: #fff;
  position: relative; z-index: 1;
}
.auth-logo-mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color: #fff;
  box-shadow: 0 8px 22px -10px rgba(31, 73, 197, 0.55);
}
.auth-logo-text {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
}
.auth-logo-text strong {
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.18em;
}

.auth-art-body { position: relative; z-index: 1; max-width: 100%; min-width: 0; }
.auth-art > * { min-width: 0; max-width: 100%; }

/* Selectores de auth con especificidad reforzada para ganarle a body.landing h2/h3/p */
body.landing .auth-art .auth-eyebrow,
.auth-art .auth-eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  margin-bottom: 24px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.62);
}
body.landing .auth-art .auth-eyebrow-num,
.auth-art .auth-eyebrow-num {
  color: var(--gold-200);
  font-weight: 700;
  font-feature-settings: "tnum";
}
.auth-art .auth-eyebrow-label {
  position: relative;
  padding-left: 24px;
}
.auth-art .auth-eyebrow-label::before {
  content: ''; position: absolute;
  left: 0; top: 50%;
  width: 14px; height: 1px;
  background: rgba(255,255,255,0.5);
}

body.landing .auth-art h2.auth-display,
.auth-art h2.auth-display,
.auth-display {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.030em;
  color: #FFFFFF;
  margin: 0 0 22px 0;
  text-transform: none;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
  text-wrap: balance;
}
body.landing .auth-art .auth-display-grad,
.auth-art .auth-display-grad {
  /* Mantenemos solo dorado puro como detalle premium (sin mezcla con azul) */
  background: linear-gradient(120deg, #FFE9A6 0%, #F4D88A 50%, #C9A227 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

body.landing .auth-art p.auth-lede,
.auth-art .auth-lede,
.auth-lede {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255,255,255,0.86);
  max-width: 44ch;
  margin: 0 0 32px 0;
}

.auth-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: end;
  max-width: 100%;
}
.auth-stat { min-width: 0; }
body.landing .auth-art .auth-stat-num,
.auth-art .auth-stat-num,
.auth-stat-num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--gold-200);
  line-height: 1;
}
body.landing .auth-art .auth-stat-lbl,
.auth-art .auth-stat-lbl,
.auth-stat-lbl {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-top: 8px;
}

.auth-features {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.auth-features li {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px;
  color: rgba(255,255,255,0.86);
  line-height: 1.45;
}
.auth-features svg { color: var(--gold-300); flex-shrink: 0; }

.auth-trustline {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.50);
}
.auth-trustline svg { vertical-align: -1px; margin-right: 4px; }

/* Form panel premium */
.auth-section-num {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--ink-400);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.auth-h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--ink-900);
  margin: 0 0 8px 0;
}
.auth-h1-grad {
  /* Solo gradient de azules — el dorado se usa solo como detalle aparte */
  background: linear-gradient(110deg, var(--blue-700) 0%, var(--blue-500) 60%, #5C84EC 110%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-brand {
  display: none !important;
  align-items: center; gap: 10px;
  margin-bottom: 24px;
}
.auth-brand-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color: #fff;
}
.auth-brand-text { font-weight: 700; font-size: 14px; letter-spacing: -0.01em; color: var(--ink-900); }

@media (max-width: 979px) {
  .auth-brand { display: inline-flex !important; }
}

/* ── 19. Achievements ─────────────────────────────────────────────── */
.achievements {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.ach {
  position: relative;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  display: flex; align-items: center; gap: 14px;
  transition: transform var(--d-norm) var(--t-spring), box-shadow var(--d-norm) var(--t-ease);
}
.ach:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.ach .badge-ico {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: grid; place-items: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-700));
  color: white;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.20);
}
.ach.is-locked .badge-ico { background: var(--ink-200); color: var(--ink-500); }
.ach h5 { font-size: 13px; font-weight: 700; }
.ach p { font-size: 11px; color: var(--ink-500); }
.ach.is-locked h5, .ach.is-locked p { color: var(--ink-400); }

/* ── 20. Wallet card grande (matriz / saldo destacado) ────────────── */
.balance-card {
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255,255,255,0.16), transparent 50%),
    linear-gradient(135deg, var(--teal-500) 0%, var(--teal-700) 100%);
  color: white;
  border-radius: var(--r-xl);
  padding: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--sh-glow-teal);
}
.balance-card::after {
  content: ''; position: absolute; right: -60px; bottom: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,0.15), transparent 70%);
}
.balance-card .lbl { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.7); font-weight: 700; }
.balance-card .val { font-size: clamp(32px, 5vw, 44px); font-weight: 800; font-family: var(--font-mono); letter-spacing: -0.03em; line-height: 1.1; }
.balance-card .sub { color: rgba(255,255,255,0.8); font-size: 13px; }

/* ── 21. Skeletons ────────────────────────────────────────────────── */
.skel {
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent) 0 0/200% 100% no-repeat,
    var(--ink-100);
  border-radius: 8px;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer { to { background-position: 200% 0; } }

/* ── 22. Reveal / Stagger / Counters ─────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--d-slow) var(--t-spring), transform var(--d-slow) var(--t-spring);
  will-change: transform, opacity;
}
[data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}
[data-stagger] > * { animation: stagger-in var(--d-slow) var(--t-spring) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes stagger-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.float-y { animation: float-y 6s ease-in-out infinite alternate; will-change: transform; }
@keyframes float-y { from { transform: translateY(0); } to { transform: translateY(-8px); } }

/* ── 23. Impersonation ───────────────────────────────────────────── */
.impersonation-banner {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-700));
  color: white;
  font-size: 13px; font-weight: 600;
  text-align: center;
  padding: 8px 16px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  flex-wrap: wrap;
}
.impersonation-banner a { text-decoration: underline; }

/* ── 24. Responsive ──────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bento .b-3 { grid-column: span 6; }
  .bento .b-4 { grid-column: span 6; }
  .bento .b-5 { grid-column: span 6; }
  .bento .b-7 { grid-column: span 12; }
  .bento .b-8 { grid-column: span 12; }
}
@media (max-width: 900px) {
  :root { --sidebar-w: 0; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0;
    width: 86%; max-width: 320px;
    height: 100dvh;
    transform: translateX(-100%);
    transition: transform var(--d-norm) var(--t-spring);
    box-shadow: 0 30px 60px -20px rgba(11, 18, 32, 0.4);
  }
  body.is-drawer-open .sidebar { transform: translateX(0); }
  .menu-toggle { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: white; border: 1px solid var(--border); color: var(--ink-700); }
  .menu-close { display: grid; }
  .topbar .brand-compact { display: flex; }
  .topbar .gsearch { display: none; }
  .show-mobile { display: initial; }
  .show-desktop { display: none; }
  .topbar .btn-deposit span { display: none; }
  .bottom-cap { display: block; }
  .page { padding: 20px 16px calc(var(--bottom-h) + 36px); }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  body { font-size: 14.5px; }
  .card { padding: 18px; border-radius: var(--r-md); }
  .card-pad-lg { padding: 22px; }
  .kpi { padding: 18px; }
  .kpi-value { font-size: 22px; }
  .renewal { padding: 18px; }
  .countdown .seg { min-width: 48px; padding: 6px 8px; }
  .countdown .seg b { font-size: 18px; }
}
@media (max-width: 380px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .countdown .seg { min-width: 44px; }
}

/* ── 25. Reduced motion / Low power ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 80ms !important; scroll-behavior: auto !important; }
  .ambient::before, .ambient::after, .particles, .float-y { animation: none !important; }
}
body.low-power .ambient,
body.low-power .particles,
body.low-power .float-y,
body.low-power .card.sweep::before,
body.low-power .kpi::before,
body.low-power .brand-mark::before,
body.low-power .renewal::before { display: none !important; animation: none !important; }
body.low-power [data-reveal] { opacity: 1 !important; transform: none !important; }

/* ── 26. Scrollbar style ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.12); border-radius: 6px; border: 2px solid var(--bg-app); }
::-webkit-scrollbar-thumb:hover { background: rgba(15, 23, 42, 0.18); }

/* ── 27. Print clean ─────────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .bottom-cap, .ambient, .particles, .impersonation-banner { display: none !important; }
  .page { padding: 0; }
}

/* ── 28. Dashboard hero específico ──────────────────────────────── */
.dash-hero {
  display: grid; grid-template-columns: 1fr; gap: 18px;
}
.dash-hero h1 { font-size: clamp(26px, 4vw, 38px); }
.dash-hero .lead { color: var(--ink-500); font-size: 14.5px; max-width: 60ch; }
.dash-hero .cta-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── 29. Tag plan / membership ───────────────────────────────────── */
.plan-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 20px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.plan-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--blue-600, #2B5BD9); }
.plan-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-700));
  color: white; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
}
.plan-meta { flex: 1 1 auto; min-width: 180px; }
.plan-meta b { font-size: 16px; }
.plan-meta small { color: var(--ink-500); font-size: 12px; }

/* ── 30. Misc helpers ─────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.dot-sep::before { content: '·'; margin: 0 6px; color: var(--ink-400); }
.tag-list { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 11px; padding: 4px 10px; background: var(--ink-100); color: var(--ink-700);
  border-radius: 999px;
}
.empty {
  text-align: center; padding: 48px 24px;
  color: var(--ink-500);
}
.empty .ic-wrap {
  width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 14px;
  background: rgba(31, 73, 197, 0.08);
  color: var(--blue-700, #1849C5); display: grid; place-items: center;
}

/* Hash link explorer */
.hash-link {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--teal-700);
  display: inline-flex; align-items: center; gap: 4px;
}
.hash-link:hover { text-decoration: underline; }

/* Action row sticky on mobile (forms) */
.action-row {
  display: flex; gap: 10px; flex-wrap: wrap;
  padding-top: 12px;
}
.action-row .btn { flex: 1 1 auto; }
@media (max-width: 560px) {
  .action-row .btn { width: 100%; }
}

/* ════════════════════════════════════════════════════════════════════
 * 31. LEGACY COMPATIBILITY LAYER — Mapea tokens y clases viejas
 *     a los modernos para que las vistas existentes se vean bien
 *     sin tocar 30+ archivos Twig.
 * ════════════════════════════════════════════════════════════════════ */
:root {
  /* Tokens fantasma que usaban las vistas antiguas */
  --c-snow:           var(--ink-50);
  --c-fog:            var(--ink-100);
  --c-mist:           var(--ink-200);
  --c-ash:            var(--ink-500);
  --c-charcoal:       var(--ink-700);
  --c-ink:            var(--ink-800);
  --c-near-black:     var(--ink-950);

  --c-teal-50:        var(--teal-50);
  --c-teal-100:       var(--teal-100);
  --c-teal-200:       var(--teal-200);
  --c-teal-300:       var(--teal-300);
  --c-teal-400:       var(--teal-400);
  --c-teal-500:       var(--teal-500);
  --c-teal-600:       var(--teal-600);
  --c-teal-700:       var(--teal-700);
  --c-teal-800:       var(--teal-800);
  --c-teal-900:       var(--teal-900);
  --c-turquoise-soft: var(--teal-50);
  --c-turquoise-dark: var(--teal-700);
  --c-turquoise-deeper: var(--teal-700);

  --c-gold-50:        var(--gold-50);
  --c-gold-100:       var(--gold-100);
  --c-gold-200:       var(--gold-200);
  --c-gold-300:       var(--gold-300);
  --c-gold-500:       var(--gold-500);
  --c-gold-700:       var(--gold-700);
  --c-gold-soft:      var(--gold-50);
  --c-gold-deep:      var(--gold-700);

  --c-blue-50:        #EFF4FB;
  --c-blue-100:       #DEEAF6;
  --c-blue-200:       #B6CFE8;
  --c-blue-500:       #4A78AB;
  --c-blue-700:       #2D5A87;
  --c-blue-900:       #1A3A5C;
  --c-blue-ink:       #0F2138;
  --c-blue-soft:      #EFF4FB;
  --c-blue-deep:      #2D5A87;

  --c-success:        var(--emerald-500);
  --c-warning:        var(--gold-500);
  --c-danger:         var(--rose-500);

  --grad-teal:        linear-gradient(135deg, var(--teal-500), var(--teal-700));
  --grad-turquoise:   linear-gradient(135deg, var(--teal-500), var(--teal-700));
  --grad-gold:        linear-gradient(135deg, var(--gold-300), var(--gold-700));
  --grad-card-glow:   radial-gradient(80% 80% at 50% 100%, rgba(14, 175, 161, 0.06), transparent 60%);

  --radius:           var(--r-md);
  --radius-lg:        var(--r-lg);
  --radius-xl:        var(--r-xl);
  --radius-2xl:       var(--r-2xl);
  --radius-pill:      var(--r-full);

  --shadow-sm:        var(--sh-1);
  --shadow:           var(--sh-2);
  --shadow-lg:        var(--sh-3);
  --shadow-xl:        var(--sh-4);

  --t-fast:           var(--d-fast) var(--t-ease);
  --t-base:           var(--d-norm) var(--t-spring);
  --t-slow:           var(--d-slow) var(--t-spring);
}

/* ── Page header (legacy) ────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 6px;
}
.page-header h1 {
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 6px 0 8px;
}
.page-header p {
  color: var(--ink-500);
  font-size: 14.5px;
  max-width: 64ch;
  line-height: 1.55;
}

/* ── Card-hd (legacy header de cards) ────────────────────────────── */
.card-hd {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.card-hd h3 {
  font-size: 17px; font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0;
}
.card-hd .card-sub { color: var(--ink-500); font-size: 13px; margin-top: 2px; }

/* ── Card extras ─────────────────────────────────────────────────── */
.card.flat, .card.card-flat {
  background: var(--bg-card);
  box-shadow: none;
}
.card.flat:hover, .card.card-flat:hover {
  transform: none;
  box-shadow: var(--sh-2);
  border-color: var(--teal-300);
}
.card.gold-tinted {
  background:
    radial-gradient(70% 80% at 100% 0%, rgba(201, 162, 39, 0.10), transparent 60%),
    var(--bg-card);
  border-color: rgba(201, 162, 39, 0.18);
}
.card.glow {
  background:
    radial-gradient(60% 60% at 0% 0%, rgba(14, 175, 161, 0.08), transparent 60%),
    var(--bg-card);
}
.card.sweep-top.sweep-gold::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
  animation: sweep 5s linear infinite;
}

/* ── Animation helpers (legacy) ──────────────────────────────────── */
.anim-fade-up {
  animation: anim-fade-up 700ms var(--t-spring) both;
}
@keyframes anim-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.delay-1 { animation-delay: 80ms; }
.delay-2 { animation-delay: 160ms; }
.delay-3 { animation-delay: 240ms; }
.delay-4 { animation-delay: 320ms; }
.delay-5 { animation-delay: 400ms; }
@media (prefers-reduced-motion: reduce) {
  .anim-fade-up, .delay-1, .delay-2, .delay-3, .delay-4, .delay-5 {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
body.low-power .anim-fade-up,
body.low-power .delay-1,
body.low-power .delay-2,
body.low-power .delay-3,
body.low-power .delay-4,
body.low-power .delay-5 {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* ── Grid utilities ──────────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
@media (max-width: 640px) { .grid-2 { gap: 14px; } }

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap, 16px);
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap, 16px);
}
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
}

/* ── Stack ───────────────────────────────────────────────────────── */
.stack {
  display: flex; flex-direction: column;
  gap: var(--gap, 14px);
}

/* ── Text helpers (legacy) ───────────────────────────────────────── */
.text-turq, .text-teal { color: var(--teal-700); }
.text-gold { color: var(--gold-700); }
.text-blue { color: var(--c-blue-700); }
.text-success { color: var(--emerald-500); }
.text-danger  { color: var(--rose-500); }
.text-warning { color: var(--gold-500); }
.text-charcoal { color: var(--ink-700); }
.text-ash { color: var(--ink-500); }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.text-right { text-align: right; }
.text-center, .text-c { text-align: center; }
.font-mono, .num, .numeric { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.h2 { font-size: clamp(22px, 3vw, 32px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }
.h3 { font-size: clamp(18px, 2.4vw, 22px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.ash { color: var(--ink-500); }

/* ── Badge legacy classes (sin -- prefix) ────────────────────────── */
.badge.turq, .badge.teal     { background: rgba(14, 175, 161, 0.10); color: var(--teal-700); }
.badge.gold                  { background: rgba(201, 162, 39, 0.12); color: var(--gold-700); }
.badge.success, .badge.live  { background: rgba(33, 191, 115, 0.10); color: var(--emerald-500); }
.badge.danger                { background: rgba(224, 85, 108, 0.10); color: var(--rose-500); }
.badge.warning               { background: rgba(201, 162, 39, 0.14); color: var(--gold-700); }
.badge.blue                  { background: rgba(45, 90, 135, 0.10); color: var(--c-blue-700); }
.badge.live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  margin-right: 2px;
  box-shadow: 0 0 0 0 currentColor;
  animation: pulse-status 2s ease-out infinite;
}

/* ── Tables legacy ────────────────────────────────────────────────── */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-card);
  overflow: hidden auto;
  margin-top: 8px;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.table thead th {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-500); font-weight: 700;
  text-align: left;
  padding: 14px 16px;
  background: var(--ink-50);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--ink-700);
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--bg-soft); }
.table .text-right { text-align: right; }
.table .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Tablas: scroll horizontal en mobile, sin romper layout */
@media (max-width: 640px) {
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table { min-width: 560px; }
}

/* ── Inputs / forms legacy ────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; color: var(--ink-700); }
.field .hint, .hint { font-size: 11px; color: var(--ink-500); margin-top: 2px; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 44px; }
.input-action {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 8px; border: 0; background: transparent; cursor: pointer;
  color: var(--ink-500);
  transition: background var(--d-fast) var(--t-ease), color var(--d-fast) var(--t-ease);
}
.input-action:hover { background: var(--ink-100); color: var(--teal-700); }

/* Spinner ───────────────────────────────────────────────────────── */
.spinner {
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  vertical-align: -2px;
  margin-right: 6px;
  animation: sp 0.8s linear infinite;
}
@keyframes sp { to { transform: rotate(360deg); } }

/* ── Buttons legacy ───────────────────────────────────────────────── */
.btn-block { width: 100%; }
.btn-success { background: var(--emerald-500); color: #fff; }
.btn-success:hover { background: #1AAF66; transform: translateY(-1px); }
.btn-warning { background: var(--gold-500); color: #fff; }

/* ── Matrix tile (PASA visualizer) ───────────────────────────────── */
.matrix-tile {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  transition: transform var(--d-norm) var(--t-spring), box-shadow var(--d-norm) var(--t-ease), border-color var(--d-norm) var(--t-ease);
}
.matrix-tile:hover { transform: translateY(-2px); box-shadow: var(--sh-3); }
.matrix-tile::before {
  content: ''; position: absolute; left: 0; top: 0; height: 2px; width: 30%;
  background: linear-gradient(90deg, transparent, var(--ink-300), transparent);
  animation: sweep 5s linear infinite;
}
.matrix-tile.in-progress { border-color: rgba(201, 162, 39, 0.30); }
.matrix-tile.in-progress::before { background: linear-gradient(90deg, transparent, var(--gold-500), transparent); }
.matrix-tile.complete    { border-color: rgba(33, 191, 115, 0.30); background: linear-gradient(160deg, rgba(33, 191, 115, 0.04), var(--bg-card)); }
.matrix-tile.complete::before { background: linear-gradient(90deg, transparent, var(--emerald-500), transparent); }
.mt-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mt-title { font-weight: 700; font-size: 13px; letter-spacing: -0.01em; }
.matrix-tile .slots {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}
.matrix-tile .slot {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 11px;
  background: var(--ink-100); color: var(--ink-500);
  border: 2px solid transparent;
  text-align: center;
  padding: 4px;
  transition: transform var(--d-fast) var(--t-spring);
}
.matrix-tile .slot small { font-size: 8px; opacity: 0.7; display: block; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.matrix-tile .slot.passup { border-style: dashed; border-color: var(--gold-300); background: var(--gold-50); color: var(--gold-700); }
.matrix-tile .slot.filled { background: linear-gradient(135deg, var(--teal-500), var(--teal-700)); color: #fff; box-shadow: var(--sh-glow-teal); }
.matrix-tile .slot.filled.passup { background: linear-gradient(135deg, var(--gold-300), var(--gold-700)); color: #fff; }
.matrix-tile .slot:hover { transform: scale(1.03); }

/* ── Page subtitle/eyebrow legacy ────────────────────────────────── */
/* (eyebrow ya existe en sección 2) */

/* ── Lead text ────────────────────────────────────────────────────── */
.lead { color: var(--ink-500); font-size: 14.5px; line-height: 1.55; }

/* ── Page-header tweak en mobile (más espacio) ───────────────────── */
@media (max-width: 760px) {
  .page-header { gap: 14px; }
  .page-header h1 { font-size: 24px; }
  .page-header .row { width: 100%; }
}

/* ════════════════════════════════════════════════════════════════════
 * 32. SHELL VISUAL UPGRADE — Mejoras premium del topbar/sidebar/bottom
 * ════════════════════════════════════════════════════════════════════ */

/* Sidebar — overrides desactivados, ya no se mezclan colores en el bg.
   El estilo definitivo vive en la sección 5 más arriba. */

/* Topbar — search más visible y un saldo flotante */
.topbar {
  height: 64px;
  gap: 14px;
}
.gsearch input {
  height: 44px;
  border-radius: 14px;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(15, 23, 42, 0.06);
}
.gsearch input:focus {
  background: white;
  border-color: var(--teal-300);
  box-shadow: 0 0 0 4px rgba(14, 175, 161, 0.10), 0 6px 20px -8px rgba(14, 175, 161, 0.18);
}
.gsearch .ic-search { color: var(--ink-500); }
.gsearch .kbd {
  background: var(--ink-100);
  font-weight: 600;
}

/* Bottom-cap — mejor presencia, no se monta sobre contenido */
.bottom-cap-inner {
  background: #0F1F2A;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 24px 48px -16px rgba(11, 18, 32, 0.55),
    0 8px 24px -10px rgba(14, 175, 161, 0.30);
  padding: 7px;
}
.bottom-cap-inner a { height: 50px; }
.bottom-cap-inner a.is-active {
  background: var(--blue-600, #2B5BD9);
  box-shadow: 0 8px 18px -6px rgba(43, 91, 217, 0.55);
  transform: translateY(-2px);
}
@media (max-width: 900px) {
  .page { padding: 16px 16px calc(var(--bottom-h) + 32px); }
}

/* ════════════════════════════════════════════════════════════════════
 * 33. DASHBOARD HERO — Balance grande tipo OripoFin
 * ════════════════════════════════════════════════════════════════════ */
.dash-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 4px;
}
.dash-hero h1 {
  font-size: clamp(28px, 4.4vw, 42px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-weight: 800;
}
.dash-hero h1 .gradient-text {
  background: linear-gradient(120deg, var(--blue-500, #2B5BD9), var(--blue-700, #1849C5));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Balance card grande mejorado */
.balance-card {
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255,255,255,0.20), transparent 50%),
    radial-gradient(80% 100% at 100% 100%, rgba(201, 162, 39, 0.18), transparent 60%),
    linear-gradient(135deg, var(--teal-500) 0%, var(--teal-700) 60%, #0E2D2A 110%);
  position: relative;
  overflow: hidden;
}
.balance-card::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  mask-image: radial-gradient(120% 100% at 50% 0%, black 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, black 0%, transparent 80%);
}

/* KPIs upgrade: featured más grande y prominente */
.kpi--featured {
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255,255,255,0.20), transparent 50%),
    radial-gradient(80% 100% at 100% 100%, rgba(201, 162, 39, 0.16), transparent 60%),
    linear-gradient(135deg, var(--teal-500) 0%, var(--teal-700) 70%, #0E2D2A 120%);
  position: relative;
  overflow: hidden;
}
.kpi--featured::after {
  content: ''; position: absolute; right: -60px; bottom: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,0.12), transparent 70%);
  pointer-events: none;
}
.kpi--featured .kpi-value { color: #fff; font-size: clamp(28px, 3.6vw, 36px); }

/* Bento dashboard — mejorar gap y density */
.bento { gap: 18px; }

/* Renewal banner: más impactante */
.renewal {
  border-radius: var(--r-2xl);
  padding: 24px 28px;
  background:
    radial-gradient(140% 140% at 0% 0%, rgba(14, 175, 161, 0.34), transparent 55%),
    radial-gradient(100% 100% at 100% 100%, rgba(201, 162, 39, 0.30), transparent 60%),
    linear-gradient(135deg, #0B2A28 0%, #08191A 60%, #0E2D2A 110%);
  box-shadow: 0 30px 60px -28px rgba(11, 142, 132, 0.4);
}
.renewal h3 { font-size: 18px; }

/* Achievements upgrade: gradient backgrounds */
.ach {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(14, 175, 161, 0.04) 100%);
  border-radius: var(--r-md);
}
.ach .badge-ico {
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.20),
    0 8px 14px -6px rgba(201, 162, 39, 0.40);
}
.ach.is-locked {
  background: var(--ink-50);
  border-color: var(--border);
  opacity: 0.65;
}
.ach.is-locked .badge-ico { box-shadow: none; }

/* ── Step card upgrade (primeros pasos) ──────────────────────────── */
/* Sweep multicolor en steps DESACTIVADO. El borde superior animado vive
   en la sección 28 con un único color sólido azul (mono-tono). */

/* ── Flash toast más bonito ───────────────────────────────────────── */
.flash {
  border-radius: 16px;
  padding: 14px 22px;
  border: 1px solid rgba(15,23,42,0.06);
  font-size: 13.5px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px);
}

/* ── Page header mobile: más pequeño y CTAs full width ──────────── */
@media (max-width: 560px) {
  .page-header h1 { font-size: 22px; }
  .page-header p { font-size: 13.5px; }
  .page-header .row .btn { flex: 1 1 auto; }
}

/* ════════════════════════════════════════════════════════════════════
 * 34. WALLET — Hero dark + 4 tiles premium con sweep distintos
 * ════════════════════════════════════════════════════════════════════ */
.wallet-hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-2xl);
  padding: clamp(28px, 4vw, 40px);
  margin-top: 16px;
  color: #fff;
  box-shadow: 0 30px 60px -28px rgba(11, 28, 49, 0.5);
}
.wallet-hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(31, 73, 197, 0.42), transparent 60%),
    radial-gradient(90% 100% at 100% 100%, rgba(201, 162, 39, 0.20), transparent 60%),
    linear-gradient(135deg, #07153D 0%, #0E2F8A 50%, #0A1F62 100%);
}
.wallet-hero-bg::before {
  content: none;
}
.wallet-hero-bg::after {
  content: ''; position: absolute; right: -10%; top: -40%;
  width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(201,162,39,0.18), transparent 70%);
  pointer-events: none;
}
.wallet-hero-content { position: relative; z-index: 1; }
.wallet-hero-eyebrow {
  font-size: 10px; letter-spacing: 0.20em; text-transform: uppercase;
  color: rgba(255,255,255,0.65); font-weight: 700;
  margin-bottom: 12px;
}
.wallet-hero-amount {
  font-family: var(--font-display);
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 12px;
  color: #fff;
}
.wallet-hero-meta {
  display: inline-flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px; color: rgba(255,255,255,0.78);
  margin-bottom: 20px;
}
.wallet-hero-meta svg { color: var(--emerald-500); }
.wallet-hero-meta .dot-sep::before { content: '·'; margin: 0 0; color: rgba(255,255,255,0.4); }
.wallet-hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-on-dark {
  background: linear-gradient(135deg, #fff 0%, #F2F6FB 100%);
  color: var(--ink-900);
  box-shadow: var(--sh-2);
}
.btn-on-dark:hover { background: #fff; transform: translateY(-1px); box-shadow: var(--sh-3); }
.btn-on-dark-outline {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.20);
}
.btn-on-dark-outline:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.40); color: #fff; transform: translateY(-1px); }

.wallet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
@media (max-width: 560px) {
  .wallet-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}
@media (max-width: 380px) {
  .wallet-grid { grid-template-columns: 1fr; }
}

.wallet-tile {
  position: relative; overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform var(--d-norm) var(--t-spring), box-shadow var(--d-norm) var(--t-ease), border-color var(--d-norm) var(--t-ease);
  min-height: 130px;
}
.wallet-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-3);
  border-color: rgba(14, 175, 161, 0.22);
}
.wallet-tile::before {
  content: ''; position: absolute; left: 0; top: 0; height: 2px; width: 30%;
  animation: sweep 5s linear infinite;
}
.wt-teal::before    { background: linear-gradient(90deg, transparent, var(--teal-500), transparent); animation-duration: 4.5s; }
.wt-gold::before    { background: linear-gradient(90deg, transparent, var(--gold-500), transparent); animation-duration: 5.5s; animation-delay: 0.8s; }
.wt-blue::before    { background: linear-gradient(90deg, transparent, var(--c-blue-500), transparent); animation-duration: 6.5s; animation-delay: 1.6s; }
.wt-emerald::before { background: linear-gradient(90deg, transparent, var(--emerald-500), transparent); animation-duration: 5s; animation-delay: 2.4s; }

.wt-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.wt-label {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-500); font-weight: 700;
}
.wt-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.wt-teal .wt-icon    { background: rgba(14, 175, 161, 0.10); color: var(--teal-700); }
.wt-gold .wt-icon    { background: rgba(201, 162, 39, 0.12); color: var(--gold-700); }
.wt-blue .wt-icon    { background: rgba(45, 90, 135, 0.10); color: var(--c-blue-700); }
.wt-emerald .wt-icon { background: rgba(33, 191, 115, 0.10); color: var(--emerald-500); }
.wt-amount {
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink-950);
  word-break: break-word;
}
.wt-teal .wt-amount    { color: var(--teal-700); }
.wt-gold .wt-amount    { color: var(--gold-700); }
.wt-blue .wt-amount    { color: var(--c-blue-700); }
.wt-emerald .wt-amount { color: var(--emerald-500); }
.wt-sub {
  font-size: 12px; color: var(--ink-500); line-height: 1.45;
}

/* ════════════════════════════════════════════════════════════════════
 * 35. Reduced motion / low-power para wallet sweep
 * ════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .wallet-tile::before, .step::before, .matrix-tile::before { animation: none !important; }
}
body.low-power .wallet-tile::before,
body.low-power .step::before,
body.low-power .matrix-tile::before { animation: none !important; }

/* ════════════════════════════════════════════════════════════════════
 * 36. Segmented control (tabs sub-section)
 * ════════════════════════════════════════════════════════════════════ */
.seg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--ink-50, #F2F6FB);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--sh-1);
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.seg::-webkit-scrollbar { display: none; }
.seg-item {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  color: var(--ink-600);
  white-space: nowrap;
  transition: background 200ms ease, color 200ms ease, box-shadow 200ms ease;
}
.seg-item:hover { color: var(--ink-900); background: rgba(255,255,255,0.6); }
.seg-item.is-active {
  background: #fff;
  color: var(--blue-700, #1849C5);
  box-shadow: 0 1px 3px rgba(15,23,42,0.10), inset 0 0 0 1px rgba(31,73,197,0.12);
}

/* ════════════════════════════════════════════════════════════════════
 * 37. MATRIX TREE — Boceto: avatar dueño + 4 posiciones conectadas
 * ════════════════════════════════════════════════════════════════════ */
.mtree-card {
  position: relative;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px 22px 18px;
  box-shadow: var(--sh-1);
  overflow: hidden;
  transition: transform 220ms var(--t-spring), box-shadow 220ms var(--t-ease);
}
.mtree-card:hover { transform: translateY(-2px); box-shadow: var(--sh-3); }
.mtree-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue-500, #2B5BD9), transparent);
  background-size: 200% 100%;
  animation: shimmer 6s linear infinite;
  opacity: 0.55;
}
.mtree-card.is-progress::before { background: linear-gradient(90deg, transparent, var(--gold-500), transparent); background-size: 200% 100%; }
.mtree-card.is-complete {
  background: linear-gradient(160deg, rgba(33,191,115,0.05), var(--bg-card, #fff));
  border-color: rgba(33,191,115,0.32);
}
.mtree-card.is-complete::before { background: linear-gradient(90deg, transparent, var(--emerald-500, #21BF73), transparent); background-size: 200% 100%; }

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

/* Header de la card matriz */
.mtree-card-hd {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.mtree-card-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: color-mix(in srgb, var(--c, #2B5BD9) 8%, white);
  border: 1px solid color-mix(in srgb, var(--c, #2B5BD9) 20%, transparent);
  border-radius: 999px;
  color: color-mix(in srgb, var(--c, #2B5BD9) 90%, black);
  font-weight: 600; font-size: 12px;
  letter-spacing: 0.01em;
}
.mtree-card-tag-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c, #2B5BD9);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, #2B5BD9) 18%, transparent);
}
.mtree-card-info {
  display: flex; align-items: baseline; gap: 8px;
}
.mtree-card-cycle {
  font-weight: 700; font-size: 15px; color: var(--ink-900);
  letter-spacing: -0.01em;
}
.mtree-card-count {
  font-size: 12px; color: var(--ink-500); font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.mtree-status {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.12em;
}
.mtree-status-empty { background: var(--ink-50, #F2F6FB); color: var(--ink-500); }
.mtree-status-active {
  background: linear-gradient(135deg, rgba(201,162,39,0.12), rgba(201,162,39,0.04));
  color: var(--gold-700, #8C6F1A);
  box-shadow: inset 0 0 0 1px rgba(201,162,39,0.22);
}
.mtree-status-complete {
  background: linear-gradient(135deg, rgba(33,191,115,0.14), rgba(33,191,115,0.04));
  color: #117A4A;
  box-shadow: inset 0 0 0 1px rgba(33,191,115,0.28);
}
.mtree-status-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 0 0 rgba(201,162,39,0.55);
  animation: pulse-dot 1.6s ease-out infinite;
}
@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(201,162,39,0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(201,162,39,0); }
  100% { box-shadow: 0 0 0 0 rgba(201,162,39,0); }
}

/* Tree visual */
.mtree {
  position: relative;
  padding: 12px 4px 8px;
}
.mtree-root-wrap {
  display: flex; justify-content: center;
  margin-bottom: 4px;
}
.mtree-lines {
  display: block;
  width: 100%;
  height: 50px;
  margin: 4px 0 8px;
  pointer-events: none;
}
.mtree-lines path {
  fill: none;
  stroke: var(--ink-200, #DCE3EC);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 4 4;
}
.mtree-card.is-progress .mtree-lines path { stroke: rgba(201,162,39,0.55); stroke-dasharray: none; }
.mtree-card.is-complete .mtree-lines path { stroke: rgba(33,191,115,0.55); stroke-dasharray: none; }

.mtree-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  align-items: start;
}

/* Bubble (avatar circular con etiqueta debajo) */
.mt-bubble {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: 6px;
  padding: 6px 4px 10px;
  border-radius: 16px;
  transition: transform 220ms var(--t-spring);
}
.mt-bubble:hover { transform: translateY(-2px); }
.mt-bubble-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink-50, #F2F6FB);
  color: var(--ink-400);
  border: 2px solid var(--border);
  font-weight: 700; font-size: 16px;
  letter-spacing: -0.01em;
  position: relative;
}
.mt-bubble-initials { font-variant: small-caps; }

/* Estados */
.mt-bubble.is-root .mt-bubble-avatar {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--blue-500, #2B5BD9), var(--blue-700, #1849C5));
  color: #fff;
  border-color: rgba(255,255,255,0.6);
  box-shadow:
    0 6px 20px -6px rgba(31,73,197,0.45),
    inset 0 0 0 3px rgba(255,255,255,0.18);
}
.mt-bubble.is-root::after {
  content: ''; position: absolute; inset: -3px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: conic-gradient(from 0deg, var(--blue-400), var(--gold-400), var(--blue-400)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: spin-ring 8s linear infinite;
  opacity: 0.6;
  pointer-events: none;
  width: 70px; height: 70px;
  left: 50%; transform: translateX(-50%);
  top: 0;
}
.mt-bubble.is-mine.is-filled .mt-bubble-avatar {
  background: linear-gradient(135deg, var(--blue-500, #2B5BD9), var(--blue-700, #1849C5));
  color: #fff;
  border-color: rgba(31,73,197,0.25);
  box-shadow: 0 6px 14px -6px rgba(31,73,197,0.45);
}
.mt-bubble.is-passup.is-filled .mt-bubble-avatar {
  background: linear-gradient(135deg, var(--gold-400, #DEB857), var(--gold-700, #8C6F1A));
  color: #fff;
  border-color: rgba(201,162,39,0.25);
  box-shadow: 0 6px 14px -6px rgba(201,162,39,0.45);
}
.mt-bubble.is-mine.is-empty .mt-bubble-avatar {
  border-style: dashed;
  border-color: rgba(31,73,197,0.30);
  background: rgba(31,73,197,0.04);
  color: rgba(31,73,197,0.4);
}
.mt-bubble.is-passup.is-empty .mt-bubble-avatar {
  border-style: dashed;
  border-color: rgba(201,162,39,0.32);
  background: rgba(201,162,39,0.05);
  color: rgba(201,162,39,0.5);
}
.mt-bubble.is-corp .mt-bubble-avatar::after {
  content: 'C'; position: absolute; bottom: -2px; right: -2px;
  width: 18px; height: 18px;
  background: var(--blue-700);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  font-size: 9px; font-weight: 800;
  display: grid; place-items: center;
}

.mt-bubble-meta {
  display: flex; flex-direction: column; align-items: center;
  gap: 1px;
  text-align: center;
  min-width: 0;
}
.mt-bubble-pos {
  font-size: 10px; font-weight: 800; letter-spacing: 0.12em;
  color: var(--ink-400);
  text-transform: uppercase;
}
.mt-bubble-name {
  font-size: 11px; font-weight: 600;
  color: var(--ink-700);
  max-width: 88px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mt-bubble-name.muted { color: var(--ink-400); font-weight: 500; }

.mt-bubble-tag {
  position: absolute; top: 0; right: 50%;
  transform: translate(50%, -6px);
  font-size: 9px; font-weight: 800;
  letter-spacing: 0.10em;
  padding: 2px 6px;
  border-radius: 6px;
  background: #fff;
  pointer-events: none;
  white-space: nowrap;
}
.mt-bubble-tag.tag-passup { color: var(--gold-700, #8C6F1A); border: 1px solid rgba(201,162,39,0.32); }
.mt-bubble-tag.tag-mine   { color: var(--blue-700, #1849C5); border: 1px solid rgba(31,73,197,0.22); }
.mt-bubble.is-empty .mt-bubble-tag { opacity: 0.55; }

/* Footer de card matriz */
.mtree-card-ft {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.mtree-card-ft-stat { display: flex; flex-direction: column; gap: 2px; }
.mtree-card-ft-label { font-size: 10px; font-weight: 700; letter-spacing: 0.10em; color: var(--ink-400); text-transform: uppercase; }
.mtree-card-ft-value { font-size: 14px; font-weight: 700; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.mtree-card-ft-value-strong { color: var(--blue-700, #1849C5); }

/* Mobile layout matriz */
@media (max-width: 560px) {
  .mtree-card { padding: 18px 14px 14px; border-radius: 18px; }
  .mtree-card-hd { gap: 8px; }
  .mtree-card-info { width: 100%; order: 3; justify-content: space-between; margin-top: 4px; }
  .mtree-status { margin-left: 0; }
  .mtree-row { gap: 6px; }
  .mt-bubble-avatar { width: 44px; height: 44px; font-size: 14px; }
  .mt-bubble.is-root .mt-bubble-avatar { width: 56px; height: 56px; font-size: 17px; }
  .mt-bubble.is-root::after { width: 62px; height: 62px; }
  .mt-bubble-name { max-width: 70px; font-size: 10px; }
  .mt-bubble-tag { font-size: 8px; padding: 1px 5px; }
  .mtree-card-ft-value { font-size: 13px; }
}

/* ════════════════════════════════════════════════════════════════════
 * 38. PASS-UP rows — Boceto: $monto + avatar | progress | estado
 * ════════════════════════════════════════════════════════════════════ */
.pup-list { display: flex; flex-direction: column; gap: 12px; }
.pup-row {
  display: grid;
  grid-template-columns: 220px 1fr 130px;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--sh-1);
  position: relative;
  overflow: hidden;
  transition: transform 220ms var(--t-spring), box-shadow 220ms var(--t-ease);
}
.pup-row:hover { transform: translateY(-1px); box-shadow: var(--sh-3); }
.pup-row::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--ink-200, #DCE3EC);
}
.pup-row.is-progress::before { background: linear-gradient(180deg, var(--gold-400), var(--gold-700)); }
.pup-row.is-complete::before { background: linear-gradient(180deg, var(--emerald-500), #117A4A); }

/* Columna 1: source */
.pup-source { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pup-source-amount {
  flex-shrink: 0;
  width: 64px; height: 64px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--c, #2B5BD9) 14%, white),
    color-mix(in srgb, var(--c, #2B5BD9) 4%, white));
  border: 1px solid color-mix(in srgb, var(--c, #2B5BD9) 22%, transparent);
  color: color-mix(in srgb, var(--c, #2B5BD9) 90%, black);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.pup-source-meta { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pup-source-name { font-weight: 700; font-size: 14px; color: var(--ink-900); }
.pup-source-pkg { font-size: 11px; color: var(--ink-500); }

/* Columna 2: progress */
.pup-progress { min-width: 0; }
.pup-progress-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 6px;
}
.pup-progress-label {
  font-size: 10px; font-weight: 800; letter-spacing: 0.10em;
  color: var(--ink-400); text-transform: uppercase;
}
.pup-progress-count {
  font-size: 12px; font-weight: 700; color: var(--ink-700);
  font-variant-numeric: tabular-nums;
}
.pup-progress-track {
  height: 4px; background: var(--ink-50, #F2F6FB);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}
.pup-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-400), var(--gold-700));
  border-radius: 999px;
  transition: width 600ms var(--t-spring);
}
.pup-row.is-complete .pup-progress-fill { background: linear-gradient(90deg, var(--emerald-500), #117A4A); }

.pup-progress-slots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.pup-slot {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 4px;
  border-radius: 12px;
  background: var(--ink-50, #F2F6FB);
  border: 1px dashed var(--border);
  transition: background 200ms ease, border-color 200ms ease;
}
.pup-slot.is-filled.is-mine {
  background: linear-gradient(135deg, rgba(31,73,197,0.06), rgba(31,73,197,0.02));
  border-style: solid; border-color: rgba(31,73,197,0.18);
}
.pup-slot.is-filled.is-passup {
  background: linear-gradient(135deg, rgba(201,162,39,0.08), rgba(201,162,39,0.02));
  border-style: solid; border-color: rgba(201,162,39,0.22);
}
.pup-slot-amount {
  font-size: 10px; font-weight: 700; color: var(--ink-700);
  font-variant-numeric: tabular-nums;
}
.pup-slot.is-empty .pup-slot-amount { color: var(--ink-400); font-weight: 500; }

/* Mini avatar (en pup-slot y pup-source) */
.pup-mini {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
}
.pup-mini > :first-child:not(svg):not(.pup-mini-initials) {
  display: none;
}
.pup-source .pup-mini { flex-direction: row; gap: 0; }

/* avatar circular within mini */
.pup-mini::before {
  content: '';
}
.pup-mini-initials,
.pup-mini > svg {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink-100, #ECEFF4);
  color: var(--ink-500);
  font-size: 11px; font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,0.06);
}
.pup-source .pup-mini-initials,
.pup-source .pup-mini > svg {
  width: 36px; height: 36px;
  font-size: 13px;
}
.pup-mini.is-filled .pup-mini-initials {
  background: linear-gradient(135deg, var(--blue-500, #2B5BD9), var(--blue-700, #1849C5));
  color: #fff;
  border-color: #fff;
}
.pup-slot.is-passup .pup-mini.is-filled .pup-mini-initials {
  background: linear-gradient(135deg, var(--gold-400, #DEB857), var(--gold-700, #8C6F1A));
}
.pup-mini.is-corp .pup-mini-initials::after {
  content: 'C'; position: absolute; bottom: -2px; right: -2px;
  width: 12px; height: 12px;
  background: var(--blue-700);
  color: #fff;
  border-radius: 50%;
  font-size: 7px; font-weight: 800;
  display: grid; place-items: center;
  border: 1.5px solid #fff;
}
.pup-mini-label {
  font-size: 9px; font-weight: 800; letter-spacing: 0.08em;
  color: var(--ink-500);
}

/* Columna 3: status */
.pup-status { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pup-status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.10em;
}
.pup-status-badge.is-pending {
  background: var(--ink-50, #F2F6FB); color: var(--ink-500);
}
.pup-status-badge.is-progress {
  background: linear-gradient(135deg, rgba(201,162,39,0.12), rgba(201,162,39,0.04));
  color: var(--gold-700, #8C6F1A);
  box-shadow: inset 0 0 0 1px rgba(201,162,39,0.22);
}
.pup-status-badge.is-complete {
  background: linear-gradient(135deg, rgba(33,191,115,0.14), rgba(33,191,115,0.04));
  color: #117A4A;
  box-shadow: inset 0 0 0 1px rgba(33,191,115,0.28);
}
.pup-status-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold-500);
  animation: pulse-dot 1.6s ease-out infinite;
}
.pup-status-sub { font-size: 11px; color: var(--ink-500); }

/* Mobile pass-ups */
@media (max-width: 720px) {
  .pup-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .pup-source { width: 100%; }
  .pup-status { text-align: left; align-items: flex-start; }
}
@media (max-width: 480px) {
  .pup-source-amount { width: 54px; height: 54px; font-size: 15px; border-radius: 14px; }
  .pup-progress-slots { gap: 6px; }
  .pup-slot { padding: 6px 2px; }
  .pup-mini-initials, .pup-mini > svg { width: 26px; height: 26px; }
  .pup-source .pup-mini-initials, .pup-source .pup-mini > svg { width: 32px; height: 32px; }
}

/* ════════════════════════════════════════════════════════════════════
 * 39. WALLET — Flow visual (Total → Retirable + Fee → Reserva mensual)
 * ════════════════════════════════════════════════════════════════════ */
.wallet-flow {
  margin-top: 18px;
  background: linear-gradient(180deg, #FAFCFE 0%, #F4F7FB 100%);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.wallet-flow::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--blue-600, #2B5BD9);
  opacity: 0.85;
}
.wallet-flow-hd {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 16px;
}
.wallet-flow-title { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink-900); }
.wallet-flow-help { font-size: 12px; color: var(--ink-500); }

.wf-grid {
  display: grid;
  grid-template-columns: 1.2fr auto 1.2fr auto 1.2fr;
  gap: 14px;
  align-items: stretch;
}
.wf-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: var(--sh-1);
}
.wf-box-label {
  font-size: 10px; font-weight: 800; letter-spacing: 0.12em;
  color: var(--ink-400); text-transform: uppercase;
}
.wf-box-value {
  font-size: 22px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}
.wf-box-sub { font-size: 11px; color: var(--ink-500); }

.wf-box.is-total {
  background: linear-gradient(135deg, var(--blue-700, #1849C5), var(--blue-800, #0E2F8A));
  color: #fff;
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 8px 24px -10px rgba(31,73,197,0.45);
}
.wf-box.is-total .wf-box-label { color: rgba(255,255,255,0.7); }
.wf-box.is-total .wf-box-value { color: #fff; }
.wf-box.is-total .wf-box-sub { color: rgba(255,255,255,0.7); }

.wf-box.is-retirable { border-color: rgba(33,191,115,0.30); }
.wf-box.is-retirable .wf-box-value { color: #117A4A; }
.wf-box.is-fee { border-color: rgba(201,162,39,0.30); }
.wf-box.is-fee .wf-box-value { color: var(--gold-700, #8C6F1A); }
.wf-box.is-reserve { border-color: rgba(31,73,197,0.30); }
.wf-box.is-reserve .wf-box-value { color: var(--blue-700, #1849C5); }

.wf-arrow {
  display: grid; place-items: center;
  width: 38px;
  color: var(--ink-400);
  position: relative;
}
.wf-arrow::before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%;
  height: 2px;
  background: repeating-linear-gradient(90deg,
    var(--ink-200, #DCE3EC) 0 6px,
    transparent 6px 10px);
}
.wf-arrow svg { position: relative; z-index: 1; background: var(--bg-shell, #F4F7FB); padding: 0 4px; }

.wf-split {
  display: flex; flex-direction: column; gap: 6px;
  align-items: center; justify-content: center;
  width: 38px;
  position: relative;
}
.wf-split-tag {
  font-size: 9px; font-weight: 800; color: var(--ink-500);
  background: #fff;
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  letter-spacing: 0.06em;
}

@media (max-width: 760px) {
  .wf-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .wf-arrow, .wf-split { width: auto; height: 28px; transform: rotate(90deg); }
  .wf-arrow::before { left: 50%; right: auto; width: 80px; top: 50%; transform: translateX(-50%); }
}

/* ════════════════════════════════════════════════════════════════════
 * 40. DEPOSIT/PAYOUT — fix layout, chips de monto, input $
 * ════════════════════════════════════════════════════════════════════ */
.dep-grid {
  display: grid;
  grid-template-columns: minmax(360px, 460px) 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 760px) { .dep-grid { grid-template-columns: 1fr; gap: 20px; } }

/* Input prefix-$ correctamente posicionado */
.input-prefix {
  position: relative;
}
.input-prefix .ip-symbol {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px; font-weight: 700;
  color: var(--ink-500);
  pointer-events: none;
  z-index: 2;
  line-height: 1;
}
.input-prefix input {
  padding-left: 32px !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.input-prefix .ip-suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px; font-weight: 700; letter-spacing: 0.10em;
  color: var(--ink-400);
  pointer-events: none;
}

/* Chips de montos sugeridos */
.amount-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.amount-chip {
  flex: 1 1 calc(20% - 8px);
  min-width: 70px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 14px; font-weight: 700;
  color: var(--ink-700);
  text-align: center;
  cursor: pointer;
  transition: all 200ms ease;
  font-variant-numeric: tabular-nums;
}
.amount-chip:hover {
  border-color: var(--blue-500, #2B5BD9);
  color: var(--blue-700, #1849C5);
  background: rgba(31,73,197,0.04);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px -2px rgba(31,73,197,0.18);
}
.amount-chip.is-active {
  background: linear-gradient(135deg, var(--blue-500, #2B5BD9), var(--blue-700, #1849C5));
  color: #fff;
  border-color: var(--blue-700, #1849C5);
  box-shadow: 0 4px 12px -4px rgba(31,73,197,0.45);
}

/* Network info card */
.dep-info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  background: var(--ink-50, #F2F6FB);
  border-radius: 10px;
  font-size: 13px;
  margin-top: 6px;
}
.dep-info-row span:first-child { color: var(--ink-500); }
.dep-info-row span:last-child { font-weight: 700; color: var(--ink-900); }

/* ════════════════════════════════════════════════════════════════════
 * 41. SHARE buttons (referidos: copy + facebook + whatsapp + telegram + X)
 * ════════════════════════════════════════════════════════════════════ */
.share-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 12px;
  align-items: center;
}
.share-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--ink-700);
  cursor: pointer;
  transition: all 200ms ease;
  position: relative;
  overflow: hidden;
}
.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px -4px rgba(15,23,42,0.18);
}
.share-btn svg { width: 18px; height: 18px; }
.share-btn.copy { color: var(--blue-700, #1849C5); }
.share-btn.copy:hover { background: rgba(31,73,197,0.06); border-color: rgba(31,73,197,0.30); }
.share-btn.fb     { color: #1877F2; }
.share-btn.fb:hover     { background: rgba(24,119,242,0.08); border-color: rgba(24,119,242,0.30); }
.share-btn.wa     { color: #25D366; }
.share-btn.wa:hover     { background: rgba(37,211,102,0.08); border-color: rgba(37,211,102,0.30); }
.share-btn.tg     { color: #229ED9; }
.share-btn.tg:hover     { background: rgba(34,158,217,0.08); border-color: rgba(34,158,217,0.30); }
.share-btn.x      { color: #0F1419; }
.share-btn.x:hover      { background: rgba(15,20,25,0.06); border-color: rgba(15,20,25,0.30); }
.share-btn.is-copied {
  background: linear-gradient(135deg, var(--emerald-500, #21BF73), #117A4A);
  color: #fff !important; border-color: transparent;
}

/* ════════════════════════════════════════════════════════════════════
 * 42. SEARCH dropdown (resultados al escribir)
 * ════════════════════════════════════════════════════════════════════ */
.tb-search { position: relative; }
.tb-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 14px 40px -12px rgba(15,23,42,0.22), 0 4px 14px -4px rgba(15,23,42,0.10);
  max-height: 420px;
  overflow-y: auto;
  z-index: 100;
  padding: 6px;
  display: none;
  animation: search-in 200ms var(--t-spring);
}
.tb-search.is-open .tb-search-results { display: block; }
@keyframes search-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tb-search-section {
  font-size: 10px; font-weight: 800; letter-spacing: 0.12em;
  color: var(--ink-400); text-transform: uppercase;
  padding: 10px 12px 4px;
}
.tb-search-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 150ms ease;
  text-decoration: none;
  color: var(--ink-900);
}
.tb-search-item:hover, .tb-search-item.is-cursor {
  background: var(--ink-50, #F2F6FB);
}
.tb-search-item-ic {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(31,73,197,0.08);
  color: var(--blue-700, #1849C5);
  flex-shrink: 0;
}
.tb-search-item-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tb-search-item-title { font-size: 13px; font-weight: 600; }
.tb-search-item-sub { font-size: 11px; color: var(--ink-500); }
.tb-search-item-kbd {
  font-size: 10px; color: var(--ink-400);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--ink-50);
}
.tb-search-empty {
  padding: 20px 14px;
  text-align: center;
  color: var(--ink-500);
  font-size: 13px;
}

/* ════════════════════════════════════════════════════════════════════
 * 43. PACKAGES grid premium (membership/packages)
 * ════════════════════════════════════════════════════════════════════ */
.pkg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.pkg-card {
  position: relative;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px;
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: transform 220ms var(--t-spring), box-shadow 220ms var(--t-ease);
  box-shadow: var(--sh-1);
}
.pkg-card:hover { transform: translateY(-4px); box-shadow: var(--sh-3); }
.pkg-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(120% 100% at 100% 0%, color-mix(in srgb, var(--c, #2B5BD9) 8%, transparent), transparent 60%);
  pointer-events: none;
}
.pkg-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--c, #2B5BD9) 80%, white),
    var(--c, #2B5BD9),
    color-mix(in srgb, var(--c, #2B5BD9) 80%, white));
}
.pkg-badge-active {
  position: absolute; top: 14px; right: 14px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  background: linear-gradient(135deg, rgba(33,191,115,0.16), rgba(33,191,115,0.05));
  color: #117A4A;
  border: 1px solid rgba(33,191,115,0.32);
  border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em;
  z-index: 2;
}
.pkg-badge-active::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--emerald-500, #21BF73);
  box-shadow: 0 0 0 0 rgba(33,191,115,0.55);
  animation: pulse-dot 1.6s ease-out infinite;
}
.pkg-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--c, #2B5BD9) 14%, white),
    color-mix(in srgb, var(--c, #2B5BD9) 4%, white));
  color: var(--c, #2B5BD9);
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
  border: 1px solid color-mix(in srgb, var(--c, #2B5BD9) 18%, transparent);
}
.pkg-name {
  font-size: 17px; font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.015em;
  position: relative; z-index: 1;
  margin-bottom: 4px;
}
.pkg-eyebrow {
  font-size: 10px; font-weight: 800; letter-spacing: 0.12em;
  color: color-mix(in srgb, var(--c, #2B5BD9) 80%, black);
  text-transform: uppercase;
  margin-bottom: 4px;
  position: relative; z-index: 1;
}
.pkg-price {
  display: flex; align-items: baseline; gap: 6px;
  margin: 8px 0 14px;
  position: relative; z-index: 1;
}
.pkg-price-amount {
  font-size: 36px; font-weight: 800;
  color: var(--ink-900);
  letter-spacing: -0.025em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.pkg-price-cycle {
  font-size: 12px; color: var(--ink-500); font-weight: 600;
}
.pkg-features {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
  flex: 1;
  position: relative; z-index: 1;
}
.pkg-features li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; color: var(--ink-700);
  line-height: 1.4;
}
.pkg-features li svg {
  width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px;
  color: var(--c, #2B5BD9);
}
.pkg-cta {
  margin-top: 18px;
  width: 100%;
  position: relative; z-index: 1;
}
.pkg-cta.btn-primary {
  background: linear-gradient(135deg, var(--c, #2B5BD9), color-mix(in srgb, var(--c, #2B5BD9) 70%, black));
  border: none;
}
.pkg-meta {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 10px;
  font-size: 11px;
  color: var(--ink-500);
  position: relative; z-index: 1;
}
.pkg-meta-pill {
  padding: 3px 8px;
  background: var(--ink-50, #F2F6FB);
  border-radius: 999px;
  font-weight: 600;
}

/* ════════════════════════════════════════════════════════════════════
 * 44. BRAND IMG (favicon/logo PNG en sidebar/topbar/landing/auth)
 * ════════════════════════════════════════════════════════════════════ */
/* Limpiamos los estilos animados/gradientes cuando hay imagen real */
.brand-mark-img,
.land-brand-mark-img,
.auth-logo-mark-img,
.auth-brand-mark-img {
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden;
  padding: 0;
}
.brand-mark-img::before,
.land-brand-mark-img::before,
.auth-logo-mark-img::before,
.auth-brand-mark-img::before { content: none !important; animation: none !important; }

.brand-mark-img img,
.land-brand-mark-img img,
.auth-logo-mark-img img,
.auth-brand-mark-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(15, 47, 138, 0.18));
}

/* Topbar mobile (brand-compact) — un poco más pequeño */
.brand-compact .brand-mark-img {
  width: 32px; height: 32px; border-radius: 8px;
}
.brand-compact .brand-mark-img img { filter: none; }

/* Auth logo del panel decorativo (más grande) */
.auth-logo-mark-img {
  width: 44px !important; height: 44px !important;
  border-radius: 12px;
}
.auth-logo-mark-img img { filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35)); }

/* Auth brand-mark mobile (encima del form) */
.auth-brand-mark-img {
  width: 44px !important; height: 44px !important;
  border-radius: 12px;
}

/* Landing brand-mark dentro del nav glass capsule */
.land-brand-mark-img {
  width: 32px; height: 32px; border-radius: 8px;
}
.land-brand-mark-img img { filter: drop-shadow(0 2px 6px rgba(31, 73, 197, 0.20)); }

/* ════════════════════════════════════════════════════════════════════
 * 45. Bell button hidden (a petición del usuario)
 * ════════════════════════════════════════════════════════════════════ */
.bell-btn { display: none !important; }

/* ════════════════════════════════════════════════════════════════════
 * 46. ALERTS premium (info/warning/danger/success)
 * ════════════════════════════════════════════════════════════════════ */
.alert {
  display: flex; gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-card, #fff);
  position: relative;
  overflow: hidden;
}
.alert::before {
  content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 3px;
  background: var(--blue-500, #2B5BD9);
}
.alert-ic {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
}
.alert-body { flex: 1; min-width: 0; }
.alert-title {
  font-weight: 700; font-size: 14px;
  color: var(--ink-900);
  margin-bottom: 4px;
  letter-spacing: -0.005em;
}
.alert-text {
  font-size: 13px;
  color: var(--ink-700);
  line-height: 1.5;
}
.alert-text a, .link-strong {
  color: var(--blue-700, #1849C5);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.alert-text a:hover, .link-strong:hover { color: var(--blue-800, #0E2F8A); }

.alert-info::before { background: var(--blue-500, #2B5BD9); }
.alert-info .alert-ic { background: rgba(31,73,197,0.10); color: var(--blue-700, #1849C5); }

.alert-success::before { background: var(--emerald-500, #21BF73); }
.alert-success .alert-ic { background: rgba(33,191,115,0.12); color: #117A4A; }
.alert-success { background: linear-gradient(180deg, rgba(33,191,115,0.04), var(--bg-card, #fff)); }

.alert-warning::before { background: var(--gold-500, #C9A227); }
.alert-warning .alert-ic { background: rgba(201,162,39,0.12); color: var(--gold-700, #8C6F1A); }
.alert-warning { background: linear-gradient(180deg, rgba(201,162,39,0.04), var(--bg-card, #fff)); }

.alert-danger::before {
  background: linear-gradient(180deg, #E5484D, #C2272C);
  width: 4px;
}
.alert-danger .alert-ic { background: rgba(229,72,77,0.12); color: #C2272C; }
.alert-danger {
  background: linear-gradient(180deg, rgba(229,72,77,0.05), var(--bg-card, #fff));
  border-color: rgba(229,72,77,0.22);
  box-shadow: 0 4px 14px -6px rgba(229,72,77,0.18);
}
.alert-danger .alert-title { color: #9C1F22; }
.alert-danger .alert-ic::after {
  content: ''; position: absolute; inset: -3px;
  border-radius: 14px;
  border: 1px solid rgba(229,72,77,0.32);
  animation: alert-pulse 2s ease-out infinite;
}
@keyframes alert-pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.18); opacity: 0; }
}

/* ════════════════════════════════════════════════════════════════════
 * 47. Input locked (readonly con candado + badge en label)
 * ════════════════════════════════════════════════════════════════════ */
.field-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9px; font-weight: 800; letter-spacing: 0.10em;
  padding: 3px 7px;
  background: rgba(31,73,197,0.08);
  color: var(--blue-700, #1849C5);
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: uppercase;
}

.input-locked-wrap { position: relative; }
.input.is-locked {
  background: linear-gradient(180deg, var(--ink-50, #F2F6FB), #fff);
  cursor: not-allowed;
  padding-right: 110px !important;
  color: var(--ink-700);
  font-weight: 600;
}
.input-locked-action {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 11px; font-weight: 700;
  color: var(--blue-700, #1849C5);
  text-decoration: none;
  transition: all 180ms ease;
}
.input-locked-action:hover {
  background: rgba(31,73,197,0.06);
  border-color: rgba(31,73,197,0.30);
  transform: translateY(calc(-50% - 1px));
  box-shadow: 0 2px 8px -2px rgba(31,73,197,0.20);
}

/* Disabled inputs estilo coherente */
.input:disabled, .input[disabled] {
  background: var(--ink-50, #F2F6FB);
  color: var(--ink-400);
  cursor: not-allowed;
}

/* ════════════════════════════════════════════════════════════════════
 * 48. RENEWAL bar (días para renovar membresía)
 * ════════════════════════════════════════════════════════════════════ */
.renewal-bar {
  background: linear-gradient(180deg, rgba(31,73,197,0.04), rgba(31,73,197,0.01));
  border: 1px solid rgba(31,73,197,0.16);
  border-radius: 14px;
  padding: 14px 16px;
}
.renewal-bar-hd {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap; gap: 8px;
}
.renewal-bar-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.10em;
  color: var(--blue-700, #1849C5);
  text-transform: uppercase;
}
.renewal-bar-days {
  font-size: 13px; font-weight: 700;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
  display: inline-flex; align-items: center; gap: 6px;
}
.renewal-bar-days.is-soon { color: var(--gold-700, #8C6F1A); }
.renewal-bar-days.is-due  { color: #C2272C; }
.renewal-bar-days.is-soon::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold-500);
  animation: pulse-dot 1.6s ease-out infinite;
}
.renewal-bar-days.is-due::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #E5484D;
  animation: pulse-dot 1.2s ease-out infinite;
}

.renewal-bar-track {
  height: 8px;
  background: rgba(31,73,197,0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.renewal-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-500, #2B5BD9), var(--blue-700, #1849C5));
  border-radius: 999px;
  transition: width 800ms var(--t-spring);
  position: relative;
  overflow: hidden;
}
.renewal-bar-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.32), transparent);
  background-size: 200% 100%;
  animation: shimmer 2.4s linear infinite;
}
.renewal-bar-fill.is-soon { background: linear-gradient(90deg, var(--gold-400), var(--gold-700)); }
.renewal-bar-fill.is-due  { background: linear-gradient(90deg, #E5484D, #9C1F22); }

.renewal-bar-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11.5px; color: var(--ink-700);
  margin-top: 8px;
  flex-wrap: wrap; gap: 4px;
}
.renewal-bar-meta strong { color: var(--ink-900); font-weight: 700; }

/* ════════════════════════════════════════════════════════════════════
 * 49. MATRIX 3x11 — Organigrama visual
 * ════════════════════════════════════════════════════════════════════ */
.m3-tree-card {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 22px 18px;
  position: relative;
  overflow: hidden;
}
.m3-tree-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--blue-500) 20%,
    var(--gold-500) 50%,
    var(--emerald-500) 80%,
    transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 4.8s linear infinite;
}
.m3-tree-hd {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 12px; margin-bottom: 18px;
}
.m3-tree-eyebrow {
  font-size: 10px; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-700, #1849C5);
  margin-bottom: 4px;
}
.m3-tree-title {
  font-size: 17px; font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
.m3-tree-stats {
  display: flex; gap: 10px;
}
.m3-tree-stat {
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 14px;
  background: var(--ink-50, #F2F6FB);
  border-radius: 10px;
  min-width: 64px;
}
.m3-tree-stat-value {
  font-size: 16px; font-weight: 800;
  color: var(--blue-700, #1849C5);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}
.m3-tree-stat-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--ink-500);
  text-transform: uppercase;
  margin-top: 4px;
}

/* Tree wrapper — usa CSS grid de 3 columnas para alinear l1 y l2 */
.m3-tree {
  display: flex; flex-direction: column; align-items: stretch;
  position: relative;
  padding: 4px 0 4px;
  max-width: 920px;
  margin: 0 auto;
}
.m3-tree-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: start;
  justify-items: center;
  width: 100%;
  position: relative;
}
.m3-tree-root-row { display: flex; justify-content: center; }
.m3-tree-l1-row  { /* 3 columnas iguales */ }
.m3-tree-l2-row  { gap: 0; margin-top: 0; }

.m3-tree-l2-group {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  justify-items: center;
  width: 100%;
}

.m3-lines {
  width: 100%;
  height: 38px;
  display: block;
  pointer-events: none;
  fill: none;
  stroke: rgba(31, 73, 197, 0.32);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.m3-lines-1 { margin: -2px 0; }
.m3-lines-2 { margin: -2px 0; height: 32px; }

/* Bubble base */
.m3-bubble {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  position: relative;
  flex-shrink: 0;
  transition: transform 220ms var(--t-spring);
  text-decoration: none;
  color: inherit;
}
.m3-bubble:hover { transform: translateY(-2px); }
.m3-bubble.is-drillable { cursor: pointer; }
.m3-bubble.is-drillable:hover .m3-bubble-avatar {
  box-shadow:
    0 14px 30px -10px rgba(31, 73, 197, 0.45),
    inset 0 0 0 2px rgba(255,255,255,0.50),
    0 0 0 3px rgba(31, 73, 197, 0.18);
}
.m3-bubble.is-drillable:hover .m3-bubble-drill {
  background: var(--blue-700, #1849C5);
  color: #fff;
  transform: translateY(-1px) scale(1.05);
}
.m3-bubble-drill {
  position: absolute;
  bottom: -3px; right: -3px;
  width: 18px; height: 18px;
  background: #fff;
  color: var(--blue-700, #1849C5);
  border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--blue-500, #2B5BD9);
  box-shadow: 0 2px 6px -2px rgba(31, 73, 197, 0.30);
  transition: all 200ms ease;
}

.m3-bubble-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-500, #2B5BD9), var(--blue-700, #1849C5));
  color: #fff;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 800; letter-spacing: 0.02em;
  box-shadow:
    0 8px 20px -8px rgba(31, 73, 197, 0.35),
    inset 0 0 0 2px rgba(255,255,255,0.40);
  position: relative;
}
.m3-bubble-initials { line-height: 1; }
.m3-bubble-pos {
  font-size: 9px; font-weight: 800; letter-spacing: 0.10em;
  color: var(--ink-500);
  text-transform: uppercase;
}
.m3-bubble-name {
  font-size: 11px; font-weight: 600;
  color: var(--ink-900);
  max-width: 90px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Root (you) */
.m3-bubble.is-root .m3-bubble-avatar {
  width: 76px; height: 76px;
  font-size: 19px;
  background: linear-gradient(135deg, #1F49C5, #C9A227);
  box-shadow:
    0 16px 38px -10px rgba(31, 73, 197, 0.45),
    inset 0 0 0 3px #fff,
    0 0 0 4px rgba(31, 73, 197, 0.18);
}
.m3-bubble.is-root .m3-bubble-pos {
  background: var(--blue-700, #1849C5);
  color: #fff;
  padding: 3px 12px;
  border-radius: 999px;
  letter-spacing: 0.14em;
  font-weight: 800;
  margin-top: 2px;
}
.m3-bubble.is-root .m3-bubble-name {
  font-size: 12px;
  font-weight: 700;
  margin-top: 1px;
}

/* Nivel 1 (directos) */
.m3-bubble.is-l1 .m3-bubble-avatar {
  width: 60px; height: 60px;
  font-size: 14px;
}

/* Nivel 2 (spillover) — más pequeños */
.m3-bubble.is-l2 .m3-bubble-avatar {
  width: 38px; height: 38px;
  font-size: 11px;
  background: linear-gradient(135deg, var(--gold-500, #C9A227), var(--gold-700, #8C6F1A));
  box-shadow:
    0 6px 14px -6px rgba(201, 162, 39, 0.30),
    inset 0 0 0 1.5px rgba(255,255,255,0.35);
}
.m3-bubble.is-l2 .m3-bubble-name { font-size: 10px; max-width: 70px; }

/* Empty (placeholder) */
.m3-bubble.is-empty .m3-bubble-avatar {
  background: var(--ink-50, #F2F6FB);
  color: var(--ink-400);
  box-shadow: inset 0 0 0 1.5px var(--border);
  border: 1.5px dashed rgba(31, 73, 197, 0.20);
}
.m3-bubble.is-empty.is-root .m3-bubble-avatar { /* nunca pasa, pero por si acaso */ }

/* Inactivo */
.m3-bubble.is-inactive .m3-bubble-avatar { opacity: 0.45; filter: grayscale(0.4); }
.m3-bubble.is-inactive .m3-bubble-avatar::after {
  content: ''; position: absolute; bottom: -2px; right: -2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #E5484D;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(229,72,77,0.30);
}

/* Corporate */
.m3-bubble.is-corp .m3-bubble-avatar {
  background: linear-gradient(135deg, #6B47FF, #3B2BD9);
}

/* Legend */
.m3-tree-legend {
  display: flex; flex-wrap: wrap; gap: 14px;
  justify-content: center;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--ink-700);
}
.m3-legend-item { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.m3-legend-dot {
  width: 12px; height: 12px; border-radius: 50%;
  display: inline-block;
}
.m3-legend-dot.is-l1 { background: linear-gradient(135deg, var(--blue-500), var(--blue-700)); }
.m3-legend-dot.is-l2 { background: linear-gradient(135deg, var(--gold-500), var(--gold-700)); }
.m3-legend-dot.is-empty { background: var(--ink-50); border: 1.5px dashed rgba(31, 73, 197, 0.30); }
.m3-legend-dot.is-inactive { background: rgba(229,72,77,0.4); }

/* Levels grid (stats por nivel) */
.m3-levels-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px 22px;
}
@media (max-width: 760px) {
  .m3-levels-grid { grid-template-columns: 1fr; }
}
.m3-level-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0;
}
.m3-level-num {
  width: 36px; flex-shrink: 0;
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em;
  color: var(--blue-700, #1849C5);
  background: rgba(31, 73, 197, 0.08);
  padding: 6px 0; border-radius: 8px;
  text-align: center;
}
.m3-level-body { flex: 1; min-width: 0; }
.m3-level-meta {
  display: flex; gap: 8px; align-items: baseline;
  font-size: 12px;
  margin-bottom: 5px;
}
.m3-level-active { font-weight: 700; color: var(--ink-900); }
.m3-level-total  { font-size: 11px; }
.m3-level-earn   {
  margin-left: auto;
  font-weight: 700;
  color: var(--blue-700, #1849C5);
  font-variant-numeric: tabular-nums;
}
.m3-level-track {
  height: 5px;
  background: var(--ink-50, #F2F6FB);
  border-radius: 999px;
  overflow: hidden;
}
.m3-level-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-500, #2B5BD9), var(--blue-700, #1849C5));
  border-radius: 999px;
  transition: width 800ms var(--t-spring);
}

/* Mobile tree */
@media (max-width: 760px) {
  .m3-tree-l2-group { gap: 2px; }
  .m3-bubble-avatar { width: 48px; height: 48px; font-size: 12px; }
  .m3-bubble.is-root .m3-bubble-avatar { width: 60px; height: 60px; font-size: 15px; }
  .m3-bubble.is-l1 .m3-bubble-avatar  { width: 50px; height: 50px; font-size: 13px; }
  .m3-bubble.is-l2 .m3-bubble-avatar  { width: 30px; height: 30px; font-size: 10px; }
  .m3-bubble-name { font-size: 10px; max-width: 60px; }
  .m3-bubble.is-l2 .m3-bubble-name { font-size: 9px; max-width: 44px; }
  .m3-bubble.is-l2 .m3-bubble-drill { width: 14px; height: 14px; }
  .m3-lines { height: 30px; }
  .m3-lines-2 { height: 24px; }
}

@media (max-width: 480px) {
  .m3-tree-stats { gap: 6px; }
  .m3-tree-stat  { padding: 6px 10px; min-width: 56px; }
  .m3-bubble.is-l2 .m3-bubble-avatar { width: 26px; height: 26px; font-size: 9px; }
  .m3-bubble.is-l2 .m3-bubble-name { display: none; }
}

/* Help text under title */
.m3-tree-help {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--ink-500);
  margin-top: 6px;
}
.m3-tree-help svg { color: var(--blue-500, #2B5BD9); }

/* ── Breadcrumb drill-down ── */
.m3-crumbs {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(31,73,197,0.06), rgba(31,73,197,0.02));
  border: 1px solid rgba(31,73,197,0.16);
  border-radius: 12px;
}
.m3-crumb {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff;
  font-size: 12px; font-weight: 600;
  color: var(--blue-700, #1849C5);
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all 180ms ease;
}
.m3-crumb:hover {
  background: rgba(31,73,197,0.08);
  border-color: rgba(31,73,197,0.32);
  transform: translateY(-1px);
}
.m3-crumb.is-current {
  background: linear-gradient(135deg, var(--blue-700, #1849C5), var(--blue-500, #2B5BD9));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px -3px rgba(31,73,197,0.32);
}
.m3-crumb-home { font-weight: 700; }
.m3-crumb-sep {
  display: inline-flex; align-items: center;
  color: var(--ink-400);
}

/* ════════════════════════════════════════════════════════════════════
 * 50. PROMO 3x11 — Cómo funciona (rediseñado premium)
 * ════════════════════════════════════════════════════════════════════ */
.m3-howit-card {
  background: linear-gradient(180deg, #fff 0%, #FAFBFE 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px 26px 0;
  position: relative;
  overflow: hidden;
}
.m3-howit-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg,
    var(--blue-500) 0%,
    var(--gold-500) 50%,
    var(--emerald-500) 100%);
  background-size: 200% 100%;
  animation: shimmer 5s linear infinite;
}
.m3-howit-hd { margin-bottom: 24px; }
.m3-howit-eyebrow {
  display: inline-block;
  font-size: 10px; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-700, #1849C5);
  background: rgba(31,73,197,0.08);
  padding: 4px 10px; border-radius: 999px;
  margin-bottom: 8px;
}
.m3-howit-title {
  font-size: 22px; font-weight: 800;
  color: var(--ink-900);
  letter-spacing: -0.02em;
  margin: 0;
}

.m3-howit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}
@media (max-width: 860px) {
  .m3-howit-grid { grid-template-columns: 1fr; }
}

.m3-howit-step {
  position: relative;
  padding: 22px 20px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--border);
  transition: all 240ms var(--t-spring);
  overflow: hidden;
}
.m3-howit-step::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--blue-500, #2B5BD9);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 320ms var(--t-spring);
}
.m3-howit-step:hover {
  transform: translateY(-3px);
  border-color: rgba(31,73,197,0.22);
  box-shadow: 0 12px 28px -10px rgba(31,73,197,0.18);
}
.m3-howit-step:hover::before { transform: scaleX(1); }

.m3-howit-num {
  position: absolute;
  top: 16px; right: 18px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 11px; font-weight: 700;
  color: var(--ink-300, #C2CCE0);
  letter-spacing: 0.04em;
}
.m3-howit-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: grid; place-items: center;
  margin-bottom: 14px;
  position: relative;
}
.m3-howit-icon-blue {
  background: linear-gradient(135deg, rgba(31,73,197,0.10), rgba(31,73,197,0.04));
  color: var(--blue-700, #1849C5);
  box-shadow: inset 0 0 0 1px rgba(31,73,197,0.16);
}
.m3-howit-icon-gold {
  background: linear-gradient(135deg, rgba(201,162,39,0.14), rgba(201,162,39,0.04));
  color: var(--gold-700, #8C6F1A);
  box-shadow: inset 0 0 0 1px rgba(201,162,39,0.22);
}
.m3-howit-icon-emerald {
  background: linear-gradient(135deg, rgba(33,191,115,0.14), rgba(33,191,115,0.04));
  color: #117A4A;
  box-shadow: inset 0 0 0 1px rgba(33,191,115,0.22);
}

.m3-howit-body h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.m3-howit-body p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-700);
  margin: 0;
}
.m3-howit-body p strong { color: var(--ink-900); font-weight: 700; }

.m3-howit-foot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  margin: 0 -26px;
  padding: 16px 26px;
  background: linear-gradient(180deg, transparent, rgba(31,73,197,0.02));
}
@media (max-width: 760px) {
  .m3-howit-foot { grid-template-columns: 1fr; gap: 12px; }
}
.m3-howit-foot-meta {
  display: flex; flex-direction: column; gap: 2px;
  padding: 0 12px;
  position: relative;
}
@media (min-width: 761px) {
  .m3-howit-foot-meta + .m3-howit-foot-meta::before {
    content: ''; position: absolute; left: 0; top: 4px; bottom: 4px;
    width: 1px; background: var(--border);
  }
}
.m3-howit-foot-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.10em;
  color: var(--ink-500);
  text-transform: uppercase;
}
.m3-howit-foot-value {
  font-size: 14px; font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.005em;
}

/* ════════════════════════════════════════════════════════════════════
 * 51. TABS panes + back link
 * ════════════════════════════════════════════════════════════════════ */
.tab-pane { display: none; }
.tab-pane.is-active { display: block; }

.back-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600;
  color: var(--blue-700, #1849C5);
  text-decoration: none;
  margin-bottom: 6px;
  transition: all 180ms ease;
}
.back-link:hover { transform: translateX(-2px); color: var(--blue-800, #0E2F8A); }

.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-500, #2B5BD9), var(--blue-700, #1849C5));
  color: #fff;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}

.btn-xs {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 7px;
}

/* ════════════════════════════════════════════════════════════════════
 * 52. PROFILE — Hero card + grid premium
 * ════════════════════════════════════════════════════════════════════ */
.profile-hero {
  position: relative;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 28px 0;
  overflow: hidden;
}
.profile-hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 140px;
  background:
    radial-gradient(circle at 20% 20%, rgba(31, 73, 197, 0.12) 0%, transparent 55%),
    radial-gradient(circle at 80% 30%, rgba(201, 162, 39, 0.10) 0%, transparent 55%),
    linear-gradient(135deg, #0E2F8A 0%, #1F49C5 60%, #2B5BD9 100%);
  pointer-events: none;
}
.profile-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, var(--bg-card,#fff) 100%);
}
.profile-hero-content {
  position: relative;
  display: flex; gap: 22px; align-items: flex-start;
  padding-top: 60px;
}
@media (max-width: 760px) {
  .profile-hero { padding: 24px 22px 0; }
  .profile-hero-content { flex-direction: column; align-items: center; text-align: center; padding-top: 50px; gap: 16px; }
}

.profile-avatar {
  position: relative;
  width: 96px; height: 96px;
  flex-shrink: 0;
}
.profile-avatar-ring {
  position: absolute; inset: -4px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, var(--blue-500), var(--gold-500), var(--blue-500));
  animation: avatar-spin 8s linear infinite;
  filter: blur(0.5px);
}
@keyframes avatar-spin { to { transform: rotate(360deg); } }
.profile-avatar-img {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-700, #1849C5), var(--blue-500, #2B5BD9));
  color: #fff;
  display: grid; place-items: center;
  font-size: 32px; font-weight: 800;
  letter-spacing: 0.02em;
  border: 4px solid var(--bg-card, #fff);
  box-shadow: 0 12px 28px -8px rgba(31, 73, 197, 0.40);
}
.profile-avatar-badge {
  position: absolute;
  bottom: 0; right: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 3px solid var(--bg-card, #fff);
  z-index: 1;
}
.profile-avatar-badge-active { background: linear-gradient(135deg, #21BF73, #117A4A); color: #fff; }
.profile-avatar-badge-corp   { background: linear-gradient(135deg, #6B47FF, #3B2BD9); color: #fff; }

.profile-hero-meta { flex: 1; min-width: 0; }
.profile-name {
  font-size: 26px; font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  margin: 0 0 4px;
}
.profile-username {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-bottom: 12px;
}
@media (max-width: 760px) {
  .profile-username { justify-content: center; }
}
.profile-handle {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 13px; font-weight: 700;
  color: var(--blue-700, #1849C5);
}
.profile-dot {
  width: 3px; height: 3px;
  background: var(--ink-300);
  border-radius: 50%;
}
.profile-email { font-size: 13px; color: var(--ink-700); }

.profile-badges {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 14px;
}
@media (max-width: 760px) { .profile-badges { justify-content: center; } }

.profile-quick-stats {
  display: flex; gap: 22px;
  flex-wrap: wrap;
}
@media (max-width: 760px) { .profile-quick-stats { justify-content: center; } }
.profile-quick-stat { display: flex; flex-direction: column; gap: 2px; }
.profile-quick-stat-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.10em;
  color: var(--ink-500); text-transform: uppercase;
}
.profile-quick-stat-value {
  font-size: 14px; font-weight: 700; color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}

.profile-ref-row {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 24px -28px 0;
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(31,73,197,0.02));
}
@media (max-width: 760px) {
  .profile-ref-row {
    grid-template-columns: 1fr;
    margin: 22px -22px 0;
    padding: 14px 22px;
    text-align: center;
  }
  .profile-ref-input { font-size: 11px; }
}
.profile-ref-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.10em;
  color: var(--blue-700, #1849C5);
  text-transform: uppercase;
}
.profile-ref-input {
  font-size: 12px;
  background: #fff;
  color: var(--ink-700);
}

/* Profile grid (3 columnas) */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) {
  .profile-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .profile-grid { grid-template-columns: 1fr; }
}

.profile-card-ic {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(31,73,197,0.08);
  color: var(--blue-700, #1849C5);
  display: grid; place-items: center;
  flex-shrink: 0;
}

/* Animation delays para cascada */
.delay-3 { animation-delay: 0.20s !important; }

/* ════════════════════════════════════════════════════════════════════
 * 53. ADMIN AUTH (login del panel administrativo) — premium dark + gold
 * ════════════════════════════════════════════════════════════════════ */
/* Cuando el body.landing renderiza el admin login, neutralizamos paddings */
body.landing:has(.adm-auth) { padding: 0 !important; margin: 0; background: #050B1F; }
body.landing:has(.adm-auth) main#main { padding: 0 !important; max-width: none; }

.adm-auth {
  min-height: 100vh;
  width: 100%;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  position: relative;
  overflow: hidden;
  background: #050B1F;
  color: #E8ECF6;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
@media (max-width: 980px) {
  .adm-auth { grid-template-columns: 1fr; }
}

/* Background decorations */
.adm-auth-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
}
.adm-auth-bg::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 25% 15%, rgba(31, 73, 197, 0.32) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 75% 85%, rgba(201, 162, 39, 0.18) 0%, transparent 55%),
    linear-gradient(160deg, #050B1F 0%, #0B1530 35%, #112548 65%, #0E2F8A 100%);
}
.adm-auth-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 0%, transparent 80%);
}
.adm-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.55;
}
.adm-orb-1 {
  width: 520px; height: 520px;
  top: -160px; left: -160px;
  background: radial-gradient(circle, rgba(31,73,197,0.85) 0%, transparent 70%);
  animation: adm-orb-float 18s ease-in-out infinite;
}
.adm-orb-2 {
  width: 480px; height: 480px;
  bottom: -180px; right: -120px;
  background: radial-gradient(circle, rgba(201,162,39,0.55) 0%, transparent 70%);
  animation: adm-orb-float 22s ease-in-out infinite reverse;
}
.adm-orb-3 {
  width: 320px; height: 320px;
  top: 40%; left: 45%;
  background: radial-gradient(circle, rgba(43,91,217,0.50) 0%, transparent 70%);
  animation: adm-orb-float 26s ease-in-out infinite;
  opacity: 0.35;
}
@keyframes adm-orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(40px, -30px) scale(1.08); }
}
.adm-grid { display: none; }
.adm-shine {
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(115deg, transparent 40%, rgba(201,162,39,0.06) 50%, transparent 60%);
  animation: adm-shine-rotate 14s linear infinite;
}
@keyframes adm-shine-rotate {
  to { transform: rotate(360deg); }
}

/* ── LEFT panel ── */
.adm-auth-side {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  padding: 40px 48px;
  border-right: 1px solid rgba(201,162,39,0.10);
}
@media (max-width: 980px) {
  .adm-auth-side {
    padding: 28px 24px 18px;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
}

.adm-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600;
  color: rgba(232, 236, 246, 0.65);
  text-decoration: none;
  width: fit-content;
  padding: 7px 12px 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 200ms ease;
  letter-spacing: 0.02em;
}
.adm-back:hover {
  background: rgba(201,162,39,0.10);
  border-color: rgba(201,162,39,0.32);
  color: #FFD089;
  transform: translateX(-2px);
}

.adm-side-content {
  flex: 1;
  display: flex; flex-direction: column;
  justify-content: center;
  max-width: 520px;
  padding: 56px 0;
}
@media (max-width: 980px) {
  .adm-side-content { padding: 24px 0 8px; }
}

.adm-side-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #FFD089;
  background: linear-gradient(135deg, rgba(201,162,39,0.18), rgba(201,162,39,0.06));
  border: 1px solid rgba(201,162,39,0.32);
  padding: 7px 14px;
  border-radius: 999px;
  width: fit-content;
  margin-bottom: 22px;
  box-shadow: 0 4px 16px -4px rgba(201,162,39,0.30), inset 0 0 0 1px rgba(255,255,255,0.04);
}
.adm-side-tag-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #FFD089;
  box-shadow: 0 0 10px #FFD089;
  animation: adm-pulse 1.8s ease-out infinite;
}
@keyframes adm-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.85); }
}

.adm-side-title {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: #FFFFFF;
  margin: 0 0 18px;
}
@media (max-width: 980px) { .adm-side-title { font-size: 32px; } }
@media (max-width: 480px) { .adm-side-title { font-size: 26px; } }

.adm-side-title-gold {
  background: linear-gradient(135deg, #FFD089 0%, #C9A227 60%, #8C6F1A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.adm-side-sub {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(232, 236, 246, 0.70);
  max-width: 480px;
  margin: 0 0 30px;
}

.adm-side-feats {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 14px;
}
.adm-side-feats li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  transition: all 240ms var(--t-spring);
}
.adm-side-feats li:hover {
  background: rgba(201,162,39,0.05);
  border-color: rgba(201,162,39,0.18);
  transform: translateX(2px);
}
.adm-side-ic {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(31,73,197,0.30), rgba(31,73,197,0.10));
  border: 1px solid rgba(31,73,197,0.32);
  color: #88AEF7;
}
.adm-side-feats strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 1px;
  letter-spacing: -0.005em;
}
.adm-side-feats small {
  font-size: 12px;
  color: rgba(232, 236, 246, 0.55);
  line-height: 1.45;
}
@media (max-width: 980px) {
  .adm-side-feats { display: none; }
}

.adm-side-foot {
  margin-top: auto;
  padding-top: 28px;
}
.adm-secure {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 16px;
  background: rgba(33, 191, 115, 0.06);
  border: 1px solid rgba(33, 191, 115, 0.18);
  border-radius: 12px;
  width: fit-content;
  max-width: 100%;
}
.adm-secure-dot {
  flex-shrink: 0;
  margin-top: 6px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #21BF73;
  box-shadow: 0 0 12px #21BF73;
  animation: adm-pulse 2.2s ease-out infinite;
}
.adm-secure strong {
  display: block;
  font-size: 12.5px; font-weight: 700;
  color: #6BE2A8;
  letter-spacing: 0.005em;
  margin-bottom: 1px;
}
.adm-secure small {
  font-size: 11.5px;
  color: rgba(232, 236, 246, 0.55);
  line-height: 1.4;
}

/* ── RIGHT panel ── */
.adm-auth-main {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 32px;
  gap: 16px;
}
@media (max-width: 980px) {
  .adm-auth-main { padding: 12px 18px 28px; }
}

.adm-card {
  width: 100%;
  max-width: 440px;
  padding: 36px 36px 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)),
    rgba(11, 21, 48, 0.70);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 28px 80px -20px rgba(0,0,0,0.50),
    0 0 0 1px rgba(201,162,39,0.04),
    inset 0 1px 0 0 rgba(255,255,255,0.06);
}
.adm-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(201,162,39,0.50) 30%,
    rgba(31,73,197,0.50) 70%,
    transparent 100%);
}
@media (max-width: 480px) {
  .adm-card { padding: 28px 22px 22px; }
}

.adm-card-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 22px;
}

.adm-logo {
  position: relative;
  width: 52px; height: 52px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow:
    0 8px 22px -6px rgba(201,162,39,0.40),
    inset 0 0 0 1px rgba(255,255,255,0.16);
}
.adm-logo img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  position: relative; z-index: 1;
}
.adm-logo-glow {
  position: absolute; inset: -2px;
  border-radius: inherit;
  background: conic-gradient(from 0deg, #FFD089, #C9A227, #1F49C5, #FFD089);
  filter: blur(6px); opacity: 0.6;
  animation: avatar-spin 6s linear infinite;
  z-index: 0;
}

.adm-logo-meta { display: flex; flex-direction: column; gap: 2px; }
.adm-logo-name {
  font-size: 17px; font-weight: 800;
  background: linear-gradient(135deg, #FFFFFF 0%, #C9A227 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.015em;
}
.adm-logo-tag {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(232,236,246,0.50);
}

.adm-card-title {
  font-size: 22px; font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.adm-card-sub {
  font-size: 13px;
  color: rgba(232,236,246,0.60);
  margin: 0 0 22px;
  line-height: 1.5;
}

.adm-error {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600;
  padding: 10px 14px;
  background: rgba(229, 72, 77, 0.10);
  border: 1px solid rgba(229, 72, 77, 0.32);
  border-radius: 10px;
  color: #FF8A8E;
  margin-bottom: 14px;
}

.adm-form { display: flex; flex-direction: column; gap: 14px; }

.adm-field { display: flex; flex-direction: column; gap: 6px; }
.adm-field label {
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(232,236,246,0.78);
  text-transform: uppercase;
}
.adm-input-wrap {
  position: relative;
  display: flex; align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 11px;
  transition: all 220ms ease;
  overflow: hidden;
}
.adm-input-wrap:hover { border-color: rgba(255,255,255,0.18); }
.adm-input-wrap:focus-within {
  background: rgba(31,73,197,0.10);
  border-color: rgba(201,162,39,0.55);
  box-shadow:
    0 0 0 3px rgba(201,162,39,0.14),
    0 6px 18px -8px rgba(201,162,39,0.30);
}
.adm-input-ic {
  display: grid; place-items: center;
  width: 40px; height: 100%;
  flex-shrink: 0;
  color: rgba(232,236,246,0.50);
  pointer-events: none;
}
.adm-input-wrap:focus-within .adm-input-ic { color: #FFD089; }

.adm-input-wrap input {
  flex: 1; min-width: 0;
  height: 46px;
  padding: 0 12px 0 0;
  border: 0; outline: 0;
  background: transparent;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: 0.005em;
}
.adm-input-wrap input::placeholder {
  color: rgba(232,236,246,0.32);
  font-weight: 400;
}
.adm-input-wrap input:-webkit-autofill,
.adm-input-wrap input:-webkit-autofill:hover,
.adm-input-wrap input:-webkit-autofill:focus {
  -webkit-text-fill-color: #FFFFFF;
  -webkit-box-shadow: 0 0 0 1000px rgba(11,21,48,0.85) inset !important;
  caret-color: #FFFFFF;
}

.adm-input-eye {
  background: transparent;
  border: 0;
  padding: 0 14px;
  height: 46px;
  display: grid; place-items: center;
  color: rgba(232,236,246,0.50);
  cursor: pointer;
  transition: color 180ms ease;
}
.adm-input-eye:hover { color: #FFD089; }

.adm-btn {
  position: relative;
  margin-top: 10px;
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #C9A227 0%, #8C6F1A 50%, #C9A227 100%);
  background-size: 200% 100%;
  color: #FFFFFF;
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  overflow: hidden;
  transition: all 240ms var(--t-spring);
  box-shadow:
    0 10px 24px -6px rgba(201,162,39,0.40),
    inset 0 1px 0 0 rgba(255,255,255,0.20);
}
.adm-btn:hover {
  transform: translateY(-1px);
  background-position: 100% 0;
  box-shadow:
    0 16px 32px -8px rgba(201,162,39,0.55),
    inset 0 1px 0 0 rgba(255,255,255,0.30);
}
.adm-btn:active { transform: translateY(0); }
.adm-btn-text {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; height: 100%;
  text-shadow: 0 1px 0 rgba(0,0,0,0.20);
}
.adm-btn-shine {
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.32) 50%, transparent 70%);
  animation: adm-btn-shine 2.6s ease-in-out infinite;
  z-index: 0;
}
@keyframes adm-btn-shine {
  0%   { left: -100%; }
  60%  { left: 110%; }
  100% { left: 110%; }
}

.adm-card-foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  justify-content: center;
  text-align: center;
}
.adm-foot-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600;
  color: rgba(232,236,246,0.65);
  text-decoration: none;
  transition: color 180ms ease;
}
.adm-foot-link:hover { color: #FFD089; }
.adm-foot-sep {
  width: 1px; height: 12px;
  background: rgba(255,255,255,0.12);
}
.adm-foot-note {
  font-size: 11.5px;
  color: rgba(232,236,246,0.40);
}

.adm-trust {
  display: flex; flex-wrap: wrap; gap: 14px;
  justify-content: center;
  margin-top: 6px;
}
.adm-trust span {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
  color: rgba(232,236,246,0.45);
  letter-spacing: 0.02em;
}
.adm-trust span svg { color: rgba(201,162,39,0.72); }


/* ════════════════════════════════════════════════════════════════════
 * SIDEBAR — COLAPSABLE (estilo Acme/Kargul, premium-clean)
 * - Botón en topbar para colapsar/expandir.
 * - Cuando está colapsado, solo se ven los iconos y aparece un tooltip
 *   suave al hacer hover sobre cada item.
 * - Estado persistido en localStorage (sidebar-collapsed=1|0).
 * - Solo aplica en desktop (>900px). En móvil sigue siendo drawer.
 * ══════════════════════════════════════════════════════════════════ */

.sidebar-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-500);
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}
.sidebar-toggle:hover {
  background: rgba(15, 23, 42, 0.045);
  color: var(--ink-900);
  border-color: rgba(15, 23, 42, 0.14);
}
.sidebar-toggle svg {
  width: 16px; height: 16px;
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}
html.sidebar-collapsed .sidebar-toggle svg { transform: rotate(180deg); }

@media (min-width: 901px) {
  .sidebar-toggle { display: inline-flex; }
}

/* ── Estado colapsado ────────────────────────────────────────────── */
@media (min-width: 901px) {
  html.sidebar-collapsed { --sidebar-w: 76px; }

  html.sidebar-collapsed .sidebar { overflow: visible; }

  /* Ocultamos textos del brand */
  html.sidebar-collapsed .sidebar .brand > div:not(.brand-mark) {
    opacity: 0;
    width: 0; max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 160ms ease;
  }
  html.sidebar-collapsed .sidebar .brand {
    justify-content: center;
    padding: 18px 12px 16px;
    gap: 0;
  }

  /* Ocultamos labels de cada nav-item */
  html.sidebar-collapsed .sidebar .nav-item span {
    opacity: 0;
    width: 0; max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 160ms ease;
  }
  html.sidebar-collapsed .sidebar .nav-item {
    justify-content: center;
    padding: 11px 0;
    gap: 0;
  }
  html.sidebar-collapsed .sidebar .nav-item.is-active::after { display: none; }

  /* Section labels desaparecen y dejan un divisor sutil */
  html.sidebar-collapsed .sidebar .nav-section {
    height: 1px;
    padding: 0;
    margin: 10px 12px;
    background: var(--border);
    color: transparent;
    overflow: hidden;
  }
  html.sidebar-collapsed .sidebar .nav-section:first-of-type { margin-top: 8px; }

  /* Tooltip al hover (estilo Acme: pill oscura a la derecha) */
  html.sidebar-collapsed .sidebar .nav-item::before {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
    background: var(--ink-900, #0B1530);
    color: #fff;
    font-size: 12.5px; font-weight: 500;
    padding: 6px 10px;
    border-radius: 8px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 160ms ease, transform 160ms ease;
    z-index: 100;
    box-shadow: 0 8px 24px -8px rgba(15, 23, 42, 0.35);
  }
  html.sidebar-collapsed .sidebar .nav-item:hover::before {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }

  /* Footer (user-chip) — solo el avatar centrado */
  html.sidebar-collapsed .sidebar .sidebar-foot { padding: 10px 8px; }
  html.sidebar-collapsed .sidebar .user-chip {
    justify-content: center;
    padding: 6px;
  }
  html.sidebar-collapsed .sidebar .user-chip > div:not(.avatar) {
    opacity: 0;
    width: 0; max-width: 0;
    overflow: hidden;
    white-space: nowrap;
  }
}

/* En móvil el toggle no aplica; usamos el drawer normal con .menu-toggle */
@media (max-width: 900px) {
  html.sidebar-collapsed { --sidebar-w: 0px; }
  .sidebar-toggle { display: none !important; }
}




