/* ═══════════════════════════════════════════════════════════════
   MIRRP — перекраска админ-панели (Metronic 8) под фирменный стиль
   Фиолетовый #8b5cf6 → циан #22d3ee, тёмный сайдбар
   ═══════════════════════════════════════════════════════════════ */

:root {
    --kt-primary: #8b5cf6 !important;
    --kt-primary-rgb: 139, 92, 246 !important;
    --kt-primary-active: #6d28d9 !important;
    --kt-primary-light: #a78bfa !important;
    --kt-link-color: #8b5cf6;
}

/* ─── Кнопки ─── */
.btn-primary,
.btn.btn-primary {
    --kt-btn-bg: #8b5cf6 !important;
    --kt-btn-border-color: #8b5cf6 !important;
    --kt-btn-hover-bg: #7c4ef0 !important;
    --kt-btn-hover-border-color: #7c4ef0 !important;
    --kt-btn-active-bg: #6d28d9 !important;
    background-image: linear-gradient(135deg, #8b5cf6, #6366f1 55%, #22d3ee) !important;
    border: none !important;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35) !important;
    color: #fff !important;
}

.btn-primary:hover:not(:disabled) {
    filter: brightness(1.1);
}

/* ─── Ссылки и текст ─── */
a { color: #8b5cf6; }
a:hover { color: #7c4ef0; }
.text-primary { color: #8b5cf6 !important; }
.bg-primary { background-color: #8b5cf6 !important; }

/* ─── Сайдбар ─── */
.app-sidebar {
    background-color: #0b0f1a !important;
    box-shadow: inset -1px 0 0 #1c2637 !important;
}

[data-bs-theme="dark"] .app-sidebar {
    background-color: #0b0f1a !important;
}

.app-sidebar .menu-link {
    color: #8b95a8 !important;
    transition: all .2s;
}

.app-sidebar .menu-link .menu-title { color: #8b95a8 !important; }

.app-sidebar .menu-link:hover {
    background-color: rgba(139, 92, 246, 0.08) !important;
}

.app-sidebar .menu-link:hover .menu-title,
.app-sidebar .menu-item.here .menu-link .menu-title {
    color: #e8ecf4 !important;
}

.app-sidebar .menu-item.here .menu-link,
.app-sidebar .menu-item.show .menu-link {
    background-color: rgba(139, 92, 246, 0.14) !important;
    border-radius: 8px;
}

.app-sidebar .menu-item.here .menu-link .menu-icon {
    color: #a78bfa !important;
}

.app-sidebar .menu-heading {
    color: #5b6577 !important;
    letter-spacing: 1.2px;
}

/* ─── Хедер ─── */
.app-header {
    background-color: rgba(11, 15, 26, 0.92) !important;
    box-shadow: 0 1px 0 #1c2637 !important;
}

[data-bs-theme="dark"] .app-header {
    background-color: #0b0f1a !important;
}

/* ─── Фон страницы ─── */
body,
[data-bs-theme="dark"] body,
.app-default,
#kt_app_body {
    background-color: #07090f !important;
    background-image:
        radial-gradient(ellipse 60% 40% at 15% 0%, rgba(139, 92, 246, 0.10), transparent),
        radial-gradient(ellipse 50% 35% at 85% 10%, rgba(34, 211, 238, 0.06), transparent) !important;
}

/* ─── Карточки ─── */
.card,
.bg-body {
    background-color: #0e1420 !important;
    border-color: #1c2637 !important;
    border-radius: 14px !important;
}

[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .bg-body {
    background-color: #0e1420 !important;
}

.card-header { border-bottom-color: #1c2637 !important; }

/* ─── Таблицы ─── */
.table { --kt-table-bg: transparent; color: #e8ecf4; }
.table > :not(caption) > * > * {
    background-color: transparent !important;
    border-color: #1c2637 !important;
    color: #e8ecf4;
}
.table thead th { color: #8b95a8 !important; text-transform: uppercase; font-size: .8rem; }
.table-striped > tbody > tr:nth-of-type(odd) > * { background-color: rgba(139, 92, 246, 0.03) !important; }
.table-hover > tbody > tr:hover > * { background-color: rgba(139, 92, 246, 0.07) !important; }

/* ─── Формы ─── */
.form-control, .form-select {
    background-color: #0b0f1a !important;
    border-color: #1c2637 !important;
    color: #e8ecf4 !important;
}
.form-control:focus, .form-select:focus {
    border-color: #8b5cf6 !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15) !important;
}
.form-control::placeholder { color: #5b6577; }

/* ─── Бейджи ─── */
.badge-light-primary { background-color: rgba(139, 92, 246, 0.15) !important; color: #a78bfa !important; }

/* ─── Пагинация ─── */
.page-link {
    background-color: #0e1420 !important;
    border-color: #1c2637 !important;
    color: #8b95a8 !important;
}
.page-item.active .page-link {
    background-image: linear-gradient(135deg, #8b5cf6, #6366f1) !important;
    border-color: transparent !important;
    color: #fff !important;
}

/* ─── Скроллбар ─── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0b0f1a; }
::-webkit-scrollbar-thumb { background: #1c2637; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #8b5cf6; }
