/* 🔥 ELITE FIX: BACKGROUND TOPBAR DI-SINKRON SAMA SIDEBAR (UNGU MATRIX) */
.tpb-container, #topbar-module {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 72px !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px !important;
  
  /* INI YANG BIKIN SAMA KAYAK SIDEBAR LU BRO */
  background: linear-gradient(180deg, rgba(15, 8, 30, 0.9) 0%, rgba(2, 0, 5, 0.95) 100%) !important; 
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  
  border-bottom: 1px solid rgba(168, 85, 247, 0.15); /* Garis ungu bawah */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 10000 !important; 
  box-sizing: border-box !important;
}

.sidebar, .sidebar:hover {
  top: 72px !important; 
  bottom: 0 !important; /* 🔥 ELITE FIX: Paksa mentok bawah layar */
  height: auto !important; /* Buang calc(100vh - 72px) yang bikin error */
  z-index: 9999 !important;
}

/* 🔥 ELITE FIX: KONTEN AMAN DI BAWAH TOPBAR & KANAN SIDEBAR */
.content {
  margin-left: 280px !important; 
  padding-top: 72px !important; 
  min-height: 100vh !important; 
  display: block !important; 
  z-index: 1; 
  background: transparent !important;
  box-sizing: border-box !important;
}

/* --- LOGO GAMBAR GLOW (Pewarnaan dari lu) --- */
.tpb-brand {
  font-family: 'Inter', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
  cursor: pointer;
}

.tpb-accent {
  color: #c084fc;
  text-shadow: 0 0 16px rgba(192, 132, 252, 0.5);
}

.tpb-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain; 
  border-radius: 6px; 
  filter: drop-shadow(0 0 8px rgba(154, 6, 212, 0.6)); /* Glow Ungu dari lu */
  transition: all 0.3s ease;
}

.tpb-brand:hover .tpb-logo-img {
  transform: scale(1.1);
  filter: drop-shadow(0 0 12px rgba(119, 6, 212, 0.9)); /* Hover Ungu Tua dari lu */
}

/* --- MARKET INTEL (TENGAH) --- */
.tpb-center-intel {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 6px 20px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

.tpb-clock-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #a1a1aa;
  font-family: 'Inter', sans-serif;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding-right: 16px;
}

#tpb-live-time {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}

#tpb-live-date {
  font-size: 0.75rem;
  color: #06b6d4;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tpb-session-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #c084fc;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tpb-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c084fc;
  box-shadow: 0 0 10px #c084fc;
  animation: pulseDot 1.5s infinite ease-in-out;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* --- TOMBOL ICONS (KANAN) --- */
.tpb-nav-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tpb-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 8px;
}

.tpb-icon-btn {
  position: relative; 
  overflow: hidden; 
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #a1a1aa;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tpb-icon-btn.active, .tpb-icon-btn:hover {
  color: #ffffff;
  background: rgba(192, 132, 252, 0.15);
  border-color: #c084fc;
  box-shadow: 0 0 20px rgba(192, 132, 252, 0.2);
  transform: translateY(-2px);
}

.tpb-icon-btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.tpb-icon-btn.active::before, .tpb-icon-btn:hover::before { opacity: 1; }

.tpb-profile-btn {
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(192, 132, 252, 0.4);
}

.tpb-profile-btn.active, .tpb-profile-btn:hover {
  border-color: #06b6d4;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}

.tpb-avatar { width: 100%; height: 100%; object-fit: cover; }

/* --- VISIBILITY PAGE KONTEN --- */
.content .page {
  display: none;
  padding: 32px; 
  min-height: calc(100vh - 72px); 
  box-sizing: border-box;
  animation: eliteFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.content .page.active, .content .page[style*="display: block"] {
  display: block !important;
}

@keyframes eliteFadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- THE ULTIMATE MARKET INTEL BAR (CAPSULE STYLE) --- */
.tpb-center-intel {
  display: flex;
  align-items: center;
  gap: 12px; /* Jarak antar kapsul */
}

/* Style Dasar Kapsul */
.tpb-intel-capsule {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03); /* Glass base */
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px; /* Mirip radius icon btn lu */
  padding: 6px 14px;
  height: 40px; /* Tinggi disamain kyk icon btn lu */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.tpb-intel-capsule:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Label Kecil Abu-abu */
.tpb-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: #a1a1aa;
  letter-spacing: 1px;
}

/* Value Angka Bold */
.tpb-value {
  font-size: 0.95rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

/* 1. SYNC CAPSULE */
.tpb-intel-capsule.sync {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
}
.tpb-sync-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulseSync 2s infinite;
}
#tpb-sync-ping {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #22c55e;
}
@keyframes pulseSync {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* 2. TIME CAPSULE */
#tpb-live-time {
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}
.tpb-date-text {
  font-size: 0.7rem;
  color: #06b6d4;
  font-weight: 700;
  text-transform: uppercase;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 8px;
  margin-left: 2px;
}

/* 3. SESSION CAPSULE */
#tpb-live-session {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.tpb-pulse-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
}

/* 4. PNL CAPSULE */
.tpb-intel-capsule.pnl.positive {
  background: rgba(34, 197, 94, 0.05);
  border-color: rgba(34, 197, 94, 0.3);
}
.tpb-intel-capsule.pnl.positive .tpb-value {
  color: #22c55e;
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

.tpb-intel-capsule.pnl.negative {
  background: rgba(239, 83, 80, 0.05);
  border-color: rgba(239, 83, 80, 0.3);
  animation: dangerPulseBg 2s infinite;
}
.tpb-intel-capsule.pnl.negative .tpb-value {
  color: #ef5350;
  text-shadow: 0 0 10px rgba(239, 83, 80, 0.6);
}

/* 5. NEWS CAPSULE */
.tpb-intel-capsule.news.danger {
  background: rgba(250, 192, 36, 0.05);
  border-color: rgba(250, 192, 36, 0.3);
}
.tpb-intel-capsule.news i { color: #fbbf24; }
.tpb-intel-capsule.news .tpb-value {
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(250, 192, 36, 0.4);
}
.tpb-blink-icon {
  animation: pulseSync 1s infinite;
  filter: drop-shadow(0 0 5px #fbbf24);
}

@keyframes dangerPulseBg {
  0%, 100% { border-color: rgba(239, 83, 80, 0.3); }
  50% { border-color: rgba(239, 83, 80, 0.8); }
}

.text-gray-400 { color: #9ca3af; }