.app-container {
    display: flex;
    
}

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-normal);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    object-fit: contain;
    background: white;
    padding: 4px;
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
}

.sidebar-brand h1 {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
}

.sidebar-brand span {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--border-radius-md);
    color: rgba(255, 255, 255, 0.8);
    transition: all var(--transition-fast);
    margin-bottom: 4px;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background: white;
    color: #FD4326;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

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

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    color: #FD4326;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
}

.user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.btn-logout {
    display: block;
    width: 100%;
    padding: 10px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    transition: background var(--transition-fast);
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg-secondary);
}

.header {
    height: var(--header-height);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 8px;
    border-radius: var(--border-radius-sm);
}

.menu-toggle:hover {
    background: var(--bg-secondary);
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.content-area {
    padding: 24px;
}

/* FIXED: Sidebar overlay with proper pointer-events and class support */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    pointer-events: none;
}

/* FIXED: Support both .open and .active classes */
.sidebar-overlay.open,
.sidebar-overlay.active {
    display: block;
    pointer-events: auto;
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 100;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-overlay.open,
    .sidebar-overlay.active {
        display: block;
        pointer-events: auto;
    }
    
    .main-content {
        margin-left: 0;
        position: relative;
        z-index: 1;
    }
    
    .menu-toggle {
        display: flex;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
}

@media (max-width: 768px) {
    .content-area {
        padding: 16px;
    }
    
    .header {
        padding: 0 16px;
    }
    
    .page-title {
        font-size: 1.125rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    .quick-actions {
        flex-wrap: wrap;
    }
    
    .quick-action-btn {
        flex: 1 1 45%;
        min-width: 140px;
    }
    
    .charts-grid {
        grid-template-columns: 1fr !important;
    }
    
    .glass-card {
        padding: 16px !important;
    }
    
    .data-table, .service-table, .reminder-table, .team-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table th, .data-table td,
    .service-table th, .service-table td,
    .reminder-table th, .reminder-table td {
        min-width: 100px;
        white-space: nowrap;
    }
    
    .settings-tabs, .queue-tabs {
        flex-wrap: wrap;
    }
    
    .settings-tab, .queue-tab {
        flex: 1 1 auto;
        text-align: center;
        font-size: 0.75rem;
        padding: 10px 12px;
    }
    
    .staff-form-grid {
        grid-template-columns: 1fr !important;
    }
    
    .action-btn {
        padding: 6px 10px;
        font-size: 0.65rem;
        margin-right: 4px;
        margin-bottom: 4px;
    }
    
    .action-link {
        display: block;
        margin-bottom: 4px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.8rem;
    }
    
    .header-right .btn {
        padding: 8px 12px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .sidebar-brand h1 {
        font-size: 1rem;
    }
    
    .page-title {
        font-size: 1rem;
    }
    
    .content-area {
        padding: 12px;
    }
    
    .stats-card {
        padding: 16px !important;
    }
    
    .stats-card h3 {
        font-size: 1.5rem !important;
    }
    
    .quick-action-btn {
        flex: 1 1 100%;
        font-size: 0.8rem;
    }
}

.mobile-header {
  position: sticky;
  top: 0;
  z-index: 1001;
  background: #fff;
}

.hamburger {
  z-index: 1002;
  position: relative;
}

/* ================================
   DESKTOP → FORCE COLUMN LAYOUT
================================ */
@media (min-width: 769px) {

  .charts-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 24px;
  }

  /* Each chart card full width */
  .chart-card {
    width: 100% !important;
  }

}

