/* ===========================================================================
   AITHERAN · Sistema de diseño "Liquid Gold"
   Lujo cristalino: negro profundo, ORO protagonista, púrpura royal secundario,
   acentos café/bronce. Glass real (bordes internos + inset), glow que sigue el
   cursor, tipografía editorial con jerarquía. Anti-slop.
   =========================================================================== */

:root {
  /* Bases negras con calidez sutil (nunca #000 plano) */
  --bg-0: #07060a;
  --bg-1: #0b0a10;
  --bg-2: #12101a;

  /* Superficies de cristal */
  --surface: rgba(26, 22, 38, 0.50);
  --surface-2: rgba(30, 25, 44, 0.42);
  --surface-strong: rgba(18, 15, 28, 0.85);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --line-gold: rgba(216, 180, 106, 0.30);

  /* Tinta */
  --ink: #f3efe6;
  --ink-soft: #c7bfb0;
  --ink-dim: #8c8478;

  /* ORO — protagonista de lujo */
  --gold: #d8b46a;
  --gold-bright: #f2dca0;
  --gold-soft: #e8cd8c;
  --gold-deep: #a87f2e;
  --gold-ember: #c89a4a;

  /* Púrpura royal — acento secundario (profundo, no lavanda IA) */
  --violet: #6d28d9;
  --violet-300: #c4b0ff;
  --violet-400: #a78bfa;
  --violet-600: #5b21b6;
  --violet-700: #4c1d95;

  /* Café / bronce — calidez */
  --coffee: #2a1d12;
  --coffee-2: #3d2a1a;
  --bronze: #8a5a2b;

  /* Semánticos */
  --emerald: #4ade80;
  --rose: #fb7185;
  --amber: #fbbf24;
  --sky: #60a5fa;

  --shadow-soft: 0 24px 60px -28px rgba(0, 0, 0, 0.8);
  --shadow-card: 0 18px 50px -24px rgba(0, 0, 0, 0.9);
  --shadow-gold: 0 18px 44px -18px rgba(168, 127, 46, 0.55);
  --radius: 20px;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-serif: 'Fraunces', Georgia, serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* Fondo mesh: oro arriba, púrpura royal, brasa café abajo */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(58% 48% at 80% 4%, rgba(216, 180, 106, 0.16), transparent 70%),
    radial-gradient(52% 46% at 10% 16%, rgba(109, 40, 217, 0.18), transparent 72%),
    radial-gradient(60% 50% at 88% 96%, rgba(138, 90, 43, 0.12), transparent 72%),
    radial-gradient(46% 40% at 20% 92%, rgba(76, 29, 149, 0.14), transparent 70%),
    var(--bg-0);
}
.bg-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ----------------------- Tipografía ----------------------- */
.font-display { font-family: var(--font-display); }
.font-serif { font-family: var(--font-serif); }
.font-mono { font-family: var(--font-mono); font-feature-settings: 'tnum' 1; }

.display-xl {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 0.96;
  font-size: clamp(2.6rem, 6vw, 5.4rem);
}
.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  color: var(--gold);
}
.text-soft { color: var(--ink-soft); }
.text-dim { color: var(--ink-dim); }
.text-ink { color: var(--ink); }
.text-gold { color: var(--gold); }
.text-gold-bright { color: var(--gold-bright); }
.text-violet-soft { color: var(--violet-300); }

.font-400 { font-weight: 400; }
.font-500 { font-weight: 500; }
.font-600 { font-weight: 600; }
.font-700 { font-weight: 700; }
.font-800 { font-weight: 800; }

/* ----------------------- Liquid glass ----------------------- */
.glass {
  background: var(--surface);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
}
.glass-strong {
  background: var(--surface-strong);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.92), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
}
/* Cristal con orla dorada (para destacados) */
.glass-gold {
  background: linear-gradient(160deg, rgba(216,180,106,0.10), rgba(26,22,38,0.55));
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--line-gold);
  box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  border-radius: var(--radius);
}
.hairline { border-color: var(--line); }

