/* ═══════════════════════════════════════════════════════════════════════════
   ПОЛНОСТЬЮ ЧЁРНАЯ ТЕМА - PURE BLACK DESIGN
   Абсолютно чёрный фон, минималистичный дизайн, высокий контраст
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────────
   ОСНОВНЫЕ СТИЛИ BODY
   ───────────────────────────────────────────────────────────────────────────── */
body.dark-theme {
    background-color: #000000;
    background-image: none;
    color: #ffffff;
}

/* ─────────────────────────────────────────────────────────────────────────────
   ФОРМЫ И ИНПУТЫ
   ───────────────────────────────────────────────────────────────────────────── */
body.dark-theme input[type="text"],
body.dark-theme input[type="password"],
body.dark-theme input[type="number"],
body.dark-theme input[type="email"],
body.dark-theme input[type="tel"],
body.dark-theme select,
body.dark-theme textarea {
    background-color: #0a0a0a;
    color: #ffffff;
    border: 1px solid #1a1a1a;
    transition: all 0.3s ease;
}

body.dark-theme input[type="text"]:focus,
body.dark-theme input[type="password"]:focus,
body.dark-theme input[type="number"]:focus,
body.dark-theme input[type="email"]:focus,
body.dark-theme input[type="tel"]:focus,
body.dark-theme select:focus,
body.dark-theme textarea:focus {
    border-color: #006FFF;
    box-shadow: 0 0 0 2px rgba(0, 111, 255, 0.15);
}

body.dark-theme input::placeholder,
body.dark-theme textarea::placeholder {
    color: #666666;
    opacity: 1;
}

/* ─────────────────────────────────────────────────────────────────────────────
   ОКНА И КОНТЕЙНЕРЫ
   ───────────────────────────────────────────────────────────────────────────── */
body.dark-theme .window {
    background-color: #0a0a0a;
    color: #ffffff;
    border: 1px solid #1a1a1a;
    background-image: none;
}

body.dark-theme .input-block > label {
    color: #999999;
}

/* ─────────────────────────────────────────────────────────────────────────────
   КАСТОМНЫЙ СЕЛЕКТ
   ───────────────────────────────────────────────────────────────────────────── */
body.dark-theme .custom-select-render {
    background-color: #0a0a0a;
    border: 1px solid #1a1a1a;
}

body.dark-theme .custom-select-render:after {
    border-color: #666666;
    border-left-color: transparent;
    border-top-color: transparent;
}

body.dark-theme .custom-select-render > .select-wrapper {
    color: #ffffff;
}

