/* ============================================================
   WinerLATAM — Dark Theme CSS
   Google Fonts: DM Sans (body), Sora (numbers/titles)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&family=Sora:wght@300;400;600;700;800&display=swap');

/* ---- Variables ---- */
:root {
  --bg-main:       #0F1117;
  --bg-card:       #1A1D2E;
  --bg-card2:      #1E2235;
  --bg-input:      #13151F;
  --border:        #2A2D3E;
  --border-light:  #333650;
  --text-primary:  #E2E8F0;
  --text-secondary:#94A3B8;
  --text-muted:    #5A6075;
  --blue:          #4F8EF7;
  --blue-dark:     #3B6ED4;
  --green:         #00D4A8;
  --green-success: #10B981;
  --red:           #EF4444;
  --red-dark:      #B91C1C;
  --yellow:        #F59E0B;
  --purple:        #8B5CF6;
  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     18px;
  --shadow:        0 4px 24px rgba(0,0,0,0.35);
  --shadow-sm:     0 2px 8px rgba(0,0,0,0.25);
  --sidebar-w:     260px;
  --header-h:      60px;
  --bottomnav-h:   64px;
  --transition:    0.2s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: #7aaeff; }
img { max-width: 100%; }
ul { list-style: none; }
input, select, textarea, button { font-family: inherit; }

/* ---- Sora font for numbers/titles ---- */
.font-sora, .saldo-valor, .stat-number, .countdown, .amount-display {
  font-family: 'Sora', sans-serif;
}

/* ============================================================
   LAYOUT — Sidebar + Content
   ============================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 200;
  overflow-y: auto;
  transition: transform var(--transition);
}
.sidebar-logo {
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo .logo-text {
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sidebar-logo .logo-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  border-radius: 0;
  transition: all var(--transition);
  position: relative;
}
.sidebar-nav a i { font-size: 17px; min-width: 20px; }
.sidebar-nav a:hover { color: var(--text-primary); background: rgba(79,142,247,0.07); }
.sidebar-nav a.nav-active {
  color: var(--blue);
  background: rgba(79,142,247,0.12);
  font-weight: 600;
}
.sidebar-nav a.nav-active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--blue);
  border-radius: 0 3px 3px 0;
}
.sidebar-user {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; color: #fff;
  flex-shrink: 0;
}
.sidebar-user-info .user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.sidebar-user-info .user-vip  { font-size: 11px; color: var(--yellow); }
.sidebar-logout {
  padding: 12px 20px;
}
.sidebar-logout a {
  display: flex; align-items: center; gap: 10px;
  color: var(--red); font-size: 14px; font-weight: 500;
}
.sidebar-logout a:hover { color: #ff6b6b; }

/* Main Content Area */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 28px;
  min-height: 100vh;
  max-width: calc(100vw - var(--sidebar-w));
}

/* Mobile Header */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  z-index: 300;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}
.mobile-header .logo-text {
  font-family: 'Sora', sans-serif;
  font-size: 18px; font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mobile-header .header-right { display: flex; align-items: center; gap: 10px; }
.btn-icon {
  background: none; border: none;
  color: var(--text-secondary); font-size: 20px;
  cursor: pointer; padding: 6px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: color var(--transition);
}
.btn-icon:hover { color: var(--text-primary); }

/* Bottom Nav (mobile) */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottomnav-h);
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  z-index: 400;
  align-items: center;
  justify-content: space-around;
}
.bottom-nav a {
  display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  color: var(--text-muted);
  font-size: 10px; font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
  min-width: 56px;
}
.bottom-nav a i { font-size: 20px; }
.bottom-nav a.nav-active, .bottom-nav a:hover { color: var(--blue); }

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 190;
}
.sidebar-overlay.active { display: block; }

/* Right Drawer (mobile) */
.right-drawer {
  position: fixed;
  top: 0; right: -280px;
  width: 260px; height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  z-index: 500;
  transition: right var(--transition);
  overflow-y: auto;
  padding: 20px 0;
}
.right-drawer.open { right: 0; }
.right-drawer .drawer-header {
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.right-drawer nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px;
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  transition: all var(--transition);
}
.right-drawer nav a:hover, .right-drawer nav a.nav-active { color: var(--blue); }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card-sm { padding: 14px 16px; }
.card-lg { padding: 28px; }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.card-title {
  font-size: 15px; font-weight: 600;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}
