@import url(https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@400;600;700&display=swap);
:root {
    --primary: #2D5A27;
    --primary-light: #3d7a35;
    --secondary: #FFB300;
    --secondary-dark: #cc8f00;
    --bg: #F4F7F6;
    --surface: #ffffff;
    --text-main: #1A1A1A;
    --text-muted: #666666;
    --alert-red: #D32F2F;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 25px rgba(0,0,0,0.08);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --sidebar-width: 280px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-font {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Base Layout Structure */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--primary);
    color: white;
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Allow menu scroll if items are many */
    scrollbar-width: none; /* Firefox */
}

.sidebar::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    transition: var(--transition-smooth);
}

/* Sidebar Styling */
.sidebar-header {
    margin-bottom: 3rem;
}

.brand-name {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: var(--secondary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-links {
    list-style: none;
    flex-grow: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-link svg {
    width: 20px;
    height: 20px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    border: 1px solid rgba(0,0,0,0.03);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-blue { background: #E3F2FD; color: #1E88E5; }
.icon-green { background: #E8F5E9; color: #2E7D32; }
.icon-gold { background: #FFF8E1; color: #F57F17; }

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    line-height: 1.2;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-light);
    box-shadow: 0 4px 12px rgba(45, 90, 39, 0.2);
}

.btn-secondary {
    background: var(--secondary);
    color: #333;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
}

/* Layout Utilities */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.glass-box {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Mobile Responsiveness & UI Optimizations */
@media (max-width: 991px) {
    .sidebar {
        width: 80px;
        padding: 1.5rem 0.5rem;
    }
    .main-content {
        margin-left: 80px;
        padding: 1.5rem;
    }
    .brand-name span, .nav-link span, .sidebar-footer strong, .sidebar-footer i {
        display: none;
    }
    .sidebar-footer {
        text-align: center;
    }
    .nav-link {
        justify-content: center;
        padding: 12px;
    }
}

/* Bottom Navigation for Small Mobile */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    height: 65px;
    padding: 0 1rem;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-list {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    list-style: none;
}

.bottom-nav-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    gap: 4px;
}

.bottom-nav-item a.active {
    color: var(--primary);
}

.bottom-nav-item svg {
    width: 22px;
    height: 22px;
}

@media (max-width: 576px) {
    .sidebar {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
        padding: 1rem;
        padding-bottom: 80px; /* Space for bottom nav */
    }
    .bottom-nav {
        display: block;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .user-profile {
        width: 100%;
        justify-content: space-between;
    }
    .stat-card {
        padding: 1rem;
        gap: 1rem;
    }
    .stat-icon {
        width: 44px;
        height: 44px;
    }
    .stat-value {
        font-size: 1.25rem;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    h1.text-3xl {
        font-size: 1.5rem;
    }
    .card {
        padding: 1rem;
    }
}

/* Compact Utility Classes */
.compact-text { font-size: 0.85rem; }
.small-margin { margin-bottom: 0.5rem; }