/* Lift + glow de borde bajo el cursor (spotlight) */
.lift {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s;
  will-change: transform;
}
.lift:hover {
  transform: translateY(-6px);
  border-color: rgba(216, 180, 106, 0.38);
  box-shadow: 0 34px 70px -28px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(216,180,106,0.10), inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
.spotlight { position: relative; overflow: hidden; }
.spotlight::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, -20%), rgba(242, 220, 160, 0.16), rgba(167, 139, 250, 0.08) 40%, transparent 62%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
  z-index: 0;
}
.spotlight:hover::before { opacity: 1; }
.spotlight > * { position: relative; z-index: 1; }

/* ----------------------- Botones ----------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.78rem 1.4rem;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s, background 0.3s, border-color 0.3s;
  user-select: none;
}
.btn:active { transform: translateY(1px) scale(0.985); }
/* PRIMARIO = oro (CTA de lujo, protagonista) */
.btn-primary, .btn-gold {
  color: #241803;
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 48%, var(--gold-deep) 100%);
  box-shadow: 0 16px 36px -16px rgba(168, 127, 46, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn-primary:hover, .btn-gold:hover {
  box-shadow: 0 22px 48px -16px rgba(216, 180, 106, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  filter: brightness(1.04);
}
/* Secundario = púrpura royal */
.btn-violet {
  color: #fff;
  background: linear-gradient(135deg, var(--violet) 0%, var(--violet-700) 100%);
  box-shadow: 0 14px 34px -14px rgba(109, 40, 217, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn-violet:hover { box-shadow: 0 20px 44px -14px rgba(124, 58, 237, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.28); }
.btn-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(216, 180, 106, 0.4); }
.btn-outline-gold {
  color: var(--gold-bright);
  background: rgba(216, 180, 106, 0.06);
  border-color: var(--line-gold);
}
.btn-outline-gold:hover { background: rgba(216, 180, 106, 0.14); border-color: rgba(216, 180, 106, 0.55); }
.btn-block { width: 100%; }
.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.82rem; border-radius: 11px; }
.btn-lg { padding: 0.95rem 1.7rem; font-size: 1rem; border-radius: 16px; }

/* ----------------------- Forms ----------------------- */
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.label { font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); }
.input, .select, .textarea {
  width: 100%;
  background: rgba(8, 7, 12, 0.6);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: 13px;
  padding: 0.8rem 0.95rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
  outline: none;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-dim); }
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(216, 180, 106, 0.6);
  box-shadow: 0 0 0 4px rgba(216, 180, 106, 0.14);
  background: rgba(12, 10, 18, 0.85);
}
.select option { background: #14111c; color: var(--ink); }
.help { font-size: 0.76rem; color: var(--ink-dim); }
.error-text { font-size: 0.78rem; color: var(--rose); }

/* ----------------------- Chips / badges ----------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-soft);
}
.chip-violet { color: var(--violet-300); border-color: rgba(167, 139, 250, 0.4); background: rgba(109, 40, 217, 0.14); }
.chip-gold { color: var(--gold-bright); border-color: rgba(216, 180, 106, 0.42); background: rgba(216, 180, 106, 0.12); }
.chip-emerald { color: var(--emerald); border-color: rgba(74, 222, 128, 0.35); background: rgba(74, 222, 128, 0.1); }
.chip-rose { color: var(--rose); border-color: rgba(251, 113, 133, 0.35); background: rgba(251, 113, 133, 0.1); }
.chip-amber { color: var(--amber); border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.1); }
.chip-sky { color: var(--sky); border-color: rgba(96, 165, 250, 0.35); background: rgba(96, 165, 250, 0.1); }

.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.live { background: var(--emerald); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); animation: pulse 2s infinite; }

/* Icono en burbuja de cristal (para bloques explicativos) */
.icon-orb {
  width: 46px; height: 46px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  background: linear-gradient(160deg, rgba(216,180,106,0.18), rgba(109,40,217,0.10));
  border: 1px solid var(--line-gold);
  color: var(--gold-bright);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}
.icon-orb.violet { background: linear-gradient(160deg, rgba(167,139,250,0.22), rgba(76,29,149,0.12)); border-color: rgba(167,139,250,0.35); color: var(--violet-300); }
.icon-orb.emerald { background: linear-gradient(160deg, rgba(74,222,128,0.20), rgba(16,80,48,0.12)); border-color: rgba(74,222,128,0.3); color: var(--emerald); }

/* ----------------------- Animaciones ----------------------- */
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.45); } 70% { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes glowPulse { 0%,100% { opacity: 0.55; } 50% { opacity: 1; } }

.float { animation: float 7s ease-in-out infinite; }
.spin-slow { animation: spinSlow 22s linear infinite; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }

.shimmer {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.12) 37%, rgba(255,255,255,0.04) 63%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}

