/* =========================================================================
   oxware — дизайн-система
   Принципы: тёмная база, один сдержанный фиолетовый акцент, моно-вставки,
   плотная сетка, плоские контролы, минимум анимаций.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root,
html[data-theme="neo"] {
    /* поверхности */
    --bg-0:        #0a0a0f;   /* самый тёмный — body */
    --bg-1:        #101018;   /* основной */
    --bg-2:        #16161f;   /* карточки */
    --bg-3:        #1c1c27;   /* hover / активный */
    --bg-4:        #222230;   /* выделенный */

    /* границы */
    --line:        #23232f;
    --line-soft:   #1a1a24;
    --line-strong: #32324a;

    /* текст */
    --fg:          #e5e5ec;
    --fg-dim:      #9a9ab0;
    --fg-muted:    #5d5d70;

    /* бренд — сдержанный фиолет */
    --brand:       #7c3aed;
    --brand-2:     #8b5cf6;
    --brand-soft:  rgba(124, 58, 237, 0.12);
    --brand-ring:  rgba(124, 58, 237, 0.28);

    /* статусы */
    --ok:          #22c55e;
    --warn:        #eab308;
    --bad:         #ef4444;
    --info:        #3b82f6;

    /* совместимость со старыми именами переменных */
    --primary-color:  var(--brand);
    --primary-dark:   #5b21b6;
    --primary-light:  var(--brand-2);
    --secondary-color:#4c1d95;
    --accent-color:   var(--brand-2);
    --dark-bg:        var(--bg-1);
    --darker-bg:      var(--bg-0);
    --light-bg:       var(--bg-2);
    --text-color:     var(--fg);
    --text-muted:     var(--fg-dim);
    --success-color:  var(--ok);
    --warning-color:  var(--warn);
    --danger-color:   var(--bad);
    --info-color:     var(--info);
    --border-color:   var(--line);

    --radius-sm: 4px;
    --radius:    6px;
    --radius-lg: 10px;
}

/* =========================================================================
   альтернативные темы
   ========================================================================= */
html[data-theme="sunset"] {
    --bg-0: #140a08;  --bg-1: #1c100c;  --bg-2: #24150f;  --bg-3: #2d1a12;  --bg-4: #3a2319;
    --line: #3a241c;  --line-soft: #24150f;  --line-strong: #5a3a2c;
    --fg: #f5e7dc;    --fg-dim: #d4a791;    --fg-muted: #7a5a4a;
    --brand: #ea580c; --brand-2: #f97316;
    --brand-soft: rgba(234, 88, 12, 0.14); --brand-ring: rgba(234, 88, 12, 0.3);
    --ok: #84cc16; --warn: #facc15; --bad: #dc2626; --info: #0ea5e9;

    --primary-color: var(--brand); --primary-dark: #9a3412; --primary-light: var(--brand-2);
    --secondary-color: #7c2d12; --accent-color: var(--brand-2);
    --dark-bg: var(--bg-1); --darker-bg: var(--bg-0); --light-bg: var(--bg-2);
    --text-color: var(--fg); --text-muted: var(--fg-dim);
    --success-color: var(--ok); --warning-color: var(--warn); --danger-color: var(--bad); --info-color: var(--info);
    --border-color: var(--line);
}

html[data-theme="forest"] {
    --bg-0: #07100b;  --bg-1: #0c1812;  --bg-2: #121f18;  --bg-3: #182820;  --bg-4: #20342a;
    --line: #1d3026;  --line-soft: #121f18;  --line-strong: #2e4a3a;
    --fg: #e3f0e7;    --fg-dim: #9cb3a3;    --fg-muted: #566a5d;
    --brand: #16a34a; --brand-2: #22c55e;
    --brand-soft: rgba(22, 163, 74, 0.13); --brand-ring: rgba(22, 163, 74, 0.28);
    --ok: #22c55e; --warn: #eab308; --bad: #ef4444; --info: #38bdf8;

    --primary-color: var(--brand); --primary-dark: #166534; --primary-light: var(--brand-2);
    --secondary-color: #14532d; --accent-color: var(--brand-2);
    --dark-bg: var(--bg-1); --darker-bg: var(--bg-0); --light-bg: var(--bg-2);
    --text-color: var(--fg); --text-muted: var(--fg-dim);
    --success-color: var(--ok); --warning-color: var(--warn); --danger-color: var(--bad); --info-color: var(--info);
    --border-color: var(--line);
}

/* =========================================================================
   сброс
   ========================================================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { color-scheme: dark; }

body {
    font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 14.5px;
    line-height: 1.55;
    background: var(--bg-0);
    color: var(--fg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;

    /* едва заметная точечная сетка — убирает plastic-feel */
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255,255,255,0.025) 1px, transparent 0);
    background-size: 24px 24px;
    background-attachment: fixed;
}

/* шрифтовые правки для mono-элементов */
code, kbd, pre, samp,
.mono,
.badge,
.forum-category .post-meta,
.announcement-date,
th {
    font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-feature-settings: 'ss01', 'ss02';
}

a { color: var(--brand-2); text-decoration: none; }
a:hover { color: var(--fg); }

h1, h2, h3, h4, h5 {
    font-weight: 650;
    letter-spacing: -0.01em;
    color: var(--fg);
}

h1 { font-size: 2.1rem; line-height: 1.15; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

p  { color: var(--fg-dim); }

::selection { background: var(--brand-soft); color: var(--fg); }

/* скроллбар */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 0; border: 2px solid var(--bg-0); }
::-webkit-scrollbar-thumb:hover { background: var(--line-strong); }

/* =========================================================================
   раскладка
   ========================================================================= */
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.75rem 1.5rem 3rem;
}

.text-center { text-align: center; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* =========================================================================
   статус-баннер
   ========================================================================= */
.status-banner {
    text-align: center;
    padding: 6px 12px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    border-bottom: 1px solid var(--line);
}

.status-banner::before {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
    background: currentColor;
    box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 25%, transparent);
}

.status-update       { color: var(--info); background: color-mix(in srgb, var(--info) 8%, transparent); }
.status-undetect     { color: var(--ok);   background: color-mix(in srgb, var(--ok)   8%, transparent); }
.status-use,
.status-use-at-own-risk { color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.status-detect       { color: var(--bad);  background: color-mix(in srgb, var(--bad)  10%, transparent); }

/* =========================================================================
   навбар
   ========================================================================= */
.navbar {
    background: var(--bg-1);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: none;
}

.nav-container {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    gap: 1.5rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--fg);
    letter-spacing: -0.01em;
}

.nav-brand i { font-size: 1.1rem; color: var(--brand); }

.nav-brand::after {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    background: var(--brand);
    border-radius: 50%;
    margin-left: 2px;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 35%, transparent);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2px;
    align-items: center;
}

.nav-menu a {
    color: var(--fg-dim);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color .12s ease, background .12s ease;
}

.nav-menu a:hover {
    color: var(--fg);
    background: var(--bg-3);
}

.nav-menu a i { font-size: 0.85rem; opacity: 0.7; }

/* =========================================================================
   hero / welcome
   ========================================================================= */
.welcome-section {
    padding: 3rem 0 2.5rem;
    text-align: left;
    position: relative;
    border-bottom: 1px solid var(--line);
    margin-bottom: 2.5rem;
}

.welcome-section::before {
    content: 'release · build stable';
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--fg-muted);
    margin-bottom: 1rem;
}

.welcome-section h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
    background: none;
    color: var(--fg);
    -webkit-text-fill-color: initial;
    max-width: 780px;
}

.welcome-section h1 em,
.welcome-section h1 .accent {
    color: var(--brand-2);
    font-style: normal;
}

.subtitle {
    font-size: 1rem;
    color: var(--fg-dim);
    margin: 1rem 0 1.5rem;
    max-width: 640px;
}

.auth-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1.25rem;
    justify-content: flex-start;
}

