/* ========================================
   PROFESSIONAL FINTECH THEME
   Trust + Security + Premium Feel
   ======================================== */

:root {
    /* Primary Colors - Professional Blue */
    --primary: #0a2540;           /* Deep Navy - Trust */
    --primary-light: #1a3a5e;     /* Rich Blue */
    --primary-dark: #061220;      /* Very Dark Navy */
    
    /* Accent Colors */
    --secondary: #0066ff;         /* Vibrant Blue - CTA */
    --accent-success: #00d47e;    /* Money Green */
    --accent-warning: #f5a623;    /* Gold */
    --accent-danger: #ef4444;     /* Red */
    --accent-info: #00b4d8;       /* Info Blue */
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0a2540 0%, #1a3a5e 100%);
    --gradient-accent: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
    --gradient-green: linear-gradient(135deg, #00d47e 0%, #00a86b 100%);
    --gradient-warm: linear-gradient(135deg, #f5a623 0%, #e8952a 100%);
    
    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Shadows - Premium Depth */
    --shadow-sm: 0 1px 3px rgba(10, 37, 64, 0.06);
    --shadow-md: 0 4px 16px rgba(10, 37, 64, 0.08);
    --shadow-lg: 0 8px 32px rgba(10, 37, 64, 0.10);
    --shadow-xl: 0 16px 48px rgba(10, 37, 64, 0.14);
    --shadow-2xl: 0 24px 64px rgba(10, 37, 64, 0.18);
    
    /* Border Radius - Professional */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions - Smooth */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
}

/* ========================================
   BASE RESET & TYPOGRAPHY
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Premium Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--gray-900);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

a {
    text-decoration: none;
    color: var(--secondary);
    transition: var(--transition-base);
}

a:hover {
    color: var(--primary);
}

/* ========================================
   TOP NAVBAR - Professional
   ======================================== */

.navbar {
    background: var(--primary) !important;
    padding: 0.75rem 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 2px solid rgba(0, 102, 255, 0.1);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--white) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand i {
    color: var(--accent-success);
    font-size: 1.6rem;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
    font-size: 0.9rem;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--white) !important;
    background: rgba(255, 255, 255, 0.08);
}

.navbar .nav-link i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

/* User Avatar in Nav */
.navbar .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 0.9rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Notification Badge */
.navbar .notification-badge {
    position: relative;
}

.navbar .notification-badge .badge-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: var(--accent-danger);
    border-radius: 50%;
    border: 2px solid var(--primary);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* ========================================
   SIDEBAR - Premium Navigation
   ======================================== */

.sidebar {
    min-height: 100vh;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid var(--gray-200);
}

.sidebar .nav-link {
    color: var(--gray-600);
    padding: 0.75rem 1.25rem;
    margin: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar .nav-link i {
    width: 20px;
    font-size: 1.1rem;
    text-align: center;
}

.sidebar .nav-link:hover {
    color: var(--primary);
    background: var(--gray-50);
    transform: translateX(4px);
}

.sidebar .nav-link.active {
    color: var(--white);
    background: var(--gradient-accent);
    box-shadow: var(--shadow-md);
}

.sidebar .nav-link.active i {
    color: var(--white);
}

/* Sidebar Section Title */
.sidebar .sidebar-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-400);
    font-weight: 700;
    padding: 0 1.25rem;
    margin: 1.5rem 0 0.5rem;
}

/* ========================================
   CARDS - Premium Dashboard Cards
   ======================================== */

.card {
    background: var(--white);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: var(--gray-700);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background: transparent;
    border-top: 1px solid var(--gray-200);
    padding: 1rem 1.5rem;
}

/* ========================================
   STAT CARDS - KPI Metrics
   ======================================== */

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    border-left: 4px solid var(--secondary);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.03) 0%, transparent 70%);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    font-weight: 500;
}

.stat-card .stat-change {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-change.positive {
    color: var(--accent-success);
    background: rgba(0, 212, 126, 0.08);
}

.stat-change.negative {
    color: var(--accent-danger);
    background: rgba(239, 68, 68, 0.08);
}

/* Stat Card Color Variants */
.stat-card.blue { border-left-color: var(--secondary); }
.stat-card.green { border-left-color: var(--accent-success); }
.stat-card.gold { border-left-color: var(--accent-warning); }
.stat-card.red { border-left-color: var(--accent-danger); }

/* ========================================
   BALANCE CARD - Hero Element
   ======================================== */

.balance-card {
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    padding: 2rem;
    color: var(--white);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.balance-card::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -30%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 212, 126, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.balance-card .balance-amount {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.balance-card .balance-label {
    font-size: 0.85rem;
    opacity: 0.7;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.balance-card .balance-change {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 212, 126, 0.15);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
    color: var(--accent-success);
}

/* ========================================
   BUTTONS - Professional Actions
   ======================================== */

.btn {
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient-accent);
    border: none;
    color: var(--white);
    box-shadow: 0 4px 16px rgba(0, 102, 255, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 102, 255, 0.35);
    color: var(--white);
}

.btn-success {
    background: var(--gradient-green);
    border: none;
    color: var(--white);
    box-shadow: 0 4px 16px rgba(0, 212, 126, 0.25);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 212, 126, 0.35);
    color: var(--white);
}

.btn-outline-secondary {
    border: 2px solid var(--gray-300);
    color: var(--gray-600);
}

.btn-outline-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--gray-800);
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1rem;
}

