/*
 * Проект: ВайбКод
 * Файл: assets/css/style.css
 * Автор: Beck Sarbassov
 * Версия: 1.2.0
 * Дата выпуска: 2026-06-16
 * Последнее обновление: 2026-06-21
 * Авторские права: © Beck Sarbassov. Все права защищены.
 *
 * EN: Main responsive stylesheet for the lighter forum UI and interactive states.
 * RU: Основной адаптивный файл стилей для светлого интерфейса форума и интерактивных состояний.
 */

:root {
    --bg:          #f4f7fb;
    --bg-2:        #ffffff;
    --surface:     rgba(255, 255, 255, 0.82);
    --surface-2:   rgba(245, 249, 255, 0.94);
    --border:      rgba(70, 91, 126, 0.16);
    --border-hi:   rgba(37, 99, 235, 0.34);
    --text:        #162033;
    --text-dim:    #53627a;
    --text-faint:  #7d8aa0;

    --violet:      #6d5dfc;
    --cyan:        #0284c7;
    --pink:        #d9468f;
    --green:       #059669;
    --amber:       #b7791f;

    --grad-brand:  linear-gradient(135deg, #5b5be8 0%, #0891b2 100%);
    --grad-pink:   linear-gradient(135deg, #d9468f 0%, #6d5dfc 100%);

    --radius:      8px;
    --radius-sm:   8px;
    --shadow:      0 18px 42px -28px rgba(32, 45, 72, 0.34);
    --shadow-glow: 0 0 0 1px var(--border-hi), 0 20px 54px -28px rgba(37, 99, 235, 0.28);

    --font:        'Sora', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --mono:        'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    background:
        linear-gradient(180deg, #f9fbff 0%, #eef4fb 48%, #f7f9fc 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; }

.container {
    width: min(1140px, 92vw);
    margin-inline: auto;
}

/* ---------- Светлый фон ---------- */
.bg-aurora {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(91, 91, 232, 0.08), transparent 36%),
        linear-gradient(235deg, rgba(8, 145, 178, 0.10), transparent 42%),
        var(--bg);
}
.blob {
    display: none;
}
.blob-1 { width: 480px; height: 480px; background: #7c5cff; top: -120px; left: -80px; }
.blob-2 { width: 420px; height: 420px; background: #22d3ee; bottom: -140px; right: -60px; animation-delay: -7s; }
.blob-3 { width: 360px; height: 360px; background: #f472b6; top: 40%; left: 55%; animation-delay: -14s; opacity: 0.35; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(40px, -30px) scale(1.08); }
    66%      { transform: translate(-30px, 25px) scale(0.95); }
}

/* ---------- Шапка ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; }
.brand-mark {
    font-size: 26px;
    filter: drop-shadow(0 0 12px rgba(124, 92, 255, 0.7));
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; font-size: 18px; }
.brand-text i {
    font-style: normal;
    font-size: 11px;
    font-weight: 400;
    color: var(--text-faint);
    letter-spacing: 0.3px;
}

.main-nav { display: flex; gap: 6px; margin-left: 8px; }
.main-nav a {
    padding: 8px 14px;
    border-radius: 10px;
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s;
}
.main-nav a:hover { color: var(--text); background: var(--surface); }
.main-nav a.active { color: #1d4ed8; background: var(--surface-2); }

.quick-search { margin-left: auto; }
.quick-search input {
    width: 220px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: var(--font);
    font-size: 13px;
    transition: 0.2s;
}
.quick-search input:focus {
    outline: none;
    width: 260px;
    border-color: var(--border-hi);
    box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.12);
}

.auth-area { display: flex; align-items: center; gap: 10px; }

.icon-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 800;
    transition: 0.18s;
}
.icon-link:hover,
.icon-link.active {
    border-color: var(--border-hi);
    color: var(--text);
    background: var(--surface-2);
}
.icon-link b {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    line-height: 1;
    box-shadow: 0 0 0 2px #fff;
}

/* user chip + dropdown */
.user-chip {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 12px 5px 5px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    transition: 0.2s;
}
.user-chip:hover, .user-chip:focus-within { border-color: var(--border-hi); }
.user-chip-name { font-size: 13px; font-weight: 600; }
.user-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 180px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: 0.18s;
}
.user-chip:hover .user-menu, .user-chip:focus-within .user-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.user-menu a {
    display: block;
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 13px;
    color: var(--text-dim);
}
.user-menu a:hover { background: var(--surface); color: var(--text); }
.user-menu a.danger:hover { color: #ff6b8a; }

/* ---------- Аватары ---------- */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-weight: 800;
    color: #fff;
    background: var(--clr, var(--violet));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 6px 18px -6px var(--clr, var(--violet));
    flex-shrink: 0;
}
.avatar-sm { width: 30px; height: 30px; border-radius: 9px; font-size: 13px; }
.avatar-lg { width: 84px; height: 84px; border-radius: 22px; font-size: 36px; }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}
.btn-sm { padding: 8px 15px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
    background: var(--grad-brand);
    color: #fff;
    box-shadow: 0 10px 30px -10px rgba(124, 92, 255, 0.7);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(124, 92, 255, 0.85); }

.btn-ghost {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}
.btn-ghost:hover:not(:disabled) { border-color: var(--border-hi); background: var(--surface-2); }

/* ---------- Карточки / общие блоки ---------- */
.site-main { padding: 38px 0 80px; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 36px 0 18px;
}
.section-head h2 { margin: 0; font-size: 22px; }
.section-head a { font-size: 13px; color: var(--cyan); font-weight: 600; }

/* ---------- HERO ---------- */
.hero {
    position: relative;
    padding: 54px 40px;
    border-radius: 28px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(124, 92, 255, 0.22), rgba(34, 211, 238, 0.12)),
        var(--surface);
    border: 1px solid var(--border-hi);
    box-shadow: var(--shadow);
}
.hero h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 5vw, 48px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: 0;
}
.hero h1 .grad {
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p { max-width: 560px; color: var(--text-dim); font-size: 16px; margin: 0 0 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 30px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats .stat b { display: block; font-size: 26px; font-weight: 800; }
.hero-stats .stat span { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 1px; }

/* ---------- Панель активности ---------- */
.forum-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
    margin-top: 18px;
}
.insight-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.insight-card,
.member-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}
.insight-card { padding: 18px; }
.insight-label {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.7px;
}
.insight-card strong {
    display: block;
    font-size: 28px;
    line-height: 1;
    color: var(--text);
}
.insight-card p {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--text-dim);
}
.member-panel { padding: 16px; }
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}
.panel-head h2 { margin: 0; font-size: 16px; }
.panel-head a { color: var(--cyan); font-size: 12px; font-weight: 700; }
.member-list { display: grid; gap: 8px; }
.member-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 9px;
    border-radius: 10px;
    color: var(--text-dim);
    transition: 0.18s;
}
.member-row:hover { background: var(--surface-2); color: var(--text); }
.member-name {
    display: grid;
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
}
.member-name small {
    color: var(--text-faint);
    font-size: 11px;
    font-weight: 600;
}
.member-score {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-faint);
}

