:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --accent-color: #0dcaf0;
    --dashboard-bg: #f4f7fe;
    --sidebar-bg: #ffffff;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --gradient-primary: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
    --sidebar-width: 220px;
}

[data-theme="dark"] {
    --primary-color: #3b82f6;
    --dashboard-bg: #0f172a;
    --sidebar-bg: #1e293b;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

html {
    font-size: 14px;
    /* Zoom out effect */
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    background-color: var(--dashboard-bg);
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
    margin: 0;
}

/* Sidebar Layout */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background-color: var(--sidebar-bg) !important;
    border-right: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 1.5rem;
    min-height: 100vh;
    transition: var(--transition);
}

/* Components */
.stat-card,
.top-nav,
.bg-white,
.service-card,
.glass-modal,
.navbar-premium {
    background-color: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--card-shadow);
    border-radius: 16px;
    padding: 1.5rem;
    transition: var(--transition);
}

.stat-card:hover,
.service-card:hover {
    transform: translateY(-5px);
}

.nav-link-premium {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    color: var(--text-secondary) !important;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link-premium i {
    width: 24px;
    margin-right: 12px;
}

.nav-link-premium:hover,
.nav-link-premium.active {
    background: rgba(13, 110, 253, 0.1);
    color: var(--primary-color) !important;
}

[data-theme="dark"] .nav-link-premium:hover,
[data-theme="dark"] .nav-link-premium.active {
    background: rgba(59, 130, 246, 0.1);
}

/* Sub-menu Styling */
.submenu {
    list-style: none;
    padding: 0 0 0.5rem 0.5rem;
    margin: 0;
}

.submenu-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: var(--text-secondary) !important;
    text-decoration: none !important;
    /* Force remove underline */
    font-size: 0.85rem;
    border-radius: 8px;
    transition: var(--transition);
    border-left: 2px solid transparent;
    margin-left: 1.25rem;
}

.submenu-link:hover {
    background: rgba(13, 110, 253, 0.05);
    color: var(--primary-color) !important;
    border-left: 2px solid var(--primary-color);
}

.nav-link-premium {
    text-decoration: none !important;
}

.has-submenu::after {
    content: '\f107';
    /* FontAwesome Chevron Down */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: auto;
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.nav-link-premium[aria-expanded="true"].has-submenu::after {
    transform: rotate(180deg);
}

/* Header & Inputs */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding: 0.50rem 1.0rem !important;
    /* Smaller height */
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-right: none;
}

.wallet-card {
    background: var(--gradient-primary);
    color: white !important;
    border-radius: 16px;
    padding: 0.6rem 1.25rem;
    /* More compact wallet */
    box-shadow: 0 10px 25px rgba(13, 110, 253, 0.2);
}

.text-muted {
    color: var(--text-secondary) !important;
}

/* Responsive */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-overlay.active {
        display: block;
    }
}