/* ==========================================================================
   Sustainable Income Project (SIP) - Luxury Design System & Styling
   Colors: Navy Blue (#0A2540), Gold (#FFD700 / #D4AF37), Pure White (#FFFFFF)
   Typography: Poppins & Montserrat
   ========================================================================== */

:root {
  --bg-dark: #061526;
  --bg-navy: #0A2540;
  --bg-navy-light: #103358;
  --bg-card: rgba(16, 51, 88, 0.5);
  --bg-card-hover: rgba(22, 65, 110, 0.7);
  
  --gold-primary: #FFD700;
  --gold-secondary: #D4AF37;
  --gold-light: #FFE57F;
  --gold-gradient: linear-gradient(135deg, #FFE57F 0%, #FFD700 50%, #B8860B 100%);
  --gold-glow: rgba(255, 215, 0, 0.35);
  
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dark: #0A2540;
  
  --glass-bg: rgba(10, 37, 64, 0.75);
  --glass-border: rgba(255, 215, 0, 0.2);
  --glass-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --transition-fast: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --font-body: 'Poppins', sans-serif;
  --font-heading: 'Montserrat', sans-serif;
}

/* Reset & Global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 10% 20%, rgba(255, 215, 0, 0.05) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(10, 37, 64, 0.8) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

.text-gold {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-gradient {
  background: linear-gradient(135deg, #FFFFFF 0%, #CBD5E1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: var(--radius-full);
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid var(--glass-border);
  color: var(--gold-primary);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-normal);
  border: none;
  outline: none;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.btn-gold {
  background: var(--gold-gradient);
  color: var(--text-dark);
  box-shadow: 0 8px 25px var(--gold-glow);
}

.btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(255, 215, 0, 0.5);
  filter: brightness(1.08);
}

.btn-gold:active {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  background: rgba(255, 215, 0, 0.1);
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  transform: translateY(-3px);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.875rem;
}

/* Header & Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(6, 21, 38, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.85rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.5px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--gold-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  font-size: 1.25rem;
  box-shadow: 0 4px 15px var(--gold-glow);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition-fast);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--gold-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold-gradient);
  transition: var(--transition-fast);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
}

/* HERO SECTION (Attention) */
.hero {
  position: relative;
  min-height: 100vh;
  padding-top: 140px;
  padding-bottom: 80px;
  display: flex;
  align-items: center;
  background: radial-gradient(circle at 50% 30%, rgba(16, 51, 88, 0.6) 0%, var(--bg-dark) 70%);
  overflow: hidden;
}

.hero-bg-visual {
  position: absolute;
  top: 0;
  right: -5%;
  width: 55%;
  height: 100%;
  background-image: url('../images/hero_bg.png');
  background-size: cover;
  background-position: center;
  opacity: 0.45;
  mask-image: radial-gradient(circle, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 80%);
  -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 80%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero-content h1 {
  font-size: 3.2rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.hero-content p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  padding: 1rem;
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  transition: var(--transition-fast);
}

.stat-card:hover {
  border-color: var(--gold-primary);
  transform: translateY(-4px);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--gold-primary);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.hero-visual-box {
  position: relative;
}

.hero-card-floating {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.hero-card-floating::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,215,0,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.pamm-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 215, 0, 0.15);
  border-radius: var(--radius-full);
  color: var(--gold-primary);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* SECTION TITLES */
.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 3.5rem auto;
}

.section-header h2 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* INTEREST SECTION (Tentang SIP & PAMM) */
.interest-section {
  padding: 100px 0;
  position: relative;
}

.pamm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  backdrop-filter: blur(12px);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--gold-primary);
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--gold-primary);
  margin-bottom: 1.5rem;
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Infographic Box */
.infographic-box {
  background: linear-gradient(135deg, rgba(10, 37, 64, 0.9) 0%, rgba(16, 51, 88, 0.9) 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  margin-bottom: 4rem;
  box-shadow: var(--glass-shadow);
}

.infographic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.flow-step-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.flow-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(6, 21, 38, 0.6);
  padding: 1.2rem;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--gold-primary);
}