/* ---------- Сетка категорий ---------- */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 16px;
}
.cat-card {
    display: flex;
    gap: 16px;
    padding: 22px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: 0.25s;
    position: relative;
    overflow: hidden;
}
.cat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(420px 120px at 0% 0%, var(--accent, var(--violet)), transparent 70%);
    opacity: 0.10;
    transition: 0.25s;
}
.cat-card:hover { transform: translateY(-4px); border-color: var(--border-hi); box-shadow: var(--shadow); }
.cat-card:hover::before { opacity: 0.18; }
.cat-icon {
    width: 54px; height: 54px;
    display: grid; place-items: center;
    font-size: 26px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--border);
    flex-shrink: 0;
}
.cat-body { position: relative; z-index: 1; }
.cat-body h3 { margin: 2px 0 6px; font-size: 17px; }
.cat-body p { margin: 0 0 12px; font-size: 13px; color: var(--text-dim); }
.cat-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-faint); }
.cat-meta b { color: var(--text); }

/* ---------- Список тем ---------- */
.topic-list { display: flex; flex-direction: column; gap: 10px; }
.topic-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: 0.2s;
}
.topic-row:hover { border-color: var(--border-hi); transform: translateX(3px); background: var(--surface-2); }
.topic-main { min-width: 0; flex: 1; }
.topic-title a,
.thread-head h1,
.post-content,
.notification-item strong,
.report-card h2,
.member-card-name {
    overflow-wrap: anywhere;
    word-break: break-word;
}
.topic-title {
    font-size: 15px; font-weight: 700; margin: 0 0 4px;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.topic-title a { transition: 0.2s; }
.topic-title a:hover { color: var(--cyan); }
.topic-sub { font-size: 12px; color: var(--text-faint); display: flex; gap: 12px; flex-wrap: wrap; }
.topic-sub a { color: var(--text-dim); }
.topic-sub a:hover { color: var(--text); }
.topic-stats { display: flex; gap: 22px; text-align: center; }
.topic-stats .num { display: block; font-weight: 800; font-size: 16px; }
.topic-stats .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-faint); }

