@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* Dashboard Styles */

.dashboard-layout {
    display: flex;
    min-height: 100vh;
    background-color: #f8f6f4;
    width: 100%;
}

/* Global Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
}

/* Reduce standard heading sizes slightly as requested */
h1 {
    font-size: 1.8rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.2rem;
}

h4 {
    font-size: 1rem;
}

/* Sidebar (Desktop) */
.sidebar {
    width: 260px;
    background-color: var(--color-white);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    padding: var(--spacing-md);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform var(--transition-fast);
    overflow: hidden;
}

.sidebar-header {
    margin-bottom: var(--spacing-xl);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--color-primary);
    font-weight: 700;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: 20px;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 4px;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 260px;
    width: calc(100% - 260px);
}

/* Bottom Navigation (Mobile Default hidden on desktop) */
.bottom-nav {
    display: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    color: var(--color-text-muted);
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(245, 134, 52, 0.1);
    color: var(--color-accent);
}

.nav-link i {
    font-size: 1.5rem;
}

/* Top bar title hiding logic on desktop to prevent duplication if we have it in sidebar */
@media (min-width: 769px) {
    .top-bar-title {
        display: none;
    }
}

.top-bar {
    height: 70px;
    background-color: var(--color-white);
    padding: 0 var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--color-border);
    position: fixed;
    top: 0;
    right: 0;
    left: 260px; /* offset for sidebar */
    z-index: 900; /* High enough to stay above content */
}

@media (max-width: 768px) {
    .top-bar {
        padding: 10px 20px;
    }
}

.top-bar-title {
    font-size: 1.3rem;
    font-weight: 700;
}

.user-profile-widget {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

@media (max-width: 600px) {
    .user-profile-widget span {
        display: none;
    }
}

.avatar {
    width: 36px;
    height: 36px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.content-area {
    padding: var(--spacing-md);
    padding-top: calc(70px + var(--spacing-md)); /* Account for fixed top-bar */
    padding-bottom: 90px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 70px;
        background-color: var(--color-white);
        border-top: 1px solid var(--color-border);
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 9999;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    }

    .bottom-nav .nav-link {
        justify-content: center;
        padding: 10px;
        font-size: 0;
        /* Hide text on mobile */
    }

    .bottom-nav .nav-link i {
        font-size: 1.8rem;
    }

    .top-bar {
        left: 0;
        width: 100%;
    }

    .content-area {
        padding: 20px 20px 90px 20px;
        padding-top: 120px; /* 100px top-bar + 20px padding */
        /* Strong 20px gutter on mobile, generous bottom padding for nav */
    }

    .top-bar-title {
        font-size: 1.05rem !important;
        /* Reduced for mobile */
    }
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.stat-card {
    background: var(--color-white);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.stat-card h3 {
    font-size: 1rem;
    color: var(--color-text-muted);
    font-family: var(--font-body);
}

.stat-card .value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
}