/* Texto con degradado oro (titulares de lujo) */
.gradient-gold {
  background: linear-gradient(100deg, var(--gold-bright) 0%, var(--gold) 45%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gradient-ink {
  background: linear-gradient(110deg, #fff 6%, var(--gold-bright) 52%, var(--gold-deep) 108%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gradient-violet {
  background: linear-gradient(110deg, #fff 6%, var(--violet-300) 55%, var(--gold) 115%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Marquee de logos / texto */
.marquee { display: flex; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap: 3rem; white-space: nowrap; animation: marquee 28s linear infinite; }

/* Divider con destello dorado */
.divider-gold { height: 1px; background: linear-gradient(90deg, transparent, rgba(216,180,106,0.45), transparent); }

/* ----------------------- Layout dashboard ----------------------- */
.app-shell { display: flex; min-height: 100dvh; }
.sidebar {
  /* Cápsula flotante: separada de los bordes con esquinas muy redondeadas */
  position: fixed; top: 16px; left: 16px; bottom: 16px; z-index: 40;
  width: 84px;
  display: flex; flex-direction: column;
  padding: 16px 12px;
  background: linear-gradient(180deg, rgba(16,13,26,0.92), rgba(10,8,16,0.95));
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 34px 80px -34px rgba(0,0,0,0.92), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), background 0.35s, box-shadow 0.35s;
  overflow: hidden;
}
.sidebar.expanded, .sidebar:hover {
  width: 256px;
  /* Cristal: fondo translucido + blur fuerte para ver el contenido difuminado detras */
  background: linear-gradient(180deg, rgba(18, 15, 30, 0.55), rgba(11, 9, 18, 0.64));
  backdrop-filter: blur(36px) saturate(155%);
  -webkit-backdrop-filter: blur(36px) saturate(155%);
  border-color: var(--line-strong);
  box-shadow: 0 44px 96px -32px rgba(0, 0, 0, 0.94), inset 0 1px 0 rgba(255,255,255,0.07);
}
.sidebar .nav-label { opacity: 0; white-space: nowrap; transition: opacity 0.25s; }
.sidebar.expanded .nav-label, .sidebar:hover .nav-label { opacity: 1; }

/* Marca del sidebar: medallon (favicon) colapsado -> logo completo al expandir */
.sidebar-brand { display: flex; align-items: center; height: 40px; }
.sidebar-brand-full { display: none; opacity: 0; transition: opacity 0.25s ease 0.05s; }
.sidebar.expanded .sidebar-brand-mark, .sidebar:hover .sidebar-brand-mark { display: none; }
.sidebar.expanded .sidebar-brand-full, .sidebar:hover .sidebar-brand-full { display: block; opacity: 1; }
.sidebar .nav-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; margin: 4px -4px; padding: 0 4px; }
.sidebar .nav-scroll::-webkit-scrollbar { width: 0; }

/* Encabezado de grupo en sidebar */
.nav-group {
  font-family: var(--font-display);
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-dim);
  padding: 16px 13px 7px;
  white-space: nowrap;
  opacity: 0; transition: opacity 0.25s;
}
.sidebar.expanded .nav-group, .sidebar:hover .nav-group { opacity: 0.85; }
/* Cuando está colapsado, el grupo se vuelve una línea fina */
.nav-group-line { height: 1px; background: var(--line); margin: 12px 10px 8px; opacity: 1; transition: opacity 0.25s; }
.sidebar.expanded .nav-group-line, .sidebar:hover .nav-group-line { opacity: 0; height: 0; margin: 0 10px; }

.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 13px; border-radius: 13px; color: var(--ink-soft);
  text-decoration: none; font-weight: 600; font-size: 0.88rem;
  transition: background 0.2s, color 0.2s;
  margin-bottom: 3px;
}
.nav-item i { font-size: 1.3rem; min-width: 24px; text-align: center; }
.nav-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--ink); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.32), rgba(109, 40, 217, 0.08));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 18%; bottom: 18%; width: 3px; border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
  box-shadow: 0 0 12px rgba(216,180,106,0.7);
}
.nav-item.active i { color: var(--gold-bright); }
.nav-badge { margin-left: auto; font-size: 0.66rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--violet); color: #fff; }