.tag {
    font-size: 10px; font-weight: 700;
    padding: 3px 8px; border-radius: 999px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.tag-pin   { background: rgba(251, 191, 36, 0.16); color: var(--amber); }
.tag-lock  { background: rgba(244, 114, 182, 0.16); color: var(--pink); }
.tag-solved { background: rgba(5, 150, 105, 0.14); color: var(--green); }
.cat-pill {
    font-size: 11px; font-weight: 600;
    padding: 3px 10px; border-radius: 999px;
    background: var(--surface-2); border: 1px solid var(--border);
    color: var(--text-dim);
}
.topic-badges,
.topic-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.topic-type-pill,
.tag-link {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.82);
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 800;
}
.tag-link {
    color: #0369a1;
    background: rgba(224, 242, 254, 0.68);
}
.tag-link:hover {
    border-color: rgba(2, 132, 199, 0.34);
    color: #075985;
}
.topic-preference-btn.active {
    border-color: rgba(5, 150, 105, 0.34);
    background: rgba(209, 250, 229, 0.86);
    color: #047857;
}

.filter-bar {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 18px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}
.filter-bar label {
    display: grid;
    gap: 5px;
    min-width: 190px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-faint);
}
.filter-bar select,
.filter-bar input {
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--text);
    font-family: var(--font);
    padding: 8px 12px;
}

/* ---------- Тема: посты ---------- */
.thread-head {
    padding: 26px 28px;
    border-radius: var(--radius);
    margin-bottom: 22px;
    background: linear-gradient(135deg, rgba(124,92,255,0.14), rgba(34,211,238,0.06)), var(--surface);
    border: 1px solid var(--border-hi);
}
.thread-head .breadcrumb { font-size: 12px; color: var(--text-faint); margin-bottom: 10px; }
.thread-head .breadcrumb a { color: var(--cyan); }
.thread-head h1 { margin: 0; font-size: clamp(22px, 3vw, 30px); line-height: 1.15; }
.thread-head .meta { margin-top: 12px; font-size: 13px; color: var(--text-dim); display: flex; gap: 16px; flex-wrap: wrap; }

.moderation-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    margin: -6px 0 18px;
    border: 1px solid rgba(183, 121, 31, 0.28);
    border-radius: var(--radius-sm);
    background: rgba(255, 251, 235, 0.86);
    color: var(--text-dim);
}
.moderation-panel strong {
    display: block;
    color: var(--text);
    font-size: 14px;
}
.moderation-panel span {
    font-size: 12px;
}
.moderation-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.post {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 0;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 16px;
}
.post-aside {
    padding: 22px 18px;
    background: rgba(248, 250, 252, 0.78);
    border-right: 1px solid var(--border);
    text-align: center;
}
.post-aside .avatar { margin: 0 auto 10px; }
.post-aside .pa-name { font-weight: 700; font-size: 14px; }
.post-aside .pa-role {
    display: inline-block; margin-top: 5px;
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px;
    padding: 2px 8px; border-radius: 999px;
    background: var(--surface-2); color: var(--text-dim);
}
.post-aside .pa-role.admin     { color: var(--amber); }
.post-aside .pa-role.moderator { color: var(--cyan); }
.post-aside .pa-joined { margin-top: 10px; font-size: 11px; color: var(--text-faint); }

