.app-layout { width: 100%; height: 100%; display: flex; overflow: hidden; }

/* Бічна панель */
.sidebar {
    width: 280px; background-color: var(--sidebar-bg); color: white; display: flex; flex-direction: column; flex-shrink: 0;
    box-shadow: 4px 0 24px rgba(0,0,0,0.06); z-index: 1000; transition: transform 0.3s ease;
}
.sidebar-header { padding: 30px 25px; font-weight: 700; font-size: 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: space-between; align-items: center; }
.close-menu-btn { display: none; background: none; border: none; color: white; font-size: 2rem; cursor: pointer; }
nav { padding: 25px 15px; flex-grow: 1; overflow-y: auto; }
.nav-item { padding: 14px 20px; margin-bottom: 6px; cursor: pointer; color: #94a3b8; font-size: 0.95rem; font-weight: 500; border-radius: 12px; transition: all 0.2s ease; }
.nav-item:hover { background-color: var(--sidebar-hover); color: white; }
.nav-item.active { background-color: var(--primary); color: white; }
.sidebar-footer { padding: 20px; border-top: 1px solid rgba(255,255,255,0.05); }

.sidebar-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); backdrop-filter: blur(3px); z-index: 999; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.sidebar-overlay.active { opacity: 1; visibility: visible; }

/* Головна область */
.main-content { flex-grow: 1; padding: 40px 50px; overflow-y: auto; background-color: var(--bg-body); width: calc(100% - 280px); max-width: 100vw; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.section-header h1 { margin: 0; font-size: 1.6rem; font-weight: 700; color: var(--text-dark); }

/* Мобільна шапка */
.mobile-header { display: none; background: var(--bg-card); padding: 15px 20px; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 100; }
.menu-toggle-btn { background: none; border: none; color: var(--text-dark); cursor: pointer; margin-right: 15px; display: flex; }
.mobile-logo { font-weight: 700; color: var(--primary); font-size: 1.1rem; }

/* Темна тема Layout */
body.dark-mode .app-layout, body.dark-mode .main-content { background-color: #0f172a !important; color: #f8fafc !important; }
body.dark-mode .sidebar { background-color: #0f172a !important; border-right: 1px solid #334155 !important; }
body.dark-mode .sidebar-header { border-bottom: 1px solid #334155 !important; color: #f8fafc !important; }
body.dark-mode .nav-item { color: #cbd5e1 !important; }
body.dark-mode .nav-item:hover { background-color: #334155 !important; color: #fff !important; }
body.dark-mode .nav-item.active { background-color: #3b82f6 !important; color: #fff !important; }
body.dark-mode .section-header { border-bottom-color: #334155 !important; }
body.dark-mode h1, body.dark-mode h3, body.dark-mode h4 { color: #f8fafc !important; }