:root {
  --bg: #090a0c;
  --bg-elevated: #0d0f12;
  --surface: #111419;
  --surface-2: #15191f;
  --surface-3: #1a1f26;
  --border: #2a3038;
  --border-soft: #20252c;
  --text: #d9dde3;
  --text-strong: #f3f4f6;
  --muted: #8c949f;
  --muted-2: #626a75;
  --red: #e12638;
  --red-hover: #f03547;
  --red-dark: #9f1624;
  --red-soft: #281217;
  --green: #5fd08a;
  --yellow: #d5a458;
  --sidebar: 210px;
  --site: 1180px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.site-width { width: min(var(--site), calc(100% - 36px)); margin-inline: auto; }

/* Header */
.site-header { position: relative; z-index: 40; border-bottom: 1px solid var(--border); background: #0b0d10; }
.brand-bar { height: 64px; background: #101217; border-bottom: 1px solid var(--border-soft); }
.brand-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand-link { display: inline-flex; align-items: center; gap: 11px; color: var(--text-strong); font-weight: 800; font-size: 19px; letter-spacing: .15em; }
.brand-mark { position: relative; width: 19px; height: 19px; border: 2px solid var(--red); }
.brand-mark::after { content: ""; position: absolute; inset: 4px; border: 1px solid var(--red); }
.primary-bar { height: 42px; background: #0c0e11; }
.primary-inner { height: 100%; display: flex; align-items: stretch; }
.primary-links { display: flex; align-items: stretch; }
.primary-links a { position: relative; display: flex; align-items: center; padding: 0 18px; color: #a6adb6; font-size: 13px; font-weight: 650; border-inline: 1px solid transparent; }
.primary-links a:hover { color: #fff; background: #12151a; }
.primary-links a.active { color: #fff; background: #14171c; border-color: var(--border-soft); }
.primary-links a.active::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; background: var(--red); }
.header-actions { height: 100%; display: flex; align-items: center; gap: 7px; }

.header-avatar, .member-avatar, .mini-avatar, .chat-avatar, .post-avatar, .profile-avatar-large {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #3a414b;
  background: #1b2027;
  color: #fff;
  font-weight: 800;
}
.header-avatar { width: 34px; height: 34px; border-radius: 50%; font-size: 13px; }
.account-menu, .notification-menu { position: relative; height: 100%; display: flex; align-items: center; }
.account-trigger { height: 46px; min-width: 185px; display: flex; align-items: center; gap: 10px; padding: 5px 9px; border: 1px solid transparent; background: transparent; cursor: pointer; text-align: left; }
.account-trigger:hover, .account-menu.open .account-trigger { border-color: var(--border); background: #15181d; }
.account-copy { min-width: 0; display: flex; flex-direction: column; }
.account-copy b { font-size: 13px; line-height: 1.2; }
.account-copy small { color: var(--muted); font-size: 11px; }
.account-chevron { width: 14px; height: 14px; margin-left: auto; color: var(--muted); }
.account-menu.open .account-chevron { transform: rotate(180deg); }
.account-dropdown, .notification-dropdown { display: none; position: absolute; right: 0; top: calc(100% + 7px); border: 1px solid var(--border); background: #111419; box-shadow: 0 16px 34px rgba(0,0,0,.48); z-index: 80; }
.account-dropdown { width: 258px; padding: 6px; }
.account-menu.open .account-dropdown, .notification-menu.open .notification-dropdown { display: block; }
.dropdown-user { display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 5px; border-bottom: 1px solid var(--border-soft); }
.dropdown-user span:last-child { min-width: 0; display: flex; flex-direction: column; }
.dropdown-user small { color: var(--muted); }
.account-dropdown > a, .dropdown-logout button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: transparent; color: #c5cad2; cursor: pointer; text-align: left; }
.account-dropdown > a:hover, .dropdown-logout button:hover { background: #1a1e24; color: #fff; }
.account-dropdown svg { width: 16px; height: 16px; color: #858d98; }
.dropdown-logout { margin: 5px 0 0; padding-top: 5px; border-top: 1px solid var(--border-soft); }
.dropdown-logout button:hover { color: #ff7d88; }

.notification-trigger { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid transparent; background: transparent; color: #9ca4af; cursor: pointer; }
.notification-trigger:hover, .notification-menu.open .notification-trigger { border-color: var(--border); background: #15181d; color: #fff; }
.notification-badge { position: absolute; right: 2px; top: 1px; min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; background: var(--red); color: #fff; font-size: 9px; font-weight: 800; border: 2px solid #101217; }
.notification-dropdown { width: 360px; }
.dropdown-heading { height: 43px; display: flex; align-items: center; justify-content: space-between; padding: 0 13px; border-bottom: 1px solid var(--border); }
.dropdown-heading a { color: #c75c66; font-size: 12px; }
.notification-list { max-height: 380px; overflow-y: auto; }
.notification-item { display: grid; grid-template-columns: 8px 1fr; gap: 9px; padding: 11px 13px; border-bottom: 1px solid var(--border-soft); }
.notification-item:hover { background: #171b20; }
.notification-item.unread { background: #181317; }
.notification-item > span:last-child { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notification-item b { color: #e7e9ec; font-size: 12px; }
.notification-item small { color: #9ba2ac; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notification-item time { color: #666f7a; font-size: 10px; }
.notification-dot { width: 6px; height: 6px; margin-top: 6px; background: #555e69; border-radius: 50%; }
.notification-item.unread .notification-dot { background: var(--red); }
.dropdown-empty { padding: 26px 16px; color: var(--muted); text-align: center; }

.user-name { font-weight: 750; }
.user-name.role-admin, .role-admin { color: #f14956 !important; }
.user-name.role-moderator, .role-moderator { color: #d9a157 !important; }

/* Layout */
.site-layout { display: grid; grid-template-columns: var(--sidebar) minmax(0,1fr); gap: 18px; padding-top: 18px; padding-bottom: 46px; }
.app-sidebar { align-self: start; border: 1px solid var(--border); background: #0f1216; }
.sidebar-navigation { padding: 8px 0; }
.nav-section + .nav-section { margin-top: 5px; padding-top: 6px; border-top: 1px solid var(--border-soft); }
.nav-caption { display: block; padding: 8px 14px 5px; color: #67707b; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .11em; }
.nav-item { position: relative; display: flex; align-items: center; gap: 10px; min-height: 39px; padding: 0 14px; color: #a7aeb8; font-size: 13px; border-left: 2px solid transparent; }
.nav-item svg { width: 16px; height: 16px; color: #747d88; }
.nav-item:hover { color: #fff; background: #15191e; }
.nav-item.active { color: #fff; background: #211217; border-left-color: var(--red); }
.nav-item.active svg { color: var(--red); }
.app-content, .content-scroll { min-width: 0; }
.sidebar-toggle { display: none; align-items: center; gap: 8px; border: 0; background: transparent; color: #c9ced5; padding: 0 14px; }
.sidebar-overlay { display: none; }

/* Typography / generic controls */
.page-heading { min-height: 68px; display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; padding: 3px 0 14px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.compact-heading { min-height: 58px; }
.page-heading h1 { margin: 0; color: var(--text-strong); font-size: 24px; line-height: 1.2; letter-spacing: -.02em; }
.page-heading p { margin: 4px 0 0; color: var(--muted); }
.breadcrumbs { display: flex; gap: 7px; margin-bottom: 7px; color: #777f8a; font-size: 12px; }
.breadcrumbs a:hover { color: var(--red); }
.button { min-height: 35px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 1px solid var(--border); border-radius: 2px; background: #181c22; color: #dce0e5; font-weight: 700; font-size: 13px; cursor: pointer; }
.button:hover { border-color: #48515d; background: #1d2229; }
.button:active { transform: translateY(1px); }
.button.primary { border-color: #c51d2e; background: #c51d2e; color: #fff; }
.button.primary:hover { background: var(--red-hover); border-color: var(--red-hover); }
.button.secondary { background: #15191f; }
.button.danger { border-color: #7a2630; background: #241418; color: #ff929b; }
.button.danger:hover { background: #32171d; border-color: #aa3541; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.compact-button { min-height: 31px; padding: 0 11px; font-size: 12px; }
.text-button, .text-action { border: 0; background: transparent; padding: 0; color: #aeb5bf; font-weight: 650; cursor: pointer; }
.text-button:hover, .text-action:hover { color: #fff; text-decoration: underline; }
.text-button.danger, .text-action.danger { color: #e66b75; }
.icon-button { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--border); background: #15191f; cursor: pointer; }
.icon-button:hover { border-color: #555e69; }
.icon-button.danger { color: #da6973; }
.icon-button svg { width: 15px; height: 15px; }

.flash { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding: 10px 12px; border: 1px solid; background: #12161b; }
.flash p { margin: 0; }
.flash button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 19px; }
.flash-good { border-color: #28583d; color: #84d6a4; }
.flash-bad { border-color: #71303a; color: #f08a94; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 13px; }
.field > span, .inline-admin-form label > span { color: #c8cdd4; font-size: 12px; font-weight: 650; }
.field small, .inline-admin-form small { color: var(--muted); font-size: 11px; }
input, select, textarea { width: 100%; border: 1px solid #313741; border-radius: 2px; outline: none; background: #0d1014; color: #e4e7eb; }
input, select { height: 38px; padding: 0 11px; }
textarea { resize: vertical; padding: 10px 11px; }
input:focus, select:focus, textarea:focus { border-color: #8e2834; box-shadow: inset 2px 0 0 var(--red); }
input::placeholder, textarea::placeholder { color: #5d6570; }
select { cursor: pointer; }
.form-actions { display: flex; justify-content: flex-end; padding-top: 4px; }

/* Flat forum blocks */
.forum-block { margin-bottom: 16px; border: 1px solid var(--border); background: var(--surface); }
.forum-block > header { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 14px; border-bottom: 1px solid var(--border); background: #14181d; }
.forum-block > header h3 { margin: 0; color: #e8eaed; font-size: 14px; }
.forum-block > header > span, .forum-block > header > a { color: #7f8791; font-size: 12px; }
.forum-block > header > a:hover { color: var(--red); }
.forum-empty { padding: 25px 18px; text-align: center; color: var(--muted); }
.muted-copy { color: var(--muted); }

/* Home chat */
.community-layout { display: grid; grid-template-columns: minmax(0,1fr) 255px; gap: 16px; }
.chat-panel { min-width: 0; border: 1px solid var(--border); background: var(--surface); }
.chat-header { height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 1px solid var(--border); background: #14181d; }
.chat-header > div { display: flex; flex-direction: column; }
.chat-header small { color: var(--muted); font-size: 11px; }
.live-indicator { display: inline-flex; align-items: center; gap: 7px; color: #8fceaa; font-size: 11px; }
.live-indicator i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.chat-messages { height: 520px; overflow-y: auto; padding: 5px 0; background: #0f1216; }
.chat-message { display: flex; gap: 10px; padding: 9px 13px; border-bottom: 1px solid #1c2127; }
.chat-message:hover { background: #12161b; }
.chat-avatar, .post-avatar { width: 34px; height: 34px; border-radius: 3px; font-size: 12px; }
.chat-message-body { min-width: 0; flex: 1; }
.chat-message-meta { display: flex; align-items: baseline; gap: 8px; }
.chat-message-meta time, .post-head time { color: #68717c; font-size: 10px; }
.chat-message p { margin: 3px 0 0; color: #cbd0d6; overflow-wrap: anywhere; }
.chat-empty { display: grid; place-items: center; height: 100%; color: var(--muted); }
.chat-compose { padding: 12px; border-top: 1px solid var(--border); background: #14181d; }
.chat-compose textarea { min-height: 62px; max-height: 150px; }
.chat-compose-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.chat-compose-footer span { color: var(--muted); font-size: 11px; }
.community-sidebar { min-width: 0; }
.compact-block { margin-bottom: 13px; }
.compact-member-list > a { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-bottom: 1px solid var(--border-soft); }
.compact-member-list > a:last-child { border-bottom: 0; }
.compact-member-list > a:hover { background: #171b20; }
.compact-member-list > a > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.compact-member-list small { color: var(--muted); font-size: 10px; }
.mini-avatar { width: 31px; height: 31px; border-radius: 3px; font-size: 11px; }
.chat-rules p { margin: 0; padding: 13px; color: #a3aab4; font-size: 12px; }
.chat-rules code { color: #e66c77; }

/* Compact forum profile */
.profile-card { position: relative; margin-bottom: 14px; border: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.profile-banner-line { height: 2px; background: var(--red); }
.profile-top { min-height: 126px; display: flex; align-items: center; gap: 17px; padding: 18px 20px; background: #15191f; }
.profile-avatar-large { width: 92px; height: 92px; border-radius: 3px; border-color: #5a353c; background: #241519; font-size: 31px; }
.profile-main-info { min-width: 0; flex: 1; }
.profile-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.profile-name-row h1 { margin: 0; font-size: 27px; line-height: 1.15; }
.role-label { display: inline-flex; align-items: center; height: 21px; padding: 0 7px; border: 1px solid #3a414a; color: #aeb5be; font-size: 10px; font-weight: 700; }
.role-label-admin { border-color: #74303a; background: #241418; color: #ff7c87; }
.role-label-moderator { border-color: #6d542e; background: #211b12; color: #dfb56a; }
.profile-subtitle { margin: 5px 0 8px; color: #a1a8b1; }
.profile-online { display: inline-flex; }
.status-text { display: inline-flex; align-items: center; gap: 7px; color: #adb4bd; font-size: 12px; white-space: nowrap; }
.status-text i { width: 6px; height: 6px; border-radius: 50%; background: #777f89; }
.status-text.active { color: #79d39d; }
.status-text.active i { background: var(--green); }
.status-text.revoked, .status-text.banned, .status-text.disabled { color: #de7780; }
.status-text.revoked i, .status-text.banned i, .status-text.disabled i { background: #d65f6a; }
.status-text.warning { color: #d7b06c; }
.status-text.warning i { background: var(--yellow); }
.profile-stats-strip { display: grid; grid-template-columns: repeat(2,1fr); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #12161b; }
.profile-stats-strip > div { min-height: 59px; display: flex; align-items: center; justify-content: center; gap: 9px; border-right: 1px solid var(--border-soft); }
.profile-stats-strip > div:last-child { border-right: 0; }
.profile-stats-strip span { color: var(--muted); font-size: 11px; }
.profile-stats-strip b { color: #fff; font-size: 17px; }
.profile-footer-line { min-height: 42px; display: flex; align-items: center; gap: 24px; padding: 0 20px; color: #8e96a1; font-size: 12px; }
.profile-footer-line b { color: #c4cad1; font-weight: 600; }
.profile-about-content { padding: 15px; }
.profile-bio { color: #c8cdd3; overflow-wrap: anywhere; }
.profile-signature { margin-top: 15px; padding-top: 11px; border-top: 1px solid var(--border-soft); }
.profile-signature span { color: #6f7883; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.profile-signature p { margin: 5px 0 0; color: #9fa6af; }
.profile-post-compose { display: grid; grid-template-columns: 31px minmax(0,1fr) auto; gap: 9px; align-items: start; padding: 12px; border-bottom: 1px solid var(--border); }
.profile-post-compose textarea { min-height: 58px; }
.profile-post-list { display: flex; flex-direction: column; }
.profile-post { display: flex; align-items: flex-start; gap: 10px; padding: 12px 13px; border-bottom: 1px solid var(--border-soft); }
.profile-post:last-child { border-bottom: 0; }
.post-body { min-width: 0; flex: 1; }
.post-head { display: flex; align-items: baseline; gap: 8px; }
.post-body p { margin: 4px 0 0; color: #c8cdd3; overflow-wrap: anywhere; }

/* Account access */
.account-section { margin-top: 22px; }
.section-title-row { margin-bottom: 10px; }
.section-title-row h2 { margin: 0; font-size: 19px; }
.section-title-row p { margin: 3px 0 0; color: var(--muted); }
.forum-list { display: flex; flex-direction: column; }
.forum-list-row { min-height: 55px; display: flex; align-items: center; gap: 11px; padding: 9px 13px; border-bottom: 1px solid var(--border-soft); }
.forum-list-row:last-child { border-bottom: 0; }
.forum-list-row.compact { min-height: 50px; }
.list-icon { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid var(--border); color: #79828d; }
.list-icon svg { width: 16px; height: 16px; }
.list-primary { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.list-primary b { color: #dce0e5; }
.list-primary small { color: var(--muted); }
.plain-state { position: relative; padding-left: 12px; color: #8f98a2; font-size: 11px; }
.plain-state::before { content: ""; position: absolute; left: 0; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: #7c858f; }
.plain-state.active { color: #72cb96; }
.plain-state.active::before { background: var(--green); }
.plain-state.revoked { color: #d66e78; }
.plain-state.revoked::before { background: #d65f6a; }
.account-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }

/* Members */
.member-search { height: 38px; display: flex; align-items: center; border: 1px solid var(--border); background: #0d1014; }
.member-search svg { width: 16px; margin-left: 10px; color: #6f7883; }
.member-search input, .member-search select { border: 0; box-shadow: none; background: transparent; }
.member-search button { align-self: stretch; border: 0; border-left: 1px solid var(--border); background: #181c22; color: #d4d9df; padding: 0 13px; cursor: pointer; }
.member-search button:hover { background: #20252c; }
.member-list { display: flex; flex-direction: column; }
.member-row { display: grid; grid-template-columns: 42px minmax(170px,1fr) 95px 115px 155px 17px; gap: 12px; align-items: center; min-height: 64px; padding: 9px 13px; border-bottom: 1px solid var(--border-soft); }
.member-row:last-child { border-bottom: 0; }
.member-row:hover { background: #171b20; }
.member-avatar { width: 38px; height: 38px; border-radius: 3px; font-size: 13px; }
.member-avatar.small { width: 31px; height: 31px; font-size: 11px; }
.member-main { min-width: 0; display: flex; flex-direction: column; }
.member-main small, .member-stat small { color: var(--muted); font-size: 10px; }
.member-stat { display: flex; flex-direction: column; }
.member-stat b { color: #c9ced4; font-size: 12px; font-weight: 600; }
.member-arrow { width: 15px; color: #5c6570; }

/* Settings / notifications */
.settings-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(300px,.65fr); gap: 15px; align-items: start; }
.settings-form { padding: 15px; }
.readonly-role-row { display: grid; grid-template-columns: 80px auto 1fr; gap: 10px; align-items: center; padding: 10px 11px; margin-bottom: 14px; border: 1px solid var(--border-soft); background: #0f1216; }
.readonly-role-row > span { color: var(--muted); }
.readonly-role-row small { justify-self: end; color: #6f7883; }
.settings-note { color: var(--muted); font-size: 11px; }
.notification-page-list { display: flex; flex-direction: column; }
.notification-page-row { display: grid; grid-template-columns: 8px minmax(0,1fr) 150px; gap: 10px; align-items: center; min-height: 61px; padding: 10px 13px; border-bottom: 1px solid var(--border-soft); }
.notification-page-row:last-child { border-bottom: 0; }
.notification-page-row:hover { background: #171b20; }
.notification-page-row.unread { background: #181317; }
.notification-page-main { display: flex; flex-direction: column; }
.notification-page-main small, .notification-page-row time { color: var(--muted); }
.notification-page-row time { text-align: right; font-size: 11px; }
.notification-page-row.unread .notification-dot { background: var(--red); }

/* Auth / landing */
.standalone-main { min-height: calc(100vh - 106px); display: grid; place-items: start center; padding: 58px 20px; }
.public-main { padding-top: 34px; padding-bottom: 50px; }
.auth-card { width: min(430px,100%); border: 1px solid var(--border); border-top: 2px solid var(--red); background: var(--surface); }
.auth-card-head { padding: 21px 22px 14px; border-bottom: 1px solid var(--border-soft); }
.auth-card-head h1 { margin: 0; font-size: 23px; }
.auth-card-head p { margin: 5px 0 0; color: var(--muted); }
.auth-form { padding: 19px 22px; }
.auth-submit { width: 100%; margin-top: 3px; }
.auth-card-foot { padding: 13px 22px; border-top: 1px solid var(--border-soft); color: var(--muted); text-align: center; }
.auth-card-foot a { color: #e26973; }
.input-shell { position: relative; }
.input-shell svg { position: absolute; left: 11px; top: 11px; width: 16px; color: #6f7883; }
.input-shell input { padding-left: 36px; }
.panel { border: 1px solid var(--border); background: var(--surface); }
.landing-card { max-width: 700px; margin: 30px auto; padding: 46px; border-top: 2px solid var(--red); }
.landing-card h1 { margin: 0; font-size: 34px; letter-spacing: .1em; }
.landing-card p { color: var(--muted); }
.hero-actions { display: flex; gap: 10px; margin-top: 20px; }

/* Admin */
.admin-stat-line { display: grid; grid-template-columns: repeat(5,1fr); margin-bottom: 15px; border: 1px solid var(--border); background: var(--surface); }
.admin-stat-line > a { padding: 13px; border-right: 1px solid var(--border); }
.admin-stat-line > a:last-child { border-right: 0; }
.admin-stat-line > a:hover { background: #171b21; }
.admin-stat-line small { color: var(--muted); }
.admin-stat-line strong { display: block; margin: 4px 0 1px; color: #fff; font-size: 22px; }
.admin-stat-line span { color: #8a929d; font-size: 11px; }
.admin-user-row { display: grid; grid-template-columns: 34px minmax(0,1fr) 105px 90px 90px; gap: 12px; align-items: center; min-height: 58px; padding: 9px 14px; border-bottom: 1px solid var(--border-soft); }
.admin-user-row:last-child { border-bottom: 0; }
.row-date { color: var(--muted); font-size: 12px; }
.audit-compact-list > div { display: grid; grid-template-columns: 135px 180px 130px 1fr; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border-soft); align-items: center; }
.audit-compact-list > div:last-child { border-bottom: 0; }
.audit-compact-list span, .audit-compact-list small { color: var(--muted); font-size: 12px; }
.line-tabs { display: flex; align-items: flex-end; gap: 22px; margin: -2px 0 14px; padding: 0 2px; border-bottom: 1px solid var(--border); }
.line-tabs a { position: relative; display: flex; align-items: center; gap: 7px; height: 39px; color: #8e96a1; font-weight: 650; font-size: 13px; }
.line-tabs a:hover, .line-tabs a.active { color: #fff; }
.line-tabs a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--red); }
.line-tabs a span { color: #616975; font-size: 11px; }
.table-shell { width: 100%; overflow-x: auto; }
.forum-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.forum-table th { padding: 10px 12px; border-bottom: 1px solid var(--border); background: #0f1216; color: #777f89; font-size: 10px; text-align: left; text-transform: uppercase; letter-spacing: .06em; }
.forum-table td { padding: 11px 12px; border-bottom: 1px solid var(--border-soft); color: #b9c0c8; vertical-align: middle; }
.forum-table tbody tr:last-child td { border-bottom: 0; }
.forum-table tbody tr:hover { background: #15191e; }
.forum-table td small { display: block; color: #757d87; }
.forum-table code { color: #c7cbd1; font-family: Consolas, monospace; font-size: 12px; }
.table-user { display: flex; align-items: center; gap: 10px; }
.table-user > span:last-child { display: flex; flex-direction: column; }
.table-empty { padding: 28px !important; text-align: center; color: var(--muted) !important; }
.admin-search { width: min(520px,100%); }
.admin-search select { width: 150px; height: 100%; border-top: 0; border-bottom: 0; border-right: 0; }
.user-admin-heading { align-items: flex-end; }
.moderation-row { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 15px; border-bottom: 1px solid var(--border-soft); }
.moderation-row:last-child { border-bottom: 0; }
.moderation-row > div { display: flex; flex-direction: column; }
.moderation-row small { color: var(--muted); }
.row-form { display: flex; gap: 8px; align-items: center; }
.row-form select { width: 165px; }
.danger-row { background: #151013; }
.inline-admin-form { display: flex; align-items: flex-end; gap: 12px; padding: 15px; }
.inline-admin-form label { min-width: 130px; display: flex; flex-direction: column; gap: 6px; }
.inline-admin-form label:first-of-type, .inline-admin-form label.grow { flex: 1; }
.invite-result { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 15px; padding: 15px; border: 1px solid #6d2932; background: #1a1114; }
.invite-result div { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.invite-result span, .invite-result small { color: var(--muted); }
.invite-result code { color: #fff; font-family: Consolas, monospace; font-size: 16px; }
.message-row { display: flex; align-items: flex-start; gap: 11px; padding: 12px 14px; border-bottom: 1px solid var(--border-soft); }
.message-row:last-child { border-bottom: 0; }
.message-row.deleted { opacity: .55; }
.message-content { min-width: 0; flex: 1; }
.message-meta { display: flex; align-items: baseline; gap: 9px; }
.message-meta span, .message-meta small { color: var(--muted); font-size: 11px; }
.message-content p { margin: 5px 0 0; color: #c2c7ce; }
.details-cell { max-width: 320px; word-break: break-word; }

/* compatibility */
.card-heading { min-height: 43px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 1px solid var(--border); }
.card-heading h3 { margin: 0; font-size: 14px; }
.card-kicker, .eyebrow, .system-pill, .mini-badge { display: none !important; }
.native-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.native-table th { padding: 10px 12px; border-bottom: 1px solid var(--border); color: #777f89; font-size: 10px; text-align: left; text-transform: uppercase; }
.native-table td { padding: 11px 12px; border-bottom: 1px solid var(--border-soft); }
.native-list { display: flex; flex-direction: column; }
.native-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border-soft); }
.count-pill, .role-badge, .status-badge, .row-state { border: 0 !important; border-radius: 0 !important; background: transparent !important; padding: 0 !important; }

@media (max-width: 1000px) {
  .site-width { width: min(100% - 24px,var(--site)); }
  .site-layout { grid-template-columns: 1fr; }
  .sidebar-toggle { display: flex; }
  .app-sidebar { position: fixed; z-index: 100; top: 106px; left: 0; bottom: 0; width: min(280px,84vw); transform: translateX(-101%); overflow-y: auto; }
  body.sidebar-open .app-sidebar { transform: translateX(0); }
  .sidebar-overlay { position: fixed; z-index: 90; inset: 106px 0 0; background: rgba(0,0,0,.66); }
  body.sidebar-open .sidebar-overlay { display: block; }
  .community-layout { grid-template-columns: 1fr; }
  .community-sidebar { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
  .settings-grid { grid-template-columns: 1fr; }
  .admin-stat-line { grid-template-columns: repeat(2,1fr); }
  .admin-stat-line > a { border-bottom: 1px solid var(--border); }
  .member-row { grid-template-columns: 42px minmax(160px,1fr) 90px 17px; }
  .member-stat:nth-of-type(2), .member-stat.last-seen { display: none; }
}

@media (max-width: 700px) {
  .brand-bar { height: 58px; }
  .brand-link { font-size: 16px; }
  .account-trigger { min-width: 0; }
  .account-copy { display: none; }
  .notification-dropdown { position: fixed; left: 12px; right: 12px; top: 62px; width: auto; }
  .account-dropdown { right: 0; }
  .primary-links a { padding: 0 11px; font-size: 12px; }
  .app-sidebar { top: 100px; }
  .sidebar-overlay { top: 100px; }
  .site-layout { padding-top: 12px; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .member-search, .admin-search { width: 100%; }
  .profile-top { align-items: flex-start; flex-wrap: wrap; padding: 15px; }
  .profile-avatar-large { width: 72px; height: 72px; font-size: 24px; }
  .profile-top > .button { margin-left: 89px; }
  .profile-stats-strip { grid-template-columns: 1fr; }
  .profile-stats-strip > div { min-height: 46px; border-right: 0; border-bottom: 1px solid var(--border-soft); }
  .profile-stats-strip > div:last-child { border-bottom: 0; }
  .profile-footer-line { align-items: flex-start; flex-direction: column; gap: 3px; padding-block: 10px; }
  .profile-post-compose { grid-template-columns: 31px minmax(0,1fr); }
  .profile-post-compose .button { grid-column: 2; justify-self: end; }
  .account-columns { grid-template-columns: 1fr; }
  .member-row { grid-template-columns: 38px minmax(0,1fr) 15px; }
  .member-stat { display: none; }
  .community-sidebar { grid-template-columns: 1fr; }
  .chat-messages { height: 430px; }
  .chat-compose-footer { align-items: flex-end; }
  .chat-compose-footer span { max-width: 190px; }
  .readonly-role-row { grid-template-columns: 1fr; }
  .readonly-role-row small { justify-self: start; }
  .notification-page-row { grid-template-columns: 8px 1fr; }
  .notification-page-row time { grid-column: 2; text-align: left; }
  .admin-stat-line { grid-template-columns: 1fr; }
  .admin-stat-line > a { border-right: 0; }
  .admin-user-row { grid-template-columns: 34px minmax(0,1fr) 85px; }
  .admin-user-row .status-text, .admin-user-row .row-date { display: none; }
  .audit-compact-list > div { grid-template-columns: 100px 1fr; }
  .audit-compact-list > div small, .audit-compact-list > div .user-name { display: none; }
  .inline-admin-form { align-items: stretch; flex-direction: column; }
  .row-form { width: 100%; }
  .moderation-row { align-items: flex-start; flex-direction: column; }
  .landing-card { padding: 30px 22px; }
}

/* Community compact pass v6 */
.user-name.role-supporter, .role-supporter { color: #aa91ff !important; }
.role-label-supporter { border-color: #5d4d8b; background: #181529; color: #b9a6ff; }
.header-avatar, .member-avatar, .mini-avatar, .chat-avatar, .post-avatar, .profile-avatar-large {
  border-radius: 2px;
}
.header-avatar { width: 31px; height: 31px; border-radius: 2px; background: #171b21; }
.account-trigger { min-width: 170px; height: 43px; }
.dropdown-user .header-avatar { border-radius: 2px; }

/* compact public profile */
.profile-page { width: min(100%, 900px); }
.profile-summary {
  margin-bottom: 18px;
  border-top: 2px solid var(--red);
  border-bottom: 1px solid var(--border);
  background: #101318;
}
.profile-summary-main { display: flex; align-items: flex-start; gap: 13px; padding: 14px 15px 12px; }
.profile-avatar-square {
  width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 auto;
  border: 1px solid #463039; background: #1f1418; color: #fff; font-size: 18px; font-weight: 800;
}
.profile-summary-copy { min-width: 0; flex: 1; }
.profile-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 24px; }
.profile-title-line h1 { margin: 0; font-size: 21px; line-height: 1.2; }
.role-label { height: 19px; padding: 0 6px; font-size: 9px; }
.profile-state { display: inline-flex; align-items: center; gap: 6px; margin-left: 3px; color: #8e96a0; font-size: 11px; }
.profile-state i { width: 5px; height: 5px; border-radius: 50%; background: #747d87; }
.profile-state.active { color: #72c995; }
.profile-state.active i { background: var(--green); }
.profile-state.banned, .profile-state.disabled { color: #d9747e; }
.profile-state.banned i, .profile-state.disabled i { background: #d65f6a; }
.profile-meta-line { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 6px; color: #737c87; font-size: 11px; }
.profile-meta-line b { color: #b8bec6; font-weight: 600; }
.profile-actions { display: flex; align-items: flex-start; gap: 10px; margin-left: auto; padding-top: 2px; }
.profile-about-inline { padding: 11px 15px 12px 74px; border-top: 1px solid var(--border-soft); }
.profile-about-inline p { margin: 0; color: #bdc3ca; line-height: 1.55; white-space: normal; overflow-wrap: anywhere; }
.profile-about-inline small { display: block; margin-top: 7px; color: #747d87; font-style: italic; }
.profile-notice { padding: 8px 15px 9px 74px; border-top: 1px solid #4f252c; color: #d38189; font-size: 11px; }
.compact-moderation { position: relative; }
.compact-moderation > summary { list-style: none; color: #c96a73; font-size: 12px; font-weight: 650; cursor: pointer; }
.compact-moderation > summary::-webkit-details-marker { display: none; }
.compact-moderation[open] > form {
  position: absolute; z-index: 20; right: 0; top: 25px; width: 270px; padding: 12px;
  border: 1px solid var(--border); background: #111419; box-shadow: 0 14px 28px rgba(0,0,0,.45);
}
.compact-moderation form label { display: block; margin-bottom: 9px; }
.compact-moderation form label span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.compact-moderation form select, .compact-moderation form input { height: 34px; }

/* profile wall as text timeline */
.profile-wall { border-top: 1px solid var(--border); }
.section-line { min-height: 39px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); }
.section-line h2 { margin: 0; font-size: 14px; }
.section-line > span { color: #69727d; font-size: 11px; }
.wall-compose { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: end; padding: 11px 0; border-bottom: 1px solid var(--border-soft); }
.wall-compose textarea { min-height: 52px; }
.wall-list { display: flex; flex-direction: column; }
.wall-entry { padding: 10px 0 11px; border-bottom: 1px solid var(--border-soft); }
.wall-entry-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; min-height: 20px; }
.wall-entry-meta time { color: #68717c; font-size: 10px; }
.wall-entry-meta form { margin-left: auto; }
.inline-role { color: #68717c; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.wall-entry p { margin: 2px 0 0; color: #c4c9cf; overflow-wrap: anywhere; }
.plain-empty { padding: 25px 0; color: var(--muted); text-align: center; }

/* flat shared chat */
.chat-page { width: min(100%, 920px); }
.chat-page-heading { margin-bottom: 0; }
.flat-chat { border-bottom: 1px solid var(--border); }
.chat-lines { height: 560px; overflow-y: auto; padding: 7px 0; background: #0d1014; }
.chat-line { display: grid; grid-template-columns: 112px max-content 8px minmax(0,1fr); gap: 7px; align-items: baseline; padding: 5px 10px; }
.chat-line:hover { background: #11151a; }
.chat-line time { color: #646d78; font-size: 10px; white-space: nowrap; }
.chat-line .user-name { font-size: 12px; }
.chat-separator { color: #59616b; }
.chat-line p { min-width: 0; margin: 0; color: #c8cdd3; overflow-wrap: anywhere; }
.compact-chat-compose { padding: 10px 0 0; border-top: 1px solid var(--border); background: transparent; }
.compact-chat-compose textarea { min-height: 54px; max-height: 130px; }
.chat-compose-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 7px; }
.chat-compose-actions span { color: #68717c; font-size: 10px; }

/* statuses are labels, not buttons */
.plain-state { color: #8c949f; font-size: 11px; }
.plain-state.active { color: #72c995; }
.plain-state.revoked { color: #d0717a; }

/* moderation */
.moderation-shell { width: min(100%, 980px); }
.moderation-message-line { display: grid; grid-template-columns: 120px 135px minmax(0,1fr) auto; gap: 10px; align-items: baseline; padding: 8px 12px; border-bottom: 1px solid var(--border-soft); }
.moderation-message-line time { color: #69727d; font-size: 10px; }
.moderation-message-line p { margin: 0; color: #c1c7ce; overflow-wrap: anywhere; }
.moderation-message-line.deleted { opacity: .5; }

@media (max-width: 700px) {
  .profile-summary-main { flex-wrap: wrap; }
  .profile-avatar-square { width: 40px; height: 40px; }
  .profile-actions { width: 100%; margin-left: 53px; }
  .profile-about-inline, .profile-notice { padding-left: 15px; }
  .compact-moderation[open] > form { position: fixed; left: 12px; right: 12px; top: 120px; width: auto; }
  .wall-compose { grid-template-columns: 1fr; }
  .wall-compose .button { justify-self: end; }
  .chat-lines { height: 470px; }
  .chat-line { grid-template-columns: 72px max-content 6px minmax(0,1fr); gap: 5px; padding-inline: 5px; }
  .chat-line time { font-size: 9px; }
  .moderation-message-line { grid-template-columns: 90px 1fr auto; }
  .moderation-message-line p { grid-column: 1 / -1; }
}
.chat-lines { height: 430px; }
@media (max-width: 700px) { .chat-lines { height: 390px; } }

/* Community and analytics pass v7 */
.forum-profile-page { width: min(100%, 980px); }
.forum-profile-card {
  margin-bottom: 20px;
  overflow: visible;
  border: 1px solid var(--border);
  border-top: 2px solid var(--red);
  background: #111419;
}
.forum-profile-head {
  min-height: 152px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 22px;
  background: #151920;
}
.forum-profile-avatar {
  width: 108px;
  height: 108px;
  display: grid;
  place-items: center;
  flex: 0 0 108px;
  border: 1px solid #55323a;
  background: #241519;
  color: #fff;
  font-size: 34px;
  font-weight: 800;
}
.forum-profile-identity { min-width: 0; flex: 1; align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.forum-profile-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.forum-profile-name-row h1 { margin: 0; font-size: 29px; line-height: 1.1; letter-spacing: -.02em; }
.forum-profile-title { margin: 6px 0 0; color: #aab1ba; font-size: 13px; }
.forum-profile-bio { max-width: 640px; margin-top: 13px; color: #c9ced4; line-height: 1.55; overflow-wrap: anywhere; }
.forum-profile-actions { min-width: 150px; align-self: flex-start; display: flex; flex-direction: column; align-items: flex-end; gap: 11px; padding-top: 3px; }
.forum-profile-actions .profile-state { margin: 0; }
.forum-profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr 1.6fr;
  border-top: 1px solid var(--border);
  background: #11151a;
}
.forum-profile-stats > div { min-height: 68px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 8px 12px; border-right: 1px solid var(--border-soft); text-align: center; }
.forum-profile-stats > div:last-child { border-right: 0; }
.forum-profile-stats span { color: #7c8590; font-size: 11px; }
.forum-profile-stats strong { color: #eef0f3; font-size: 14px; font-weight: 650; }
.forum-profile-stats > div:nth-child(-n+2) strong { font-size: 20px; }
.forum-profile-signature { padding: 10px 22px; border-top: 1px solid var(--border-soft); color: #858e99; font-size: 12px; font-style: italic; }
.forum-profile-card .profile-notice { padding-left: 22px; }
.profile-wall { border: 1px solid var(--border); background: #101318; }
.profile-wall .section-line { padding: 0 14px; background: #14181d; }
.profile-wall .wall-compose { padding: 12px 14px; }
.profile-wall .wall-list { padding: 0 14px; }

.community-grid { display: grid; grid-template-columns: minmax(0,1fr) 270px; gap: 16px; align-items: start; }
.chat-board { min-width: 0; border: 1px solid var(--border); background: #101318; }
.chat-board-header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 15px; border-bottom: 1px solid var(--border); background: #15191f; }
.chat-board-header h1 { margin: 0; color: #f2f3f5; font-size: 20px; }
.chat-board-header p { margin: 2px 0 0; color: #737c87; font-size: 11px; }
.chat-board .chat-lines { height: 505px; padding: 0; background: #0d1014; }
.chat-board .chat-line {
  min-height: 38px;
  display: grid;
  grid-template-columns: 190px minmax(0,1fr);
  gap: 14px;
  align-items: start;
  padding: 9px 13px;
  border-bottom: 1px solid #1b2026;
}
.chat-board .chat-line:nth-child(even) { background: #0f1216; }
.chat-board .chat-line:hover { background: #14181d; }
.chat-line-meta { min-width: 0; display: grid; grid-template-columns: 68px minmax(0,1fr); gap: 10px; align-items: baseline; }
.chat-line-meta time { color: #66707b; font-size: 10px; white-space: nowrap; }
.chat-line-meta .user-name { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.chat-board .chat-line p { min-width: 0; margin: 0; color: #d0d4da; line-height: 1.48; overflow-wrap: anywhere; }
.chat-board .compact-chat-compose { padding: 12px 13px 13px; border-top: 1px solid var(--border); background: #14181d; }
.chat-board .compact-chat-compose textarea { min-height: 66px; background: #0c0f13; }
.community-sidebar { display: flex; flex-direction: column; gap: 14px; }
.rules-panel, .community-links-panel { border: 1px solid var(--border); background: #111419; }
.rules-panel header { height: 43px; display: flex; align-items: center; padding: 0 13px; border-bottom: 1px solid var(--border); background: #15191f; }
.rules-panel h2 { margin: 0; color: #eceef1; font-size: 14px; }
.rules-panel ol { margin: 0; padding: 12px 15px 8px 32px; color: #b7bdc5; }
.rules-panel li { margin-bottom: 9px; padding-left: 3px; font-size: 12px; line-height: 1.45; }
.rules-panel li::marker { color: #d33b49; font-weight: 700; }
.rules-panel > p { margin: 0; padding: 10px 13px 12px; border-top: 1px solid var(--border-soft); color: #737c87; font-size: 10px; line-height: 1.45; }
.community-links-panel a { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 13px; border-bottom: 1px solid var(--border-soft); color: #aeb5be; font-size: 12px; }
.community-links-panel a:last-child { border-bottom: 0; }
.community-links-panel a:hover { background: #171b20; color: #fff; }
.community-links-panel b { color: #737c87; font-weight: 650; }

/* Admin statistics */
.statistics-heading { align-items: flex-end; }
.period-tabs { display: flex; border: 1px solid var(--border); background: #101318; }
.period-tabs a { min-height: 34px; display: flex; align-items: center; padding: 0 12px; border-right: 1px solid var(--border); color: #8f98a3; font-size: 11px; font-weight: 650; }
.period-tabs a:last-child { border-right: 0; }
.period-tabs a:hover { color: #fff; background: #171b20; }
.period-tabs a.active { color: #fff; background: #261419; box-shadow: inset 0 -2px 0 var(--red); }
.statistics-summary { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); margin-bottom: 15px; border: 1px solid var(--border); background: #111419; }
.statistics-summary > div { min-width: 0; min-height: 92px; display: flex; flex-direction: column; justify-content: center; padding: 12px 13px; border-right: 1px solid var(--border); }
.statistics-summary > div:last-child { border-right: 0; }
.statistics-summary span { color: #848d98; font-size: 10px; }
.statistics-summary strong { margin: 3px 0 1px; color: #f2f3f5; font-size: 24px; line-height: 1.1; }
.statistics-summary small { color: #68717c; font-size: 10px; }
.statistics-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-bottom: 14px; }
.chart-panel { min-width: 0; border: 1px solid var(--border); background: #111419; }
.chart-panel-wide { grid-column: 1 / -1; }
.chart-panel > header { min-height: 55px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 14px; border-bottom: 1px solid var(--border); background: #15191f; }
.chart-panel h2 { margin: 0; color: #eef0f2; font-size: 14px; }
.chart-panel header p { margin: 2px 0 0; color: #727b86; font-size: 10px; }
.chart-legend { display: flex; align-items: center; gap: 6px; color: #858e99; font-size: 10px; }
.chart-legend i { width: 8px; height: 8px; display: inline-block; margin-left: 8px; }
.legend-red { background: #e12638; }
.legend-blue { background: #648bd8; }
.chart-canvas-wrap { position: relative; height: 290px; padding: 12px 10px 8px; }
.chart-canvas-wrap.compact { height: 245px; }
.chart-canvas-wrap canvas { width: 100%; height: 100%; display: block; }
.statistics-bottom-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.distribution-list { padding: 11px 13px 13px; }
.distribution-row + .distribution-row { margin-top: 13px; }
.distribution-row > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px; color: #aeb5be; font-size: 11px; }
.distribution-row b { color: #eef0f2; }
.distribution-track { height: 5px; overflow: hidden; background: #242a31; }
.distribution-track i { height: 100%; display: block; background: #c92a39; }
.peak-list { padding: 4px 13px; }
.peak-list > div { min-height: 54px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 3px 12px; border-bottom: 1px solid var(--border-soft); }
.peak-list > div:last-child { border-bottom: 0; }
.peak-list span { color: #9098a2; font-size: 11px; }
.peak-list b { grid-row: span 2; color: #fff; font-size: 22px; }
.peak-list time, .peak-list small { color: #68717c; font-size: 10px; }
.top-activity-panel { margin-top: 14px; }
.top-activity-list > div { min-height: 43px; display: grid; grid-template-columns: 28px minmax(130px,1fr) 160px auto; gap: 10px; align-items: center; padding: 0 13px; border-bottom: 1px solid var(--border-soft); }
.top-activity-list > div:last-child { border-bottom: 0; }
.activity-place { color: #69727d; font-size: 11px; }
.top-activity-list > div > span:nth-child(3) { color: #747d87; font-size: 10px; }
.top-activity-list b { color: #c7ccd2; font-size: 11px; }

@media (max-width: 1050px) {
  .statistics-summary { grid-template-columns: repeat(3,1fr); }
  .statistics-summary > div:nth-child(3) { border-right: 0; }
  .statistics-summary > div:nth-child(-n+3) { border-bottom: 1px solid var(--border); }
  .statistics-bottom-grid { grid-template-columns: 1fr 1fr; }
  .statistics-bottom-grid > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .community-grid { grid-template-columns: 1fr; }
  .community-sidebar { display: grid; grid-template-columns: 1fr 1fr; }
  .forum-profile-head { align-items: flex-start; flex-wrap: wrap; }
  .forum-profile-actions { min-width: 0; margin-left: 128px; flex-direction: row; align-items: center; }
  .forum-profile-stats { grid-template-columns: repeat(2,1fr); }
  .forum-profile-stats > div:nth-child(2) { border-right: 0; }
  .forum-profile-stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--border-soft); }
}
@media (max-width: 700px) {
  .forum-profile-head { padding: 15px; gap: 13px; }
  .forum-profile-avatar { width: 78px; height: 78px; flex-basis: 78px; font-size: 25px; }
  .forum-profile-name-row h1 { font-size: 23px; }
  .forum-profile-actions { width: 100%; margin-left: 91px; }
  .forum-profile-stats { grid-template-columns: 1fr; }
  .forum-profile-stats > div { min-height: 54px; border-right: 0; border-bottom: 1px solid var(--border-soft); }
  .forum-profile-stats > div:last-child { border-bottom: 0; }
  .community-sidebar { grid-template-columns: 1fr; }
  .chat-board .chat-line { grid-template-columns: 1fr; gap: 4px; padding: 8px 9px; }
  .chat-line-meta { grid-template-columns: 64px minmax(0,1fr); }
  .statistics-heading { align-items: stretch; }
  .period-tabs { overflow-x: auto; }
  .period-tabs a { flex: 1 0 auto; justify-content: center; }
  .statistics-summary { grid-template-columns: repeat(2,1fr); }
  .statistics-summary > div { border-bottom: 1px solid var(--border); }
  .statistics-summary > div:nth-child(odd) { border-right: 1px solid var(--border); }
  .statistics-summary > div:nth-child(even) { border-right: 0; }
  .statistics-grid, .statistics-bottom-grid { grid-template-columns: 1fr; }
  .statistics-bottom-grid > :last-child { grid-column: auto; }
  .chart-panel-wide { grid-column: auto; }
  .chart-canvas-wrap { height: 245px; }
  .top-activity-list > div { grid-template-columns: 24px 1fr auto; }
  .top-activity-list > div > span:nth-child(3) { display: none; }
}
.legend-green { background: #5bbf83; }
.legend-purple { background: #9b82d6; }

/* Community portal v8: avatars, forum chat, captcha and launcher */
.header-avatar,
.user-avatar,
.profile-avatar,
.profile-post-avatar,
.chat-avatar,
.chat-member-avatar,
.settings-avatar,
.member-avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid #39414b;
  background: #1a1f26;
  color: #fff;
  font-weight: 800;
}
.header-avatar img,
.user-avatar img,
.profile-avatar img,
.profile-post-avatar img,
.chat-avatar img,
.chat-member-avatar img,
.settings-avatar img,
.member-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.header-avatar { border-radius: 3px; }
.role-supporter, .user-name.role-supporter { color: #ad85e8 !important; }
.role-label-supporter { border-color: #5b4776; color: #c3a5ec; background: #1b1622; }

/* Profile */
.profile-page { max-width: 980px; }
.profile-hero {
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-top: 2px solid var(--red);
  background: #12161b;
}
.profile-hero-main {
  min-height: 176px;
  display: grid;
  grid-template-columns: 142px minmax(0,1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px 20px;
  background: #15191f;
}
.profile-avatar { width: 142px; height: 142px; border-radius: 4px; border-color: #543138; background: #211418; font-size: 44px; }
.profile-identity { min-width: 0; align-self: center; }
.profile-name-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-name-line h1 { margin: 0; color: #fff; font-size: 30px; line-height: 1.12; letter-spacing: -.025em; }
.profile-bio { max-width: 610px; margin-top: 13px; color: #b7bec7; line-height: 1.65; overflow-wrap: anywhere; }
.profile-bio.muted { color: #737c87; }
.profile-actions { align-self: start; display: flex; align-items: flex-end; flex-direction: column; gap: 9px; }
.profile-facts { display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid var(--border); background: #101318; }
.profile-facts > div { min-height: 66px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-right: 1px solid var(--border-soft); text-align: center; }
.profile-facts > div:last-child { border-right: 0; }
.profile-facts span { color: #7c8590; font-size: 11px; }
.profile-facts strong { color: #e5e8ec; font-size: 13px; font-weight: 650; }
.profile-signature { padding: 11px 20px; border-top: 1px solid var(--border-soft); color: #8f98a4; font-size: 12px; }
.profile-notice { padding: 9px 20px; border-top: 1px solid #5c2d34; background: #1d1215; color: #de8b93; font-size: 12px; }
.compact-moderation { position: relative; }
.compact-moderation > summary { list-style: none; min-height: 31px; display: flex; align-items: center; padding: 0 11px; border: 1px solid var(--border); background: #15191f; cursor: pointer; font-size: 12px; font-weight: 700; }
.compact-moderation > summary::-webkit-details-marker { display: none; }
.compact-moderation > form { position: absolute; z-index: 12; right: 0; top: 38px; width: 290px; padding: 12px; border: 1px solid var(--border); background: #12161b; box-shadow: 0 18px 36px rgba(0,0,0,.45); }
.compact-moderation label { display: flex; flex-direction: column; gap: 5px; margin-bottom: 9px; }
.compact-moderation label span { color: #8f98a4; font-size: 11px; }
.profile-wall { border: 1px solid var(--border); background: #101318; }
.section-line { min-height: 43px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 1px solid var(--border); background: #14181d; }
.section-line h2 { margin: 0; font-size: 14px; }
.section-line span { color: #717a85; font-size: 11px; }
.wall-compose { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.wall-compose textarea { min-height: 58px; }
.wall-list { display: flex; flex-direction: column; }
.profile-post { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 11px; padding: 12px 14px; border-bottom: 1px solid var(--border-soft); }
.profile-post:last-child { border-bottom: 0; }
.profile-post:hover { background: #13171c; }
.profile-post-avatar { width: 42px; height: 42px; border-radius: 3px; font-size: 14px; }
.profile-post-body { min-width: 0; }
.profile-post-meta { min-height: 20px; display: flex; align-items: baseline; gap: 8px; }
.profile-post-meta > span, .profile-post-meta time { color: #6f7883; font-size: 10px; }
.profile-post-meta form { margin-left: auto; }
.profile-post-body p { margin: 4px 0 0; color: #d0d4da; line-height: 1.55; overflow-wrap: anywhere; }

/* Chat */
.chat-module { overflow: hidden; border: 1px solid var(--border); background: #111419; }
.chat-module-head { height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 1px solid var(--border); background: #161a20; }
.chat-title { display: flex; align-items: center; gap: 8px; }
.chat-title svg { color: #8d96a1; }
.chat-title h1 { margin: 0; font-size: 16px; }
.chat-head-actions a { color: #a8b0bb; font-size: 12px; font-weight: 650; }
.chat-head-actions a:hover { color: #fff; }
.chat-tabs { height: 38px; display: flex; align-items: center; gap: 18px; padding: 0 13px; border-bottom: 1px solid var(--border); background: #12161b; color: #737c87; font-size: 12px; }
.chat-tabs span.active { color: #fff; font-weight: 700; }
.chat-workspace { display: grid; grid-template-columns: minmax(0,1fr) 230px; min-height: 590px; }
.chat-message-pane { min-width: 0; display: grid; grid-template-rows: minmax(0,1fr) auto; border-right: 1px solid var(--border); }
.modern-chat-lines { height: 500px; overflow-y: auto; padding: 7px 0; background: #0f1216; }
.chat-message { min-height: 43px; display: grid; grid-template-columns: 30px minmax(0,1fr) 112px; gap: 10px; align-items: start; padding: 6px 12px; border-bottom: 0; }
.chat-message:hover { background: #14181d; }
.chat-avatar { width: 30px; height: 30px; border-radius: 50%; font-size: 11px; }
.chat-message-content { min-width: 0; padding-top: 4px; }
.chat-message-line { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.chat-message-line .user-name { flex: 0 0 auto; font-size: 13px; }
.chat-message-line p { min-width: 0; margin: 0; color: #d3d7dd; line-height: 1.45; overflow-wrap: anywhere; }
.chat-message > time { padding-top: 6px; color: #6f7883; font-size: 10px; text-align: right; white-space: nowrap; }
.forum-chat-compose { padding: 0; border-top: 1px solid var(--border); background: #15191f; }
.forum-chat-compose textarea { min-height: 72px; max-height: 170px; border: 0; border-radius: 0; background: #15191f; box-shadow: none !important; padding: 13px 14px; }
.chat-compose-footer { min-height: 42px; margin: 0; padding: 7px 10px 8px 14px; border-top: 1px solid var(--border-soft); }
.chat-side-pane { background: #14181d; }
.chat-side-section { border-bottom: 1px solid var(--border); }
.chat-side-section h2 { height: 39px; display: flex; align-items: center; margin: 0; padding: 0 12px; color: #c8cdd4; font-size: 12px; background: #171b21; border-bottom: 1px solid var(--border-soft); }
.chat-member-list { max-height: 290px; overflow-y: auto; padding: 5px 0; }
.chat-member-list > a { display: flex; align-items: center; gap: 9px; min-height: 43px; padding: 5px 10px; }
.chat-member-list > a:hover { background: #1b2027; }
.chat-member-avatar { width: 30px; height: 30px; border-radius: 50%; font-size: 10px; }
.chat-member-list > a > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.chat-member-list small { color: #707985; font-size: 10px; }
.rules-compact ul { margin: 0; padding: 11px 13px 14px 27px; color: #929ba6; font-size: 11px; line-height: 1.55; }
.rules-compact li + li { margin-top: 5px; }

/* Avatar settings */
.settings-column { min-width: 0; }
.avatar-settings-row { display: grid; grid-template-columns: 118px minmax(0,1fr); gap: 16px; padding: 15px; }
.settings-avatar { width: 118px; height: 118px; border-radius: 4px; font-size: 34px; }
.avatar-settings-copy > b { color: #f0f1f3; }
.avatar-settings-copy > p { margin: 5px 0; color: #858e99; font-size: 11px; }
.admin-avatar-note { color: #c69198 !important; }
.avatar-upload-form { display: flex; align-items: center; gap: 9px; margin: 12px 0 8px; }
.avatar-upload-form input[type=file] { height: auto; padding: 7px; }

/* Captcha */
.register-card { width: min(470px,100%); }
.captcha-widget { margin: 16px 0; border: 1px solid #323943; background: #101318; }
.captcha-check { width: 100%; min-height: 68px; display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: 11px; align-items: center; padding: 10px 12px; border: 0; background: transparent; color: #dce0e5; text-align: left; cursor: pointer; }
.captcha-check:hover { background: #15191f; }
.captcha-box { width: 24px; height: 24px; display: grid; place-items: center; border: 2px solid #5a6470; background: #0c0f13; }
.captcha-widget.open .captcha-box { border-color: #a42b38; }
.captcha-widget.ready .captcha-box { border-color: #367851; background: #173021; }
.captcha-widget.ready .captcha-box i { width: 10px; height: 6px; border-left: 2px solid #7fdda1; border-bottom: 2px solid #7fdda1; transform: rotate(-45deg) translateY(-1px); }
.captcha-check > span:nth-child(2) { display: flex; flex-direction: column; }
.captcha-check b { font-size: 13px; }
.captcha-check small { color: #747d88; font-size: 10px; }
.captcha-brand { display: flex; align-items: center; gap: 6px; color: #8d96a1; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.captcha-brand .brand-mark { width: 15px; height: 15px; }
.captcha-brand .brand-mark::after { inset: 3px; }
.captcha-challenge { padding: 12px; border-top: 1px solid var(--border); background: #15191f; }
.captcha-image-shell { display: grid; grid-template-columns: minmax(0,1fr) 42px; gap: 8px; }
.captcha-image-shell img { width: 100%; height: 76px; display: block; object-fit: cover; border: 1px solid #343b45; background: #0d1014; }
.captcha-image-shell button { display: grid; place-items: center; border: 1px solid #343b45; background: #101318; color: #9fa7b2; cursor: pointer; }
.captcha-image-shell button:hover { color: #fff; border-color: #59626e; }
.captcha-challenge label { display: flex; flex-direction: column; gap: 5px; margin-top: 9px; }
.captcha-challenge label span { color: #9aa2ad; font-size: 11px; }
.captcha-challenge input { text-transform: uppercase; letter-spacing: .18em; font-weight: 750; }

/* Launcher */
.launcher-heading { align-items: center; }
.launcher-build-list { display: flex; flex-direction: column; gap: 13px; }
.launcher-build { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; align-items: center; padding: 17px; border: 1px solid var(--border); background: #12161b; }
.launcher-build.latest { border-top: 2px solid var(--red); }
.launcher-build-main { min-width: 0; display: grid; grid-template-columns: 125px minmax(0,1fr); gap: 18px; }
.launcher-version { display: flex; flex-direction: column; justify-content: center; padding-right: 17px; border-right: 1px solid var(--border); }
.launcher-version > span { color: #e55f6b; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.launcher-version strong { margin-top: 4px; color: #fff; font-size: 25px; }
.launcher-version small { margin-top: 4px; color: #7c8590; font-size: 10px; }
.launcher-info h2 { margin: 0; color: #f0f2f4; font-size: 17px; }
.launcher-meta { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 5px; color: #77808b; font-size: 10px; }
.launcher-changelog { margin-top: 11px; color: #b7bec7; line-height: 1.58; }
.launcher-hash { display: flex; gap: 9px; align-items: center; margin-top: 11px; min-width: 0; }
.launcher-hash span { color: #707985; font-size: 9px; }
.launcher-hash code { min-width: 0; overflow: hidden; color: #8f98a4; font-family: Consolas, monospace; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.launcher-download { white-space: nowrap; }
.launcher-admin-form, .launcher-edit-form { padding: 15px; }
.launcher-form-grid { display: grid; grid-template-columns: 150px 130px minmax(220px,1fr); gap: 11px; }
.launcher-form-grid .field.grow { min-width: 0; }
.launcher-upload-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 12px; align-items: center; }
.launcher-upload-row input[type=file] { height: auto; padding: 8px; }
.checkbox-line { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 7px !important; margin: 0 !important; color: #aeb5be; font-size: 12px; }
.checkbox-line input { width: 15px; height: 15px; }
.admin-build-list { display: flex; flex-direction: column; }
.admin-build-row { border-bottom: 1px solid var(--border-soft); }
.admin-build-row:last-child { border-bottom: 0; }
.admin-build-row > summary { min-height: 50px; display: grid; grid-template-columns: 70px 85px minmax(170px,1fr) 180px 90px; gap: 10px; align-items: center; padding: 7px 13px; cursor: pointer; list-style: none; }
.admin-build-row > summary::-webkit-details-marker { display: none; }
.admin-build-row > summary:hover { background: #171b20; }
.admin-build-row > summary small { color: #717a85; }
.admin-build-row > summary em { color: #8fd3a8; font-size: 10px; font-style: normal; text-align: right; }
.build-channel { display: inline-flex; justify-content: center; padding: 3px 6px; border: 1px solid #434b56; color: #aab1bb; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.channel-stable { border-color: #316647; color: #7fd39c; }
.channel-beta { border-color: #70522c; color: #deb06a; }
.channel-dev { border-color: #69313a; color: #ed7d87; }
.admin-build-row[open] > summary { background: #171b20; border-bottom: 1px solid var(--border); }
.launcher-edit-form { background: #0f1216; }
.build-file-info { display: grid; grid-template-columns: 180px minmax(0,1fr) 130px; gap: 10px; align-items: center; margin: 3px 0 12px; padding: 9px 10px; border: 1px solid var(--border-soft); color: #8c949f; font-size: 10px; }
.build-file-info code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-actions.split { justify-content: space-between; align-items: center; }
.build-delete-form { padding: 0 15px 14px; background: #0f1216; text-align: right; }

@media (max-width: 1000px) {
  .profile-hero-main { grid-template-columns: 118px minmax(0,1fr); }
  .profile-avatar { width: 118px; height: 118px; }
  .profile-actions { grid-column: 1 / -1; flex-direction: row; align-items: center; }
  .chat-workspace { grid-template-columns: 1fr; }
  .chat-message-pane { border-right: 0; }
  .chat-side-pane { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--border); }
  .chat-side-section { border-bottom: 0; border-right: 1px solid var(--border); }
  .chat-side-section:last-child { border-right: 0; }
  .launcher-build { grid-template-columns: 1fr; }
  .launcher-download { justify-self: start; }
}

@media (max-width: 700px) {
  .profile-hero-main { grid-template-columns: 82px minmax(0,1fr); gap: 13px; padding: 14px; }
  .profile-avatar { width: 82px; height: 82px; font-size: 28px; }
  .profile-name-line h1 { font-size: 23px; }
  .profile-facts { grid-template-columns: repeat(2,1fr); }
  .profile-facts > div:nth-child(2) { border-right: 0; }
  .profile-facts > div:nth-child(-n+2) { border-bottom: 1px solid var(--border-soft); }
  .wall-compose { grid-template-columns: 1fr; }
  .profile-post { grid-template-columns: 34px minmax(0,1fr); padding: 10px; }
  .profile-post-avatar { width: 34px; height: 34px; }
  .chat-message { grid-template-columns: 28px minmax(0,1fr); gap: 8px; padding: 6px 9px; }
  .chat-message > time { grid-column: 2; padding: 0; text-align: left; }
  .chat-message-line { display: block; }
  .chat-message-line p { margin-top: 2px; }
  .chat-side-pane { grid-template-columns: 1fr; }
  .chat-side-section { border-right: 0; border-bottom: 1px solid var(--border); }
  .avatar-settings-row { grid-template-columns: 82px minmax(0,1fr); }
  .settings-avatar { width: 82px; height: 82px; }
  .avatar-upload-form { align-items: stretch; flex-direction: column; }
  .captcha-check { grid-template-columns: 28px 1fr; }
  .captcha-brand { display: none; }
  .launcher-build-main { grid-template-columns: 1fr; }
  .launcher-version { padding: 0 0 10px; border-right: 0; border-bottom: 1px solid var(--border); }
  .launcher-form-grid { grid-template-columns: 1fr; }
  .launcher-upload-row { grid-template-columns: 1fr; }
  .admin-build-row > summary { grid-template-columns: 64px 70px 1fr; }
  .admin-build-row > summary small, .admin-build-row > summary em { grid-column: 3; text-align: left; }
  .build-file-info { grid-template-columns: 1fr; }
}

/* Community portal v9: compact chat, support tickets and release notices */
.chat-workspace.chat-workspace-rules {
  grid-template-columns: minmax(0, 1fr) 220px;
  min-height: 560px;
}
.chat-rules-pane { background: #14181d; }
.chat-rules-pane .chat-side-section { height: 100%; border-bottom: 0; }
.chat-rules-pane .rules-compact ul { padding-top: 14px; }
.chat-avatar,
.support-message-avatar {
  border-radius: 4px;
  border-color: #4a3036;
  background: #21161a;
}
.chat-avatar { width: 32px; height: 32px; }
.chat-message { grid-template-columns: 32px minmax(0, 1fr) 88px; padding-top: 7px; padding-bottom: 7px; }
.chat-compose-footer-clean { justify-content: flex-end; }
.chat-form-status:empty { display: none; }
.chat-form-status:not(:empty) { margin-right: auto; color: #c97882; font-size: 11px; }
.launcher-changelog {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* Support */
.support-layout { display: grid; gap: 18px; }
.support-create-form { padding: 15px; }
.support-form-grid { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 11px; }
.support-form-grid .grow { min-width: 0; }
.support-ticket-list { display: flex; flex-direction: column; }
.support-ticket-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 160px 38px;
  gap: 12px;
  align-items: center;
  padding: 8px 13px;
  border-bottom: 1px solid var(--border-soft);
  color: inherit;
}
.support-ticket-row:last-child { border-bottom: 0; }
.support-ticket-row:hover { background: #161a20; }
.support-ticket-number { color: #78828e; font-family: Consolas, monospace; font-size: 11px; }
.support-ticket-main,
.support-owner { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.support-ticket-main b,
.support-owner b { overflow: hidden; color: #e5e8ec; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.support-ticket-main small,
.support-owner small { color: #747e89; font-size: 10px; }
.support-message-count { color: #69727d; font-size: 11px; text-align: right; }
.support-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 7px;
  border: 1px solid #454d57;
  color: #aeb5be;
  background: #15191e;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .02em;
  white-space: nowrap;
}
.support-status-open,
.support-status-waiting_staff { border-color: #6d343c; color: #ef8b94; background: #1d1316; }
.support-status-waiting_user { border-color: #6d562f; color: #dfbd72; background: #1d1911; }
.support-status-closed { border-color: #39414a; color: #7f8994; background: #111419; }

.support-ticket-page { max-width: 980px; border: 1px solid var(--border); background: #101318; }
.support-ticket-head {
  min-height: 105px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-top: 2px solid var(--red);
  border-bottom: 1px solid var(--border);
  background: #15191f;
}
.support-ticket-kicker { display: flex; align-items: center; gap: 7px; color: #6f7883; font-size: 10px; }
.support-ticket-kicker a { color: #9ea6b0; }
.support-ticket-head h1 { margin: 8px 0 7px; color: #f0f2f4; font-size: 21px; }
.support-ticket-meta { display: flex; flex-wrap: wrap; gap: 11px; color: #7b8590; font-size: 10px; }
.support-ticket-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
.support-thread { display: flex; flex-direction: column; }
.support-message {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.support-message.staff-message { background: #14171c; box-shadow: inset 2px 0 #7c2631; }
.support-message-avatar { width: 48px; height: 48px; font-size: 15px; }
.support-message-body { min-width: 0; }
.support-message-body > header { display: flex; align-items: center; gap: 8px; min-height: 21px; }
.support-message-body > header time { margin-left: auto; color: #6c7580; font-size: 10px; }
.staff-reply-label { padding: 2px 5px; border: 1px solid #6d343c; color: #df7c86; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.support-message-body p { margin: 6px 0 0; color: #cdd2d8; line-height: 1.58; white-space: pre-wrap; overflow-wrap: anywhere; }
.support-reply { position: relative; padding: 14px 16px; background: #13171c; }
.support-reply textarea { min-height: 92px; }
.support-reply-actions { display: flex; justify-content: flex-end; margin-top: 9px; }
.support-close-form { position: absolute; left: 16px; bottom: 22px; }
.support-closed-note { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #858e99; font-size: 12px; }

.support-admin-summary { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 16px; border: 1px solid var(--border); background: #12161b; }
.support-admin-summary a { min-height: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-right: 1px solid var(--border-soft); }
.support-admin-summary a:last-child { border-right: 0; }
.support-admin-summary a:hover,
.support-admin-summary a.active { background: #181c22; box-shadow: inset 0 -2px var(--red); }
.support-admin-summary b { color: #f0f2f4; font-size: 20px; }
.support-admin-summary span { color: #79838e; font-size: 10px; }
.support-admin-head { display: flex; justify-content: space-between; gap: 10px; }
.support-admin-head form { display: flex; align-items: center; gap: 7px; }
.support-admin-head input { width: 250px; height: 30px; }
.support-admin-list .support-ticket-row { grid-template-columns: 76px 150px minmax(0, 1fr) 160px 38px; }

@media (max-width: 1000px) {
  .chat-workspace.chat-workspace-rules { grid-template-columns: 1fr; }
  .chat-rules-pane { border-top: 1px solid var(--border); }
  .chat-rules-pane .chat-side-section { border-right: 0; }
  .support-admin-list .support-ticket-row { grid-template-columns: 70px 130px minmax(0, 1fr) 130px; }
  .support-admin-list .support-message-count { display: none; }
}

@media (max-width: 700px) {
  .support-form-grid { grid-template-columns: 1fr; }
  .support-ticket-row,
  .support-admin-list .support-ticket-row { grid-template-columns: 64px minmax(0, 1fr); gap: 6px 9px; }
  .support-ticket-row .support-status { grid-column: 2; }
  .support-ticket-row .support-message-count,
  .support-admin-list .support-owner { display: none; }
  .support-ticket-head { flex-direction: column; }
  .support-ticket-actions { align-items: flex-start; }
  .support-message { grid-template-columns: 38px minmax(0, 1fr); padding: 11px; }
  .support-message-avatar { width: 38px; height: 38px; }
  .support-message-body > header { flex-wrap: wrap; }
  .support-message-body > header time { width: 100%; margin-left: 0; }
  .support-close-form { position: static; margin-top: 10px; }
  .support-admin-summary { grid-template-columns: repeat(2, 1fr); }
  .support-admin-summary a:nth-child(2) { border-right: 0; }
  .support-admin-summary a:nth-child(-n+2) { border-bottom: 1px solid var(--border-soft); }
  .support-admin-head { align-items: stretch; flex-direction: column; }
  .support-admin-head form { width: 100%; }
  .support-admin-head input { width: 100%; }
}
.captcha-image-shell img { height: 92px; object-fit: contain; }

/* Community portal v10: support thread hotfix and concise chat rules */
.chat-module-head { border-bottom: 1px solid var(--border); }
.chat-workspace.chat-workspace-rules { min-height: 540px; }
.rules-compact li { color: #929ba6; }
.rules-compact li b { color: #cfd4da; font-weight: 700; }

.support-thread { overflow: hidden; }
.support-message {
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 76px;
  padding: 12px 15px;
}
.support-message-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #4a3036;
  border-radius: 4px;
  background: #21161a;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}
.support-message-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}
.support-message-avatar > span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}
.support-message-body {
  min-width: 0;
  overflow: hidden;
}
.support-message-body > header {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.support-message-body > header .user-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.support-message-body > header time {
  flex: 0 0 auto;
  margin-left: auto;
  padding-left: 12px;
}
.support-message-body p {
  width: 100%;
  margin: 5px 0 0;
  color: #d2d6dc;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.support-message.staff-message {
  background: #13171c;
  box-shadow: inset 2px 0 #7c2631;
}
.staff-reply-label {
  flex: 0 0 auto;
  border-radius: 2px;
}

@media (max-width: 700px) {
  .support-message {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 9px;
    min-height: 64px;
    padding: 10px;
  }
  .support-message-avatar { width: 36px; height: 36px; font-size: 12px; }
  .support-message-body > header { flex-wrap: wrap; }
  .support-message-body > header time {
    width: 100%;
    margin-left: 0;
    padding-left: 0;
  }
}

/* Security and portal update */
.site-logo-image {
  display: block;
  width: auto;
  max-width: 190px;
  height: 30px;
  object-fit: contain;
  object-position: left center;
}
.brand-fallback { display: inline-flex; align-items: center; gap: 12px; }
.auth-brand-mini { min-height: 10px; margin-bottom: 4px; text-align: center; }
.auth-brand-mini img { width: 42px; height: 42px; object-fit: contain; }

.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 5000;
  width: min(380px, calc(100vw - 28px));
  display: flex;
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}
.toast {
  min-height: 58px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 12px;
  border: 1px solid #343b44;
  border-left: 3px solid #69737e;
  background: #15191e;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .45);
  pointer-events: auto;
  animation: toast-in .18s ease-out both;
}
.toast-good { border-left-color: #42bd77; }
.toast-bad { border-left-color: var(--red); }
.toast-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid #3c454f;
  border-radius: 4px;
  color: #ced4da;
  font-size: 12px;
  font-weight: 900;
}
.toast-good .toast-icon { border-color: #286a48; color: #62dd95; }
.toast-bad .toast-icon { border-color: #73313a; color: #ff6978; }
.toast p { margin: 0; color: #d8dce1; line-height: 1.4; overflow-wrap: anywhere; }
.toast button {
  width: 26px;
  height: 26px;
  border: 0;
  color: #7f8994;
  background: transparent;
  cursor: pointer;
  font-size: 17px;
}
.toast button:hover { color: #fff; }
.toast.leaving { animation: toast-out .18s ease-in both; }
@keyframes toast-in { from { transform: translateX(calc(100% + 30px)); } to { transform: translateX(0); } }
@keyframes toast-out { from { transform: translateX(0); } to { transform: translateX(calc(100% + 30px)); } }

.captcha-widget.verified .captcha-check { border-color: #2f7a53; background: #121b17; }
.captcha-widget.verified .captcha-box { border-color: #47c77c; background: #173824; }
.captcha-widget.verified .captcha-box i::before {
  content: "";
  width: 9px;
  height: 5px;
  display: block;
  border-left: 2px solid #68e49a;
  border-bottom: 2px solid #68e49a;
  transform: rotate(-45deg) translate(1px, -1px);
}
.captcha-widget.checking .captcha-box i {
  width: 12px;
  height: 12px;
  display: block;
  border: 2px solid #5e6873;
  border-top-color: #e12638;
  border-radius: 50%;
  animation: captcha-spin .55s linear infinite;
}
@keyframes captcha-spin { to { transform: rotate(360deg); } }
.captcha-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; }
.captcha-actions > span { min-height: 15px; color: #d26470; font-size: 10px; }
.captcha-widget.verified .captcha-actions > span { color: #5bd48b; }
.captcha-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.captcha-brand { display: flex; align-items: center; gap: 5px; }
.captcha-brand img { width: 20px; height: 20px; object-fit: contain; }

.guest-hero {
  min-height: 430px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(250px, .7fr);
  align-items: center;
  gap: 50px;
  padding: 54px 58px;
  border: 1px solid var(--border);
  border-top: 2px solid var(--red);
  background: #111419;
}
.guest-eyebrow { color: #e4515f; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.guest-hero h1 { max-width: 760px; margin: 13px 0 16px; color: #f2f3f5; font-size: clamp(32px, 4vw, 54px); line-height: 1.06; }
.guest-hero-copy > p { max-width: 720px; margin: 0; color: #9ba4af; font-size: 15px; line-height: 1.7; }
.guest-hero .hero-actions { margin-top: 27px; }
.guest-points { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 28px; color: #aeb5bd; font-size: 11px; }
.guest-points span { display: inline-flex; align-items: center; gap: 7px; }
.guest-points i { width: 6px; height: 6px; border-radius: 2px; background: var(--red); }
.guest-hero-brand {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--border);
  color: #f4f5f6;
}
.guest-hero-brand img { width: 105px; height: 105px; margin-bottom: 18px; object-fit: contain; }
.guest-hero-brand b { font-size: 25px; letter-spacing: .18em; }
.guest-hero-brand small { margin-top: 6px; color: #68727d; font-size: 9px; letter-spacing: .15em; }
.guest-feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-top: 0; }
.guest-feature-grid article { min-height: 135px; padding: 24px; border-right: 1px solid var(--border); background: #0f1216; }
.guest-feature-grid article:last-child { border-right: 0; }
.guest-feature-grid h2 { margin: 0 0 9px; color: #e8eaed; font-size: 15px; }
.guest-feature-grid p { margin: 0; color: #7f8994; line-height: 1.55; }

.support-closed-note > span { display: flex; flex-direction: column; gap: 3px; }
.support-closed-note small { color: #bd737b; }

.log-filter {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) repeat(3, minmax(130px, .8fr)) auto auto;
  align-items: end;
  gap: 9px;
  margin-bottom: 14px;
  padding: 12px;
}
.log-filter label { display: flex; flex-direction: column; gap: 5px; }
.log-filter label > span { color: #707a85; font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.log-level { display: inline-flex; padding: 3px 5px; border: 1px solid #424a54; color: #aab1b9; font-size: 9px; text-transform: uppercase; }
.level-security, .level-error { border-color: #6e3039; color: #ef7985; }
.level-warning { border-color: #69552d; color: #d7b66d; }
.level-info { border-color: #315e4a; color: #6cc995; }
.event-log-table td { vertical-align: top; }
.event-log-table td small { display: block; margin-top: 4px; color: #707a85; }
.log-message { max-width: 480px; white-space: normal; line-height: 1.4; }
.admin-user-side { display: flex; align-items: stretch; gap: 10px; }
.admin-ip-box { min-width: 230px; display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 4px 10px; padding: 8px 10px; border: 1px solid var(--border); background: #11151a; }
.admin-ip-box span { color: #727c87; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.admin-ip-box code { color: #d6dae0; font-size: 10px; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .guest-hero { grid-template-columns: 1fr; padding: 34px 28px; }
  .guest-hero-brand { min-height: 170px; border-top: 1px solid var(--border); border-left: 0; }
  .guest-feature-grid { grid-template-columns: 1fr; }
  .guest-feature-grid article { border-right: 0; border-bottom: 1px solid var(--border); }
  .guest-feature-grid article:last-child { border-bottom: 0; }
  .log-filter { grid-template-columns: 1fr 1fr; }
  .admin-user-side { width: 100%; flex-direction: column; }
}
@media (max-width: 560px) {
  .toast-stack { right: 10px; bottom: 10px; width: calc(100vw - 20px); }
  .guest-hero { padding: 28px 20px; }
  .guest-hero h1 { font-size: 31px; }
  .log-filter { grid-template-columns: 1fr; }
}

/* Logo cleanup and account language */
.brand-mark,
.brand-mark::after { display: none !important; }
.brand-fallback[hidden] { display: none !important; }
.brand-link { gap: 12px; }
.site-logo-mark {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
  object-position: center;
  flex: 0 0 30px;
}
.site-logo-word {
  color: #f5f6f8;
  font-weight: 850;
  font-size: 19px;
  letter-spacing: .15em;
  line-height: 1;
}
.auth-brand-mini {
  min-height: 62px;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.auth-brand-mini img {
  display: block;
  width: 58px;
  height: 58px;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}
.captcha-brand .brand-mark { display: none !important; }
.language-settings-form select { max-width: 320px; }
@media (max-width: 640px) {
  .site-logo-mark { width: 27px; height: 27px; flex-basis: 27px; }
  .site-logo-word { font-size: 16px; }
}


/* Community portal v12: UID, full-width chat and concise launcher heading */
.profile-facts { grid-template-columns: .7fr 1fr 1fr 1.25fr 1.6fr; }
.chat-workspace.chat-workspace-single { grid-template-columns: minmax(0, 1fr); min-height: 540px; }
.chat-workspace.chat-workspace-single .chat-message-pane { border-right: 0; }
@media (max-width: 700px) {
  .profile-facts { grid-template-columns: repeat(2, 1fr); }
  .profile-facts > div { border-right: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
  .profile-facts > div:nth-child(2n) { border-right: 0; }
  .profile-facts > div:last-child { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
}

/* Minimal public landing and visually centered auth logo */
.auth-brand-mini img {
  transform: translateX(-5px);
}
.guest-hero.guest-hero-minimal {
  min-height: 360px;
  grid-template-columns: minmax(0, 1.45fr) minmax(250px, .65fr);
}
.guest-hero-minimal .guest-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.guest-hero-minimal h1 {
  max-width: 760px;
  margin: 0;
}
.guest-hero-minimal .hero-actions {
  margin-top: 30px;
}
.guest-hero-minimal .guest-hero-brand small {
  display: none;
}
.guest-update-strip {
  display: flex;
  align-items: baseline;
  gap: 16px;
  min-height: 88px;
  padding: 24px 30px;
  border: 1px solid var(--border);
  border-top: 0;
  background: #0f1216;
}
.guest-update-strip h2 {
  margin: 0;
  color: #e8eaed;
  font-size: 15px;
}
.guest-update-strip p {
  margin: 0;
  color: #8e98a3;
}
@media (max-width: 900px) {
  .guest-hero.guest-hero-minimal {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .guest-update-strip {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
  }
}


/* Auth logo vertical alignment and chat cooldown hotfix */
.auth-brand-mini {
  min-height: 88px;
  padding-top: 20px;
  margin-bottom: 2px;
  box-sizing: border-box;
}
.auth-brand-mini img {
  transform: translateX(-5px);
}
[data-chat-status] {
  min-height: 16px;
  color: #d88a91;
  font-variant-numeric: tabular-nums;
}

/* Community chat v4 */
.chat-compose-footer-clean { position: relative; }
.chat-compose-tools { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.emoji-toggle { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--border); background: #0f1216; color: #c8ced6; font-size: 17px; cursor: pointer; }
.emoji-toggle:hover, .emoji-toggle[aria-expanded="true"] { border-color: #7d2630; color: #fff; background: #171b20; }
.emoji-panel { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 30; width: 238px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; padding: 7px; border: 1px solid #343b44; background: #11151a; box-shadow: 0 12px 34px rgba(0,0,0,.45); }
.emoji-panel[hidden] { display: none; }
.emoji-panel button { height: 36px; border: 1px solid transparent; background: transparent; font-size: 20px; cursor: pointer; }
.emoji-panel button:hover { border-color: #3c454f; background: #1a1f25; transform: translateY(-1px); }
.chat-mention { display: inline-block; padding: 0 3px; color: #e58b96; font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(225,38,56,.35); }
.chat-mention:hover { color: #fff; background: rgba(225,38,56,.16); }
.chat-mention.is-me { color: #fff; background: rgba(225,38,56,.24); border: 1px solid rgba(225,38,56,.55); line-height: 1.35; }

/* Live notifications */
.notification-item.live-new { animation: notificationPulse .55s ease-out; }
@keyframes notificationPulse { 0% { background: rgba(225,38,56,.28); } 100% { background: transparent; } }
.toast.toast-notification { cursor: pointer; border-color: #5b2a31; }
.toast.toast-notification .toast-icon { color: #ff6f7d; }

/* Community chat v5: typing state and linked device sessions */
.chat-typing {
  min-width: 0;
  max-width: 360px;
  overflow: hidden;
  color: #8f98a3;
  font-size: 11px;
  line-height: 30px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-typing[hidden] { display: none; }
.device-session-row { border-bottom: 1px solid var(--border-soft); }
.device-session-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 14px; }
.device-session-summary { display: flex; align-items: center; gap: 12px; color: #8b949f; font-size: 11px; }
.device-linked-sessions { border-top: 1px solid #242a31; background: #0f1216; }
.device-linked-sessions > div { display: grid; grid-template-columns: 76px minmax(90px,1fr) minmax(90px,1fr) 86px; gap: 10px; align-items: center; min-height: 37px; padding: 5px 14px; border-bottom: 1px solid #1c2127; font-size: 11px; }
.device-linked-sessions > div:last-child { border-bottom: 0; }
.device-linked-sessions code, .device-linked-sessions small { color: #a7afb9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-linked-sessions time { color: #737d88; white-space: nowrap; }
.forum-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 10px 12px; border-top: 1px solid var(--border-soft); }
.forum-pagination a, .forum-pagination span { min-width: 30px; height: 28px; display: grid; place-items: center; padding: 0 8px; border: 1px solid var(--border); background: #11151a; color: #aeb5be; font-size: 11px; }
.forum-pagination a:hover, .forum-pagination .active { border-color: #762631; color: #fff; background: #211419; }
.forum-pagination .gap { border-color: transparent; background: transparent; }
@media (max-width: 720px) {
  .device-session-head { align-items: flex-start; flex-direction: column; }
  .device-session-summary { flex-wrap: wrap; }
  .device-linked-sessions > div { grid-template-columns: 60px minmax(0,1fr); }
  .device-linked-sessions time, .device-linked-sessions .plain-state { grid-column: 2; }
  .chat-typing { max-width: 180px; }
}


/* Chat media v5 */
.notification-badge[hidden] { display: none !important; }
.emoji-panel { width: 326px; max-height: 286px; grid-template-columns: repeat(8, 1fr); overflow-y: auto; overscroll-behavior: contain; }
.emoji-panel button { height: 34px; font-size: 19px; }
.chat-image-button { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 1px solid #343b44; border-radius: 4px; background: #171b20; color: #9da6b0; cursor: pointer; }
.chat-image-button:hover { border-color: #59636f; color: #fff; background: #20252c; }
.chat-image-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.chat-image-selection { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #aeb5be !important; font-size: 10px !important; }
.chat-message-line { flex-wrap: wrap; }
.chat-message-line p { flex: 1 1 auto; }
.chat-image-link { display: block; width: fit-content; max-width: min(620px, 100%); margin-top: 7px; border: 1px solid #2c333b; border-radius: 5px; overflow: hidden; background: #0b0e12; line-height: 0; }
.chat-image-link:hover { border-color: #59636f; }
.chat-image { display: block; width: auto; height: auto; max-width: 100%; max-height: 440px; object-fit: contain; }
.chat-image-missing { display: inline-block; margin-top: 6px; color: #69727d; font-size: 10px; font-style: italic; }
@media (max-width: 620px) {
  .emoji-panel { width: min(300px, calc(100vw - 42px)); grid-template-columns: repeat(7, 1fr); }
  .chat-image-selection { max-width: 120px; }
  .chat-image { max-height: 320px; }
}
.admin-chat-image-link { color: #8ca9d6; text-decoration: none; }
.admin-chat-image-link:hover { text-decoration: underline; }
