/* Основные стили */
body {
    background: #0f172a !important;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #e2e8f0 !important;
    min-height: 100vh;
}

/* Текст */
h1, h2, h3, h4, h5, h6 {
    color: #f1f5f9 !important;
    font-weight: 600;
}

.text-muted {
    color: #64748b !important;
}

code {
    color: #a5b4fc !important;
    background: rgba(99, 102, 241, 0.1) !important;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.875em;
}

/* Bootstrap overrides - force dark theme */
.container, .container-fluid {
    background: transparent !important;
}

.bg-light {
    background: #1e293b !important;
}

.bg-white {
    background: #1e293b !important;
}

/* Навигация */
.navbar {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 0.8rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
    color: #818cf8 !important;
    letter-spacing: -0.5px;
}

.nav-link {
    transition: all 0.3s ease;
    color: #94a3b8 !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin: 0 2px;
}

.nav-link:hover,
.nav-link.active {
    color: #e2e8f0 !important;
    background: rgba(99, 102, 241, 0.1);
}

.nav-link.active {
    color: #818cf8 !important;
}

/* Боковая панель */
.sidebar-card {
    background: #1e293b;
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.sidebar-card .card-title {
    color: #e2e8f0;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.list-group-item {
    background: transparent;
    border: none;
    padding: 12px 15px;
    transition: all 0.3s ease;
    color: #94a3b8;
    border-radius: 8px;
    margin-bottom: 4px;
}

.list-group-item:hover {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white !important;
    padding-left: 20px;
}

.list-group-item i {
    margin-right: 10px;
}

/* Бейджи групп */
.group-badge {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: #c7d2fe;
}

.group-badge:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
}

/* Карточки действий */
.action-card {
    display: block;
    background: #1e293b;
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    height: 100%;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
}

.action-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.action-icon i {
    font-size: 1.8rem;
    color: white !important;
}

.bg-primary { background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important; }
.bg-warning { background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%) !important; }
.bg-info { background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%) !important; }
.bg-success { background: linear-gradient(135deg, #10b981 0%, #34d399 100%) !important; }
.bg-danger { background: linear-gradient(135deg, #ef4444 0%, #f97316 100%) !important; }

.action-card h5 {
    color: #e2e8f0 !important;
    font-weight: 600;
    margin-bottom: 5px;
}

.action-card p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

/* Карточки */
.card {
    background: #1e293b !important;
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.card-header {
    background: rgba(99, 102, 241, 0.05) !important;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 16px 16px 0 0 !important;
    font-weight: 600;
    color: #f1f5f9 !important;
}

.card-header.text-white {
    color: white !important;
}

.card-body {
    color: #cbd5e1 !important;
}

/* Карточки подтверждений */
.confirmed-card {
    background: #1e293b;
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.confirmed-card .card-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    color: white !important;
    border: none;
    font-weight: 600;
    border-radius: 16px 16px 0 0 !important;
}

.confirmed-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.confirmed-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    color: #cbd5e1;
}

.confirmed-list li:last-child {
    border-bottom: none;
}

/* Формы */
.form-control,
.form-select {
    background: #0f172a !important;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    padding: 12px 16px;
    transition: all 0.3s ease;
    color: #e2e8f0 !important;
}

.form-control:focus,
.form-select:focus {
    background: #0f172a !important;
    border-color: #6366f1;
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
    color: #e2e8f0 !important;
}

.form-control::placeholder {
    color: #475569;
}

.form-label {
    color: #cbd5e1 !important;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-text {
    color: #64748b !important;
}

/* Кнопки */
.btn {
    border-radius: 10px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #f1f5f9;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    color: #f1f5f9;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: #0f172a;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, #fbbf24 0%, #fb923c 100%);
    color: #0f172a;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: #0f172a;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #34d399 0%, #6ee7b7 100%);
    color: #0f172a;
}

.btn-info {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    color: #0f172a;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(6, 182, 212, 0.4);
    background: linear-gradient(135deg, #22d3ee 0%, #60a5fa 100%);
    color: #0f172a;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    color: #0f172a;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, #f87171 0%, #fb923c 100%);
    color: #0f172a;
}

.btn-outline-primary {
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #818cf8;
    background: transparent;
}

.btn-outline-primary:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: #6366f1;
    color: #a5b4fc;
}

.btn-outline-danger {
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    background: transparent;
}

.btn-outline-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #f87171;
}

/* Уведомления */
.alert {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1) !important;
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24 !important;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171 !important;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1) !important;
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399 !important;
}

/* Таблицы */
.table {
    border-radius: 10px;
    overflow: hidden;
    color: #cbd5e1 !important;
}

.table thead {
    background: rgba(99, 102, 241, 0.1) !important;
}

.table thead th {
    color: #818cf8 !important;
    font-weight: 600;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    background: transparent !important;
}

.table tbody tr {
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.table td {
    color: #cbd5e1 !important;
    vertical-align: middle;
    background: transparent !important;
}

.message-preview {
    color: #64748b;
    font-size: 0.9rem;
}

/* Бейджи типов сообщений */
.badge-reminder {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: #0f172a;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 500;
}

.badge-pay_all_except,
.badge-pay_only {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: #0f172a;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 500;
}

.badge-tech_work_start {
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    color: #0f172a;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 500;
}

.badge-tech_work_end {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    color: #0f172a;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 500;
}

.badge-manual {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 500;
}

/* Dropdown */
.dropdown-menu {
    background: #1e293b !important;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.dropdown-item {
    color: #94a3b8 !important;
    padding: 10px 16px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #e2e8f0 !important;
}

/* Badge overrides */
.badge {
    color: #0f172a;
}

.badge.bg-secondary {
    background: #475569 !important;
    color: #e2e8f0 !important;
}

/* Список */
.list-unstyled li {
    color: #cbd5e1;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Адаптивность */
@media (max-width: 768px) {
    .action-card {
        padding: 15px;
    }
    
    .action-icon {
        width: 50px;
        height: 50px;
    }
    
    .action-icon i {
        font-size: 1.4rem;
    }
}
