/* =============================================
   RegeNext / RegeNext — style.css
   Single source of truth for all shared styles
   ============================================= */

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

/* ---- Variables ---- */
:root {
  --bg-primary:    #050810;
  --bg-secondary:  #0a0f1e;
  --bg-card:       rgba(255,255,255,0.04);
  --glass-bg:      rgba(255,255,255,0.04);
  --glass-border:  rgba(255,255,255,0.08);
  --border:        rgba(255,255,255,0.08);
  --border-accent: rgba(0,212,170,0.3);
  --border-glow:   rgba(0,212,170,0.3);
  --accent:        #00d4aa;
  --accent-2:      #6c63ff;
  --accent-warm:   #f0b429;
  --accent-teal:   #00d4aa;
  --accent-blue:   #3b82f6;
  --accent-purple: #a78bfa;
  --accent-green:  #22c55e;
  --text-primary:  #f0f4ff;
  --text-secondary:#8892b0;
  --text-muted:    #4a5568;
  --danger:        #ff4d6d;
  --success:       #00d4aa;
  --warning:       #f0b429;
  --sidebar-width: 260px;
  --topbar-height: 70px;
  --radius:        16px;
  --radius-lg:     20px;
  --radius-sm:     10px;
  --shadow:        0 8px 32px rgba(0,0,0,0.4);
  --shadow-card:   0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow:   0 0 30px rgba(0,212,170,0.15);
  --glow:          0 0 30px rgba(0,212,170,0.15);
  --gradient-main: linear-gradient(135deg, #00d4aa, #6c63ff);
  --font-display:  'Plus Jakarta Sans', sans-serif;
  --font-body:     'Manrope', sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg-primary); color: var(--text-primary); line-height: 1.6; overflow-x: hidden; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
input, select, textarea, button { font-family: var(--font-body); }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }

/* ---- Utilities ---- */
.text-accent    { color: var(--accent); }
.text-accent2   { color: var(--accent-2); }
.text-warm      { color: var(--accent-warm); }
.text-danger    { color: var(--danger); }
.text-muted     { color: var(--text-secondary); }
.text-sm        { font-size: 0.85rem; }
.text-xs        { font-size: 0.75rem; }
.gradient-text  {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.spacer { flex: 1; }

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--accent), #00a886);
  color: var(--bg-primary); font-family: var(--font-display);
  font-weight: 700; font-size: 0.9rem; padding: 12px 28px;
  border: none; border-radius: 50px; cursor: pointer;
  transition: all 0.3s; letter-spacing: 0.5px; white-space: nowrap;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,212,170,0.4); }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--accent); font-family: var(--font-display);
  font-weight: 600; font-size: 0.9rem; padding: 11px 27px;
  border: 1px solid var(--accent); border-radius: 50px;
  cursor: pointer; transition: all 0.3s; white-space: nowrap;
}
.btn-outline:hover { background: rgba(0,212,170,0.1); transform: translateY(-2px); }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(108,99,255,0.15); color: var(--accent-2); font-family: var(--font-display);
  font-weight: 600; font-size: 0.9rem; padding: 11px 27px;
  border: 1px solid rgba(108,99,255,0.3); border-radius: 50px;
  cursor: pointer; transition: all 0.3s; white-space: nowrap;
}
.btn-secondary:hover { background: rgba(108,99,255,0.25); transform: translateY(-2px); }
.btn-sm { padding: 8px 18px !important; font-size: 0.82rem !important; }
.btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: rgba(255,77,109,0.12); color: var(--danger);
  border: 1px solid rgba(255,77,109,0.3); border-radius: 8px;
  padding: 7px 14px; font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.btn-danger:hover { background: rgba(255,77,109,0.22); }
.btn-success {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: rgba(0,212,170,0.12); color: var(--accent);
  border: 1px solid rgba(0,212,170,0.3); border-radius: 8px;
  padding: 7px 14px; font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.btn-success:hover { background: rgba(0,212,170,0.22); }
.btn-text-danger {
  background: none; border: none; cursor: pointer;
  color: var(--danger); font-size: 0.78rem; font-weight: 600;
  padding: 5px 10px; border-radius: 6px; transition: background 0.2s; white-space: nowrap;
}
.btn-text-danger:hover { background: rgba(255,77,109,0.1); }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.25s; color: var(--text-secondary);
  position: relative; flex-shrink: 0;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* ---- Badges ---- */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 50px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.5px; white-space: nowrap; }
