:root {
        --bg: #1F1F1F;
        --bg-darker: #111;
        --bg-panel: #1a1a1a;
        --card: #232323;
        --hover: #2C2C2C;
        --text: #FFFFFF;
        --border: #333;
        --accent: #444;
        --danger: red;
}

* {
        box-sizing: border-box;
}

body {
        margin: 0;
        background: var(--bg);
        color: var(--text);
        font-family: sans-serif;
        overflow: hidden;
}

#app {
        display: flex;
        height: 100vh;
}

/* Панели */
.panel {
        flex: 1;
        display: flex;
        flex-direction: column;
        width: 100%;
}

#block-2 {
        background: var(--bg-panel);
        border-left: 1px solid var(--border);
}

/* Шапка и поиск */
.header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
        background: var(--bg-darker);
        height: 50px;
}

.search-bar {
        padding: 10px;
        background: #222;
        display: flex;
        gap: 5px;
}

/* Списки и элементы */
.list {
        flex: 1;
        overflow-y: auto;
        padding: 10px;
}

.item {
        background: var(--card);
        padding: 15px;
        margin-bottom: 8px;
        border-radius: 5px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        transition: background 0.2s;
}

.item:hover {
        background: var(--hover);
}

.name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
}

/* Попапы */
.popup-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(4px);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 999;
}

.popup-content {
        background: var(--accent);
        padding: 20px;
        width: 90%;
        max-width: 400px;
        border-radius: 8px;
}

.popup-footer {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        margin-top: 20px;
}

/* Формы */
input[type="text"],
textarea {
        width: 100%;
        padding: 12px;
        background: #000;
        color: #fff;
        border: 1px solid #444;
        outline: none;
}

button {
        padding: 10px 15px;
        cursor: pointer;
        background: var(--accent);
        color: #fff;
        border: none;
        border-radius: 3px;
}

button:disabled {
        opacity: 0.3;
}

.btn-del-active {
        background: var(--danger) !important;
}

.hidden {
        display: none !important;
}

/* --- Адаптивность --- */

@media (max-width: 750px) {
        .hidden-mobile {
                display: none !important;
        }

        #app {
                flex-direction: column;
        }
}

@media (min-width: 751px) {
        .panel {
                border-right: 1px solid var(--border);
        }

        #block-2 {
                display: flex !important;
                /* Гарантируем видимость второй панели */
        }

        button[data-action="back-to-folders"],
        .hidden-desktop {
                display: none !important;
        }
}