.post-body { padding: 20px 24px; display: flex; flex-direction: column; min-width: 0; }
.post-meta { font-size: 12px; color: var(--text-faint); margin-bottom: 12px; display: flex; gap: 10px; }
.post-content { font-size: 15px; word-break: break-word; }
.post-content p { margin: 0 0 12px; }
.post-content p:last-child { margin-bottom: 0; }
.post-content a { color: var(--cyan); text-decoration: underline; text-underline-offset: 2px; }
.inline-code {
    font-family: var(--mono); font-size: 0.9em;
    background: rgba(124, 92, 255, 0.14);
    padding: 2px 6px; border-radius: 6px; color: #4936b8;
}
.code-block {
    font-family: var(--mono); font-size: 13px;
    background: #06060f;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    overflow-x: auto;
    margin: 0 0 14px;
}
.code-block code { color: #c4f0ff; }

.post-footer {
    margin-top: auto;
    padding-top: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.post-solution {
    border-color: rgba(5, 150, 105, 0.34);
    box-shadow: 0 14px 34px -30px rgba(5, 150, 105, 0.5);
}
.post-deleted {
    opacity: 0.78;
}
.muted {
    color: var(--text-faint);
    font-style: italic;
}
.solution-label {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(5, 150, 105, 0.14);
    color: var(--green);
    font-weight: 800;
}
.like-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 14px; border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-dim);
    font-family: var(--font); font-size: 13px; font-weight: 600;
    cursor: pointer; transition: 0.18s;
}
.like-btn:hover { border-color: var(--border-hi); color: var(--text); }
.like-btn.liked { background: rgba(244, 114, 182, 0.16); border-color: rgba(244,114,182,0.4); color: var(--pink); }
.like-btn .heart { transition: transform 0.2s; }
.like-btn.liked .heart { transform: scale(1.2); }
.like-btn.pulse .heart { animation: pop 0.35s ease; }
@keyframes pop { 0%{transform:scale(1);} 45%{transform:scale(1.45);} 100%{transform:scale(1.2);} }

.post-tool {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-dim);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.18s;
}
.post-tool:hover {
    border-color: var(--border-hi);
    color: var(--text);
}
.post-tool.danger:hover {
    border-color: rgba(239, 68, 68, 0.34);
    color: #dc2626;
    background: rgba(254, 226, 226, 0.72);
}
.inline-edit-form {
    display: grid;
    gap: 10px;
}
.inline-edit-form textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    font-family: var(--font);
    resize: vertical;
}
.post-action-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---------- Формы ---------- */
.form-card {
    max-width: 460px;
    margin: 10px auto;
    padding: 34px 32px;
}
.form-card.wide { max-width: 760px; }
.form-card h1 { margin: 0 0 6px; font-size: 26px; }
.form-card .sub { color: var(--text-dim); font-size: 14px; margin: 0 0 24px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--text-dim); }
.field input, .field textarea, .field select {
    width: 100%;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    transition: 0.2s;
}
.field textarea { resize: vertical; min-height: 140px; font-family: var(--font); }
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none;
    border-color: var(--border-hi);
    box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.12);
}
.field .hint { font-size: 12px; color: var(--text-faint); margin-top: 6px; }
.field-row { display: flex; gap: 14px; }
.field-row .field { flex: 1; }

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.settings-card .settings-preview {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}
.settings-divider {
    height: 1px;
    margin: 28px 0;
    background: var(--border);
}
.settings-card h2 {
    margin: 0 0 6px;
    font-size: 20px;
}
.field input[type="color"] {
    width: 72px;
    height: 44px;
    padding: 4px;
    cursor: pointer;
}
.color-swatches {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.color-swatch {
    width: 30px;
    height: 30px;
    border: 2px solid rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    background: var(--swatch);
    box-shadow: 0 0 0 1px var(--border);
    cursor: pointer;
}
.color-swatch:hover,
.color-swatch:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.editor-toolbar { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.editor-toolbar button {
    font-family: var(--mono); font-size: 12px;
    padding: 5px 10px; border-radius: 8px;
    border: 1px solid var(--border); background: var(--surface);
    color: var(--text-dim); cursor: pointer; transition: 0.18s;
}
.editor-toolbar button:hover { color: var(--text); border-color: var(--border-hi); }

.form-msg { font-size: 13px; padding: 11px 14px; border-radius: 10px; margin-bottom: 16px; display: none; }
.form-msg.error   { display: block; background: rgba(255, 90, 120, 0.12); color: #ff8aa3; border: 1px solid rgba(255,90,120,0.3); }
.form-msg.success { display: block; background: rgba(52, 211, 153, 0.12); color: var(--green); border: 1px solid rgba(52,211,153,0.3); }

.form-foot { margin-top: 18px; font-size: 13px; color: var(--text-dim); text-align: center; }
.form-foot a { color: var(--cyan); font-weight: 600; }

/* ---------- Профиль ---------- */
.profile-head {
    display: flex; gap: 22px; align-items: center;
    padding: 30px; margin-bottom: 24px;
}
.profile-head .pinfo h1 { margin: 0 0 4px; font-size: 26px; }
.profile-head .pinfo .role-badge {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
    padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-dim);
}
.profile-head .pinfo .bio { margin: 10px 0 0; color: var(--text-dim); font-size: 14px; }
.profile-stats { display: flex; gap: 28px; margin-left: auto; text-align: center; }
.profile-stats b { display: block; font-size: 22px; }
.profile-stats span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-faint); }
.profile-actions { margin-top: 14px; }