/* =========================================================================
   кнопки
   ========================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 550;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
    white-space: nowrap;
}

.btn i { font-size: 0.85em; opacity: 0.9; }

.btn-primary {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }

.btn-secondary {
    background: transparent;
    color: var(--fg);
    border-color: var(--line-strong);
}
.btn-secondary:hover { background: var(--bg-3); border-color: var(--fg-dim); }

.btn-warning {
    background: transparent;
    color: var(--warn);
    border-color: color-mix(in srgb, var(--warn) 45%, transparent);
}
.btn-warning:hover { background: color-mix(in srgb, var(--warn) 12%, transparent); }

.btn-info {
    background: transparent;
    color: var(--info);
    border-color: color-mix(in srgb, var(--info) 45%, transparent);
}
.btn-info:hover { background: color-mix(in srgb, var(--info) 12%, transparent); }

.btn-danger {
    background: transparent;
    color: var(--bad);
    border-color: color-mix(in srgb, var(--bad) 45%, transparent);
}
.btn-danger:hover { background: color-mix(in srgb, var(--bad) 14%, transparent); }

.btn-lg { padding: 11px 20px; font-size: 0.95rem; }
.btn-sm { padding: 5px 9px; font-size: 0.78rem; }

.btn:disabled,
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--bg-0), 0 0 0 4px var(--brand-ring);
}

/* =========================================================================
   карточки / сетки
   ========================================================================= */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1px;
    margin-bottom: 3rem;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.feature-card {
    background: var(--bg-1);
    padding: 1.5rem 1.4rem;
    text-align: left;
    border-radius: 0;
    border: 0;
    transition: background .14s ease;
}

.feature-card:hover { background: var(--bg-2); }

.feature-icon {
    font-size: 1.4rem;
    color: var(--brand-2);
    margin-bottom: 0.75rem;
    display: inline-flex;
    width: 36px; height: 36px;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent);
    border-radius: var(--radius-sm);
}

.feature-card h3 {
    color: var(--fg);
    margin-bottom: 0.35rem;
    font-size: 0.98rem;
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--fg-dim);
    line-height: 1.5;
}

/* =========================================================================
   секции
   ========================================================================= */
.section-title {
    margin: 2.75rem 0 1.25rem;
    text-align: left;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.section-title::before {
    content: '';
    width: 2px; height: 1.1rem;
    background: var(--brand);
    display: inline-block;
}

.section-title h2 {
    color: var(--fg);
    font-size: 1.2rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.section-title h2 i { color: var(--fg-muted); font-size: 0.9rem; }

/* =========================================================================
   объявления
   ========================================================================= */
.announcements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 0.9rem;
}

.announcement-card {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
    transition: border-color .14s ease, background .14s ease;
}

.announcement-card:hover {
    border-color: var(--line-strong);
    background: var(--bg-2);
}

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.announcement-header h3 {
    color: var(--fg);
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.announcement-date {
    color: var(--fg-muted);
    font-size: 0.72rem;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.announcement-card p {
    color: var(--fg-dim);
    font-size: 0.9rem;
    line-height: 1.6;
}

.pinned-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: color-mix(in srgb, var(--warn) 12%, transparent);
    color: var(--warn);
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 0.75rem;
    border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
}

/* =========================================================================
   формы
   ========================================================================= */
.form-container {
    max-width: 440px;
    margin: 3rem auto;
    padding: 2rem 2.25rem;
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.form-container h1,
.form-container h2 { margin-bottom: 0.4rem; font-size: 1.35rem; }
.form-container > p { margin-bottom: 1.75rem; color: var(--fg-dim); font-size: 0.9rem; }

.form-group { margin-bottom: 1rem; }

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--fg-dim);
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.form-control {
    width: 100%;
    padding: 9px 12px;
    background: var(--bg-0);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--fg);
    font-size: 0.92rem;
    font-family: inherit;
    transition: border-color .12s ease, background .12s ease;
}

.form-control::placeholder { color: var(--fg-muted); }

.form-control:hover { border-color: var(--line-strong); }

.form-control:focus {
    outline: none;
    border-color: var(--brand);
    background: var(--bg-1);
    box-shadow: 0 0 0 3px var(--brand-ring);
}

textarea.form-control {
    min-height: 110px;
    resize: vertical;
    line-height: 1.55;
}

select.form-control { cursor: pointer; }

.form-control[type="number"] { font-family: 'JetBrains Mono', monospace; }

/* =========================================================================
   футер
   ========================================================================= */
.footer {
    background: var(--bg-0);
    border-top: 1px solid var(--line);
    padding: 1.5rem 2rem;
    text-align: center;
    margin-top: 4rem;
    font-size: 0.82rem;
    color: var(--fg-muted);
}

.footer-content p { margin-bottom: 0.3rem; color: var(--fg-muted); }

.disclaimer {
    color: color-mix(in srgb, var(--bad) 75%, var(--fg-muted));
    font-size: 0.78rem;
    font-family: 'JetBrains Mono', monospace;
    margin-top: 0.35rem;
}

/* =========================================================================
   дашборд / инфо-карточки
   ========================================================================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.info-card {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem 1.35rem;
}

.info-card h3 {
    color: var(--fg);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.info-card h3 i { color: var(--brand); font-size: 0.9rem; }

.info-card p,
.info-card li {
    font-size: 0.9rem;
    color: var(--fg-dim);
}

/* =========================================================================
   таблицы
   ========================================================================= */
.table-responsive {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    font-size: 0.88rem;
}

th, td {
    padding: 0.7rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--line-soft);
}

th {
    background: var(--bg-2);
    color: var(--fg-dim);
    font-weight: 500;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--line);
}

tr:last-child td { border-bottom: 0; }

tbody tr { transition: background .1s ease; }
tbody tr:hover { background: var(--bg-2); }

td { color: var(--fg); }
td .btn { margin: 0; }

/* =========================================================================
   алерты
   ========================================================================= */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    border: 1px solid transparent;
    border-left-width: 3px;
}

.alert i { font-size: 0.95rem; }

.alert-success {
    background: color-mix(in srgb, var(--ok) 8%, transparent);
    border-color: color-mix(in srgb, var(--ok) 25%, transparent);
    border-left-color: var(--ok);
    color: var(--ok);
}
.alert-error {
    background: color-mix(in srgb, var(--bad) 8%, transparent);
    border-color: color-mix(in srgb, var(--bad) 25%, transparent);
    border-left-color: var(--bad);
    color: var(--bad);
}
.alert-warning {
    background: color-mix(in srgb, var(--warn) 8%, transparent);
    border-color: color-mix(in srgb, var(--warn) 25%, transparent);
    border-left-color: var(--warn);
    color: var(--warn);
}

/* =========================================================================
   админка — табы
   ========================================================================= */
.admin-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
}

.admin-tab {
    padding: 0.65rem 1rem;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    color: var(--fg-dim);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: color .12s ease, border-color .12s ease;
    border-radius: 0;
}

.admin-tab:hover { color: var(--fg); background: transparent; }

.admin-tab.active {
    color: var(--fg);
    border-bottom-color: var(--brand);
    background: transparent;
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn .22s ease-out; }

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.quick-action {
    background: var(--bg-1);
    padding: 1.1rem 1.2rem;
    border-radius: var(--radius);
    text-align: left;
    border: 1px solid var(--line);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: border-color .12s ease, background .12s ease;
    display: block;
}

.quick-action:hover { border-color: var(--brand); background: var(--bg-2); color: inherit; }
.quick-action h3 { color: var(--fg); font-size: 0.95rem; margin: 0.4rem 0 0.2rem; }
.quick-action p  { color: var(--fg-muted); font-size: 0.82rem; margin: 0; }
.quick-action i  { font-size: 1.3rem !important; color: var(--brand-2) !important; }

/* =========================================================================
   форум
   ========================================================================= */
.forum-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.forum-category {
    background: var(--bg-1);
    padding: 1rem 1.1rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    transition: border-color .12s ease, background .12s ease;
}

.forum-category:hover { border-color: var(--brand); background: var(--bg-2); }

.forum-post {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
    margin-bottom: 0.6rem;
}

.forum-post.locked { opacity: 0.65; border-left: 3px solid var(--bad); }
.forum-post.pinned { border-left: 3px solid var(--warn); }
.forum-post.solved { border-left: 3px solid var(--ok); }

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--line-soft);
}

