/* ==========================================================================
   COMPONENTS — ONYX LEARN!
   Mobile-First: Compact, Elegant, Intuitive
   ========================================================================== */

/* ---- NAVBAR ---- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 70px; z-index: 1000;
  transition: var(--transition-normal);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(120, 40, 240, 0.12);
  box-shadow: 0 4px 18px rgba(63, 10, 143, 0.05);
}
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(120, 40, 240, 0.18);
  box-shadow: 0 8px 30px rgba(63, 10, 143, 0.09);
}
.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Profile Dropdown Hover Effects */
.dropdown-item#navProfileDashboard:hover {
  background: var(--bg-card-hover);
  color: var(--accent-primary) !important;
}
.dropdown-item#navProfileLogout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444 !important;
}

.navbar-container {
  display: flex; align-items: center;
  justify-content: space-between; height: 100%;
}
.logo {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 1.35rem; font-weight: 800;
  letter-spacing: -0.02em; color: var(--text-primary);
  line-height: 1.25;
}
.logo img {
  display: block;
  flex-shrink: 0;
  vertical-align: middle;
}
.logo span {
  display: inline-flex;
  align-items: center;
  line-height: 1.25;
}
.logo-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; font-size: 1rem;
  box-shadow: var(--shadow-glow);
}
.nav-links {
  display: flex; align-items: center; gap: 1.75rem;
  position: relative;
}
.nav-link {
  font-weight: 600; font-size: 0.92rem;
  color: var(--text-secondary); transition: var(--transition-fast);
  position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--text-primary); }
.nav-indicator {
  position: absolute;
  bottom: -5px;
  height: 2px;
  background: var(--grad-primary);
  border-radius: var(--radius-full);
  transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
}
.nav-actions { display: flex; align-items: center; gap: 0.6rem; }
.theme-toggle {
  width: 38px; height: 38px; border-radius: var(--radius-full);
  background: rgba(120,40,240,0.08); border: 1px solid var(--border-color);
  color: var(--text-primary); display: flex; align-items: center;
  justify-content: center; transition: var(--transition-fast);
}
.theme-toggle:hover { background: rgba(120,40,240,0.15); transform: scale(1.05); }
.btn-nav-cta { font-size: 0.9rem; padding: 0.6rem 1.2rem; }
.mobile-menu-btn {
  display: none;
  background: rgba(120,40,240,0.08);
  border: 1px solid var(--border-color);
  color: var(--text-primary); padding: 0.4rem 0.55rem;
  border-radius: var(--radius-md);
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md); font-weight: 700;
  font-size: 0.95rem; transition: var(--transition-fast);
  cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--grad-primary); color: #fff; box-shadow: 0 4px 18px rgba(120,40,240,0.35); }