.badge-success { background: rgba(0,212,170,0.15);   color: var(--accent);       border: 1px solid rgba(0,212,170,0.3); }
.badge-warning { background: rgba(240,180,41,0.15);  color: var(--accent-warm);  border: 1px solid rgba(240,180,41,0.3); }
.badge-danger  { background: rgba(255,77,109,0.15);  color: var(--danger);       border: 1px solid rgba(255,77,109,0.3); }
.badge-info    { background: rgba(108,99,255,0.15);  color: var(--accent-2);     border: 1px solid rgba(108,99,255,0.3); }
.badge-muted   { background: rgba(255,255,255,0.06); color: var(--text-secondary);border: 1px solid var(--border); }
.badge-status  { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 50px; font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.badge-status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-status.active   { background: rgba(0,212,170,0.12);  color: var(--accent);      border: 1px solid rgba(0,212,170,0.25); }
.badge-status.pending  { background: rgba(240,180,41,0.12); color: var(--accent-warm); border: 1px solid rgba(240,180,41,0.25); }
.badge-status.blocked  { background: rgba(255,77,109,0.12); color: var(--danger);      border: 1px solid rgba(255,77,109,0.25); }
.badge-status.approved { background: rgba(0,212,170,0.12);  color: var(--accent);      border: 1px solid rgba(0,212,170,0.25); }
.badge-status.rejected { background: rgba(255,77,109,0.12); color: var(--danger);      border: 1px solid rgba(255,77,109,0.25); }
.badge-plan { display: inline-flex; padding: 3px 10px; border-radius: 50px; font-size: 0.72rem; font-weight: 600; background: rgba(240,180,41,0.12); color: var(--accent-warm); border: 1px solid rgba(240,180,41,0.3); }
.section-tag { display: inline-flex; align-items: center; background: rgba(0,212,170,0.1); border: 1px solid rgba(0,212,170,0.2); border-radius: 50px; padding: 5px 14px; font-size: 0.75rem; font-weight: 600; color: var(--accent); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 16px; }

/* ---- Forms ---- */
.form-group  { margin-bottom: 18px; }
.form-label  { display: block; font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 8px; }
.form-hint   { font-size: 0.75rem; color: var(--text-muted); margin-top: 5px; }
.form-control {
  width: 100%; background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.9rem;
  padding: 12px 16px; transition: all 0.3s; outline: none; appearance: none;
}
.form-control:focus { border-color: var(--accent); background: rgba(0,212,170,0.05); box-shadow: 0 0 0 3px rgba(0,212,170,0.1); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238892b0' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; cursor: pointer; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--glass-border); }

/* ---- Table ---- */
.table-container { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.2); }
.table-wrap, .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.data-table th { background: rgba(255,255,255,0.04); color: var(--text-secondary); font-family: var(--font-display); font-size: 0.73rem; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 0.875rem; color: var(--text-primary); }
.data-table tr:hover td { background: rgba(255,255,255,0.03); }
.data-table tr:last-child td { border-bottom: none; }
.tx-hash { font-family: monospace; font-size: 0.78rem; color: var(--text-muted); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.table-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 0.72rem; font-weight: 700; color: var(--bg-primary); flex-shrink: 0; }
.u-name { font-size: 0.875rem; font-weight: 600; white-space: nowrap; }
.u-id   { font-size: 0.72rem; color: var(--text-muted); }
.amount-pos { color: var(--accent);      font-weight: 600; font-family: var(--font-display); font-size: 0.88rem; }
.amount-neg { color: var(--danger);      font-weight: 600; font-family: var(--font-display); font-size: 0.88rem; }
.amount-neu { color: var(--accent-warm); font-weight: 600; font-family: var(--font-display); font-size: 0.88rem; }

/* ---- Stat Cards ---- */
.stat-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 20px; position: relative; overflow: hidden; transition: all 0.3s; box-shadow: 0 2px 12px rgba(0,0,0,0.2); }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0; transition: opacity 0.3s; }
.stat-card:hover { border-color: var(--border-glow); box-shadow: var(--glow); }
.stat-card:hover::before { opacity: 1; }
.stat-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; flex-shrink: 0; }
.stat-icon svg { width: 20px; height: 20px; }
.stat-icon.teal   { background: rgba(0,212,170,0.1);  border: 1px solid rgba(0,212,170,0.2); }
.stat-icon.teal svg { stroke: var(--accent); }
.stat-icon.blue   { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.2); }
.stat-icon.blue svg { stroke: #3b82f6; }
.stat-icon.gold   { background: rgba(240,180,41,0.1); border: 1px solid rgba(240,180,41,0.2); }
.stat-icon.gold svg { stroke: var(--accent-warm); }
.stat-icon.purple { background: rgba(108,99,255,0.1); border: 1px solid rgba(108,99,255,0.2); }
.stat-icon.purple svg { stroke: var(--accent-2); }
.stat-icon.red    { background: rgba(255,77,109,0.1); border: 1px solid rgba(255,77,109,0.2); }
.stat-icon.red svg { stroke: var(--danger); }
.stat-icon.green  { background: rgba(34,197,94,0.1);  border: 1px solid rgba(34,197,94,0.2); }
.stat-icon.green svg { stroke: #22c55e; }
.stat-value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 5px; }
.stat-change { font-size: 0.75rem; margin-top: 8px; display: flex; align-items: center; gap: 4px; }
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }
.stats-grid   { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
.stats-grid-5 { display: grid; grid-template-columns: repeat(5,1fr); gap: 16px; margin-bottom: 24px; }

/* ---- Dashboard body & layout ---- */
.dashboard-body { background: var(--bg-primary); min-height: 100vh; }
.dashboard-layout { display: flex; min-height: 100vh; }

/* ---- Sidebar ---- */
.sidebar { position: fixed; top: 0; left: 0; width: var(--sidebar-width); height: 100vh; background: var(--bg-secondary); border-right: 1px solid var(--border); z-index: 1000; overflow-y: auto; overflow-x: hidden; transition: transform 0.3s; display: flex; flex-direction: column; scrollbar-width: thin; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.brand-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; white-space: nowrap; }
.sidebar-logo { padding: 22px 18px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.logo-text { font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.logo-sub { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; }
.sidebar-nav { padding: 10px 0; flex: 1; }
.nav-section-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); padding: 14px 18px 5px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 18px; color: var(--text-secondary); font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: all 0.22s; border-left: 2px solid transparent; }
.nav-item:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.nav-item.active { color: var(--accent); background: rgba(0,212,170,0.07); border-left-color: var(--accent); }
.nav-item svg { flex-shrink: 0; width: 17px; height: 17px; }
.nav-badge { margin-left: auto; background: var(--danger); color: white; font-size: 0.66rem; font-weight: 700; padding: 1px 6px; border-radius: 50px; }
.sidebar-footer { padding: 12px 14px; border-top: 1px solid var(--border); flex-shrink: 0; display: flex; align-items: center; gap: 8px; }
.sidebar-user { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.avatar, .user-avatar-sm { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 0.78rem; color: var(--bg-primary); flex-shrink: 0; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.user-meta { min-width: 0; }
.user-name-sm { font-size: 0.83rem; font-weight: 600; color: var(--text-primary); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-id-sm   { font-size: 0.7rem; color: var(--text-muted); display: block; white-space: nowrap; }
.btn-logout { width: 30px; height: 30px; border-radius: 8px; background: rgba(255,77,109,0.08); border: 1px solid rgba(255,77,109,0.2); display: flex; align-items: center; justify-content: center; color: var(--danger); cursor: pointer; transition: all 0.2s; flex-shrink: 0; }
.btn-logout:hover { background: rgba(255,77,109,0.18); }
.btn-logout svg { width: 15px; height: 15px; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.65); z-index: 999; }
.sidebar-overlay.active { display: block; }

/* ---- Topbar ---- */
.top-navbar { position: fixed; top: 0; right: 0; left: var(--sidebar-width); height: var(--topbar-height); background: rgba(5,8,16,0.92); border-bottom: 1px solid var(--border); backdrop-filter: blur(20px); z-index: 900; display: flex; align-items: center; padding: 0 22px; gap: 12px; }
.sidebar-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--text-primary); padding: 4px; flex-shrink: 0; }
.sidebar-toggle svg { width: 22px; height: 22px; display: block; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 5px; color: var(--text-primary); }
.hamburger span { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: all 0.3s; }
.navbar-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; color: var(--text-primary); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.navbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.notif-dot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; background: var(--danger); border-radius: 50%; border: 2px solid var(--bg-primary); }
.nav-user-chip { display: flex; align-items: center; gap: 8px; background: rgba(0,212,170,0.06); border: 1px solid rgba(0,212,170,0.15); border-radius: 50px; padding: 5px 12px 5px 5px; font-size: 0.82rem; font-weight: 500; color: var(--text-primary); white-space: nowrap; }

