@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ===== CSS VARIABLES - Luxury Dark Theme ===== */
:root {
    /* Backgrounds */
    --bg-primary: #020617;
    --bg-secondary: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-glass: rgba(15, 23, 42, 0.6);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #2563eb 50%, #06b6d4 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    --gradient-cyan: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
    
    /* Text */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #22d3ee;
    
    /* Borders & Effects */
    --border-glass: 1px solid rgba(255, 255, 255, 0.1);
    --border-glow: 1px solid rgba(124, 58, 237, 0.3);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.15);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
    
    /* Animations */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Spacing & Radius */
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --spacing-unit: 1rem;
}

/* ===== Base Reset & Typography ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Sora', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background Glow */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.08) 0%, transparent 60%);
    animation: floatGlow 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes floatGlow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(2%, -2%) scale(1.02); }
    50% { transform: translate(-1%, 3%) scale(0.98); }
    75% { transform: translate(-3%, -1%) scale(1.01); }
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-mono {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
}

/* ===== Glassmorphism Cards ===== */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow), var(--shadow-card);
    border-color: rgba(124, 58, 237, 0.4);
}

.glass-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: var(--border-glass);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(180deg, rgba(30,41,59,0.8) 0%, transparent 100%);
}

.glass-card-body {
    padding: 1.5rem;
}

/* ===== Header ===== */
.dashboard-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: var(--border-glass);
    padding: 1rem 0;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.dashboard-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.header-logo i {
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-info {
    text-align: right;
}

.user-info .name {
    font-weight: 500;
    font-size: 0.95rem;
}

.user-info .role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before { left: 100%; }

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: var(--border-glass);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
}

.btn-danger {
    background: var(--gradient-warning);
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Form Elements ===== */
.form-group { margin-bottom: 1.25rem; }

.form-label {
    display: block;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    z-index: 2;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.5rem;
    background: rgba(15, 23, 42, 0.8);
    border: var(--border-glass);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    font-family: 'Sora', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: rgba(124, 58, 237, 0.6);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15);
    background: rgba(15, 23, 42, 0.95);
}

.form-control.currency {
    font-family: 'JetBrains Mono', monospace;
    text-align: right;
    padding-right: 1rem;
}

.form-control::placeholder { color: var(--text-muted); }

textarea.form-control {
    min-height: 120px;
    resize: vertical;
    padding-left: 1rem;
}

/* Toggle Password */
.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: var(--transition);
}

.toggle-password:hover { color: var(--text-primary); }

/* ===== Grid Layouts ===== */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.875rem; }

/* ===== Profit Display Card ===== */
.profit-card {
    background: var(--gradient-success);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin: 1.5rem 0;
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.3);
}

.profit-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.profit-card .label {
    font-size: 0.95rem;
    opacity: 0.95;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.profit-card .value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

/* ===== Login Page ===== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(124, 58, 237, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(6, 182, 212, 0.15) 0%, transparent 50%);
    animation: floatGlow 25s ease-in-out infinite alternate;
}

.login-card {
    width: 100%;
    max-width: 440px;
    padding: 2.5rem;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.login-brand .logo {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-brand .logo i {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-brand p { color: var(--text-muted); }

/* Remember & Forgot */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.checkbox-custom {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-custom input {
    width: 18px;
    height: 18px;
    accent-color: #7c3aed;
}

.forgot-link {
    color: var(--text-accent);
    text-decoration: none;
    transition: var(--transition);
}

.forgot-link:hover { text-decoration: underline; }

/* ===== Alerts & Toasts ===== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 14px;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fcd34d;
}

/* Toast Container */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 360px;
}

.toast {
    background: var(--bg-card);
    border: var(--border-glass);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-glass);
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 4.7s forwards;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateX(20px); }
}

/* ===== Table Styles ===== */
.table-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: var(--border-glass);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: rgba(30, 41, 59, 0.9);
}

.data-table th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: var(--border-glass);
}

.data-table td {
    padding: 1rem 1.25rem;
    border-bottom: var(--border-glass);
    color: var(--text-primary);
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: rgba(124, 58, 237, 0.08);
}