.post-title {
    color: var(--fg);
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.post-meta {
    color: var(--fg-muted);
    font-size: 0.78rem;
}

.post-badges { display: flex; gap: 5px; margin-top: 0.4rem; }

.badge {
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    font-size: 0.68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid transparent;
    font-family: 'JetBrains Mono', monospace;
}

.badge-locked {
    background: color-mix(in srgb, var(--bad) 10%, transparent);
    color: var(--bad);
    border-color: color-mix(in srgb, var(--bad) 30%, transparent);
}

.badge-pinned {
    background: color-mix(in srgb, var(--warn) 10%, transparent);
    color: var(--warn);
    border-color: color-mix(in srgb, var(--warn) 30%, transparent);
}

.badge-solved,
.badge-old-user {
    background: color-mix(in srgb, var(--ok) 10%, transparent);
    color: var(--ok);
    border-color: color-mix(in srgb, var(--ok) 30%, transparent);
}

.badge-admin {
    background: color-mix(in srgb, var(--brand) 16%, transparent);
    color: var(--brand-2);
    border-color: color-mix(in srgb, var(--brand) 36%, transparent);
}

.badge-moderator {
    background: color-mix(in srgb, var(--info) 12%, transparent);
    color: var(--info);
    border-color: color-mix(in srgb, var(--info) 30%, transparent);
}

.badge-new-user {
    background: color-mix(in srgb, var(--warn) 10%, transparent);
    color: var(--warn);
    border-color: color-mix(in srgb, var(--warn) 30%, transparent);
}

.badge-not-activated {
    background: rgba(255,255,255,0.05);
    color: var(--fg-muted);
    border-color: var(--line);
}

.author-line {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    vertical-align: middle;
}

.author-text {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.author-name { color: var(--fg); }
.author-badges { display: inline-flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
.user-badge { margin-left: 0.2rem; }

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: linear-gradient(135deg, var(--brand), var(--info));
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
}

.user-avatar-sm {
    width: 26px;
    height: 26px;
    font-size: 0.72rem;
    flex: 0 0 26px;
}

.profile-card-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.profile-avatar {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--line-strong);
}

.profile-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand), var(--info));
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
}

.profile-username,
.profile-bio {
    color: var(--fg-muted);
}

.profile-badges {
    margin-top: 0.45rem;
}

.profile-edit-form {
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
}

.profile-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--fg-dim);
}

.profile-privacy-box {
    display: grid;
    gap: 0.45rem;
    padding: 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.03);
}

.profile-public-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.profile-public-grid div {
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.03);
}

.profile-public-grid span,
.profile-public-grid strong {
    display: block;
}

.profile-public-grid span {
    color: var(--fg-muted);
    font-size: 0.78rem;
    margin-bottom: 0.25rem;
}

.profile-comment-form {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.profile-comments-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.profile-comment {
    padding: 0.85rem;
    border-left: 3px solid var(--brand);
    background: rgba(255,255,255,0.03);
}

.home-pinned-announcement {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.4rem;
    border-left: 3px solid var(--warn);
}

.profile-notifications {
    display: grid;
    gap: 0.65rem;
    margin-top: 1rem;
}

.profile-notification {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.03);
    color: inherit;
}

.profile-notification i {
    color: var(--brand-2);
    margin-top: 0.15rem;
}

.profile-notification strong,
.profile-notification small {
    display: block;
}

.profile-notification small {
    color: var(--fg-muted);
    margin-top: 0.2rem;
}

.forum-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.forum-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(82px, 1fr));
    gap: 0.6rem;
}

.forum-stats div {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.75rem 0.85rem;
    text-align: center;
}

.forum-stats strong {
    display: block;
    color: var(--fg);
    font-size: 1.25rem;
    line-height: 1;
    font-family: 'JetBrains Mono', monospace;
}

.forum-stats span {
    display: block;
    margin-top: 0.35rem;
    color: var(--fg-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.forum-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1rem;
    align-items: start;
}

.forum-sidebar {
    display: grid;
    gap: 1rem;
}

.forum-filter {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 1fr));
    gap: 0.75rem;
    align-items: end;
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.forum-filter .form-group { margin-bottom: 0; }

.forum-filter-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    grid-column: 1 / -1;
}

.forum-category {
    color: inherit;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

.forum-category.active {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.forum-category strong {
    color: var(--fg);
    font-size: 0.92rem;
}

.forum-category span {
    color: var(--fg-muted);
    font-size: 0.78rem;
    white-space: nowrap;
}

.forum-list-head,
.forum-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.forum-list-head span {
    color: var(--fg-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
}

.forum-post .post-title {
    display: inline-block;
    text-decoration: none;
}

.forum-post-counters {
    min-width: 76px;
    text-align: center;
    border-left: 1px solid var(--line-soft);
    padding-left: 1rem;
}

.forum-post-counters strong {
    display: block;
    color: var(--fg);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    line-height: 1;
}

.forum-post-counters span {
    display: block;
    margin-top: 0.3rem;
    color: var(--fg-muted);
    font-size: 0.72rem;
}

.forum-preview {
    margin: 0 0 0.65rem;
    color: var(--fg-dim);
}

.forum-topic,
.forum-comments {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.15rem;
    margin-bottom: 1rem;
}

.forum-topic.locked { border-left: 3px solid var(--bad); }
.forum-topic.pinned { border-left: 3px solid var(--warn); }

.forum-topic-body,
.forum-comment-body {
    color: var(--fg);
    white-space: normal;
}

.forum-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line-soft);
}

.forum-actions form { margin: 0; }

.forum-comment-actions {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-top: 0.7rem;
}

.forum-comment-actions form { margin: 0; }

.comment-edit-box {
    width: 100%;
}

.comment-edit-box summary {
    width: fit-content;
    list-style: none;
    cursor: pointer;
}

.comment-edit-box summary::-webkit-details-marker {
    display: none;
}

.comment-edit-box form {
    display: grid;
    gap: 0.6rem;
    margin-top: 0.6rem;
}

.profile-comment-actions {
    margin-top: 0.75rem;
}

.forum-author-mode-form {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.forum-author-mode-form select {
    width: auto;
    min-width: 150px;
}

.form-control-sm {
    padding: 0.42rem 0.55rem;
    font-size: 0.82rem;
}

.active-reaction {
    border-color: color-mix(in srgb, var(--ok) 40%, transparent);
    color: var(--ok);
    background: color-mix(in srgb, var(--ok) 10%, transparent);
}

.forum-comments h3 {
    margin-bottom: 0.9rem;
}

.forum-comment {
    border-left: 3px solid var(--brand);
    background: rgba(255,255,255,0.03);
    padding: 0.8rem 0.9rem;
    margin-bottom: 0.65rem;
}

.forum-comment-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
    color: var(--fg-muted);
    font-size: 0.82rem;
}

.forum-comment-meta strong { color: var(--fg-dim); }

.forum-reply-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line-soft);
}

.forum-empty {
    background: var(--bg-1);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    padding: 1rem;
    color: var(--fg-muted);
}

.forum-category-admin {
    display: grid;
    gap: 0.45rem;
    margin-top: 1rem;
}

.forum-category-admin form {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.45rem 0;
    border-top: 1px solid var(--line-soft);
}