/* ---- Page content ---- */
.main-content { margin-left: var(--sidebar-width); padding-top: var(--topbar-height); min-height: 100vh; }
.content-area, .page-content { padding: 24px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-title    { font-family: var(--font-display); font-size: 1.45rem; font-weight: 800; color: var(--text-primary); }
.page-subtitle { font-size: 0.84rem; color: var(--text-secondary); margin-top: 4px; }

/* ---- Cards ---- */
.card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 22px; }
.glass-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 20px; box-shadow: 0 2px 12px rgba(0,0,0,0.2); }
.card-header, .card-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.card-title    { font-size: 1rem; font-weight: 700; }
.card-subtitle { font-size: 0.78rem; color: var(--text-secondary); margin-top: 3px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }

/* ---- Grids ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }

/* ---- Charts ---- */
.chart-container { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 20px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.2); }
.chart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.chart-header h3 { font-size: 1rem; }
.chart-tabs { display: flex; gap: 4px; }
.chart-tab { padding: 5px 12px; border-radius: 6px; font-size: 0.78rem; font-weight: 600; cursor: pointer; border: none; background: none; color: var(--text-secondary); transition: all 0.25s; }
.chart-tab.active { background: rgba(0,212,170,0.15); color: var(--accent); }
.chart-wrap { position: relative; width: 100%; height: 240px; }
.chart-wrap canvas { position: absolute !important; top: 0; left: 0; width: 100% !important; height: 100% !important; }
.chart-wrap-sm { position: relative; width: 100%; height: 180px; }
.chart-wrap-sm canvas { position: absolute !important; top: 0; left: 0; width: 100% !important; height: 100% !important; }
.mini-chart-wrap { position: relative; height: 56px; width: 100%; }
.mini-chart-wrap canvas { position: absolute !important; top: 0; left: 0; width: 100% !important; height: 100% !important; }

