﻿/* =========================================================
   Dashboard Layout
   ========================================================= */
.dashboard-page {
    padding: 140px 0 80px;
    background: var(--m8crc-surface-base);
    min-height: 100vh;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
}

/* Sidebar */
.dashboard-sidebar {
    background: var(--m8crc-surface-raised);
    border: 1px solid var(--m8crc-border-subtle);
    border-radius: 8px;
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 160px;
}

.dashboard-brand h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--m8crc-text-base);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--m8crc-border-subtle);
}

/* Navigation */
.dashboard-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .dashboard-nav .nav-section-title {
        margin-top: 24px;
        margin-bottom: 8px;
        padding: 0 16px;
    }

        .dashboard-nav .nav-section-title:first-child {
            margin-top: 0;
        }

        .dashboard-nav .nav-section-title span {
            font-family: 'Inter', sans-serif;
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 1px;
            text-transform: uppercase;
            color: var(--m8crc-text-muted);
        }

    .dashboard-nav li:not(.nav-section-title) {
        margin-bottom: 4px;
    }

    .dashboard-nav a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        font-family: 'Inter', sans-serif;
        font-size: 14px;
        font-weight: 500;
        color: var(--m8crc-text-subdued);
        text-decoration: none;
        border-radius: 6px;
        transition: all .25s;
    }

        .dashboard-nav a:hover {
            background: var(--m8crc-surface-overlay);
            color: var(--m8crc-text-base);
        }

        .dashboard-nav a.active {
            background: rgba(13, 148, 136, 0.1);
            color: var(--m8crc-secondary);
            font-weight: 600;
        }

        .dashboard-nav a i {
            font-size: 18px;
            width: 18px;
        }

/* Main Content */
.dashboard-content {
    min-height: 500px;
}

.dashboard-header {
    margin-top: 135px;
    margin-bottom: 32px;
    padding-bottom: 8px;
    /* border-bottom: 2px solid var(--m8crc-border-subtle);*/
}

    .dashboard-header h1 {
        font-family: 'Cormorant Garamond', serif;
        font-size: 42px;
        font-weight: 500;
        color: var(--m8crc-text-base);
        margin-bottom: 8px;
    }

    .dashboard-header p {
        font-family: 'Inter', sans-serif;
        font-size: 15px;
        color: var(--m8crc-text-muted);
        margin: 0;
    }

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.dashboard-card {
    background: var(--m8crc-surface-raised);
    border: 1px solid var(--m8crc-border-subtle);
    border-radius: 8px;
    padding: 24px;
    transition: border-color .3s, box-shadow .3s;
}

    .dashboard-card:hover {
        border-color: var(--m8crc-secondary);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    }

.dashboard-card-icon {
    width: 48px;
    height: 48px;
    background: rgba(13, 148, 136, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

    .dashboard-card-icon i {
        font-size: 24px;
        color: var(--m8crc-secondary);
    }

.dashboard-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--m8crc-text-muted);
    margin-bottom: 8px;
}

.dashboard-card-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 36px;
    font-weight: 600;
    color: var(--m8crc-text-base);
    margin-bottom: 8px;
}

.dashboard-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--m8crc-secondary);
    text-decoration: none;
    margin-top: 12px;
    transition: gap .25s;
}

    .dashboard-card-link:hover {
        gap: 10px;
    }

/* From ChatGPT*/
/* Top bar */
.dashboard-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 56px;
    padding: 0 24px;
    border-bottom: 1px solid var(--m8crc-border-subtle);
    background: var(--m8crc-surface-raised);
    position: sticky;
    top: 0;
    z-index: 5;
}

.sidebar-toggle {
    background: transparent;
    border: 1px solid var(--m8crc-border-subtle);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
}

    .sidebar-toggle:hover {
        background: var(--m8crc-surface-raised);
    }

.toggle-icon {
    font-size: 18px;
    line-height: 1;
}

/* Layout behavior */
.dashboard-layout {
    display: grid;
    transition: grid-template-columns 0.25s ease;
}

    /* Open */
    .dashboard-layout.sidebar-open {
        grid-template-columns: 280px 1fr;
    }

    /* Closed */
    .dashboard-layout.sidebar-closed {
        grid-template-columns: 0 1fr;
    }

        /* Sidebar collapse */
        .dashboard-layout.sidebar-closed .dashboard-sidebar {
            overflow: hidden;
            opacity: 0;
            pointer-events: none;
            transform: translateX(-16px);
        }

/* Smooth sidebar */
.dashboard-sidebar {
    transition: opacity 0.2s ease, transform 0.2s ease;
}
/* Responsive */
@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 240px 1fr;
        gap: 32px;
    }

    .dashboard-cards {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard-page {
        padding: 100px 0 60px;
    }

    .dashboard-container {
        padding: 0 24px;
    }

    .dashboard-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .dashboard-sidebar {
        position: static;
    }

    .dashboard-header h1 {
        font-size: 32px;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    
}