/*
 * ProfitNest — Design System
 * Premium Dark-Mode Glassmorphism Fintech UI
 * Exact match to reference screenshots
 */

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

/* ============================================================
   CSS VARIABLES — Color Palette from §2.1
   ============================================================ */
:root {
    /* Backgrounds */
    --bg-base: #0A0E14;
    --bg-base-alt: #0B0F17;
    --bg-sidebar: #0D1117;
    --bg-card: rgba(18, 22, 31, 0.55);
    --bg-card-solid: #12161F;
    --bg-card-hover: rgba(18, 22, 31, 0.75);
    --bg-input: rgba(15, 19, 27, 0.8);
    --bg-topbar: rgba(10, 14, 20, 0.85);
    
    /* Borders */
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-hover: rgba(255, 255, 255, 0.15);
    --border-emerald: rgba(16, 185, 129, 0.3);
    --border-blue: rgba(59, 130, 246, 0.3);
    --border-purple: rgba(168, 85, 247, 0.3);
    --border-gold: rgba(245, 158, 11, 0.3);
    --border-red: rgba(239, 68, 68, 0.3);
    
    /* Primary Colors */
    --primary-emerald: #10B981;
    --primary-emerald-light: #22C55E;
    --primary-emerald-dark: #059669;
    --primary-gradient: linear-gradient(135deg, #10B981, #22C55E);
    
    /* Accent Colors */
    --accent-blue: #3B82F6;
    --accent-purple: #A855F7;
    --accent-purple-dark: #7C3AED;
    --accent-gold: #F59E0B;
    --accent-gold-light: #FBBF24;
    --accent-red: #EF4444;
    --accent-orange: #F97316;
    --accent-cyan: #06B6D4;
    
    /* Text Colors */
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-tertiary: #64748B;
    --text-muted: #475569;
    
    /* Glassmorphism */
    --glass-blur: blur(20px);
    --glass-bg: rgba(18, 22, 31, 0.55);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-radius: 16px;
    --glass-radius-lg: 20px;
    --glass-radius-xl: 24px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow-emerald: 0 0 20px rgba(16, 185, 129, 0.15);
    --shadow-glow-blue: 0 0 20px rgba(59, 130, 246, 0.15);
    --shadow-glow-purple: 0 0 20px rgba(168, 85, 247, 0.15);
    
    /* Layout */
    --sidebar-width: 240px;
    --topbar-height: 64px;
    --content-max-width: 1200px;
    --gap: 24px;
    --gap-sm: 16px;
    --gap-xs: 12px;
    --gap-lg: 32px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-base);
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

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

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    outline: none;
    border: none;
    background: none;
}

button {
    cursor: pointer;
}

ul, ol {
    list-style: none;
}

/* Tabular numbers for amounts */
.tabular-nums {
    font-variant-numeric: tabular-nums;
}

/* ============================================================
   LAYOUT — Sidebar + Main Content Shell (§2.4)
   ============================================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ============================================================
   SIDEBAR (fixed, ~240px)
   ============================================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: #0D1117;
    border-right: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

/* Logo */
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 4px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(16,185,129,0.35);
}

.logo-svg {
    width: 20px;
    height: 20px;
    color: white;
}

.logo-text {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

/* User Card */
.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 10px 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    transition: var(--transition);
}

.sidebar-user-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-avatar-wrap {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--primary-emerald);
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1B2B3A, #0D1B2A);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: var(--primary-emerald);
}

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

.user-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-vip {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--primary-emerald);
    font-weight: 500;
    margin-top: 1px;
}

.user-chevron {
    width: 14px;
    height: 14px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 0 8px;
}

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

.nav-section-label {
    display: block;
    padding: 10px 12px 4px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(100,116,139,0.7);
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #8892A4;
    transition: var(--transition);
    position: relative;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(16, 185, 129, 0.12);
    color: var(--primary-emerald);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--primary-emerald);
    border-radius: 0 3px 3px 0;
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* WhatsApp Promo Card */
.sidebar-promo {
    margin: 8px 12px 8px;
    padding: 16px;
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 14px;
}