/* ---- Modal ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.72); backdrop-filter: blur(8px); z-index: 2000; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; padding: 16px; }
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; width: 100%; max-width: 480px; transform: translateY(20px); transition: transform 0.3s; max-height: 90vh; overflow-y: auto; }
.modal-overlay.active .modal { transform: translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-header h3 { font-size: 1.1rem; }
.modal-close { width: 30px; height: 30px; border-radius: 50%; background: var(--bg-card); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-secondary); transition: all 0.25s; flex-shrink: 0; }
.modal-close:hover { border-color: var(--danger); color: var(--danger); }
.modal-close svg { width: 14px; height: 14px; }

/* ---- Toast ---- */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; display: flex; align-items: center; gap: 10px; font-size: 0.875rem; box-shadow: var(--shadow); min-width: 240px; max-width: 300px; pointer-events: all; animation: toastIn 0.3s ease; }
.toast.success { border-left: 3px solid var(--accent); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.warning { border-left: 3px solid var(--accent-warm); }
.toast svg { flex-shrink: 0; }
@keyframes toastIn { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ---- Pagination ---- */
.pagination { display: flex; align-items: center; gap: 6px; padding: 12px 20px; justify-content: flex-end; border-top: 1px solid var(--border); flex-wrap: wrap; }
.page-btn { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--bg-card); border: 1px solid var(--border); cursor: pointer; font-size: 0.82rem; color: var(--text-secondary); transition: all 0.22s; }
.page-btn:hover, .page-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(0,212,170,0.1); }

