/* === Основные стили темного интерфейса === */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1e1e2f;
    color: #ccc;
}
header {
    background: #1a1a2e;
    padding: 8px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
header h1 {
    margin: 0;
    color: #fff;
}
/* === Меню сверху === */
nav {
    display: flex;
    gap: 15px;
}
nav button {
    background: #2c2c44;
    border: none;
    padding: 10px 20px;
    color: #fff;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.2s;
}
nav button:hover, nav button.active {
    background: #4a3f8f;
    color: #fff;
}

/* Контейнер под содержимое */

#content-container {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: nowrap;
    width: 100%;
    min-height: calc(100vh - 100px);
    box-sizing: border-box;
    overflow: hidden; /* ← не даст контенту “вылезать” */
    margin-top: 2%;
}

/* Правая часть (основной контент) */
.container-cude {
    flex: 1 1 auto;
    min-width: 0; 
    box-sizing: border-box;
}

/* Куб не должен залезать на меню */
#cube {
    background: #2c2c44;
    border-radius: 15px;
    box-shadow: 0 0 5px #3F51B5;
    transition: all 0.3s;
    overflow: hidden;
    margin: 20px;
    padding: 35px;
}

/* Темные таблицы */
table.dataTable {
    color: #fff;
    background: #1e1e2f;
}
table.dataTable thead th {
    color: #fff;
}
table.dataTable tbody td {
    color: #ccc;
}

/* Кнопки функций */
.func-btn {
    background: #3a3a5e;
    border: none;
    padding: 15px 25px;
    margin: 10px;
    color: #fff;
    font-size: 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.func-btn:hover {
    background: #4a3f8f;
}

/* === Авторизация === */

/* Фон блока */
#login-block {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #181825; /* просто тёмно-синий/фиолетовый */
    overflow: hidden;
    position: relative;
}

/* Контейнер с формой */
.login-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 30px;
    border-radius: 15px;
    background: rgb(39 39 67 / 95%);
    box-shadow: 0 0 20px rgb(170 161 223 / 60%);
    gap: 15px;
    animation: fadeIn 2s ease forwards;
}

/* Плавное появление */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-40px);}
    to { opacity: 1; transform: translateY(0);}
}

/* Поля ввода */
#login-block input {
    padding: 12px 15px;
    width: 220px;
    border-radius: 8px;
    border: 1px solid #555;
    background: #2c2c44;
    color: #fff;
    font-size: 14px;
    transition: 0.3s;
}
#login-block input:focus {
    border-color: #4a3f8f;
    box-shadow: 0 0 10px rgba(74,63,143,0.6);
    outline: none;
}

/* Кнопка */
#login-block button {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(90deg, #4a3f8f, #6c5ab5);
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}
#login-block button:hover {
    background: linear-gradient(90deg, #6c5ab5, #4a3f8f);
    box-shadow: 0 0 15px rgba(74,63,143,0.7);
}

/* Сообщение об ошибке */
#login-msg {
    color: #ff6b6b;
    font-weight: bold;
    font-size: 14px;
    min-height: 18px;
}





/* === Меню модулей слева === */

/* Левая панель */
.container-modules-menu {
    flex: 0 0 250px; /* ← фиксируем ширину панели */
    min-width: 300px;
    max-width: 300px;
    box-sizing: border-box;
}

#modules-menu {
    background: #1a1a2e; /* темный фон, как шапка */
    padding: 10px;
    border-radius: 15px;
    box-shadow: 0 0 5px #3F51B5;
    transition: width 0.3s;
    overflow: hidden;
    margin: 20px;
}
.modules-menu{
    width: 240px;
}

/* Кнопка открытия/закрытия меню */
#toggle-modules-menu {
    width: 100%;
    background: linear-gradient(180deg, #2c2c44, #24243a);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    padding: 12px 0;
    transition: all 0.2s;
    border: none;
    border-bottom: 5px solid #121224;
}
#toggle-modules-menu:hover {
    background: linear-gradient(180deg, #2f2859, #1d1b36);
    box-shadow: 0 0 15px rgba(74, 63, 143, 0.7);
}

/* Список модулей */
#modules-menu ul {
    list-style: none;
    padding: 0;
    margin: 15px;
}
#modules-menu ul li {
    margin-bottom: 15px;
}

/* Каждая кнопка-модуль — “клавиша” */
#modules-menu ul li button.module-tab {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    background: #384173;
    border: none;
    border-bottom: 5px solid #1f2441;
    border-radius: 8px;
    color: #bdbdbd;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    padding: 8px 20px;
    transition: all 0.4s ease;
}

/* Активная клавиша — светится */
#modules-menu ul li button.module-tab.active {
    background: #5763a3;
    border-color: #212643;
    box-shadow: 0 6px 15px rgb(56 49 130);
    color: #fff;
    transform: translateY(-4px);
    scale: 1.03;
}

/* Наведение — подсвечивание */
#modules-menu ul li button.module-tab:hover {
    background: #5763a3;
    border-color: #212643;
    box-shadow: 0 6px 15px rgb(56 49 130);
    color: #fff;
    transform: translateY(-4px);
    scale: 1.03;
}


/* ==== Карточка статусной памятки === */
.status-legend {
    max-width: 100%;
    padding: 12px 16px;
    margin-top: 20px;
    border-bottom: 4px solid #0a0a12;
    border-radius: 10px;
    background: linear-gradient(174deg, #23233d, #1a1a2e);
    color: #f5f5f5;
    font-size: 14px;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.25);
    transition: all 1s ease;
    overflow: hidden;
}

.status-legend:hover {
    transform: scale(1.02);
    background: linear-gradient(135deg, #323255, #2d2d5f);
    border-bottom: 5px solid #1a1a2f;
}

.status-legend h4 {
    margin-bottom: 8px;
    font-weight: 600;
    color: #f59e0b;
    display: inline-block;
    animation: pulseColor 2s infinite alternate;
}

@keyframes pulseColor {
    0% { color: #f59e0b; }
    50% { color: #3b82f6; }
    100% { color: #22c55e; }
}

.status-legend ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.status-legend li {
    margin-bottom: 6px;
    line-height: 1.5;
    transition: transform 0.2s ease, color 0.2s ease;
    cursor: default;
}

.status-legend li:hover {
    transform: translateX(6px);
    color: #3b82f6;
}