/* Oink: плоская тёмная тема в духе классических форумов. Грузится последним и перекрывает style.css / home.css. */
:root {
  color-scheme: dark;
  --bg: #151515; --surface: #1b1b1b; --card: #272726; --card2: #303030; --row-alt: #2b2b2a; --count-bg: #2f2f2e;
  --line: #343433; --line2: #4f4f4d;
  --text: #d4d4d4; --muted: #8a8a88; --bright: #fff;
  --link: #7db8ee; --link-hover: #b3dcff;
  --accent: #2f7fd8; --accent2: #4da3ff; --accent-bright: #4da3ff;
  --mod: #ffcc00; --danger: #ff4545; --red: #ff4545; --green: #4da3ff;
  --font: Verdana, Tahoma, 'DejaVu Sans', Arial, sans-serif;
  --mono: Consolas, Monaco, 'DejaVu Sans Mono', 'Courier New', monospace;
}
* { box-sizing: border-box; }
html, body { background: var(--bg) !important; }
body { margin: 0; color: var(--text); font: 11px/1.5 var(--font); letter-spacing: 0; }
body::before, body::after { display: none !important; }
a { color: var(--link); text-decoration: none; }
a:hover, a:focus-visible { color: var(--link-hover); text-decoration: underline; }
img { max-width: 100%; }
.muted { color: var(--muted); font-size: inherit; }
.small { font-size: 10px; }
.rainbow-bar { height: 2px; background: linear-gradient(90deg, #3bb2e0 0%, #db5fd6 50%, #e0e94a 100%); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 12px; }
main.content { display: flex; flex-direction: column; gap: 10px; padding: 0; }
h1 { font: bold 14px/1.3 var(--font); color: var(--bright); margin: 8px 0; }
h2, h3 { font-size: 11px; }
.sec-title { font-size: 12px; margin: 10px 0 0; }

/* шапка */
.site-header { margin-bottom: 10px; background: var(--card); border: 1px solid var(--line); border-top: 0; }
.brand-row { padding: 10px 12px 8px; background: var(--surface); }
.brand { font: 20px/1 Verdana, sans-serif; letter-spacing: -.5px; }
.brand:hover { text-decoration: none; }
.brand-light { color: var(--bright); } .brand-accent { color: var(--accent-bright); }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; padding: 7px 12px; background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.main-nav a, .nav-button { color: var(--text); font: inherit; }
.main-nav a:hover, .nav-button:hover { color: var(--bright); text-decoration: none; }
.main-nav .nav-admin { color: var(--mod); font-weight: bold; }
.main-nav .nav-mod { color: var(--accent-bright); }
.nav-form { display: inline; margin: 0; }
.nav-button { padding: 0; border: 0; background: none; cursor: pointer; }
.nav-button:hover { background: none; border: 0; }
.status-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 12px 8px; }
.qsearch input { width: 220px; }

/* блоки */
.block, .card, .pcard, .feed, .pfilter.card-like { background: var(--card); border: 1px solid var(--line); border-radius: 0; box-shadow: none; margin: 0; overflow: visible; backdrop-filter: none; }
.block-title, .card-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; padding: 6px 8px; background: var(--card2); border: 0; border-bottom: 1px solid var(--line); color: var(--bright); font-size: 11px; font-weight: bold; text-transform: none; letter-spacing: 0; }
.card-h::before { display: none; }
.block-title h2 { margin: 0; color: var(--bright); font-size: 11px; font-weight: bold; }
.block-body { padding: 8px; }
.pad { padding: 8px; }
.card { margin: 10px 0 0; }
.card:first-child, .layout .card:first-child { margin-top: 0; }
.empty { padding: 12px; color: var(--muted); text-align: center; }
.empty::before { display: none; }
.mini { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.mini:last-child { border-bottom: 0; }
.stats { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.pins-body > div { padding: 2px 0; }
.crumbs { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.crumbs a { color: var(--link); }
.crumbs b { color: var(--text); font-weight: normal; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.row { display: flex; gap: 6px; flex-wrap: wrap; }
.narrow { max-width: 520px; width: 100%; margin: 24px auto; }

/* таблицы форумов */
.forum-table { width: 100%; border-collapse: collapse; }
.forum-table th { padding: 4px 8px; color: var(--muted); font-weight: normal; text-align: left; border-bottom: 2px solid var(--accent); }
.forum-table td { padding: 6px 8px; vertical-align: middle; border-bottom: 1px solid var(--line); }
.forum-table tbody tr:nth-child(even) { background: var(--row-alt); }
.forum-table tbody tr:last-child td { border-bottom: 0; }
.forum-table .col-main { width: 55%; }
.forum-table .col-count { width: 9%; text-align: center; }
.forum-table td.col-count { background: var(--count-bg); }
.forum-table .col-last { width: 27%; }
.forum-table .item { display: flex; align-items: center; gap: 10px; }
.item-icon { flex: none; width: 8px; height: 8px; background: var(--line2); }
.item-icon.is-news { background: var(--accent); }
.item-title, .node-title { color: var(--bright); font-size: 12px; font-weight: bold; }
a.item-title:hover, a.node-title:hover { color: var(--link-hover); }
.item-description { color: var(--muted); }
.user-link { font-weight: bold; }
.user-link.role-user { color: var(--text); }
.pager { display: flex; gap: 6px; margin: 0; align-items: center; }
.pager a { padding: 1px 6px; border: 1px solid var(--line2); border-radius: 0; background: var(--card2); color: var(--text); }
.pager a.cur { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: none; }

/* ленты, строки (раздел, профиль, админка) */
.node, .trow { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); background: none; transition: none; }
.node:nth-child(even), .trow:nth-child(even) { background: var(--row-alt); }
.node:hover, .trow:hover { background: var(--row-alt); padding-left: 8px; }
.node:last-child, .trow:last-child { border-bottom: 0; }
.node-main, .trow-main { flex: 1; min-width: 0; }
.node-stats { width: 100px; color: var(--muted); font-size: 11px; text-align: right; }
.node-stats b { color: var(--text); font-size: 11px; }
.node-last { width: 200px; font-size: 11px; }
.ficon, .h-icon img { display: none; }
.h-icon { display: block; }
.pfilter, .pfilter.card-like { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 8px; margin: 0; border: 0; border-bottom: 1px solid var(--line); background: none; box-shadow: none; }
.pfilter.card-like { border: 1px solid var(--line); }
.chip { --c: var(--link); padding: 0; border: 0; border-radius: 0; background: none; color: var(--link); font-size: 11px; font-weight: normal; transition: none; }
.chip:hover { color: var(--link-hover); background: none; text-decoration: underline; transform: none; border: 0; }
.chip.on { background: none; color: var(--bright); font-weight: bold; box-shadow: none; text-decoration: none; }
.chip small { opacity: .7; }
.prefix, .yg-label { display: inline-block; margin-right: 6px; padding: 0 7px; border-radius: 2px; font: 11px/18px Helvetica, Raleway, "Helvetica Neue", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", sans-serif; text-transform: uppercase; letter-spacing: normal; color: aliceblue; vertical-align: baseline; box-shadow: none; }
.tabs { display: flex; flex-wrap: wrap; gap: 12px; padding: 0; border: 0; background: none; }
.tabs a { padding: 0; border: 0; color: var(--link); font-size: 11px; font-weight: normal; }
.tabs a.on { color: var(--bright); font-weight: bold; }
.tabs a.on::after { display: none; }
.frow { display: none; }

/* кнопки и поля */
button, .btn { display: inline-block; padding: 3px 9px; font: inherit; color: var(--text); background: var(--card2); border: 1px solid var(--line2); border-radius: 0; box-shadow: none; cursor: pointer; transition: none; text-shadow: none; }
button:hover, .btn:hover { color: var(--bright); background: #3a3a39; text-decoration: none; transform: none; box-shadow: none; }
.btn::after, .btn:hover::after { display: none; animation: none; }
.btn.small { padding: 1px 7px; font-size: 11px; }
.btn.ghost { background: var(--card2); }
.btn.danger, button.danger { color: var(--danger); background: var(--card2); }
.btn:active { transform: none; }
.linkbtn, .link-button { padding: 0; color: var(--link); background: none; border: 0; }
.linkbtn:hover, .link-button:hover { color: var(--link-hover); background: none; text-decoration: underline; }
.linkbtn.on { color: var(--accent-bright); }
.danger-t { color: var(--danger); }
input, textarea, select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line2); border-radius: 0; padding: 3px 6px; box-shadow: none; }
input:focus, textarea:focus, select:focus { outline: 1px solid var(--accent); outline-offset: -1px; border-color: var(--line2); box-shadow: none; background: var(--surface); }
textarea { width: 100%; resize: vertical; font-family: var(--mono); line-height: 1.5; }
label { display: block; margin-bottom: 8px; color: var(--text); font-weight: normal; }
label input:not([type=checkbox]):not([type=file]), label select, label textarea { display: block; width: 100%; margin-top: 3px; }
label.inline { display: inline-flex; gap: 5px; align-items: center; margin: 0; }
input[type=checkbox] { accent-color: var(--accent); }
input[type=file] { border: 0; padding: 2px 0; background: none; }
.bbbar { display: flex; gap: 3px; margin-bottom: 4px; flex-wrap: wrap; }
.bbbar button { padding: 1px 7px; background: var(--card2); border-radius: 0; }
.flash { margin: 0; padding: 8px 10px; background: var(--card); border: 1px solid var(--accent); border-radius: 0; color: var(--text); }
.err { margin: 0 0 8px; padding: 6px 10px; color: #fff; background: #5a1d1d; border: 1px solid #8a2a2a; border-radius: 0; }
.status-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; padding: 8px 10px; border-radius: 0; border: 1px solid; }
.status-banner.pend { background: var(--card); border-color: var(--mod); color: var(--text); }
.status-banner.rej { background: #3a1f1f; border-color: #8a2a2a; color: var(--text); }
.sb-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; }
.cnt, .badge { display: inline; position: static; padding: 0; background: none; color: var(--accent-bright); box-shadow: none; font-size: inherit; font-weight: bold; }

/* сообщения */
.post { display: flex; margin: 0 0 10px; background: var(--card); border: 1px solid var(--line); border-radius: 0; box-shadow: none; overflow: visible; }

.post:hover { border-color: var(--line); }
.author { width: 170px; flex-shrink: 0; padding: 8px; text-align: left; background: none; border: 0; border-right: 1px solid var(--line); overflow-wrap: anywhere; }
.avatar { display: block; width: 96px; height: 96px; margin: 0 0 6px; border-radius: 0; background: var(--surface); border: 1px solid var(--line2); box-shadow: none; color: var(--muted); font-size: 32px; font-weight: bold; align-items: center; justify-content: center; }
.avatar:not(img) { display: flex; }
.author .avatar { width: 96px; height: 96px; font-size: 32px; }
.trow .avatar { width: 28px; height: 28px; font-size: 12px; margin: 0; }
.uname { font-size: 12px; font-weight: bold; }
.utitle { color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.role-creator { color: #ff7a45 !important; text-shadow: none; }
.role-admin { color: var(--accent-bright) !important; }
.role-mod { color: var(--mod) !important; }
.post-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.post-meta { display: flex; justify-content: space-between; padding: 4px 8px; background: var(--row-alt); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.content { padding: 8px 10px; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.content pre { background: #1f1f1e; border: 1px solid var(--line); border-radius: 0; padding: 8px; overflow-x: auto; font-family: var(--mono); }
.content blockquote { margin: 6px 0; padding: 6px 10px; background: var(--surface); border-left: 3px solid var(--accent); border-radius: 0; color: var(--muted); }
.content a { text-decoration: none; }
.content a:hover { text-decoration: underline; }
.qwho { color: var(--accent-bright); font-size: 11px; font-weight: bold; }
.bbimg { max-width: 100%; border-radius: 0; }
.post-actions { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 4px 10px; background: none; border-top: 1px solid var(--line); font-size: 11px; }
.post-actions form, .modbar form { margin: 0; }
.modbar { display: flex; gap: 4px; }

/* профиль */
.pcard { margin: 0; }
.pcover { display: none; }
.phead { display: flex; align-items: flex-start; gap: 14px; padding: 10px; margin: 0; flex-wrap: wrap; }
.avatar.xl { width: 120px; height: 120px; margin: 0; border: 1px solid var(--line2); box-shadow: none; font-size: 44px; }
.pinfo { flex: 1; min-width: 200px; padding: 0; }
.pinfo h1 { margin: 0 0 4px; font-size: 16px; }
.pline { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; color: var(--muted); }
.handle { color: var(--muted); font-weight: normal; }
.rolebadge { padding: 0 5px; border-radius: 2px; background: var(--card2); border: 1px solid var(--line2); font-size: 10px; font-weight: bold; color: var(--text); text-shadow: none; }
.rolebadge.role-creator { background: #4a2a1a; border-color: #ff7a45; color: #ff9d73 !important; }
.rolebadge.role-admin { background: #0f2a4a; border-color: var(--accent); color: var(--accent-bright) !important; }
.rolebadge.role-mod { background: #3a3000; border-color: var(--mod); color: var(--mod) !important; }
.onl::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 5px; background: var(--line2); }
.onl.on::before { background: var(--accent-bright); box-shadow: none; }
.pactions { display: flex; gap: 6px; padding: 0; }
.ptiles { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 6px 10px; margin: 0; background: var(--row-alt); border-top: 1px solid var(--line); }
.tile { padding: 0; background: none; border: 0; border-radius: 0; text-align: left; transition: none; }
.tile:hover { transform: none; background: none; border: 0; }
.tile b { display: inline; font-size: 11px; color: var(--bright); background: none; -webkit-text-fill-color: currentColor; }
.tile span { color: var(--muted); font-size: 11px; margin-left: 4px; }
.pgrid { display: grid; grid-template-columns: 1fr 320px; gap: 10px; align-items: start; margin-top: 10px; }
.pgrid .card, .pgrid .pmain > .card:first-child, .pgrid .pside > .card:first-child { margin: 10px 0 0; }
.pgrid .card:first-child, .pmain > .card:first-child, .pside > .card:first-child { margin-top: 0 !important; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.avedit { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.avedit canvas { width: 96px; height: 96px; border-radius: 0; background: var(--surface); border: 1px solid var(--line2); }
.avedit > div { min-width: 0; flex: 1; }
.avedit input[type=file] { width: 100%; max-width: 100%; font-size: 11px; color: var(--muted); }
.avedit input[type=file]::file-selector-button { margin-right: 8px; padding: 3px 9px; border: 1px solid var(--line2); border-radius: 0; background: var(--card2); color: var(--text); font: inherit; cursor: pointer; }

/* проверка тем */
.qcard { margin: 10px 0 0; }
.qhead { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.qbody { max-height: 260px; overflow: auto; }
.qactions { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 8px; border-top: 1px solid var(--line); align-items: center; }
.qactions form, .sb-actions form { margin: 0; display: flex; gap: 4px; }
.rejform input { min-width: 220px; }

.foot { padding: 14px 12px 20px; text-align: center; color: var(--muted); font-size: 11px; }
.foot::before { display: none; }
.dd, .dd-menu { display: none; }

@media (max-width: 900px) { .pgrid { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .post { flex-direction: column; }
  .author { width: auto; border-right: 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
  .author .avatar { width: 48px; height: 48px; font-size: 18px; margin: 0; }
  .node-stats, .node-last, .forum-table .col-count { display: none; }
  .forum-table .col-main { width: auto; }
  .qsearch input { width: 140px; }
}


/* ---------- объявление и админка ---------- */
.banner { padding: 8px 12px; text-align: center; font-weight: bold; color: #fff; background: #1f4f8a; border: 1px solid #2f7fd8; }
.with-sidebar { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 10px; align-items: start; }
.adm-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.side-menu .block-body { display: flex; flex-direction: column; gap: 3px; }
.side-menu a { font-weight: bold; }
.side-menu a.is-active { color: var(--bright); }
.tiles-a { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.atile { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); color: var(--text); }
a.atile:hover { border-color: var(--accent); text-decoration: none; }
.atile b { font-size: 22px; line-height: 1.2; color: var(--bright); }
.atile span { color: var(--text); }
.atile small { color: var(--muted); font-size: 10px; }
.atile.warn { border-color: var(--mod); }
.atile.warn b { color: var(--mod); }
.charts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.chart-h { display: flex; justify-content: space-between; margin-bottom: 6px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 70px; padding-bottom: 1px; border-bottom: 1px solid var(--line2); }
.bars i { flex: 1; background: var(--accent); min-height: 2px; display: block; }
.bars i.z { background: var(--line2); }
.bars i:hover { background: var(--accent-bright); }
.adm-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.adm-cols > label { margin: 0; }
.adm-cols .block { min-width: 0; }
.block-title a { font-weight: normal; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filters input { width: 240px; }
.filters select { width: auto; }
.st { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 2px; font-size: 10px; line-height: 16px; color: #fff; text-transform: uppercase; }
.st-pend { background: #a26c0a; }
.st-rej { background: #bb565a; }
.col-chk { width: 28px; text-align: center; }
.bulkbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border-top: 1px solid var(--line); background: var(--row-alt); }
.bulkbar select, .bulkbar input[name=reason] { width: auto; }
.bulkbar input[name=reason] { flex: 1 1 180px; }
.uhead { display: flex; gap: 14px; align-items: flex-start; }
.profile { display: grid; grid-template-columns: 140px 1fr; gap: 3px 12px; margin: 0; }
.profile dt { color: var(--muted); }
.profile dd { margin: 0; }
.narrow-input { width: 72px; display: inline-block; }
.color { width: 38px; height: 24px; padding: 0; border: 1px solid var(--line2); background: none; cursor: pointer; }
.fieldset { margin: 0 0 10px; padding: 8px 10px 10px; border: 1px solid var(--line2); }
.fieldset legend { padding: 0 4px; color: var(--link); }
.fieldset > * + * { margin-top: 6px; }
.checkbox { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--text); }
.inline-num { display: flex; align-items: center; gap: 8px; margin: 0 0 0 22px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checks .checkbox { white-space: nowrap; }
.prow { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.prow:nth-child(even) { background: var(--row-alt); }
.prow:last-child { border-bottom: 0; }
.prow-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; flex: 1; min-width: 0; }
.prow-form > input[name=name] { width: 200px; }
.prow form { margin: 0; }
.prow-prev { min-width: 150px; }
.prow-forums { flex-basis: 100%; }
.prow-forums summary { cursor: pointer; color: var(--link); }
.prow-forums .checks { padding: 6px 0 2px; }
details.frm { border-top: 1px solid var(--line); }
details.frm summary { padding: 7px 8px; cursor: pointer; }
details.frm summary:hover { background: var(--row-alt); }
.frm-body { padding: 4px 8px 8px; }
.frm-del { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 8px 10px; }
@media (max-width: 900px) {
  .with-sidebar { grid-template-columns: 1fr; }
  .side-menu .block-body { flex-direction: row; flex-wrap: wrap; gap: 4px 14px; }
  .tiles-a { grid-template-columns: repeat(2, 1fr); }
  .charts, .adm-cols { grid-template-columns: 1fr; }
  .uhead { flex-direction: column; }
}
label.inline { white-space: nowrap; }
label.inline input:not([type=checkbox]):not([type=radio]), label.inline select, .inline-num input { display: inline-block; width: auto; margin: 0; }
label.inline .narrow-input, .inline-num .narrow-input { width: 72px; }
label.inline input.color { width: 38px; }