/* ---- Toggle ---- */
.toggle, .toggle-switch { position: relative; width: 44px; height: 24px; cursor: pointer; flex-shrink: 0; }
.toggle input, .toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track, .toggle-slider { position: absolute; inset: 0; background: rgba(255,255,255,0.1); border-radius: 50px; border: 1px solid var(--border); transition: all 0.3s; }
.toggle input:checked + .toggle-track,
.toggle-switch input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
.toggle-thumb,
.toggle-slider::before { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; transition: transform 0.3s; pointer-events: none; }
.toggle-slider::before { content: ''; }
.toggle input:checked ~ .toggle-thumb,
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ---- Action menu ---- */
.action-menu { position: relative; }
.action-menu-items { position: absolute; right: 0; top: calc(100% + 4px); background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px; z-index: 100; min-width: 140px; display: none; box-shadow: var(--shadow); }
.action-menu.open .action-menu-items { display: block; }
.action-menu-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 6px; font-size: 0.83rem; cursor: pointer; color: var(--text-secondary); transition: all 0.2s; }
.action-menu-item:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.action-menu-item.danger:hover { background: rgba(255,77,109,0.1); color: var(--danger); }

/* ---- Misc components ---- */
.wallet-address-box { background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.8rem; font-family: monospace; color: var(--text-secondary); word-break: break-all; }
.referral-box { background: rgba(0,212,170,0.06); border: 1px solid rgba(0,212,170,0.2); border-radius: var(--radius-sm); padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.referral-link-text { font-size: 0.8rem; color: var(--accent); word-break: break-all; font-family: monospace; flex: 1; }
.income-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 18px; display: flex; align-items: center; gap: 14px; transition: all 0.3s; }
.income-card:hover { border-color: var(--border-glow); }
.income-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.income-amount { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; }
.income-label  { font-size: 0.78rem; color: var(--text-secondary); margin-top: 2px; }
.level-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 50px; font-size: 0.72rem; font-weight: 700; border: 1px solid; }
.tree-item { display: flex; align-items: center; gap: 12px; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); padding: 11px 14px; margin-bottom: 8px; transition: all 0.25s; }
.tree-item:hover { border-color: var(--border-glow); }
.ti-avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 0.76rem; font-weight: 700; color: var(--bg-primary); flex-shrink: 0; }
.ti-info { flex: 1; min-width: 0; }
.ti-name { font-size: 0.87rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ti-id   { font-size: 0.72rem; color: var(--text-muted); }
.ti-earn { font-size: 0.87rem; color: var(--accent); font-weight: 600; text-align: right; white-space: nowrap; }
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 6px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Responsive styles moved to responsive.css */

/* ---- Additional missing classes ---- */
/* Background card shorthand */
.bg-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius); }

/* User name/id in topbar */
.user-name { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); }
.user-id   { font-size: 0.75rem; color: var(--text-muted); }

/* Notification button */
.notif-btn { position: relative; }

/* Button generic alias */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 20px; border-radius: 8px; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.2s; border: 1px solid var(--glass-border); background: rgba(255,255,255,0.05); color: var(--text-primary); }
.btn:hover { background: rgba(255,255,255,0.09); }
.btn.btn-primary { background: linear-gradient(135deg, var(--accent), #00a886); color: var(--bg-primary); border: none; border-radius: 50px; font-family: var(--font-display); font-weight: 700; padding: 12px 28px; }

/* Link button */
.btn-link { font-size: 0.8rem; color: var(--accent); font-weight: 500; transition: opacity 0.2s; white-space: nowrap; background: none; border: none; cursor: pointer; padding: 0; }
.btn-link:hover { opacity: 0.75; }

/* Positive value color */
.positive { color: var(--success); }

/* Disabled state */
.disabled { opacity: 0.4; pointer-events: none; }

/* Search bar (topbar) */
.search-bar { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 50px; padding: 8px 16px; width: 220px; transition: all 0.3s; }
.search-bar:focus-within { border-color: var(--accent); }
.search-bar input { background: none; border: none; outline: none; color: var(--text-primary); font-size: 0.85rem; width: 100%; }
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar svg { width: 15px; height: 15px; flex-shrink: 0; stroke: var(--text-muted); fill: none; }

/* Navbar action icon button alias */
.navbar-action { width: 38px; height: 38px; border-radius: 50%; background: var(--bg-card); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.25s; color: var(--text-secondary); position: relative; }
.navbar-action:hover { border-color: var(--accent); color: var(--accent); }
.navbar-action svg { width: 18px; height: 18px; }

/* Stats row */
.stats-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 24px; }

/* =============================================
   ICON SYSTEM — complete backgrounds & colors
   ============================================= */

/* stat-icon: default fallback background */
.stat-icon { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); }

