/**
 * GreenMarket Premium Dashboard Design System
 * Ultra-modern, futuristic fintech UI
 * Version 2.0
 */

/* ========================================
   1. IMPORTS & FONTS
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ========================================
   2. CSS CUSTOM PROPERTIES (Design Tokens)
   ======================================== */
:root {
    /* Primary Colors - Modern Indigo/Emerald */
    --primary: #6366F1;
    --primary-light: #818CF8;
    --primary-dark: #4F46E5;
    --primary-glow: rgba(99, 102, 241, 0.4);

    /* Accent - Keep Green for financial success */
    --accent: #10B981;
    --accent-light: #34D399;
    --accent-dark: #059669;
    --accent-glow: rgba(16, 185, 129, 0.4);

    /* Semantic Colors */
    --success: #10B981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #F59E0B;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: #EF4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --info: #3B82F6;
    --info-bg: rgba(59, 130, 246, 0.1);

    /* Surfaces - Light Mode */
    --surface-50: #FFFFFF;
    --surface-100: #F8FAFC;
    --surface-200: #F1F5F9;
    --surface-300: #E2E8F0;
    --surface-400: #CBD5E1;

    /* Text Colors */
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --text-inverse: #FFFFFF;

    /* Background */
    --bg-body: #F1F5F9;
    --bg-sidebar: linear-gradient(180deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);

    /* Borders */
    --border-light: rgba(226, 232, 240, 0.8);
    --border-focus: var(--primary);

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 40px var(--primary-glow);
    --shadow-glow-accent: 0 0 40px var(--accent-glow);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.25rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal-backdrop: 900;
    --z-modal: 1000;
    --z-toast: 1100;
}

/* Dark Mode */
[data-theme="dark"] {
    --surface-50: #1E293B;
    --surface-100: #0F172A;
    --surface-200: #1E293B;
    --surface-300: #334155;
    --surface-400: #475569;

    --text-primary: #F1F5F9;
    --text-secondary: #CBD5E1;
    --text-muted: #64748B;

    --bg-body: #0F172A;
    --border-light: rgba(51, 65, 85, 0.8);
}

/* ========================================
   3. BASE STYLES
   ======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-body);
    overflow-x: hidden;
    /* Prevent horizontal scroll globally */
}

/* ========================================
   4. DASHBOARD LAYOUT
   ======================================== */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--bg-body);
}

/* Sidebar */
.dashboard-sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 300;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform var(--transition-slow);
    border-right: 1px solid rgba(99, 102, 241, 0.15);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.3);
}

.dashboard-sidebar::-webkit-scrollbar {
    width: 4px;
}

.dashboard-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.dashboard-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
}

/* Sidebar Brand */
.sidebar-brand {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo-ultra {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* Logo Styles removed */

.sidebar-brand h3 {
    color: var(--text-inverse);
    font-weight: 700;
    margin: 0;
    font-size: var(--text-xl);
    letter-spacing: -0.5px;
}

.sidebar-brand h3 span {
    color: white;
}

/* Sidebar Menu */
.sidebar-menu {
    padding: var(--space-4) 0;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 80px);
}

/* Menu Groups */
.menu-group {
    margin-bottom: var(--space-1);
}

.menu-group-header {
    padding: var(--space-3) var(--space-6);
    color: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: 600;
    transition: all var(--transition-base);
    border-left: 3px solid transparent;
    margin: 2px var(--space-2);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.menu-group-header:hover {
    color: var(--text-inverse);
    background: rgba(255, 255, 255, 0.06);
}

.menu-group-header.active {
    color: var(--text-inverse);
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, transparent 100%);
    border-left-color: var(--primary);
}

.menu-group-header i:first-child {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    opacity: 0.9;
}

.menu-group-header .toggle-icon {
    font-size: 0.7rem;
    transition: transform var(--transition-base);
    opacity: 0.5;
}

.menu-group-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.menu-group-items {
    max-height: 500px;
    overflow: hidden;
    transition: max-height var(--transition-slow), opacity var(--transition-base);
    opacity: 1;
}

.menu-group-items.collapsed {
    max-height: 0;
    opacity: 0;
}

.menu-group-items .nav-link {
    padding-left: calc(var(--space-6) + 28px);
    font-size: var(--text-xs);
}

.menu-group-items .nav-link i {
    width: 16px;
    font-size: 0.85rem;
}

.menu-category {
    padding: var(--space-4) var(--space-6) var(--space-2);
    font-size: var(--text-xs);
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 1.2px;
    font-weight: 600;
    margin-top: var(--space-2);
}

.sidebar-menu .nav-link {
    padding: var(--space-3) var(--space-6);
    color: rgba(255, 255, 255, 0.65);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    transition: all var(--transition-base);
    border-left: 3px solid transparent;
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    position: relative;
    margin: 2px var(--space-2);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.sidebar-menu .nav-link:hover {
    color: var(--text-inverse);
    background: rgba(255, 255, 255, 0.06);
    border-left-color: transparent;
}

.sidebar-menu .nav-link.active {
    color: var(--text-inverse);
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.05) 100%);
    border-left-color: var(--primary);
}