/* ========================================
   FORM ELEMENTS - Clean & Professional
   ======================================== */

.form-control {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    transition: var(--transition-base);
    color: var(--gray-800);
}

.form-control:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.06);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-select {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    transition: var(--transition-base);
    color: var(--gray-800);
    cursor: pointer;
}

.form-select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.06);
}

.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-700);
    margin-bottom: 0.4rem;
}

/* ========================================
   TRANSACTIONS TABLE - Professional
   ======================================== */

.transaction-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.transaction-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--gray-200);
}

.transaction-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9rem;
    vertical-align: middle;
}

.transaction-table tr:hover td {
    background: var(--gray-50);
}

.transaction-table .transaction-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* Status Badges */
.badge-status {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-status.completed {
    background: rgba(0, 212, 126, 0.08);
    color: var(--accent-success);
}

.badge-status.pending {
    background: rgba(245, 166, 35, 0.08);
    color: var(--accent-warning);
}

.badge-status.failed {
    background: rgba(239, 68, 68, 0.08);
    color: var(--accent-danger);
}

/* ========================================
   QUICK ACTION CARDS
   ======================================== */

.quick-action {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition-base);
    cursor: pointer;
}

.quick-action:hover {
    border-color: var(--secondary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.quick-action .action-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 0.75rem;
    background: rgba(0, 102, 255, 0.06);
    color: var(--secondary);
}

.quick-action .action-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-800);
}

.quick-action .action-desc {
    font-size: 0.8rem;
    color: var(--gray-400);
}

/* ========================================
   NETWORK CARDS
   ======================================== */

.network-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    transition: var(--transition-base);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    height: 80px;
}

.network-card:hover {
    border-color: var(--secondary);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.network-card img {
    max-height: 40px;
    width: auto;
}

.network-card .network-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-700);
}

/* ========================================
   LOADING SCREEN
   ======================================== */

.loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    z-index: 10000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loader-text {
    margin-top: 1rem;
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.9rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   LOGIN PAGE
   ======================================== */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.login-container .bg-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image: 
        radial-gradient(circle at 20% 50%, var(--white) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, var(--white) 1px, transparent 1px);
    background-size: 50px 50px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-2xl);
    position: relative;
    z-index: 1;
}

.login-card .login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-card .login-logo i {
    font-size: 3rem;
    color: var(--secondary);
}

.login-card .login-logo h2 {
    margin-top: 0.5rem;
    color: var(--gray-900);
}

.login-card .login-logo p {
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* ========================================
   RESPONSIVE - Mobile First
   ======================================== */

@media (max-width: 768px) {
    .sidebar {
        display: none !important;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .balance-card .balance-amount {
        font-size: 1.8rem;
    }
    
    .stat-card .stat-value {
        font-size: 1.4rem;
    }
    
    .login-card {
        padding: 1.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    /* Bottom Navigation for Mobile */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
        padding: 0.5rem 0;
        z-index: 1030;
        border-top: 1px solid var(--gray-200);
        justify-content: space-around;
    }
    
    .bottom-nav .nav-item {
        text-align: center;
        flex: 1;
    }
    
    .bottom-nav .nav-link {
        color: var(--gray-400);
        font-size: 0.7rem;
        font-weight: 500;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.2rem;
    }
    
    .bottom-nav .nav-link i {
        font-size: 1.2rem;
    }
    
    .bottom-nav .nav-link.active {
        color: var(--secondary);
    }
    
    .bottom-nav .nav-item.fab .nav-link {
        background: var(--gradient-accent);
        color: var(--white);
        width: 48px;
        height: 48px;
        border-radius: 50%;
        justify-content: center;
        margin-top: -20px;
        box-shadow: 0 4px 16px rgba(0, 102, 255, 0.3);
        border: 3px solid var(--white);
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .balance-card .balance-amount {
        font-size: 2rem;
    }
}

/* Desktop - Additional Polish */
@media (min-width: 1025px) {
    .stat-card {
        padding: 1.75rem;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-gradient {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-accent {
    background: var(--gradient-accent);
}

.bg-gradient-success {
    background: var(--gradient-green);
}

.shadow-premium {
    box-shadow: var(--shadow-xl);
}

.rounded-premium {
    border-radius: var(--radius-xl);
}

.border-premium {
    border: 1px solid rgba(0, 102, 255, 0.08);
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: var(--secondary);
    color: var(--white);
}

/* ========================================
   PURCHASE LOADER
   ======================================== */

.loader {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.loader-wrapper {
    position: relative;
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-logo-inner {
    width: 45px !important;
    height: 45px !important;
    max-width: 45px !important;
    max-height: 45px !important;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

.modern-spinner {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 0, 0, 0.08);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: loader-spin 1s linear infinite;
}

@keyframes loader-spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-text {
    font-size: 0.85rem;
    color: var(--gray-600);
}