.btn-primary:hover { background: var(--grad-primary-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(120,40,240,0.5); }
.btn-secondary { background: rgba(120,40,240,0.08); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover { background: rgba(120,40,240,0.15); border-color: rgba(120,40,240,0.3); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--accent-primary); border: 1.5px solid var(--accent-primary); }
.btn-outline:hover { background: rgba(120,40,240,0.1); }
.btn-lg { padding: 0.9rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; }

/* ---- HERO ---- */
.hero { position: relative; padding: 100px 0 60px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.hero-content { z-index: 1; }
.hero-title {
  font-size: clamp(1.9rem, 4vw, 3.6rem);
  font-weight: 800; line-height: 1.18;
  letter-spacing: -0.03em; margin-bottom: 1rem;
}
.hero-desc { font-size: 1.05rem; color: var(--text-secondary); margin-bottom: 1.75rem; line-height: 1.65; }
.hero-actions { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.hero-stats {
  display: flex; align-items: center; gap: 2rem;
  padding-top: 1.5rem; border-top: 1px solid var(--border-color); flex-wrap: wrap;
}
.stat-item h4 { font-size: 1.5rem; font-weight: 800; }
.stat-item p { font-size: 0.82rem; color: var(--text-muted); }

/* Hero Card */
.hero-visual { position: relative; z-index: 1; padding: 1.5rem 0.5rem; }
.hero-card {
  background: var(--bg-card); border: 1px solid var(--border-card);
  border-radius: var(--radius-lg); padding: 1.8rem 1.5rem;
  box-shadow: var(--shadow-lg), var(--shadow-glow); position: relative;
}
.hero-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.2rem; padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border-color);
}
.dots { display: flex; gap: 5px; }
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-black { background: #1e293b; border: 1px solid rgba(255,255,255,0.15); }
.dot-red { background: #ef4444; }
.dot-gold { background: #f59e0b; }
.badge-live {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.78rem; font-weight: 600; color: #10b981;
  background: rgba(16,185,129,0.1); padding: 3px 8px;
  border-radius: var(--radius-full);
}
.badge-live-dot {
  width: 6px; height: 6px; background: #10b981;
  border-radius: 50%; box-shadow: 0 0 6px #10b981;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(1.3)} }
.hero-card-body { padding: 0.25rem 0; }
.hero-card-row {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 0.5rem; margin-bottom: 1rem;
}
.text-muted-sm { font-size: 0.78rem; color: var(--text-muted); display: block; margin-bottom: 2px; }
.hero-card-title { font-weight: 700; font-size: 1.05rem; }
.pill-badge {
  background: rgba(120,40,240,0.15); color: var(--accent-primary);
  padding: 3px 10px; border-radius: 20px; font-weight: 700;
  font-size: 0.78rem; white-space: nowrap; flex-shrink: 0;
}
.progress-wrap { margin-bottom: 1rem; }
.progress-label { display: flex; justify-content: space-between; font-size: 0.82rem; margin-bottom: 0.3rem; color: var(--text-secondary); }
.progress-track { width: 100%; height: 7px; background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden; }
.progress-fill { width: 98%; height: 100%; background: var(--grad-primary); border-radius: 4px; }
.hero-card-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.hero-card-col {
  background: rgba(120,40,240,0.05); padding: 0.75rem;
  border-radius: 10px; border: 1px solid var(--border-color);
  display: flex; flex-direction: column; gap: 3px;
}
.text-emerald { color: var(--accent-emerald); }
.text-cyan { color: var(--accent-secondary); }
.text-pink { color: var(--accent-pink); }
.fw-700 { font-weight: 700; }
.font-mono { font-family: var(--font-mono); }

/* Floating Badges */
.floating-badge {
  position: absolute; padding: 0.7rem 1rem;
  background: var(--bg-card); border: 1px solid var(--border-card);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 0.65rem; z-index: 10;
}
.floating-badge-1 { top: -26px; right: -18px; animation: float 4s ease-in-out infinite; }
.floating-badge-2 { bottom: -26px; left: -18px; animation: float 5s ease-in-out infinite 1s; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-7px)} }
.badge-icon-box {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 0.82rem; flex-shrink: 0;
}
.badge-emerald { background: var(--grad-emerald); }
.badge-indigo { background: var(--grad-primary); }
.badge-text { font-size: 0.86rem; font-weight: 700; display: block; }

/* ---- SECTIONS ---- */
.section { padding: 60px 0; position: relative; }
.section-alt { background: var(--bg-card); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.section-header-center { text-align: center; margin-bottom: 2.5rem; }
.section-title { font-size: clamp(1.6rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.22; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.section-subtitle { font-size: clamp(0.92rem, 2vw, 1.1rem); color: var(--text-secondary); max-width: 580px; margin: 0 auto; }
.section-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0.9rem; border-radius: var(--radius-full);
  background: rgba(120,40,240,0.12); border: 1px solid rgba(120,40,240,0.3);
  color: var(--accent-primary); font-size: 0.82rem; font-weight: 700; margin-bottom: 0.75rem;
}

/* ---- ABOUT ---- */
.about-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 2.5rem; align-items: start; }
.about-desc { font-size: 0.98rem; color: var(--text-secondary); line-height: 1.65; margin-bottom: 1.25rem; }
.about-mission { display: flex; flex-direction: column; gap: 0.65rem; }
.mission-item {
  display: flex; align-items: flex-start; gap: 0.6rem;
  font-size: 0.9rem; color: var(--text-secondary);
}
.mission-item svg { color: var(--accent-emerald); flex-shrink: 0; margin-top: 2px; }
.about-card { display: flex; flex-direction: column; gap: 0.75rem; }
.about-chip {
  background: rgba(120,40,240,0.08); border: 1px solid var(--border-color);
  padding: 0.85rem 1rem; border-radius: 12px; display: flex; flex-direction: column; gap: 2px;
}
.about-chip.accent-emerald { background: rgba(16,185,129,0.08); }
.chip-label { font-weight: 700; color: var(--accent-primary); font-size: 0.92rem; }
.about-chip.accent-emerald .chip-label { color: var(--accent-emerald); }
.about-chip small { font-size: 0.8rem; color: var(--text-muted); }

/* ---- FEATURES GRID ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border-card);
  border-radius: var(--radius-lg); padding: 1.5rem 1.25rem;
  transition: var(--transition-normal);
}
.feature-card:hover {
  background: var(--bg-card-hover); border-color: rgba(120,40,240,0.35);
  transform: translateY(-4px); box-shadow: var(--shadow-md);
}
.feature-icon-svg {
  width: 42px; height: 42px; border-radius: var(--radius-md);
  background: rgba(120,40,240,0.1); border: 1px solid rgba(120,40,240,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-primary); margin-bottom: 1rem;
  transition: var(--transition-fast);
}
.feature-card:hover .feature-icon-svg { background: var(--grad-primary); color: #fff; border-color: transparent; }
.feature-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.4rem; }
.feature-desc { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.45; }

/* Pricing Filters */
.filter-container { display: flex; flex-direction: column; align-items: center; gap: 0.85rem; margin-bottom: 2rem; }
.filter-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; justify-content: center; }
.filter-label { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.filter-wrap {
  display: inline-flex; align-items: center;
  background: transparent; padding: 0;
  border-radius: var(--radius-full); gap: 5px;
  flex-wrap: nowrap;
  user-select: none;
  -webkit-user-select: none;
}
.filter-btn {
  padding: 0.48rem 1.2rem; border-radius: var(--radius-full);
  font-size: 0.85rem; font-weight: 600; color: var(--text-secondary);
  background: transparent;
  border: 1.5px solid var(--border-color);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.filter-btn:hover { color: var(--text-primary); border-color: rgba(120,40,240,0.4); transform: translateY(-1px); }
.filter-btn:active { transform: scale(0.97); }
.filter-btn.active {
  background: var(--grad-primary); color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(120,40,240,0.35);
}

/* Format Info Cards — 2 options: Reguler & Private */
.format-comparison-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 2rem; }
.format-info-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-md); padding: 0.85rem 1rem;
  display: flex; align-items: center; gap: 0.75rem;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease,
              border-color 0.25s ease,
              box-shadow 0.25s ease;
  box-shadow: var(--shadow-sm);
  opacity: 0.45;
  transform: scale(0.985);
}
.format-info-card:hover { opacity: 0.85; transform: translateY(-1px); }
.format-info-card.active {
  opacity: 1;
  transform: scale(1.03);
  border-color: var(--accent-primary);
  box-shadow: 0 4px 18px rgba(120,40,240,0.18);
}
.format-info-card.active.format-is-reguler {
  border-color: var(--accent-secondary);
  box-shadow: 0 4px 18px rgba(6,182,212,0.18);
}
.format-info-card.active.format-is-private {
  border-color: var(--accent-primary);
  box-shadow: 0 4px 18px rgba(120,40,240,0.22);
}
.format-badge { display: inline-flex; font-size: 0.72rem; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-sm); flex-shrink: 0; }
.format-reguler { background: rgba(6,182,212,0.12); color: var(--accent-secondary); }
.format-private { background: rgba(120,40,240,0.12); color: var(--accent-primary); }
.format-info-desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.4; margin: 0; }

