/* ===================================
   AIRBNB-STYLE RESPONSIVE DASHBOARD
   Mobile-First Layout System
   =================================== */

/* ===================================
   LAYOUT STRUCTURE
   =================================== */

.dashboard-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.dashboard-main {
    flex: 1;
    padding: 0 0 80px 0;
    /* Space for bottom tabs on mobile */
    background: var(--color-gray-200);
}

.dashboard-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-4);
}

/* ===================================
   MOBILE BOTTOM TAB BAR
   =================================== */

.bottom-tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--color-gray-300);
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 65px;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    flex: 1;
    border: none;
    background: none;
    cursor: pointer;
    text-decoration: none;
    color: var(--color-gray-700);
    transition: color 0.2s;
    font-size: 12px;
}

.tab-item:hover {
    color: var(--color-black);
}

.tab-item.active {
    color: var(--color-primary);
}

.tab-icon {
    font-size: 24px;
    line-height: 1;
}

.tab-label {
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

/* ===================================
   DESKTOP SIDEBAR
   =================================== */

.sidebar {
    display: none;
    /* Hidden on mobile */
}

/* ===================================
   SECTION CONTAINERS
   =================================== */

.dashboard-section {
    display: none;
    /* Hide all sections by default */
    animation: fadeIn 0.3s ease;
}

.dashboard-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   RESPONSIVE BREAKPOINTS
   =================================== */

/* Small Tablet: 600px - 900px */
@media (min-width: 600px) {
    .dashboard-content {
        padding: var(--space-6);
    }
}

/* Desktop: 900px+ */
@media (min-width: 900px) {

    /* Hide bottom tabs, show sidebar */
    .bottom-tabs {
        display: none;
    }

    .dashboard-layout {
        flex-direction: row;
    }

    .sidebar {
        display: flex;
        flex-direction: column;
        width: 240px;
        background: white;
        border-right: 1px solid var(--color-gray-300);
        position: fixed;
        left: 0;
        top: 80px;
        /* Below navbar */
        bottom: 0;
        overflow-y: auto;
        z-index: 900;
        padding: var(--space-4) 0;
    }

    .sidebar.collapsed {
        width: 70px;
    }

    .sidebar-header {
        padding: 0 var(--space-4) var(--space-3) var(--space-4);
        border-bottom: 1px solid var(--color-gray-300);
        margin-bottom: var(--space-3);
    }

    .sidebar-title {
        font-size: var(--text-lg);
        font-weight: var(--weight-semibold);
        color: var(--color-black);
    }

    .sidebar-nav {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 0 var(--space-2);
    }

    .sidebar-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        border-radius: 8px;
        text-decoration: none;
        color: var(--color-gray-800);
        font-size: 14px;
        font-weight: 500;
        transition: all 0.2s;
        cursor: pointer;
        border: none;
        background: none;
        width: 100%;
        text-align: left;
    }

    .sidebar-item:hover {
        background: var(--color-gray-100);
        color: var(--color-black);
    }

    .sidebar-item.active {
        background: var(--color-gray-100);
        color: var(--color-primary);
    }

    .sidebar-icon {
        font-size: 20px;
        width: 20px;
        text-align: center;
    }

    .sidebar.collapsed .sidebar-label {
        display: none;
    }

    .sidebar-toggle {
        position: absolute;
        top: 10px;
        right: -15px;
        width: 30px;
        height: 30px;
        background: white;
        border: 1px solid var(--color-gray-300);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: var(--shadow-sm);
    }

    .dashboard-main {
        margin-left: 240px;
        padding: 0;
        transition: margin-left 0.3s;
    }

    .dashboard-main.sidebar-collapsed {
        margin-left: 70px;
    }

    .dashboard-content {
        padding: var(--space-6);
    }
}

/* Wide Desktop: 1200px+ */
@media (min-width: 1200px) {
    .sidebar {
        width: 280px;
    }

    .dashboard-main {
        margin-left: 280px;
    }

    .dashboard-content {
        max-width: 1400px;
    }
}

/* ===================================
   PAGE HEADER
   =================================== */

.page-header {
    margin-bottom: var(--space-6);
}

.page-title {
    font-size: var(--text-3xl);
    font-weight: var(--weight-semibold);
    color: var(--color-black);
    margin-bottom: var(--space-1);
}

.page-subtitle {
    font-size: var(--text-base);
    color: var(--color-gray-700);
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .page-title {
        font-size: var(--text-2xl);
    }

    .page-subtitle {
        font-size: var(--text-sm);
    }
}