.promo-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.promo-icon-wrap {
    width: 36px;
    height: 36px;
    background: rgba(37, 211, 102, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.promo-wa-icon {
    width: 18px;
    height: 18px;
    color: #25D366;
}

.promo-text {
    flex: 1;
}

.promo-title {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.promo-desc {
    display: block;
    font-size: 11px;
    color: var(--text-tertiary);
    line-height: 1.4;
}

.text-emerald {
    color: var(--primary-emerald) !important;
}

.promo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px 16px;
    background: var(--primary-gradient);
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    transition: var(--transition);
}

.promo-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow-emerald);
}

/* Logout */
.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 12px 20px;
    padding: 10px 12px;
    color: var(--accent-red);
    font-size: 13px;
    font-weight: 500;
    border-radius: 10px;
    transition: var(--transition);
}

.sidebar-logout:hover {
    background: rgba(239, 68, 68, 0.08);
}

.logout-icon {
    width: 18px;
    height: 18px;
}

/* Mobile overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: rgba(9,13,20,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 16px;
    z-index: 90;
}

.topbar-menu-toggle {
    display: none;
    padding: 8px;
    color: var(--text-secondary);
    border-radius: 8px;
}

.topbar-menu-toggle:hover {
    background: rgba(255,255,255,0.05);
}

.topbar-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.topbar-title-icon {
    width: 20px;
    height: 20px;
    color: var(--primary-emerald);
}

.topbar-search {
    flex: 1;
    max-width: 360px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-tertiary);
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 13px;
    transition: var(--transition);
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-glass-hover);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

/* Language Dropdown */
.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    color: var(--text-secondary);
    font-size: 13px;
    border-radius: 10px;
    transition: var(--transition);
}

.lang-btn:hover {
    background: rgba(255,255,255,0.05);
}

.lang-btn i:first-child {
    width: 18px;
    height: 18px;
}

/* Balance Pill */
.topbar-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.balance-icon {
    width: 16px;
    height: 16px;
    color: var(--primary-emerald);
}

.topbar-balance strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Notification */
.notif-btn {
    position: relative;
    padding: 8px;
    color: var(--text-secondary);
    border-radius: 10px;
    transition: var(--transition);
}

.notif-btn:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}

.notif-btn i {
    width: 20px;
    height: 20px;
}

.notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: var(--accent-red);
    color: white;
    font-size: 9px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* User Avatar */
.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border-radius: 12px;
    transition: var(--transition);
}

.user-btn:hover {
    background: rgba(255,255,255,0.05);
}

.topbar-avatar, .topbar-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.topbar-avatar-placeholder {
    background: linear-gradient(135deg, #1a2332, #0f1923);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--primary-emerald);
    border: 2px solid var(--border-glass);
}

/* Dropdowns */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 200px;
    background: var(--bg-card-solid);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 200;
}

.dropdown-menu.show {
    display: block;
    animation: dropdownFadeIn 0.2s ease;
}

.dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-glass);
    font-size: 13px;
}

.dropdown-header strong {
    display: block;
    font-size: 14px;
}

.dropdown-header small {
    color: var(--text-tertiary);
    font-size: 12px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.dropdown-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}

.dropdown-item.active {
    color: var(--primary-emerald);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-glass);
    margin: 4px 0;
}

.dropdown-empty {
    padding: 16px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 13px;
}

.topbar-lang, .topbar-notification, .topbar-user {
    position: relative;
}

.text-red {
    color: var(--accent-red) !important;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: var(--topbar-height);
    min-height: 100vh;
    flex: 1;
    background: #090D14;
}

.content-wrapper {
    padding: 20px 20px;
    max-width: var(--content-max-width);
}

.content-wrapper-full {
    padding: 20px 20px;
}

/* ============================================================
   GLASS CARDS
   ============================================================ */