.flow-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: var(--text-dark);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Video Profile Box */
.video-box {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* DESIRE SECTION (Manfaat, Growth Chart, Testimonial) */
.desire-section {
  padding: 100px 0;
  background: radial-gradient(circle at 80% 20%, rgba(16, 51, 88, 0.4) 0%, transparent 60%);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.benefit-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  text-align: center;
  transition: var(--transition-fast);
}

.benefit-card:hover {
  border-color: var(--gold-primary);
  transform: translateY(-5px);
  background: var(--bg-card-hover);
}

.benefit-icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.benefit-card h4 {
  font-size: 1.15rem;
  color: var(--gold-primary);
  margin-bottom: 0.5rem;
}

.benefit-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Growth Calculator Card */
.calculator-box {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  backdrop-filter: blur(16px);
  margin-bottom: 5rem;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2.5rem;
  align-items: center;
  width: 100%;
}

.calc-grid > * {
  min-width: 0;
  width: 100%;
}

.chart-container-box {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 350px;
  overflow: hidden;
}

.chart-container-box canvas {
  width: 100% !important;
  max-width: 100% !important;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  word-break: break-word;
}

.form-control, .form-range {
  width: 100%;
  padding: 12px 16px;
  background: rgba(6, 21, 38, 0.8);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
}

.form-control:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
}

.calc-summary-card {
  background: rgba(6, 21, 38, 0.9);
  border: 1px solid var(--gold-primary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 1rem;
  word-break: break-word;
}

.calc-result-value {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--gold-primary);
  word-break: break-word;
}

/* Testimonials */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
}

.testimonial-card p {
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: var(--text-dark);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* FAQ & ACTION SECTION */
.action-section {
  padding: 100px 0 60px 0;
}

.faq-container {
  max-width: 850px;
  margin: 0 auto 5rem auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: var(--transition-fast);
}

.faq-item.active {
  border-color: var(--gold-primary);
  background: var(--bg-card-hover);
}

.faq-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
}

.faq-icon {
  font-size: 1.2rem;
  color: var(--gold-primary);
  transition: var(--transition-fast);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-body {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out, padding 0.35s ease-out;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.faq-item.active .faq-body {
  padding: 0 1.5rem 1.25rem 1.5rem;
  max-height: 400px;
}

/* Final CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, #0A2540 0%, #103358 100%);
  border: 1px solid var(--gold-primary);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px var(--gold-glow);
  position: relative;
  overflow: hidden;
}

.cta-banner h2 {
  font-size: 2.6rem;
  margin-bottom: 1rem;
}

.cta-banner p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 2rem auto;
}

/* Footer */
footer {
  background: #040E1B;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 50px 0 30px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: var(--text-main);
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a:hover {
  color: var(--gold-primary);
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
}

/* Floating Back-to-Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  box-shadow: 0 10px 25px var(--gold-glow);
  cursor: pointer;
  border: none;
  outline: none;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px) scale(1.08);
  box-shadow: 0 15px 35px rgba(255, 215, 0, 0.6);
}

/* MODAL SYSTEM (Referral Tree & Admin CMS) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 14, 27, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
  padding: 1.5rem;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--bg-navy);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

.modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.3rem;
  color: var(--gold-primary);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-close:hover {
  color: #FF4D4D;
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

/* Pohon Referral Toolbar & Controls */
.tree-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.8rem 1.2rem;
  background: rgba(6, 21, 38, 0.7);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  margin-bottom: 1.2rem;
}

.tree-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.btn-tree-ctrl {
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: #FFF;
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-tree-ctrl:hover {
  background: rgba(255, 215, 0, 0.2);
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

.btn-tree-ctrl.gold {
  background: rgba(255, 215, 0, 0.15);
  color: var(--gold-primary);
  border-color: var(--gold-primary);
}

.btn-tree-ctrl.gold:hover {
  background: var(--gold-primary);
  color: var(--text-dark);
}

/* Pohon Referral Specific UI (Ultra-Responsive & Center-Aligned) */
.tree-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2.2rem 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: radial-gradient(circle at center, rgba(10, 37, 64, 0.7) 0%, rgba(3, 11, 20, 0.98) 100%);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}

#tree-viewport-inner {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  min-width: max-content;
  margin: 0 auto;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: top center;
}

.tree-node-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 0 0.5rem;
}

.tree-node {
  background: var(--bg-card);
  border: 2px solid var(--gold-primary);
  border-radius: var(--radius-md);
  padding: 0.8rem 0.9rem;
  text-align: center;
  width: 165px;
  max-width: 180px;
  position: relative;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.6);
  transition: var(--transition-fast);
  z-index: 3;
}