/* Pricing Cards Grid */
.pricing-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.25rem; }
.pricing-card {
  background: var(--bg-card); border: 1px solid var(--border-card);
  border-radius: var(--radius-lg); padding: 1.75rem 1.5rem;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; transition: var(--transition-normal);
}
.pricing-card:hover { transform: translateY(-4px); border-color: rgba(120,40,240,0.35); box-shadow: var(--shadow-md); }
.pricing-card.popular { background: linear-gradient(180deg,rgba(120,40,240,0.1) 0%,var(--bg-card) 100%); border: 2px solid var(--accent-primary); box-shadow: var(--shadow-glow); }
.recommended-sticker {
  position: absolute; top: -1px; right: -1px;
  background: var(--grad-primary); color: #fff;
  font-size: 0.68rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.05em; white-space: nowrap;
  padding: 0.3rem 0.75rem 0.3rem 0.85rem;
  border-radius: 0 var(--radius-lg) 0 var(--radius-sm);
  display: inline-flex; align-items: center; gap: 0.35rem;
  box-shadow: 0 3px 12px rgba(120,40,240,0.35);
  z-index: 10; pointer-events: none; line-height: 1;
}
.recommended-sticker::before {
  content: '★';
  font-size: 0.65rem;
  opacity: 0.9;
}
.plan-level-badge {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  color: var(--accent-primary); background: rgba(120,40,240,0.12);
  padding: 2px 8px; border-radius: var(--radius-sm); margin-bottom: 0.5rem; width: fit-content;
}
.plan-level-popular { background: var(--accent-primary); color: #fff; }
.plan-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.35rem; }
.plan-desc { font-size: 0.86rem; color: var(--text-secondary); margin-bottom: 1rem; }
.plan-price-wrap {
  margin-bottom: 1.25rem;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.plan-price-wrap.price-updating {
  transform: scale(1.02);
}
.price-main { display: flex; align-items: baseline; gap: 0.3rem; }
.currency { font-size: 1rem; font-weight: 700; }
.amount {
  font-size: 2.1rem; font-weight: 800; line-height: 1;
  letter-spacing: -0.02em;
  display: inline-flex; align-items: baseline;
  font-variant-numeric: tabular-nums;
  -moz-font-feature-settings: "tnum";
  -webkit-font-feature-settings: "tnum";
  font-feature-settings: "tnum";
  will-change: transform;
}
/* Each digit slot: clips to exactly 1 digit height */
.price-digit-wrap {
  display: inline-block;
  overflow: hidden;
  height: 1.15em;
  vertical-align: top;
}
/* Column of 2 spans: [old][new] stacked vertically */
.price-digit-col {
  display: flex;
  flex-direction: column;
  will-change: transform;
}
.price-digit-col span {
  display: block;
  height: 1.15em;
  line-height: 1.15;
  text-align: center;
}
.price-sep {
  display: inline-block;
  line-height: 1.15;
  vertical-align: top;
}
.period { font-size: 0.8rem; color: var(--text-muted); align-self: flex-end; padding-bottom: 0.1em; }
.price-tag { font-size: 0.78rem; color: var(--accent-secondary); font-weight: 600; margin-top: 0.2rem; display: block; }
.plan-features { margin-bottom: 1.5rem; flex-grow: 1; list-style: none; padding: 0; margin-left: 0; }
.plan-features li,
.plan-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-secondary);
  margin-bottom: 0.65rem;
}
.plan-features li svg,
.plan-feature-item svg {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  color: var(--accent-emerald);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* ---- FAQ ---- */
.faq-grid { max-width: 760px; margin: 0 auto; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: var(--radius-md); margin-bottom: 0.75rem; overflow: hidden; }
.faq-question {
  width: 100%; padding: 1rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  background: transparent; color: var(--text-primary);
  font-weight: 700; font-size: 0.95rem; text-align: left;
}
.faq-icon { width: 18px; height: 18px; transition: var(--transition-fast); color: var(--accent-primary); flex-shrink: 0; margin-left: 0.5rem; }
.faq-item.active .faq-icon { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out, padding 0.3s ease; padding: 0 1.25rem; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.55; }
.faq-item.active .faq-answer { max-height: 300px; padding: 0 1.25rem 1.1rem; }

/* ---- FOOTER ---- */
.footer { background: var(--bg-secondary); border-top: 1px solid var(--border-color); padding: 50px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1.4fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-brand-desc { color: var(--text-secondary); margin: 0.75rem 0 0; max-width: 280px; font-size: 0.88rem; }
.footer-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.9rem; }
.footer-links li { margin-bottom: 0.55rem; }
.footer-links a { color: var(--text-secondary); font-size: 0.86rem; transition: var(--transition-fast); }
.footer-links a:hover { color: var(--accent-primary); }
.footer-cta-desc { font-size: 0.84rem; color: var(--text-secondary); margin-bottom: 0.85rem; }
.footer-bottom { padding-top: 1.5rem; border-top: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; color: var(--text-muted); font-size: 0.82rem; }
.footer-bottom-links { display: flex; gap: 1.25rem; }
.footer-bottom-links a { color: var(--text-muted); }

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(8,12,20,0.85); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px); z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 0.75rem; opacity: 0; visibility: hidden;
  transition: var(--transition-normal);
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-card {
  background: var(--bg-modal); border: 1px solid var(--border-card);
  border-radius: var(--radius-lg); width: 100%; max-width: 860px;
  max-height: 92vh; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: translateY(20px) scale(0.95); transition: var(--transition-bounce);
}
.modal-card-sm { max-width: 520px; }
.modal-overlay.active .modal-card { transform: translateY(0) scale(1); }
.modal-header {
  padding: 1.2rem 1.25rem 0.9rem; border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-modal); z-index: 10; flex-shrink: 0;
}
.modal-title { font-size: 1.2rem; font-weight: 800; }
.modal-close-btn { width: 32px; height: 32px; border-radius: var(--radius-full); background: rgba(255,255,255,0.05); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; transition: var(--transition-fast); }
.modal-close-btn:hover { background: rgba(255,255,255,0.15); color: var(--text-primary); }
.modal-body {
  padding: 1.25rem 1rem 0.5rem 1.25rem;
  margin: 0 4px 20px 0;
  overflow-y: auto; overflow-x: hidden; flex: 1;
  max-height: calc(92vh - 88px);
}
/* Modal Body Scrollbar Styling */
.modal-body::-webkit-scrollbar { width: 6px; }
.modal-body::-webkit-scrollbar-track { background: transparent; }
.modal-body::-webkit-scrollbar-thumb { background: var(--accent-primary); border-radius: var(--radius-full); }
.modal-body::-webkit-scrollbar-thumb:hover { background: var(--accent-primary-hover); }
.modal-body::-webkit-scrollbar-button { display: none !important; width: 0; height: 0; }

