/* =========================================================
   BLOGZINE.RU — style.css
   Bootstrap 5.3.8 / DLE 21
   ========================================================= */

/* =========================================================
   МОДАЛЬНЫЕ ОКНА — АККАУНТ И АВТОРИЗАЦИЯ
   ========================================================= */

.acc-modal .modal-dialog { max-width: 430px; }

.acc-modal .modal-content {
    border: 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, .35);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 3rem);
}

.acc-modal .modal-header {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: #fff;
    border: 0;
    padding: 22px 24px;
}

.acc-modal .modal-header .acc-ico {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.acc-modal .modal-title {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: .2px;
}

.acc-modal .modal-header :is(h1, h2, h3, h4, h5, h6) { color: #fff; }

.acc-modal .modal-header small {
    color: rgba(255, 255, 255, .55);
    font-size: .8rem;
}

.acc-modal .modal-body {
    padding: 26px 24px;
    background: #fff;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.acc-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .35);
    transition: transform .25s ease;
}

.acc-avatar:hover { transform: scale(1.04); }

.acc-login {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--bs-body-color, #111827);
}

.acc-profile-link {
    font-size: .82rem;
    color: #6b7280;
    text-decoration: none;
    transition: color .2s;
}

.acc-profile-link:hover { color: #111827; }

.acc-admin-btn {
    background: linear-gradient(135deg, #1f2937, #374151);
    color: #fff;
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 500;
    font-size: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 6px 20px -8px rgba(31, 41, 55, .6);
}

.acc-admin-btn:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 26px -8px rgba(31, 41, 55, .7);
}

.acc-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    background: #f9fafb;
    text-decoration: none;
    color: #1f2937;
    font-size: .85rem;
    font-weight: 500;
    min-height: 58px;
    transition: background .2s, transform .15s, box-shadow .2s;
}

.acc-item:hover {
    background: #fff;
    color: #111827;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .2);
}

.acc-item .ico {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.ico-green  { background: #ecfdf5; color: #059669; }
.ico-blue   { background: #eff6ff; color: #2563eb; }
.ico-orange { background: #fff7ed; color: #ea580c; }
.ico-yellow { background: #fefce8; color: #ca8a04; }
.ico-purple { background: #f5f3ff; color: #7c3aed; }
.ico-teal   { background: #f0fdfa; color: #0d9488; }

.acc-item .flex-grow-1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acc-item .acc-badge {
    font-size: .68rem;
    padding: 2px 7px;
    flex-shrink: 0;
    background: #dc2626;
    color: #fff;
}

.acc-badge {
    font-size: .72rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
}

.acc-badge[data-count="0"],
.acc-badge:empty { display: none; }

.acc-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    border: 1.5px solid #fee2e2;
    color: #dc2626;
    font-weight: 500;
    font-size: .9rem;
    text-decoration: none;
    transition: background .2s, border-color .2s, color .2s;
    margin-top: auto;
}

.acc-logout:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.acc-field-label {
    font-size: .8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 7px;
    display: block;
}

.acc-input-group {
    display: flex;
    align-items: center;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    transition: border-color .2s, background .2s;
    overflow: hidden;
}

.acc-input-group:focus-within {
    border-color: #1f2937;
    background: #fff;
}

.acc-input-group .lead-ico {
    padding: 0 14px;
    color: #9ca3af;
    font-size: .9rem;
}

.acc-input-group .form-control {
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 12px 14px 12px 0;
    font-size: .92rem;
}

.acc-input-group .form-control::placeholder { color: #9ca3af; }

.acc-forgot {
    font-size: .78rem;
    color: #6b7280;
    text-decoration: none;
}

.acc-forgot:hover {
    color: #111827;
    text-decoration: underline;
}

.acc-submit {
    width: 100%;
    padding: 13px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #1f2937, #111827);
    color: #fff;
    font-weight: 600;
    font-size: .92rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 8px 22px -8px rgba(17, 24, 39, .6);
}

.acc-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -8px rgba(17, 24, 39, .75);
}

.acc-submit:active { transform: translateY(0); }

.acc-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #9ca3af;
    font-size: .78rem;
    margin: 22px 0 16px;
}

.acc-divider::before,
.acc-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.acc-social-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    color: #374151;
    font-size: 15px;
    text-decoration: none;
    transition: transform .2s, background .2s, color .2s, border-color .2s;
}

.acc-social-btn:hover {
    transform: translateY(-3px);
    background: #fff;
    border-color: #d1d5db;
    color: #111827;
}

.acc-social-btn.vk        { color: #0077FF; border-color: #0077FF33; background: #0077FF10; }
.acc-social-btn.vk:hover  { background: #0077FF; color: #fff; border-color: #0077FF; }

.acc-social-btn.yandex        { color: #FC3F1D; border-color: #FC3F1D33; background: #FC3F1D10; }
.acc-social-btn.yandex:hover  { background: #FC3F1D; color: #fff; border-color: #FC3F1D; }

.acc-social-btn.google        { color: #DB4437; border-color: #DB443733; background: #DB443710; }
.acc-social-btn.google:hover  { background: #DB4437; color: #fff; border-color: #DB4437; }

.acc-social-btn.facebook        { color: #1877F2; border-color: #1877F233; background: #1877F210; }
.acc-social-btn.facebook:hover  { background: #1877F2; color: #fff; border-color: #1877F2; }

.acc-social-btn.ok        { color: #EE8208; border-color: #EE820833; background: #EE820810; }
.acc-social-btn.ok:hover  { background: #EE8208; color: #fff; border-color: #EE8208; }

.acc-social-btn.mailru        { color: #005FF9; border-color: #005FF933; background: #005FF910; }
.acc-social-btn.mailru:hover  { background: #005FF9; color: #fff; border-color: #005FF9; }

.acc-register {
    font-size: .85rem;
    color: #6b7280;
}

.acc-register a {
    color: #111827;
    font-weight: 600;
    text-decoration: none;
}

.acc-register a:hover {
    color: #111827;
    text-decoration: underline;
}

.acc-modal .form-check-input {
    background-color: #f9fafb;
    border-color: #d1d5db;
    cursor: pointer;
}

.acc-modal .form-check-input:checked {
    background-color: #1f2937;
    border-color: #1f2937;
}

.acc-modal .form-check-input:focus {
    box-shadow: 0 0 0 .2rem rgba(31, 41, 55, .15);
}

/* ---------- ТЁМНАЯ ТЕМА (аккаунт) ---------- */

[data-bs-theme="dark"] .acc-modal .modal-content,
[data-bs-theme="dark"] .acc-modal .modal-body {
    background: var(--bs-body-bg, #212529);
    color: var(--bs-body-color, #dee2e6);
}

[data-bs-theme="dark"] .acc-modal .modal-title,
[data-bs-theme="dark"] .acc-modal .modal-header :is(h1, h2, h3, h4, h5, h6) { color: #fff; }

[data-bs-theme="dark"] .acc-login { color: #f9fafb; }
[data-bs-theme="dark"] .acc-profile-link { color: #60a5fa; }
[data-bs-theme="dark"] .acc-profile-link:hover { color: #93c5fd; }

[data-bs-theme="dark"] .acc-item {
    color: #e5e7eb;
    background: #111827;
    border: 1px solid #1f2937;
}

[data-bs-theme="dark"] .acc-item:hover {
    color: #fff;
    background: #1a2332;
    border-color: #374151;
}

[data-bs-theme="dark"] .acc-logout {
    color: #f87171;
    border-color: rgba(220, 38, 38, .25);
}

[data-bs-theme="dark"] .acc-logout:hover {
    color: #fca5a5;
    background: rgba(220, 38, 38, .08);
}

[data-bs-theme="dark"] .acc-field-label { color: #e5e7eb; }

[data-bs-theme="dark"] .acc-input-group {
    background: #111827;
    border-color: #374151;
}

[data-bs-theme="dark"] .acc-input-group:focus-within {
    border-color: #60a5fa;
    background: #0f1720;
}

[data-bs-theme="dark"] .acc-input-group .form-control { color: #f9fafb; }
[data-bs-theme="dark"] .acc-input-group .form-control::placeholder { color: #6b7280; }
[data-bs-theme="dark"] .acc-input-group .lead-ico { color: #6b7280; }
[data-bs-theme="dark"] .acc-forgot { color: #9ca3af; }
[data-bs-theme="dark"] .acc-forgot:hover { color: #f3f4f6; }
[data-bs-theme="dark"] .acc-divider { color: #6b7280; }

[data-bs-theme="dark"] .acc-divider::before,
[data-bs-theme="dark"] .acc-divider::after { background: #374151; }

[data-bs-theme="dark"] .acc-social-btn {
    background: #111827;
    border-color: #374151;
}

[data-bs-theme="dark"] .acc-social-btn:hover {
    background: #1a2332;
    border-color: #4b5563;
    color: #fff;
}

[data-bs-theme="dark"] .acc-register { color: #9ca3af; }
[data-bs-theme="dark"] .acc-register a { color: #60a5fa; }
[data-bs-theme="dark"] .acc-register a:hover { color: #93c5fd; }

[data-bs-theme="dark"] .acc-modal .form-check-input {
    background-color: #111827;
    border-color: #4b5563;
}

[data-bs-theme="dark"] .acc-modal .form-check-input:checked {
    background-color: #60a5fa;
    border-color: #60a5fa;
}

[data-bs-theme="dark"] .acc-modal .form-check-input:focus {
    box-shadow: 0 0 0 .2rem rgba(96, 165, 250, .2);
}

/* ---------- АДАПТИВНОСТЬ (аккаунт) ---------- */

@media (max-width: 575.98px) {
    .acc-modal .modal-dialog { max-width: none; margin: .5rem; }
    .acc-modal .modal-content { border-radius: 19px; max-height: calc(100vh - 1rem); }
    .acc-modal .modal-header { padding: 18px 20px; }
    .acc-modal .modal-header .acc-ico { width: 40px; height: 40px; border-radius: 12px; font-size: 16px; }
    .acc-modal .modal-body { padding: 20px 18px; }
    .acc-avatar { width: 68px; height: 68px; }
    .acc-social-btn { width: 42px; height: 42px; font-size: 14px; }
    .acc-item { font-size: .8rem; padding: 10px; min-height: 54px; }
    .acc-item .ico { width: 30px; height: 30px; font-size: 12px; }
}

@media (max-width: 380px) {
    .acc-modal .modal-header { padding: 15px 16px; }
    .acc-modal .modal-body { padding: 16px 14px; }
    .acc-social-btn { width: 38px; height: 38px; font-size: 13px; }
    .acc-item { font-size: .76rem; gap: 8px; padding: 9px; min-height: 50px; }
    .acc-item .ico { width: 28px; height: 28px; font-size: 11px; }
    .acc-item .flex-grow-1 { white-space: normal; line-height: 1.2; }
    .acc-avatar { width: 64px; height: 64px; }
}


/* =========================================================
   FEEDBACK — ОБРАТНАЯ СВЯЗЬ
   ========================================================= */

.feedback-page {
    position: relative;
    width: 100%;
    padding: 1.5rem;
    border-radius: 1rem;
    background: var(--bs-tertiary-bg, var(--bs-secondary-bg, #f8f9fa));
    color: var(--bs-body-color);
}

/* ---------- HONEYPOT / VISUALLY HIDDEN ---------- */

.feedback-honeypot,
.visually-hidden,
.addnews-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- ШАПКА ---------- */

.feedback-page .feedback-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.feedback-page .feedback-icon {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    border-radius: 14px;
    background: var(--bs-primary);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .10);
}

.feedback-page .feedback-icon i {
    display: block;
    margin: 0;
    font-size: inherit;
    line-height: 1;
}

.feedback-page .feedback-header-content {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feedback-page .feedback-title {
    margin: 0 0 5px;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.feedback-page .feedback-intro {
    margin: 0;
    color: var(--bs-secondary-color);
    font-size: 1rem;
    line-height: 1.5;
}

/* ---------- ИНФО-СООБЩЕНИЕ ---------- */

.feedback-page .feedback-note {
    margin: 0 0 24px;
    padding: 12px 15px;
    border: 1px solid var(--bs-border-color);
    border-radius: 10px;
    background: var(--bs-tertiary-bg, var(--bs-secondary-bg, #f8f9fa));
    color: var(--bs-secondary-color);
    font-size: .9rem;
    line-height: 1.5;
}

/* ---------- СЕТКА ---------- */

.feedback-page .feedback-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.feedback-page .feedback-field { margin-bottom: 18px; }
.feedback-page .feedback-grid .feedback-field { margin-bottom: 0; }

/* ---------- ЛЕЙБЛЫ ---------- */

.feedback-page .form-label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    font-size: .92rem;
    line-height: 1.4;
}

.feedback-page .required-mark {
    color: var(--bs-danger);
    font-weight: 700;
}

.feedback-page .form-text {
    margin-top: 6px;
    color: var(--bs-secondary-color);
    font-size: .78rem;
    line-height: 1.4;
}

/* ---------- ПОЛЯ ---------- */

.feedback-page .form-control {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: .65rem .8rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 10px;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    transition: border-color .18s, box-shadow .18s, background-color .18s;
}

.feedback-page .form-control:hover { border-color: var(--bs-primary); }

.feedback-page .form-control:focus {
    border-color: var(--bs-primary);
    outline: 0;
    box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .12);
}

.feedback-page .form-control::placeholder {
    color: var(--bs-secondary-color);
    opacity: .75;
}

.feedback-page textarea.form-control {
    min-height: 175px;
    resize: vertical;
}

/* ---------- SELECT ---------- */

.feedback-page .feedback-recipient select,
.feedback-page .category-select select {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: .65rem .8rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 10px;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    transition: border-color .18s, box-shadow .18s, background-color .18s;
}

.feedback-page .feedback-recipient select:hover,
.feedback-page .category-select select:hover { border-color: var(--bs-primary); }

.feedback-page .feedback-recipient select:focus,
.feedback-page .category-select select:focus {
    outline: 0;
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .12);
}

/* ---------- FIELDSET ---------- */

.feedback-page .feedback-fieldset {
    min-width: 0;
    margin: 0 0 18px;
    padding: 16px;
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    background: var(--bs-tertiary-bg, var(--bs-secondary-bg, #f8f9fa));
}

.feedback-page .feedback-fieldset .form-text { margin-top: 10px; }

/* ---------- ЗАГРУЗКА ФАЙЛОВ ---------- */

.feedback-page .feedback-file-label {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px;
    border: 1px dashed var(--bs-border-color);
    border-radius: 10px;
    cursor: pointer;
    background: var(--bs-body-bg);
    transition: border-color .18s, background-color .18s;
}

.feedback-page .feedback-file-label:hover {
    border-color: var(--bs-primary);
    background: var(--bs-tertiary-bg, var(--bs-secondary-bg, #f8f9fa));
}

.feedback-page .feedback-file-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(var(--bs-primary-rgb), .10);
    color: var(--bs-primary);
    font-size: 19px;
    line-height: 1;
}

.feedback-page .feedback-file-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.feedback-page .feedback-file-text strong { font-size: .9rem; line-height: 1.35; }

.feedback-page .feedback-file-description {
    color: var(--bs-secondary-color);
    font-size: .78rem;
    line-height: 1.35;
}

.feedback-page .feedback-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* ---------- CAPTCHA ---------- */

.feedback-page .feedback-captcha { overflow: hidden; }

.feedback-page .feedback-captcha-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.feedback-page .feedback-captcha-image {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-page .feedback-captcha-input {
    flex: 1 1 auto;
    min-width: 180px;
}

/* ---------- ACTIONS ---------- */

.feedback-page .feedback-actions {
    display: flex;
    align-items: center;
    margin-top: 26px;
}

.feedback-page .feedback-submit {
    min-height: 46px;
    padding: .65rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    transition: transform .15s, box-shadow .15s;
}

.feedback-page .feedback-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
}

.feedback-page .feedback-submit:active { transform: translateY(0); }

/* ---------- ФОКУС ---------- */

.feedback-page :is(.form-control, select, button):focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* ---------- АДАПТИВНОСТЬ ---------- */

@media (max-width: 767.98px) {
    .feedback-page { padding: 1.25rem; border-radius: .9rem; }
    .feedback-page .feedback-header { align-items: center; gap: 12px; margin-bottom: 20px; }
    .feedback-page .feedback-icon { flex-basis: 46px; width: 46px; height: 46px; border-radius: 12px; font-size: 19px; }
    .feedback-page .feedback-title { margin-bottom: 4px; font-size: 1.3rem; line-height: 1.3; }
    .feedback-page .feedback-intro { font-size: .88rem; line-height: 1.45; }
    .feedback-page .feedback-grid { grid-template-columns: 1fr; gap: 0; }
    .feedback-page .feedback-grid .feedback-field { margin-bottom: 18px; }
    .feedback-page .feedback-captcha-row { align-items: stretch; flex-direction: column; }
    .feedback-page .feedback-captcha-input { min-width: 0; }
    .feedback-page .feedback-submit { width: 100%; }
}

@media (max-width: 480px) {
    .feedback-page { padding: 1rem; border-radius: .8rem; }
    .feedback-page .feedback-header { gap: 10px; }
    .feedback-page .feedback-icon { flex-basis: 42px; width: 42px; height: 42px; border-radius: 11px; font-size: 17px; }
    .feedback-page .feedback-title { font-size: 1.2rem; }
    .feedback-page .feedback-intro { font-size: .84rem; }
    .feedback-page .feedback-note { padding: 11px 13px; font-size: .84rem; }
    .feedback-page .feedback-fieldset { padding: 13px; }
}

/* ---------- ТЁМНАЯ ТЕМА ---------- */

[data-bs-theme="dark"] .feedback-page .feedback-file-label { background: var(--bs-body-bg); }
[data-bs-theme="dark"] .feedback-page .feedback-file-label:hover { background: rgba(255, 255, 255, .04); }
[data-bs-theme="dark"] .feedback-page .feedback-note,
[data-bs-theme="dark"] .feedback-page .feedback-fieldset { background: rgba(255, 255, 255, .03); }


/* =========================================================
   PREMIUM STATS DASHBOARD
   ========================================================= */

.stats-page {
    --stats-radius: 16px;
    --stats-border: rgba(0, 0, 0, .07);
    --stats-muted: #6c757d;
    --stats-primary: #0d6efd;
    --stats-success: #198754;
    --stats-warning: #d99b00;
    --stats-info: #079bb7;
    padding-bottom: 2rem;
}

.stats-header { display: flex; align-items: flex-end; justify-content: space-between; }

.stats-eyebrow {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: .45rem;
    color: var(--stats-primary);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.stats-eyebrow i { font-size: .75rem; }
.stats-page .page-title { font-weight: 700; letter-spacing: -.035em; }
.stats-page .text-body-reset { color: var(--stats-muted); }

.stats-page .card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--stats-border);
    border-radius: var(--stats-radius);
    background: var(--bs-body-bg);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .025), 0 5px 18px rgba(0, 0, 0, .025);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.stats-page .card:hover {
    border-color: rgba(13, 110, 253, .12);
    box-shadow: 0 3px 8px rgba(0, 0, 0, .04), 0 12px 32px rgba(0, 0, 0, .055);
}

.stats-period-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    opacity: .8;
}

.stats-period-day::before   { background: var(--stats-primary); }
.stats-period-week::before  { background: var(--stats-success); }
.stats-period-month::before { background: var(--stats-warning); }

.stats-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.15rem;
}

.stats-icon-primary { color: var(--stats-primary); background: rgba(13, 110, 253, .09); }
.stats-icon-success { color: var(--stats-success); background: rgba(25, 135, 84, .09); }
.stats-icon-warning { color: #c58b00; background: rgba(255, 193, 7, .13); }
.stats-icon-info    { color: var(--stats-info);    background: rgba(13, 202, 240, .11); }

.stats-page .card-title { font-weight: 650; letter-spacing: -.015em; }

.stats-list { display: flex; flex-direction: column; }

.stats-list-row {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, .045);
    transition: background-color .15s, padding .15s;
}

.stats-list-row:last-child { border-bottom: 0; }

.stats-list-row:hover {
    margin-left: -.35rem;
    margin-right: -.35rem;
    padding-left: .35rem;
    padding-right: .35rem;
    border-radius: 9px;
    background: rgba(13, 110, 253, .025);
}

.row-icon {
    width: 31px;
    height: 31px;
    margin-right: .65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: .8rem;
}

.row-icon-primary { color: var(--stats-primary); background: rgba(13, 110, 253, .08); }
.row-icon-warning { color: #c58b00; background: rgba(255, 193, 7, .12); }
.row-icon-info    { color: var(--stats-info);    background: rgba(13, 202, 240, .1); }

.stat-value {
    color: var(--bs-emphasis-color, var(--bs-body-color, #212529));
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -.02em;
}

.comments-value {
    color: var(--bs-emphasis-color, var(--bs-body-color, #212529));
    font-size: 2.65rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -.055em;
}

.database-value {
    color: var(--bs-emphasis-color, var(--bs-body-color, #212529));
    font-size: 1.35rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -.025em;
}

.stats-section-title { min-height: 38px; }
.section-line { height: 1px; background: var(--bs-border-color); opacity: .75; }

.main-stats-list { display: flex; flex-direction: column; gap: .15rem; }

.main-stat-row {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .35rem .65rem;
    border-radius: 9px;
    transition: background-color .15s;
}

.main-stat-row:hover { background: rgba(13, 110, 253, .025); }

.comments-total { padding-top: .25rem; }

.comments-button {
    min-height: 40px;
    border-radius: 9px;
    font-weight: 600;
    transition: transform .15s, background-color .15s, border-color .15s;
}

.comments-button:hover { transform: translateY(-1px); }
.comments-button i:last-child { transition: transform .15s; }
.comments-button:hover i:last-child { transform: translateX(3px); }

.stats-database-card { background: linear-gradient(120deg, rgba(13, 110, 253, .035), transparent 55%); }

.stats-topusers-card { overflow: hidden; }
.stats-users-table { --bs-table-bg: transparent; }
.stats-users-table > tbody > tr { transition: background-color .15s; }
.stats-users-table > tbody > tr:hover { background-color: rgba(13, 110, 253, .035); }
.stats-users-table > tbody > tr > td { border-color: rgba(0, 0, 0, .055); }

.stats-users-table a {
    color: var(--bs-emphasis-color, var(--bs-body-color, #212529));
    font-weight: 600;
    text-decoration: none;
    transition: color .15s;
}

.stats-users-table a:hover { color: var(--stats-primary); }

/* ---------- ТЁМНАЯ ТЕМА (stats) ---------- */

[data-bs-theme="dark"] .stats-page {
    --stats-border: rgba(255, 255, 255, .08);
    --stats-muted: #9aa0a6;
}

[data-bs-theme="dark"] .stats-page .card {
    box-shadow: 0 1px 2px rgba(0, 0, 0, .15), 0 7px 22px rgba(0, 0, 0, .14);
}

[data-bs-theme="dark"] .stats-page .card:hover {
    border-color: rgba(255, 255, 255, .12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2), 0 14px 34px rgba(0, 0, 0, .2);
}

[data-bs-theme="dark"] .stats-list-row { border-bottom-color: rgba(255, 255, 255, .06); }

[data-bs-theme="dark"] :is(.stats-list-row, .main-stat-row):hover {
    background: rgba(255, 255, 255, .025);
}

[data-bs-theme="dark"] .stats-database-card {
    background: linear-gradient(120deg, rgba(13, 110, 253, .075), transparent 60%);
}

[data-bs-theme="dark"] .stats-users-table > tbody > tr:hover {
    background-color: rgba(255, 255, 255, .035);
}

[data-bs-theme="dark"] .stats-users-table > tbody > tr > td {
    border-color: rgba(255, 255, 255, .06);
}

/* ---------- АДАПТИВНОСТЬ (stats) ---------- */

@media (max-width: 767.98px) {
    .stats-page { padding-bottom: 1rem; }
    .stats-page .card-body { padding: 1.25rem; }
    .stats-icon { width: 43px; height: 43px; flex-basis: 43px; }
    .comments-value { font-size: 2.25rem; }
}

@media (max-width: 575.98px) {
    .stats-header { align-items: flex-start; }
    .stats-page .page-title { font-size: 1.3rem; }
    .stats-eyebrow { font-size: .62rem; }
    .stats-page .card-title { font-size: .94rem; }
    .stats-page .small.text-body-reset { font-size: .77rem; }
    .stat-value { font-size: .98rem; }
    .comments-value { font-size: 2rem; }
    .database-value { font-size: 1.15rem; }
    .stats-section-title { gap: .7rem; }
}


/* =========================================================
   BLOGZINE ARTICLE PAGE
   ========================================================= */

.blogzine-article-page {
    --news-radius: 1rem;
    --news-radius-sm: .5rem;
    --news-transition: .25s ease;
    --news-shadow-sm: 0 2px 8px rgba(0, 0, 0, .06);
    --news-color-views: #3b82f6;
    --news-color-comments: #8b5cf6;
    --news-color-likes: #22c55e;
    --news-color-dislikes: #ef4444;
    color: var(--bs-body-color);
}

/* ---------- HERO ---------- */

.news-hero {
    position: relative;
    min-height: 420px;
    border: 0;
    border-radius: var(--news-radius);
    background-color: var(--bs-dark);
    overflow: hidden;
    isolation: isolate;
}

.news-hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.news-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.55) 55%, rgba(0,0,0,.88) 100%);
    pointer-events: none;
}

.news-hero .card-img-overlay { z-index: 2; }
.news-hero-content { max-width: 900px; }

.news-hero-title {
    font-size: clamp(1.25rem, 2vw, 2rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.01em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
    margin: 0;
}

.news-hero .text-white-force,
.news-hero .text-white-force :is(a, span, time, i, div, li, ul) {
    color: #fff;
}

.news-hero .text-white-force a:hover { color: rgba(255, 255, 255, .75); }

.news-category,
.news-important {
    display: inline-flex;
    align-items: center;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .02em;
    padding: .45em .85em;
    border-radius: var(--bs-border-radius-pill);
}

.news-category { transition: transform var(--news-transition), box-shadow var(--news-transition); }

.news-category:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), .4);
}

.news-category i { font-size: .5em; }

.news-important {
    background-color: var(--bs-warning);
    color: var(--bs-dark);
    box-shadow: 0 2px 8px rgba(var(--bs-warning-rgb), .4);
}

.news-meta {
    row-gap: .5rem;
    column-gap: 1.25rem;
    font-size: .9rem;
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.news-meta .nav-item { display: inline-flex; align-items: center; }

.news-meta-item {
    display: inline-flex;
    align-items: center;
    color: inherit;
    transition: opacity var(--news-transition);
}

.news-meta-item:hover { opacity: .85; }
.news-meta .avatar-img { border: 2px solid rgba(255, 255, 255, .35); }

/* ---------- ОСНОВНОЙ ТЕКСТ ---------- */

.news .main_text {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--bs-body-color);
}

.news .main_text > * + * { margin-top: 1rem; }

.news .main_text img {
    max-width: 100%;
    height: auto;
    border-radius: var(--news-radius-sm);
}

.news .main_text blockquote {
    border-left: 4px solid var(--bs-primary);
    padding: .75rem 1.25rem;
    margin: 1.5rem 0;
    background: rgba(var(--bs-primary-rgb), .06);
    border-radius: 0 var(--news-radius-sm) var(--news-radius-sm) 0;
    font-style: italic;
}

.news .main_text :is(h2, h3, h4) {
    font-weight: 700;
    margin-top: 2rem;
    color: var(--bs-emphasis-color);
}

.news-edit-note {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    margin-top: 1.5rem;
    padding: 1rem 1.15rem;
    background: rgba(var(--bs-primary-rgb), .06);
    border-left: 4px solid var(--bs-primary);
    border-radius: 0 var(--news-radius-sm) var(--news-radius-sm) 0;
    font-size: .92rem;
    color: var(--bs-body-color);
}

.news-edit-note__icon {
    flex-shrink: 0;
    font-size: 1.15rem;
    color: var(--bs-primary);
    line-height: 1.4;
}

/* ---------- ПАГИНАЦИЯ ---------- */

.news-pages { display: flex; justify-content: center; flex-wrap: wrap; gap: .25rem; }

.news-pages a,
.news-pages > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 .75rem;
    border-radius: var(--news-radius-sm);
    font-weight: 600;
    text-decoration: none;
    color: var(--bs-body-color);
    background: var(--bs-tertiary-bg);
    transition: background var(--news-transition), color var(--news-transition);
}

.news-pages a:hover { background: var(--bs-primary); color: var(--bs-white); }

.news-pages :is(.active, .current) { background: var(--bs-primary); color: var(--bs-white); }

/* ---------- ЗАГОЛОВКИ БЛОКОВ ---------- */

.news-block-title {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--bs-emphasis-color);
}

.news-block-title__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(var(--bs-primary-rgb), .1);
    color: var(--bs-primary);
    font-size: .95rem;
}

.news-block-title__icon--tags { background: rgba(139, 92, 246, .12); color: #8b5cf6; }

/* ---------- ТЕГИ ---------- */

.news-tags__list { display: flex; flex-wrap: wrap; gap: .5rem; }

.news-tags__list a {
    display: inline-flex;
    align-items: center;
    padding: .4em .9em;
    font-size: .85rem;
    font-weight: 500;
    border-radius: var(--bs-border-radius-pill);
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
    text-decoration: none;
    transition: background var(--news-transition), color var(--news-transition), transform var(--news-transition);
}

.news-tags__list a:hover {
    background: var(--bs-primary);
    color: var(--bs-white);
    transform: translateY(-1px);
}

/* ---------- ОПРОС ---------- */

.news-poll {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--news-radius);
    box-shadow: var(--news-shadow-sm);
}

.news-poll__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(var(--bs-primary-rgb), .1);
    color: var(--bs-primary);
    font-size: 1.15rem;
}

.news-poll__content { flex: 1; min-width: 0; }

/* ---------- СТАТИСТИКА ПУБЛИКАЦИИ ---------- */

.news-statistics-wrapper { display: flex; }

.news-statistics {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--news-radius);
    box-shadow: var(--news-shadow-sm);
}

.news-statisticsitems { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }

.news-statisticsitem {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .9rem;
    font-weight: 600;
    color: var(--bs-body-color);
    text-decoration: none;
    transition: opacity var(--news-transition), color var(--news-transition);
}

.news-statisticsitem:hover { color: var(--bs-body-color); opacity: .75; }

.news-statisticslabel {
    font-weight: 400;
    font-size: .85rem;
    color: var(--bs-body-color);
    opacity: .7;
}

.news-color-views    { color: var(--news-color-views); }
.news-color-comments { color: var(--news-color-comments); }
.news-color-likes    { color: var(--news-color-likes); }
.news-color-dislikes { color: var(--news-color-dislikes); }

.article-edit-action { flex-shrink: 0; }

.icon-action-light {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4em .85em;
    font-size: .85rem;
    font-weight: 500;
    border-radius: var(--news-radius-sm);
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
    cursor: pointer;
    transition: background var(--news-transition), color var(--news-transition);
}

.icon-action-light:hover { background: var(--bs-primary); color: var(--bs-white); }

/* ---------- ОЦЕНКА СТАТЬИ ---------- */

.news-rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), .06), rgba(139, 92, 246, .06));
    border: 1px solid var(--bs-border-color);
    border-radius: var(--news-radius);
}

.news-rating__info { display: flex; align-items: center; gap: .9rem; }

.news-rating__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(239, 68, 68, .12);
    color: var(--news-color-dislikes);
    font-size: 1.25rem;
}

.news-rating__title { font-size: 1.05rem; font-weight: 700; margin: 0; color: var(--bs-body-color); }

.news-rating__subtitle { font-size: .88rem; margin: .15rem 0 0; color: var(--bs-body-color); opacity: .7; }

.news-rating__buttons { display: flex; gap: .6rem; }

.news-rating__button {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5em 1.1em;
    font-size: .9rem;
    font-weight: 600;
    border-radius: var(--bs-border-radius-pill);
    cursor: pointer;
    user-select: none;
    border: 0;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
    transition: transform var(--news-transition), background var(--news-transition), color var(--news-transition), box-shadow var(--news-transition);
}

.news-rating__button--like { background: rgba(34, 197, 94, .12); color: #16a34a; }

.news-rating__button--like:hover {
    background: var(--news-color-likes);
    color: var(--bs-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(34, 197, 94, .35);
}

.news-rating__button--dislike { background: rgba(239, 68, 68, .12); color: #dc2626; }

.news-rating__button--dislike:hover {
    background: var(--news-color-dislikes);
    color: var(--bs-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, .35);
}

/* ---------- ПОХОЖИЕ СТАТЬИ ---------- */

.news-related {
    padding: 1.5rem;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--news-radius);
    box-shadow: var(--news-shadow-sm);
}

.news-related__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.news-related__heading { display: flex; align-items: center; gap: .85rem; }

.news-related__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(var(--bs-primary-rgb), .1);
    color: var(--bs-primary);
    font-size: 1.25rem;
}

.news-related__title { font-size: 1.15rem; font-weight: 700; margin: 0; color: var(--bs-body-color); }

.news-related__subtitle { font-size: .88rem; margin: .15rem 0 0; color: var(--bs-body-color); opacity: .7; }

.news-related__label {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35em .85em;
    font-size: .82rem;
    font-weight: 600;
    border-radius: var(--bs-border-radius-pill);
    background: rgba(139, 92, 246, .12);
    color: #8b5cf6;
}

.news-related__content { position: relative; }

/* ---------- КОММЕНТАРИИ / ОБСУЖДЕНИЕ ---------- */

.news-discussion {
    padding: 1.5rem;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--news-radius);
    box-shadow: var(--news-shadow-sm);
}

.news-discussion__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.news-discussion__heading { display: flex; align-items: center; gap: .85rem; }

.news-discussion__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(var(--bs-primary-rgb), .1);
    color: var(--bs-primary);
    font-size: 1.25rem;
}

.news-discussion__title { font-size: 1.15rem; font-weight: 700; margin: 0; color: var(--bs-body-color); }

.news-discussion__subtitle { font-size: .88rem; margin: .15rem 0 0; color: var(--bs-body-color); opacity: .7; }

.news-discussion__counter {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35em .9em;
    font-size: .85rem;
    font-weight: 600;
    border-radius: var(--bs-border-radius-pill);
    background: rgba(var(--bs-primary-rgb), .1);
    color: var(--bs-primary);
}

.news-discussion__comments,
.news-discussion__navigation { margin-bottom: 1rem; }

.news-discussion__form { margin-top: 1rem; }

/* ---------- АДАПТИВНОСТЬ ---------- */

@media (max-width: 767.98px) {
    .news-hero { min-height: 320px; }
    .news-statistics { flex-direction: column; align-items: flex-start; }
    .news-statisticsitems { gap: .85rem; }
    .news-rating { flex-direction: column; align-items: flex-start; }
    .news-related__header,
    .news-discussion__header { flex-direction: column; align-items: flex-start; }
    .news-related,
    .news-discussion,
    .news-poll { padding: 1.1rem; }
}

@media (max-width: 575.98px) {
    .news-hero { min-height: 260px; border-radius: var(--news-radius-sm); }
    .news-statisticsitems { flex-direction: column; align-items: flex-start; gap: .6rem; }
    .news-rating__buttons { width: 100%; }
    .news-rating__button { flex: 1; justify-content: center; }
}

/* ---------- ТЁМНАЯ ТЕМА ---------- */

[data-bs-theme="dark"] :is(.news-statistics, .news-poll, .news-related, .news-discussion) {
    background: transparent;
    border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .blogzine-article-page,
[data-bs-theme="dark"] .blogzine-article-page > :is(.card, article) {
    background: var(--bs-body-bg);
}

[data-bs-theme="dark"] :is(.news-tags__list a, .icon-action-light, .news-pages a, .news-pages > span) {
    background: var(--bs-secondary-bg);
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] :is(.news-tags__list a, .icon-action-light, .news-pages a):hover {
    background: var(--bs-primary);
    color: var(--bs-white);
}

[data-bs-theme="dark"] .news-edit-note { background: rgba(var(--bs-primary-rgb), .12); }

[data-bs-theme="dark"] .news-rating {
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), .1), rgba(139, 92, 246, .1));
}

[data-bs-theme="dark"] .news-hero-overlay {
    background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.7) 55%, rgba(0,0,0,.95) 100%);
}


/* =========================================================
   DLE 21 USERINFO
   ========================================================= */

.userinfo-card {
    --ui-primary: #0d6efd;
    --ui-purple: #6f42c1;
    --ui-green: #198754;
    --ui-red: #dc3545;
    --ui-orange: #fd7e14;
    --ui-yellow: #997404;
    --ui-cyan: #087990;
    --ui-pink: #d63384;
    --ui-muted: #6c757d;
    --ui-border: rgba(0, 0, 0, .08);
    --ui-radius: 18px;
    --ui-box-radius: 16px;
    --ui-control-radius: 10px;

    width: 100%;
    min-width: 0;
    color: var(--bs-body-color);
    background: var(--bs-body-bg);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .05);
    overflow: hidden;
    isolation: isolate;
}

.userinfo-card *,
.userinfo-card *::before,
.userinfo-card *::after { box-sizing: border-box; }

.userinfo-card :is(img, video, iframe, embed, object) { max-width: 100%; }
.userinfo-card img { height: auto; }
.userinfo-card iframe { border: 0; }
.userinfo-card a { text-decoration: none; }
.userinfo-card a:hover { text-decoration: none; }
.userinfo-card :is(button, input, textarea, select) { font: inherit; }
.userinfo-card :is(input, textarea, select) { max-width: 100%; }
.userinfo-card :focus { outline: none; }
.userinfo-card :focus-visible { outline: 2px solid rgba(13, 110, 253, .65); outline-offset: 2px; }

.userinfo-card .icon-blue   { color: var(--ui-primary); }
.userinfo-card .icon-purple { color: var(--ui-purple); }
.userinfo-card .icon-green  { color: var(--ui-green); }
.userinfo-card .icon-red    { color: var(--ui-red); }
.userinfo-card .icon-orange { color: var(--ui-orange); }
.userinfo-card .icon-yellow { color: var(--ui-yellow); }
.userinfo-card .icon-cyan   { color: var(--ui-cyan); }
.userinfo-card .icon-pink   { color: var(--ui-pink); }

/* ---------- PROFILE HEADER ---------- */

.profile-header {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(13, 110, 253, .07), rgba(111, 66, 193, .04));
    border-bottom: 1px solid var(--ui-border);
}

.profile-header-inner { display: flex; align-items: center; gap: 1.5rem; min-width: 0; }
.profile-avatar-wrap { flex: 0 0 auto; }
.profile-main { min-width: 0; flex: 1 1 auto; }
.profile-avatar { position: relative; width: 120px; height: 120px; }

.profile-avatar img {
    display: block;
    width: 120px;
    height: 120px;
    max-width: none;
    object-fit: cover;
    background: var(--bs-tertiary-bg, var(--bs-secondary-bg, #f8f9fa));
    border: 4px solid var(--bs-body-bg);
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .12);
}

.profile-online {
    position: absolute;
    right: 4px;
    bottom: 5px;
    width: 19px;
    height: 19px;
    background: #20c997;
    border: 4px solid var(--bs-body-bg);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(32, 201, 151, .15);
}

.profile-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; min-width: 0; }

.profile-title {
    margin: 0;
    max-width: 100%;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.02em;
    overflow-wrap: anywhere;
}

.profile-group {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: .3rem .65rem;
    color: var(--ui-primary);
    background: rgba(13, 110, 253, .08);
    border: 1px solid rgba(13, 110, 253, .15);
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.profile-status { margin-top: .45rem; }

.status { display: inline-flex; align-items: center; gap: .4rem; color: var(--ui-muted); font-size: .85rem; }

.status-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; }
.status-online .status-dot { background: #20c997; box-shadow: 0 0 0 3px rgba(32, 201, 151, .12); }
.status-offline .status-dot { background: #adb5bd; }

.profile-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }

.profile-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 38px;
    max-width: 100%;
    padding: .5rem .75rem;
    border: 1px solid;
    border-radius: 10px;
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.2;
    overflow-wrap: anywhere;
    transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}

.profile-action i { flex: 0 0 auto; font-size: .9rem; }
.profile-action-primary { color: var(--ui-primary); background: rgba(13, 110, 253, .06); border-color: rgba(13, 110, 253, .18); }
.profile-action-primary:hover { color: #0a58ca; background: rgba(13, 110, 253, .11); border-color: rgba(13, 110, 253, .3); }
.profile-action-danger { color: var(--ui-red); background: rgba(220, 53, 69, .05); border-color: rgba(220, 53, 69, .18); }
.profile-action-danger:hover { color: #b02a37; background: rgba(220, 53, 69, .1); border-color: rgba(220, 53, 69, .3); }
.profile-action-warning { color: var(--ui-yellow); background: rgba(255, 193, 7, .08); border-color: rgba(255, 193, 7, .22); }
.profile-action-warning:hover { color: #795c03; background: rgba(255, 193, 7, .14); border-color: rgba(255, 193, 7, .35); }

.profile-ban {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem 1.1rem;
    color: #842029;
    background: #f8d7da;
    border: 1px solid #f1aeb5;
    border-radius: 14px;
}

.profile-ban-icon { flex: 0 0 auto; color: var(--ui-red); font-size: 1.5rem; line-height: 1; }
.profile-ban-content { min-width: 0; flex: 1 1 auto; }
.profile-ban-title { font-weight: 700; }
.profile-ban-text { margin-top: .25rem; font-size: .9rem; line-height: 1.5; overflow-wrap: anywhere; }
.profile-ban-date { display: flex; align-items: center; gap: .35rem; margin-top: .5rem; font-size: .8rem; opacity: .8; }

/* ---------- PROFILE CONTENT ---------- */

.profile-content { min-width: 0; padding: 2rem; }
.profile-content > * + * { margin-top: 1.5rem; }

.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }

.profile-box {
    min-width: 0;
    padding: 1.35rem;
    background: var(--bs-body-bg);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-box-radius);
}

.profile-box-header { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.25rem; min-width: 0; }
.profile-box-heading { min-width: 0; flex: 1 1 auto; }

.profile-box-header h2 { margin: 0; font-size: 1.05rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }

.profile-box-header p {
    margin: .15rem 0 0;
    color: var(--ui-muted);
    font-size: .8rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.profile-box-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    font-size: 1.1rem;
}

.profile-box-icon-blue   { color: var(--ui-primary); background: rgba(13, 110, 253, .1); }
.profile-box-icon-green  { color: var(--ui-green);   background: rgba(25, 135, 84, .1); }
.profile-box-icon-cyan   { color: #0dcaf0;           background: rgba(13, 202, 240, .1); }
.profile-box-icon-orange { color: var(--ui-orange);  background: rgba(253, 126, 20, .1); }

.profile-info-list { display: flex; flex-direction: column; }

.profile-info-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
    padding: .85rem 0;
    border-bottom: 1px solid var(--ui-border);
}

.profile-info-item:first-child { padding-top: 0; }
.profile-info-item:last-child { padding-bottom: 0; border-bottom: 0; }

.profile-info-label { display: flex; align-items: center; gap: .55rem; min-width: 0; color: var(--ui-muted); font-size: .9rem; }
.profile-info-label i { width: 20px; flex: 0 0 20px; text-align: center; font-size: .95rem; }

.profile-info-value {
    max-width: 60%;
    min-width: 0;
    text-align: right;
    font-size: .9rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.profile-muted { color: var(--ui-muted); font-weight: 400; }

.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }

.stat-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
    min-height: 76px;
    padding: .8rem;
    background: var(--bs-tertiary-bg, var(--bs-secondary-bg, #f8f9fa));
    border: 1px solid var(--ui-border);
    border-radius: 13px;
    transition: transform .15s, box-shadow .15s;
}

.stat-card-wide { grid-column: 1 / -1; }

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 11px;
    font-size: 1rem;
}

.stat-icon-blue   { color: var(--ui-primary); background: rgba(13, 110, 253, .1); }
.stat-icon-purple { color: var(--ui-purple);  background: rgba(111, 66, 193, .1); }
.stat-icon-yellow { color: var(--ui-yellow);  background: rgba(255, 193, 7, .14); }
.stat-icon-red    { color: var(--ui-red);     background: rgba(220, 53, 69, .1); }
.stat-icon-cyan   { color: var(--ui-cyan);    background: rgba(13, 202, 240, .13); }

.stat-content { min-width: 0; flex: 1 1 auto; }

.stat-value { font-size: 1.05rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.stat-value-rating { font-size: .82rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.stat-label { margin-top: .15rem; color: var(--ui-muted); font-size: .76rem; line-height: 1.25; overflow-wrap: anywhere; }

/* ---------- ABOUT / SIGNATURE ---------- */

.profile-about { padding: 1.5rem; }

.profile-text { min-width: 0; line-height: 1.75; overflow-wrap: anywhere; }
.profile-text > :first-child { margin-top: 0; }
.profile-text > :last-child { margin-bottom: 0; }

.profile-text img {
    display: inline-block;
    width: auto;
    max-width: 100%;
    height: auto;
}

.profile-text iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    border: 0;
}

.profile-text :is(video, embed, object) { display: block; max-width: 100%; }
.profile-text a { color: var(--bs-primary); overflow-wrap: anywhere; }
.profile-text :is(ul, ol) { padding-left: 1.5rem; }

.profile-text blockquote {
    margin: 1rem 0;
    padding: .75rem 1rem;
    background: var(--bs-tertiary-bg, var(--bs-secondary-bg, #f8f9fa));
    border-left: 4px solid var(--bs-primary);
    border-radius: 0 8px 8px 0;
}

.profile-text pre {
    max-width: 100%;
    padding: 1rem;
    overflow-x: auto;
    background: var(--bs-tertiary-bg, var(--bs-secondary-bg, #f8f9fa));
    border-radius: 10px;
}

.profile-text code { overflow-wrap: anywhere; }

.profile-text table {
    display: block;
    width: max-content;
    min-width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.profile-text :is(th, td) { padding: .5rem; border: 1px solid var(--ui-border); }

/* ---------- PROFILE SETTINGS ---------- */

.profile-settings { min-width: 0; }
.profile-settings .accordion { --bs-accordion-border-width: 0; }

.profile-settings .accordion-item {
    overflow: hidden;
    border: 1px solid var(--ui-border);
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, .04);
}

.profile-settings .accordion-button {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: 1.1rem 1.25rem;
    color: var(--bs-body-color);
    background: var(--bs-body-bg);
    box-shadow: none;
    font-size: .95rem;
}

.profile-settings .accordion-button:not(.collapsed) {
    color: var(--bs-body-color);
    background: var(--bs-tertiary-bg, var(--bs-secondary-bg, #f8f9fa));
    box-shadow: none;
}

.profile-settings .accordion-button:focus-visible {
    outline: 2px solid rgba(13, 110, 253, .65);
    outline-offset: -2px;
    box-shadow: none;
}

.settings-button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    color: var(--ui-primary);
    background: rgba(13, 110, 253, .1);
    border-radius: 11px;
}

.settings-button-text { display: flex; flex-direction: column; min-width: 0; text-align: left; }
.settings-button-text strong { font-weight: 700; line-height: 1.3; }

.profile-settings .accordion-button small {
    display: block;
    margin-top: .15rem;
    color: var(--ui-muted);
    font-size: .75rem;
    font-weight: 400;
    line-height: 1.3;
}

.profile-settings .accordion-body { min-width: 0; padding: 1.5rem; }

.settings-section {
    min-width: 0;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--ui-border);
}

.settings-section:first-child { padding-top: 0; }
.settings-section:last-child { border-bottom: 0; }

.settings-title {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1.2rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.settings-title-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 9px;
    font-size: .9rem;
}

.settings-icon-blue   { color: var(--ui-primary); background: rgba(13, 110, 253, .1); }
.settings-icon-yellow { color: var(--ui-yellow);  background: rgba(255, 193, 7, .13); }
.settings-icon-green  { color: var(--ui-green);   background: rgba(25, 135, 84, .1); }
.settings-icon-purple { color: var(--ui-purple);  background: rgba(111, 66, 193, .1); }
.settings-icon-cyan   { color: var(--ui-cyan);    background: rgba(13, 202, 240, .12); }
.settings-icon-orange { color: var(--ui-orange);  background: rgba(253, 126, 20, .11); }

.settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

.settings-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-field { min-width: 0; }
.form-field-full { grid-column: 1 / -1; }

.profile-settings .form-label {
    display: block;
    margin-bottom: .45rem;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.35;
}

.profile-settings :is(.form-control, .form-select) {
    width: 100%;
    max-width: 100%;
    min-height: 42px;
    border-radius: var(--ui-control-radius);
}

.profile-settings textarea.form-control { min-height: auto; resize: vertical; }

.profile-settings :is(.form-control, .form-select):focus {
    border-color: rgba(13, 110, 253, .55);
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .1);
}

.profile-settings :is(.form-control, .form-select):focus-visible { outline: 0; }

.profile-settings .form-text,
.form-help { margin-top: .4rem; color: var(--ui-muted); font-size: .78rem; line-height: 1.4; }

.required-mark { color: var(--ui-red); }

.profile-settings .form-check { display: flex; align-items: center; gap: .5rem; min-height: 24px; }
.profile-settings .form-check-input { margin-top: 0; }
.profile-settings .form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .1); }
.profile-settings .form-check-label { cursor: pointer; }

#timezone { width: 100%; min-width: 0; }

#timezone select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 42px;
    padding: .375rem .75rem;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--ui-control-radius);
}

#timezone select:focus {
    border-color: rgba(13, 110, 253, .55);
    outline: 0;
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .1);
}

:is(.generated-content, .profile-generated-field, .profile-social-generated, .twofactor-wrapper, .ignore-list-wrapper) {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

:is(.generated-content, .twofactor-wrapper, .ignore-list-wrapper) img {
    display: block;
    max-width: 100%;
    height: auto;
}

.twofactor-wrapper { width: 100%; }
.twofactor-wrapper > * { max-width: 100%; }
.twofactor-wrapper :is(input, select, textarea) { max-width: 100%; }

.twofactor-wrapper table {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.ignore-list-wrapper { width: 100%; }
.ignore-list-wrapper a { overflow-wrap: anywhere; }

.ignore-list-wrapper table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
}

.ignore-list-wrapper :is(th, td) { padding: .5rem; border: 1px solid var(--ui-border); }

.user_fields { width: 100%; min-width: 0; }

.user_fields label {
    display: block;
    margin-bottom: .45rem;
    font-size: .875rem;
    font-weight: 600;
}

.user_fields :is(input[type="text"], input[type="email"], input[type="number"], input[type="url"], input[type="date"], input[type="tel"], input[type="password"], input[type="file"], select, textarea) {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 42px;
    padding: .375rem .75rem;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--ui-control-radius);
}

.user_fields textarea { resize: vertical; }

.user_fields :is(input, select, textarea):focus {
    border-color: rgba(13, 110, 253, .55);
    outline: 0;
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .1);
}

/* ---------- SOCIAL BUTTONS ---------- */

.social-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }

.social-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 40px;
    max-width: 100%;
    padding: .55rem .8rem;
    color: #fff;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.2;
    transition: transform .15s, opacity .15s, box-shadow .15s;
}

.social-button i { flex: 0 0 auto; font-size: .95rem; }
.social-button:hover { color: #fff; }
.social-button:focus-visible { outline: 2px solid rgba(13, 110, 253, .65); outline-offset: 2px; }

.social-vk       { background: #0077ff; }
.social-yandex   { background: #fc3f1d; }
.social-ok       { background: #ee8208; }
.social-mail     { background: #168de2; }
.social-google   { color: #3c4043; background: #fff; border-color: var(--ui-border); }
.social-google:hover { color: #3c4043; }
.social-facebook { background: #1877f2; }
.social-telegram { background: #229ed9; }

.telegram-action { margin-left: auto; }

.telegram-action a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.profile-social-generated { width: 100%; margin-top: 1rem; }
.profile-social-generated a { overflow-wrap: anywhere; }

/* ---------- SUBSCRIPTIONS ---------- */

.subscription-list { display: flex; flex-direction: column; gap: .6rem; }

.subscription-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
    padding: .75rem;
    background: var(--bs-tertiary-bg, var(--bs-secondary-bg, #f8f9fa));
    border: 1px solid var(--ui-border);
    border-radius: 11px;
}

.subscription-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 9px;
}

.subscription-content { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
.subscription-content a { overflow-wrap: anywhere; }
.subscription-blue   { color: var(--ui-primary); background: rgba(13, 110, 253, .1); }
.subscription-purple { color: var(--ui-purple);  background: rgba(111, 66, 193, .1); }
.subscription-red    { color: var(--ui-red);     background: rgba(220, 53, 69, .1); }

/* ---------- SETTINGS ACTIONS ---------- */

.settings-actions { display: flex; flex-wrap: wrap; gap: .65rem; padding-top: 1.5rem; }

.settings-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 44px;
    border-radius: 10px;
}

.settings-actions .btn i { flex: 0 0 auto; font-size: .95rem; }
.settings-save { min-width: 190px; }
.settings-delete { cursor: pointer; }

/* ---------- ХОВЕРЫ ---------- */

@media (hover: hover) and (pointer: fine) {
    .profile-action:hover { transform: translateY(-1px); }
    .stat-card:hover { transform: translateY(-2px); box-shadow: 0 7px 20px rgba(0, 0, 0, .06); }
    .social-button:hover { transform: translateY(-1px); opacity: .9; }
}

/* ---------- ТЁМНАЯ ТЕМА (userinfo) ---------- */

[data-bs-theme="dark"] .userinfo-card {
    --ui-muted: #adb5bd;
    --ui-border: rgba(255, 255, 255, .1);
    --ui-yellow: #ffc107;
    --ui-orange: #ff922b;
    --ui-cyan: #22d3ee;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .2);
}

[data-bs-theme="dark"] .profile-header {
    background: linear-gradient(135deg, rgba(13, 110, 253, .12), rgba(111, 66, 193, .08));
}

[data-bs-theme="dark"] .profile-avatar img { box-shadow: 0 8px 25px rgba(0, 0, 0, .3); }

[data-bs-theme="dark"] .profile-ban {
    color: #f8d7da;
    background: rgba(220, 53, 69, .12);
    border-color: rgba(220, 53, 69, .25);
}

[data-bs-theme="dark"] .social-google {
    color: #f8f9fa;
    background: var(--bs-tertiary-bg, var(--bs-secondary-bg, #f8f9fa));
    border-color: var(--ui-border);
}

[data-bs-theme="dark"] .social-google:hover { color: #f8f9fa; }

@media (hover: hover) and (pointer: fine) {
    [data-bs-theme="dark"] .stat-card:hover { box-shadow: 0 7px 20px rgba(0, 0, 0, .2); }
}

/* ---------- АДАПТИВНОСТЬ (userinfo) ---------- */

@media (max-width: 1199.98px) { .profile-content { padding: 1.5rem; } }

@media (max-width: 991.98px) {
    .profile-header { padding: 1.5rem; }
    .profile-grid { grid-template-columns: 1fr; }
    .settings-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
    .profile-header { padding: 1.25rem; }
    .profile-header-inner { align-items: flex-start; gap: 1rem; }
    .profile-content { padding: 1.25rem; }
    .profile-box { padding: 1rem; }
    .profile-about { padding: 1rem; }
    .profile-avatar,
    .profile-avatar img { width: 92px; height: 92px; }
    .profile-online { right: 2px; bottom: 3px; width: 16px; height: 16px; border-width: 3px; }
    .profile-title { font-size: 1.3rem; }
    .profile-info-item { align-items: flex-start; flex-direction: column; gap: .3rem; }
    .profile-info-value { max-width: 100%; padding-left: 1.55rem; text-align: left; }
    .profile-settings .accordion-body { padding: 1rem; }
    .settings-section { padding: 1.25rem 0; }
    .settings-grid-2,
    .settings-grid-3 { grid-template-columns: 1fr; }
    .subscription-item { align-items: flex-start; }
    .profile-text iframe { min-height: 220px; }
}

@media (max-width: 575.98px) {
    .profile-header-inner { flex-direction: column; align-items: center; text-align: center; }
    .profile-avatar { margin: 0 auto; }
    .profile-title-row,
    .profile-status,
    .profile-actions { justify-content: center; }
    .profile-main { width: 100%; }
    .profile-ban { text-align: left; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card-wide { grid-column: auto; }
    .stat-card { min-height: 68px; padding: .65rem; }
    .stat-icon { width: 34px; height: 34px; flex-basis: 34px; }
    .stat-label { font-size: .7rem; }
    .stat-value-rating { font-size: .7rem; line-height: 1.2; }
    .settings-actions .btn { width: 100%; }
    .settings-save { min-width: 0; }
    .social-button span:not(.telegram-action) { display: none; }
    .social-button { width: 42px; height: 42px; padding: 0; }
    .social-telegram { width: auto; padding: .55rem .8rem; }
    .social-telegram > span:not(.telegram-action) { display: inline; }
    .telegram-action { display: inline; }
    .profile-box-header { align-items: flex-start; }
    .profile-action { flex: 1 1 auto; }
}

@media (max-width: 380px) {
    .profile-header { padding: 1rem; }
    .profile-content { padding: .75rem; }
    .profile-box { padding: .85rem; }
    .profile-box-icon { width: 38px; height: 38px; flex-basis: 38px; }
    .stat-card { gap: .5rem; }
    .stat-icon { width: 31px; height: 31px; flex-basis: 31px; font-size: .85rem; }
    .settings-actions { gap: .5rem; }
    .profile-actions { width: 100%; }
    .profile-action { max-width: 100%; }
    .profile-title { font-size: 1.15rem; }
    .profile-group { font-size: .7rem; }
}


/* =========================================================
   BTN-PRIMARY-SOFT (единое определение)
   ========================================================= */

.btn-primary-soft {
    display: inline-block;
    padding: .5rem 1rem;
    color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), .1);
    border: 1px solid transparent;
    border-radius: var(--bs-border-radius);
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    transition: color .15s, background-color .15s, border-color .15s, box-shadow .15s;
}

.btn-primary-soft:hover,
.btn-primary-soft:focus,
.btn-primary-soft:focus-visible,
.btn-primary-soft:active {
    color: #fff;
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    text-decoration: none;
}

.btn-primary-soft:focus,
.btn-primary-soft:focus-visible {
    box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25);
}

.btn-primary-soft i { color: inherit; }


/* =========================================================
   PM — ЛИЧНЫЕ СООБЩЕНИЯ
   ========================================================= */

.pm {
    position: relative;
    padding: 1.5rem;
    border-radius: 1rem;
    background: var(--bs-tertiary-bg, var(--bs-secondary-bg, #f8f9fa));
    color: var(--bs-body-color);
}

.pm-header { display: flex; align-items: center; gap: .75rem; margin: 0 0 1.5rem; padding: 0; background: transparent; }

.pm-title {
    margin: 0 0 .2rem;
    padding: 0;
    color: var(--bs-heading-color, var(--bs-body-color));
    font-size: 1.35rem;
    line-height: 1.3;
    font-weight: 600;
}

.pm-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), .12);
    font-size: 1.05rem;
}

.pm-header-content { min-width: 0; }
.pm .mt-3 { font-size: .9rem; color: var(--bs-secondary-color); }

.pmlist { display: flex; flex-direction: column; gap: .5rem; }

.pm .contact-form { border-top: 1px solid var(--bs-border-color); }

.pm :is(.contact-form .h5, .border.rounded-3 .h5) {
    color: var(--bs-heading-color, var(--bs-body-color));
    font-weight: 600;
}

.pm .main_comment {
    padding: 1rem 1.15rem;
    margin-bottom: .75rem;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    font-size: .95rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.pm .main_comment img { max-width: 100%; height: auto; border-radius: 8px; }

.pm .main_comment blockquote {
    border-left: 4px solid var(--bs-primary);
    padding: .6rem 1rem;
    margin: 1rem 0;
    background: rgba(var(--bs-primary-rgb), .06);
    border-radius: 0 8px 8px 0;
}

.pm .avatar-md { width: 44px; height: 44px; flex-shrink: 0; object-fit: cover; }

.pm .form-label {
    display: block;
    margin-bottom: .45rem;
    font-size: .875rem;
    font-weight: 600;
    color: var(--bs-body-color);
}

.pm .form-control {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: .5rem .75rem;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
    transition: border-color .18s, box-shadow .18s;
}

.pm .form-control:hover { border-color: rgba(var(--bs-primary-rgb), .5); }

.pm .form-control:focus {
    border-color: var(--bs-primary);
    outline: 0;
    box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .15);
}

.pm .form-control::placeholder { color: var(--bs-secondary-color); opacity: .75; }

@media (max-width: 767.98px) {
    .pm { padding: 1rem; border-radius: .875rem; }
    .pm-header { align-items: flex-start; margin-bottom: 1.25rem; }
    .pm-icon { width: 38px; height: 38px; min-width: 38px; }
    .pm-title { font-size: 1.2rem; }
    .pm .main_comment { padding: .85rem 1rem; }
}

@media (max-width: 480px) {
    .pm { padding: .85rem; }
    .pm-title { font-size: 1.1rem; }
    .pm-icon { width: 36px; height: 36px; min-width: 36px; }
}


/* =========================================================
   ADDNEWS — DLE 21
   ========================================================= */

.addnews-page {
    --an-primary: #0d6efd;
    --an-primary-hover: #0b5ed7;
    --an-primary-soft: rgba(13, 110, 253, .10);
    --an-text: #212529;
    --an-muted: #6c757d;
    --an-bg: #ffffff;
    --an-bg-soft: #f8f9fa;
    --an-input-bg: #ffffff;
    --an-border: #dee2e6;
    --an-border-hover: #adb5bd;
    --an-danger: #dc3545;
    --an-shadow: 0 5px 20px rgba(0, 0, 0, .05);
    --an-radius: 12px;

    width: 100%;
    max-width: 1050px;
    margin: 30px auto;
    padding: 0 15px;
    color: var(--an-text);
    font-family: inherit;
}

.addnews-page *,
.addnews-page *::before,
.addnews-page *::after { box-sizing: border-box; }

[data-bs-theme="dark"] .addnews-page {
    --an-primary: #5b9cff;
    --an-primary-hover: #78adff;
    --an-primary-soft: rgba(91, 156, 255, .14);
    --an-text: #f1f3f5;
    --an-muted: #adb5bd;
    --an-bg: #20252b;
    --an-bg-soft: #292f36;
    --an-input-bg: #181d22;
    --an-border: #3b434d;
    --an-border-hover: #59636e;
    --an-danger: #ff6b6b;
    --an-shadow: 0 7px 28px rgba(0, 0, 0, .25);
}

.addnews-header {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    margin: 0 0 28px;
    padding: 22px;
    color: var(--an-text);
    background: var(--an-bg);
    border: 1px solid var(--an-border);
    border-radius: var(--an-radius);
    box-shadow: var(--an-shadow);
}

.addnews-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    color: var(--an-primary);
    background: var(--an-primary-soft);
    border-radius: 13px;
    font-size: 22px;
}

.addnews-header-content { min-width: 0; }

.addnews-title { margin: 0 0 5px; color: var(--an-text); font-size: 23px; font-weight: 700; line-height: 1.3; }

.addnews-intro { margin: 0; color: var(--an-muted); font-size: 14px; line-height: 1.55; }

.addnews-field { width: 100%; margin: 0 0 22px; }

.addnews-label {
    display: block;
    margin: 0 0 8px;
    color: var(--an-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

.addnews-required { margin-left: 3px; color: var(--an-danger); font-weight: 700; }

.addnews-page .addnews-control {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    color: var(--an-text);
    background: var(--an-input-bg);
    border: 1px solid var(--an-border);
    border-radius: 9px;
    outline: none;
    box-shadow: none;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    appearance: none;
    transition: color .2s, background-color .2s, border-color .2s, box-shadow .2s;
}

.addnews-page textarea.addnews-control { min-height: 125px; resize: vertical; }
.addnews-page .addnews-control::placeholder { color: var(--an-muted); opacity: .75; }
.addnews-page .addnews-control:hover { border-color: var(--an-border-hover); }

.addnews-page .addnews-control:focus {
    color: var(--an-text);
    background: var(--an-input-bg);
    border-color: var(--an-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--an-primary-soft);
}

.addnews-help { margin-top: 7px; color: var(--an-muted); font-size: 13px; line-height: 1.5; }

.addnews-category select {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    color: var(--an-text);
    background-color: var(--an-input-bg);
    border: 1px solid var(--an-border);
    border-radius: 9px;
    outline: none;
    font-family: inherit;
    font-size: 15px;
    cursor: pointer;
    color-scheme: light;
    transition: border-color .2s, box-shadow .2s;
}

[data-bs-theme="dark"] .addnews-category select { color-scheme: dark; }
.addnews-category select:hover { border-color: var(--an-border-hover); }
.addnews-category select:focus { border-color: var(--an-primary); box-shadow: 0 0 0 3px var(--an-primary-soft); }

.addnews-panel {
    display: block;
    width: 100%;
    margin: 0 0 22px;
    overflow: hidden;
    color: var(--an-text);
    background: var(--an-bg);
    border: 1px solid var(--an-border);
    border-radius: var(--an-radius);
}

.addnews-panel[open] { border-color: var(--an-primary); box-shadow: var(--an-shadow); }

.addnews-panel > summary {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 55px;
    padding: 11px 16px;
    color: var(--an-text);
    background: var(--an-bg);
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background-color .2s;
}

.addnews-panel > summary::-webkit-details-marker { display: none; }
.addnews-panel > summary:hover { background: var(--an-bg-soft); }

.addnews-panel-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    color: var(--an-primary);
    background: var(--an-primary-soft);
    border-radius: 8px;
    font-size: 14px;
}

.addnews-panel-title { flex: 1; color: var(--an-text); font-size: 14px; font-weight: 600; }

.addnews-panel-arrow { color: var(--an-muted); font-size: 13px; transition: transform .2s; }
.addnews-panel[open] .addnews-panel-arrow { transform: rotate(180deg); }

.addnews-panel-body {
    padding: 20px;
    color: var(--an-text);
    background: var(--an-bg-soft);
    border-top: 1px solid var(--an-border);
}

.addnews-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    color: var(--an-text);
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.addnews-checkbox input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.addnews-checkbox-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    color: #fff;
    background: var(--an-input-bg);
    border: 1px solid var(--an-border-hover);
    border-radius: 5px;
    font-size: 12px;
}

.addnews-checkbox-custom i { display: none; }
.addnews-checkbox input:checked + .addnews-checkbox-custom { background: var(--an-primary); border-color: var(--an-primary); }
.addnews-checkbox input:checked + .addnews-checkbox-custom i { display: block; }

.addnews-editor { width: 100%; color: var(--an-text); }

.addnews-editor textarea {
    width: 100%;
    color: var(--an-text);
    background: var(--an-input-bg);
    border-color: var(--an-border);
}

.addnews-editor :is(.dle-editor, .wysiwyg) {
    color: var(--an-text);
    background: var(--an-input-bg);
    border-color: var(--an-border);
}

.addnews-xfields { width: 100%; margin-bottom: 22px; color: var(--an-text); }
.addnews-xfields label { color: var(--an-text); }

.addnews-xfields :is(input, textarea, select) {
    max-width: 100%;
    color: var(--an-text);
    background: var(--an-input-bg);
    border-color: var(--an-border);
}

.addnews-admin {
    width: 100%;
    margin: 0 0 22px;
    padding: 16px 18px;
    color: var(--an-text);
    background: var(--an-bg-soft);
    border: 1px solid var(--an-border);
    border-radius: var(--an-radius);
}

.addnews-admin label { color: var(--an-text); }
.addnews-admin input { accent-color: var(--an-primary); }

.addnews-security {
    width: 100%;
    margin: 0 0 22px;
    padding: 18px;
    color: var(--an-text);
    background: var(--an-bg-soft);
    border: 1px solid var(--an-border);
    border-radius: var(--an-radius);
}

.addnews-security-title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 15px;
    padding: 0 6px;
    color: var(--an-text);
    font-size: 14px;
    font-weight: 600;
}

.addnews-security-title i { color: var(--an-primary); }

.addnews-recaptcha { max-width: 100%; overflow-x: auto; }

.addnews-captcha {
    display: grid;
    grid-template-columns: minmax(130px, auto) minmax(200px, 1fr);
    align-items: center;
    gap: 12px;
}

.addnews-captcha-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 7px 10px;
    color: var(--an-text);
    background: var(--an-input-bg);
    border: 1px solid var(--an-border);
    border-radius: 9px;
    overflow: hidden;
}

.addnews-captcha-image img { display: block; max-width: 100%; height: auto; }

.addnews-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    margin-top: 28px;
}

.addnews-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 48px;
    padding: 11px 18px;
    border-radius: 9px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    outline: none;
    transition: transform .15s, background-color .2s, border-color .2s, box-shadow .2s;
}

.addnews-button:hover { transform: translateY(-1px); }
.addnews-button:active { transform: translateY(0); }

.addnews-button-primary { color: #fff; background: var(--an-primary); border: 1px solid var(--an-primary); }
.addnews-button-primary:hover {
    color: #fff;
    background: var(--an-primary-hover);
    border-color: var(--an-primary-hover);
    box-shadow: 0 6px 18px rgba(13, 110, 253, .20);
}

.addnews-button-secondary { color: var(--an-text); background: var(--an-bg); border: 1px solid var(--an-border); }
.addnews-button-secondary:hover {
    color: var(--an-text);
    background: var(--an-bg-soft);
    border-color: var(--an-border-hover);
}

.addnews-required-note { margin-top: 14px; color: var(--an-muted); font-size: 13px; line-height: 1.5; }

.addnews-page :is(input, textarea):-webkit-autofill,
.addnews-page :is(input, textarea):-webkit-autofill:hover,
.addnews-page :is(input, textarea):-webkit-autofill:focus {
    -webkit-text-fill-color: var(--an-text);
    box-shadow: 0 0 0 1000px var(--an-input-bg) inset;
}

@media (max-width: 767px) {
    .addnews-page { margin-top: 20px; margin-bottom: 20px; padding-left: 14px; padding-right: 14px; }
    .addnews-header { align-items: flex-start; gap: 13px; margin-bottom: 22px; padding: 17px; }
    .addnews-header-icon { width: 45px; height: 45px; flex-basis: 45px; font-size: 19px; border-radius: 11px; }
    .addnews-title { font-size: 20px; }
    .addnews-intro { font-size: 13px; }
    .addnews-panel-body { padding: 16px; }
    .addnews-captcha { grid-template-columns: 1fr; }
    .addnews-captcha-image { justify-content: flex-start; width: fit-content; }
    .addnews-actions { grid-template-columns: 1fr; gap: 10px; margin-top: 22px; }
}

@media (max-width: 480px) {
    .addnews-page { margin-top: 15px; margin-bottom: 15px; padding-left: 10px; padding-right: 10px; }
    .addnews-header { padding: 15px; border-radius: 10px; }
    .addnews-header-icon { width: 40px; height: 40px; flex-basis: 40px; font-size: 17px; }
    .addnews-title { font-size: 18px; }
    .addnews-intro { font-size: 12px; }
    .addnews-page .addnews-control { min-height: 44px; font-size: 14px; }
    .addnews-page textarea.addnews-control { min-height: 110px; }
    .addnews-panel > summary { min-height: 50px; padding: 10px 13px; font-size: 13px; }
    .addnews-panel-icon { width: 28px; height: 28px; flex-basis: 28px; }
    .addnews-security { padding: 15px; }
    .addnews-button { min-height: 46px; padding-left: 14px; padding-right: 14px; }
}


/* =========================================================
   PASSWORD RECOVERY
   ========================================================= */

.password-recovery {
    position: relative;
    padding: 1.5rem;
    border-radius: 1rem;
    background: var(--bs-tertiary-bg, var(--bs-secondary-bg, #f8f9fa));
    color: var(--bs-body-color);
}

.password-header { display: flex; align-items: center; gap: .75rem; margin: 0 0 1.5rem; padding: 0; background: transparent; }

.password-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), .12);
    font-size: 1.05rem;
}

.password-header-content { min-width: 0; }

.password-title {
    margin: 0 0 .2rem;
    padding: 0;
    color: var(--bs-heading-color, var(--bs-body-color));
    font-size: 1.35rem;
    line-height: 1.3;
    font-weight: 600;
}

.password-intro { margin: 0; padding: 0; color: var(--bs-secondary-color); font-size: .9rem; line-height: 1.45; }

.password-field { margin-bottom: 1.5rem; }

.password-recovery .form-label { display: block; margin-bottom: .4rem; color: var(--bs-body-color); font-weight: 500; }

.password-recovery .form-control { border-radius: .6rem; }

.password-recovery .form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .15);
}

.password-recovery .form-text { margin-top: .4rem; color: var(--bs-secondary-color); line-height: 1.4; }

.password-fieldset { min-width: 0; padding: 0; margin: 0 0 1.5rem; border: 0; }

.password-captcha { display: flex; align-items: stretch; gap: .75rem; flex-wrap: wrap; }

.password-captcha-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 176px;
    height: 88px;
    min-width: 176px;
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
    border-radius: .625rem;
    background: var(--bs-secondary-bg);
}

.password-captcha-image img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.password-captcha-input { width: 180px; min-width: 0; }

.password-captcha-input .form-control { width: 100%; height: 88px; min-height: 88px; }

.password-recaptcha { overflow: hidden; }

.password-actions { display: flex; justify-content: flex-start; margin-top: .25rem; }

.password-submit { min-height: 44px; padding: .6rem 1.25rem; border-radius: .6rem; }

@media (max-width: 767.98px) {
    .password-recovery { padding: 1rem; border-radius: .875rem; }
    .password-header { align-items: flex-start; margin-bottom: 1.25rem; }
    .password-icon { width: 38px; height: 38px; min-width: 38px; }
    .password-title { font-size: 1.2rem; }
    .password-intro { font-size: .85rem; }
    .password-captcha { width: 100%; }
    .password-captcha-image { width: 140px; height: 70px; min-width: 140px; }
    .password-captcha-input { flex: 1 1 130px; width: auto; }
    .password-captcha-input .form-control { height: 70px; min-height: 70px; }
    .password-actions { display: block; }
    .password-submit { width: 100%; }
}

@media (max-width: 380px) {
    .password-recovery { padding: .85rem; }
    .password-header { gap: .6rem; }
    .password-icon { width: 36px; height: 36px; min-width: 36px; }
    .password-title { font-size: 1.1rem; }
    .password-captcha { flex-direction: column; }
    .password-captcha-image { width: 176px; height: 88px; min-width: 176px; }
    .password-captcha-input { width: 100%; }
    .password-captcha-input .form-control { height: 48px; min-height: 48px; }
}


/* =========================================================
   REGISTRATION — DASHBOARD CARD
   ========================================================= */

.dashboard-card {
    background: var(--bs-tertiary-bg, var(--bs-secondary-bg, #f8f9fa));
    border-radius: 20px;
    padding: 1.5rem;
    border: 0;
    box-shadow: 0 .125rem .5rem rgba(0, 0, 0, .06);
}

.title-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(13, 110, 253, .12);
    color: #0d6efd;
    font-size: 1.1rem;
}

.feedback-fieldset { min-width: 0; padding: 0; margin: 1rem 0 1.5rem; border: 0; }

.feedback-captcha-row { display: flex; align-items: stretch; gap: .75rem; flex-wrap: wrap; }

.feedback-captcha-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 176px;
    height: 88px;
    min-width: 176px;
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
    border-radius: .625rem;
    background: var(--bs-secondary-bg);
}

.feedback-captcha-image img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.feedback-captcha-input { width: 158px; min-width: 0; }
.feedback-captcha-input .form-control { height: 88px; min-height: 88px; }

.xfields-wrapper { width: 100%; }
.xfields-wrapper table { width: 100%; margin: 0; }

.text-reset { color: inherit; text-decoration: none; }

.required-mark { color: var(--bs-danger); font-weight: 700; }

.dashboard-card .form-label {
    display: block;
    margin-bottom: .4rem;
    font-size: .9rem;
    font-weight: 500;
    color: var(--bs-body-color);
}

.dashboard-card .form-control { border-radius: .5rem; }

.dashboard-card .form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .15);
}

.dashboard-card .form-text {
    margin-top: .35rem;
    color: var(--bs-secondary-color);
    font-size: .8rem;
    line-height: 1.4;
}

.dashboard-card .input-group .btn { white-space: nowrap; }

#password-strength { min-height: 1.2em; }
#password-strength.text-success { color: var(--bs-success); }
#password-strength.text-warning { color: var(--bs-warning); }
#password-strength.text-danger  { color: var(--bs-danger); }

@media (max-width: 767.98px) {
    .dashboard-card { padding: 1rem; border-radius: 14px; }
    .title-icon { width: 38px; height: 38px; min-width: 38px; border-radius: 12px; font-size: 1rem; }
    .feedback-captcha-row { width: 100%; }
    .feedback-captcha-image { width: 140px; height: 70px; min-width: 140px; }
    .feedback-captcha-input { flex: 1 1 130px; width: auto; }
    .feedback-captcha-input .form-control { height: 70px; min-height: 70px; }
}

@media (max-width: 380px) {
    .dashboard-card { padding: .85rem; }
    .feedback-captcha-row { flex-direction: column; }
    .feedback-captcha-image { width: 176px; height: 88px; min-width: 176px; }
    .feedback-captcha-input { width: 100%; }
    .feedback-captcha-input .form-control { height: 48px; min-height: 48px; }
    .dashboard-card .input-group .btn { padding-left: .65rem; padding-right: .65rem; font-size: .85rem; }
}


/* =========================================================
   BLOG CATEGORY ITEMS
   categorymenu.tpl: .row.g-2 > .bcat-item (16 штук)
   ========================================================= */

.bcat-item { transition: filter .2s ease, transform .2s ease; }

.bcat-item:nth-of-type(1)  { background-color: rgba(255,193,7,.15); }
.bcat-item:nth-of-type(1) .bcat-name  { color: #ffc107; }
.bcat-item:nth-of-type(1) .bcat-count { background-color: #ffc107; color: #212529; }

.bcat-item:nth-of-type(2)  { background-color: rgba(13,202,240,.10); }
.bcat-item:nth-of-type(2) .bcat-name  { color: #0dcaf0; }
.bcat-item:nth-of-type(2) .bcat-count { background-color: #0dcaf0; color: #fff; }

.bcat-item:nth-of-type(3)  { background-color: rgba(220,53,69,.10); }
.bcat-item:nth-of-type(3) .bcat-name  { color: #dc3545; }
.bcat-item:nth-of-type(3) .bcat-count { background-color: #dc3545; color: #fff; }

.bcat-item:nth-of-type(4)  { background-color: rgba(13,110,253,.10); }
.bcat-item:nth-of-type(4) .bcat-name  { color: #0d6efd; }
.bcat-item:nth-of-type(4) .bcat-count { background-color: #0d6efd; color: #fff; }

.bcat-item:nth-of-type(5)  { background-color: rgba(25,135,84,.10); }
.bcat-item:nth-of-type(5) .bcat-name  { color: #198754; }
.bcat-item:nth-of-type(5) .bcat-count { background-color: #198754; color: #fff; }

.bcat-item:nth-of-type(6)  { background-color: rgba(111,66,193,.10); }
.bcat-item:nth-of-type(6) .bcat-name  { color: #6f42c1; }
.bcat-item:nth-of-type(6) .bcat-count { background-color: #6f42c1; color: #fff; }

.bcat-item:nth-of-type(7)  { background-color: rgba(214,51,132,.10); }
.bcat-item:nth-of-type(7) .bcat-name  { color: #d63384; }
.bcat-item:nth-of-type(7) .bcat-count { background-color: #d63384; color: #fff; }

.bcat-item:nth-of-type(8)  { background-color: rgba(32,201,151,.10); }
.bcat-item:nth-of-type(8) .bcat-name  { color: #20c997; }
.bcat-item:nth-of-type(8) .bcat-count { background-color: #20c997; color: #fff; }

.bcat-item:nth-of-type(9)  { background-color: rgba(102,16,242,.10); }
.bcat-item:nth-of-type(9) .bcat-name  { color: #6610f2; }
.bcat-item:nth-of-type(9) .bcat-count { background-color: #6610f2; color: #fff; }

.bcat-item:nth-of-type(10) { background-color: rgba(253,126,20,.10); }
.bcat-item:nth-of-type(10) .bcat-name  { color: #fd7e14; }
.bcat-item:nth-of-type(10) .bcat-count { background-color: #fd7e14; color: #fff; }

.bcat-item:nth-of-type(11) { background-color: rgba(108,117,125,.10); }
.bcat-item:nth-of-type(11) .bcat-name  { color: #6c757d; }
.bcat-item:nth-of-type(11) .bcat-count { background-color: #6c757d; color: #fff; }

.bcat-item:nth-of-type(12) { background-color: rgba(0,123,255,.10); }
.bcat-item:nth-of-type(12) .bcat-name  { color: #007bff; }
.bcat-item:nth-of-type(12) .bcat-count { background-color: #007bff; color: #fff; }

.bcat-item:nth-of-type(13) { background-color: rgba(232,62,140,.10); }
.bcat-item:nth-of-type(13) .bcat-name  { color: #e83e8c; }
.bcat-item:nth-of-type(13) .bcat-count { background-color: #e83e8c; color: #fff; }

.bcat-item:nth-of-type(14) { background-color: rgba(32,40,56,.10); }
.bcat-item:nth-of-type(14) .bcat-name  { color: #202838; }
.bcat-item:nth-of-type(14) .bcat-count { background-color: #202838; color: #fff; }

.bcat-item:nth-of-type(15) { background-color: rgba(0,204,153,.10); }
.bcat-item:nth-of-type(15) .bcat-name  { color: #00cc99; }
.bcat-item:nth-of-type(15) .bcat-count { background-color: #00cc99; color: #212529; }

.bcat-item:nth-of-type(16) { background-color: rgba(255,87,34,.10); }
.bcat-item:nth-of-type(16) .bcat-name  { color: #ff5722; }
.bcat-item:nth-of-type(16) .bcat-count { background-color: #ff5722; color: #fff; }

.bcat-item:hover { filter: brightness(.97); transform: translateX(2px); }

.bcat-count { min-width: 32px; text-align: center; }

[data-bs-theme="dark"] .bcat-item:nth-of-type(11) .bcat-name { color: #adb5bd; }
[data-bs-theme="dark"] .bcat-item:nth-of-type(14) .bcat-name { color: #a5b4d4; }
[data-bs-theme="dark"] .bcat-item:nth-of-type(14) .bcat-count { background-color: #a5b4d4; color: #111; }


/* =========================================================
   SEARCH — ПОИСК ПО САЙТУ
   ========================================================= */

.search-page-bg { width: 100%; padding: 0; max-width: 100%; overflow: hidden; }

.search-page {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    border-radius: 1rem;
    background: var(--bs-tertiary-bg, var(--bs-secondary-bg, #f8f9fa));
    color: var(--bs-body-color);
    overflow: hidden;
}

.search-page .search-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; min-width: 0; }

.search-page .search-icon {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--bs-primary);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .10);
}

.search-page .search-icon i { display: block; font-size: inherit; line-height: 1; }

.search-page .search-header-content { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; }

.search-page .search-title { margin: 0 0 5px; font-size: 1.5rem; font-weight: 700; line-height: 1.3; }

.search-page .search-intro { margin: 0; color: var(--bs-secondary-color); font-size: 1rem; line-height: 1.5; }

.search-page .search-simple { width: 100%; max-width: 100%; min-width: 0; overflow: hidden; }

.search-page .search-simple-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.search-page .search-simple-field { flex: 1 1 100%; min-width: 0; max-width: 100%; display: block; }

.search-page .search-simple-field :is(input[type="text"], input[type="search"]) {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: .65rem .8rem;
    font-size: 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 10px;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    outline: 0;
    background-image: none;
    transition: border-color .18s, box-shadow .18s, background-color .18s;
}

.search-page .search-simple-field input:hover { border-color: var(--bs-primary); }

.search-page .search-simple-field input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .12);
}

.search-page .search-simple-field input::placeholder { color: var(--bs-secondary-color); opacity: .75; }

.search-page .search-simple-row > .search-btn { flex: 0 0 auto; min-width: 0; max-width: 100%; }

.search-page .search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: .65rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    max-width: 100%;
    transition: transform .15s, box-shadow .15s, filter .15s,
                background-color .18s, border-color .18s, color .18s;
}

.search-page .search-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, .12); }
.search-page .search-btn:active { transform: translateY(0); }

.search-page .search-btn--primary { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.search-page .search-btn--primary:hover { background: var(--bs-primary); border-color: var(--bs-primary); filter: brightness(.92); color: #fff; }

.search-page .search-btn--ghost { background: transparent; border-color: var(--bs-border-color); color: var(--bs-body-color); }
.search-page .search-btn--ghost:hover { background: var(--bs-tertiary-bg, var(--bs-secondary-bg, #f8f9fa)); border-color: var(--bs-primary); }

.search-page .search-btn--soft { background: var(--bs-warning); border-color: var(--bs-warning); color: #000; }
.search-page .search-btn--soft:hover { background: var(--bs-warning); border-color: var(--bs-warning); filter: brightness(.94); color: #000; }

.search-page .search-btn--dark { background: var(--bs-secondary); border-color: var(--bs-secondary); color: #fff; }
.search-page .search-btn--dark:hover { background: var(--bs-secondary); border-color: var(--bs-secondary); filter: brightness(.9); color: #fff; }

.search-page .search-advanced { display: block; margin-top: 6px; }

.search-page .search-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }

.search-page .search-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.search-page .search-block {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    background: var(--bs-tertiary-bg, var(--bs-secondary-bg, #f8f9fa));
}

.search-page .search-block-title {
    margin: 0 0 14px;
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: .2px;
    text-transform: uppercase;
    color: var(--bs-primary);
}

.search-page .search-field { margin-bottom: 14px; }
.search-page .search-field:last-child { margin-bottom: 0; }

.search-page .search-label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    font-size: .92rem;
    line-height: 1.4;
    color: var(--bs-body-color);
}

.search-page .search-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.search-page .search-hint { font-size: .78rem; line-height: 1.4; color: var(--bs-secondary-color); }

.search-page .search-advanced :is(input[type="text"], input[type="search"], input[type="password"], input[type="number"], input[type="date"], textarea) {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: .65rem .8rem;
    font-size: 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 10px;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    outline: 0;
    background-image: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .18s, box-shadow .18s, background-color .18s;
}

.search-page .search-advanced textarea { min-height: 120px; resize: vertical; }

.search-page .search-advanced :is(input, textarea):hover { border-color: var(--bs-primary); }

.search-page .search-advanced :is(input, textarea):focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .12);
}

.search-page .search-advanced :is(input, textarea)::placeholder { color: var(--bs-secondary-color); opacity: .75; }

.search-page .search-advanced select:not([multiple]) {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: .65rem 2.25rem .65rem .8rem;
    font-size: 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 10px;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    outline: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236c757d' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right .8rem center;
    background-size: 14px 10px;
    transition: border-color .18s, box-shadow .18s, background-color .18s;
}

.search-page .search-advanced select:not([multiple]):hover { border-color: var(--bs-primary); }
.search-page .search-advanced select:not([multiple]):focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .12);
}
.search-page .search-advanced select:not([multiple]) option { background: var(--bs-body-bg); color: var(--bs-body-color); }

.search-page .search-advanced :is(select[multiple], select[size]:not([size="1"])) {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    max-height: none;
    min-height: 46px;
    padding: .5rem .6rem;
    font-size: 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 10px;
    background-color: var(--bs-body-bg);
    background-image: none;
    background-repeat: no-repeat;
    color: var(--bs-body-color);
    outline: 0;
    cursor: pointer;
    overflow: auto;
    -webkit-appearance: none;
    appearance: none;
    scrollbar-width: thin;
    scrollbar-color: var(--bs-border-color) transparent;
    transition: border-color .18s, box-shadow .18s, background-color .18s;
}

.search-page .search-advanced :is(select[multiple], select[size]:not([size="1"])):hover { border-color: var(--bs-primary); }
.search-page .search-advanced :is(select[multiple], select[size]:not([size="1"])):focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .12);
}

.search-page .search-advanced :is(select[multiple], select[size]:not([size="1"]))::-webkit-scrollbar { width: 6px; height: 6px; }
.search-page .search-advanced :is(select[multiple], select[size]:not([size="1"]))::-webkit-scrollbar-thumb { background: var(--bs-border-color); border-radius: 3px; }
.search-page .search-advanced :is(select[multiple], select[size]:not([size="1"]))::-webkit-scrollbar-track { background: transparent; }

.search-page .search-advanced :is(select[multiple], select[size]:not([size="1"])) option { padding: 4px 6px; background: var(--bs-body-bg); color: var(--bs-body-color); }
.search-page .search-advanced :is(select[multiple], select[size]:not([size="1"])) option:checked { background: var(--bs-primary); color: #fff; }

/* ---------- DLE MULTI-SELECT ---------- */

.search-page .dle-multi-container {
    position: relative;
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--bs-border-color);
    border-radius: 10px;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    padding: 4px 6px;
    cursor: text;
    transition: border-color .18s, box-shadow .18s, background-color .18s;
}

.search-page .dle-multi-container:hover { border-color: var(--bs-primary); }
.search-page .dle-multi-container.dle-multi-active,
.search-page .dle-multi-container:focus-within {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .12);
}

.search-page .dle-multi-choices {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    min-height: 36px;
}

.search-page .dle-multi-choices > li { display: inline-flex; align-items: center; margin: 0; padding: 0; min-height: 32px; }

.search-page .dle-multi-choices .search-choice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: .85rem;
    line-height: 1.2;
    border-radius: 999px;
    background: var(--bs-primary);
    color: #fff;
    border: 0;
    margin: 0;
}

.search-page .dle-multi-choices .search-choice .search-choice-close {
    display: inline-block;
    width: 12px;
    height: 12px;
    cursor: pointer;
    position: relative;
    opacity: .85;
}

.search-page .dle-multi-choices .search-choice .search-choice-close::before,
.search-page .dle-multi-choices .search-choice .search-choice-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 1.5px;
    background: currentColor;
    transform-origin: center;
}

.search-page .dle-multi-choices .search-choice .search-choice-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.search-page .dle-multi-choices .search-choice .search-choice-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.search-page .dle-multi-choices .search-choice .search-choice-close:hover { opacity: 1; }

.search-page :is(.dle-multi-search-input, .dle-multi-choices input.default) {
    flex: 1 1 100px;
    width: auto;
    min-width: 80px;
    height: 34px;
    padding: 0 8px;
    margin: 0;
    font-size: .95rem;
    border: 0;
    outline: 0;
    box-shadow: none;
    background: transparent;
    color: var(--bs-body-color);
}

.search-page .dle-multi-search-input::placeholder { color: var(--bs-secondary-color); opacity: .75; }

.search-page .dle-multi-drop {
    position: absolute;
    z-index: 1050;
    top: 100%;
    left: 0;
    right: 0;
    width: auto;
    min-width: 100%;
    margin-top: 4px;
    padding: 4px;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
    display: none;
}

.search-page .dle-multi-container.dle-multi-active .dle-multi-drop,
.search-page .dle-multi-container:focus-within .dle-multi-drop { display: block; }

.search-page .dle-multi-results {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 320px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--bs-border-color) transparent;
}

.search-page .dle-multi-results::-webkit-scrollbar { width: 6px; }
.search-page .dle-multi-results::-webkit-scrollbar-thumb { background: var(--bs-border-color); border-radius: 3px; }
.search-page .dle-multi-results::-webkit-scrollbar-track { background: transparent; }

.search-page .dle-multi-results > li {
    padding: 0;
    margin: 0;
    list-style: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color .12s, color .12s;
}

.search-page .dle-multi-results .dle-multi-results-item {
    padding: 8px 12px;
    font-size: .95rem;
    line-height: 1.3;
    color: var(--bs-body-color);
    border-radius: 8px;
}

.search-page .dle-multi-results > li:hover,
.search-page .dle-multi-results > li.highlighted { background: var(--bs-tertiary-bg, var(--bs-secondary-bg, #f8f9fa)); }

.search-page .dle-multi-results > li.active-result.result-selected,
.search-page .dle-multi-results > li.result-selected {
    background: var(--bs-primary);
    color: #fff;
}

.search-page .dle-multi-results > li.result-selected .dle-multi-results-item { color: #fff; }

.search-page .dle-multi-results > li.no-results {
    padding: 8px 12px;
    color: var(--bs-secondary-color);
    font-style: italic;
    cursor: default;
}

/* ---------- ЧЕКБОКСЫ И РАДИО ---------- */

.search-page .search-advanced :is(input[type="checkbox"], input[type="radio"]) {
    margin-right: 6px;
    vertical-align: middle;
    accent-color: var(--bs-primary);
}

.search-page .search-advanced label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 14px;
    margin-bottom: 6px;
    font-size: .95rem;
    color: var(--bs-body-color);
    cursor: pointer;
}

.search-page .search-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--bs-border-color);
    min-width: 0;
}

.search-alert {
    margin-top: 18px;
    padding: 12px 15px;
    border: 1px solid var(--bs-border-color);
    border-left: 4px solid var(--bs-warning, #f59e0b);
    border-radius: 10px;
    background: var(--bs-tertiary-bg, var(--bs-secondary-bg, #f8f9fa));
    color: var(--bs-secondary-color);
    font-size: .9rem;
    line-height: 1.5;
}

.search-page :is(input, select, button):focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; }

@media (max-width: 767.98px) {
    .search-page { padding: 1.25rem; border-radius: .9rem; }
    .search-page .search-header { gap: 12px; margin-bottom: 20px; }
    .search-page .search-icon { flex-basis: 46px; width: 46px; height: 46px; border-radius: 12px; font-size: 19px; }
    .search-page .search-title { margin-bottom: 4px; font-size: 1.3rem; line-height: 1.3; }
    .search-page .search-intro { font-size: .88rem; line-height: 1.45; }
    .search-page .search-grid { grid-template-columns: 1fr; gap: 18px; }
    .search-page .search-actions .search-btn { flex: 1 1 100%; }
}

@media (max-width: 480px) {
    .search-page { padding: 1rem; border-radius: .8rem; }
    .search-page .search-header { gap: 10px; }
    .search-page .search-icon { flex-basis: 42px; width: 42px; height: 42px; border-radius: 11px; font-size: 17px; }
    .search-page .search-title { font-size: 1.2rem; }
    .search-page .search-intro { font-size: .84rem; }
    .search-page .search-block { padding: 13px; }
}

[data-bs-theme="dark"] .search-page .search-block { background: rgba(255, 255, 255, .025); }
[data-bs-theme="dark"] .search-page .search-alert { background: rgba(255, 255, 255, .03); }

/* =========================================================
   RECENT POST / НОВИНКИ — sidebar widget
   Стиль близкий к оригинальному Blogzine (webestica)
   ========================================================= */

.blogzine-recent-post {
    padding: 0;
    border: 0;
    background: transparent;
}

.blogzine-recent-post .row {
    --bs-gutter-x: .75rem;
    --bs-gutter-y: .75rem;
}

/* Картинка */
.blogzine-recent-image {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: .5rem;
    aspect-ratio: 4 / 3;
    background: var(--bs-tertiary-bg, #f7f8f9);
}

.blogzine-recent-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.blogzine-recent-post:hover .blogzine-recent-image img {
    transform: scale(1.06);
}

/* Заголовок */
.blogzine-recent-title {
    font-size: .9375rem;
    line-height: 1.35;
    font-weight: 700;
    margin: 0 0 .35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blogzine-recent-title a {
    color: var(--bs-gray-800, #191a1f);
    text-decoration: none;
    transition: color .2s ease;
}

.blogzine-recent-title a:hover {
    color: var(--bs-primary, #2163e8);
}

/* Дата */
.blogzine-recent-date {
    color: var(--bs-gray-500, #a1a1a8);
    font-size: .8125rem;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}

.blogzine-recent-date i {
    font-size: .85em;
    opacity: .8;
}

/* Мобильная адаптация */
@media (max-width: 575.98px) {
    .blogzine-recent-title {
        font-size: .875rem;
        -webkit-line-clamp: 3;
    }

    .blogzine-recent-date {
        font-size: .75rem;
    }
}

/* Тёмная тема */
[data-bs-theme="dark"] .blogzine-recent-title a {
    color: var(--bs-gray-100, #f7f8f9);
}

[data-bs-theme="dark"] .blogzine-recent-image {
    background: var(--bs-gray-800, #191a1f);
}
















/* =========================================================
   DLE 21 — БЫСТРОЕ РЕДАКТИРОВАНИЕ (Quick Edit)
   Работает с jQuery UI Dialog: .ui-dialog.dle-popup-quickedit
   ========================================================= */

/* ---------- ОВЕРЛЕЙ (затемнение фона) ---------- */

#modal-overlay {
    opacity: .55 !important;
    transition: opacity .25s ease !important;
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
}

/* ---------- КОРНЕВОЙ ДИАЛОГ ---------- */

.ui-dialog.dle-popup-quickedit {
    width: auto !important;
    max-width: min(1024px, calc(100vw - 2rem)) !important;
    height: auto !important;
    max-height: calc(100vh - 2rem) !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, .45) !important;
    z-index: 1000 !important;
}

/* ---------- ЗАГОЛОВОК ОКНА ---------- */

.ui-dialog.dle-popup-quickedit > .ui-dialog-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: auto;
    padding: 16px 20px !important;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 0 !important;
    cursor: default;
    font-size: .95rem;
    font-weight: 600;
}

.ui-dialog.dle-popup-quickedit > .ui-dialog-titlebar .ui-dialog-title {
    float: none;
    margin: 0;
    max-width: 100%;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}

.ui-dialog.dle-popup-quickedit > .ui-dialog-titlebar .ui-dialog-titlebar-close {
    position: static;
    top: auto;
    right: auto;
    width: 32px;
    height: 32px;
    margin: 0 !important;
    padding: 0;
    background: rgba(255, 255, 255, .1) !important;
    border: 0 !important;
    border-radius: 8px !important;
    color: #fff !important;
    opacity: .8;
    cursor: pointer;
    transition: background .15s ease, opacity .15s ease;
}

.ui-dialog.dle-popup-quickedit > .ui-dialog-titlebar .ui-dialog-titlebar-close:hover {
    background: rgba(255, 255, 255, .2) !important;
    opacity: 1;
}

.ui-dialog.dle-popup-quickedit > .ui-dialog-titlebar .ui-dialog-titlebar-close .ui-icon {
    display: none;
}

.ui-dialog.dle-popup-quickedit > .ui-dialog-titlebar .ui-dialog-titlebar-close::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    transform: translate(-50%, -50%);
    background:
        linear-gradient(currentColor, currentColor) center/14px 1.5px no-repeat,
        linear-gradient(currentColor, currentColor) center/1.5px 14px no-repeat;
    border-radius: 2px;
}

/* ---------- ТЕЛО ОКНА (скроллится) ---------- */

.ui-dialog.dle-popup-quickedit > .ui-dialog-content,
#dlepopup-news-edit.dlepopupnewsedit {
    width: auto !important;
    height: auto !important;
    max-height: calc(100vh - 12rem) !important;
    padding: 20px 22px !important;
    overflow-y: auto !important;
    background: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #212529);
    font-size: .9375rem;
    line-height: 1.55;
}

/* ---------- ФУТЕР С КНОПКАМИ ---------- */

.ui-dialog.dle-popup-quickedit > .ui-dialog-buttonpane {
    margin: 0 !important;
    padding: 12px 20px !important;
    background: var(--bs-tertiary-bg, #f8f9fa) !important;
    border-top: 1px solid var(--bs-border-color, #e5e7eb) !important;
}

.ui-dialog.dle-popup-quickedit > .ui-dialog-buttonpane .ui-dialog-buttonset {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    float: none;
}

.ui-dialog.dle-popup-quickedit > .ui-dialog-buttonpane button {
    min-height: 40px;
    padding: .5rem 1.1rem !important;
    margin: 0 !important;
    background: var(--bs-primary, #0d6efd) !important;
    color: #fff !important;
    border: 1px solid var(--bs-primary, #0d6efd) !important;
    border-radius: 10px !important;
    font-weight: 600;
    font-size: .9rem;
    line-height: 1.2;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.ui-dialog.dle-popup-quickedit > .ui-dialog-buttonpane button:hover {
    transform: translateY(-1px);
    filter: brightness(.94);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .15);
}

/* «Отмена» — мягкая, серая */
.ui-dialog.dle-popup-quickedit > .ui-dialog-buttonpane button:first-child {
    background: var(--bs-secondary-bg, #e5e7eb) !important;
    color: var(--bs-body-color, #111827) !important;
    border-color: var(--bs-border-color, #d1d5db) !important;
}

.ui-dialog.dle-popup-quickedit > .ui-dialog-buttonpane button:first-child:hover {
    background: var(--bs-tertiary-bg, #f8f9fa) !important;
    filter: brightness(1);
}

/* ---------- СТРОКИ ПОЛЕЙ (.xfieldsrow) ---------- */

.dlepopupnewsedit .xfieldsrow {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    font-size: .9rem;
}

.dlepopupnewsedit .xfieldscolleft {
    flex: 0 0 170px;
    max-width: 170px;
    padding-top: .45rem;
    color: var(--bs-gray-600, #595d69);
    font-weight: 500;
}

.dlepopupnewsedit .xfieldscolright {
    flex: 1 1 auto;
    min-width: 0;
}

/* Строки, где label идёт отдельной строкой (например «Краткая новость:») */
.dlepopupnewsedit .xfieldsrow > b {
    display: block;
    flex: 1 1 100%;
    margin-bottom: .4rem;
    font-weight: 600;
    color: var(--bs-gray-700, #29292e);
}

/* ---------- ПОЛЯ ВВОДА ---------- */

.dlepopupnewsedit input[type="text"],
.dlepopupnewsedit input[type="email"],
.dlepopupnewsedit input[type="password"],
.dlepopupnewsedit input[type="number"],
.dlepopupnewsedit select,
.dlepopupnewsedit textarea,
.dlepopupnewsedit .quick-edit-text {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: .5rem .75rem;
    font-size: .9375rem;
    line-height: 1.4;
    color: var(--bs-gray-800, #191a1f);
    background: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 10px;
    outline: 0;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.dlepopupnewsedit input[type="text"]:hover,
.dlepopupnewsedit select:hover,
.dlepopupnewsedit textarea:hover {
    border-color: var(--bs-primary, #0d6efd);
}

.dlepopupnewsedit input[type="text"]:focus,
.dlepopupnewsedit select:focus,
.dlepopupnewsedit textarea:focus,
.dlepopupnewsedit .quick-edit-text:focus {
    border-color: var(--bs-primary, #0d6efd);
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .15);
}

.dlepopupnewsedit textarea,
.dlepopupnewsedit textarea.quick-edit-textarea {
    min-height: 100px;
    resize: vertical;
}

/* Мультиселект «Категория» */
.dlepopupnewsedit select[multiple] {
    min-height: 160px;
    padding: .35rem;
    cursor: pointer;
}

.dlepopupnewsedit select[multiple] option {
    padding: .3rem .5rem;
    border-radius: 6px;
}

.dlepopupnewsedit select[multiple] option:checked {
    background: var(--bs-primary, #0d6efd) linear-gradient(0deg, var(--bs-primary, #0d6efd) 0%, var(--bs-primary, #0d6efd) 100%);
    color: #fff;
}

/* ---------- ЧЕКБОКС «Опубликовать на сайте» ---------- */

.dlepopupnewsedit .form-check-label {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
    font-size: .9rem;
}

.dlepopupnewsedit .form-check-input {
    width: 1.1em;
    height: 1.1em;
    margin: 0;
    cursor: pointer;
}

/* ---------- РЕДАКТОР TINYMCE ---------- */

.dlepopupnewsedit .wseditor {
    width: 100%;
    border-top: none;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--bs-border-color, #dee2e6);
}

.dlepopupnewsedit .tox.tox-tinymce {
    border-radius: 10px;
}

.dlepopupnewsedit .tox .tox-toolbar-overlord,
.dlepopupnewsedit .tox .tox-toolbar__primary {
    background-color: var(--bs-tertiary-bg, #f7f7f7);
}

.dlepopupnewsedit .tox .tox-edit-area {
    border-radius: 0 0 10px 10px;
}

.dlepopupnewsedit .tox .tox-edit-area__iframe {
    background: var(--bs-body-bg, #fff);
}

/* ---------- ЗАГРУЗКА ИЗОБРАЖЕНИЯ (Постер) ---------- */

.dlepopupnewsedit #xfupload_poster .qq-upload-button,
.dlepopupnewsedit .qq-upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: .5rem 1rem !important;
    width: auto !important;
    color: #fff;
    background: var(--bs-primary, #0d6efd);
    border: 1px solid var(--bs-primary, #0d6efd);
    border-radius: 10px;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s ease, filter .15s ease;
}

.dlepopupnewsedit .qq-upload-button:hover {
    transform: translateY(-1px);
    filter: brightness(.94);
}

.dlepopupnewsedit .qq-upload-button[disabled] {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

/* Подсказки под полями */
.dlepopupnewsedit .xfieldsnote {
    margin-top: .35rem;
    color: var(--bs-gray-500, #a1a1a8);
    font-size: .8rem;
    line-height: 1.4;
}

/* Прогресс загрузки файлов */
.dlepopupnewsedit .progress {
    height: 6px;
    margin-top: 6px;
    background: var(--bs-tertiary-bg, #e5e7eb);
    border-radius: 6px;
    overflow: hidden;
}

.dlepopupnewsedit .progress-bar {
    height: 100%;
    background: var(--bs-primary, #0d6efd);
    transition: width .2s ease;
}

/* ---------- АДАПТИВНОСТЬ ---------- */

@media (max-width: 767.98px) {
    .ui-dialog.dle-popup-quickedit {
        max-width: calc(100vw - 1rem) !important;
        max-height: calc(100vh - 1rem) !important;
        left: .5rem !important;
        right: .5rem !important;
        top: .5rem !important;
    }

    .ui-dialog.dle-popup-quickedit > .ui-dialog-content,
    #dlepopup-news-edit.dlepopupnewsedit {
        padding: 16px !important;
        max-height: calc(100vh - 10rem) !important;
    }

    .dlepopupnewsedit .xfieldsrow {
        flex-direction: column;
        gap: 6px;
    }

    .dlepopupnewsedit .xfieldscolleft {
        flex-basis: auto;
        max-width: 100%;
        padding-top: 0;
        font-weight: 600;
    }
}

/* ---------- ТЁМНАЯ ТЕМА ---------- */

[data-bs-theme="dark"] .ui-dialog.dle-popup-quickedit > .ui-dialog-content,
[data-bs-theme="dark"] #dlepopup-news-edit.dlepopupnewsedit {
    background: var(--bs-body-bg, #191a1f);
    color: var(--bs-body-color, #dee2e6);
}

[data-bs-theme="dark"] .ui-dialog.dle-popup-quickedit > .ui-dialog-buttonpane {
    background: var(--bs-secondary-bg, #343a40) !important;
    border-top-color: var(--bs-border-color, #495057) !important;
}

[data-bs-theme="dark"] .ui-dialog.dle-popup-quickedit > .ui-dialog-buttonpane button:first-child {
    background: var(--bs-tertiary-bg, #2b3035) !important;
    color: var(--bs-body-color, #dee2e6) !important;
    border-color: var(--bs-border-color, #495057) !important;
}

[data-bs-theme="dark"] .dlepopupnewsedit input[type="text"],
[data-bs-theme="dark"] .dlepopupnewsedit input[type="email"],
[data-bs-theme="dark"] .dlepopupnewsedit input[type="password"],
[data-bs-theme="dark"] .dlepopupnewsedit input[type="number"],
[data-bs-theme="dark"] .dlepopupnewsedit select,
[data-bs-theme="dark"] .dlepopupnewsedit textarea {
    color: var(--bs-body-color, #dee2e6);
    background: var(--bs-body-bg, #191a1f);
    border-color: var(--bs-border-color, #495057);
}

[data-bs-theme="dark"] .dlepopupnewsedit .xfieldscolleft,
[data-bs-theme="dark"] .dlepopupnewsedit .xfieldsrow > b {
    color: var(--bs-gray-300, #dfe0e5);
}

[data-bs-theme="dark"] .dlepopupnewsedit .xfieldsnote {
    color: var(--bs-gray-500, #a1a1a8);
}

[data-bs-theme="dark"] .dlepopupnewsedit .wseditor,
[data-bs-theme="dark"] .dlepopupnewsedit .tox.tox-tinymce {
    border-color: var(--bs-border-color, #495057);
}

[data-bs-theme="dark"] .dlepopupnewsedit .tox .tox-toolbar-overlord,
[data-bs-theme="dark"] .dlepopupnewsedit .tox .tox-toolbar__primary {
    background-color: var(--bs-secondary-bg, #343a40);
}

[data-bs-theme="dark"] .dlepopupnewsedit .tox .tox-edit-area__iframe {
    background: var(--bs-body-bg, #191a1f);
}

























