@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --bg-main: #0f172a;
    --bg-darker: #0b1120;
    --bg-card: rgba(30, 41, 59, 0.7);
    --accent-blue: #38bdf8;
    --accent-emerald: #10b981;
    --accent-rose: #ef4444;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Cairo', 'Outfit', sans-serif;
    margin: 0;
}

/* Glassmorphism Card Style */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.glass-card:hover {
    border-color: var(--accent-blue);
}

/* Sidebar Styling (Desktop) */
.sidebar {
    width: 260px;
    height: 100vh;
    background: var(--bg-darker);
    position: fixed;
    right: 0;
    top: 0;
    border-left: 1px solid var(--glass-border);
    z-index: 1000;
}

.main-content {
    margin-right: 260px;
    padding: 2rem;
}

/* Typography & Stats */
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Outfit';
    color: var(--accent-blue);
}

.profit {
    color: var(--accent-emerald) !important;
}

.loss {
    color: var(--accent-rose) !important;
}

/* Custom Buttons */
.btn-mizan {
    background: linear-gradient(135deg, var(--accent-blue), #1d4ed8);
    border: none;
    color: white;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-mizan:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

/* Mobile Improvements */
.mobile-header {
    background: var(--bg-darker);
    position: sticky;
    top: 0;
    z-index: 1001;
}

@media (max-width: 991px) {
    .sidebar {
        width: 100%;
        height: 70px;
        position: fixed;
        bottom: 0;
        top: auto;
        right: 0;
        left: 0;
        border-left: none;
        border-top: 1px solid var(--glass-border);
        padding: 0 !important;
        background: #0b1120f2;
        backdrop-filter: blur(15px);
        z-index: 2000;
        display: flex;
        align-items: center;
    }

    .sidebar .p-4.text-center {
        display: none;
    }

    .sidebar nav {
        margin-top: 0 !important;
        width: 100%;
        padding: 0 !important;
    }

    .sidebar ul {
        flex-direction: row !important;
        justify-content: space-around;
        gap: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .sidebar .nav-link {
        font-size: 0.6rem;
        background: transparent !important;
        border: none !important;
        text-align: center;
        color: var(--text-secondary) !important;
        padding: 8px 4px !important;
        min-width: 50px;
        flex: 1;
        opacity: 0.8;
    }

    .sidebar .nav-link i {
        display: block;
        font-size: 1.2rem;
        margin-bottom: 3px;
        margin-right: 0 !important;
    }

    .sidebar .nav-link.active {
        color: var(--accent-blue) !important;
        opacity: 1;
    }

    .sidebar .nav-text {
        font-size: 0.55rem;
        display: block;
    }

    .main-content {
        margin-right: 0 !important;
        padding: 1rem;
        padding-bottom: 90px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.3rem !important;
    }

    .border-md-end {
        border-right: none !important;
        border-left: none !important;
        border-bottom: 1px solid var(--glass-border) !important;
        padding-bottom: 1rem;
    }

    .clickable-img {
        max-height: 300px !important;
    }
}

@media (min-width: 992px) {
    .border-md-end {
        border-left: 1px solid var(--glass-border) !important;
        border-right: none !important;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
}