.btn-group small {
    line-height: 14px !important;
    font-size: 12px;
    display: block;
}

.pool-mini-card {
    box-shadow: 1px 1px 3px gray !important;
}

/* Темная тема */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-card: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --border-color: #444444;
}

/* Светлая тема (по умолчанию) */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
}

/* Применяем CSS переменные */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s, color 0.3s;
}

.card {
    background-color: var(--bg-card);
    border-color: var(--border-color);
}

/*
.navbar {
    background-color: var(--bg-secondary) !important;
}
*/

.navbar {
    background-color: #2b4660 !important;
}

.table {
    color: var(--text-primary);
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: var(--bg-secondary);
}

.text-muted {
    color: var(--text-secondary) !important;
}

/* Кнопка переключения темы */
.theme-switcher {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.3s;
}

.theme-btn:hover {
    transform: scale(1.1);
}

/* Стили для list-group-item в темной теме */
[data-theme="dark"] .list-group-item {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .list-group-item:hover {
    background-color: #3d3d3d;
}

[data-theme="dark"] .list-group-item.list-group-item-action:hover {
    background-color: #3d3d3d;
}

[data-theme="dark"] .list-group-item.list-group-item-success {
    background-color: #155724;
    border-color: #155724;
    color: #fff;
}

[data-theme="dark"] .list-group-item.list-group-item-warning {
    background-color: #856404;
    border-color: #856404;
    color: #fff;
}

[data-theme="dark"] .list-group-item.list-group-item-danger {
    background-color: #721c24;
    border-color: #721c24;
    color: #fff;
}

[data-theme="dark"] .list-group-item.list-group-item-info {
    background-color: #0c5460;
    border-color: #0c5460;
    color: #fff;
}

/* Формы в темной теме */
[data-theme="dark"] .form-control {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .form-control:focus {
    background-color: var(--bg-secondary);
    border-color: #80bdff;
    color: var(--text-primary);
}

[data-theme="dark"] .form-select {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Карточки */
[data-theme="dark"] .card {
    background-color: var(--bg-card);
    border-color: var(--border-color);
}

/* Таблицы */
[data-theme="dark"] .table {
    --bs-table-bg: var(--bg-card);
    --bs-table-striped-bg: var(--bg-secondary);
    --bs-table-hover-bg: #3d3d3d;
    color: var(--text-primary);
}

[data-theme="dark"] .table-hover > tbody > tr:hover {
    --bs-table-accent-bg: var(--bs-table-hover-bg);
    color: var(--text-primary);
}

/* Переопределяем Bootstrap переменные для темной темы */
[data-theme="dark"] {
    --bs-table-bg: var(--bg-card);
    --bs-table-color: var(--text-primary);
    --bs-table-border-color: var(--border-color);
    --bs-table-striped-bg: #3d3d3d;
    --bs-table-striped-color: var(--text-primary);
    --bs-table-active-bg: #4d4d4d;
    --bs-table-active-color: var(--text-primary);
    --bs-table-hover-bg: #454545;
    --bs-table-hover-color: var(--text-primary);
}

/* Явно задаем цвета для таблиц */
[data-theme="dark"] .table {
    background-color: var(--bs-table-bg);
    color: var(--bs-table-color);
    border-color: var(--bs-table-border-color);
}

[data-theme="dark"] .table > :not(caption) > * > * {
    background-color: var(--bs-table-bg);
    color: var(--bs-table-color);
    border-color: var(--bs-table-border-color);
}

[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
/*
    --bs-table-accent-bg: var(--bs-table-striped-bg);
    color: var(--bs-table-striped-color);
   */
    --bs-table-accent-bg: #2a2a2a;
    color: #91a5b9;
}

[data-theme="dark"] .table-hover > tbody > tr:hover > * {
    --bs-table-accent-bg: var(--bs-table-hover-bg);
    color: var(--bs-table-hover-color);
}


[data-theme="dark"] .table > :not(caption) > * > * {
    background-color: #303432;
    color: var(--bs-table-color);
    border-color: var(--bs-table-border-color);
}


.text-muted b {
    color: #0d6efd;
}

@media (max-width: 768px) {

    body, .btn-group {
        font-size: 75%;
    }
    span.badge {
        max-width: 20px;
        height: auto;
        white-space: normal;
        overflow: hidden;
    }
    .col-12 .btn-group a {
        padding: 5px;
        font-size: 14px;
    }
    .table-responsive, .table-responsive td, .table-responsive th, .table-responsive tr td div.btn-group a.btn, .table-responsive tr td .btn-group a small, a.btn, button.btn {
        font-size: 85%;
        padding: 2px;
        line-height: 1 !important;
    }

    .table-responsive tr td div.btn-group a.btn {
        max-width: 30px;
        overflow: hidden;
    }

    .nav-item.dropdown ul.dropdown-menu li a.dropdown-item {
        font-size: 75%;
        color: var(--text-secondary);
    }

    .list-group.list-group-flush span.badge.rounded-pill {
        max-width: 50px;
    }

    table.table.table-striped, table.table.table-striped a, table.table.table-striped button {
        font-size: 85%;
    }
}