.sidebar-menu .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    opacity: 0.8;
}

.sidebar-menu .nav-link .badge {
    margin-left: auto;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    font-size: var(--text-xs);
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

/* Main Content */
.dashboard-main {
    margin-left: 280px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: calc(100% - 280px);
    overflow-x: hidden;
}

/* Dashboard Content Area */
.dashboard-content {
    padding: var(--space-6);
    flex: 1;
    max-width: 100%;
    overflow-x: hidden;
}

/* Header */
.dashboard-header {
    background: var(--surface-50);
    padding: var(--space-4) var(--space-8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.85);
}

/* Ultra Modern Header */
.ultra-header {
    padding: var(--space-3) var(--space-6);
    gap: var(--space-4);
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3), 0 0 60px rgba(99, 102, 241, 0.1);
}

.ultra-header .search-input-ultra::placeholder,
.ultra-header .search-icon-wrap {
    color: rgba(255, 255, 255, 0.5);
}

.ultra-header .search-input-ultra {
    color: white;
}

.ultra-header .header-search-ultra {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ultra-header .header-search-ultra:focus-within {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow), 0 4px 20px rgba(99, 102, 241, 0.25);
}

.ultra-header .search-shortcut kbd {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.6);
}

.ultra-header .header-action-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.ultra-header .header-action-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.ultra-header .profile-name {
    color: white;
}

.ultra-header .profile-role {
    color: rgba(255, 255, 255, 0.6);
}

.ultra-header .profile-arrow {
    color: rgba(255, 255, 255, 0.5);
}

.ultra-header .profile-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
}

.ultra-header .toggle-line {
    background: white;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.header-center {
    flex: 1;
    max-width: 500px;
    margin: 0 auto;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

/* Animated Hamburger Menu */
.sidebar-toggle {
    width: 36px;
    height: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-lg);
    transition: background var(--transition-base);
}

.sidebar-toggle:hover {
    background: var(--surface-100);
}

.toggle-line {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.sidebar-toggle:hover .toggle-line:nth-child(1) {
    transform: translateY(-1px);
}

.sidebar-toggle:hover .toggle-line:nth-child(3) {
    transform: translateY(1px);
}

/* Header Brand (Mobile) */
.header-brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* .brand-icon removed */

/* Ultra Search Box */
.header-search-ultra {
    display: flex;
    align-items: center;
    background: var(--surface-100);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-2xl);
    padding: var(--space-2) var(--space-4);
    transition: all var(--transition-base);
    position: relative;
}

.header-search-ultra:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow), 0 4px 20px rgba(99, 102, 241, 0.15);
    background: var(--surface-50);
}

.search-icon-wrap {
    color: var(--text-muted);
    margin-right: var(--space-3);
}

.search-input-ultra {
    flex: 1;
    border: none;
    background: transparent;
    font-size: var(--text-sm);
    color: var(--text-primary);
    outline: none;
    min-width: 150px;
}

.search-input-ultra::placeholder {
    color: var(--text-muted);
}

.search-shortcut {
    display: flex;
    gap: 4px;
    margin-left: var(--space-3);
}

.search-shortcut kbd {
    background: var(--surface-200);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.header-action-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    background: var(--surface-50);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
}

.header-action-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--surface-50);
    animation: pulse 2s infinite;
}

/* User Profile Ultra */
.user-profile-ultra {
    position: relative;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    padding: var(--space-2);
    border-radius: var(--radius-xl);
    transition: background var(--transition-base);
}

.profile-trigger:hover {
    background: var(--surface-100);
}

.profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initials {
    color: white;
    font-weight: 700;
    font-size: var(--text-base);
}

.status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--surface-50);
}

.status-dot.online {
    background: var(--success);
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--text-sm);
}