.card-title i { color: var(--blue); }

/* Saldo Cards */
.saldo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.saldo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition);
}
.saldo-card:hover { border-color: var(--border-light); }
.saldo-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.saldo-card.disponible::before { background: var(--blue); }
.saldo-card.ganancias::before  { background: var(--green); }
.saldo-card.referidos::before  { background: var(--yellow); }
.saldo-card.bonos::before      { background: var(--purple); }
.saldo-label {
  font-size: 12px; color: var(--text-secondary);
  margin-bottom: 8px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.saldo-valor {
  font-size: 22px; font-weight: 700;
  color: var(--text-primary);
  font-family: 'Sora', sans-serif;
}
.saldo-icon {
  position: absolute; right: 16px; top: 16px;
  font-size: 22px; opacity: 0.15;
}
.saldo-card.disponible .saldo-icon { color: var(--blue); }
.saldo-card.ganancias .saldo-icon  { color: var(--green); }
.saldo-card.referidos .saldo-icon  { color: var(--yellow); }
.saldo-card.bonos .saldo-icon      { color: var(--purple); }

/* Delta badge */
.delta-badge {
  position: absolute;
  top: 8px; right: 8px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px; font-weight: 700;
  font-family: 'Sora', sans-serif;
  animation: fadeInDown 0.3s ease, fadeOut 0.4s ease 2.6s forwards;
  pointer-events: none;
}
.delta-badge.pos { background: rgba(16,185,129,0.2); color: var(--green-success); }
.delta-badge.neg { background: rgba(239,68,68,0.2);  color: var(--red); }

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

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 20px;
  border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary   { background: var(--blue);  color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--blue-dark); color: #fff; }
.btn-success   { background: var(--green-success); color: #fff; }
.btn-success:hover { background: #059669; color: #fff; }
.btn-danger    { background: var(--red);   color: #fff; }
.btn-danger:hover  { background: var(--red-dark); color: #fff; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-accent { background: linear-gradient(135deg, var(--blue), var(--green)); color: #fff; }
.btn-accent:hover { opacity: 0.88; color: #fff; }
.btn-warning { background: var(--yellow); color: #000; }
.btn-sm  { padding: 6px 12px; font-size: 13px; }
.btn-lg  { padding: 13px 28px; font-size: 15px; }
.btn-full { width: 100%; }
.btn-icon-only {
  width: 36px; height: 36px; padding: 0;
  border-radius: var(--radius-sm);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; margin-bottom: 7px;
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary);
}
.form-control {
  width: 100%; padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary); font-size: 14px;
  transition: border-color var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--blue); }
.form-control::placeholder { color: var(--text-muted); }
.form-select {
  width: 100%; padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary); font-size: 14px;
  cursor: pointer; outline: none;
  transition: border-color var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%2394A3B8' d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.form-select:focus { border-color: var(--blue); }
.form-select option { background: var(--bg-card); color: var(--text-primary); }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-control:disabled, .form-select:disabled {
  opacity: 0.5; cursor: not-allowed;
}
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--red); margin-top: 5px; }

/* Input group (prefix + input) */
.input-group {
  display: flex; gap: 0;
}
.input-group .prefix-select {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  border-right: none;
  width: auto; min-width: 110px; max-width: 150px;
  flex-shrink: 0;
}
.input-group .form-control {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.input-with-icon { position: relative; }
.input-with-icon .form-control { padding-right: 42px; }
.input-with-icon .input-icon {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); font-size: 16px;
  cursor: pointer; transition: color var(--transition);
}
.input-with-icon .input-icon:hover { color: var(--text-primary); }

/* Password strength */
.password-strength { margin-top: 6px; }
.strength-bar {
  height: 4px; border-radius: 2px;
  background: var(--border); overflow: hidden;
}
.strength-bar-fill {
  height: 100%; border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
  width: 0;
}
.strength-text { font-size: 11px; margin-top: 4px; color: var(--text-muted); }

/* Char counter */
.char-counter { font-size: 12px; color: var(--text-muted); text-align: right; margin-top: 4px; }
.char-counter.warn { color: var(--yellow); }
.char-counter.over { color: var(--red); }

/* ============================================================
   ALERTS / FLASH MESSAGES
   ============================================================ */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 14px; display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 16px; border: 1px solid transparent;
}
.alert i { font-size: 16px; margin-top: 1px; flex-shrink: 0; }
.alert-success { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.3); color: #6ee7b7; }
.alert-error   { background: rgba(239,68,68,0.12);  border-color: rgba(239,68,68,0.3);  color: #fca5a5; }
.alert-warning { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.3); color: #fcd34d; }
.alert-info    { background: rgba(79,142,247,0.12); border-color: rgba(79,142,247,0.3); color: #93c5fd; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 700; line-height: 1.4;
}
.badge-primary  { background: rgba(79,142,247,0.18); color: var(--blue); }
.badge-success  { background: rgba(16,185,129,0.18); color: var(--green-success); }
.badge-danger   { background: rgba(239,68,68,0.18);  color: var(--red); }
.badge-warning  { background: rgba(245,158,11,0.18); color: var(--yellow); }
.badge-muted    { background: rgba(148,163,184,0.12); color: var(--text-secondary); }
.badge-vip      { background: rgba(245,158,11,0.18); color: var(--yellow); }
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
}
.badge-dot.green { background: var(--green-success); box-shadow: 0 0 6px var(--green-success); }
.badge-dot.red   { background: var(--red); }
.badge-dot.yellow{ background: var(--yellow); }

/* Notification badge */
.notif-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 10px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
}

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
table.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 14px;
}
.data-table th {
  background: var(--bg-card2); padding: 10px 14px;
  text-align: left; font-size: 12px; font-weight: 600;
  color: var(--text-secondary); text-transform: uppercase;
  letter-spacing: 0.5px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 11px 14px; border-bottom: 1px solid rgba(42,45,62,0.5);
  color: var(--text-primary); white-space: nowrap;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(79,142,247,0.04); }
