/* /home/host1/web/xpms.ru/public_html/css/menu.css */

.menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.menu-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.menu-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px;
    max-width: 85vw;
    background: white;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0,0,0,0.1);
}
.menu-panel.open {
    transform: translateX(0);
}

.menu-item {
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin: 4px 12px;
    border-radius: 10px;
    font-size: 15px;
    color: #334155;
    font-weight: 500;
}
.menu-item:hover {
    background: #f1f5f9;
}
.menu-item.active {
    background: #eff6ff;
    color: #2563eb;
}
.menu-item.active i {
    color: #2563eb;
}
.menu-item i {
    width: 20px;
    height: 20px;
    color: #64748b;
}
.menu-badge {
    margin-left: auto;
    background: #ef4444;
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
}

/* Темная тема (опционально) */
html[data-theme="dark"] .menu-panel {
    background: #1e293b;
}
html[data-theme="dark"] .menu-item {
    color: #cbd5e1;
}
html[data-theme="dark"] .menu-item:hover {
    background: #334155;
}
html[data-theme="dark"] .menu-item.active {
    background: rgba(37,99,235,0.15);
    color: #60a5fa;
}
/* Скрытие пунктов меню по правам: .menu-item задаёт display:flex и перебивает .hidden */
.menu-item.hidden {
    display: none !important;
}