.glass-card {
    background: rgba(16,20,28,0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 20px;
    transition: var(--transition);
}

.glass-card:hover {
    border-color: rgba(255,255,255,0.12);
}

.glass-card-lg {
    border-radius: 18px;
    padding: 24px;
}

.glass-card-sm {
    padding: 14px;
}

/* ============================================================
   STAT CARDS (Dashboard style)
   ============================================================ */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.stat-card {
    background: rgba(16,20,28,0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: rgba(255,255,255,0.13);
    transform: translateY(-1px);
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card-icon i, .stat-card-icon svg {
    width: 22px;
    height: 22px;
}

.stat-card-icon.emerald {
    background: rgba(16, 185, 129, 0.12);
    color: var(--primary-emerald);
}

.stat-card-icon.blue {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-blue);
}

.stat-card-icon.purple {
    background: rgba(168, 85, 247, 0.12);
    color: var(--accent-purple);
}

.stat-card-icon.gold {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-gold);
}

.stat-card-icon.red {
    background: rgba(239, 68, 68, 0.12);
    color: var(--accent-red);
}

.stat-card-icon.orange {
    background: rgba(249, 115, 22, 0.12);
    color: var(--accent-orange);
}

.stat-card-content {
    flex: 1;
    min-width: 0;
}

.stat-card-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.stat-card-sublabel {
    display: block;
    font-size: 11px;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}

.stat-card-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.stat-card-value.emerald { color: var(--primary-emerald); }
.stat-card-value.blue { color: var(--accent-blue); }
.stat-card-value.purple { color: var(--accent-purple); }
.stat-card-value.gold { color: var(--accent-gold); }
.stat-card-value.red { color: var(--accent-red); }
.stat-card-value.orange { color: var(--accent-orange); }

.stat-card-mini {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.stat-card-decoration {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.15;
    width: 64px;
    height: 64px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 14px;
    transition: var(--transition);
    white-space: nowrap;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

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

.btn-outline:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--border-glass-hover);
    color: var(--text-primary);
}

.btn-outline-emerald {
    background: transparent;
    color: var(--primary-emerald);
    border: 1px solid var(--border-emerald);
}

.btn-outline-emerald:hover {
    background: rgba(16, 185, 129, 0.1);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 10px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 15px;
    border-radius: 16px;
}

.btn-full {
    width: 100%;
}

.btn-disabled, .btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-red {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
}

.btn-deposit {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.btn-ghost {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.08);
}

/* ============================================================
   FORM INPUTS
   ============================================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--primary-emerald);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

.form-input-icon {
    position: relative;
}

.form-input-icon .form-input {
    padding-left: 44px;
}

.form-input-icon .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
    transition: var(--transition);
}

.form-select:focus {
    border-color: var(--primary-emerald);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-select option {
    background: var(--bg-card-solid);
    color: var(--text-primary);
}

/* ============================================================
   STATUS PILLS / BADGES
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 8px;
    white-space: nowrap;
}

.badge-emerald {
    background: rgba(16, 185, 129, 0.12);
    color: var(--primary-emerald);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-blue {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-purple {
    background: rgba(168, 85, 247, 0.12);
    color: var(--accent-purple);
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.badge-gold {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-gold);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-red {
    background: rgba(239, 68, 68, 0.12);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-orange {
    background: rgba(249, 115, 22, 0.12);
    color: var(--accent-orange);
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.badge-gray {
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-secondary);
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.pill {
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pill-emerald {
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary-emerald);
}

.pill-completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-emerald);
}

.pill-pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-gold);
}

.pill-rejected {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

/* Wallet pills */
.wallet-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wallet-main {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-blue);
}

.wallet-earning {
    background: rgba(168, 85, 247, 0.12);
    color: var(--accent-purple);
}

.wallet-system {
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-secondary);
}

/* ============================================================
   PROGRESS BARS
   ============================================================ */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar-fill.emerald {
    background: var(--primary-gradient);
}

.progress-bar-fill.blue {
    background: linear-gradient(90deg, #3B82F6, #60A5FA);
}

.progress-bar-fill.purple {
    background: linear-gradient(90deg, #A855F7, #C084FC);
}

.progress-bar-fill.gold {
    background: linear-gradient(90deg, #F59E0B, #FBBF24);
}

/* ============================================================
   PAGE HEADER / HERO BANNERS
   ============================================================ */
.page-header {
    margin-bottom: var(--gap);
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.page-title span {
    color: var(--primary-emerald);
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.hero-banner {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--glass-radius-lg);
    padding: 28px 32px;
    position: relative;
    overflow: hidden;
    margin-bottom: var(--gap);
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(ellipse at 80% 50%, rgba(16, 185, 129, 0.08), transparent 70%);
    pointer-events: none;
}

.hero-banner-content {
    position: relative;
    z-index: 1;
}

.hero-banner-image {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    max-height: 120%;
    max-width: 45%;
    object-fit: contain;
    z-index: 0;
    pointer-events: none;
}

/* ============================================================
   GRIDS & LAYOUTS
   ============================================================ */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap);
}

.grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--gap);
}