/* Deja hueco para la cápsula flotante del sidebar (16 + ancho + 16 de gap) */
.app-main { flex: 1; margin-left: 116px; min-width: 0; transition: margin-left 0.35s cubic-bezier(0.16,1,0.3,1); }
.app-shell.pinned .app-main { margin-left: 288px; }
.topbar {
  /* Cápsula flotante horizontal */
  position: sticky; top: 16px; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  margin: 16px 16px 0;
  padding: 12px 18px;
  background: rgba(13, 11, 22, 0.72);
  backdrop-filter: blur(24px) saturate(145%); -webkit-backdrop-filter: blur(24px) saturate(145%);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 26px 60px -32px rgba(0, 0, 0, 0.88), inset 0 1px 0 rgba(255,255,255,0.04);
}

/* Encabezado de página con bloque explicativo */
.page-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }

/* Bottom nav móvil tipo cápsula */
.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 45;
  display: none; align-items: center; gap: 4px;
  padding: 8px; border-radius: 22px;
  background: var(--surface-strong);
  backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px);
  border: 1px solid var(--line-strong);
  box-shadow: 0 22px 50px -20px rgba(0,0,0,0.85);
}
.bottom-nav a, .bottom-nav button { color: var(--ink-dim); padding: 10px; border-radius: 14px; display: flex; border: none; background: none; cursor: pointer; }
.bottom-nav a i, .bottom-nav button i { font-size: 1.4rem; }
.bottom-nav a.active, .bottom-nav button.active { color: var(--gold-bright); background: rgba(109, 40, 217, 0.3); }

/* Menú móvil completo (bottom sheet) */
.mobile-menu-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(4, 3, 8, 0.62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.mobile-menu-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
  max-height: 84dvh; overflow-y: auto;
  background: var(--surface-strong);
  backdrop-filter: blur(30px) saturate(150%); -webkit-backdrop-filter: blur(30px) saturate(150%);
  border-top: 1px solid var(--line-strong);
  border-radius: 26px 26px 0 0;
  padding: 12px 16px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -24px 60px -20px rgba(0, 0, 0, 0.92);
}
.mm-grabber { width: 44px; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); margin: 4px auto 14px; }
.mobile-menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mm-item { display: flex; align-items: center; gap: 11px; padding: 13px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); color: var(--ink-soft); font-size: 0.88rem; font-weight: 600; transition: background 0.2s, border-color 0.2s; }
.mm-item:hover { background: rgba(255, 255, 255, 0.06); }
.mm-item.active { color: var(--gold-bright); border-color: var(--line-gold); background: rgba(216, 180, 106, 0.08); }
.mm-item i { font-size: 1.2rem; flex-shrink: 0; }

/* Tablas */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-dim); padding: 12px 14px; font-weight: 700; }
.table td { padding: 13px 14px; border-top: 1px solid var(--line); font-size: 0.9rem; }
.table tbody tr { transition: background 0.2s; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }

/* Stat tile */
.stat-tile { padding: 18px 20px; border-radius: 18px; }
.stat-value { font-family: var(--font-serif); font-weight: 600; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.01em; }
.stat-label { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-dim); font-weight: 700; }

/* Mini barra de progreso */
.progress { height: 8px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); }
.progress.violet > span { background: linear-gradient(90deg, var(--violet), var(--violet-400)); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(216, 180, 106, 0.30); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(216, 180, 106, 0.5); background-clip: content-box; }

/* Modales */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(4, 3, 8, 0.72); backdrop-filter: blur(6px); }

/* Toggle */
.toggle { width: 50px; height: 28px; border-radius: 999px; background: rgba(255,255,255,0.12); position: relative; transition: background 0.25s; cursor: pointer; border: 1px solid var(--line-strong); }
.toggle.on { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.25s cubic-bezier(0.16,1,0.3,1); }
.toggle.on::after { transform: translateX(22px); }

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