@media (max-width: 980px) {
    .forum-hero,
    .forum-layout {
        grid-template-columns: 1fr;
        display: grid;
    }

    .forum-filter {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .forum-stats,
    .forum-filter {
        grid-template-columns: 1fr;
    }

    .post-header,
    .forum-comment-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .forum-post-counters {
        border-left: 0;
        border-top: 1px solid var(--line-soft);
        padding: 0.6rem 0 0;
        text-align: left;
        width: 100%;
    }
}

.forum-hero {
    background:
        radial-gradient(circle at 18% 0%, var(--brand-soft), transparent 38%),
        linear-gradient(135deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.45rem;
    box-shadow: 0 16px 50px rgba(0,0,0,0.18);
}

.forum-hero h1 {
    margin-bottom: 0.35rem;
}

.forum-hero .subtitle {
    max-width: 620px;
    margin: 0;
}

.forum-stats div {
    background: rgba(10,10,15,0.45);
    border-color: var(--line-soft);
}

.forum-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.15rem;
}

.forum-filter {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.85rem;
    padding: 0.85rem;
    background: var(--bg-2);
    border-color: var(--line-soft);
}
.forum-filter .form-group:nth-child(1) { grid-column: 1 / -1; }

.forum-filter-actions {
    grid-column: 1 / -1;
    align-self: end;
    display: flex; gap: 0.6rem; margin-top: 0.2rem;
}

.forum-filter-actions .btn {
    white-space: nowrap;
}

.forum-categories {
    display: flex;
    gap: 0.55rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    margin-bottom: 1rem;
}

.forum-category {
    min-width: 165px;
    padding: 0.72rem 0.85rem;
    border-radius: 999px;
    align-items: center;
}

.forum-category strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-list-head {
    background: transparent;
    border-bottom: 1px solid var(--line-soft);
    padding-bottom: 0.7rem;
}

.forum-post {
    position: relative;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.025), transparent),
        var(--bg-1);
    border-color: var(--line-soft);
    border-radius: var(--radius-lg);
    padding: 1.05rem 1.15rem;
    margin-bottom: 0.75rem;
    transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.forum-post:hover {
    transform: translateY(-1px);
    border-color: var(--line-strong);
    background:
        linear-gradient(180deg, rgba(124,58,237,0.045), transparent),
        var(--bg-2);
}

.forum-post.pinned {
    background:
        linear-gradient(90deg, rgba(234,179,8,0.08), transparent 38%),
        var(--bg-1);
}

.forum-post.locked {
    opacity: 1;
    background:
        linear-gradient(90deg, rgba(239,68,68,0.06), transparent 34%),
        var(--bg-1);
}

.forum-post .post-header {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 0.55rem;
}

.forum-post .post-title {
    font-size: 1.05rem;
    line-height: 1.3;
}

.forum-post .post-title:hover {
    color: var(--brand-2);
}

.post-badges {
    flex-wrap: wrap;
}

.forum-post-counters {
    background: var(--bg-0);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 0.65rem 0.75rem;
    min-width: 86px;
}

.forum-preview {
    max-width: 780px;
    font-size: 0.9rem;
}

.forum-sidebar {
    position: sticky;
    top: 1rem;
}

.forum-sidebar .info-card {
    background: var(--bg-2);
    border-color: var(--line-soft);
    padding: 1.1rem;
}

.forum-sidebar textarea.form-control {
    min-height: 132px;
}

.forum-topic,
.forum-comments {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.025), transparent),
        var(--bg-1);
    border-color: var(--line-soft);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.forum-topic .post-header {
    align-items: flex-start;
}

.forum-topic .post-title {
    font-size: 1.45rem;
}

.forum-topic-body {
    padding: 1rem;
    background: var(--bg-0);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    line-height: 1.7;
}

.forum-comment {
    border-left: 0;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--bg-0);
}

.forum-empty {
    background: var(--bg-2);
}

@media (max-width: 980px) {
    .forum-layout,
    .forum-hero {
        display: grid;
        grid-template-columns: 1fr;
    }

    .forum-sidebar {
        position: static;
    }

    .forum-filter {
        grid-template-columns: 1fr 1fr;
    }

    .forum-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .forum-hero {
        padding: 1rem;
    }

    .forum-category {
        min-width: 145px;
        border-radius: var(--radius);
    }

    .forum-post,
    .forum-topic,
    .forum-comments {
        padding: 0.9rem;
    }

    .forum-post-counters {
        display: inline-flex;
        gap: 0.4rem;
        align-items: baseline;
        width: auto;
    }
}

/* =========================================================================
   продукты / покупки
   ========================================================================= */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.product-card {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.6rem 1.5rem;
    text-align: left;
    transition: border-color .14s ease;
    position: relative;
}

.product-card:hover { border-color: var(--brand); }

.product-card::before {
    content: '';
    position: absolute;
    top: 0; left: 1.4rem; right: 1.4rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brand), transparent);
    opacity: 0;
    transition: opacity .2s ease;
}
.product-card:hover::before { opacity: 1; }

.product-card h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.product-card > p { font-size: 0.88rem; color: var(--fg-dim); }

.product-price {
    font-size: 1.75rem;
    color: var(--fg);
    font-weight: 650;
    margin: 1.2rem 0 0.25rem;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.02em;
}

.product-price::before { content: ''; }
.product-price small { color: var(--fg-muted); font-size: 0.7rem; font-weight: 400; margin-left: 6px; }

.product-features {
    list-style: none;
    padding: 0;
    margin: 1.1rem 0;
    border-top: 1px solid var(--line-soft);
    padding-top: 1rem;
}

.product-features li {
    padding: 0.3rem 0 0.3rem 1.2rem;
    color: var(--fg-dim);
    font-size: 0.88rem;
    position: relative;
}

.product-features li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--brand);
    font-family: 'JetBrains Mono', monospace;
}

/* =========================================================================
   загрузка
   ========================================================================= */
.download-section {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-1);
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
    border: 1px solid var(--line);
}

.download-icon {
    font-size: 3rem;
    color: var(--brand-2);
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* =========================================================================
   функции (toggles)
   ========================================================================= */
.functions-list { list-style: none; padding: 0; }

.function-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1rem;
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.function-enabled  { color: var(--ok); font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; }
.function-disabled { color: var(--fg-muted); font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* =========================================================================
   модалки
   ========================================================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 8, 0.78);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1.5rem;
    backdrop-filter: blur(3px);
}

.modal-overlay.active { display: flex; }

.modal-card {
    background: var(--bg-1);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    width: 100%;
    max-width: 620px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: transparent;
    border: 0;
    color: var(--fg-muted);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    border-radius: var(--radius-sm);
}
.modal-close:hover { color: var(--fg); background: var(--bg-3); }

.modal-subtitle { color: var(--fg-dim); margin: 0.2rem 0 1.25rem; font-size: 0.9rem; }
.modal-section { margin-top: 1.25rem; }
.modal-section h4 { color: var(--fg); margin-bottom: 0.6rem; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; }

.modal-list { display: flex; flex-direction: column; gap: 0.5rem; }

.modal-option {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--bg-2);
    color: var(--fg);
    text-decoration: none;
    transition: border-color .12s ease, background .12s ease;
}
.modal-option:hover { border-color: var(--brand); background: var(--bg-3); color: var(--fg); }
.modal-option-static { cursor: default; }
.modal-option-static:hover { border-color: var(--line); background: var(--bg-2); }

.modal-option-title { font-weight: 600; font-size: 0.92rem; }
.modal-option-note { color: var(--fg-muted); font-size: 0.82rem; }

body.modal-open { overflow: hidden; }

/* =========================================================================
   селектор темы
   ========================================================================= */
.theme-selector-wrap { margin-left: 0.25rem; }

.theme-select {
    background: var(--bg-2);
    border: 1px solid var(--line);
    color: var(--fg);
    border-radius: var(--radius-sm);
    padding: 5px 8px;
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
    min-width: 100px;
}

.theme-select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-ring);
}

/* =========================================================================
   витрина
   ========================================================================= */
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem;
    margin-top: 1rem;
}

.showcase-card {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .14s ease;
}

.showcase-card:hover { border-color: var(--brand); }

.showcase-media {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--bg-2);
}

.showcase-content { padding: 0.75rem 0.9rem 0.9rem; }
.showcase-title { color: var(--fg); font-size: 0.95rem; margin-bottom: 0.25rem; }
.showcase-caption { color: var(--fg-dim); font-size: 0.82rem; }

.showcase-empty {
    padding: 1.1rem;
    border-radius: var(--radius);
    background: var(--bg-1);
    color: var(--fg-muted);
    text-align: center;
    border: 1px dashed var(--line-strong);
    font-size: 0.88rem;
}

/* =========================================================================
   анимации
   ========================================================================= */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* лёгкий стартовый эффект только на hero */
.welcome-section { animation: fadeIn .35s ease-out; }

/* =========================================================================
   адаптив
   ========================================================================= */