/* Registration Modal Card */
.modal-card-reg {
  max-width: 960px;
  width: 95%;
}

/* Step Wizard Navigation */
.reg-wizard-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  margin-bottom: 1.25rem;
  gap: 0.5rem;
}
.wizard-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  opacity: 0.5;
  transition: var(--transition-fast);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}
.wizard-step.active {
  opacity: 1;
  color: var(--accent-primary);
}
.wizard-step.completed {
  opacity: 0.9;
  color: var(--accent-emerald);
}
.wizard-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.wizard-step.active .wizard-step-num {
  background: var(--grad-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(120,40,240,0.4);
}
.wizard-step.completed .wizard-step-num {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: #ffffff;
}
.wizard-step-divider {
  width: 20px;
  height: 1px;
  background: var(--border-color);
  flex-shrink: 0;
}

/* Registration Grid Layout (Balanced Rata Kanan-Kiri) */
.registration-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: start;
}
.form-left {
  position: relative;
  min-width: 0;
}
.form-right {
  min-width: 0;
  position: sticky;
  top: 0;
}

.form-group { margin-bottom: 0.9rem; min-width: 0; }
.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.83rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}
.form-label-hint {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-secondary);
}
.form-control {
  width: 100%; min-width: 0; padding: 0.68rem 0.85rem; min-height: 44px;
  background: var(--bg-input); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); color: var(--text-primary); font-size: 0.9rem;
  transition: var(--transition-fast);
  box-sizing: border-box;
}
select.form-control { display: none; } /* hidden — replaced by CustomSelect */
.form-control:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(120,40,240,0.18);
  outline: none;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  min-width: 0;
  margin-bottom: 0;
}

/* Interactive Level Quick-Pick Pills */
.level-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.level-pill-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.3rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}
.level-pill-btn:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
  background: rgba(120,40,240,0.06);
}
.level-pill-btn.active {
  background: rgba(120,40,240,0.15);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: 0 0 0 1px var(--accent-primary);
}
.level-pill-tag {
  font-size: 0.65rem;
  opacity: 0.8;
  font-weight: 400;
}

/* Coupon Input & Active Badge */
.coupon-input-group { display: flex; gap: 0.5rem; align-items: center; }
.coupon-input-group input { flex: 1; min-width: 0; }
.applied-coupon-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.3);
  color: var(--accent-emerald);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.4rem;
}
.applied-coupon-tag button {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  padding: 0;
}

/* OTP Dedicated View */
.otp-dedicated-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.75rem;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}
.otp-icon-halo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(120,40,240,0.15);
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 0 20px rgba(120,40,240,0.25);
  animation: pulse 2s infinite ease-in-out;
}
.otp-target-email-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.75rem 0 1.5rem;
}
.otp-boxes-grid {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.otp-digit-box {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 1.6rem;
  font-family: monospace;
  font-weight: 800;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-input);
  color: var(--text-primary);
  transition: all 0.2s ease;
  box-sizing: border-box;
}
.otp-digit-box:focus {
  border-color: var(--accent-primary);
  background: var(--bg-secondary);
  box-shadow: 0 0 0 3px rgba(120,40,240,0.25);
  outline: none;
  transform: translateY(-2px);
}
.otp-timer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}
.btn-resend-otp {
  background: transparent;
  border: none;
  color: var(--accent-primary);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.btn-resend-otp:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  text-decoration: none;
  opacity: 0.6;
}
.otp-test-box {
  background: rgba(16,185,129,0.08);
  border: 1px dashed var(--accent-emerald);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  text-align: center;
}

/* ---- CUSTOM SELECT DROPDOWN ---- */
.cselect-wrap { position: relative; width: 100%; }
.cselect-wrap.open { z-index: 9999; }
.cselect-wrap.closing { z-index: 9998; }
.cselect-trigger {
  position: relative; z-index: 210;
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  text-align: left; cursor: pointer; gap: 0.5rem;
  padding: 0.68rem 0.85rem; min-height: 44px;
  background: var(--bg-input); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); color: var(--text-primary); font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.cselect-trigger:hover { border-color: rgba(120,40,240,0.4); }
