/* =========================================================================
   layout.css - App Shell, Sidebar, Header & Grids
   ========================================================================= */

/* --- APP CONTAINER (Main Skeleton) --- */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* --- SIDEBAR --- */
.app-sidebar {
    background: var(--surface-darker);
    border-right: var(--border-subtle);
    display: flex;
    flex-direction: column;
    height: 100vh;
    z-index: 50;
    transition: transform 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    width: var(--sidebar-width);
}

.sidebar-brand {
    padding: 1.5rem;
    font-size: 1.5rem;
    font-weight: 900;
    font-family: 'Outfit', sans-serif;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: var(--border-subtle);
}

.sidebar-menu {
    flex: 1;
    padding: 1rem 0;
    list-style: none;
}

.sidebar-group-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 800;
    padding: 1rem 1.5rem 0.5rem;
    letter-spacing: 1px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    color: var(--text-main);
    font-weight: 500;
    gap: 1rem;
    transition: all var(--transition-fast);
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: rgba(0, 242, 254, 0.1);
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

.sidebar-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* --- APP MAIN & CONTENT AREA --- */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    min-width: 0;
}

.app-page-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 var(--content-padding) 2rem;
}

/* --- HEADER --- */
.app-header {
    height: var(--header-height);
    background: transparent;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 var(--content-padding);
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: var(--backdrop-blur);
}

.hamburger {
    background: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    /* Sovrascritto da responsive.css */
    padding: 0.5rem;
}

.header-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-main);
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition-fast);
    position: relative;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--accent-color);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
}

/* --- GRIDS & CARDS --- */
.card-container {
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

.glass-card {
    background: var(--glass-bg);
    border: var(--border-subtle);
    border-radius: var(--border-radius-md);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    backdrop-filter: var(--backdrop-blur);
    overflow: hidden;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