.data-table tr.highlight td { background: rgba(245,158,11,0.06); }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-wrap {
  background: var(--bg-input); border-radius: 10px;
  height: 7px; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 10px;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width 0.6s ease;
}
.progress-fill.gold { background: linear-gradient(90deg, var(--yellow), #f97316); }

/* ============================================================
   TABS
   ============================================================ */
.tabs-nav {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto; scrollbar-width: none;
}
.tabs-nav::-webkit-scrollbar { display: none; }
.tab-btn {
  padding: 9px 16px; border: none; background: transparent;
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: all var(--transition);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-family: inherit;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ============================================================
   ACCORDION / FAQ
   ============================================================ */
.accordion { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.accordion + .accordion { margin-top: 10px; }
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-item:last-child { border-bottom: none; }
.accordion-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px; background: var(--bg-card);
  border: none; cursor: pointer;
  color: var(--text-primary); font-size: 14px; font-weight: 500;
  text-align: left; font-family: inherit;
  transition: background var(--transition);
}
.accordion-trigger:hover { background: var(--bg-card2); }
.accordion-trigger i.acc-icon { transition: transform var(--transition); font-size: 14px; color: var(--text-muted); }
.accordion-trigger.open i.acc-icon { transform: rotate(180deg); }
.accordion-body {
  background: var(--bg-input); padding: 0 18px;
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease, padding 0.2s;
  font-size: 14px; color: var(--text-secondary); line-height: 1.7;
}
.accordion-body.open { padding: 14px 18px; max-height: 600px; }

/* ============================================================
   SPINNER
   ============================================================ */
.spinner {
  width: 22px; height: 22px;
  border: 3px solid rgba(79,142,247,0.2);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
.spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.spinner-lg { width: 36px; height: 36px; border-width: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Live dot */
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green-success);
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16,185,129,0.4);
  animation: pulse-dot 1.8s infinite;
}
@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
  70%  { box-shadow: 0 0 0 7px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

/* ============================================================
   COUNTDOWN TIMERS
   ============================================================ */
.countdown-group {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.countdown-unit {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 4px 8px;
  text-align: center; min-width: 42px;
}
.countdown-unit .cd-val {
  font-family: 'Sora', sans-serif;
  font-size: 16px; font-weight: 700; color: var(--text-primary);
  line-height: 1;
}
.countdown-unit .cd-lbl {
  font-size: 9px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.countdown-sep { color: var(--text-muted); font-weight: 700; font-size: 16px; }

/* ============================================================
   INVESTMENT CARD
   ============================================================ */
.investment-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
  transition: border-color var(--transition);
}
.investment-card:hover { border-color: var(--border-light); }
.investment-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.investment-sector {
  display: flex; align-items: center; gap: 10px;
}
.sector-icon-wrap {
  width: 38px; height: 38px;
  background: rgba(79,142,247,0.12);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--blue);
}
.sector-name { font-weight: 600; font-size: 14px; }
.sector-amount { font-family: 'Sora', sans-serif; font-size: 16px; font-weight: 700; color: var(--green); }
.investment-timers {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin: 14px 0;
}
.timer-block { flex: 1; min-width: 160px; }
.timer-label { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; }

/* ============================================================
   SECTOR GRID
   ============================================================ */
.sector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.sector-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 14px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.sector-card:hover { border-color: var(--blue); background: var(--bg-card2); }
.sector-card.selected { border-color: var(--blue); background: rgba(79,142,247,0.08); }
.sector-card-icon { font-size: 28px; color: var(--blue); margin-bottom: 10px; }
.sector-card-name { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.sector-card-min  { font-size: 12px; color: var(--text-muted); }

/* ============================================================
   REFERRAL TREE
   ============================================================ */
.ref-tree { }
.ref-node {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 8px;
  background: var(--bg-card);
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.ref-node.l1 { border-left: 3px solid var(--blue); }
.ref-node.l2 { border-left: 3px solid var(--green); margin-left: 20px; }
.ref-node.l3 { border-left: 3px solid var(--yellow); margin-left: 40px; }
.ref-node-info { display: flex; align-items: center; gap: 10px; flex: 1; }
.ref-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-input); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--text-secondary);
  flex-shrink: 0;
}
.ref-username { font-size: 13px; font-weight: 600; }
.ref-status { font-size: 11px; margin-top: 2px; }
.ref-status.registered { color: var(--text-muted); }
.ref-status.deposited  { color: var(--yellow); }
.ref-status.invested   { color: var(--green-success); }
.ref-children { display: none; }
.ref-children.open { display: block; }

/* ============================================================
   STATS GRID
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.stat-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.4px; }
.stat-number {
  font-family: 'Sora', sans-serif;
  font-size: 24px; font-weight: 700; color: var(--text-primary);
}
.stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ============================================================
   VIP LEVELS
   ============================================================ */
.vip-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  transition: all var(--transition);
  position: relative;
}
.vip-card.unlocked { border-color: var(--yellow); background: rgba(245,158,11,0.05); }
.vip-card.locked   { opacity: 0.55; filter: grayscale(0.4); }
.vip-card.current  { border-color: var(--blue); background: rgba(79,142,247,0.06); }
.vip-name { font-family: 'Sora', sans-serif; font-size: 15px; font-weight: 700; color: var(--yellow); }
.vip-req  { font-size: 12px; color: var(--text-muted); }
.vip-locked-overlay {
  position: absolute; inset: 0; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--text-muted);
}