.grid-1-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--gap);
}

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

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

.flex-gap {
    display: flex;
    gap: var(--gap);
}

.flex-gap-sm {
    display: flex;
    gap: var(--gap-sm);
}

.gap-24 { gap: 24px; }
.gap-16 { gap: 16px; }
.gap-12 { gap: 12px; }
.gap-8 { gap: 8px; }

.mb-24 { margin-bottom: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-12 { margin-bottom: 12px; }
.mb-8 { margin-bottom: 8px; }
.mt-24 { margin-top: 24px; }
.mt-16 { margin-top: 16px; }

/* ============================================================
   TABLES
   ============================================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-glass);
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-glass);
    transition: var(--transition-fast);
}

.data-table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

.data-table tbody tr:last-child {
    border-bottom: none;
}

.data-table tbody td {
    padding: 14px 16px;
    font-size: 13px;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.pagination-info {
    font-size: 13px;
    color: var(--text-tertiary);
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-glass);
    transition: var(--transition-fast);
}

.pagination-btn:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}

.pagination-btn.active {
    background: var(--primary-emerald);
    color: white;
    border-color: var(--primary-emerald);
}

/* ============================================================
   PAYMENT METHOD CARDS
   ============================================================ */
.payment-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.payment-card:hover {
    border-color: var(--border-glass-hover);
}

.payment-card.selected {
    border-color: var(--primary-emerald);
    background: rgba(16, 185, 129, 0.05);
}

.payment-card.selected::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background: var(--primary-emerald);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-card-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-card-logo img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.payment-card-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.payment-card-info .type-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.payment-card-info .min-amount {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ============================================================
   COPY BUTTON
   ============================================================ */
.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: transparent;
    color: var(--primary-emerald);
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.copy-btn:hover {
    background: rgba(16, 185, 129, 0.1);
}

.copy-btn i {
    width: 14px;
    height: 14px;
}

/* ============================================================
   FEATURE STRIP (4-column icons row)
   ============================================================ */
.feature-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 24px;
    background: var(--glass-bg);
    border: var(--glass-border);
    border-radius: var(--glass-radius);
}

.feature-strip-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.feature-strip-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-strip-icon i {
    width: 20px;
    height: 20px;
}

.feature-strip-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.feature-strip-desc {
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.4;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-img {
    max-width: 200px;
    margin: 0 auto 24px;
    opacity: 0.8;
}

.empty-state h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================
   TOAST / FLASH MESSAGES
   ============================================================ */
.flash-message {
    position: fixed;
    top: 80px;
    right: 24px;
    padding: 14px 24px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
    z-index: 1000;
    animation: slideInRight 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.flash-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--primary-emerald);
}

.flash-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--accent-red);
}

.flash-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--accent-gold);
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.section-title i {
    width: 20px;
    height: 20px;
    color: var(--primary-emerald);
}

.view-all-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-emerald);
    transition: var(--transition-fast);
}

.view-all-link:hover {
    opacity: 0.8;
}

/* ============================================================
   STEP INDICATORS
   ============================================================ */
.step-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 20px;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255,255,255,0.05);
    border: 2px solid var(--border-glass);
    color: var(--text-tertiary);
}

.step-circle.active {
    background: var(--primary-emerald);
    border-color: var(--primary-emerald);
    color: white;
}

.step-circle.completed {
    background: var(--primary-emerald);
    border-color: var(--primary-emerald);
    color: white;
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--border-glass);
}