.cselect-wrap.open .cselect-trigger,
.cselect-wrap.closing .cselect-trigger {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: var(--accent-primary);
}
.cselect-wrap.open .cselect-trigger {
  box-shadow: 0 0 0 3px rgba(120,40,240,0.18);
}
.cselect-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cselect-arrow {
  color: var(--accent-primary); flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; align-items: center;
}
.cselect-wrap.open .cselect-arrow { transform: rotate(180deg); }
.cselect-dropdown {
  position: absolute; top: 0; left: 0; right: 0; z-index: 200;
  background: var(--bg-modal);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  box-shadow: none;
  max-height: 0; overflow: hidden; opacity: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(124,58,237,0.45) transparent;
  transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  pointer-events: none;
}
.cselect-wrap.open .cselect-dropdown,
.cselect-wrap.closing .cselect-dropdown {
  opacity: 1;
  border-color: var(--accent-primary);
  box-shadow: 0 16px 36px rgba(0,0,0,0.38), 0 0 0 1px rgba(120,40,240,0.15);
}
.cselect-wrap.open .cselect-dropdown {
  pointer-events: auto;
  overflow-y: auto;
}
.cselect-wrap.closing .cselect-dropdown {
  pointer-events: none;
  overflow: hidden;
}
/* Scrollbar inside custom dropdown */
.cselect-dropdown::-webkit-scrollbar { width: 5px; }
.cselect-dropdown::-webkit-scrollbar-track { background: transparent; margin: 4px 0; }
.cselect-dropdown::-webkit-scrollbar-thumb {
  background: rgba(124,58,237,0.45);
  border-radius: var(--radius-full);
}
.cselect-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(124,58,237,0.75);
}
.cselect-option {
  padding: 0.65rem 1rem 0.65rem 0.95rem; font-size: 0.88rem; cursor: pointer;
  color: var(--text-secondary);
  transition: background 0.15s ease, color 0.15s ease;
  position: relative;
  word-break: break-word;
}
.cselect-option:hover {
  background: rgba(120,40,240,0.1);
  color: var(--text-primary);
}
.cselect-option.selected {
  background: rgba(120,40,240,0.15);
  color: var(--accent-primary); font-weight: 700;
}
.cselect-option.selected::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--grad-primary);
  border-radius: 0 2px 2px 0;
}
.cselect-option:last-child { border-radius: 0 0 var(--radius-md) var(--radius-md); }

/* Order Summary */
.order-summary-box { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: var(--radius-md); padding: 1.1rem; }
.summary-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.8rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--border-color); }
.summary-row { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 0.55rem; }
.summary-discount { color: var(--accent-pink); }
.summary-coupon { color: var(--accent-emerald); }
.summary-total { font-size: 1.05rem; font-weight: 800; color: var(--text-primary); padding-top: 0.6rem; border-top: 1px dashed var(--border-color); margin-top: 0.75rem; margin-bottom: 0; }
.selected-plan-badge { display: inline-block; padding: 0.2rem 0.6rem; background: rgba(120,40,240,0.15); border: 1px solid rgba(120,40,240,0.3); color: var(--accent-primary); font-weight: 700; border-radius: var(--radius-sm); font-size: 0.78rem; }
.summary-note { display: block; text-align: center; color: var(--text-muted); font-size: 0.72rem; margin-top: 0.5rem; }

/* Success Modal */
.success-card { text-align: center; padding: 1.75rem 1.25rem; }
.success-icon { width: 60px; height: 60px; border-radius: 50%; background: rgba(16,185,129,0.15); border: 2px solid var(--accent-emerald); color: var(--accent-emerald); display: flex; align-items: center; justify-content: center; margin: 0 auto 1.1rem; }
.success-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.4rem; }
.success-desc { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1.25rem; }
.success-invoice { background: var(--bg-card); border: 1px solid var(--border-card); padding: 1rem 1.1rem; border-radius: 12px; text-align: left; margin-bottom: 1.5rem; }
.success-actions { display: flex; flex-direction: column; gap: 0.65rem; }

/* Toast */
.toast-container { position: fixed !important; top: 1.5rem !important; right: 1.5rem !important; bottom: auto !important; left: auto !important; z-index: 9999999 !important; display: flex !important; flex-direction: column !important; gap: 0.6rem !important; pointer-events: none !important; max-width: 420px !important; }
.toast { pointer-events: auto !important; background: var(--bg-modal); border: 1px solid var(--border-card); padding: 0.85rem 1.25rem; border-radius: var(--radius-md); box-shadow: 0 10px 30px rgba(0,0,0,0.4); display: flex; align-items: center; gap: 0.75rem; color: var(--text-primary); font-size: 0.88rem; font-weight: 600; z-index: 9999999 !important; }