/* ============================================================
   ACTIVITY FEED
   ============================================================ */
.feed-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid rgba(42,45,62,0.5);
  font-size: 13px;
}
.feed-item:last-child { border-bottom: none; }
.feed-icon {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.feed-icon.deposit    { background: rgba(79,142,247,0.15); color: var(--blue); }
.feed-icon.investment { background: rgba(0,212,168,0.15);  color: var(--green); }
.feed-icon.withdrawal { background: rgba(245,158,11,0.15); color: var(--yellow); }
.feed-icon.earning    { background: rgba(16,185,129,0.15); color: var(--green-success); }
.feed-info { flex: 1; min-width: 0; }
.feed-user { font-weight: 600; color: var(--text-primary); }
.feed-desc { color: var(--text-secondary); font-size: 12px; }
.feed-amount { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 13px; color: var(--green); white-space: nowrap; }
.feed-time   { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* ============================================================
   LANDING PAGE
   ============================================================ */
.landing-wrap {
  min-height: 100vh;
  background: var(--bg-main);
}
.landing-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(15,17,23,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex; align-items: center;
  padding: 0 32px;
  justify-content: space-between;
}
.landing-nav { display: flex; align-items: center; gap: 16px; }
.hero-section {
  padding: 120px 32px 80px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(79,142,247,0.12) 0%, transparent 65%);
}
.hero-title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 800; line-height: 1.15;
  background: linear-gradient(135deg, var(--text-primary), var(--blue));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 16px;
}
.hero-subtitle { font-size: 17px; color: var(--text-secondary); max-width: 520px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 32px; justify-content: center; flex-wrap: wrap;
  margin-top: 56px;
}
.hero-stat { text-align: center; }
.hero-stat-num { font-family: 'Sora', sans-serif; font-size: 28px; font-weight: 800; color: var(--text-primary); }
.hero-stat-lbl { font-size: 13px; color: var(--text-secondary); }
.section { padding: 64px 32px; }
.section-title { font-family: 'Sora', sans-serif; font-size: 26px; font-weight: 700; margin-bottom: 8px; text-align: center; }
.section-sub { color: var(--text-secondary); text-align: center; margin-bottom: 40px; }
.how-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 860px; margin: 0 auto;
}
.how-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 22px; text-align: center;
}
.how-step {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--green));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif; font-weight: 800; font-size: 18px;
  margin: 0 auto 14px;
}
.how-icon { font-size: 28px; color: var(--blue); margin-bottom: 12px; }
.landing-footer {
  background: var(--bg-card); border-top: 1px solid var(--border);
  padding: 28px 32px; text-align: center;
  color: var(--text-muted); font-size: 13px;
}

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: var(--bg-main);
  background-image: radial-gradient(ellipse at 30% 20%, rgba(79,142,247,0.06) 0%, transparent 55%),
                    radial-gradient(ellipse at 70% 80%, rgba(0,212,168,0.05) 0%, transparent 50%);
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow);
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .logo-text {
  font-family: 'Sora', sans-serif;
  font-size: 26px; font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--green));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-title { font-size: 20px; font-weight: 700; margin-bottom: 22px; }
