/* ============================================================
   tb_theme.css — кастомные стили + тёмная тема для проекта ТБ
   Заменяет CSS, который раньше брали из Materialize
   ============================================================ */

/* ---- Фон страницы (как раньше) ---- */
body {
    background: url(../fon.jpg);
    background-size: 100%;
    background-attachment: fixed;
    min-height: 100vh;
}

/* ---- Карточка-панель (аналог materialize .card-panel) ---- */
.card-panel {
    width: 80%;
    margin: 15px auto;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Эффект наведения (аналог .hoverable) */
.hoverable {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hoverable:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* Узкая карточка для формы входа (аналог .city) */
.city {
    width: 50%;
    margin: 100px auto;
    padding: 1rem 1.25rem;
}

/* ---- Таблица (аналог materialize .highlight) ---- */
.highlight tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* ---- Фон по цвету (аналог materialize цветовых классов) ---- */
.green { background-color: #28a745 !important; }
.green.lighten-3 { background-color: #7ccb8f !important; }
.green.lighten-5 { background-color: #d4edda !important; }
.red { background-color: #dc3545 !important; }
.red.lighten-3 { background-color: #f1868f !important; }
.red.lighten-5 { background-color: #f8d7da !important; }
.orange { background-color: #fd7e14 !important; }
.orange.lighten-2 { background-color: #ffc107 !important; }
.yellow { background-color: #ffc107 !important; }
.grey { background-color: #6c757d !important; }
.white { background-color: #ffffff !important; }

/* Текст по цвету */
.red-text { color: #dc3545 !important; }
.green-text { color: #28a745 !important; }
.black-text { color: #000000 !important; }

/* ---- Переключатель темы ---- */
.theme-toggle {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 2000;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
}

/* ---- Тёмная тема (Bootstrap 5.3 data-bs-theme) ---- */
[data-bs-theme="dark"] body {
    background: #121212;
}

[data-bs-theme="dark"] .card-panel {
    background-color: #1e1e1e !important;
    color: #e9ecef;
    border: 1px solid #343a40;
}

[data-bs-theme="dark"] .city {
    background-color: #1e1e1e !important;
    color: #e9ecef;
    border: 1px solid #343a40;
}

[data-bs-theme="dark"] .white {
    background-color: #1e1e1e !important;
}

[data-bs-theme="dark"] .black-text {
    color: #e9ecef !important;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #252525;
    color: #e9ecef;
    border-color: #343a40;
}

[data-bs-theme="dark"] .form-label {
    color: #adb5bd;
}

[data-bs-theme="dark"] table {
    color: #e9ecef;
}

[data-bs-theme="dark"] .highlight tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] th,
[data-bs-theme="dark"] td {
    border-color: #343a40;
}

[data-bs-theme="dark"] .form-check-input {
    background-color: #252525;
    border-color: #495057;
}
