/* --- 1. Variables & Base Theme --- */
:root {
    --text-main: #1f2937; /* Темный текст для светлой темы */
    --text-muted: #6b7280;
}
.dark {
    --text-main: #ffffff; /* Светлый текст для темной темы */
    --text-muted: #9ca3af;
}

/* Применение переменных (используйте эти классы в HTML) */
.text-theme-main { color: var(--text-main); }
.text-theme-muted { color: var(--text-muted); }

/* --- 2. Sidebar --- */
.sidebar { transition: all 0.3s ease; }
.sidebar.collapsed { width: 5rem; }
.sidebar.collapsed .hide-on-collapse { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; }
.sidebar.collapsed .header-wrapper { justify-content: center; }

@media (max-width: 768px) {
    #sidebar.mobile-open {
        position: absolute; top: 80px; left: 0; width: 100%;
        height: calc(100vh - 80px); margin: 0; border-radius: 0;
        z-index: 40; display: flex !important;
    }
}

/* --- 3. Global & Reset --- */
body { 
    padding-bottom: constant(safe-area-inset-bottom); 
    padding-bottom: env(safe-area-inset-bottom); 
    color: var(--text-main); 
}
html, body { height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* --- 4. Components (Scheduler & General) --- */
.flatpickr-confirm { 
    padding: 10px; 
    background: #2563eb; 
    color: white; 
    text-align: center; 
    cursor: pointer; 
    font-weight: bold; 
    border-top: 1px solid #1e3a8a; 
}
.form-item { width: 100%; box-sizing: border-box; }