/* ---------- Новые разделы: участники, уведомления, жалобы ---------- */
.notification-list,
.report-list {
    display: grid;
    gap: 12px;
}
.notification-item,
.report-card,
.member-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}
.notification-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 16px;
}
.notification-item.unread {
    border-color: rgba(37, 99, 235, 0.32);
    background: rgba(239, 246, 255, 0.88);
}
.notification-item strong {
    display: block;
    font-size: 14px;
}
.notification-item p,
.report-meta {
    margin: 4px 0 0;
    color: var(--text-faint);
    font-size: 12px;
}
.notification-actions,
.report-actions,
.status-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}
.member-card {
    display: grid;
    gap: 8px;
    justify-items: start;
    padding: 18px;
    transition: 0.18s;
}
.member-card:hover {
    border-color: var(--border-hi);
    transform: translateY(-2px);
    background: var(--surface-2);
}
.member-card-name {
    font-size: 16px;
    font-weight: 800;
}
.member-card-role,
.member-card-bio {
    color: var(--text-dim);
    font-size: 12px;
}
.member-card-bio {
    min-height: 38px;
}
.member-card-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--text-faint);
    font-size: 12px;
}
.member-card-stats b {
    color: var(--text);
}
.status-tabs a {
    padding: 7px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 800;
    background: var(--surface);
}
.status-tabs a.active,
.status-tabs a:hover {
    border-color: var(--border-hi);
    color: var(--text);
    background: var(--surface-2);
}
.report-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 18px;
}
.report-card h2 {
    margin: 0 0 6px;
    font-size: 17px;
}
.report-card blockquote {
    margin: 12px 0 0;
    padding: 12px 14px;
    border-left: 4px solid var(--border-hi);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: rgba(248, 250, 252, 0.9);
    color: var(--text-dim);
}

/* ---------- Пустое состояние / алерты ---------- */
.empty {
    text-align: center; padding: 60px 20px; color: var(--text-faint);
}
.empty .ico { font-size: 48px; margin-bottom: 14px; }
.empty p { margin: 0 0 18px; }

.notice {
    padding: 14px 18px; border-radius: 12px; font-size: 13px;
    background: rgba(124, 92, 255, 0.1); border: 1px solid var(--border-hi); color: var(--text-dim);
    margin-bottom: 18px;
}

/* ---------- Пагинация ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 38px; height: 38px;
    display: grid; place-items: center;
    padding: 0 12px; border-radius: 10px;
    font-size: 13px; font-weight: 600;
    border: 1px solid var(--border); background: var(--surface); color: var(--text-dim);
    transition: 0.18s;
}
.pagination a:hover { border-color: var(--border-hi); color: var(--text); }
.pagination .current { background: var(--grad-brand); color: #fff; border-color: transparent; }

/* ---------- Toast ---------- */
#toast-host {
    position: fixed; bottom: 24px; right: 24px; z-index: 9999;
    display: flex; flex-direction: column; gap: 10px;
}
.toast {
    padding: 13px 18px; border-radius: 12px;
    background: var(--bg-2); border: 1px solid var(--border-hi);
    box-shadow: var(--shadow); font-size: 14px; color: var(--text);
    transform: translateX(120%); opacity: 0; transition: 0.32s cubic-bezier(.2,.8,.2,1);
    max-width: 320px;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast.ok    { border-color: rgba(52, 211, 153, 0.5); }
.toast.err   { border-color: rgba(255, 90, 120, 0.5); }

/* ---------- Футер ---------- */
.site-footer {
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.72);
}
.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 24px 0;
    color: var(--text-dim);
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.footer-brand strong {
    color: var(--text);
}
.footer-brand p,
.footer-copy {
    margin: 2px 0 0;
    font-size: 12px;
}
.footer-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-size: 13px;
    font-weight: 700;
}
.footer-links a:hover {
    color: var(--cyan);
}
.footer-copy {
    grid-column: 1 / -1;
}