@media (max-width: 980px) {
    .nav-container { padding: 0.75rem 1rem; gap: 1rem; }
    .nav-menu { gap: 4px; flex-wrap: wrap; }
    .nav-menu a { padding: 6px 8px; font-size: 0.82rem; }
    .theme-selector-wrap { width: auto; }
}

@media (max-width: 768px) {
    .container { padding: 1.25rem 1rem 2rem; }

    .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .nav-menu { width: 100%; }

    .welcome-section { padding: 2rem 0 1.75rem; margin-bottom: 1.75rem; }
    .welcome-section h1 { font-size: 2rem; }

    .auth-buttons { width: 100%; }
    .auth-buttons .btn { flex: 1 1 auto; }

    .features-grid,
    .announcements-grid,
    .products-grid,
    .dashboard-grid { grid-template-columns: 1fr; }

    .announcement-header { flex-direction: column; align-items: flex-start; gap: 6px; }

    .admin-tabs { overflow-x: auto; display: flex; gap: 0.6rem; margin-top: 0.2rem; }
    .admin-tab { white-space: nowrap; }

    th, td { padding: 0.55rem 0.7rem; font-size: 0.82rem; }
}

/* =========================================================================
   hero: caret после заголовка
   ========================================================================= */
.hero-caret {
    display: inline-block;
    width: 0.55ch;
    height: 0.95em;
    background: var(--brand-2);
    margin-left: 0.15ch;
    vertical-align: -0.1em;
    animation: caret-blink 1.1s steps(1) infinite;
}

@keyframes caret-blink {
    0%, 55% { opacity: 1; }
    60%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-caret { animation: none; opacity: 1; }
}

/* =========================================================================
   hero: live-метрики
   ========================================================================= */
.hero-meta {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0 1.6rem;
    margin-top: 1.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-1);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--fg-dim);
    max-width: 100%;
}

.hero-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 4px 0;
}

.hero-meta-label {
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.7rem;
}

.hero-meta-value {
    color: var(--fg);
    font-weight: 500;
}

.hero-meta-value.accent { color: var(--brand-2); }
.hero-meta-value.good   { color: var(--ok); }

.hero-meta-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent);
    display: inline-block;
    animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.55; }
}

/* =========================================================================
   changelog
   ========================================================================= */
.changelog {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.7;
}

.changelog-entry {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 0 1rem;
    padding: 0.35rem 0;
    border-bottom: 1px dashed var(--line-soft);
    color: var(--fg-dim);
}
.changelog-entry:last-child { border-bottom: 0; }

.changelog-version {
    color: var(--brand-2);
    font-weight: 600;
    min-width: 4.5rem;
}

.changelog-date {
    color: var(--fg-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    align-self: center;
    min-width: 6.5rem;
}

.changelog-notes {
    color: var(--fg);
}

.changelog-notes .tag {
    display: inline-block;
    padding: 0 4px;
    margin-right: 5px;
    background: var(--bg-3);
    color: var(--fg-dim);
    border-radius: 2px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.changelog-notes .tag.fix     { color: var(--ok); }
.changelog-notes .tag.add     { color: var(--brand-2); }
.changelog-notes .tag.update  { color: var(--info); }
.changelog-notes .tag.warn    { color: var(--warn); }

@media (max-width: 640px) {
    .changelog-entry { grid-template-columns: 1fr; gap: 2px; }
    .changelog-date, .changelog-version { min-width: 0; }
}

/* =========================================================================
   copy-button (копирование ключей / hwid)
   ========================================================================= */
.copyable {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    color: var(--fg);
    cursor: pointer;
    transition: border-color .12s, background .12s;
    user-select: all;
}
.copyable:hover { border-color: var(--brand); background: var(--bg-3); }
.copyable::after {
    content: '⧉';
    color: var(--fg-muted);
    font-size: 0.85em;
    margin-left: 2px;
    transition: color .12s;
}
.copyable:hover::after { color: var(--brand-2); }
.copyable.copied       { border-color: var(--ok); }
.copyable.copied::after{ content: '✓'; color: var(--ok); }

/* =========================================================================
   toast уведомления
   ========================================================================= */
.toast-container {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    min-width: 220px;
    max-width: 360px;
    background: var(--bg-2);
    border: 1px solid var(--line-strong);
    border-left: 3px solid var(--brand);
    color: var(--fg);
    padding: 0.7rem 0.95rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    animation: toast-in .22s ease-out;
}

.toast.ok    { border-left-color: var(--ok); }
.toast.warn  { border-left-color: var(--warn); }
.toast.error { border-left-color: var(--bad); }

.toast-title {
    font-weight: 600;
    color: var(--fg);
    font-size: 0.85rem;
    margin-bottom: 2px;
}
.toast-body { color: var(--fg-dim); font-size: 0.82rem; }

.toast.hide { animation: toast-out .18s ease-in forwards; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(8px); }
}

/* =========================================================================
   command palette (Ctrl+K)
   ========================================================================= */
.cmdk-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 4, 8, 0.7);
    backdrop-filter: blur(4px);
    z-index: 4000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
}

.cmdk-backdrop.open { display: flex; animation: fadeIn .12s ease-out; }

.cmdk {
    width: 100%;
    max-width: 560px;
    background: var(--bg-1);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
}

.cmdk-input-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--line);
}

.cmdk-input-row .icon {
    color: var(--fg-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
}

.cmdk-input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: 0;
    color: var(--fg);
    font-size: 0.95rem;
    font-family: inherit;
}
.cmdk-input::placeholder { color: var(--fg-muted); }

.cmdk-hint {
    color: var(--fg-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.cmdk-list {
    list-style: none;
    margin: 0;
    padding: 0.35rem;
    max-height: 50vh;
    overflow-y: auto;
}

.cmdk-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--fg-dim);
    cursor: pointer;
    font-size: 0.9rem;
    transition: background .1s ease, color .1s ease;
}
.cmdk-item i { color: var(--fg-muted); width: 14px; font-size: 0.85rem; }
.cmdk-item:hover,
.cmdk-item.active {
    background: var(--bg-3);
    color: var(--fg);
}
.cmdk-item:hover i,
.cmdk-item.active i { color: var(--brand-2); }

.cmdk-item-title { flex: 1; }
.cmdk-item-meta {
    color: var(--fg-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cmdk-empty {
    padding: 1.25rem;
    text-align: center;
    color: var(--fg-muted);
    font-size: 0.9rem;
}

.cmdk-footer {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0.9rem;
    border-top: 1px solid var(--line);
    background: var(--bg-0);
    color: var(--fg-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.cmdk-footer kbd { margin-right: 3px; }

/* =========================================================================
   kbd-элементы (клавиши)
   ========================================================================= */
kbd {
    display: inline-block;
    padding: 1px 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--fg);
    background: var(--bg-2);
    border: 1px solid var(--line-strong);
    border-bottom-width: 2px;
    border-radius: 3px;
    line-height: 1.4;
    white-space: nowrap;
}

/* =========================================================================
   страницы 404 / 500
   ========================================================================= */
.error-page {
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem;
}

.error-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(5rem, 16vw, 10rem);
    line-height: 1;
    font-weight: 700;
    color: var(--brand-2);
    letter-spacing: -0.04em;
    margin-bottom: 0.4rem;
    position: relative;
}

.error-code::before {
    content: 'ERR';
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--fg-muted);
    letter-spacing: 0.3em;
}

.error-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 0.5rem;
}

.error-sub {
    color: var(--fg-dim);
    max-width: 520px;
    margin: 0 auto 1.5rem;
    font-size: 0.95rem;
    line-height: 1.55;
}

.error-trace {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--fg-muted);
    background: var(--bg-1);
    border: 1px solid var(--line);
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    max-width: 100%;
    overflow-x: auto;
}

.error-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }

/* =========================================================================
   auth-страницы (login / register)
   ========================================================================= */
.auth-head {
    margin: 2.5rem 0 1.5rem;
    text-align: left;
}

.auth-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--fg-muted);
    margin-bottom: 0.5rem;
}

