/* --- 2. LAYOUT & MOBILE HEADER --- */
.mobile-header-saas {
    display: none;
    background-color: var(--sb-bg);
    border-bottom: 1px solid var(--sb-border);
    padding: 0.75rem 1.25rem;
    position: sticky;
    top: 0;
    z-index: 2000;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.hamburger-btn-saas {
    font-size: 1.75rem;
    color: var(--text-primary);
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: var(--transition);
}

.hamburger-btn-saas:active {
    background-color: var(--sb-active);
}

.card-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
    width: 100%;
    padding-top: 1rem;
}

.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

.sidebar-overlay-saas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1500;
    display: none;
    opacity: 0;
    transition: opacity var(--transition);
}

.sidebar-overlay-saas.active {
    display: block;
    opacity: 1;
}

.sidebar-saas {
    width: var(--sb-width);
    background-color: var(--sb-bg);
    border-left: 1px solid var(--sb-border);
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.25rem;
    flex-shrink: 0;
    z-index: 2005;
    transition: transform var(--transition);
}

.main-content {
    flex: 1;
    min-width: 0;
    padding: 2.5rem;
    background-color: var(--bg-body);
    overflow-x: hidden;
    padding-top: 6rem !important;
    /* Fixed padding */
}

/* --- 10. RESPONSIVE & MOBILE SLIDE --- */
@media (max-width: 992px) {
    :root {
        --sb-width: 80px;
    }

    .sidebar-saas span,
    .sidebar-saas h3,
    .sidebar-profile span {
        display: none;
    }
}

@media (max-width: 768px) {
    .mobile-header-saas {
        display: flex;
    }

    .sidebar-saas {
        position: fixed !important;
        top: 0;
        right: -300px;
        width: 280px !important;
        z-index: 2005;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    }

    .sidebar-saas.open {
        transform: translateX(-300px);
    }

    dir[dir="rtl"] .sidebar-saas {
        right: auto;
        left: -300px;
    }

    dir[dir="rtl"] .sidebar-saas.open {
        transform: translateX(300px);
    }

    .main-content {
        width: 100%;
        padding: 1.5rem;
    }

    .sidebar-saas span,
    .sidebar-saas h3,
    .sidebar-profile span {
        display: block !important;
    }

    .app-container {
        flex-direction: column;
    }

    .sidebar-saas {
        width: 100%;
        height: auto;
        position: static;
        border-left: none;
        border-bottom: 1px solid var(--sidebar-border);
    }
}

/* --- 11. RTL FIXES --- */
dir[dir="rtl"] .sidebar-saas {
    border-left: 1px solid var(--sb-border);
    border-right: none;
}

/* --- Super Admin Index Layout --- */
.page-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-breadcrumb {
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.8;
}

/* --- 16. INDEX LAYOUT --- */
.mobile-logo-img {
    height: 32px;
}

.mobile-spacer {
    width: 44px;
}

.main-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.footer {
    padding: 2rem 5%;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
}