.step-line.completed {
    background: var(--primary-emerald);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1280px) {
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .feature-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
    .grid-1-sidebar { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
    }
    
    .sidebar {
        transform: translateX(-280px);
        width: 280px;
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    .topbar {
        left: 0;
        padding: 0 16px;
    }
    
    .topbar-menu-toggle {
        display: flex;
    }
    
    .topbar-search {
        display: none;
    }
    
    .topbar-lang {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        min-width: 0;
    }
    
    .content-wrapper {
        padding: 16px;
    }
    
    .stat-cards { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: 1fr; }
    .feature-strip { grid-template-columns: 1fr; }
    
    .hero-banner-image {
        display: none;
    }
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================================
   MISC UTILITIES
   ============================================================ */
.text-emerald { color: var(--primary-emerald) !important; }
.text-blue { color: var(--accent-blue) !important; }
.text-purple { color: var(--accent-purple) !important; }
.text-gold { color: var(--accent-gold) !important; }
.text-red { color: var(--accent-red) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-tertiary { color: var(--text-tertiary) !important; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.hidden { display: none !important; }

.amount-positive { color: var(--primary-emerald); font-weight: 700; font-variant-numeric: tabular-nums; }
.amount-negative { color: var(--accent-red); font-weight: 700; font-variant-numeric: tabular-nums; }

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--primary-emerald);
}

.verified-badge i {
    width: 16px;
    height: 16px;
}

/* ============================================================
   ADDITIONAL GRIDS
   ============================================================ */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap);
}

.grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--gap);
}

.grid-1-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--gap);
    align-items: start;
}

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-2-1, .grid-1-sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ============================================================
   WALLET PILLS
   ============================================================ */
.wallet-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.wallet-main {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.wallet-earning {
    background: rgba(16, 185, 129, 0.12);
    color: var(--primary-emerald);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.wallet-system {
    background: rgba(100, 116, 139, 0.12);
    color: var(--text-tertiary);
    border: 1px solid rgba(100, 116, 139, 0.2);
}

/* ============================================================
   EXTENDED STAT-CARD ICON COLOURS
   ============================================================ */
.stat-card-icon.purple {
    background: rgba(168, 85, 247, 0.12);
    color: var(--accent-purple);
}
.stat-card-icon.gold {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-gold);
}
.stat-card-icon.red {
    background: rgba(239, 68, 68, 0.12);
    color: var(--accent-red);
}

/* ============================================================
   EXTRA BADGE COLOURS
   ============================================================ */
.badge-blue {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.2);
}
.badge-gray {
    background: rgba(100, 116, 139, 0.12);
    color: var(--text-secondary);
    border: 1px solid rgba(100, 116, 139, 0.2);
}

/* ============================================================
   BUTTON GHOST
   ============================================================ */
.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-glass-hover);
}
.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================================
   FEATURE STRIP HORIZONTAL
   ============================================================ */
.feature-strip {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
}

.feature-strip-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    border-right: 1px solid var(--border-glass);
}

.feature-strip-item:last-child {
    border-right: none;
}

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

.feature-strip-icon svg,
.feature-strip-icon i {
    width: 18px;
    height: 18px;
}

.feature-strip-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.feature-strip-desc {
    font-size: 12px;
    color: var(--text-tertiary);
}

@media (max-width: 768px) {
    .feature-strip { flex-direction: column; }
    .feature-strip-item { border-right: none; border-bottom: 1px solid var(--border-glass); }
    .feature-strip-item:last-child { border-bottom: none; }
}

/* ============================================================
   PAYMENT CARD (Deposit/Withdraw Method Selection)
   ============================================================ */
.payment-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.01);
}

.payment-card:hover {
    border-color: var(--border-emerald);
    background: rgba(16, 185, 129, 0.03);
}

.payment-card.selected {
    border-color: var(--primary-emerald);
    background: rgba(16, 185, 129, 0.06);
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.2);
}

.payment-card-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.payment-card-info h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.payment-card-info .type-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: capitalize;
    display: block;
}

.payment-card-info .min-amount {
    font-size: 11px;
    color: var(--primary-emerald);
    margin-top: 2px;
}

/* ============================================================
   HERO BANNER (Page-level hero cards)
   ============================================================ */
.hero-banner {
    background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(16,185,129,0.02));
    border: 1px solid rgba(16,185,129,0.12);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(16,185,129,0.12), transparent 70%);
    pointer-events: none;
}

.hero-banner-content { position: relative; z-index: 1; }

.hero-banner-image {
    position: absolute;
    right: 0; bottom: 0;
    max-height: 120%;
    object-fit: contain;
    pointer-events: none;
    opacity: 0.85;
}

/* ============================================================
   SECTION TITLE ROW
   ============================================================ */
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.section-title i,
.section-title svg {
    width: 20px;
    height: 20px;
    color: var(--primary-emerald);
}