.auth-title {
    font-size: 2rem;
    letter-spacing: -0.02em;
    margin: 0 0 0.4rem;
}

.auth-sub {
    color: var(--fg-dim);
    font-size: 0.95rem;
    margin: 0 0 1.5rem;
    max-width: 500px;
}

.auth-form {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.75rem 1.5rem;
}

.auth-form .form-group:last-of-type { margin-bottom: 1.25rem; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.form-row .form-group { margin-bottom: 1rem; }

@media (max-width: 480px) {
    .form-row { grid-template-columns: 1fr; }
}

.form-hint {
    display: block;
    margin-top: 6px;
    color: var(--fg-muted);
    font-size: 0.78rem;
    line-height: 1.4;
}
.form-hint code {
    background: var(--bg-2);
    border: 1px solid var(--line);
    padding: 0 4px;
    border-radius: 3px;
    font-size: 0.82em;
    color: var(--fg-dim);
}

.form-label-opt {
    color: var(--fg-muted);
    font-weight: 400;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: none;
    margin-left: 4px;
}

.form-control.mono { font-family: 'JetBrains Mono', monospace; letter-spacing: 0.01em; }

.form-terms {
    margin: 1.25rem 0 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line-soft);
    color: var(--fg-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}
.form-terms a { color: var(--brand-2); }

.auth-foot {
    margin: 1.25rem 0 2rem;
    text-align: center;
    color: var(--fg-muted);
    font-size: 0.88rem;
}
.auth-foot a        { color: var(--fg); margin: 0 4px; }
.auth-foot a.muted  { color: var(--fg-muted); }
.auth-foot a:hover  { color: var(--brand-2); }
.auth-foot .sep     { color: var(--fg-muted); margin: 0 4px; }

/* referral-strip над формой */
.ref-strip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-left: 3px solid var(--brand);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--fg-dim);
}

.ref-strip-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--brand-2);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 2px 6px;
    background: var(--brand-soft);
    border-radius: 3px;
    flex-shrink: 0;
}

.ref-strip-body strong { color: var(--ok); }

/* captcha */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.captcha-img {
    height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg-0);
    padding: 2px;
    image-rendering: auto;
}

/* =========================================================================
   back-to-top
   ========================================================================= */
.back-top {
    position: fixed;
    right: 1.2rem;
    bottom: 1.2rem;
    width: 38px;
    height: 38px;
    background: var(--bg-2);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    color: var(--fg-dim);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1500;
    transition: color .12s, border-color .12s, background .12s;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    line-height: 1;
}
.back-top.visible { display: inline-flex; }
.back-top:hover { color: var(--fg); border-color: var(--brand); background: var(--bg-3); }

/* =========================================================================
   ============================================================
   OxWare — modern revamp v2
   увеличиваем воздух, мягче типографика, аккуратные тени,
   единая визуальная иерархия. блок переопределений, идёт в
   конце файла и побеждает по порядку каскада.
   ============================================================
   ========================================================================= */
:root,
html[data-theme="neo"],
html[data-theme="sunset"],
html[data-theme="forest"] {
    --radius-sm: 8px;
    --radius:    12px;
    --radius-lg: 18px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.20);
    --shadow:    0 8px 24px rgba(0,0,0,0.28);
    --shadow-lg: 0 20px 48px rgba(0,0,0,0.40);

    --gap-block: 1.5rem;
    --gap-section: 2.75rem;
}

/* фон чуть мягче и интереснее */
body {
    font-size: 15px;
    line-height: 1.6;
    background:
        radial-gradient(900px 480px at 12% -10%, color-mix(in srgb, var(--brand) 11%, transparent), transparent 60%),
        radial-gradient(700px 420px at 105% 0%, color-mix(in srgb, var(--info) 9%, transparent), transparent 60%),
        var(--bg-0);
    background-attachment: fixed;
}

::selection { background: color-mix(in srgb, var(--brand) 35%, transparent); color: var(--fg); }

/* типографика */
h1 { font-size: clamp(2rem, 4.2vw, 2.6rem); line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: 1.55rem; line-height: 1.2; letter-spacing: -0.015em; }
h3 { font-size: 1.15rem; line-height: 1.3; }
h4 { font-size: 1rem; line-height: 1.35; }
p  { line-height: 1.65; }

/* контейнер просторнее */
.container {
    max-width: 1200px;
    padding: 2.25rem 1.75rem 4rem;
}

/* навбар чуть просторнее, активный пункт читается */
.navbar {
    background: color-mix(in srgb, var(--bg-1) 85%, transparent);
    backdrop-filter: saturate(140%) blur(8px);
    -webkit-backdrop-filter: saturate(140%) blur(8px);
}

.nav-container {
    padding: 0.9rem 1.75rem;
}

.nav-menu { gap: 4px; }

.nav-menu a {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--fg-dim);
    border: 1px solid transparent;
}

.nav-menu a:hover {
    color: var(--fg);
    background: color-mix(in srgb, var(--brand) 10%, transparent);
    border-color: color-mix(in srgb, var(--brand) 22%, transparent);
}

.nav-menu a i { opacity: 0.85; }

.nav-brand { font-size: 1rem; }

/* статус-баннер крупнее */
.status-banner {
    padding: 9px 14px;
    font-size: 0.78rem;
    letter-spacing: 0.22em;
}

/* hero — больше воздуха, мягкий контур */
.welcome-section {
    padding: 4rem 0 3.5rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.welcome-section h1 {
    font-size: clamp(2.25rem, 5.2vw, 3.5rem);
    line-height: 1.05;
    margin-bottom: 0.4rem;
    max-width: 820px;
}

.welcome-section .subtitle,
.subtitle {
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 1.1rem 0 1.6rem;
    max-width: 700px;
}

.auth-buttons { gap: 12px; margin-top: 1.5rem; }

/* hero meta */
.hero-meta {
    margin-top: 1.75rem;
    padding: 0.9rem 1.2rem;
    gap: 0 1.8rem;
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--bg-1) 80%, transparent);
    box-shadow: var(--shadow-sm);
}

/* кнопки воздушнее */
.btn {
    padding: 10px 18px;
    font-size: 0.92rem;
    border-radius: var(--radius-sm);
    font-weight: 550;
    transition: transform .14s ease, background .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--brand-2) 95%, white 5%),
        var(--brand));
    border-color: color-mix(in srgb, var(--brand) 80%, transparent);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 35%, transparent);
}
.btn-primary:hover {
    background: linear-gradient(180deg,
        var(--brand-2),
        color-mix(in srgb, var(--brand) 92%, black 8%));
    box-shadow: 0 10px 26px color-mix(in srgb, var(--brand) 45%, transparent);
}

.btn-secondary {
    background: color-mix(in srgb, var(--bg-2) 80%, transparent);
    border-color: var(--line-strong);
}
.btn-secondary:hover {
    background: var(--bg-3);
    border-color: color-mix(in srgb, var(--brand) 50%, var(--line-strong));
}

.btn-success {
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--ok) 92%, white 8%),
        color-mix(in srgb, var(--ok) 88%, black 12%));
    color: #fff;
    border-color: color-mix(in srgb, var(--ok) 70%, transparent);
}

.btn-lg { padding: 13px 22px; font-size: 0.98rem; }
.btn-sm { padding: 6px 11px; font-size: 0.82rem; }

.btn:focus-visible {
    box-shadow: 0 0 0 2px var(--bg-0), 0 0 0 4px color-mix(in srgb, var(--brand) 60%, transparent);
}

/* формы воздушнее */
.form-control {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--bg-0) 80%, var(--bg-1));
    transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}

.form-control:focus {
    background: var(--bg-1);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent);
}

textarea.form-control { min-height: 130px; line-height: 1.6; }

.form-group { margin-bottom: 1.25rem; }

.form-group label {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    color: var(--fg-dim);
    margin-bottom: 0.5rem;
}

.form-container {
    max-width: 460px;
    padding: 2.4rem 2.4rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--brand) 6%, transparent), transparent 30%),
        var(--bg-1);
    margin: 3.5rem auto;
}