/* ----------------------- Árbol binario (org-chart) ----------------------- */
.btree-wrap { overflow-x: auto; padding: 8px 4px 24px; }
.btree { display: inline-flex; min-width: 100%; justify-content: center; }
.btree ul { position: relative; display: flex; padding-top: 28px; margin: 0; padding-left: 0; list-style: none; }
.btree li { list-style: none; position: relative; padding: 28px 10px 0; text-align: center; }
/* Conectores */
.btree li::before, .btree li::after {
  content: ''; position: absolute; top: 0; right: 50%;
  border-top: 2px solid var(--line-strong); width: 50%; height: 28px;
}
.btree li::after { right: auto; left: 50%; border-left: 2px solid var(--line-strong); }
.btree li:only-child::after, .btree li:only-child::before { display: none; }
.btree li:only-child { padding-top: 0; }
.btree li:first-child::before, .btree li:last-child::after { border: 0 none; }
.btree li:last-child::before { border-right: 2px solid var(--line-strong); border-radius: 0 8px 0 0; }
.btree li:first-child::after { border-radius: 8px 0 0 0; }
.btree ul ul::before {
  content: ''; position: absolute; top: 0; left: 50%;
  border-left: 2px solid var(--line-strong); width: 0; height: 28px;
}
.btree > ul { padding-top: 0; }

/* Nodo */
.bnode {
  position: relative; display: inline-flex; flex-direction: column; align-items: center;
  width: 132px; padding: 12px 10px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,0.05);
  cursor: pointer; transition: transform 0.2s, border-color 0.2s, box-shadow 0.3s;
}
.bnode:hover { transform: translateY(-3px); border-color: rgba(216,180,106,0.4); box-shadow: 0 18px 40px -20px rgba(0,0,0,0.8), 0 0 0 1px rgba(216,180,106,0.15); }
.bnode.is-you { border-color: rgba(216,180,106,0.6); background: linear-gradient(160deg, rgba(216,180,106,0.14), rgba(26,22,38,0.6)); }
.bnode.is-corporate { border-color: rgba(167,139,250,0.5); }
.bnode-ava {
  width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; margin-bottom: 7px; color: #241803;
  background: linear-gradient(135deg, #44403a, #2a2622); color: var(--ink-dim);
}
.bnode.active .bnode-ava { background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep)); color: #241803; }
.bnode.is-you .bnode-ava { background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep)); color: #241803; box-shadow: 0 0 0 3px rgba(216,180,106,0.25); }
.bnode-name { font-weight: 700; font-size: 0.82rem; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bnode-sub { font-size: 0.66rem; color: var(--ink-dim); margin-top: 2px; }
.bnode-tag { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); font-size: 0.58rem; font-weight: 700; letter-spacing: 0.06em; padding: 1px 7px; border-radius: 999px; text-transform: uppercase; }
.bnode-tag.you { background: var(--gold); color: #241803; }
.bnode-tag.left { background: rgba(96,165,250,0.18); color: var(--sky); border: 1px solid rgba(96,165,250,0.3); }
.bnode-tag.right { background: rgba(251,146,60,0.18); color: #fdba74; border: 1px solid rgba(251,146,60,0.3); }
.bnode-toggle { position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 22px; height: 22px; border-radius: 50%; background: var(--violet); color:#fff; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; border: 2px solid var(--bg-1); box-shadow: 0 4px 10px -2px rgba(0,0,0,0.6); }

/* Slot vacío */
.bnode-empty {
  width: 132px; padding: 16px 10px; border-radius: 16px; cursor: pointer;
  border: 2px dashed var(--line-strong); background: rgba(255,255,255,0.015);
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--ink-dim); transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.bnode-empty:hover { border-color: rgba(216,180,106,0.5); color: var(--gold-bright); background: rgba(216,180,106,0.05); }
.bnode-empty i { font-size: 1.5rem; }
.bnode-empty span { font-size: 0.64rem; font-weight: 600; }

@media (max-width: 900px) {
  .sidebar { display: none; }
  .app-main { margin-left: 0; padding-bottom: 90px; }
  .bottom-nav { display: flex; }
}

/* Google Translate: ocultar widgets nativos */
.goog-te-banner-frame, .goog-te-gadget, #google_translate_element, .skiptranslate { display: none !important; }
body { top: 0 !important; }
.goog-te-spinner-pos { display: none !important; }