/* ============================================================
   MISC SPACING
   ============================================================ */
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-14 { margin-bottom: 14px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

/* ============================================================
   OUTLINE BUTTONS
   ============================================================ */
.btn-outline-emerald {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border: 1px solid var(--border-emerald);
    color: var(--primary-emerald);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    background: transparent;
}
.btn-outline-emerald:hover {
    background: rgba(16, 185, 129, 0.08);
}

/* ============================================================
   COPY BUTTON
   ============================================================ */
.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid var(--border-glass);
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: var(--transition);
}
.copy-btn:hover {
    border-color: var(--border-emerald);
    color: var(--primary-emerald);
}

/* ============================================================
   FORM SELECT
   ============================================================ */
.form-select {
    width: 100%;
    padding: 12px 36px 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: var(--transition);
}
.form-select:focus {
    outline: none;
    border-color: var(--primary-emerald);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.08);
}

/* ============================================================
   ANIMATE FLOAT
   ============================================================ */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.animate-float { animation: float 3s ease-in-out infinite; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 60px 20px;
}
.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}
.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 360px;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.pagination-info {
    font-size: 13px;
    color: var(--text-tertiary);
}
.pagination-pages {
    display: flex;
    align-items: center;
    gap: 4px;
}
.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    transition: var(--transition);
}
.pagination-btn:hover,
.pagination-btn.active {
    background: var(--primary-emerald);
    border-color: var(--primary-emerald);
    color: white;
}

/* ============================================================
   VIEW ALL LINK
   ============================================================ */
.view-all-link {
    font-size: 13px;
    color: var(--primary-emerald);
    font-weight: 500;
    transition: var(--transition);
}
.view-all-link:hover { opacity: 0.8; }

/* ============================================================
   STAT CARD EXTENDED VALUES
   ============================================================ */
.stat-card-value.purple { color: var(--accent-purple); }
.stat-card-value.gold { color: var(--accent-gold); }
.stat-card-value.blue { color: var(--accent-blue); }
.stat-card-value.orange { color: var(--accent-orange); }
.stat-card-value.emerald { color: var(--primary-emerald); }