/* секционные заголовки заметнее */
.section-title {
    margin: var(--gap-section) 0 1.5rem;
    align-items: center;
    gap: 0.9rem;
}

.section-title::before {
    width: 3px;
    height: 1.4rem;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--brand-2), var(--brand));
}

.section-title h2 {
    font-size: 1.35rem;
    font-weight: 650;
    text-transform: none;
    letter-spacing: -0.01em;
}

.section-title h2 i { color: var(--brand-2); font-size: 1rem; opacity: 0.9; }

/* универсальные карточки: общий вид с мягкими тенями */
.info-card,
.feature-card,
.announcement-card,
.product-card,
.modal-card,
.forum-post,
.forum-topic,
.forum-comments,
.forum-category,
.profile-notification,
.showcase-card,
.changelog,
.auth-form,
.download-section {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--fg) 4%, transparent), transparent 36%),
        color-mix(in srgb, var(--bg-1) 92%, transparent);
    border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.info-card:hover,
.feature-card:hover,
.announcement-card:hover,
.product-card:hover,
.forum-post:hover,
.forum-category:hover,
.profile-notification:hover,
.showcase-card:hover {
    border-color: color-mix(in srgb, var(--brand) 35%, var(--line-strong));
    box-shadow: var(--shadow);
}

/* info-card просторнее */
.info-card {
    padding: 1.6rem 1.7rem;
    border-radius: var(--radius);
}

.info-card h3 {
    margin-bottom: 1.15rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    color: var(--fg-dim);
}

.info-card h3 i {
    color: var(--brand-2);
    font-size: 0.95rem;
}

.info-card p, .info-card li { font-size: 0.92rem; line-height: 1.65; }

/* feature card */
.features-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
    margin-bottom: 3rem;
}

.feature-card {
    padding: 1.75rem 1.6rem;
    border-radius: var(--radius);
}

.feature-card:hover {
    transform: translateY(-2px);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--brand) 8%, transparent), transparent 50%),
        var(--bg-1);
}

.feature-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    border-radius: var(--radius-sm);
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--brand) 22%, transparent),
            color-mix(in srgb, var(--info) 18%, transparent));
    border-color: color-mix(in srgb, var(--brand) 30%, transparent);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 18%, transparent);
}

.feature-card h3 { font-size: 1.05rem; margin-bottom: 0.45rem; }
.feature-card p  { font-size: 0.92rem; line-height: 1.6; }

/* dashboard sections */
.dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* секции на главной разделяем большим воздухом */
.welcome-section + .info-card,
.welcome-section + .home-pinned-announcement,
.welcome-section + .features-grid,
.welcome-section + .section-title {
    margin-top: 0.5rem;
}

/* объявления */
.announcements-grid {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.25rem;
}

.announcement-card { padding: 1.5rem 1.6rem; }

.announcement-header { margin-bottom: 0.75rem; gap: 1.25rem; }

.announcement-header h3 { font-size: 1.1rem; }

.announcement-card p { font-size: 0.95rem; line-height: 1.65; margin-top: 0.4rem; }

.announcement-date {
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    color: var(--fg-muted);
    padding: 3px 8px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--bg-2) 60%, transparent);
}

.home-pinned-announcement {
    margin-bottom: 2rem;
    padding: 1.5rem 1.7rem;
    border-radius: var(--radius);
    border-left: 3px solid var(--warn);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--warn) 10%, transparent), transparent 40%),
        var(--bg-1);
}

.home-pinned-announcement h3 { margin: 0.6rem 0 0.4rem; font-size: 1.15rem; }
.home-pinned-announcement p  { line-height: 1.65; }

/* дешёвые inline-радиусы на главной */
.home-pinned-announcement .badge,
.welcome-section + * .badge { border-radius: var(--radius-pill); }

/* products */
.products-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.product-card {
    padding: 2rem 1.85rem;
    border-radius: var(--radius);
}

.product-card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.product-card > p { font-size: 0.95rem; }

.product-price {
    font-size: 2rem;
    margin: 1.4rem 0 0.35rem;
}

.product-features { margin: 1.3rem 0; padding-top: 1.15rem; }
.product-features li { padding: 0.4rem 0 0.4rem 1.4rem; font-size: 0.92rem; }

/* download */
.download-section {
    padding: 3.5rem 2.5rem;
    border-radius: var(--radius-lg);
    margin: 2rem 0;
}

.download-icon { font-size: 3.4rem; margin-bottom: 1.75rem; }

/* admin tabs воздушнее */
.admin-tabs {
    margin-bottom: 2rem;
    gap: 4px;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.admin-tab {
    padding: 0.85rem 1.15rem;
    font-size: 0.92rem;
    border-bottom: 2px solid transparent;
    color: var(--fg-muted);
}

.admin-tab:hover { color: var(--fg); }

.admin-tab.active {
    color: var(--fg);
    border-bottom-color: var(--brand-2);
    background: color-mix(in srgb, var(--brand) 7%, transparent);
}

.tab-content.active { animation: fadeIn .25s ease-out; }

/* quick actions */
.quick-actions {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.quick-action {
    padding: 1.4rem 1.4rem;
    border-radius: var(--radius);
}

.quick-action:hover {
    transform: translateY(-2px);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--brand) 8%, transparent), transparent 50%),
        var(--bg-1);
}

.quick-action h3 { font-size: 1rem; margin: 0.5rem 0 0.3rem; }
.quick-action p  { font-size: 0.88rem; line-height: 1.5; }

/* таблицы воздушнее */
.table-responsive {
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

th, td { padding: 0.95rem 1.15rem; font-size: 0.9rem; }
th { font-size: 0.74rem; letter-spacing: 0.12em; }

tbody tr:hover { background: color-mix(in srgb, var(--brand) 5%, transparent); }

/* алерты */
.alert {
    padding: 0.95rem 1.15rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: 0.92rem;
    border-left-width: 4px;
}

/* footer */
.footer {
    margin-top: 5rem;
    padding: 2.5rem 2rem;
    font-size: 0.88rem;
    background: color-mix(in srgb, var(--bg-1) 60%, transparent);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p { margin-bottom: 0.5rem; }

.disclaimer {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px dashed color-mix(in srgb, var(--bad) 30%, transparent);
}

.footer a { transition: color .14s ease; }
.footer a:hover { color: var(--brand-2) !important; }

/* badges — pill-shape, чуть просторнее */
.badge {
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.post-badges { gap: 6px; margin-top: 0.55rem; }

/* author / avatar */
.user-avatar {
    border-color: color-mix(in srgb, var(--brand) 45%, var(--line-strong));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--bg-0) 80%, transparent);
}

.user-avatar-sm { width: 28px; height: 28px; font-size: 0.74rem; flex: 0 0 28px; }

.profile-card-head {
    gap: 1.3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-color: color-mix(in srgb, var(--brand) 50%, var(--line-strong));
    box-shadow:
        0 0 0 4px color-mix(in srgb, var(--bg-0) 95%, transparent),
        0 12px 28px color-mix(in srgb, var(--brand) 25%, transparent);
}

.profile-username {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    color: var(--fg-muted);
    letter-spacing: 0.02em;
    margin-top: 0.3rem;
}

.profile-bio {
    margin: 1.25rem 0 0.5rem;
    padding: 1rem 1.15rem;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--bg-2) 60%, transparent);
    border: 1px solid var(--line-soft);
    color: var(--fg);
    line-height: 1.65;
}

.profile-public-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.9rem;
    margin-top: 1.4rem;
}

.profile-public-grid div {
    padding: 1rem 1.1rem;
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--bg-0) 65%, var(--bg-2));
    border-color: var(--line-soft);
}

.profile-public-grid span {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.profile-public-grid strong {
    color: var(--fg);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
}

.profile-edit-form {
    padding: 1.4rem;
    border-radius: var(--radius);
    border-color: var(--line-soft);
    background: color-mix(in srgb, var(--bg-2) 50%, transparent);
}

.profile-privacy-box {
    padding: 1.1rem;
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--bg-2) 50%, transparent);
}

.profile-comment-form { gap: 0.9rem; margin-top: 1.25rem; }
.profile-comments-list { gap: 1rem; margin-top: 1.5rem; }