/* ============================================================
   RESPONSIVE — TABLET & MOBILE
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* Mobile */
@media (max-width: 768px) {
  .container { padding: 0 1rem; }

  /* Navbar */
  .navbar { height: 62px; }
  .navbar.scrolled { height: 58px; }
  .logo { font-size: 1.15rem; }
  .logo-icon { width: 32px; height: 32px; font-size: 0.9rem; }
  .nav-links {
    display: none; position: absolute;
    top: 62px; left: 0; right: 0;
    background: var(--bg-modal); border-bottom: 1px solid var(--border-color);
    flex-direction: column; padding: 1rem; gap: 0.85rem;
    box-shadow: var(--shadow-lg); z-index: 999;
  }
  .nav-links.active { display: flex; }
  .nav-link { font-size: 1rem; padding: 0.35rem 0; }
  .mobile-menu-btn { display: flex; align-items: center; }
  .btn-nav-cta { display: none; }

  /* Sections */
  .section { padding: 36px 0; }
  .section-alt { padding: 36px 0; }
  .section-header-center { margin-bottom: 1.75rem; }
  .section-title { font-size: 1.5rem; }

  /* Hero — Full Single Column */
  .hero { padding: 78px 0 24px; }
  .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; text-align: center; }
  .hero-title { font-size: 1.6rem; margin-bottom: 0.75rem; }
  .hero-desc { font-size: 0.9rem; margin-bottom: 1.25rem; }
  .hero-actions { flex-direction: column; gap: 0.6rem; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .hero-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.5rem; justify-items: center; padding-top: 1rem; }
  .stat-item h4 { font-size: 1.2rem; }
  .stat-item p { font-size: 0.7rem; }

  /* Hero Visual — Compact on Mobile */
  .hero-visual { padding: 0; }
  .hero-card { padding: 1.1rem 0.9rem; border-radius: var(--radius-md); }
  .hero-card-header { margin-bottom: 0.85rem; padding-bottom: 0.65rem; }
  .hero-card-cols { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .hero-card-col { padding: 0.55rem; }
  /* Stack floating badges as simple inline blocks on mobile */
  .floating-badge {
    position: static !important;
    top: auto !important; right: auto !important; bottom: auto !important; left: auto !important;
    animation: none !important;
    width: 100%; margin-top: 0.6rem;
    padding: 0.55rem 0.75rem; border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
  }

  /* About — Single Column */
  .about-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .about-text { order: 1; }
  .about-card { order: 2; flex-direction: row; gap: 0.65rem; }
  .about-chip { flex: 1; padding: 0.65rem 0.75rem; }
  .about-desc { font-size: 0.9rem; margin-bottom: 0.9rem; }

  /* Features — 2 Column on Mobile */
  .features-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .feature-card { padding: 0.9rem 0.75rem; border-radius: var(--radius-md); }
  .feature-icon-svg { width: 34px; height: 34px; margin-bottom: 0.65rem; }
  .feature-title { font-size: 0.9rem; margin-bottom: 0.3rem; }
  .feature-desc { font-size: 0.78rem; line-height: 1.35; }

  /* Pricing Filter — Horizontal Scroll-Friendly */
  .filter-container { gap: 0.6rem; margin-bottom: 1.5rem; }
  .filter-row { gap: 0.4rem; }
  .filter-label { font-size: 0.72rem; }
  .filter-wrap { border-radius: var(--radius-md); padding: 2px; }
  .filter-btn { padding: 0.4rem 0.75rem; font-size: 0.78rem; }

  /* Format Cards — Single Column on Mobile */
  .format-comparison-grid { grid-template-columns: 1fr; gap: 0.5rem; margin-bottom: 1.5rem; }
  .format-info-card { padding: 0.85rem; display: flex; align-items: center; gap: 0.75rem; }
  .format-info-title { font-size: 0.9rem; margin-bottom: 0.1rem; }
  .format-info-desc { font-size: 0.78rem; margin: 0; }

  /* Pricing Cards — Single Column on Mobile */
  .pricing-grid { grid-template-columns: 1fr; gap: 1rem; }
  .pricing-card { padding: 1.5rem 1.1rem; border-radius: var(--radius-md); }
  .recommended-sticker { border-radius: 0 var(--radius-md) 0 var(--radius-sm); }
  .plan-name { font-size: 1.15rem; }

  /* FAQ */
  .faq-question { padding: 0.9rem 1rem; font-size: 0.9rem; }
  .faq-answer { padding: 0 1rem; font-size: 0.87rem; }
  .faq-item.active .faq-answer { padding: 0 1rem 1rem; }

  /* Footer — Compact Single Column */
  .footer { padding: 36px 0 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.25rem; margin-bottom: 1.75rem; }
  .footer-brand-desc { max-width: 100%; }
  .footer-bottom { flex-direction: column; gap: 0.6rem; text-align: center; }
  .footer-bottom-links { justify-content: center; }

  /* Modal — Full Screen Style on Mobile */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-card {
    max-height: 92vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-bottom: none;
  }
  .modal-card-sm { align-self: center; max-height: 90vh; border-radius: var(--radius-lg); margin: 0.5rem; }
  .modal-header { padding: 1rem 1.25rem; }
  .modal-title { font-size: 1.05rem; }
  .modal-body { padding: 1rem 1.25rem 1.5rem; }
  .reg-wizard-steps { padding: 0.4rem 0.5rem; gap: 0.25rem; overflow-x: auto; }
  .wizard-step { font-size: 0.72rem; }
  .wizard-step-title { display: none; }
  .wizard-step-title-mobile { display: inline; }
  .registration-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .form-right { margin-top: 0.5rem; }
  .form-row { grid-template-columns: 1fr; gap: 0.75rem; }
  .level-quick-grid { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
  .order-summary-box { border-radius: var(--radius-md); padding: 1.1rem; }
  .otp-boxes-grid { gap: 0.35rem; }
  .otp-digit-box { width: 40px; height: 50px; font-size: 1.35rem; }
  .success-card { padding: 1.5rem 1rem; }
}

/* ==========================================================================
   DEWAN TUTOR & PENGAJAR SECTION
   ========================================================================== */
.tutors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.tutor-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-bounce);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tutor-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-glow);
}

.tutor-avatar-wrap {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
  padding: 4px;
  background: var(--grad-primary);
  position: relative;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.tutor-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
  background: var(--bg-secondary);
}

.tutor-badge-pill {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--accent-secondary);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.tutor-card-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.tutor-card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-secondary);
  margin-bottom: 0.85rem;
}

.tutor-card-bio {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;

  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  width: 100%;
}


/* ==========================================================================
   FLOATING LIVE CHAT SUPPORT WIDGET (CS & Konsultan)
   ========================================================================== */
.live-chat-widget-wrap {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 990;
  font-family: var(--font-main);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
}

.chat-launcher-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.4rem;
  border-radius: 24px;
  background: var(--grad-primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
  transform-origin: bottom right;
}

.chat-launcher-btn:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 14px 38px rgba(236, 72, 153, 0.55);
}

.launcher-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-unread-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  border: 2px solid #fff;
  position: absolute;
  top: -6px;
  right: 4px;
  animation: bounce-badge 1s infinite alternate;
}