.stat-card-mini {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.06);
    border-radius: 100px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 0.6s ease;
}
.progress-bar-fill.emerald { background: linear-gradient(90deg, #10B981, #22C55E); }
.progress-bar-fill.blue { background: linear-gradient(90deg, #3B82F6, #60A5FA); }
.progress-bar-fill.purple { background: linear-gradient(90deg, #A855F7, #C084FC); }
.progress-bar-fill.gold { background: linear-gradient(90deg, #F59E0B, #FBBF24); }
.progress-bar-fill.orange { background: linear-gradient(90deg, #F97316, #FB923C); }

/* ============================================================
   LIQUID GLASS EFFECT — Premium Glassmorphism
   ============================================================ */
.liquid-glass {
    background: rgba(17, 24, 39, 0.6) !important;
    backdrop-filter: blur(20px) saturate(1.3) !important;
    -webkit-backdrop-filter: blur(20px) saturate(1.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.liquid-glass:hover {
    background: rgba(17, 24, 39, 0.75) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    transform: translateY(-2px);
}

/* Glass card variant — lighter, for inner cards */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    transition: all 0.3s ease;
}
.glass-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Glow border variants */
.glow-emerald { box-shadow: 0 0 20px rgba(16, 185, 129, 0.1), inset 0 1px 0 rgba(255,255,255,0.05); border-color: rgba(16, 185, 129, 0.2) !important; }
.glow-blue { box-shadow: 0 0 20px rgba(59, 130, 246, 0.1), inset 0 1px 0 rgba(255,255,255,0.05); border-color: rgba(59, 130, 246, 0.2) !important; }
.glow-purple { box-shadow: 0 0 20px rgba(168, 85, 247, 0.1), inset 0 1px 0 rgba(255,255,255,0.05); border-color: rgba(168, 85, 247, 0.2) !important; }
.glow-gold { box-shadow: 0 0 20px rgba(245, 158, 11, 0.1), inset 0 1px 0 rgba(255,255,255,0.05); border-color: rgba(245, 158, 11, 0.2) !important; }

/* ============================================================
   CHART FILTER PILLS
   ============================================================ */
.chart-filter-pills {
    display: flex;
    gap: 6px;
    background: rgba(255,255,255,0.04);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
}
.chart-pill {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-family: inherit;
}
.chart-pill:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.06);
}
.chart-pill.active {
    color: #fff;
    background: var(--primary-emerald);
    box-shadow: 0 2px 8px rgba(16,185,129,0.3);
}

/* ============================================================
   COMPREHENSIVE RESPONSIVE — ALL DASHBOARD PAGES
   ============================================================ */

/* === Tablet Landscape (≤1200px) === */
@media (max-width: 1200px) {
    .row-3col, .row-3col-2 {
        grid-template-columns: 1fr 1fr;
    }
    .row-3col > *:nth-child(3),
    .row-3col-2 > *:nth-child(3) {
        grid-column: 1 / -1;
    }
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .row-footer {
        grid-template-columns: 1fr 1fr;
    }
    .row-footer > *:nth-child(3) {
        grid-column: 1 / -1;
    }
}

/* === Tablet Portrait (≤992px) === */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-280px);
        width: 280px;
        transition: transform 0.3s ease;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-overlay.show {
        display: block;
    }
    .topbar {
        left: 0 !important;
        padding: 0 16px;
    }
    .topbar-menu-toggle {
        display: flex !important;
    }
    .main-content {
        margin-left: 0 !important;
    }
    .tb-search {
        display: none;
    }
    .topbar-search {
        display: none;
    }
    .invest-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .feature-strip-grid {
        grid-template-columns: 1fr 1fr;
    }
    .plans-grid-user {
        grid-template-columns: 1fr 1fr;
    }
    .ql-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* === Mobile (≤768px) === */
@media (max-width: 768px) {
    .stat-grid,
    .row-3col,
    .row-3col-2,
    .row-footer,
    .invest-stats-grid,
    .feature-strip-grid,
    .plans-grid-user {
        grid-template-columns: 1fr !important;
    }
    .row-3col > *:nth-child(3),
    .row-3col-2 > *:nth-child(3) {
        display: block !important;
    }

    .welcome-banner {
        grid-template-columns: 1fr !important;
        text-align: center;
        padding: 24px 20px !important;
    }
    .welcome-right-btns {
        justify-content: center;
    }
    .welcome-spark {
        display: none !important;
    }

    .chart-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .refer-content {
        margin-left: 0 !important;
        text-align: center;
    }
    .refer-gift-img {
        display: none !important;
    }

    .ql-grid {
        grid-template-columns: 1fr !important;
    }

    .flex-between {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 16px;
    }
    .flex-between .btn {
        width: 100%;
        justify-content: center;
    }

    /* Streak bars smaller on mobile */
    .streak-bars {
        height: 70px !important;
    }

    /* Topbar adjustments */
    .topbar-lang {
        display: none;
    }

    /* Content padding */
    .content-wrapper,
    .content-wrapper-full {
        padding: 16px !important;
    }

    /* Footer grid */
    .footer-grid {
        grid-template-columns: 1fr !important;
    }

    /* Table scroll */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Deposit/Withdraw form sections */
    .deposit-grid,
    .withdraw-grid {
        grid-template-columns: 1fr !important;
    }
}

/* === Small Mobile (≤480px) === */
@media (max-width: 480px) {
    .welcome-left h2 {
        font-size: 20px !important;
    }
    .scard-value {
        font-size: 20px !important;
    }
    .scard {
        padding: 16px !important;
    }
    .hero-btns, .welcome-right-btns {
        flex-direction: column;
        width: 100%;
    }
    .hero-btns > *, .welcome-right-btns > * {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    .chart-filter-pills {
        flex-wrap: wrap;
    }
    .bonus-banner, .refer-card {
        padding: 16px !important;
    }
}

/* ============================================================
   UI ENTRY ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glowPulse {
    0% { box-shadow: 0 0 15px rgba(16, 185, 129, 0.15); }
    50% { box-shadow: 0 0 25px rgba(16, 185, 129, 0.3); }
    100% { box-shadow: 0 0 15px rgba(16, 185, 129, 0.15); }
}

.scard, .icard, .glass-panel, .info-card, .hiw-section, .bottom-note, .hero-banner-new, .redeem-card, .glass-card {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

.scard:nth-child(1) { animation-delay: 0.05s; }
.scard:nth-child(2) { animation-delay: 0.1s; }
.scard:nth-child(3) { animation-delay: 0.15s; }
.scard:nth-child(4) { animation-delay: 0.2s; }

.row-3col .icard:nth-child(1) { animation-delay: 0.25s; }
.row-3col .icard:nth-child(2) { animation-delay: 0.3s; }
.row-3col .icard:nth-child(3) { animation-delay: 0.35s; }

.row-3col-2 .icard:nth-child(1) { animation-delay: 0.4s; }
.row-3col-2 .icard:nth-child(2) { animation-delay: 0.45s; }
.row-3col-2 .icard:nth-child(3) { animation-delay: 0.5s; }

/* User Dashboard Specific Mobile Fixes */
@media (max-width: 768px) {
    /* Forms inside cards */
    .glass-card form, .liquid-glass form { flex-direction: column; align-items: stretch !important; }
    .glass-card form > div, .liquid-glass form > div { width: 100% !important; flex: none !important; }
    .glass-card form button, .liquid-glass form button { width: 100%; margin-top: 10px; }

    /* Investment/Item Lists */
    .glass-card > div > div[style*="display:flex;align-items:center"] {
        flex-direction: column; text-align: center; gap: 12px !important;
    }
    .glass-card > div > div[style*="display:flex;align-items:center"] > div[style*="text-align:right"] {
        text-align: center !important; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px;
    }
    .glass-card > div > div[style*="display:flex;align-items:center"] button,
    .glass-card > div > div[style*="display:flex;align-items:center"] a {
        width: 100%; justify-content: center;
    }

    /* Table Wrappers */
    .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    
    /* Settings Layout & Deposit Layouts */
    .settings-grid { grid-template-columns: 1fr !important; gap: 20px !important; }
    .settings-form-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
    .settings-avatar-row { flex-direction: column; text-align: center; }
    
    /* Hero Banners in Dashboard (Refer & Earn, etc) */
    .hero-banner-new { flex-direction: column; text-align: center; padding: 30px 20px !important; }
    .hbn-content { padding-right: 0 !important; max-width: 100% !important; }
    .hbn-img { position: relative !important; right: auto !important; bottom: auto !important; width: 200px !important; margin: 20px auto 0 !important; opacity: 0.9; }
    .ref-copy-box { flex-direction: column; }
    .ref-copy-btn { width: 100%; justify-content: center; }
    
    /* Stats Grid */
    .grid-3 { grid-template-columns: 1fr !important; }
    .grid-4 { grid-template-columns: 1fr !important; }
    .grid-2 { grid-template-columns: 1fr !important; }

    /* Transactions & General Hero Banners */
    .hero-banner { flex-direction: column !important; padding: 24px !important; text-align: center !important; min-height: auto !important; }
    .hero-banner-content { max-width: 100% !important; margin: 0 auto !important; display: flex; flex-direction: column; align-items: center; }
    .hero-banner-image { position: relative !important; right: auto !important; max-width: 80% !important; margin: 20px auto 0 !important; }
    
    /* Redeem Page specific */
    .redeem-card { padding: 30px 20px !important; margin: 0 15px 40px !important; max-width: 100% !important; }
    .page-header-wrap { padding: 0 15px !important; }
    .rc-icon-wrap img { width: 100px !important; }
    .di-1, .di-2, .di-3, .di-4, .di-5, .di-6 { display: none !important; } /* Hide floating icons on mobile */
    
    /* Tasks Page specific */
    .tc-header { flex-direction: column !important; align-items: flex-start !important; gap: 16px !important; }
    .tc-reward-badge { width: 100% !important; justify-content: center !important; }
    .tc-footer { flex-direction: column !important; gap: 16px !important; }
    .tc-btn { width: 100% !important; text-align: center !important; justify-content: center !important; }

    /* App Layout */
    .content-wrapper-full { padding: 15px !important; }
    
    /* Missing grids & panels causing horizontal overflow */
    .hw-strip { grid-template-columns: 1fr !important; gap: 16px !important; }
    .glass-panel { padding: 20px !important; margin-bottom: 24px !important; }
    .stat-glass { padding: 20px !important; }
    
    /* Ensure body doesn't horizontal scroll */
    body, html { overflow-x: hidden !important; }
    
    /* Payment Grids */
    .payment-methods-grid, .payment-details-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
}