.profile-role {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.profile-arrow {
    color: var(--text-muted);
    font-size: 0.7rem;
    margin-left: var(--space-2);
    transition: transform var(--transition-base);
}

.profile-trigger[aria-expanded="true"] .profile-arrow {
    transform: rotate(180deg);
}

/* Ultra Dropdown */
.ultra-dropdown {
    border-radius: var(--radius-2xl) !important;
    border: 1px solid var(--border-light) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
    padding: var(--space-3) !important;
    margin-top: var(--space-2) !important;
    min-width: 220px;
    background: var(--surface-50) !important;
    animation: dropIn 0.2s ease;
}

@keyframes dropIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ultra-dropdown .dropdown-header {
    padding: var(--space-3) var(--space-4);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-2);
}

.dropdown-user-info {
    display: flex;
    flex-direction: column;
    color: white;
}

.dropdown-user-info strong {
    font-size: var(--text-sm);
}

.dropdown-user-info span {
    font-size: var(--text-lg);
    font-weight: 700;
}

.ultra-dropdown .dropdown-item {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.ultra-dropdown .dropdown-item i {
    width: 18px;
    text-align: center;
    color: var(--text-muted);
}

.ultra-dropdown .dropdown-item:hover {
    background: var(--surface-100);
    color: var(--primary);
}

.ultra-dropdown .dropdown-item:hover i {
    color: var(--primary);
}

.ultra-dropdown .dropdown-item.text-danger:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.ultra-dropdown .dropdown-item.text-danger:hover i {
    color: var(--danger);
}

.ultra-dropdown .dropdown-divider {
    margin: var(--space-2) 0;
    border-color: var(--border-light);
}

.page-title {
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    font-size: var(--text-xl);
    letter-spacing: -0.3px;
}

/* Header Search */
.header-search {
    position: relative;
    width: 300px;
}

.header-search input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    padding-left: 44px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    background: var(--surface-100);
    font-size: var(--text-sm);
    transition: all var(--transition-base);
}

.header-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: var(--surface-50);
}

.header-search i {
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.notification-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    background: var(--surface-50);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-base);
    position: relative;
    cursor: pointer;
}

.notification-btn:hover {
    background: var(--surface-100);
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: var(--radius-full);
    border: 2px solid var(--surface-50);
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--text-inverse);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: transform var(--transition-base);
}

.user-avatar:hover {
    transform: scale(1.05);
}

/* Dashboard Content */
.dashboard-content {
    padding: var(--space-8);
    flex: 1;
}

/* ========================================
   5. CARDS & SURFACES
   ======================================== */

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
}

/* Modern Card */
.modern-card {
    background: var(--surface-50);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    overflow: hidden;
}

.modern-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Stat Card */
.stat-card {
    background: var(--surface-50);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card .icon-box {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--space-4);
}

.stat-card .icon-box.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.stat-card .icon-box.success {
    background: linear-gradient(135deg, var(--success) 0%, var(--accent-dark) 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.stat-card .icon-box.warning {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}

.stat-card .icon-box.info {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-1);
}

.stat-card .stat-value {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -1px;
}

.stat-card .stat-change {
    font-size: var(--text-sm);
    font-weight: 500;
    margin-top: var(--space-2);
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}

.stat-card .stat-change.positive {
    color: var(--success);
}

.stat-card .stat-change.negative {
    color: var(--danger);
}

/* Balance Card - Premium */
.balance-card {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 50%, #1E293B 100%);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    color: var(--text-inverse);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

.balance-card::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite 2s;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.balance-card .balance-content {
    position: relative;
    z-index: 1;
}

.balance-card .balance-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2);
}

.balance-card .balance-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--text-sm);
    font-weight: 500;
}