@keyframes bounce-badge {
  from { transform: translateY(0); }
  to { transform: translateY(-4px); }
}

/* Chat Messenger Box */
.chat-messenger-box {
  width: 380px;
  height: 560px;
  max-height: 82vh;
  background: var(--bg-modal);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUpFade 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: absolute;
  bottom: 0;
  right: 0;
  transform-origin: bottom right;
}

.chat-messenger-box.closing {
  animation: slideDownFade 0.27s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
  pointer-events: none;
}

@keyframes slideUpFade {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.92);
    border-radius: 32px;
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    border-radius: 20px;
  }
}

@keyframes slideDownFade {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    border-radius: 20px;
  }
  100% {
    opacity: 0;
    transform: translateY(24px) scale(0.92);
    border-radius: 32px;
  }
}

.chat-box-header {
  padding: 1.1rem 1.4rem;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.header-brand-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-brand-info .status-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
}

.chat-box-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-chat-reset {
  background: var(--bg-primary);
  color: #ef4444;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid rgba(239, 68, 68, 0.3);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-chat-reset:hover {
  background: rgba(239, 68, 68, 0.1);
}

.btn-chat-close {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-chat-close:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

/* State A: Intake Pane */
.chat-intake-pane {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
}

.intake-welcome-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

/* State B: Active Room Pane */
.chat-room-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  overflow: hidden;
}

