:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

[data-bs-theme="dark"] {
    --bs-body-color: #dee2e6;
    --bs-body-color-rgb: 222, 226, 230;
    --bs-body-bg: #212529;
    --bs-body-bg-rgb: 33, 37, 41;
    --bs-emphasis-color: #fff;
    --bs-emphasis-color-rgb: 255, 255, 255;
    --bs-secondary-color: rgba(222, 226, 230, 0.75);
    --bs-secondary-color-rgb: 222, 226, 230;
    --bs-secondary-bg: #343a40;
    --bs-secondary-bg-rgb: 52, 58, 64;
    --bs-tertiary-color: rgba(222, 226, 230, 0.5);
    --bs-tertiary-color-rgb: 222, 226, 230;
    --bs-tertiary-bg: #2b3035;
    --bs-tertiary-bg-rgb: 43, 48, 53;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s ease;
}

/* Навигация */
.navbar-brand {
    font-weight: 700;
}

/* Карточки */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.stat-card {
    border-left: 4px solid var(--primary-color);
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.stat-label {
    font-weight: 500;
}

/* Герой секция */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), #0a58ca);
    border-radius: 0.75rem;
}

/* Таблицы */
.table-card {
    border: none;
}

.staff-table {
    margin-bottom: 0;
}

.staff-table th {
    border-top: none;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.staff-row:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.staff-id {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.staff-nickname {
    font-weight: 600;
}

.staff-notes {
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Бейджи */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
}

/* Роли */
.role-badge {
    font-size: 0.75rem;
}

.role-owner {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.role-curator {
    background: linear-gradient(135deg, #aa00ff, #cc00ff);
}

.role-ml-moder {
    background: linear-gradient(135deg, #3148b1, #2945c4);
}

.role-tester {
    background: linear-gradient(135deg, #48dbfb, #0abde3);
}

.role-helper {
    background: linear-gradient(135deg, #1dd1a1, #10ac84);
}

.role-media {
    background: linear-gradient(135deg, #d16e1d, #c7650a);
}

/* Группы */
.group-badge {
    font-size: 0.75rem;
}

.group-вышка {
    background: linear-gradient(135deg, #ff9ff3, #f368e0);
}

.group-медиа {
    background: linear-gradient(135deg, #54a0ff, #2e86de);
}

.group-кп1 {
    background: linear-gradient(135deg, #1dd1a1, #10ac84);
}

.group-кп2 {
    background: linear-gradient(135deg, #fdcb6e, #e17055);
}

/* Статусы */
.status-badge {
    font-size: 0.75rem;
}

.status-0 { /* Стажировка */
    background: linear-gradient(135deg, #74b9ff, #0984e3);
}

.status-1 { /* Активен */
    background: linear-gradient(135deg, #00b894, #00a085);
}

.status-2 { /* Временно отсутствует */
    background: linear-gradient(135deg, #fdcb6e, #e17055);
}

.status-3 { /* Временно кикнут */
    background: linear-gradient(135deg, #e17055, #d63031);
}

.status-4 { /* Кикнут */
    background: linear-gradient(135deg, #d63031, #c23616);
}

.status-5 { /* Кикнут и забанен */
    background: linear-gradient(135deg, #2d3436, #000000);
}

/* Кнопки действий */
.action-buttons .btn {
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
}

/* Выговоры */
.warning-count {
    font-size: 0.875rem;
    min-width: 2rem;
}
.warning-count-1 {
    font-size: 0.875rem;
    min-width: 2rem;
}

/* Фильтры */
.filter-card {
    background: var(--bs-secondary-bg);
}

/* Состояние пустого списка */
.empty-state {
    color: var(--bs-secondary-color);
}

.empty-state .display-4 {
    opacity: 0.5;
}

/* Формы */
.form-label {
    font-weight: 600;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Модальные окна */
.modal-content {
    border: none;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.modal-header {
    border-bottom: 1px solid var(--bs-border-color);
    padding: 1rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

/* Стили для страницы входа */
.login-card {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-top: 2rem;
}

/* Стили для кнопки Telegram */
.get-telegram-btn {
    border-color: #0088cc;
    color: #0088cc;
}

.get-telegram-btn:hover {
    background-color: #0088cc;
    color: white;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .action-buttons .btn {
        margin-bottom: 0.25rem;
    }
    
    .staff-id {
        font-size: 0.8rem;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .action-buttons .btn {
        width: 100%;
        text-align: center;
    }
}

/* Анимации */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Переключатель темы */
.theme-switch {
    cursor: pointer;
}

/* Кастомный скроллбар */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bs-secondary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0a58ca;
}