/* stat-icon: accent = teal alias */
.stat-icon.accent { background: rgba(0,212,170,0.1); border: 1px solid rgba(0,212,170,0.2); color: var(--accent); }
.stat-icon.accent svg { stroke: var(--accent); }
.stat-icon.warn   { background: rgba(240,180,41,0.1);  border: 1px solid rgba(240,180,41,0.2); }
.stat-icon.warn svg { stroke: var(--accent-warm); }

/* income-icon: backgrounds by color */
.income-icon        { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); }
.income-icon.teal   { background: rgba(0,212,170,0.1);  border: 1px solid rgba(0,212,170,0.2); }
.income-icon.teal svg { stroke: var(--accent); }
.income-icon.purple { background: rgba(108,99,255,0.1); border: 1px solid rgba(108,99,255,0.2); }
.income-icon.purple svg { stroke: var(--accent-2); }
.income-icon.gold   { background: rgba(240,180,41,0.1); border: 1px solid rgba(240,180,41,0.2); }
.income-icon.gold svg { stroke: var(--accent-warm); }
.income-icon.red    { background: rgba(255,77,109,0.1); border: 1px solid rgba(255,77,109,0.2); }
.income-icon.red svg { stroke: var(--danger); }
.income-icon svg    { width: 20px; height: 20px; }

/* feat-icon (landing features section) */
.feat-icon        { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); }
.feat-icon.teal   { background: rgba(0,212,170,0.08);  border: 1px solid rgba(0,212,170,0.15); }
.feat-icon.purple { background: rgba(108,99,255,0.08); border: 1px solid rgba(108,99,255,0.15); }
.feat-icon.gold   { background: rgba(240,180,41,0.08); border: 1px solid rgba(240,180,41,0.15); }
.feat-icon.blue   { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.15); }
.feat-icon.red    { background: rgba(255,77,109,0.08); border: 1px solid rgba(255,77,109,0.15); }
.feat-icon.green  { background: rgba(34,197,94,0.08);  border: 1px solid rgba(34,197,94,0.15); }
.feat-icon svg    { width: 22px; height: 22px; }

/* step-icon (landing how-it-works) */
.step-icon { width: 56px; height: 56px; background: rgba(0,212,170,0.1); border: 1px solid rgba(0,212,170,0.25); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.step-icon svg { width: 22px; height: 22px; stroke: var(--accent); }

/* oc-icon (overview cards on landing) */
.oc-icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.oc-icon.teal   { background: rgba(0,212,170,0.1);  border: 1px solid rgba(0,212,170,0.2); }
.oc-icon.purple { background: rgba(108,99,255,0.1); border: 1px solid rgba(108,99,255,0.2); }
.oc-icon.gold   { background: rgba(240,180,41,0.1); border: 1px solid rgba(240,180,41,0.2); }
.oc-icon.blue   { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.2); }
.oc-icon svg { width: 24px; height: 24px; }

/* ---- Welcome banner typography ---- */
.ahc-greeting { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 2px; }
.ahc-name     { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; }
.ahc-id       { font-size: 0.78rem; color: var(--text-muted); font-weight: 400; margin-left: 6px; font-family: var(--font-body); }

/* ---- Icon SVG color inheritance ---- */
/* When icon has a color modifier, SVG currentColor inherits from parent */
.stat-icon.teal, .income-icon.teal, .feat-icon.teal, .oc-icon.teal,
.info-icon.teal, .security-icon.accent { color: var(--accent); }
.stat-icon.purple, .income-icon.purple, .feat-icon.purple, .oc-icon.purple { color: var(--accent-2); }
.stat-icon.gold, .income-icon.gold, .feat-icon.gold, .oc-icon.gold { color: var(--accent-warm); }
.stat-icon.red, .income-icon.red, .feat-icon.red { color: var(--danger); }
.stat-icon.blue, .income-icon.blue, .feat-icon.blue, .oc-icon.blue { color: var(--accent-blue); }
.stat-icon.green, .income-icon.green, .feat-icon.green { color: var(--accent-green); }
.stat-icon.warn, .security-icon.warn { color: var(--accent-warm); }
.security-icon.danger { color: var(--danger); }