.tree-node:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px var(--gold-glow);
  border-color: #FFE57F;
}

.tree-node.root {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25) 0%, rgba(10, 37, 64, 0.95) 100%);
  border: 2.5 solid #FFD700;
  box-shadow: 0 10px 30px var(--gold-glow);
  width: 185px;
  max-width: 200px;
}

.tree-node-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-node-code {
  font-size: 0.72rem;
  color: var(--gold-primary);
  margin-top: 2px;
  font-weight: 600;
}

.tree-card-row {
  margin-top: 6px;
  text-align: center;
}

.tree-card-row .row-label {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.tree-node-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 215, 0, 0.15);
  color: var(--gold-primary);
  border: 1px solid rgba(255, 215, 0, 0.4);
  width: 100%;
  box-sizing: border-box;
}

.tree-node-whatsapp {
  font-size: 0.76rem;
  font-weight: 600;
  color: #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(37, 211, 102, 0.1);
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(37, 211, 102, 0.3);
}

.tree-node-whatsapp i {
  color: #25D366; /* WhatsApp Green */
  font-size: 0.88rem;
}

/* CRISP EXPLICIT DIRECTIONAL PIPELINES & ARROWS */
.tree-connector-line {
  width: 3px;
  height: 18px;
  background: #FFD700;
  box-shadow: 0 0 8px var(--gold-glow);
  margin: 0 auto;
  z-index: 2;
}

.tree-arrow-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFD700;
  color: #061526;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  margin: 0 auto;
  z-index: 4;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
  border: 1px solid #FFF;
}

.tree-children {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  margin-top: 0;
  padding-top: 0;
  width: 100%;
}

/* Bright Gold Horizontal Bar across Sister Children */
.tree-children::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #FFD700;
  box-shadow: 0 0 10px var(--gold-glow);
  z-index: 1;
}

/* Trim left overhang for first child */
.tree-children > .tree-node-wrapper:first-child::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 0;
  width: 50%;
  height: 6px;
  background: #030B14;
  z-index: 2;
}

/* Trim right overhang for last child */
.tree-children > .tree-node-wrapper:last-child::before {
  content: '';
  position: absolute;
  top: -3px;
  right: 0;
  width: 50%;
  height: 6px;
  background: #030B14;
  z-index: 2;
}

/* Hide horizontal line if only child */
.tree-children > .tree-node-wrapper:only-child::before {
  display: none;
}

/* VERTICAL COMPACT LIST LAYOUT MODE */
.tree-compact-mode #tree-viewport-inner {
  flex-direction: column;
  align-items: stretch;
  min-width: 100%;
}

.tree-compact-mode .tree-node-wrapper {
  align-items: flex-start;
  padding: 0;
  margin-bottom: 0.75rem;
  width: 100%;
}

.tree-compact-mode .tree-node {
  width: 100% !important;
  max-width: 100% !important;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
}

.tree-compact-mode .tree-children {
  flex-direction: column;
  padding-top: 0;
  padding-left: 1.5rem;
  border-left: 2px dashed var(--gold-primary);
  margin-top: 0.5rem;
  margin-left: 1rem;
  width: calc(100% - 1rem);
}

.tree-compact-mode .tree-children > .tree-node-wrapper::before,
.tree-compact-mode .tree-connector-line,
.tree-compact-mode .tree-arrow-badge {
  display: none;
}

.btn-add-downline {
  margin-top: 8px;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: rgba(255, 215, 0, 0.15);
  color: var(--gold-primary);
  border: 1px solid var(--gold-primary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-add-downline:hover {
  background: var(--gold-primary);
  color: var(--text-dark);
}

/* Tabs System for Admin */
.admin-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 1.5rem;
}

.admin-tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition-fast);
}

.admin-tab-btn.active {
  color: var(--gold-primary);
  border-bottom-color: var(--gold-primary);
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
}

/* Table Style */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.admin-table th, .admin-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
  font-size: 0.9rem;
}