body.dark-theme .custom-select-render > .select-items {
    background-color: #0a0a0a;
    border: 1px solid #1a1a1a;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

body.dark-theme .custom-select-render > .select-items > li {
    color: #999999;
}

body.dark-theme .custom-select-render.active > .select-items > li.selected,
body.dark-theme .custom-select-render.active > .select-items > li:hover {
    color: #ffffff;
    background-color: #1a1a1a;
}

/* ─────────────────────────────────────────────────────────────────────────────
   НАВИГАЦИЯ
   ───────────────────────────────────────────────────────────────────────────── */
body.dark-theme .navbar {
    background-color: #000000;
    border-bottom: 1px solid #1a1a1a;
}

body.dark-theme .navbar:after {
    background-color: #1a1a1a;
    opacity: 1;
}

body.dark-theme .navbar .navbar-wrapper .nav-brand {
    color: #ffffff;
}

body.dark-theme .navbar .navbar-wrapper .nav-brand > span {
    color: #006FFF;
}

/* Онлайн бейдж в тёмной теме */
body.dark-theme .online-badge {
    background-color: #1a1a1a;
    border-color: #22c55e;
    color: #888888;
    animation: online-pulse 2s ease-in-out infinite;
}

body.dark-theme .online-badge i {
    color: #22c55e;
}

body.dark-theme .online-badge strong {
    color: #ffffff;
}

body.dark-theme .navbar .navbar-wrapper > .nav-center,
body.dark-theme .navbar .navbar-wrapper > .nav-left,
body.dark-theme .navbar .navbar-wrapper > .nav-right {
    color: #666666;
}

body.dark-theme .navbar .navbar-wrapper .nav-link {
    color: #666666;
    transition: color 0.3s ease;
}

body.dark-theme .navbar .navbar-wrapper .nav-link.active,
body.dark-theme .navbar .navbar-wrapper .nav-link:hover {
    color: #ffffff;
}

body.dark-theme .navbar .navbar-wrapper .nav-submenu {
    background-color: #0a0a0a;
    border: 1px solid #1a1a1a;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

body.dark-theme .navbar .navbar-wrapper .nav-submenu .nav-item,
body.dark-theme .navbar .navbar-wrapper .nav-submenu .nav-link {
    color: #666666;
}

body.dark-theme .navbar .navbar-wrapper .nav-submenu .nav-link.active,
body.dark-theme .navbar .navbar-wrapper .nav-submenu .nav-link:hover {
    color: #ffffff;
}

body.dark-theme .navbar .navbar-wrapper .nav-mobile {
    background-color: #0a0a0a;
    color: #666666;
    border: 1px solid #1a1a1a;
}

/* ─────────────────────────────────────────────────────────────────────────────
   НАВИГАЦИОННОЕ МЕНЮ В ТЁМНОЙ ТЕМЕ
   ───────────────────────────────────────────────────────────────────────────── */
body.dark-theme .main-nav > a {
    color: #ffffff;
}

body.dark-theme .main-nav > a:hover {
    color: #cccccc;
}

body.dark-theme .main-nav > a.active {
    background-color: #1e1e1e;
    border-color: #333333;
    color: #ffffff;
}

body.dark-theme .admin-dropdown {
    background-color: #141414;
    border-color: #2a2a2a;
}

body.dark-theme .admin-dropdown a {
    color: #cccccc;
}

body.dark-theme .admin-dropdown a:hover {
    background-color: #1e1e1e;
    color: #ffffff;
}

/* ─────────────────────────────────────────────────────────────────────────────
   ФУТЕР
   ───────────────────────────────────────────────────────────────────────────── */
body.dark-theme footer {
    background-color: #000000;
    border-top: 1px solid #1a1a1a;
}

body.dark-theme footer > .container.footer-bottom {
    color: #666666;
}

body.dark-theme footer > .container.footer-bottom > .block-right a {
    color: #666666;
    transition: color 0.3s ease;
}

body.dark-theme footer > .container.footer-bottom > .block-right a:hover {
    color: #ffffff;
}

body.dark-theme footer .logo {
    color: #ffffff;
}

body.dark-theme footer > .container.footer-bottom > .block-dev .dev {
    filter: invert(1);
    opacity: 0.3;
}

body.dark-theme footer > .container.footer-bottom > .block-dev .dev:hover {
    opacity: 0.7;
}

body.dark-theme footer > .container.footer-bottom .cards > li {
    filter: saturate(0%) brightness(0.6);
}

body.dark-theme footer > .scrolltop {
    background-color: #006FFF;
    box-shadow: 0 4px 20px rgba(0, 111, 255, 0.3);
}

/* ─────────────────────────────────────────────────────────────────────────────
   СТАТИЧЕСКИЕ СТРАНИЦЫ
   ───────────────────────────────────────────────────────────────────────────── */
body.dark-theme .static-page > .pagename > h1 {
    color: #ffffff;
}

body.dark-theme .static-page > .description {
    color: #999999;
}

body.dark-theme .static-page > .section {
    color: #cccccc;
}

body.dark-theme .static-page .text-light {
    color: #666666;
}

body.dark-theme .static-page h4 {
    color: #ffffff;
}

body.dark-theme .static-page > .section .section-tabs .tabs > .tab-links {
    border-bottom-color: #1a1a1a;
}

body.dark-theme .static-page > .section .section-tabs .tabs .section-tab-name {
    color: #ffffff;
}

body.dark-theme .static-page > .section .section-tabs .tabs > .tab-links > li .tab-link {
    color: #666666;
}

body.dark-theme .static-page > .section .section-tabs .tabs > .tab-links > li .tab-link.active {
    color: #ffffff;
    border-color: #006FFF;
}

/* ─────────────────────────────────────────────────────────────────────────────
   ВАЛИДАЦИЯ ФОРМ
   ───────────────────────────────────────────────────────────────────────────── */
body.dark-theme input[type="text"]:focus:valid,
body.dark-theme input[type="number"]:focus:valid,
body.dark-theme input[type="email"]:focus:valid,
body.dark-theme input[type="tel"]:focus:valid,
body.dark-theme select:focus:valid,
body.dark-theme textarea:focus:valid {
    border-color: #22c55e;
    background-color: rgba(34, 197, 94, 0.05);
}

/* ─────────────────────────────────────────────────────────────────────────────
   МОДАЛЬНЫЕ ОКНА
   ───────────────────────────────────────────────────────────────────────────── */
body.dark-theme .modal {
    background-color: rgba(0, 0, 0, 0.9);
}

body.dark-theme .modal > .wrapper > .modal-content {
    background-color: #0a0a0a;
    border: 1px solid #1a1a1a;
    background-image: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

body.dark-theme .modal > .wrapper > .modal-content > .modal-header {
    color: #ffffff;
}

body.dark-theme .modal > .wrapper > .modal-content > .modal-description {
    color: #999999;
}

body.dark-theme .modal > .wrapper > .modal-content > .close-modal {
    color: #666666;
    transition: color 0.3s ease;
}

body.dark-theme .modal > .wrapper > .modal-content > .close-modal:hover {
    color: #ffffff;
}

/* ─────────────────────────────────────────────────────────────────────────────
   ТАБЛИЦЫ
   ───────────────────────────────────────────────────────────────────────────── */
body.dark-theme .table .table-header > .table-row > .table-cell {
    border-color: #1a1a1a;
    background-color: #0a0a0a;
    color: #ffffff;
}

body.dark-theme .table .table-cell {
    border-color: #1a1a1a;
    color: #cccccc;
}

body.dark-theme .table .table-row:hover .table-cell {
    background-color: #0f0f0f;
}

body.dark-theme .textarea {
    background-color: #0a0a0a;
}

/* ─────────────────────────────────────────────────────────────────────────────
   ССЫЛКИ
   ───────────────────────────────────────────────────────────────────────────── */
body.dark-theme a {
    color: #006FFF;
    transition: color 0.3s ease;
}

body.dark-theme a:hover {
    color: #ff8040;
}

/* ─────────────────────────────────────────────────────────────────────────────
   КНОПКИ
   ───────────────────────────────────────────────────────────────────────────── */
body.dark-theme .btn {
    transition: all 0.3s ease;
}

body.dark-theme .btn-primary {
    background-color: #006FFF;
    border-color: #006FFF;
}

body.dark-theme .btn-primary:hover {
    background-color: #ff7a1a;
    border-color: #ff7a1a;
}

/* ─────────────────────────────────────────────────────────────────────────────
   ЧЕКБОКСЫ И РАДИО
   ───────────────────────────────────────────────────────────────────────────── */
body.dark-theme .checkbox-style .checkbox-style-checked,
body.dark-theme .radio-style .checkbox-style-checked {
    border-color: #006FFF;
    background-color: transparent;
}

body.dark-theme .checkbox-style input:checked + .checkbox-style-checked {
    background-color: #006FFF;
}

/* ─────────────────────────────────────────────────────────────────────────────
   СКРОЛЛБАР
   ───────────────────────────────────────────────────────────────────────────── */
body.dark-theme ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

body.dark-theme ::-webkit-scrollbar-track {
    background-color: #0a0a0a;
}

body.dark-theme ::-webkit-scrollbar-thumb {
    background-color: #333333;
    border-radius: 4px;
}

body.dark-theme ::-webkit-scrollbar-thumb:hover {
    background-color: #006FFF;
}

/* ─────────────────────────────────────────────────────────────────────────────
   TOOLTIP
   ───────────────────────────────────────────────────────────────────────────── */
body.dark-theme .tooltip {
    background-color: #1a1a1a;
    color: #ffffff;
    border: 1px solid #333333;
}

/* ─────────────────────────────────────────────────────────────────────────────
   АЛЕРТЫ
   ───────────────────────────────────────────────────────────────────────────── */
body.dark-theme .alertblock {
    background-color: #0a0a0a;
    border-color: #1a1a1a;
    color: #ffffff;
}

body.dark-theme .alertblock.alertblock-success {
    border-color: #22c55e;
    background-color: rgba(34, 197, 94, 0.1);
}

body.dark-theme .alertblock.alertblock-error {
    border-color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

body.dark-theme .alertblock.alertblock-warning {
    border-color: #f59e0b;
    background-color: rgba(245, 158, 11, 0.1);
}

/* ─────────────────────────────────────────────────────────────────────────────
   ИКОНКИ ТЕМЫ
   ───────────────────────────────────────────────────────────────────────────── */
body.dark-theme .pic.pic-sun,
body.dark-theme .pic.pic-moon {
    background-color: #0a0a0a;
    border: 1px solid #1a1a1a;
}

/* ─────────────────────────────────────────────────────────────────────────────
   СОЦИАЛЬНЫЕ ССЫЛКИ В НАВИГАЦИИ
   ───────────────────────────────────────────────────────────────────────────── */
body.dark-theme .nav-link-social .pic {
    filter: brightness(0) saturate(100%) invert(50%);
}

body.dark-theme .nav-link-social:hover .pic {
    filter: brightness(0) saturate(100%) invert(100%);
}

/* ─────────────────────────────────────────────────────────────────────────────
   ВЫДЕЛЕНИЕ ТЕКСТА
   ───────────────────────────────────────────────────────────────────────────── */
body.dark-theme ::selection {
    background-color: #006FFF;
    color: #ffffff;
}

body.dark-theme ::-moz-selection {
    background-color: #006FFF;
    color: #ffffff;
}