.chat-messages-log {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.visitor-bubble {
  max-width: 82%;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.5;
  position: relative;
  word-break: break-word;
}

.v-bubble-cs {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-bottom-left-radius: 2px;
  box-shadow: var(--shadow-sm);
}

.v-bubble-user {
  align-self: flex-end;
  background: var(--grad-primary);
  color: #ffffff;
  border-bottom-right-radius: 2px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.v-bubble-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.35rem;
  font-size: 0.68rem;
  opacity: 0.8;
}

.chat-input-bar {
  padding: 0.9rem 1rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-visitor-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.7rem 1.25rem;
  color: var(--text-primary);
  font-size: 0.88rem;
}

.chat-visitor-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.btn-send-visitor {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--grad-emerald);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-send-visitor:hover {
  transform: scale(1.08);
}

@media (max-width: 480px) {
  .live-chat-widget-wrap {
    bottom: 1rem;
    right: 1rem;
  }
  .chat-messenger-box {
    width: calc(100vw - 2rem);
    height: 520px;
    position: fixed;
    bottom: 1rem;
    right: 1rem;
  }
}

/* Fluid Animation for CS Button */
@keyframes fluidSlideUp {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  70% {
    opacity: 1;
    transform: translateY(-3px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.fluid-cs-btn-box {
  animation: fluidSlideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  padding: 0.65rem 0.85rem;
  text-align: center;
  background: rgba(120, 40, 240, 0.08);
  border-top: 1px solid rgba(120, 40, 240, 0.18);
}

.btn-request-human-cs {
  background: var(--grad-primary);
  color: #ffffff;
  border: none;
  padding: 0.65rem 1.1rem;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 4px 14px rgba(120, 40, 240, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-request-human-cs:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(63, 10, 143, 0.45);
}

/* ==========================================================================
   ENHANCED PASSWORD MANAGEMENT & SECURITY STYLES
   ========================================================================== */

.modal-card-password {
  max-width: 520px;
  width: 100%;
  border-radius: var(--radius-lg, 18px);
  background: var(--bg-card, #131127);
  border: 1px solid rgba(120, 40, 240, 0.25);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6), 0 0 30px rgba(120, 40, 240, 0.15);
  overflow: hidden;
  animation: modalScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.password-modal-header {
  padding: 1.5rem 1.75rem 1.25rem;
  background: linear-gradient(180deg, rgba(120, 40, 240, 0.12) 0%, transparent 100%);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.password-shield-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #7828f0 0%, #4338ca 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(120, 40, 240, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.password-modal-body {
  padding: 1.4rem 1.75rem 1.6rem;
}

.password-field-group {
  margin-bottom: 1rem;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrapper input.form-control {
  padding-right: 2.85rem !important;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.password-toggle-btn {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  padding: 0.35rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 2;
}

.password-toggle-btn:hover {
  color: var(--accent-primary, #7828f0);
  background: rgba(120, 40, 240, 0.08);
}

/* Password Strength Animated Meter */
.pw-strength-meter-wrap {
  margin-top: 0.55rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
}

.pw-strength-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
  font-size: 0.8rem;
}

.pw-strength-badge {
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.18rem 0.65rem;
  border-radius: 20px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Animated multi-segment bar */
.pw-strength-bar-track {
  height: 6px;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.pw-strength-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease, box-shadow 0.4s ease;
  position: relative;
}

.pw-strength-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: shineMeter 2.5s infinite;
}

@keyframes shineMeter {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Password Rules Checklist */
.pw-rules-checklist {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem 0.75rem;
  margin-top: 0.75rem;
}

.pw-rule-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  color: var(--text-muted, #94a3b8);
  transition: all 0.25s ease;
}

.pw-rule-item.valid {
  color: var(--accent-emerald, #10b981);
  font-weight: 600;
}

.pw-rule-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  font-size: 0.65rem;
  flex-shrink: 0;
}

.pw-rule-item.valid .pw-rule-icon {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.pw-rule-item:not(.valid) .pw-rule-icon {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

@media (max-width: 540px) {
  .pw-rules-checklist {
    grid-template-columns: 1fr;
  }
}

/* =======================================================
   UNIVERSAL UNIFIED TABLE & ACTION BUTTONS (SYSTEM WIDE)
   ======================================================= */
.btn-tbl-edit,
.btn-action-edit,
.btn-edit {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  background: #f5f3ff !important;
  color: #7c3aed !important;
  border: 1.5px solid #d8b4fe !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  padding: 0.38rem 0.8rem !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
  box-shadow: 0 1px 2px rgba(124, 58, 237, 0.05) !important;
  text-decoration: none !important;
}

.btn-tbl-edit:hover,
.btn-action-edit:hover,
.btn-edit:hover {
  background: #ede9fe !important;
  border-color: #c084fc !important;
  color: #5b21b6 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 8px rgba(124, 58, 237, 0.15) !important;
}

.btn-tbl-delete,
.btn-tbl-danger,
.btn-action-delete,
.btn-delete,
.btn-tbl-hapus {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1.5px solid #fecaca !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  padding: 0.38rem 0.8rem !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
  box-shadow: 0 1px 2px rgba(239, 68, 68, 0.05) !important;
  text-decoration: none !important;
}

.btn-tbl-delete:hover,
.btn-tbl-danger:hover,
.btn-action-delete:hover,
.btn-delete:hover,
.btn-tbl-hapus:hover {
  background: #fee2e2 !important;
  border-color: #f87171 !important;
  color: #991b1b !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.18) !important;
}

.btn-tbl-manage,
.btn-action-view,
.btn-tbl-detail,
.btn-detail {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  background: #f8fafc !important;
  color: #334155 !important;
  border: 1.5px solid #cbd5e1 !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  padding: 0.38rem 0.8rem !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  text-decoration: none !important;
}

.btn-tbl-manage:hover,
.btn-action-view:hover,
.btn-tbl-detail:hover,
.btn-detail:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #1e1b4b !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08) !important;
}

.btn-tbl-save,
.btn-action-save,
.btn-save {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  background: #ecfdf5 !important;
  color: #059669 !important;
  border: 1.5px solid #a7f3d0 !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  padding: 0.38rem 0.8rem !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
  box-shadow: 0 1px 2px rgba(5, 150, 105, 0.05) !important;
  text-decoration: none !important;
}

.btn-tbl-save:hover,
.btn-action-save:hover,
.btn-save:hover {
  background: #d1fae5 !important;
  border-color: #6ee7b7 !important;
  color: #047857 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 8px rgba(5, 150, 105, 0.15) !important;
}

.btn-tbl-video {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  background: #eff6ff !important;
  color: #2563eb !important;
  border: 1.5px solid #bfdbfe !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  padding: 0.38rem 0.8rem !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.05) !important;
  text-decoration: none !important;
}

.btn-tbl-video:hover {
  background: #dbeafe !important;
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.15) !important;
}

.btn-tbl-toggle,
.btn-action-toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  background: #f8fafc !important;
  color: #334155 !important;
  border: 1.5px solid #e2e8f0 !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  padding: 0.38rem 0.8rem !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.btn-tbl-toggle:hover,
.btn-action-toggle:hover {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #1e1b4b !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08) !important;
}

/* Centralized Subtab Navigation System */
.admin-subtab-nav,
.sub-tab-nav {
  display: inline-flex !important;
  align-items: center !important;
  background: var(--bg-card) !important;
  border: 1.5px solid var(--border-color) !important;
  border-radius: 14px !important;
  padding: 5px !important;
  gap: 5px !important;
  margin-bottom: 1.5rem !important;
  box-shadow: var(--shadow-sm) !important;
  flex-wrap: wrap !important;
}

.admin-subtab-btn,
.sub-tab-btn,
.admin-siswa-subtab,
.class-stage-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 0.5rem 1.15rem !important;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  color: var(--text-secondary) !important;
  background: transparent !important;
  border: none !important;
  border-radius: 9px !important;
  cursor: pointer !important;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  line-height: 1.4 !important;
  box-shadow: none !important;
  transform: translateY(0);
}

.admin-subtab-btn:hover,
.sub-tab-btn:hover,
.admin-siswa-subtab:hover,
.class-stage-pill:hover {
  color: var(--accent-primary) !important;
  background: var(--bg-card-hover) !important;
}

.admin-subtab-btn.active,
.sub-tab-btn.active,
.admin-siswa-subtab.active,
.class-stage-pill.active {
  background: linear-gradient(135deg, #7828F0, #3F0A8F) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 3px 10px rgba(120, 40, 240, 0.4) !important;
  transform: translateY(-1px);
}

/* Centered Action Button Grid */
.tbl-action-grid,
.action-btns {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.45rem !important;
  margin: 0 auto !important;
  width: 100% !important;
}

.tbl-action-grid > button,
.tbl-action-grid > a {
  justify-content: center !important;
  text-align: center !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

.admin-table th,
.data-table th {
  text-align: left !important;
  vertical-align: middle !important;
}

.admin-table th:first-child,
.admin-table td:first-child,
.data-table th:first-child,
.data-table td:first-child {
  padding-left: 1.5rem !important;
}

.admin-table th:last-child,
.admin-table td:last-child,
.data-table th:last-child,
.data-table td:last-child {
  text-align: center !important;
  padding-right: 1.5rem !important;
}

.subtab-badge,
.badge-count {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 2px 7px !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  border-radius: 9999px !important;
  line-height: 1 !important;
  background: #e2e8f0 !important;
  color: #475569 !important;
  transition: all 0.18s ease !important;
}

.admin-subtab-btn.active .subtab-badge,
.admin-subtab-btn.active .badge-count,
.sub-tab-btn.active .subtab-badge,
.sub-tab-btn.active .badge-count,
.admin-siswa-subtab.active .subtab-badge,
.admin-siswa-subtab.active .badge-count {
  background: rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
}

.modal-close-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  background: #f1f5f9 !important;
  color: #64748b !important;
  border: 1px solid #e2e8f0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  font-size: 1.15rem !important;
  line-height: 1 !important;
}

.modal-close-btn:hover {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #dc2626 !important;
  transform: translateY(-1px) !important;
}