.profile-comment {
    padding: 1.1rem 1.2rem;
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--bg-2) 55%, transparent);
    border: 1px solid var(--line-soft);
    border-left: 3px solid var(--brand);
}

.profile-comment .forum-comment-meta { margin-bottom: 0.55rem; }

.profile-notifications { gap: 0.85rem; margin-top: 1.25rem; }

.profile-notification {
    padding: 1rem 1.15rem;
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--bg-2) 50%, transparent);
}

/* forum */
.forum-hero {
    padding: 1.75rem 1.85rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.75rem;
    background:
        radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 45%),
        radial-gradient(circle at 90% 100%, color-mix(in srgb, var(--info) 12%, transparent), transparent 50%),
        var(--bg-1);
}

.forum-hero h1 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); margin-bottom: 0.5rem; }
.forum-hero .subtitle { margin: 0; font-size: 0.98rem; }

.forum-stats { gap: 0.85rem; }

.forum-stats div {
    padding: 1rem 1.1rem;
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--bg-0) 65%, var(--bg-1));
}

.forum-stats strong { font-size: 1.4rem; }
.forum-stats span   { font-size: 0.74rem; letter-spacing: 0.12em; }

.forum-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.5rem;
}

.forum-sidebar { gap: 1.25rem; top: 1.25rem; }

.forum-categories {
    gap: 0.65rem;
    padding-bottom: 0.4rem;
    margin-bottom: 1.25rem;
}

.forum-category {
    padding: 0.85rem 1.05rem;
    border-radius: var(--radius-pill);
    font-size: 0.92rem;
}

.forum-category.active {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--brand) 18%, transparent), color-mix(in srgb, var(--brand) 5%, transparent)),
        var(--bg-2);
    border-color: color-mix(in srgb, var(--brand) 50%, transparent);
}

/* фильтры форума — нормальный grid вместо битого */
.forum-filter {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(140px, 1fr));
    gap: 0.9rem;
    align-items: end;
    padding: 1.1rem 1.2rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    background: color-mix(in srgb, var(--bg-2) 70%, transparent);
    border: 1px solid var(--line-soft);
}

.forum-filter .form-group { margin-bottom: 0; }
.forum-filter .form-group:nth-child(1) { grid-column: 1 / -1; }

.forum-filter-actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    grid-column: 1 / -1;
    align-self: end;
}

@media (min-width: 980px) {
    .forum-filter { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
    .forum-filter .form-group:nth-child(1) { grid-column: 1 / 2; }
    .forum-filter-actions { grid-column: 1 / -1; }
}

/* forum post */
.forum-post {
    padding: 1.3rem 1.4rem;
    margin-bottom: 0.9rem;
    border-radius: var(--radius);
}

.forum-post:hover { transform: translateY(-2px); }

.forum-post .post-title { font-size: 1.1rem; line-height: 1.35; }

.forum-post-counters {
    background: color-mix(in srgb, var(--bg-0) 60%, transparent);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    min-width: 96px;
}

.forum-post-counters strong { font-size: 1.3rem; }

.forum-preview { margin: 0.4rem 0 0.85rem; line-height: 1.6; font-size: 0.94rem; }

.forum-list-head { padding-bottom: 0.85rem; margin-bottom: 1rem; }

/* forum topic / comments */
.forum-topic,
.forum-comments {
    padding: 1.6rem 1.7rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.25rem;
}

.forum-topic .post-title { font-size: clamp(1.35rem, 2.6vw, 1.7rem); }

.forum-topic-body {
    padding: 1.25rem 1.4rem;
    border-radius: var(--radius);
    line-height: 1.75;
    background: color-mix(in srgb, var(--bg-0) 70%, var(--bg-2));
}

.forum-actions { gap: 0.6rem; margin-top: 1.25rem; padding-top: 1.25rem; }

.forum-comments h3 { margin-bottom: 1.1rem; font-size: 1.05rem; }

.forum-comment {
    padding: 1.05rem 1.2rem;
    margin-bottom: 0.85rem;
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--bg-0) 65%, var(--bg-2));
    border: 1px solid var(--line-soft);
    border-left: 3px solid color-mix(in srgb, var(--brand) 70%, var(--line-strong));
}

.forum-comment-meta { font-size: 0.86rem; margin-bottom: 0.5rem; }
.forum-comment-meta strong { color: var(--fg); }

.forum-comment-body { line-height: 1.65; }

.forum-comment-actions { gap: 0.55rem; margin-top: 0.85rem; }

.forum-reply-form { margin-top: 1.5rem; padding-top: 1.5rem; }

/* showcase */
.showcase-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.showcase-card { border-radius: var(--radius); }
.showcase-content { padding: 1rem 1.15rem 1.2rem; }
.showcase-title   { font-size: 1rem; margin-bottom: 0.35rem; }
.showcase-caption { font-size: 0.88rem; line-height: 1.55; }

/* changelog */
.changelog {
    padding: 1.5rem 1.75rem;
    line-height: 1.8;
}

.changelog-entry { padding: 0.55rem 0; }

/* modal */
.modal-card {
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-subtitle { margin: 0.4rem 0 1.5rem; font-size: 0.95rem; }
.modal-section  { margin-top: 1.5rem; }

.modal-option {
    padding: 0.95rem 1.05rem;
    border-radius: var(--radius);
}

/* auth pages */
.auth-form {
    padding: 2.25rem 2.25rem 1.85rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.auth-head { margin: 3rem 0 1.75rem; }
.auth-title { font-size: 2.2rem; margin: 0 0 0.5rem; }
.auth-sub   { font-size: 1rem; line-height: 1.6; margin: 0 0 1.75rem; }

.form-row { gap: 1rem; }

.ref-strip {
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--brand) 12%, transparent), transparent 50%),
        var(--bg-1);
}

/* hero-meta dots — статусы цветные */
.hero-meta-dot {
    width: 7px; height: 7px;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 28%, transparent);
}

/* welcome user */
.user-welcome {
    margin-top: 1.75rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--bg-1) 70%, transparent);
    border: 1px solid var(--line-soft);
    box-shadow: var(--shadow-sm);
}

.user-welcome h2 { font-size: 1.4rem !important; margin-bottom: 0.6rem !important; }

/* mobile подровняли */
@media (max-width: 980px) {
    .container { padding: 1.5rem 1.1rem 3rem; }
    .welcome-section { padding: 2.5rem 0 2rem; margin-bottom: 2rem; }
    .info-card { padding: 1.3rem 1.35rem; }
    .feature-card, .announcement-card, .product-card { padding: 1.4rem; }
    .forum-topic, .forum-comments { padding: 1.2rem 1.25rem; }
    .forum-post { padding: 1.1rem 1.2rem; }
    .forum-hero { padding: 1.4rem 1.45rem; }
    .form-container, .auth-form { padding: 1.6rem 1.4rem; }
    .download-section { padding: 2.5rem 1.5rem; }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.35rem; }
    .section-title h2 { font-size: 1.2rem; }
    .footer { padding: 2rem 1.25rem; margin-top: 3.5rem; }
}

@media (max-width: 640px) {
    .nav-container { padding: 0.7rem 1rem; }
    .nav-menu a { padding: 6px 10px; font-size: 0.85rem; }
    .welcome-section h1 { font-size: 1.7rem; }
    .info-card, .feature-card, .announcement-card, .product-card { padding: 1.15rem 1.2rem; }
    .info-card h3 { padding-bottom: 0.65rem; margin-bottom: 0.85rem; }
    .profile-card-head { flex-direction: column; align-items: flex-start; gap: 0.85rem; padding-bottom: 1.1rem; margin-bottom: 1.1rem; }
    .profile-avatar { width: 76px; height: 76px; }
    .home-pinned-announcement { flex-direction: column; align-items: stretch; gap: 0.85rem; padding: 1.2rem 1.25rem; }
    .home-pinned-announcement .btn { width: 100%; }
    .forum-topic, .forum-comments { padding: 1.05rem; }
    .forum-comment { padding: 0.9rem 1rem; }
    .forum-stats { grid-template-columns: 1fr; }
}