.auth-back {
  display: flex; align-items: center; gap: 6px;
  color: var(--text-muted); font-size: 13px;
  margin-bottom: 20px; cursor: pointer;
  background: none; border: none; font-family: inherit;
}
.auth-back:hover { color: var(--text-primary); }
.auth-link-row { text-align: center; margin-top: 18px; font-size: 14px; color: var(--text-secondary); }

/* ============================================================
   ADMIN LAYOUT
   ============================================================ */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  position: fixed; top: 0; left: 0; height: 100vh;
  overflow-y: auto; z-index: 100;
  display: flex; flex-direction: column;
}
.admin-content {
  margin-left: 240px; flex: 1;
  padding: 28px; min-height: 100vh;
}
.admin-topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.admin-title { font-family: 'Sora', sans-serif; font-size: 22px; font-weight: 700; }
.admin-breadcrumb { font-size: 13px; color: var(--text-muted); }
.admin-nav-section {
  padding: 8px 16px 4px;
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted); font-weight: 600;
}

/* ============================================================
   COPY BUTTON
   ============================================================ */
.copy-wrap { position: relative; display: flex; gap: 0; }
.copy-wrap .form-control { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.copy-btn {
  padding: 10px 14px;
  background: var(--bg-card2); border: 1px solid var(--border); border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary); cursor: pointer;
  transition: all var(--transition); font-size: 15px;
}
.copy-btn:hover { color: var(--blue); border-color: var(--blue); }
.copy-btn.copied { color: var(--green-success); }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header { margin-bottom: 24px; }
.page-title { font-family: 'Sora', sans-serif; font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.page-sub { font-size: 14px; color: var(--text-secondary); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000; display: none;
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px; width: 100%; max-width: 480px;
  box-shadow: var(--shadow);
  animation: slideUp 0.25s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 20px; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center; padding: 48px 20px;
  color: var(--text-secondary);
}
.empty-state i { font-size: 40px; color: var(--text-muted); margin-bottom: 12px; display: block; }
.empty-state p { font-size: 14px; }

/* ============================================================
   SPLASH SCREEN
   ============================================================ */
.splash-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; text-align: center; padding: 32px;
}
.splash-icon { font-size: 56px; margin-bottom: 20px; }
.splash-title { font-family: 'Sora', sans-serif; font-size: 28px; font-weight: 800; margin-bottom: 14px; }
.splash-msg   { color: var(--text-secondary); font-size: 16px; max-width: 460px; }

/* ============================================================
   FILE UPLOAD
   ============================================================ */
