/* ==================== SHARED LAYOUT STYLES ==================== */
/* Consistent sidebar and header across all pages (based on dashboard) */

/* Body base styles */
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-app);
    color: var(--text-primary);
    height: 100vh;
    max-height: 100vh;
    display: flex;
    overflow: hidden;
    padding: 12px;
    margin: 0;
}

/* App container base */
.app-container {
    gap: 12px;
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 24px);
    overflow: hidden;
}

/* Navigation Sidebar - consistent across all pages */
.nav-sidebar {
    grid-row: 1 / -1;
    grid-column: 1;
    background: var(--surface);
    border-radius: var(--radius-full);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    gap: 16px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 70px;
}

/* Navigation Item - consistent size */
.nav-item {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    transition: 0.2s;
    cursor: pointer;
    text-decoration: none;
}

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

.nav-item.active {
    background: var(--accent-primary);
    color: var(--accent-white);
}

.nav-item:hover:not(.active) {
    background: var(--surface-secondary);
    color: var(--text-primary);
}

/* Header Bar - consistent height */
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
    max-height: 60px;
}

/* Brand Pill - compact version */
.brand-pill {
    background: var(--surface);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 16px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.brand-pill img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

/* User Pill - compact version */
.user-pill {
    background: var(--accent-primary);
    padding: 6px 6px 6px 16px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-soft);
    color: white;
    font-weight: 600;
    font-size: 14px;
}

/* User Avatar - compact version */
.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #1C1C1C 0%, #2a2a2a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
    border: 2px solid rgba(255,255,255,0.1);
    background-size: cover;
    background-position: center;
}

/* Account Switcher - compact version */
.account-switcher {
    display: flex;
    background: var(--surface);
    border-radius: var(--radius-full);
    padding: 3px;
    border: 1px solid rgba(255,255,255,0.05);
}

.account-switcher button {
    padding: 6px 16px;
    border-radius: var(--radius-full);
    border: none;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s;
}

/* Card base styles */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==================== RESPONSIVE OVERRIDES ==================== */

@media (max-width: 1400px) {
    .nav-sidebar {
        width: 60px;
        padding: 12px 0;
        gap: 12px;
    }
    .nav-item {
        width: 36px;
        height: 36px;
    }
    .nav-item svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 1200px) {
    body {
        padding: 10px;
    }
    .app-container {
        gap: 10px;
    }
    .nav-sidebar {
        width: 55px;
        padding: 10px 0;
        gap: 10px;
    }
    .nav-item {
        width: 34px;
        height: 34px;
    }
    .card {
        padding: 14px;
        border-radius: 16px;
    }
}

@media (max-height: 800px) {
    body {
        padding: 8px !important;
    }
    .app-container {
        gap: 8px !important;
    }
    .card {
        padding: 12px !important;
    }
    .nav-sidebar {
        padding: 8px 0;
        gap: 8px;
    }
    .nav-item {
        width: 32px;
        height: 32px;
    }
    .header-bar {
        min-height: 50px;
        max-height: 50px;
    }
}

/* ==================== MOBILE ==================== */

@media (max-width: 768px) {
    body {
        padding: 8px;
    }
    .app-container {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto 1fr !important;
        gap: 8px;
    }
    .nav-sidebar {
        grid-row: 1 !important;
        grid-column: 1 !important;
        flex-direction: row;
        width: 100%;
        border-radius: var(--radius-xl);
        padding: 8px 12px;
        gap: 8px;
        justify-content: space-around;
    }
    .nav-item[style*="margin-top: auto"] {
        margin-top: 0 !important;
        margin-left: auto;
    }
    .header-bar {
        grid-row: 2 !important;
        grid-column: 1 !important;
        min-height: auto;
        max-height: none;
    }
    .brand-pill {
        padding: 6px 12px;
        font-size: 14px;
    }
    .user-pill {
        padding: 4px 4px 4px 12px;
        gap: 8px;
        font-size: 12px;
    }
    .user-avatar {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}