.data-table .text-end { text-align: right; }
.data-table .text-success { color: #6ee7b7; }
.data-table .fw-bold { font-weight: 600; }

/* Action Buttons in Table */
.btn-sm {
    padding: 0.4rem 0.875rem;
    font-size: 0.85rem;
    border-radius: 10px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ===== Search & Filters ===== */
.search-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-bar .form-control {
    flex: 1;
    min-width: 200px;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.page-item .page-link {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: var(--border-glass);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.page-item .page-link:hover,
.page-item.active .page-link {
    background: var(--gradient-primary);
    border-color: transparent;
    transform: translateY(-2px);
}

/* ===== Action Bar ===== */
.action-bar {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    padding-top: 1.5rem;
    border-top: var(--border-glass);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.4);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 58, 237, 0.7);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .dashboard-header .container {
        flex-direction: column;
        text-align: center;
    }
    
    .user-info { text-align: center; }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .action-bar {
        flex-direction: column;
    }
    
    .btn { width: 100%; }
    
    .profit-card .value {
        font-size: 2rem;
    }
    
    .login-card {
        padding: 2rem;
        margin: 1rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.5rem; }
    .profit-card { padding: 1.5rem; }
    .profit-card .value { font-size: 1.75rem; }
    .glass-card-body { padding: 1.25rem; }
}

/* ===== Print Styles ===== */
@media print {
    .no-print { display: none !important; }
    body {
        background: white;
        color: black;
    }
    .glass-card {
        background: white;
        border: 1px solid #ddd;
        box-shadow: none;
        backdrop-filter: none;
    }
    .profit-card {
        background: #10b981 !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
    }
}

/* ===== Utility Classes ===== */
.d-flex { display: flex !important; }
.justify-content-between { justify-content: space-between !important; }
.align-items-center { align-items: center !important; }
.gap-2 { gap: 0.5rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.text-end { text-align: right !important; }
.fw-bold { font-weight: 600 !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: #6ee7b7 !important; }
.hidden { display: none !important; }

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
/* ===== COMPACT BALANCE CARDS ===== */
.balance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.mini-card {
    background: rgba(15, 23, 42, 0.6);
    border: var(--border-glass);
    border-radius: 12px;
    padding: 0.75rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.mini-card:hover {
    transform: translateY(-3px);
    border-color: rgba(124, 58, 237, 0.5);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.2);
}

.mini-icon {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: var(--text-accent);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mini-card label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control.compact {
    padding: 0.5rem 0.25rem;
    font-size: 0.85rem;
    text-align: center;
    border-radius: 8px;
    height: auto;
    background: rgba(2, 6, 23, 0.8);
    font-family: 'JetBrains Mono', monospace;
}

/* Date Filter Bar */
#dateFilter {
    min-width: 160px;
}

/* Alert Info Style */
.alert-info {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.4);
    color: #67e8f9;
}

@media (max-width: 640px) {
    .balance-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .mini-card { padding: 0.6rem; }
    .form-control.compact { font-size: 0.8rem; }
}
/* ===== DATE PICKER FIX ===== */
.date-picker {
    -webkit-appearance: none !important;
    appearance: none !important;
    cursor: pointer !important;
}
.date-picker::-webkit-calendar-picker-indicator {
    background: transparent;
    color: transparent;
    cursor: pointer;
    position: absolute;
    right: 0; top: 0; width: 100%; height: 100%;
    padding: 0; margin: 0;
    opacity: 0;
}

/* ===== MULTI-COLOR BALANCE/PROFIT CARDS ===== */
.mini-card {
    background: rgba(15, 23, 42, 0.6);
    border-top: 3px solid transparent;
    border-radius: 12px;
    padding: 0.75rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.mini-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0.08; transition: opacity 0.3s; pointer-events: none;
}
.mini-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.3); }
.mini-card:hover::before { opacity: 0.15; }

.mini-icon {
    font-size: 1.3rem; margin-bottom: 0.3rem;
    background: none; -webkit-text-fill-color: inherit;
}
.mini-card label {
    font-size: 0.7rem; font-weight: 500; color: var(--text-secondary);
    display: block; margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.form-control.compact {
    padding: 0.5rem 0.25rem; font-size: 0.85rem; text-align: center;
    border-radius: 8px; height: auto; background: rgba(2, 6, 23, 0.8);
    font-family: 'JetBrains Mono', monospace; border: 1px solid rgba(255,255,255,0.1);
}

/* Color 1: Purple */
.mini-card.color-1 { border-top-color: #7c3aed; }
.mini-card.color-1::before { background: linear-gradient(135deg, #7c3aed, transparent); }
.mini-card.color-1 .mini-icon { color: #7c3aed; }

/* Color 2: Blue */
.mini-card.color-2 { border-top-color: #2563eb; }
.mini-card.color-2::before { background: linear-gradient(135deg, #2563eb, transparent); }
.mini-card.color-2 .mini-icon { color: #2563eb; }

/* Color 3: Cyan */
.mini-card.color-3 { border-top-color: #06b6d4; }
.mini-card.color-3::before { background: linear-gradient(135deg, #06b6d4, transparent); }
.mini-card.color-3 .mini-icon { color: #06b6d4; }

/* Color 4: Emerald */
.mini-card.color-4 { border-top-color: #10b981; }
.mini-card.color-4::before { background: linear-gradient(135deg, #10b981, transparent); }
.mini-card.color-4 .mini-icon { color: #10b981; }

/* Color 5: Amber */
.mini-card.color-5 { border-top-color: #f59e0b; }
.mini-card.color-5::before { background: linear-gradient(135deg, #f59e0b, transparent); }
.mini-card.color-5 .mini-icon { color: #f59e0b; }

/* Color 6: Red */
.mini-card.color-6 { border-top-color: #ef4444; }
.mini-card.color-6::before { background: linear-gradient(135deg, #ef4444, transparent); }
.mini-card.color-6 .mini-icon { color: #ef4444; }

/* Color 7: Pink */
.mini-card.color-7 { border-top-color: #ec4899; }
.mini-card.color-7::before { background: linear-gradient(135deg, #ec4899, transparent); }
.mini-card.color-7 .mini-icon { color: #ec4899; }

/* Color 8: Violet */
.mini-card.color-8 { border-top-color: #8b5cf6; }
.mini-card.color-8::before { background: linear-gradient(135deg, #8b5cf6, transparent); }
.mini-card.color-8 .mini-icon { color: #8b5cf6; }

@media (max-width: 640px) {
    .balance-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.5rem !important; }
    .mini-card { padding: 0.6rem; }
    .form-control.compact { font-size: 0.8rem; }
}
/* ===== BIG CARDS LAYOUT ===== */
.balance-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.profit-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.big-card {
    background: rgba(15, 23, 42, 0.7);
    border-top: 4px solid;
    border-radius: 16px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.big-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.big-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.big-card:hover::before { opacity: 1; }

.big-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
}

.big-card label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.big-input {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    padding: 0.75rem 0.5rem;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.9);
    border: 2px solid rgba(255,255,255,0.1);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    width: 100%;
    transition: all 0.3s;
}

.big-input:focus {
    outline: none;
    border-color: var(--text-accent);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.2);
    transform: scale(1.02);
}

/* Color Variants for Big Cards */
.big-card.color-1 { border-top-color: #7c3aed; }
.big-card.color-1 .big-icon { color: #7c3aed; }
.big-card.color-1:hover { box-shadow: 0 12px 30px rgba(124, 58, 237, 0.3); }

.big-card.color-2 { border-top-color: #2563eb; }
.big-card.color-2 .big-icon { color: #2563eb; }
.big-card.color-2:hover { box-shadow: 0 12px 30px rgba(37, 99, 235, 0.3); }

.big-card.color-3 { border-top-color: #06b6d4; }
.big-card.color-3 .big-icon { color: #06b6d4; }
.big-card.color-3:hover { box-shadow: 0 12px 30px rgba(6, 182, 212, 0.3); }

.big-card.color-4 { border-top-color: #10b981; }
.big-card.color-4 .big-icon { color: #10b981; }
.big-card.color-4:hover { box-shadow: 0 12px 30px rgba(16, 185, 129, 0.3); }

.big-card.color-5 { border-top-color: #f59e0b; }
.big-card.color-5 .big-icon { color: #f59e0b; }
.big-card.color-5:hover { box-shadow: 0 12px 30px rgba(245, 158, 11, 0.3); }

.big-card.color-6 { border-top-color: #ef4444; }
.big-card.color-6 .big-icon { color: #ef4444; }
.big-card.color-6:hover { box-shadow: 0 12px 30px rgba(239, 68, 68, 0.3); }

.big-card.color-7 { border-top-color: #ec4899; }
.big-card.color-7 .big-icon { color: #ec4899; }
.big-card.color-7:hover { box-shadow: 0 12px 30px rgba(236, 72, 153, 0.3); }

.big-card.color-8 { border-top-color: #8b5cf6; }
.big-card.color-8 .big-icon { color: #8b5cf6; }
.big-card.color-8:hover { box-shadow: 0 12px 30px rgba(139, 92, 246, 0.3); }

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .balance-grid { grid-template-columns: repeat(2, 1fr); }
    .profit-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .balance-grid, .profit-grid { grid-template-columns: 1fr; }
    .big-card { padding: 1.25rem 1rem; }
    .big-input { font-size: 1.25rem; }
    .big-icon { font-size: 1.75rem; height: 50px; }
}

/* Enhanced Profit Card */
.profit-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.15));
    border: 2px solid rgba(16, 185, 129, 0.4);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.2);
}

.profit-card .label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.profit-card .value {
    font-size: 3rem;
    font-weight: 800;
    color: #6ee7b7;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}
/* ===== SUMMARY CARDS ===== */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.summary-card {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    transition: var(--transition);
}

.summary-card:hover { transform: translateY(-4px); }

.summary-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.summary-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.summary-value {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.gradient-1 { background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(37,99,235,0.1)); border-top: 3px solid #7c3aed; }
.gradient-1 .summary-icon { color: #7c3aed; }
.gradient-2 { background: linear-gradient(135deg, rgba(6,182,212,0.2), rgba(16,185,129,0.1)); border-top: 3px solid #06b6d4; }
.gradient-2 .summary-icon { color: #06b6d4; }
.gradient-3 { background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(34,211,238,0.1)); border-top: 3px solid #10b981; }
.gradient-3 .summary-icon { color: #10b981; }
.gradient-4 { background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(239,68,68,0.1)); border-top: 3px solid #f59e0b; }
.gradient-4 .summary-icon { color: #f59e0b; }
.gradient-5 { background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(99,102,241,0.1)); border-top: 3px solid #8b5cf6; }
.gradient-5 .summary-icon { color: #8b5cf6; }

/* Opening Balance Text */
.opening-balance {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* Chart Container */
#profitChart {
    max-height: 300px;
}

/* Theme Toggle */
#themeToggle i::before {
    content: '\F4EB'; /* moon */
}

body.light-mode {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.8);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-glass: 1px solid rgba(0, 0, 0, 0.1);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.1);
}

body.light-mode .glass-card,
body.light-mode .summary-card,
body.light-mode .big-card {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .form-control,
body.light-mode .big-input {
    background: rgba(241, 245, 249, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

body.light-mode .dashboard-header {
    background: rgba(255, 255, 255, 0.9);
}

/* Responsive */
@media (max-width: 768px) {
    .summary-grid { grid-template-columns: repeat(2, 1fr); }
    .summary-value { font-size: 1.25rem; }
}
/* ===== FIXED & IMPROVED SUMMARY CARDS ===== */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.9));
    border-radius: 20px;
    padding: 1.5rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.summary-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    border-radius: 20px 20px 0 0;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.summary-card .icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.5rem;
}

.summary-card .card-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.summary-card .card-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Color Themes */
.summary-card.cash::after { background: linear-gradient(90deg, #7c3aed, #8b5cf6); }
.summary-card.cash .icon-wrap { background: rgba(124, 58, 237, 0.15); color: #a78bfa; }

.summary-card.bank::after { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.summary-card.bank .icon-wrap { background: rgba(6, 182, 212, 0.15); color: #67e8f9; }

.summary-card.today::after { background: linear-gradient(90deg, #10b981, #34d399); }
.summary-card.today .icon-wrap { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }

.summary-card.yesterday::after { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.summary-card.yesterday .icon-wrap { background: rgba(245, 158, 11, 0.15); color: #fcd34d; }

.summary-card.days::after { background: linear-gradient(90deg, #ec4899, #f472b6); }
.summary-card.days .icon-wrap { background: rgba(236, 72, 153, 0.15); color: #f9a8d4; }

/* Responsive: 3 columns on tablet */
@media (max-width: 1024px) {
    .summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Responsive: 2 columns on small screens */
@media (max-width: 768px) {
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .summary-card {
        padding: 1.25rem 0.75rem;
        border-radius: 16px;
    }
    
    .summary-card .icon-wrap {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .summary-card .card-value {
        font-size: 1.1rem;
    }
}

/* Responsive: 1 column on very small screens */
@media (max-width: 480px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
}
/* ===== FIXED & IMPROVED SUMMARY CARDS ===== */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.9));
    border-radius: 20px;
    padding: 1.5rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.summary-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    border-radius: 20px 20px 0 0;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.summary-card .icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.5rem;
}

.summary-card .card-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.summary-card .card-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.summary-card.cash::after { background: linear-gradient(90deg, #7c3aed, #8b5cf6); }
.summary-card.cash .icon-wrap { background: rgba(124, 58, 237, 0.15); color: #a78bfa; }

.summary-card.bank::after { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.summary-card.bank .icon-wrap { background: rgba(6, 182, 212, 0.15); color: #67e8f9; }

.summary-card.today::after { background: linear-gradient(90deg, #10b981, #34d399); }
.summary-card.today .icon-wrap { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }

.summary-card.yesterday::after { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.summary-card.yesterday .icon-wrap { background: rgba(245, 158, 11, 0.15); color: #fcd34d; }

.summary-card.days::after { background: linear-gradient(90deg, #ec4899, #f472b6); }
.summary-card.days .icon-wrap { background: rgba(236, 72, 153, 0.15); color: #f9a8d4; }

@media (max-width: 1024px) {
    .summary-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .summary-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .summary-card { padding: 1.25rem 0.75rem; border-radius: 16px; }
    .summary-card .icon-wrap { width: 48px; height: 48px; font-size: 1.25rem; }
    .summary-card .card-value { font-size: 1.1rem; }
}

@media (max-width: 480px) {
    .summary-grid { grid-template-columns: 1fr; }
}
/* ===== GRAND TOTAL CARD ===== */
.grand-total-card {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(37, 99, 235, 0.2), rgba(6, 182, 212, 0.15));
    border: 2px solid rgba(124, 58, 237, 0.4);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 48px rgba(124, 58, 237, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 12px 48px rgba(124, 58, 237, 0.3), inset 0 1px 0 rgba(255,255,255,0.2); }
    50% { box-shadow: 0 16px 64px rgba(124, 58, 237, 0.5), inset 0 1px 0 rgba(255,255,255,0.3); }
}

.grand-total-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
    animation: rotateGlow 20s linear infinite;
}

@keyframes rotateGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.grand-total-icon {
    font-size: 3rem;
    color: #a78bfa;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.2);
    position: relative;
    z-index: 1;
}

.grand-total-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.grand-total-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #a78bfa, #67e8f9, #6ee7b7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 40px rgba(167, 139, 250, 0.3);
}

.grand-total-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .grand-total-card {
        padding: 2rem 1.5rem;
    }
    .grand-total-value {
        font-size: 2.5rem;
    }
    .grand-total-icon {
        width: 64px;
        height: 64px;
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .grand-total-value {
        font-size: 2rem;
    }
}