/* All icon SVGs inherit parent color */
.stat-icon svg, .income-icon svg, .feat-icon svg, .oc-icon svg,
.info-icon svg, .security-icon svg, .step-icon svg,
.alert-icon svg, .session-icon svg { stroke: currentColor; fill: none; stroke-width: 1.8; }

/* =============================================
   GLOBAL SVG SIZE GUARD
   Prevents SVGs from expanding to browser default
   300x150px when no explicit size is set
   ============================================= */

/* Sidebar icons */
.nav-item > svg      { width: 17px !important; height: 17px !important; display: block; flex-shrink: 0; }
.sidebar-toggle > svg{ width: 22px !important; height: 22px !important; display: block; }
.icon-btn > svg      { width: 18px !important; height: 18px !important; display: block; }
.navbar-action > svg { width: 18px !important; height: 18px !important; display: block; }
.btn-logout > svg    { width: 15px !important; height: 15px !important; display: block; }
.hamburger > span    { display: block; }

/* Search bar */
.search-bar > svg  { width: 15px !important; height: 15px !important; display: block; flex-shrink: 0; }
.search-wrap > svg { width: 16px !important; height: 16px !important; display: block; position: absolute; }

/* Stat/income icons */
.stat-icon > svg   { width: 20px !important; height: 20px !important; display: block; }
.income-icon > svg { width: 20px !important; height: 20px !important; display: block; }

/* Modal / toast */
.modal-close > svg { width: 14px !important; height: 14px !important; display: block; }
.toast > svg       { width: 18px !important; height: 18px !important; display: block; flex-shrink: 0; }

/* Buttons with SVG */
.btn-primary > svg,
.btn-outline > svg,
.btn-secondary > svg,
.btn-success > svg,
.btn-danger > svg   { width: 15px !important; height: 15px !important; display: inline-block; flex-shrink: 0; }

/* Tree items */
.tree-item > svg { width: 16px !important; height: 16px !important; display: block; }

/* Stat change arrows */
.stat-change > svg { width: 12px !important; height: 12px !important; display: inline-block; flex-shrink: 0; }

/* Table cell SVGs */
.data-table td svg { width: 13px !important; height: 13px !important; display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* Chart tabs */
.chart-tab > svg { width: 14px !important; height: 14px !important; }

/* Pagination */
.page-btn > svg { width: 14px !important; height: 14px !important; display: block; }

/* Action menu items */
.action-menu-item > svg { width: 14px !important; height: 14px !important; display: inline-block; flex-shrink: 0; }

/* Generic safety net — any SVG directly in a flex/grid container gets constrained */
[class*="-icon"] > svg,
[class*="-btn"] > svg  { max-width: 100%; max-height: 100%; }

/* =============================================
   SECTION SPACING — vertical rhythm between blocks
   ============================================= */

/* Explicit spacing on all major dashboard block types */
.page-header    { margin-bottom: 22px; }
.stats-grid     { margin-bottom: 28px; }
.balance-bar    { margin-bottom: 28px; }
.wallet-hero-card { margin-bottom: 28px; }
.referral-hero  { margin-bottom: 24px; }
.team-quick-stats { margin-bottom: 24px; }
.ref-stats-grid { margin-bottom: 24px; }
.admin-grid-3   { margin-bottom: 28px; }
.charts-row     { margin-bottom: 28px; }

/* Universal block spacing — every major content block gets bottom margin */
.content-area > div,
.page-content > div {
  margin-bottom: 28px;
}
.content-area > div:last-child,
.page-content > div:last-child {
  margin-bottom: 0;
}

/* Override for small utility blocks that shouldn't have large gap */
.content-area > .modal-overlay,
.page-content > .modal-overlay { margin-bottom: 0; }