.balance-card .balance-amount {
    font-size: var(--text-5xl);
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: var(--space-6);
    background: linear-gradient(135deg, #FFFFFF 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.balance-card .balance-actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.balance-card .btn-balance {
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: var(--text-sm);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    transition: all var(--transition-base);
    text-decoration: none;
}

.balance-card .btn-deposit {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.balance-card .btn-deposit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    color: white;
}

.balance-card .btn-withdraw {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.balance-card .btn-withdraw:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ========================================
   6. BUTTONS
   ======================================== */
.btn-modern {
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: var(--text-sm);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, var(--accent-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background: var(--surface-100);
    border-color: var(--primary);
    color: var(--primary);
}

/* ========================================
   7. STATUS BADGES
   ======================================== */
.status-badge {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: currentColor;
}

.status-badge.running,
.status-badge.active {
    background: var(--success-bg);
    color: var(--success);
}

.status-badge.pending {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-badge.completed {
    background: var(--info-bg);
    color: var(--info);
}

.status-badge.cancelled,
.status-badge.rejected {
    background: var(--danger-bg);
    color: var(--danger);
}

/* ========================================
   8. TABLES
   ======================================== */
.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.modern-table thead th {
    background: var(--surface-100);
    padding: var(--space-4) var(--space-6);
    font-weight: 600;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border: none;
    text-align: left;
}

.modern-table tbody td {
    padding: var(--space-4) var(--space-6);
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: var(--text-sm);
}

.modern-table tbody tr {
    transition: background var(--transition-fast);
}

.modern-table tbody tr:hover {
    background: var(--surface-100);
}

.modern-table tbody tr:last-child td {
    border-bottom: none;
}

/* ========================================
   9. FORMS
   ======================================== */
.form-modern {
    --input-bg: var(--surface-50);
    --input-border: var(--border-light);
}

.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
}

.form-control {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-lg);
    background: var(--input-bg);
    font-size: var(--text-base);
    transition: all var(--transition-base);
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* ========================================
   10. QUICK ACTIONS
   ======================================== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-4);
}

.quick-action-btn {
    padding: var(--space-5);
    border-radius: var(--radius-xl);
    background: var(--surface-50);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.quick-action-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.quick-action-btn i {
    font-size: 1.5rem;
}

.quick-action-btn span {
    font-size: var(--text-sm);
    font-weight: 500;
}

/* ========================================
   11. EMPTY STATE
   ======================================== */
.empty-state {
    padding: var(--space-16) var(--space-8);
    text-align: center;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-2xl);
    background: var(--surface-100);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-6);
    font-size: 2rem;
    color: var(--text-muted);
}

.empty-state h5 {
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    font-weight: 600;
}

.empty-state p {
    color: var(--text-muted);
    max-width: 300px;
    margin: 0 auto;
    font-size: var(--text-sm);
}

/* ========================================
   12. MOBILE BOTTOM NAV
   ======================================== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    padding: var(--space-3) var(--space-4);
    z-index: 400;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4), 0 0 40px rgba(99, 102, 241, 0.1);
}

.mobile-bottom-nav .nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: var(--space-2);
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: var(--text-xs);
    transition: all var(--transition-base);
}

.mobile-bottom-nav .nav-item.active,
.mobile-bottom-nav .nav-item:hover {
    color: white;
}

.mobile-bottom-nav .nav-item.active i {
    color: var(--primary-light);
}

.mobile-bottom-nav .nav-item i {
    font-size: 1.25rem;
}

.mobile-bottom-nav .nav-item.primary {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    margin-top: -25px;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5), 0 0 40px rgba(99, 102, 241, 0.2);
    justify-content: center;
    border: 3px solid #0F172A;
}

/* ========================================
   13. RESPONSIVE
   ======================================== */
@media (max-width: 991.98px) {
    .dashboard-sidebar {
        transform: translateX(-100%);
    }

    .dashboard-sidebar.show {
        transform: translateX(0);
    }

    .dashboard-main {
        margin-left: 0;
        max-width: 100%;
        width: 100%;
        padding-top: 0;
    }

    /* Force full width on body to prevent squeezed content */
    body {
        overflow-x: hidden;
        width: 100%;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: calc(var(--z-sticky) - 1);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }

    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    .mobile-bottom-nav {
        display: block;
    }

    .dashboard-content {
        padding-bottom: 100px;
    }

    .header-search {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .dashboard-content {
        padding: var(--space-4) !important;
        /* Force padding */
        padding-bottom: 100px !important;
    }

    .dashboard-header {
        padding: var(--space-4);
    }

    .stat-card {
        padding: var(--space-5);
    }

    .balance-card {
        padding: var(--space-6);
    }

    .balance-card .balance-amount {
        font-size: var(--text-4xl);
    }

    .balance-card .balance-actions {
        flex-direction: column;
    }

    .balance-card .btn-balance {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   14. ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.5s ease forwards;
}

.animate-slideInLeft {
    animation: slideInLeft 0.5s ease forwards;
}

.animate-scaleIn {
    animation: scaleIn 0.3s ease forwards;
}

/* Stagger children animations */
.stagger-children>* {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.stagger-children>*:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-children>*:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger-children>*:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger-children>*:nth-child(4) {
    animation-delay: 0.4s;
}

.stagger-children>*:nth-child(5) {
    animation-delay: 0.5s;
}

.stagger-children>*:nth-child(6) {
    animation-delay: 0.6s;
}

/* ========================================
   15. ULTRA PREMIUM EFFECTS
   ======================================== */

/* Animated Gradient Background */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 20px var(--primary-glow), 0 0 40px rgba(99, 102, 241, 0.2);
    }

    50% {
        box-shadow: 0 0 40px var(--primary-glow), 0 0 80px rgba(99, 102, 241, 0.3);
    }
}

@keyframes borderGlow {

    0%,
    100% {
        border-color: var(--primary);
        box-shadow: 0 0 15px var(--primary-glow);
    }

    50% {
        border-color: var(--accent);
        box-shadow: 0 0 25px var(--accent-glow);
    }
}

/* Ultra Glass Card */
.ultra-glass {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Neon Glow Effect */
.neon-glow {
    box-shadow: 0 0 20px var(--primary-glow),
        0 0 40px rgba(99, 102, 241, 0.2),
        0 0 60px rgba(99, 102, 241, 0.1);
}

.neon-glow:hover {
    animation: glow 2s ease-in-out infinite;
}

.neon-border {
    border: 2px solid transparent;
    background-image: linear-gradient(var(--surface-50), var(--surface-50)),
        linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

/* Animated Gradient Border */
.gradient-border {
    position: relative;
    border-radius: var(--radius-2xl);
    overflow: hidden;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--primary), var(--accent), var(--primary));
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* Premium Hero Cards */
.hero-ultra {
    background: linear-gradient(-45deg, #0F172A, #1E293B, #312E81, #1E293B, #0F172A);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    border-radius: var(--radius-2xl);
    position: relative;
    overflow: hidden;
}

.hero-ultra::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

.hero-ultra::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -30%;
    width: 60%;
    height: 60%;
    background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.2) 0%, transparent 60%);
    animation: float 8s ease-in-out infinite reverse;
}

