/* TopBonus — Professional Fintech UI */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #7C3AED;
  --primary-dark: #6D28D9;
  --primary-light: #EDE9FE;
  --secondary: #1E1B4B;
  --accent: #F43F5E;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --bg: #F5F3FF;
  --bg-card: #FFFFFF;
  --bg-sidebar: #1E1B4B;
  --text: #1E1B4B;
  --text-muted: #6B7280;
  --text-sidebar: #A5B4FC;
  --border: #E9E5FF;
  --shadow: 0 1px 3px rgba(124, 58, 237, 0.06), 0 8px 24px rgba(124, 58, 237, 0.06);
  --shadow-md: 0 8px 28px rgba(124, 58, 237, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 260px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: 0.25s ease;
}

[data-theme="dark"] {
  --bg: #0F172A;
  --bg-card: #1E293B;
  --bg-sidebar: #020617;
  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --text-sidebar: #64748B;
  --border: #334155;
  --shadow: 0 1px 3px rgba(0,0,0,0.2), 0 4px 12px rgba(0,0,0,0.15);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.25);
  --primary-light: rgba(124, 58, 237, 0.18);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
}

p, span, li, td, th, label, .selectable, .history-info, .faq-a,
.form-control, input, textarea, .toast-msg, .toast-title,
.card-title, h1, h2, h3, .saldo-value, .promo-amount, .stat-card .value,
.stat-card .label, .stat-card .sub, .package .amt, .package .cb,
.promo-card .amount, .promo-card .cashback, .nav-link, .form-hint,
.form-note, .alert-box, .history-info .title, .history-info .meta,
.history-amount, .step-card p, .step-card h3, .auth-gate p, .auth-gate h2 {
  -webkit-user-select: text;
  user-select: text;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }

.app-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  color: #fff;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition);
}

.sidebar-brand {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand .logo-icon {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-brand .logo-text {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.sidebar-brand .logo-text span { color: var(--primary); }

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-section { margin-bottom: 8px; }

.nav-section-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-sidebar);
  padding: 8px 12px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-sidebar);
  font-weight: 500;
  font-size: 0.925rem;
  transition: all var(--transition);
  margin-bottom: 2px;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-link.active { background: var(--primary); color: #fff; }
.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.85; }
.nav-link.active svg { opacity: 1; }

.nav-dropdown { margin-bottom: 2px; }

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-dropdown-toggle .chevron {
  transition: transform var(--transition);
  width: 16px; height: 16px;
}

.nav-dropdown.open .chevron { transform: rotate(180deg); }

.nav-dropdown-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  padding-left: 12px;
}

.nav-dropdown.open .nav-dropdown-menu { max-height: 300px; }
.nav-dropdown-menu .nav-link { font-size: 0.875rem; padding: 9px 14px; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  margin-bottom: 10px;
}

.sidebar-user .avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}

.sidebar-user .info { flex: 1; min-width: 0; }

.sidebar-user .name {
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user .role {
  font-size: 0.75rem;
  color: var(--text-sidebar);
}

.main-wrap {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left { display: flex; align-items: center; gap: 12px; }

.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  border: none;
  background: var(--bg);
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.page-title-bar h1 { font-size: 1.15rem; font-weight: 700; }

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.btn-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}

.btn-icon:hover { background: var(--bg); color: var(--text); }

.main-content { padding: 28px; flex: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1.4;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
}

.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }

.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover:not(:disabled) { background: #334155; }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-success { background: var(--success); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover:not(:disabled) { color: var(--text); background: var(--bg); }
.btn-sm { padding: 7px 14px; font-size: 0.825rem; }
.btn-block { width: 100%; }

.btn-danger-outline {
  background: transparent;
  border: 1.5px solid var(--danger);
  color: var(--danger);
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-title { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.card-subtitle { font-size: 0.875rem; color: var(--text-muted); margin-top: 2px; }

.hero {
  background: linear-gradient(135deg, #7C3AED 0%, #4C1D95 55%, #BE185D 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 48px 40px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: -40%; right: -10%;
  width: 320px; height: 320px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}

.hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.hero p {
  font-size: 1.05rem;
  opacity: 0.9;
  max-width: 520px;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.hero .btn-primary { background: #fff; color: var(--primary-dark); }
.hero .btn-primary:hover { background: #F5F3FF; }
.hero .btn-outline { border-color: rgba(255,255,255,0.4); color: #fff; }
.hero .btn-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

.saldo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.stat-card .label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.stat-card .value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stat-card .sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-card.highlight {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border: none;
}

.stat-card.highlight .label,
.stat-card.highlight .sub { color: rgba(255,255,255,0.8); }

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 8px;
}

.section-header h2 { font-size: 1.2rem; font-weight: 700; }
.section-header p { font-size: 0.875rem; color: var(--text-muted); }

.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.promo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  position: relative;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.promo-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary); }
.promo-card.sold-out { opacity: 0.55; pointer-events: none; }

.promo-card .tag {
  position: absolute;
  top: 14px; right: 14px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.promo-card .tag.cb { background: var(--primary-light); color: var(--primary-dark); }
.promo-card .tag.sold { background: #FEE2E2; color: var(--danger); }

[data-theme="dark"] .promo-card .tag.cb {
  background: rgba(13,148,136,0.2);
  color: #5EEAD4;
}

.promo-card .amount { font-size: 1.5rem; font-weight: 800; margin: 8px 0 4px; }
.promo-card .cashback { font-size: 0.95rem; font-weight: 600; color: var(--success); }
.promo-card .cashback-pct { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

.packages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.package {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.package:hover:not(.disabled) { border-color: var(--primary); }
.package.selected { border-color: var(--primary); background: var(--primary-light); }
.package.disabled { opacity: 0.45; cursor: not-allowed; }

.package .badge-sold {
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%);
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  text-transform: uppercase;
}

.package .amt { font-size: 1.1rem; font-weight: 800; }
.package .cb { font-size: 0.8rem; font-weight: 600; color: var(--success); margin-top: 4px; }

.qris-panel {
  display: none;
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  background: var(--bg-card);
}

.qris-panel.show { display: block; animation: fadeUp 0.3s ease; }

.qris-img-wrap {
  width: 220px; height: 220px;
  margin: 16px auto;
  padding: 12px;
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.qris-img-wrap img { width: 100%; height: 100%; object-fit: contain; }

.qris-wait {
  font-size: 0.875rem;
  color: var(--warning);
  font-weight: 500;
  margin: 12px 0;
}

.qris-info {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 360px;
  margin: 0 auto 8px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.method-item {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.method-item:hover:not(.disabled) { border-color: var(--primary); }
.method-item.selected { border-color: var(--primary); background: var(--primary-light); }
.method-item.disabled { opacity: 0.4; cursor: not-allowed; }

.method-item .icon-wrap {
  width: 36px; height: 36px;
  margin: 0 auto 8px;
  background: var(--bg-card);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.method-item .icon-wrap svg { width: 18px; height: 18px; color: var(--text); }
.method-item .name { font-size: 0.8rem; font-weight: 600; }

.method-item .soon {
  position: absolute;
  top: 6px; right: 6px;
  font-size: 0.55rem;
  font-weight: 700;
  background: var(--warning);
  color: #fff;
  padding: 2px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}

.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.925rem;
  background: var(--bg-card);
  color: var(--text);
  transition: border-color var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 5px;
}

.form-note {
  background: var(--primary-light);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.85rem;
  color: var(--primary-dark);
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

[data-theme="dark"] .form-note { color: #5EEAD4; }
.form-note svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }

.alert-box {
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.875rem;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.alert-box svg { width: 18px; height: 18px; flex-shrink: 0; }

.alert-info { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E40AF; }
.alert-success { background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; }
.alert-warning { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; }

[data-theme="dark"] .alert-info {
  background: rgba(30, 64, 175, 0.2);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93C5FD;
}
[data-theme="dark"] .alert-success {
  background: rgba(5, 150, 105, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6EE7B7;
}
[data-theme="dark"] .alert-warning {
  background: rgba(217, 119, 6, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: #FCD34D;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
}

.filter-bar select,
.filter-bar input[type="date"] {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.85rem;
}

.history-list { display: flex; flex-direction: column; gap: 10px; }

.history-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.history-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.history-icon svg { width: 18px; height: 18px; }
.history-icon.topup { background: #ECFDF5; color: var(--success); }
.history-icon.withdraw { background: #FEF3C7; color: var(--warning); }
.history-icon.bonus { background: #EFF6FF; color: #2563EB; }

[data-theme="dark"] .history-icon.topup { background: rgba(5,150,105,0.2); }
[data-theme="dark"] .history-icon.withdraw { background: rgba(217,119,6,0.2); }
[data-theme="dark"] .history-icon.bonus { background: rgba(37,99,235,0.2); }

.history-info { flex: 1; min-width: 0; }
.history-info .title { font-weight: 600; font-size: 0.9rem; }
.history-info .meta { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

.history-amount { font-weight: 700; font-size: 0.95rem; white-space: nowrap; }
.history-amount.plus { color: var(--success); }
.history-amount.minus { color: var(--danger); }

.status-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.status-badge.success { background: #D1FAE5; color: #065F46; }
.status-badge.processing { background: #FEF3C7; color: #92400E; }
.status-badge.pending { background: #E0E7FF; color: #3730A3; }

[data-theme="dark"] .status-badge.success { background: rgba(5,150,105,0.25); color: #6EE7B7; }
[data-theme="dark"] .status-badge.processing { background: rgba(217,119,6,0.25); color: #FCD34D; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s;
}

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

.modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(12px);
  transition: transform 0.25s;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.modal-overlay.show .modal { transform: translateY(0); }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h2 { font-size: 1.2rem; font-weight: 700; }

.modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: none;
  background: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.toast-container {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 280px;
  max-width: 380px;
  animation: slideIn 0.3s ease;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

.toast-icon { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.toast-title { font-weight: 600; font-size: 0.9rem; }
.toast-msg { font-size: 0.825rem; color: var(--text-muted); margin-top: 2px; }

@keyframes slideIn {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(241, 245, 249, 0.9);
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s;
}

[data-theme="dark"] .loading-overlay { background: rgba(15, 23, 42, 0.92); }
.loading-overlay.show { opacity: 1; visibility: visible; }

.spinner {
  width: 44px; height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-bottom: 14px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text {
  font-weight: 600;
  color: var(--text);
  font-size: 0.925rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-q {
  padding: 16px 18px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}

.faq-q svg {
  width: 18px; height: 18px;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.faq-item.open .faq-q svg { transform: rotate(180deg); }

.faq-a {
  padding: 0 18px 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: none;
  line-height: 1.65;
}

.faq-item.open .faq-a { display: block; }

.ticket-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 10px;
}

.ticket-item .subject { font-weight: 600; margin-bottom: 4px; }

.ticket-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ticket-status.open { background: #D1FAE5; color: #065F46; }
.ticket-status.closed { background: var(--border); color: var(--text-muted); }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.step-num {
  width: 32px; height: 32px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.step-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; }
.step-card p { font-size: 0.85rem; color: var(--text-muted); }

.auth-gate {
  text-align: center;
  padding: 60px 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.auth-gate h2 { font-size: 1.3rem; margin-bottom: 8px; }
.auth-gate p { color: var(--text-muted); margin-bottom: 20px; }

.page-footer {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 99;
}

.sidebar-overlay.show { display: block; }

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrap { margin-left: 0; }
  .menu-toggle { display: flex; }
  .main-content { padding: 18px 16px; }
  .topbar { padding: 12px 16px; }
  .hero { padding: 32px 24px; }
  .packages { grid-template-columns: repeat(2, 1fr); }
  .method-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .method-grid { grid-template-columns: repeat(2, 1fr); }
  .saldo-grid { grid-template-columns: 1fr 1fr; }
  .stat-card .value { font-size: 1.25rem; }
}

.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 12px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.w-full { width: 100%; }


/* Soft entrance & hover polish */
@keyframes softIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.promo-card, .stat-card, .step-card, .package, .history-item {
  animation: softIn 0.4s ease both;
}
.promo-card:nth-child(2) { animation-delay: 0.05s; }
.promo-card:nth-child(3) { animation-delay: 0.1s; }
.promo-card:nth-child(4) { animation-delay: 0.15s; }
.promo-card:hover, .stat-card:hover {
  transform: translateY(-3px);
}
.package.selected {
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25);
}
.history-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.history-tab {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.history-tab:hover { border-color: var(--primary); color: var(--primary); }
.history-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.history-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.history-empty svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  opacity: 0.4;
}

/* ===== PROFILE ===== */
.profile-hero {
  background: linear-gradient(135deg, #7C3AED 0%, #4C1D95 60%, #BE185D 100%);
  color: #fff;
  border: none;
  overflow: hidden;
}

.profile-hero-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 3px solid rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.profile-hero-info h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.profile-hero-info .text-muted {
  color: rgba(255,255,255,0.75) !important;
  font-size: 0.9rem;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.profile-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  color: #fff;
}

.profile-badge.active {
  background: #10B981;
}

.profile-badge.deposit {
  background: rgba(255,255,255,0.25);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.info-rows {
  margin-top: 8px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.925rem;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row strong {
  text-align: right;
  word-break: break-all;
}

/* Method logos */
.method-item .icon-wrap.logo {
  padding: 4px;
  overflow: hidden;
  background: #fff;
}

.method-item .icon-wrap.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.method-item .icon-wrap.fallback::after {
  content: attr(data-letter);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--primary);
}

.method-item .icon-wrap {
  width: 40px;
  height: 40px;
}