/* ---------- Реплай-форма в теме ---------- */
.reply-card { padding: 22px 24px; margin-top: 24px; }
.reply-card h3 { margin: 0 0 14px; font-size: 17px; }

.spinner {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
    animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Адаптив ---------- */
@media (max-width: 1080px) {
    .header-inner {
        flex-wrap: wrap;
    }
    .quick-search {
        order: 3;
        width: 100%;
    }
    .quick-search input,
    .quick-search input:focus {
        width: 100%;
    }
    .forum-dashboard {
        grid-template-columns: 1fr;
    }
    .insight-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 860px) {
    .main-nav { order: 4; width: 100%; overflow-x: auto; padding-bottom: 2px; }
    .main-nav a { white-space: nowrap; }
    .quick-search { display: none; }
    .forum-dashboard { grid-template-columns: 1fr; }
    .insight-grid { grid-template-columns: 1fr; }
    .moderation-panel { align-items: flex-start; flex-direction: column; }
    .post { grid-template-columns: 1fr; }
    .post-aside {
        display: flex; align-items: center; gap: 12px; text-align: left;
        border-right: none; border-bottom: 1px solid var(--border); padding: 14px 18px;
    }
    .post-aside .avatar { margin: 0; }
    .post-aside .pa-joined { display: none; }
    .topic-stats { display: none; }
    .topic-row { align-items: flex-start; }
    .profile-head { flex-direction: column; text-align: center; }
    .profile-stats { margin: 0; }
    .field-row { flex-direction: column; gap: 0; }
    .notification-item,
    .report-card {
        grid-template-columns: 1fr;
    }
    .notification-actions,
    .report-actions {
        justify-content: flex-start;
    }
}
@media (max-width: 520px) {
    .container { width: min(100% - 24px, 1140px); }
    .site-main { padding-top: 24px; }
    .hero { padding: 34px 18px; border-radius: 14px; }
    .hero-actions .btn,
    .hero-stats .stat { width: 100%; }
    .header-inner { gap: 10px; }
    .brand-text i { display: none; }
    .auth-area { margin-left: auto; gap: 6px; }
    .auth-area .btn-sm {
        min-width: 0;
        max-width: 106px;
        padding-inline: 10px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .icon-link span { display: none; }
    .icon-link { width: 38px; justify-content: center; }
    .icon-link::before { content: "У"; }
    .cat-grid { grid-template-columns: 1fr; }
    .cat-card { padding: 16px; }
    .topic-row { gap: 11px; padding: 14px; }
    .topic-title { font-size: 14px; }
    .topic-sub { gap: 8px; }
    .thread-head { padding: 20px 16px; }
    .post-body { padding: 16px; }
    .post-footer .like-btn,
    .post-footer .post-tool { flex: 1 1 auto; justify-content: center; }
    .filter-bar label,
    .filter-bar .btn { width: 100%; }
    .settings-card .settings-preview { align-items: flex-start; flex-direction: column; }
    .user-chip-name { display: none; }
    .member-grid { grid-template-columns: 1fr; }
    .section-head { align-items: flex-start; flex-direction: column; gap: 10px; }
    .footer-inner { grid-template-columns: 1fr; }
    .footer-links { justify-content: flex-start; }
    #toast-host { left: 12px; right: 12px; bottom: 12px; }
    .toast { max-width: none; }
}
@media (max-width: 380px) {
    .brand-mark { font-size: 18px; }
    .btn,
    .post-tool,
    .like-btn { font-size: 12px; }
    .avatar { width: 36px; height: 36px; border-radius: 9px; }
    .avatar-lg { width: 72px; height: 72px; }
    .post-aside { padding: 12px; }
}