/* Shimmer Loading Effect */
.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

/* Premium Stat Cards */
.stat-card-ultra {
    background: var(--surface-50);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stat-card-ultra::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.stat-card-ultra:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15),
        0 10px 20px rgba(0, 0, 0, 0.05);
}

.stat-card-ultra:hover::before {
    transform: scaleX(1);
}

/* Floating Action Button */
.fab-ultra {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4),
        0 0 0 0 var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.fab-ultra:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.5),
        0 0 0 8px rgba(99, 102, 241, 0.1);
}

.fab-ultra::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid var(--primary);
    opacity: 0;
    transform: scale(1.2);
    transition: all 0.3s ease;
}

.fab-ultra:hover::after {
    opacity: 0.5;
    transform: scale(1);
}

/* Premium Input Fields */
.input-ultra {
    background: var(--surface-50);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-4) var(--space-5);
    font-size: var(--text-base);
    transition: all 0.3s ease;
    position: relative;
}

.input-ultra:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow),
        0 10px 30px rgba(99, 102, 241, 0.1);
    outline: none;
}

/* Animated Progress Bar */
.progress-ultra {
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--surface-200);
    overflow: hidden;
    position: relative;
}

.progress-ultra-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
    background-size: 200% 100%;
    animation: gradientShift 2s ease infinite;
    position: relative;
}

.progress-ultra-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 1.5s infinite;
}

/* 3D Card Effect */
.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.4s ease;
}

.card-3d:hover {
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg) translateZ(20px);
}

/* Glow Text */
.text-glow {
    text-shadow: 0 0 10px var(--primary-glow),
        0 0 20px rgba(99, 102, 241, 0.3),
        0 0 40px rgba(99, 102, 241, 0.2);
}

/* Premium Badge */
.badge-ultra {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.badge-ultra::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

/* Hover Lift Effect */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Particle Background (CSS only) */
.particle-bg {
    position: relative;
    overflow: hidden;
}

.particle-bg::before,
.particle-bg::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    pointer-events: none;
}

.particle-bg::before {
    background: var(--primary);
    top: -150px;
    right: -150px;
    animation: float 8s ease-in-out infinite;
}

.particle-bg::after {
    background: var(--accent);
    bottom: -150px;
    left: -150px;
    animation: float 10s ease-in-out infinite reverse;
}

/* ========================================
   16. UTILITY CLASSES
   ======================================== */
.text-primary {
    color: var(--primary) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.bg-success {
    background-color: var(--success) !important;
}

.bg-surface {
    background-color: var(--surface-50) !important;
}

.rounded-xl {
    border-radius: var(--radius-xl) !important;
}

.rounded-2xl {
    border-radius: var(--radius-2xl) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow-md {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

.font-mono {
    font-family: var(--font-mono) !important;
}