.admin-table th {
  background: rgba(6, 21, 38, 0.6);
  color: var(--gold-primary);
  font-family: var(--font-heading);
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.status-badge.active {
  background: rgba(16, 185, 129, 0.2);
  color: #10B981;
}

.status-badge.full {
  background: rgba(239, 68, 68, 0.2);
  color: #EF4444;
}

/* Alert Notification Banner */
.alert-banner {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #EF4444;
  color: #FCA5A5;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Image Upload Preview */
.upload-preview-box {
  width: 100%;
  height: 160px;
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem;
  overflow: hidden;
  background: rgba(6, 21, 38, 0.4);
}

.upload-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
  .hero-grid, .infographic-grid, .calc-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .pamm-grid, .testimonial-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(6, 21, 38, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 2rem;
    transition: var(--transition-normal);
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .mobile-toggle {
    display: block;
  }
  
  .hero-content h1 {
    font-size: 2.2rem;
  }
  
  .pamm-grid, .testimonial-grid, .benefits-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .calculator-box {
    padding: 1.5rem 1rem;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }

  .chart-container-box {
    height: 260px;
  }
}

@media (max-width: 480px) {
  .calculator-box {
    padding: 1.25rem 0.75rem;
  }

  .calc-summary-card {
    padding: 0.85rem;
  }

  .chart-container-box {
    height: 220px;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta-group .btn {
    width: 100%;
  }
}

/* ==========================================================================
   TOAST NOTIFICATION SYSTEM
   ========================================================================== */

#sip-toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 360px;
  width: calc(100vw - 40px);
}

.sip-toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 8px 32px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.06);
  pointer-events: all;
  animation: toastSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  position: relative;
  overflow: hidden;
}

.sip-toast::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.sip-toast.toast-success {
  background: rgba(6, 26, 16, 0.92);
  border-color: rgba(16, 185, 129, 0.35);
}
.sip-toast.toast-success::before { background: #10B981; }

.sip-toast.toast-error {
  background: rgba(30, 8, 8, 0.92);
  border-color: rgba(239, 68, 68, 0.35);
}
.sip-toast.toast-error::before { background: #EF4444; }

.sip-toast.toast-warning {
  background: rgba(26, 18, 4, 0.92);
  border-color: rgba(255, 215, 0, 0.35);
}
.sip-toast.toast-warning::before { background: var(--gold-primary); }

.sip-toast.toast-info {
  background: rgba(6, 21, 38, 0.92);
  border-color: rgba(59, 130, 246, 0.35);
}
.sip-toast.toast-info::before { background: #3B82F6; }

.toast-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.toast-success .toast-icon { color: #10B981; }
.toast-error   .toast-icon { color: #EF4444; }
.toast-warning .toast-icon { color: var(--gold-primary); }
.toast-info    .toast-icon { color: #3B82F6; }

.toast-body { flex: 1; }

.toast-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-main);
  margin-bottom: 2px;
  letter-spacing: 0.01em;
}

.toast-msg {
  font-size: 0.81rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.2s;
  margin-top: 1px;
}
.toast-close:hover { color: var(--text-main); }

.toast-progress {
  position: absolute;
  bottom: 0; left: 0;
  height: 3px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  animation: toastProgress 4s linear forwards;
}
.toast-success .toast-progress { background: #10B981; }
.toast-error   .toast-progress { background: #EF4444; }
.toast-warning .toast-progress { background: var(--gold-primary); }
.toast-info    .toast-progress { background: #3B82F6; }

.sip-toast.toast-exit {
  animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(110%); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastSlideOut {
  from { opacity: 1; transform: translateX(0); max-height: 120px; margin-bottom: 0; }
  to   { opacity: 0; transform: translateX(110%); max-height: 0; margin-bottom: -10px; }
}

@keyframes toastProgress {
  from { width: 100%; }
  to   { width: 0%; }
}

/* Form field validation state */
.form-control.is-invalid {
  border-color: #EF4444 !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.2) !important;
  animation: shakeInput 0.4s ease;
}
.form-control.is-valid {
  border-color: #10B981 !important;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15) !important;
}

.field-error-msg {
  color: #EF4444;
  font-size: 0.75rem;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  animation: fadeInDown 0.2s ease;
}

@keyframes shakeInput {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-6px); }
  40%     { transform: translateX(6px); }
  60%     { transform: translateX(-4px); }
  80%     { transform: translateX(4px); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