.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px; text-align: center;
  cursor: pointer; transition: all var(--transition);
  color: var(--text-secondary);
}
.file-upload-area:hover, .file-upload-area.drag { border-color: var(--blue); background: rgba(79,142,247,0.04); }
.file-upload-area i { font-size: 28px; margin-bottom: 8px; display: block; }
.file-upload-area input[type=file] { display: none; }
.file-name { font-size: 13px; color: var(--green-success); margin-top: 8px; }

/* ============================================================
   WITHDRAWAL SUMMARY
   ============================================================ */
.withdrawal-summary {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px;
  margin: 12px 0;
}
.withdrawal-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; font-size: 14px;
}
.withdrawal-row.total {
  border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px;
  font-weight: 700; font-size: 15px;
}
.withdrawal-row .label { color: var(--text-secondary); }
.withdrawal-row .value { font-family: 'Sora', sans-serif; font-weight: 600; }

/* ============================================================
   FILTERS / SEARCH
   ============================================================ */
.filters-row {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center;
}
.filter-btn {
  padding: 6px 14px; border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent; color: var(--text-secondary);
  font-size: 13px; cursor: pointer; font-family: inherit;
  transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active { border-color: var(--blue); color: var(--blue); background: rgba(79,142,247,0.08); }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 12px;
  flex: 1; max-width: 300px;
}
.search-box i { color: var(--text-muted); font-size: 15px; }
.search-box input {
  background: none; border: none; color: var(--text-primary);
  font-size: 14px; outline: none; width: 100%; font-family: inherit;
}
.search-box input::placeholder { color: var(--text-muted); }

/* ============================================================
   PAGINATOR
   ============================================================ */
.paginator {
  display: flex; gap: 6px; justify-content: center; margin-top: 16px; flex-wrap: wrap;
}
.page-btn {
  min-width: 34px; height: 34px; padding: 0 8px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-card); color: var(--text-secondary);
  font-size: 13px; cursor: pointer; font-family: inherit;
  transition: all var(--transition); text-decoration: none;
}
.page-btn:hover, .page-btn.current { border-color: var(--blue); color: var(--blue); }
.page-btn.current { background: rgba(79,142,247,0.1); font-weight: 700; }

/* ============================================================
   MISC
   ============================================================ */
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-muted   { color: var(--text-muted) !important; }
.text-green   { color: var(--green-success) !important; }
.text-red     { color: var(--red) !important; }
.text-yellow  { color: var(--yellow) !important; }
.text-blue    { color: var(--blue) !important; }
.fw-bold      { font-weight: 700; }
.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: 6px; }
.mb-2  { margin-bottom: 12px; }
.mb-3  { margin-bottom: 18px; }
.mb-4  { margin-bottom: 24px; }
.mt-2  { margin-top: 12px; }
.mt-3  { margin-top: 18px; }
.mt-4  { margin-top: 24px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 14px; }
.flex  { display: flex; }
.flex-center  { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }

  .mobile-header { display: flex; }
  .bottom-nav    { display: flex; }

  .main-content {
    margin-left: 0;
    padding: 80px 16px calc(var(--bottomnav-h) + 16px);
    max-width: 100vw;
  }
  .admin-content {
    margin-left: 0;
    padding: 20px 14px;
  }
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }

  .saldo-grid { grid-template-columns: repeat(2, 1fr); }
  .how-grid   { grid-template-columns: 1fr; }
  .two-col, .three-col, .grid-2-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .sector-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-section { padding: 90px 16px 50px; }
  .section { padding: 40px 16px; }
  .landing-header { padding: 0 16px; }
  .auth-card { padding: 24px 18px; }
  .investment-timers { flex-direction: column; gap: 8px; }
  .filters-row .search-box { max-width: 100%; }
}

@media (max-width: 480px) {
  .saldo-grid { grid-template-columns: 1fr 1fr; }
  .saldo-valor { font-size: 18px; }
  .stat-number { font-size: 20px; }
  .page-title  { font-size: 18px; }
  .card { padding: 14px; }
}

/* ============================================================
   PWA INSTALL PROMPT
   ============================================================ */
.pwa-prompt {
  position: fixed; bottom: calc(var(--bottomnav-h) + 12px); left: 12px; right: 12px;
  background: var(--bg-card); border: 1px solid var(--blue);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  z-index: 600; animation: slideUp 0.3s ease;
  box-shadow: var(--shadow);
}
.pwa-prompt p { flex: 1; font-size: 13px; color: var(--text-secondary); }
.pwa-prompt-actions { display: flex; gap: 8px; }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
