:root{
  --bg:#080b10;--bg2:#0b1016;--panel:#101720;--panel2:#0d131b;--line:rgba(255,255,255,.08);
  --text:#f4f7fb;--muted:#8f9db0;--accent:#23d17f;--accent2:#16aa65;--accent-rgb:35,209,127;--danger:#ff6b6b;
  --shadow:0 22px 60px rgba(0,0,0,.35);--radius:18px;--container:1180px
}

html[data-theme="red"]{
  --accent:#ff5d57;
  --accent2:#c93b36;
  --accent-rgb:255,93,87;
}

html[data-theme="blue"]{
  --accent:#4aa8ff;
  --accent2:#247bd8;
  --accent-rgb:74,168,255;
}
*{box-sizing:border-box}
html{background:var(--bg)}
body{margin:0;min-width:320px;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text);background-color:#06090d;background-image:
linear-gradient(180deg,rgba(4,8,12,.84),rgba(4,8,12,.91)),
radial-gradient(circle at 12% 0%,rgba(var(--accent-rgb),.10),transparent 30%),
url("forum-background.webp");background-position:center top,center top,center top;background-size:cover,cover,cover;background-repeat:no-repeat,no-repeat,no-repeat;background-attachment:fixed,fixed,fixed;min-height:100vh}
a{color:inherit;text-decoration:none}
button,input,textarea,select{font:inherit}
.forum-container{width:min(calc(100% - 36px),var(--container));margin:auto}
.forum-header{position:sticky;top:0;z-index:30;border-bottom:1px solid var(--line);background:rgba(7,10,14,.88);backdrop-filter:blur(16px)}
.forum-nav{height:78px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.forum-brand{display:flex;align-items:center;gap:11px}
.logo-box{width:45px;height:45px;display:grid;place-items:center;border-radius:13px;background:rgba(var(--accent-rgb),.1);border:1px solid rgba(var(--accent-rgb),.2);color:var(--accent);font-size:12px;font-weight:1000;letter-spacing:-.03em}
.forum-brand strong,.forum-brand small{display:block}.forum-brand strong{font-size:17px;letter-spacing:.04em}.forum-brand small{color:var(--muted);font-size:9px;letter-spacing:.18em;margin-top:2px}
.forum-links{display:flex;align-items:center;gap:22px;color:#bdc9d8;font-size:13px;font-weight:750}
.forum-links a.active,.forum-links a:hover{color:#fff}.user-chip{padding:8px 11px;border-radius:999px;background:rgba(255,255,255,.045);border:1px solid var(--line)}
.button{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:0 18px;border:1px solid rgba(255,255,255,.09);border-radius:12px;background:linear-gradient(135deg,var(--accent),var(--accent2));color:#06150d;font-weight:900;font-size:13px;cursor:pointer}
.button.small{min-height:38px;padding:0 13px}.button.ghost{background:rgba(255,255,255,.04);color:#dbe5ef}.button.full{width:100%}
.forum-main{padding:58px 0 100px}.forum-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:32px;margin-bottom:30px;padding:38px;border:1px solid var(--line);border-radius:24px;background:
radial-gradient(circle at 88% 15%,rgba(var(--accent-rgb),.16),transparent 27%),linear-gradient(145deg,#121a23,#0b1118);box-shadow:var(--shadow)}
.forum-hero.compact{padding:30px 32px}.kicker{display:block;color:var(--accent);font-size:10px;font-weight:1000;letter-spacing:.15em}
.forum-hero h1,.topic-title h1,.auth-card h1{margin:10px 0 10px;font-size:clamp(38px,5vw,62px);line-height:1;letter-spacing:-.045em}
.forum-hero p,.topic-title p,.auth-lead{max-width:720px;margin:0;color:var(--muted);line-height:1.65;font-size:14px}
.forum-layout{display:grid;grid-template-columns:1.45fr .55fr;gap:16px}.panel{border:1px solid var(--line);border-radius:var(--radius);background:linear-gradient(160deg,rgba(255,255,255,.025),rgba(255,255,255,.012));overflow:hidden}
.panel-head{display:flex;align-items:center;justify-content:space-between;padding:24px 26px;border-bottom:1px solid var(--line)}.panel-head h2{margin:6px 0 0;font-size:20px}
.category-list,.topic-list,.latest-list{display:block}.category-row{display:grid;grid-template-columns:52px minmax(0,1fr) 140px 180px;align-items:center;gap:18px;padding:22px 24px;border-bottom:1px solid var(--line);transition:.18s ease}
.category-row:last-child,.topic-row:last-child{border-bottom:none}.category-row:hover,.topic-row:hover{background:rgba(var(--accent-rgb),.035)}
.category-icon,.topic-symbol{width:46px;height:46px;display:grid;place-items:center;border-radius:13px;background:rgba(var(--accent-rgb),.08);border:1px solid rgba(var(--accent-rgb),.14);color:var(--accent);font-weight:1000}
.category-info h3,.topic-main h3{margin:0 0 5px;font-size:15px}.category-info p,.topic-main p{margin:0;color:var(--muted);font-size:12px;line-height:1.5}
.category-stats{display:flex;gap:22px}.category-stats div,.topic-count,.topic-updated{display:flex;flex-direction:column}.category-stats strong,.topic-count strong{font-size:15px}.category-stats span,.topic-count span,.topic-updated span,.category-last span{color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.08em}
.category-last strong,.topic-updated strong{display:block;margin-top:4px;font-size:11px;line-height:1.35}
.latest-item{display:block;padding:18px 20px;border-bottom:1px solid var(--line)}.latest-item:last-child{border-bottom:none}.latest-item span{color:var(--accent);font-size:9px;font-weight:900;letter-spacing:.09em}.latest-item strong{display:block;margin:6px 0;font-size:13px;line-height:1.35}.latest-item small{color:var(--muted);font-size:10px}
.breadcrumbs{display:flex;align-items:center;gap:9px;margin-bottom:20px;color:var(--muted);font-size:12px}.breadcrumbs a:hover{color:#fff}.topic-list{}.topic-row{display:grid;grid-template-columns:48px minmax(0,1fr) 110px 150px;gap:18px;align-items:center;padding:20px 24px;border-bottom:1px solid var(--line)}
.topic-title{margin:28px 0 30px}.topic-title h1{font-size:clamp(34px,4.5vw,54px)}
.posts{display:grid;gap:14px}.post-card{display:grid;grid-template-columns:180px 1fr;border:1px solid var(--line);border-radius:var(--radius);background:linear-gradient(160deg,rgba(255,255,255,.025),rgba(255,255,255,.012));overflow:hidden}
.post-card.original{border-color:rgba(var(--accent-rgb),.15)}.post-user{padding:24px;text-align:center;border-right:1px solid var(--line);background:rgba(255,255,255,.012)}.avatar{width:58px;height:58px;margin:0 auto 12px;display:grid;place-items:center;border-radius:17px;background:rgba(var(--accent-rgb),.1);border:1px solid rgba(var(--accent-rgb),.18);color:var(--accent);font-size:22px;font-weight:1000}.post-user strong,.post-user span{display:block}.post-user strong{font-size:13px}.post-user span{margin-top:5px;color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.08em}
.post-content{padding:22px 26px}.post-meta{display:flex;justify-content:space-between;gap:20px;padding-bottom:15px;margin-bottom:18px;border-bottom:1px solid var(--line);color:var(--muted);font-size:10px}.post-body{white-space:normal;color:#dbe4ee;line-height:1.75;font-size:14px;overflow-wrap:anywhere}
.reply-panel{margin-top:22px;padding-bottom:24px}.forum-form{display:grid;gap:16px;padding:24px}.forum-form label{display:grid;gap:8px}.forum-form label>span{font-size:11px;font-weight:850;color:#c5d0dd}.forum-form input,.forum-form textarea,.forum-form select{width:100%;border:1px solid var(--line);border-radius:11px;background:#090f15;color:#f2f6fa;padding:13px 14px;outline:none}.forum-form textarea{resize:vertical;line-height:1.6}.forum-form input:focus,.forum-form textarea:focus,.forum-form select:focus{border-color:rgba(var(--accent-rgb),.5);box-shadow:0 0 0 3px rgba(var(--accent-rgb),.07)}
.auth-wrap{max-width:520px;margin:20px auto}.auth-wrap.wide{max-width:760px}.auth-card{border:1px solid var(--line);border-radius:22px;padding:30px;background:linear-gradient(160deg,rgba(255,255,255,.025),rgba(255,255,255,.012));box-shadow:var(--shadow)}.auth-card h1{font-size:42px}.auth-card .forum-form{padding:24px 0 0}.auth-foot{text-align:center;color:var(--muted);font-size:12px}.auth-foot a{color:var(--accent);font-weight:800}
.alert{margin:0 0 22px;padding:14px 16px;border-radius:12px;border:1px solid var(--line);font-size:12px;line-height:1.5}.alert.success{color:#cffff0;background:rgba(var(--accent-rgb),.07);border-color:rgba(var(--accent-rgb),.18)}.alert.error{color:#ffd0d0;background:rgba(255,91,91,.06);border-color:rgba(255,91,91,.16)}
.empty{padding:26px;color:var(--muted);font-size:12px}.empty.large{display:grid;justify-items:start;gap:8px;padding:34px}.empty.large strong{color:#fff;font-size:16px}.empty.large .button{margin-top:10px}
.forum-footer{border-top:1px solid var(--line);padding:28px 0;background:#070a0e;color:var(--muted);font-size:11px}.forum-footer .forum-container{display:flex;justify-content:space-between;gap:20px}.forum-footer a:hover{color:#fff}
@media(max-width:980px){.forum-layout{grid-template-columns:1fr}.category-row{grid-template-columns:52px 1fr 120px}.category-last{display:none}.topic-row{grid-template-columns:48px 1fr 110px}.topic-updated{display:none}}
@media(max-width:700px){.forum-nav{height:auto;min-height:70px;padding:12px 0;align-items:flex-start}.forum-links{flex-wrap:wrap;justify-content:flex-end;gap:9px 14px}.forum-links a:not(.button){font-size:11px}.forum-main{padding-top:28px}.forum-hero{display:block;padding:26px}.forum-hero .button{margin-top:22px}.category-row{grid-template-columns:44px 1fr;padding:18px}.category-stats{display:none}.topic-row{grid-template-columns:42px 1fr}.topic-count{display:none}.post-card{grid-template-columns:1fr}.post-user{display:flex;align-items:center;gap:12px;text-align:left;border-right:0;border-bottom:1px solid var(--line);padding:15px 18px}.avatar{width:40px;height:40px;margin:0;border-radius:11px;font-size:16px}.post-user span{margin-top:2px}.post-content{padding:18px}.forum-footer .forum-container{display:block}.forum-footer a{display:block;margin-top:8px}}


/* Management panel */
.role-badge{display:inline-flex;align-items:center;justify-content:center;padding:6px 9px;border-radius:999px;border:1px solid var(--line);font-size:9px;font-weight:1000;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap}
.role-owner{color:#101004;background:linear-gradient(135deg,#ffd66b,#e7a92e);border-color:rgba(255,214,107,.35)}
.role-coowner{color:#07140e;background:linear-gradient(135deg,#5bf0a5,#1cc879);border-color:rgba(91,240,165,.3)}
.role-moderator{color:#e9efff;background:rgba(91,121,255,.15);border-color:rgba(91,121,255,.28)}
.role-member{color:#c5cfdb;background:rgba(255,255,255,.045)}
.role-badge.large{font-size:11px;padding:10px 14px}
.button.danger{background:rgba(255,91,91,.1);border-color:rgba(255,91,91,.22);color:#ffb4b4}.button.danger:hover{background:rgba(255,91,91,.16)}.button:disabled{opacity:.35;cursor:not-allowed}
.button.tiny{min-height:34px;padding:0 10px;font-size:10px}
.with-actions{display:flex;align-items:flex-end;justify-content:space-between;gap:24px}.moderation-actions{display:flex;flex-wrap:wrap;gap:8px}.moderation-actions form{margin:0}.post-meta-actions{display:flex;align-items:center;gap:12px}.post-meta-actions form{margin:0}.link-danger{padding:0;border:0;background:none;color:#ff8f8f;font-size:10px;font-weight:800;cursor:pointer}.link-danger:hover{text-decoration:underline}
.management-hero{align-items:center}.admin-stats{margin:0 0 16px}.admin-layout{margin-top:16px}.admin-tool-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:var(--line)}.admin-tool{display:flex;align-items:center;gap:14px;padding:22px;background:#0d131b;transition:.18s ease}.admin-tool:hover{background:rgba(var(--accent-rgb),.045)}.admin-tool>span{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:rgba(var(--accent-rgb),.08);border:1px solid rgba(var(--accent-rgb),.14);color:var(--accent);font-weight:1000}.admin-tool strong,.admin-tool small{display:block}.admin-tool strong{font-size:13px}.admin-tool small{margin-top:5px;color:var(--muted);font-size:10px;line-height:1.45}.admin-tool.disabled{opacity:.5}.permissions-panel{margin-top:16px}.permission-table{display:grid}.permission-row{display:grid;grid-template-columns:1fr 120px 120px;align-items:center;gap:12px;padding:14px 24px;border-bottom:1px solid var(--line);font-size:12px}.permission-row:last-child{border-bottom:0}.permission-row.head{color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.08em}.permission-row b{text-align:center;color:var(--accent)}
.table-panel{overflow:hidden}.responsive-table{overflow-x:auto}.admin-table{width:100%;border-collapse:collapse;min-width:980px}.admin-table th,.admin-table td{padding:15px 16px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top;font-size:11px}.admin-table th{color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.08em;background:rgba(255,255,255,.012)}.admin-table tr:last-child td{border-bottom:0}.status{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:9px;font-weight:900;text-transform:uppercase}.status.active{color:#aef3ce;background:rgba(var(--accent-rgb),.08)}.status.banned{color:#ffb8b8;background:rgba(255,91,91,.08)}.actions-cell{min-width:330px}.inline-form{display:flex;align-items:center;gap:7px;margin:0 0 8px}.inline-form:last-child{margin-bottom:0}.inline-form select,.inline-form input{border:1px solid var(--line);border-radius:9px;background:#090f15;color:#f2f6fa;padding:8px 9px;font-size:10px}.reason-input{width:160px}.category-admin-panel{margin-bottom:16px}.category-form{grid-template-columns:1.1fr 2fr .55fr .55fr auto;align-items:end}.category-form label{min-width:0}.category-form .button{height:44px}.category-editor-list{display:grid;gap:12px}.category-editor{position:relative}.category-editor .forum-form{padding-right:110px}.editor-actions{display:flex;align-items:center;gap:12px}.editor-actions span{color:var(--muted);font-size:10px}.delete-category-form{position:absolute;right:24px;bottom:24px}
@media(max-width:850px){.with-actions{display:block}.moderation-actions{margin-top:20px}.category-form{grid-template-columns:1fr 1fr}.category-editor .forum-form{padding-right:24px}.delete-category-form{position:static;padding:0 24px 24px}.admin-tool-grid{grid-template-columns:1fr}}
@media(max-width:600px){.permission-row{grid-template-columns:1fr 70px 70px;padding:12px}.category-form{grid-template-columns:1fr}.forum-links .role-badge{display:none}}

/* Profile, rank and reaction system */
.role-owner,.role-coowner{color:#ffd6d6;background:rgba(229,63,63,.16);border-color:rgba(229,63,63,.34)}
.role-owner{box-shadow:inset 0 0 18px rgba(229,63,63,.05)}
.role-coowner{box-shadow:inset 0 0 18px rgba(229,63,63,.04)}
.role-member{color:#b9d8ff;background:rgba(64,139,255,.14);border-color:rgba(64,139,255,.28)}
.role-moderator{color:#dec9ff;background:rgba(145,94,255,.14);border-color:rgba(145,94,255,.28)}
.user-chip{display:inline-flex;align-items:center;transition:.18s ease}
.user-chip:hover{border-color:rgba(var(--accent-rgb),.25);color:#fff;background:rgba(var(--accent-rgb),.06)}
.post-user{min-width:0}
.post-avatar-link{display:inline-block;margin:0 auto 12px}
.post-avatar-link .avatar{margin:0}
.avatar-image{object-fit:cover;overflow:hidden;background:#0b1117}
.post-username{display:block;font-size:15px;font-weight:900;color:#f4f7fb;overflow-wrap:anywhere}
.post-username:hover{color:var(--accent)}
.post-role{margin:9px auto 0}
.author-note{margin-top:8px!important;color:var(--muted)!important;font-size:9px!important;text-transform:uppercase;letter-spacing:.1em}
.profile-mini-stats{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
.profile-mini-stats span{display:flex!important;align-items:center;justify-content:center;min-height:31px;margin:0!important;padding:6px 8px;border-radius:9px;font-size:10px!important;font-weight:900;letter-spacing:0!important;text-transform:none!important}
.profile-mini-stats .mini-like{color:#8ff0bc;background:rgba(var(--accent-rgb),.08);border:1px solid rgba(var(--accent-rgb),.14)}
.profile-mini-stats .mini-dislike{color:#ff9e9e;background:rgba(255,91,91,.08);border:1px solid rgba(255,91,91,.14)}
.profile-mini-stats .mini-posts{grid-column:1/-1;color:#b9d8ff;background:rgba(64,139,255,.08);border:1px solid rgba(64,139,255,.14)}
.post-signature{margin-top:28px;padding:16px 0 2px;border-top:1px dashed rgba(255,255,255,.1);color:#8190a4;font-size:12px;line-height:1.65}
.reaction-row{display:flex;align-items:center;gap:8px;margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}
.reaction-row form{margin:0}
.reaction-button{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:62px;min-height:36px;padding:7px 11px;border-radius:10px;border:1px solid var(--line);background:rgba(255,255,255,.025);font-size:12px;font-weight:800;cursor:pointer;transition:.16s ease}
.reaction-button strong{font-size:11px}.reaction-button.like{color:#8ff0bc}.reaction-button.dislike{color:#ff9e9e}
.reaction-button.like:hover,.reaction-button.like.active{background:rgba(var(--accent-rgb),.11);border-color:rgba(var(--accent-rgb),.28);box-shadow:0 0 0 2px rgba(var(--accent-rgb),.04)}
.reaction-button.dislike:hover,.reaction-button.dislike.active{background:rgba(255,91,91,.1);border-color:rgba(255,91,91,.26);box-shadow:0 0 0 2px rgba(255,91,91,.035)}
.reaction-button.readonly{cursor:default}
.profile-layout{display:grid;grid-template-columns:300px minmax(0,1fr);gap:18px;align-items:start}
.profile-card{padding:30px;text-align:center;overflow:visible}
.profile-avatar{width:126px;height:126px;margin:0 auto 18px;display:grid;place-items:center;border-radius:28px;object-fit:cover;background:rgba(var(--accent-rgb),.08);border:1px solid rgba(var(--accent-rgb),.24);box-shadow:0 16px 46px rgba(0,0,0,.24)}
.profile-avatar-fallback{color:var(--accent);font-size:46px;font-weight:1000}
.profile-card h1{margin:0 0 12px;font-size:28px;letter-spacing:-.03em;overflow-wrap:anywhere}
.profile-summary-stats{display:grid;grid-template-columns:1fr 1fr 1fr;gap:7px;margin-top:24px}
.profile-summary-stats>div{padding:12px 6px;border-radius:11px;background:rgba(255,255,255,.025);border:1px solid var(--line)}
.profile-summary-stats strong,.profile-summary-stats span{display:block}.profile-summary-stats strong{font-size:13px}.profile-summary-stats span{margin-top:3px;color:var(--muted);font-size:8px;text-transform:uppercase;letter-spacing:.08em}
.profile-summary-stats .summary-like strong{color:#8ff0bc}.profile-summary-stats .summary-dislike strong{color:#ff9e9e}
.profile-joined{margin-top:18px;color:var(--muted);font-size:10px}
.profile-details{min-width:0}.profile-form small{color:var(--muted);font-size:10px;line-height:1.5}
.profile-form input[type=file]{padding:10px}.checkbox-label{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center;justify-content:flex-start;gap:10px!important;padding:12px 14px;border-radius:11px;background:rgba(255,255,255,.02);border:1px solid var(--line)}
.checkbox-label input{width:auto!important;margin:0}.checkbox-label span{font-size:11px!important}.profile-errors{margin:24px 24px 0}
.profile-public-section{padding:28px;border-bottom:1px solid var(--line)}.profile-public-section:last-child{border-bottom:0}.profile-public-section p{margin:10px 0 0;color:#cfd8e3;line-height:1.75;font-size:14px;overflow-wrap:anywhere}
@media(max-width:850px){.profile-layout{grid-template-columns:1fr}.profile-card{display:grid;grid-template-columns:auto 1fr;column-gap:18px;text-align:left;align-items:center}.profile-avatar{grid-row:1/4;width:92px;height:92px;margin:0}.profile-card .role-badge{justify-self:start}.profile-summary-stats,.profile-joined{grid-column:1/-1}.post-user .post-avatar-link{margin:0}.post-role{margin:0 0 0 auto}.author-note{display:none!important}.profile-mini-stats{grid-column:1/-1;width:100%}}
@media(max-width:520px){.profile-card{display:block;text-align:center}.profile-avatar{margin:0 auto 16px}.profile-card .role-badge{justify-self:auto}.profile-summary-stats{grid-template-columns:1fr}.profile-summary-stats>div{padding:10px}.post-role{margin-left:auto}.reaction-row{flex-wrap:wrap}}


/* ===== POST UI HOTFIX ===== */
.post-content{
  display:flex !important;
  flex-direction:column !important;
  min-width:0 !important;
}

.post-card{
  min-height:260px;
}

/* Rank badges */
.role-badge{
  position:relative !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:auto;
  min-width:160px;
  min-height:42px;
  padding:0 22px 0 44px !important;
  border-radius:10px !important;
  background:linear-gradient(180deg,#171b21 0%,#080a0d 48%,#11151a 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    inset 0 -1px 0 rgba(0,0,0,.75),
    0 6px 18px rgba(0,0,0,.28) !important;
  font-size:11px !important;
  font-weight:900 !important;
  letter-spacing:.12em !important;
  text-transform:uppercase !important;
  overflow:hidden;
}
.role-badge::before{
  content:"" !important;
  position:absolute;
  left:17px;
  top:50%;
  width:11px;
  height:11px;
  transform:translateY(-50%) rotate(45deg);
  border-top:3px solid currentColor;
  border-right:3px solid currentColor;
}
.role-badge::after{
  content:"" !important;
  position:absolute;
  left:0; right:0; top:0;
  height:2px;
  background:currentColor;
  opacity:.8;
  box-shadow:0 0 10px currentColor;
}
.role-owner,
.role-coowner{
  color:#ff5f57 !important;
  border:1px solid rgba(255,95,87,.55) !important;
}
.role-member{
  color:#35bfff !important;
  border:1px solid rgba(53,191,255,.55) !important;
}
.role-moderator{
  color:#43df8b !important;
  border:1px solid rgba(67,223,139,.55) !important;
}
.post-role{
  width:100% !important;
  max-width:220px !important;
  margin:12px auto 0 !important;
}
.profile-card .role-badge{
  width:100% !important;
  max-width:240px !important;
  margin:2px auto 0 !important;
}
.forum-links .role-badge{
  min-width:0 !important;
  min-height:34px !important;
  padding:0 13px 0 31px !important;
  border-radius:999px !important;
  font-size:9px !important;
}
.forum-links .role-badge::before{
  left:12px;
  width:8px;
  height:8px;
  border-top-width:2px;
  border-right-width:2px;
}

/* Author stats */
.profile-mini-stats{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  justify-content:center !important;
  gap:9px 16px !important;
  margin-top:15px !important;
  padding-top:13px !important;
  border-top:1px solid var(--line) !important;
}
.profile-mini-stats .mini-like,
.profile-mini-stats .mini-dislike{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:6px !important;
  min-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  background:none !important;
  border:0 !important;
  border-radius:0 !important;
  font-size:12px !important;
  font-weight:900 !important;
  line-height:1 !important;
  text-transform:none !important;
  letter-spacing:0 !important;
}
.profile-mini-stats .mini-like{ color:#5ee88c !important; }
.profile-mini-stats .mini-dislike{ color:#ff6b63 !important; }
.profile-mini-stats .mini-posts{
  display:block !important;
  flex-basis:100% !important;
  min-height:0 !important;
  margin:1px 0 0 !important;
  padding:0 !important;
  background:none !important;
  border:0 !important;
  color:#9fb6d5 !important;
  font-size:10px !important;
  font-weight:800 !important;
  line-height:1.2 !important;
  text-transform:uppercase !important;
  letter-spacing:.1em !important;
}
.profile-mini-stats svg{
  flex:0 0 auto !important;
  max-width:17px !important;
  max-height:17px !important;
}

/* Post reactions: bottom-right, transparent, side-by-side */
.reaction-row{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:15px !important;
  width:auto !important;
  margin-top:auto !important;
  margin-left:auto !important;
  padding-top:20px !important;
  border-top:0 !important;
}
.reaction-row form{
  display:block !important;
  margin:0 !important;
  padding:0 !important;
}
.reaction-button{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:7px !important;
  width:auto !important;
  min-width:0 !important;
  min-height:0 !important;
  margin:0 !important;
  padding:5px 7px !important;
  border:0 !important;
  border-radius:9px !important;
  background:transparent !important;
  box-shadow:none !important;
  font-size:14px !important;
  font-weight:900 !important;
  line-height:1 !important;
  cursor:pointer;
}
.reaction-button svg{
  display:block !important;
  width:25px !important;
  height:25px !important;
  min-width:25px !important;
  max-width:25px !important;
  min-height:25px !important;
  max-height:25px !important;
}
.reaction-button strong{
  font-size:14px !important;
  line-height:1 !important;
  color:#dfe8f3 !important;
}
.reaction-button.like{ color:#55e983 !important; }
.reaction-button.dislike{ color:#ff625a !important; }
.reaction-button.like:hover,
.reaction-button.like.active{
  background:rgba(var(--accent-rgb),.10) !important;
}
.reaction-button.dislike:hover,
.reaction-button.dislike.active{
  background:rgba(255,91,91,.10) !important;
}
.reaction-button.readonly{
  cursor:default !important;
}

/* Profile summary icons */
.profile-summary-stats strong{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:6px !important;
}
.profile-summary-stats svg{
  width:18px !important;
  height:18px !important;
}

@media(max-width:850px){
  .post-role{
    width:auto !important;
    max-width:none !important;
    margin:0 0 0 auto !important;
  }
  .profile-mini-stats{
    justify-content:flex-start !important;
  }
  .reaction-row{
    justify-content:flex-start !important;
    margin-left:0 !important;
    width:100% !important;
  }
}

@media(max-width:520px){
  .reaction-row{
    gap:10px !important;
  }
}


/* ===== TRUE RANK BADGE CENTERING FIX ===== */
.post-user{
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
}

.post-user .post-role,
.post-user .role-badge,
.profile-card .role-badge{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  align-self:center !important;
  width:calc(100% - 36px) !important;
  max-width:320px !important;
  margin:12px auto 0 auto !important;
  box-sizing:border-box !important;
  float:none !important;
}

.profile-card .role-badge{
  width:min(100%, 320px) !important;
}

@media(max-width:850px){
  .post-user{
    align-items:flex-start !important;
  }

  .post-user .post-role,
  .post-user .role-badge{
    width:auto !important;
    min-width:190px !important;
    max-width:none !important;
    margin:0 auto 0 auto !important;
    align-self:center !important;
  }

  .profile-card .role-badge{
    width:auto !important;
    min-width:190px !important;
    max-width:none !important;
    margin:6px auto 0 auto !important;
    justify-self:center !important;
  }
}


/* ===== ROLE BADGES REDESIGN ===== */
.post-user{
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  text-align:center !important;
}

.post-user .post-role,
.post-user .role-badge,
.profile-card .role-badge{
  position:relative !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  align-self:center !important;
  width:min(240px, calc(100% - 24px)) !important;
  min-width:0 !important;
  max-width:240px !important;
  min-height:56px !important;
  margin:12px auto 0 auto !important;
  padding:0 22px 0 48px !important;
  box-sizing:border-box !important;
  border-radius:14px !important;
  overflow:hidden !important;
  text-align:center !important;
  font-size:11px !important;
  font-weight:1000 !important;
  letter-spacing:.14em !important;
  text-transform:uppercase !important;
  line-height:1 !important;
  background:linear-gradient(180deg,#161b22 0%,#05070b 48%,#10151b 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    inset 0 -1px 0 rgba(0,0,0,.7),
    0 10px 24px rgba(0,0,0,.24) !important;
  float:none !important;
}

.post-user .post-role::after,
.post-user .role-badge::after,
.profile-card .role-badge::after{
  content:"" !important;
  position:absolute !important;
  left:0 !important;
  right:0 !important;
  top:0 !important;
  height:2px !important;
  background:currentColor !important;
  opacity:.85 !important;
  box-shadow:0 0 14px currentColor !important;
}

.post-user .post-role::before,
.post-user .role-badge::before,
.profile-card .role-badge::before{
  position:absolute !important;
  left:16px !important;
  top:50% !important;
  transform:translateY(-50%) !important;
  font-size:20px !important;
  line-height:1 !important;
  font-weight:900 !important;
  letter-spacing:0 !important;
}

.post-user .role-owner,
.profile-card .role-owner{
  color:#ff5f57 !important;
  border:1px solid rgba(255,95,87,.62) !important;
  background:linear-gradient(180deg,#251112 0%,#06080c 52%,#12161d 100%) !important;
}
.post-user .role-owner::before,
.profile-card .role-owner::before{
  content:"❯" !important;
  color:#ff5f57 !important;
}

.post-user .role-coowner,
.profile-card .role-coowner{
  color:#ff865c !important;
  border:1px solid rgba(255,134,92,.58) !important;
  background:linear-gradient(180deg,#23140f 0%,#06080c 52%,#12161d 100%) !important;
}
.post-user .role-coowner::before,
.profile-card .role-coowner::before{
  content:"✦" !important;
  color:#ff865c !important;
}

.post-user .role-moderator,
.profile-card .role-moderator{
  color:#55e58f !important;
  border:1px solid rgba(85,229,143,.56) !important;
  background:linear-gradient(180deg,#102117 0%,#06080c 52%,#12161d 100%) !important;
}
.post-user .role-moderator::before,
.profile-card .role-moderator::before{
  content:"▲" !important;
  color:#55e58f !important;
  font-size:16px !important;
}

.post-user .role-member,
.profile-card .role-member{
  color:#49bbff !important;
  border:1px solid rgba(73,187,255,.58) !important;
  background:linear-gradient(180deg,#0b1e2c 0%,#06080c 52%,#12161d 100%) !important;
}
.post-user .role-member::before,
.profile-card .role-member::before{
  content:"◆" !important;
  color:#49bbff !important;
  font-size:16px !important;
}

/* keep small navbar badge simpler */
.forum-links .role-badge{
  min-height:34px !important;
  width:auto !important;
  max-width:none !important;
  padding:0 14px 0 30px !important;
  border-radius:999px !important;
  font-size:9px !important;
  margin:0 !important;
}
.forum-links .role-badge::before{
  left:11px !important;
  font-size:13px !important;
}
.forum-links .role-badge::after{
  height:1px !important;
}

@media(max-width:850px){
  .post-user{
    align-items:flex-start !important;
    text-align:left !important;
  }

  .post-user .post-role,
  .post-user .role-badge{
    width:min(240px, 100%) !important;
    margin:0 auto !important;
    align-self:center !important;
  }

  .profile-card .role-badge{
    width:min(240px, 100%) !important;
    margin:6px auto 0 auto !important;
  }
}


/* ===== RICH MESSAGE EDITOR ===== */
.rich-editor{
  border:1px solid rgba(var(--accent-rgb),.22);
  border-radius:16px;
  overflow:hidden;
  background:#0a1016;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.015);
}
.editor-toolbar{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:0;
  min-height:58px;
  padding:8px 10px;
  border-bottom:1px solid var(--line);
  background:linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,.012));
}
.toolbar-group{
  display:flex;
  align-items:center;
  gap:4px;
  padding:0 8px;
  min-height:40px;
  border-right:1px solid var(--line);
}
.toolbar-group:last-child{border-right:0}
.toolbar-group-right{margin-left:auto}
.editor-tool{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border:1px solid transparent;
  border-radius:8px;
  color:#cbd6e3;
  background:transparent;
  font-size:14px;
  font-weight:800;
  cursor:pointer;
  transition:.15s ease;
}
.editor-tool:hover,.editor-tool.active{
  color:#fff;
  background:rgba(var(--accent-rgb),.08);
  border-color:rgba(var(--accent-rgb),.18);
}
.editor-bold{font-weight:1000;font-size:17px}
.editor-italic{font-style:italic;font-family:Georgia,serif;font-size:17px}
.editor-underline{text-decoration:underline;font-size:17px}
.editor-strike{text-decoration:line-through;font-size:17px}
.editor-select{
  height:34px;
  max-width:116px;
  padding:0 27px 0 9px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#0b1118;
  color:#cbd6e3;
  font-size:11px;
  outline:none;
}
.editor-size-select{max-width:78px}
.editor-color-tool{
  position:relative;
  width:36px;
  height:36px;
  display:grid!important;
  place-items:center;
  border-radius:8px;
  cursor:pointer;
  color:#dce5ef;
  font-weight:1000;
}
.editor-color-tool input{
  position:absolute;
  inset:auto 5px 4px;
  width:26px!important;
  height:5px!important;
  padding:0!important;
  border:0!important;
  opacity:.9;
}
.editor-textarea{
  display:block;
  width:100%;
  min-height:270px;
  resize:vertical;
  padding:22px 24px;
  border:0!important;
  border-radius:0!important;
  background:#090f15!important;
  color:#edf4fb!important;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  font-size:14px!important;
  line-height:1.7!important;
  outline:none!important;
  box-shadow:none!important;
}
.editor-preview{
  min-height:270px;
  padding:22px 24px;
  background:#090f15;
  color:#dbe4ee;
  font-size:14px;
  line-height:1.75;
  overflow-wrap:anywhere;
}
.editor-preview-empty{color:var(--muted)}
.attachment-zone{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:18px 20px;
  border-top:1px solid var(--line);
  background:rgba(255,255,255,.018);
  transition:.16s ease;
}
.attachment-zone.dragging{
  background:rgba(var(--accent-rgb),.07);
  box-shadow:inset 0 0 0 1px rgba(var(--accent-rgb),.2);
}
.attachment-zone-main{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}
.attachment-icon{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border-radius:12px;
  color:var(--accent);
  background:rgba(var(--accent-rgb),.08);
  border:1px solid rgba(var(--accent-rgb),.14);
  font-size:20px;
  font-weight:900;
}
.attachment-zone-main strong,
.attachment-zone-main span,
.attachment-zone-main small{
  display:block;
}
.attachment-zone-main strong{font-size:12px}
.attachment-zone-main span{margin-top:3px;color:#b8c4d3;font-size:11px}
.attachment-zone-main small{margin-top:4px;color:var(--muted);font-size:9px}
.attachment-button{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  min-height:40px;
  padding:0 15px;
  border-radius:10px;
  color:#06150d!important;
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  font-size:11px!important;
  font-weight:900;
  cursor:pointer;
}
.attachment-button input{display:none}
.attachment-preview-list{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:9px;
  padding:0 20px 16px;
  background:rgba(255,255,255,.018);
}
.attachment-preview-list:empty{display:none}
.attachment-preview-item{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  padding:9px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#0a1017;
}
.attachment-preview-thumb{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  overflow:hidden;
  border-radius:8px;
  background:rgba(255,255,255,.04);
  color:var(--muted);
  font-size:8px;
  font-weight:900;
}
.attachment-preview-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.attachment-preview-meta{min-width:0}
.attachment-preview-meta strong,
.attachment-preview-meta span{display:block}
.attachment-preview-meta strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#e3ebf4;
  font-size:10px;
}
.attachment-preview-meta span{margin-top:4px;color:var(--muted);font-size:9px}
.attachment-total{
  grid-column:1/-1;
  color:var(--muted);
  font-size:9px;
}
.attachment-total.error{color:#ff8f8f}
.editor-submit-row{
  display:flex;
  justify-content:flex-end;
  padding-top:16px;
}
.rich-editor-form{gap:14px!important}

/* Rendered message formatting */
.bb-link{color:#6fc5ff;text-decoration:underline;text-underline-offset:2px}
.bb-quote{
  margin:14px 0;
  padding:13px 16px;
  border-left:3px solid var(--accent);
  background:rgba(var(--accent-rgb),.045);
  color:#cbd6e2;
  border-radius:0 10px 10px 0;
}
.bb-code{
  margin:14px 0;
  padding:14px 16px;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:10px;
  background:#060a0e;
  color:#c6f3da;
  white-space:pre-wrap;
  font-size:12px;
  line-height:1.6;
}
.bb-align-center{text-align:center}
.bb-align-left{text-align:left}
.bb-align-right{text-align:right}
.bb-list{margin:10px 0;padding-left:24px}
.bb-image-link{display:inline-block;max-width:100%;margin:10px 0}
.bb-image{
  display:block;
  max-width:min(100%,720px);
  max-height:520px;
  border-radius:12px;
  object-fit:contain;
  border:1px solid var(--line);
}

/* Posted attachments */
.post-attachments{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(210px,280px));
  gap:9px;
  margin-top:18px;
}
.post-attachment{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  padding:10px;
  border:1px solid var(--line);
  border-radius:11px;
  background:rgba(255,255,255,.02);
}
.post-attachment:hover{border-color:rgba(var(--accent-rgb),.24)}
.post-attachment img{
  width:58px;
  height:58px;
  flex:0 0 auto;
  object-fit:cover;
  border-radius:8px;
}
.post-attachment span{min-width:0}
.post-attachment strong,
.post-attachment small{display:block}
.post-attachment strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#e5edf6;
  font-size:10px;
}
.post-attachment small{margin-top:4px;color:var(--muted);font-size:9px}
.file-attachment-icon{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border-radius:9px;
  background:rgba(64,139,255,.08);
  color:#8fc2ff;
  font-size:18px;
}

/* Reaction layout remains compact */
.post-content{
  display:flex;
  flex-direction:column;
  min-width:0;
}
.reaction-row{
  justify-content:flex-end!important;
  margin-top:auto!important;
  margin-left:auto!important;
}
.reaction-button svg{
  width:25px!important;
  height:25px!important;
  min-width:25px!important;
  max-width:25px!important;
}

/* Keep author stats compact */
.profile-mini-stats{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  justify-content:center!important;
  gap:9px 16px!important;
}
.profile-mini-stats .mini-like,
.profile-mini-stats .mini-dislike{
  display:inline-flex!important;
  align-items:center!important;
  gap:6px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:none!important;
}
.profile-mini-stats .mini-posts{
  flex-basis:100%!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:none!important;
}

@media(max-width:760px){
  .toolbar-group-right{margin-left:0}
  .editor-toolbar{align-items:flex-start}
  .attachment-zone{display:block}
  .attachment-button{margin-top:14px}
  .reaction-row{
    justify-content:flex-start!important;
    margin-left:0!important;
  }
}


/* ===== ONLINE MEMBERS / 24H ACTIVITY ===== */
.presence-panel{position:relative;margin-top:18px;overflow:hidden;border-color:rgba(var(--accent-rgb),.14);background:radial-gradient(circle at 84% 28%,rgba(var(--accent-rgb),.08),transparent 34%),linear-gradient(150deg,#0f1720,#080d13 72%)}
.presence-backdrop{position:absolute;inset:0;pointer-events:none;opacity:.28;background:linear-gradient(rgba(255,255,255,.018) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.018) 1px,transparent 1px);background-size:52px 52px;mask-image:linear-gradient(90deg,#000,transparent 78%)}
.presence-content{position:relative;z-index:1;padding:28px}
.presence-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;padding-bottom:22px;border-bottom:1px solid var(--line)}
.presence-heading h2{margin:8px 0 0;font-size:28px;letter-spacing:-.035em}
.presence-heading .kicker{display:flex;align-items:center;gap:8px}
.presence-live-dot{width:9px;height:9px;border-radius:50%;background:#39df88;box-shadow:0 0 14px rgba(57,223,136,.9)}
.presence-counts{display:flex;gap:10px;flex-wrap:wrap}
.presence-counts>div{min-width:92px;padding:12px 15px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.025);text-align:center}
.presence-counts strong,.presence-counts span{display:block}
.presence-counts strong{font-size:18px}
.presence-counts span{margin-top:3px;color:var(--muted);font-size:8px;text-transform:uppercase;letter-spacing:.1em}
.presence-section{padding:22px 0 0}
.presence-section-title{display:flex;align-items:center;gap:9px;margin-bottom:13px;color:#9eacc0;font-size:10px;font-weight:900;letter-spacing:.13em}
.presence-section-title strong{display:grid;place-items:center;min-width:24px;height:24px;padding:0 6px;border-radius:999px;color:#dce7f2;background:rgba(255,255,255,.045);border:1px solid var(--line);font-size:9px}
.presence-user-list{display:flex;flex-wrap:wrap;gap:9px}
.presence-user{position:relative;display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:6px 13px 6px 8px;border:1px solid rgba(73,187,255,.48);border-radius:12px;background:rgba(73,187,255,.06);color:#49bbff;transition:.16s ease}
.presence-user:hover{transform:translateY(-1px)}
.presence-user.role-owner{color:#ff5f57;border-color:rgba(255,95,87,.5);background:rgba(255,95,87,.06)}
.presence-user.role-coowner{color:#ff865c;border-color:rgba(255,134,92,.5);background:rgba(255,134,92,.06)}
.presence-user.role-moderator{color:#55e58f;border-color:rgba(85,229,143,.5);background:rgba(85,229,143,.06)}
.presence-user.role-member{color:#49bbff;border-color:rgba(73,187,255,.48);background:rgba(73,187,255,.06)}
.presence-user img,.presence-user-avatar{width:28px;height:28px;display:grid;place-items:center;flex:0 0 auto;border-radius:8px;object-fit:cover;color:#dce8f4;background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.08);font-size:10px;font-weight:1000}
.presence-user strong{font-size:11px;letter-spacing:.01em}
.presence-user-dot{width:7px;height:7px;margin-left:-13px;margin-right:1px;align-self:flex-end;border-radius:50%;background:#39df88;border:2px solid #0b1117;box-shadow:0 0 8px rgba(57,223,136,.8)}
.presence-user-list-24h .presence-user-dot{display:none}
.presence-empty{padding:13px 14px;border:1px dashed var(--line);border-radius:11px;color:var(--muted);font-size:11px}
.presence-legend{display:flex;flex-wrap:wrap;gap:16px 24px;margin-top:24px;padding-top:18px;border-top:1px solid var(--line);color:#8f9db0;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.09em}
.legend-item{display:inline-flex;align-items:center;gap:7px}
.legend-item i{width:10px;height:10px;border-radius:3px;background:currentColor;box-shadow:0 0 8px currentColor}
.legend-item.role-owner{color:#ff5f57;background:none;border:0;box-shadow:none}
.legend-item.role-coowner{color:#ff865c;background:none;border:0;box-shadow:none}
.legend-item.role-moderator{color:#55e58f;background:none;border:0;box-shadow:none}
.legend-item.role-member{color:#49bbff;background:none;border:0;box-shadow:none}
@media(max-width:700px){.presence-content{padding:20px}.presence-heading{display:block}.presence-counts{margin-top:16px}.presence-counts>div{flex:1}}


/* ===== ROLE-COLORED USERNAMES ===== */
.role-username{
  font-weight:900;
  text-decoration:none;
  transition:filter .15s ease, opacity .15s ease;
}
.role-username:hover{
  filter:brightness(1.2);
}
.username-role-owner{
  color:#ff625a !important;
}
.username-role-coowner{
  color:#ff925f !important;
}
.username-role-moderator{
  color:#55e991 !important;
}
.username-role-member{
  color:#4dbdff !important;
}
.user-chip.role-username{
  color:inherit;
}
.user-chip.username-role-owner{color:#ff625a !important}
.user-chip.username-role-coowner{color:#ff925f !important}
.user-chip.username-role-moderator{color:#55e991 !important}
.user-chip.username-role-member{color:#4dbdff !important}
.post-username.role-username:hover{
  color:inherit !important;
  filter:brightness(1.2);
}

/* ===== PROFILE VIEW COUNTER + RECENT VISITORS ===== */
.profile-sidebar{
  display:grid;
  gap:18px;
  align-self:start;
  min-width:0;
}
.profile-visitors-panel{
  overflow:hidden;
}
.profile-visitors-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:20px 22px;
  border-bottom:1px solid var(--line);
}
.profile-visitors-head h2{
  margin:5px 0 0;
  font-size:18px;
}
.profile-view-count{
  min-width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:11px;
  color:#dfffee;
  background:rgba(var(--accent-rgb),.08);
  border:1px solid rgba(var(--accent-rgb),.18);
  font-size:12px;
}
.profile-view-total{
  display:flex;
  align-items:baseline;
  gap:7px;
  padding:18px 22px 8px;
}
.profile-view-total strong{
  color:#f0f6fc;
  font-size:25px;
  letter-spacing:-.03em;
}
.profile-view-total span{
  color:var(--muted);
  font-size:11px;
}
.profile-visitors-list{
  padding:8px 16px 16px;
}
.profile-visitor-row{
  display:flex;
  align-items:center;
  gap:11px;
  padding:12px 7px;
  border-bottom:1px solid var(--line);
}
.profile-visitor-row:last-child{
  border-bottom:0;
}
.profile-visitor-row:hover{
  background:rgba(255,255,255,.018);
}
.profile-visitor-row img,
.profile-visitor-avatar{
  width:42px;
  height:42px;
  flex:0 0 42px;
  border-radius:50%;
}
.profile-visitor-row img{
  object-fit:cover;
}
.profile-visitor-avatar{
  display:grid;
  place-items:center;
  color:var(--accent);
  background:rgba(var(--accent-rgb),.08);
  border:1px solid rgba(var(--accent-rgb),.18);
  font-size:15px;
  font-weight:1000;
}
.profile-visitor-info{
  min-width:0;
}
.profile-visitor-info strong,
.profile-visitor-info small{
  display:block;
}
.profile-visitor-info strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
}
.profile-visitor-info small{
  margin-top:4px;
  color:var(--muted);
  font-size:9px;
}
.profile-visitors-empty{
  padding:18px 22px 22px;
  color:var(--muted);
  font-size:11px;
  line-height:1.5;
}

/* Color names in the online/24h block instead of inheriting the card color. */
.presence-user .role-username{
  color:inherit;
}
.presence-user .username-role-owner{color:#ff625a !important}
.presence-user .username-role-coowner{color:#ff925f !important}
.presence-user .username-role-moderator{color:#55e991 !important}
.presence-user .username-role-member{color:#4dbdff !important}

@media(max-width:850px){
  .profile-sidebar{
    width:100%;
  }
}


/* ===== DYNAMIC ROLE + FORUM STRUCTURE MANAGEMENT ===== */
.forum-section-stack{
  display:grid;
  gap:16px;
  min-width:0;
}
.forum-section-description{
  margin:7px 0 0;
  max-width:640px;
  color:var(--muted);
  font-size:10px;
  line-height:1.55;
}

.structure-create-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  margin-bottom:16px;
}
.structure-inline-fields{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.forum-structure-list{
  display:grid;
  gap:16px;
}
.forum-structure-section{
  overflow:visible;
}
.forum-structure-section-head{
  position:relative;
  border-bottom:1px solid var(--line);
}
.structure-section-form{
  display:grid;
  grid-template-columns:1.1fr 2fr 110px auto;
  align-items:end;
  padding-right:160px;
}
.structure-delete-form{
  position:absolute;
  right:24px;
  bottom:24px;
}
.structure-forum-list{
  display:grid;
}
.structure-forum-item{
  position:relative;
  display:grid;
  grid-template-columns:48px minmax(0,1fr);
  gap:15px;
  align-items:start;
  padding:18px 22px;
  border-bottom:1px solid var(--line);
}
.structure-forum-item:last-child{
  border-bottom:0;
}
.structure-forum-icon{
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border-radius:13px;
  color:var(--accent);
  background:rgba(var(--accent-rgb),.08);
  border:1px solid rgba(var(--accent-rgb),.14);
  font-weight:1000;
}
.structure-forum-form{
  display:grid;
  grid-template-columns:1fr 1.15fr 1.7fr 90px 90px;
  gap:10px;
  align-items:end;
  padding:0 115px 0 0;
}
.structure-forum-actions{
  grid-column:1/-1;
  display:flex;
  align-items:center;
  gap:12px;
}
.structure-forum-actions span{
  color:var(--muted);
  font-size:9px;
}
.structure-forum-delete{
  position:absolute;
  right:22px;
  bottom:18px;
}

.role-create-panel{
  margin-bottom:16px;
}
.role-admin-list{
  display:grid;
  gap:14px;
}
.role-admin-card{
  position:relative;
  overflow:visible;
}
.role-admin-preview{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:20px 24px 0;
}
.role-admin-preview > div{
  text-align:right;
}
.role-admin-preview strong,
.role-admin-preview small{
  display:block;
}
.role-admin-preview strong{
  font-size:11px;
}
.role-admin-preview small{
  margin-top:4px;
  color:var(--muted);
  font-size:9px;
}
.role-admin-form{
  display:grid;
  grid-template-columns:1.1fr 90px 130px 110px 1fr 1fr auto;
  align-items:end;
}
.role-create-form{
  grid-template-columns:1.2fr 90px 150px 110px 1fr 1fr auto;
}
.role-color-input{
  min-height:44px;
  padding:5px!important;
  cursor:pointer;
}
.role-delete-form{
  padding:0 24px 22px;
}
.role-protected-note{
  padding:0 24px 22px;
  color:var(--muted);
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:.08em;
}

@media(max-width:1100px){
  .structure-section-form,
  .structure-forum-form,
  .role-admin-form,
  .role-create-form{
    grid-template-columns:1fr 1fr;
  }

  .structure-section-form{
    padding-right:24px;
  }

  .structure-delete-form{
    position:static;
    padding:0 24px 24px;
  }

  .structure-forum-form{
    padding-right:0;
  }

  .structure-forum-delete{
    position:static;
    grid-column:2;
  }
}

@media(max-width:760px){
  .structure-create-grid{
    grid-template-columns:1fr;
  }

  .structure-inline-fields,
  .structure-section-form,
  .structure-forum-form,
  .role-admin-form,
  .role-create-form{
    grid-template-columns:1fr;
  }

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

  .structure-forum-delete{
    grid-column:1;
  }

  .role-admin-preview{
    display:block;
  }

  .role-admin-preview > div{
    margin-top:12px;
    text-align:left;
  }
}


/* ===== SUBFORUM SYSTEM ===== */
.forum-with-subforums{
  border-bottom:1px solid var(--line);
}
.forum-with-subforums:last-child{
  border-bottom:0;
}
.forum-with-subforums > .category-row{
  border-bottom:0!important;
}

.subforum-strip{
  display:grid;
  grid-template-columns:105px minmax(0,1fr);
  gap:14px;
  padding:0 24px 18px 94px;
}
.subforum-strip-label{
  padding-top:10px;
  color:var(--muted);
  font-size:8px;
  font-weight:950;
  letter-spacing:.13em;
}
.subforum-strip-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.subforum-chip{
  display:inline-flex;
  align-items:center;
  gap:9px;
  min-width:190px;
  max-width:360px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:11px;
  background:rgba(255,255,255,.018);
  transition:.16s ease;
}
.subforum-chip:hover{
  border-color:rgba(var(--accent-rgb),.24);
  background:rgba(var(--accent-rgb),.045);
  transform:translateY(-1px);
}
.subforum-chip-icon{
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  flex:0 0 28px;
  border-radius:8px;
  color:var(--accent);
  background:rgba(var(--accent-rgb),.07);
  border:1px solid rgba(var(--accent-rgb),.13);
  font-size:11px;
}
.subforum-chip-copy{
  min-width:0;
}
.subforum-chip-copy strong,
.subforum-chip-copy small{
  display:block;
}
.subforum-chip-copy strong{
  font-size:11px;
}
.subforum-chip-copy small{
  margin-top:3px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--muted);
  font-size:8px;
}
.subforum-chip-stats{
  margin-left:auto;
  flex:0 0 auto;
  color:var(--muted);
  font-size:8px;
  text-transform:uppercase;
  letter-spacing:.06em;
}

/* Subforums inside a forum page */
.category-subforums-panel{
  margin-bottom:16px;
}
.category-subforum-list{
  display:grid;
}
.category-subforum-row{
  display:grid;
  grid-template-columns:48px minmax(0,1fr) 180px 180px;
  align-items:center;
  gap:16px;
  padding:18px 22px;
  border-bottom:1px solid var(--line);
  transition:.16s ease;
}
.category-subforum-row:last-child{
  border-bottom:0;
}
.category-subforum-row:hover{
  background:rgba(var(--accent-rgb),.035);
}
.category-subforum-icon{
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border-radius:12px;
  color:var(--accent);
  background:rgba(var(--accent-rgb),.08);
  border:1px solid rgba(var(--accent-rgb),.14);
  font-weight:1000;
}
.category-subforum-main strong,
.category-subforum-main span{
  display:block;
}
.category-subforum-main strong{
  font-size:13px;
}
.category-subforum-main span{
  margin-top:5px;
  color:var(--muted);
  font-size:10px;
  line-height:1.45;
}
.category-subforum-stats{
  display:flex;
  gap:16px;
  color:var(--muted);
  font-size:9px;
}
.category-subforum-stats b{
  color:#eef4fa;
  font-size:11px;
}
.category-subforum-latest small,
.category-subforum-latest strong{
  display:block;
}
.category-subforum-latest small{
  color:var(--muted);
  font-size:8px;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.category-subforum-latest strong{
  margin-top:4px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:10px;
}

/* Management subforums */
.management-subforums{
  grid-column:1/-1;
  margin:16px 0 0 63px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:13px;
  background:rgba(255,255,255,.012);
}
.management-subforums-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
}
.management-subforums-head strong{
  display:block;
  margin-top:4px;
  font-size:11px;
}
.management-subforum-create{
  display:grid;
  grid-template-columns:1.1fr 1.8fr 70px 90px auto;
  gap:8px;
  align-items:center;
  padding:10px;
  border:1px dashed rgba(var(--accent-rgb),.18);
  border-radius:11px;
  background:rgba(var(--accent-rgb),.025);
}
.management-subforum-create input,
.management-subforum-edit input,
.management-subforum-edit select{
  min-width:0;
  width:100%;
  border:1px solid var(--line);
  border-radius:8px;
  background:#090f15;
  color:#f2f6fa;
  padding:9px 10px;
  font-size:10px;
  outline:none;
}
.management-subforum-list{
  display:grid;
  gap:7px;
  margin-top:10px;
}
.management-subforum-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  padding:8px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#0a1017;
}
.management-subforum-edit{
  display:grid;
  grid-template-columns:1fr 1.2fr 1.7fr 70px 80px auto;
  gap:7px;
  align-items:center;
}
.management-subforum-empty{
  margin-top:10px;
  color:var(--muted);
  font-size:9px;
}

@media(max-width:1050px){
  .category-subforum-row{
    grid-template-columns:48px minmax(0,1fr) 150px;
  }
  .category-subforum-latest{
    display:none;
  }

  .management-subforum-create,
  .management-subforum-edit{
    grid-template-columns:1fr 1fr;
  }
}

@media(max-width:760px){
  .subforum-strip{
    grid-template-columns:1fr;
    padding:0 18px 16px;
  }
  .subforum-strip-label{
    padding-top:0;
  }
  .subforum-strip-list{
    display:grid;
  }
  .subforum-chip{
    max-width:none;
    width:100%;
  }

  .category-subforum-row{
    grid-template-columns:42px minmax(0,1fr);
  }
  .category-subforum-stats{
    grid-column:2;
  }

  .management-subforums{
    margin-left:0;
  }
  .management-subforum-row{
    grid-template-columns:1fr;
  }
  .management-subforum-create,
  .management-subforum-edit{
    grid-template-columns:1fr;
  }
}


/* ===== SIDEBAR: POPULAR CONTRIBUTORS + MEMBER STATISTICS ===== */
.forum-sidebar{
  display:grid;
  align-content:start;
  gap:16px;
  min-width:0;
}

.forum-sidebar > .panel{
  min-width:0;
}

.contributors-panel{
  overflow:hidden;
}

.contributor-tabs{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  border-bottom:1px solid var(--line);
}

.contributor-tabs a{
  position:relative;
  display:grid;
  place-items:center;
  min-height:46px;
  color:var(--muted);
  font-size:10px;
  font-weight:900;
  transition:.16s ease;
}

.contributor-tabs a:hover{
  color:#eef4fa;
  background:rgba(255,255,255,.018);
}

.contributor-tabs a.active{
  color:#eef4fa;
}

.contributor-tabs a.active::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-1px;
  height:2px;
  background:var(--accent);
  box-shadow:0 0 10px rgba(var(--accent-rgb),.24);
}

.contributor-list{
  padding:8px 14px 14px;
}

.contributor-row{
  display:grid;
  grid-template-columns:30px 44px minmax(0,1fr);
  align-items:center;
  gap:10px;
  min-height:68px;
  padding:10px 4px;
  border-bottom:1px solid var(--line);
  transition:.16s ease;
}

.contributor-row:last-child{
  border-bottom:0;
}

.contributor-row:hover{
  background:rgba(255,255,255,.018);
}

.contributor-rank{
  color:#8fa0b4;
  font-size:20px;
  font-weight:900;
  text-align:center;
}

.contributor-avatar{
  width:44px;
  height:44px;
  border-radius:10px;
  object-fit:cover;
  border:1px solid var(--line);
  background:#0a1017;
}

.contributor-avatar-fallback{
  display:grid;
  place-items:center;
  color:var(--accent);
  background:rgba(var(--accent-rgb),.08);
  border-color:rgba(var(--accent-rgb),.16);
  font-size:16px;
  font-weight:1000;
}

.contributor-info{
  min-width:0;
}

.contributor-info strong,
.contributor-info small{
  display:block;
}

.contributor-info strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
}

.contributor-info small{
  margin-top:5px;
  color:#8daa76;
  font-size:9px;
  font-weight:800;
}

.contributor-like-icon{
  display:inline-grid;
  place-items:center;
  width:15px;
  height:15px;
  margin-right:3px;
  border-radius:50%;
  color:#08110a;
  background:#6e9557;
  font-size:11px;
  font-weight:1000;
}

.contributors-empty{
  min-height:100px;
}

.member-statistics-panel{
  overflow:hidden;
}

.member-stat-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-height:78px;
  padding:18px 22px;
  border-bottom:1px solid var(--line);
}

.member-stat-row > strong{
  color:#d9e2ec;
  font-size:11px;
}

.member-stat-row > span,
.member-stat-row > div > span{
  color:#edf4fb;
  font-size:24px;
  font-weight:450;
  letter-spacing:-.03em;
}

.member-stat-row-peak > div{
  text-align:right;
}

.member-stat-row-peak small{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:9px;
}

.newest-member{
  display:flex;
  align-items:center;
  gap:13px;
  margin:16px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(255,255,255,.014);
  transition:.16s ease;
}

.newest-member:hover{
  border-color:rgba(var(--accent-rgb),.22);
  background:rgba(var(--accent-rgb),.028);
}

.newest-member img,
.newest-member-avatar{
  width:52px;
  height:52px;
  flex:0 0 52px;
  border-radius:12px;
}

.newest-member img{
  object-fit:cover;
}

.newest-member-avatar{
  display:grid;
  place-items:center;
  color:var(--accent);
  background:rgba(var(--accent-rgb),.08);
  border:1px solid rgba(var(--accent-rgb),.15);
  font-size:18px;
  font-weight:1000;
}

.newest-member > span{
  min-width:0;
}

.newest-member small,
.newest-member strong,
.newest-member em{
  display:block;
}

.newest-member small{
  color:var(--muted);
  font-size:8px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.newest-member strong{
  margin-top:5px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
}

.newest-member em{
  margin-top:4px;
  color:var(--muted);
  font-size:9px;
  font-style:normal;
}

@media(max-width:980px){
  .forum-sidebar{
    grid-column:1/-1;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .forum-sidebar > .side-panel{
    grid-column:1/-1;
  }
}

@media(max-width:650px){
  .forum-sidebar{
    grid-template-columns:1fr;
  }

  .contributor-tabs a{
    min-height:42px;
    font-size:9px;
  }
}


/* ===== SUBFORUM MANAGEMENT UI FIX ===== */

.structure-forum-parent{
  grid-template-columns:56px minmax(0,1fr) !important;
  gap:18px !important;
  padding:22px 24px !important;
}

.structure-forum-parent > .structure-forum-icon{
  width:52px !important;
  height:52px !important;
  border-radius:15px !important;
  font-size:20px !important;
}

.structure-forum-parent > .structure-forum-form{
  padding-right:130px !important;
}

.management-subforums{
  grid-column:1 / -1 !important;
  width:100% !important;
  margin:20px 0 0 !important;
  padding:0 !important;
  overflow:hidden !important;
  border:1px solid var(--line) !important;
  border-radius:16px !important;
  background:
    radial-gradient(circle at 0 0, rgba(var(--accent-rgb),.045), transparent 34%),
    #090f15 !important;
}

.management-subforums-head{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:20px !important;
  margin:0 !important;
  padding:18px 20px !important;
  border-bottom:1px solid var(--line) !important;
  background:rgba(255,255,255,.018) !important;
}

.management-subforums-head strong,
.management-subforums-head small{
  display:block !important;
}

.management-subforums-head strong{
  margin-top:4px !important;
  color:#eef4fa !important;
  font-size:14px !important;
}

.management-subforums-head small{
  margin-top:5px !important;
  color:var(--muted) !important;
  font-size:9px !important;
  font-weight:500 !important;
}

.management-subforum-count{
  flex:0 0 auto !important;
  padding:7px 10px !important;
  border:1px solid rgba(var(--accent-rgb),.16) !important;
  border-radius:999px !important;
  color:var(--accent) !important;
  background:rgba(var(--accent-rgb),.06) !important;
  font-size:8px !important;
  font-weight:900 !important;
  letter-spacing:.08em !important;
  text-transform:uppercase !important;
}

/* New subforum form */
.management-subforum-create{
  display:grid !important;
  grid-template-columns:minmax(180px,1.1fr) minmax(260px,2fr) 90px 90px auto !important;
  gap:12px !important;
  align-items:end !important;
  margin:0 !important;
  padding:18px 20px !important;
  border:0 !important;
  border-bottom:1px solid var(--line) !important;
  border-radius:0 !important;
  background:rgba(var(--accent-rgb),.018) !important;
}

.management-subforum-create label,
.management-subforum-edit label{
  display:grid !important;
  gap:7px !important;
  min-width:0 !important;
  margin:0 !important;
}

.management-subforum-create label > span,
.management-subforum-edit label > span{
  color:#b8c5d5 !important;
  font-size:8px !important;
  font-weight:900 !important;
  letter-spacing:.08em !important;
  text-transform:uppercase !important;
}

.management-subforum-create input,
.management-subforum-create select,
.management-subforum-edit input,
.management-subforum-edit select{
  width:100% !important;
  min-width:0 !important;
  min-height:42px !important;
  padding:0 12px !important;
  border:1px solid #26313d !important;
  border-radius:10px !important;
  outline:none !important;
  background:#0b1118 !important;
  color:#edf4fb !important;
  box-shadow:none !important;
  font:inherit !important;
  font-size:10px !important;
  transition:border-color .15s ease, box-shadow .15s ease, background .15s ease !important;
}

.management-subforum-create input:focus,
.management-subforum-create select:focus,
.management-subforum-edit input:focus,
.management-subforum-edit select:focus{
  border-color:rgba(var(--accent-rgb),.48) !important;
  background:#0c141b !important;
  box-shadow:0 0 0 3px rgba(var(--accent-rgb),.055) !important;
}

.management-subforum-create input::placeholder,
.management-subforum-edit input::placeholder{
  color:#627184 !important;
}

.subforum-create-action{
  display:flex !important;
  align-items:flex-end !important;
}

.subforum-create-action .button{
  min-height:42px !important;
  white-space:nowrap !important;
}

/* Existing subforum list */
.management-subforum-list{
  display:grid !important;
  gap:0 !important;
  margin:0 !important;
}

.management-subforum-row{
  position:relative !important;
  display:grid !important;
  grid-template-columns:190px minmax(0,1fr) auto !important;
  gap:16px !important;
  align-items:center !important;
  margin:0 !important;
  padding:16px 20px !important;
  border:0 !important;
  border-bottom:1px solid var(--line) !important;
  border-radius:0 !important;
  background:transparent !important;
}

.management-subforum-row:last-child{
  border-bottom:0 !important;
}

.management-subforum-row:hover{
  background:rgba(255,255,255,.012) !important;
}

.management-subforum-preview{
  display:flex !important;
  align-items:center !important;
  gap:11px !important;
  min-width:0 !important;
}

.management-subforum-preview-icon{
  width:38px !important;
  height:38px !important;
  display:grid !important;
  place-items:center !important;
  flex:0 0 38px !important;
  border-radius:10px !important;
  color:var(--accent) !important;
  background:rgba(var(--accent-rgb),.07) !important;
  border:1px solid rgba(var(--accent-rgb),.14) !important;
  font-size:13px !important;
  font-weight:1000 !important;
}

.management-subforum-preview > div{
  min-width:0 !important;
}

.management-subforum-preview strong,
.management-subforum-preview small{
  display:block !important;
}

.management-subforum-preview strong{
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  color:#eef4fa !important;
  font-size:11px !important;
}

.management-subforum-preview small{
  margin-top:4px !important;
  color:var(--muted) !important;
  font-size:8px !important;
}

.management-subforum-edit{
  display:grid !important;
  grid-template-columns:160px 180px minmax(220px,1fr) 75px 75px auto !important;
  gap:9px !important;
  align-items:end !important;
  margin:0 !important;
  padding:0 !important;
}

.management-subforum-actions{
  display:flex !important;
  align-items:flex-end !important;
}

.management-subforum-edit .button,
.management-subforum-delete .button{
  min-height:42px !important;
}

.management-subforum-delete{
  margin:0 !important;
  padding:0 !important;
}

/* Empty state */
.management-subforum-empty{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:12px !important;
  min-height:94px !important;
  margin:0 !important;
  padding:18px 20px !important;
  color:var(--muted) !important;
  text-align:left !important;
}

.management-subforum-empty > span{
  width:38px !important;
  height:38px !important;
  display:grid !important;
  place-items:center !important;
  border-radius:10px !important;
  color:var(--accent) !important;
  background:rgba(var(--accent-rgb),.06) !important;
  border:1px solid rgba(var(--accent-rgb),.12) !important;
  font-size:15px !important;
}

.management-subforum-empty strong,
.management-subforum-empty small{
  display:block !important;
}

.management-subforum-empty strong{
  color:#dce5ef !important;
  font-size:10px !important;
}

.management-subforum-empty small{
  margin-top:4px !important;
  color:var(--muted) !important;
  font-size:8px !important;
}

@media(max-width:1350px){
  .management-subforum-create{
    grid-template-columns:1fr 1.5fr 80px 80px !important;
  }

  .subforum-create-action{
    grid-column:1 / -1 !important;
    justify-content:flex-end !important;
  }

  .management-subforum-row{
    grid-template-columns:170px minmax(0,1fr) !important;
  }

  .management-subforum-delete{
    grid-column:2 !important;
    justify-self:end !important;
  }

  .management-subforum-edit{
    grid-template-columns:1fr 1fr 1.5fr 70px 70px !important;
  }

  .management-subforum-actions{
    grid-column:1 / -1 !important;
    justify-content:flex-end !important;
  }
}

@media(max-width:900px){
  .structure-forum-parent > .structure-forum-form{
    padding-right:0 !important;
  }

  .management-subforum-create{
    grid-template-columns:1fr 1fr !important;
  }

  .subforum-create-action{
    grid-column:1 / -1 !important;
  }

  .management-subforum-row{
    grid-template-columns:1fr !important;
  }

  .management-subforum-edit{
    grid-template-columns:1fr 1fr !important;
  }

  .management-subforum-delete{
    grid-column:1 !important;
    justify-self:start !important;
  }
}

@media(max-width:600px){
  .management-subforums-head{
    align-items:flex-start !important;
  }

  .management-subforum-create,
  .management-subforum-edit{
    grid-template-columns:1fr !important;
  }

  .subforum-create-action,
  .management-subforum-actions{
    grid-column:1 !important;
    justify-content:stretch !important;
  }

  .subforum-create-action .button,
  .management-subforum-actions .button,
  .management-subforum-delete .button{
    width:100% !important;
  }
}


/* ===== SUBFORUM ROW LAYOUT FIX ===== */
.subforum-strip{
  display:block !important;
  padding:0 34px 18px 245px !important;
}

.subforum-strip-label{
  display:none !important;
}

.subforum-strip-list{
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:wrap !important;
  justify-content:flex-start !important;
  align-items:stretch !important;
  gap:9px !important;
  width:100% !important;
}

.subforum-chip{
  flex:0 1 300px !important;
  width:auto !important;
  min-width:220px !important;
  max-width:360px !important;
  margin:0 !important;
}

/* Keep each new subforum on the same row until horizontal space runs out. */
.subforum-chip + .subforum-chip{
  margin-left:0 !important;
}

@media(max-width:1200px){
  .subforum-strip{
    padding-left:180px !important;
  }

  .subforum-chip{
    flex-basis:280px !important;
  }
}

@media(max-width:760px){
  .subforum-strip{
    padding:0 18px 16px !important;
  }

  .subforum-strip-list{
    display:flex !important;
    flex-direction:column !important;
    flex-wrap:nowrap !important;
  }

  .subforum-chip{
    flex:0 0 auto !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
  }
}


/* ===== SIMPLE INLINE SUBFORUM LINKS ===== */
.subforum-strip,
.subforum-strip-list,
.subforum-strip-label,
.subforum-chip{
  display:none !important;
}

.subforum-inline{
  display:flex !important;
  align-items:flex-start !important;
  gap:10px !important;
  padding:0 32px 18px 180px !important;
  min-width:0 !important;
}

.subforum-inline-branch{
  flex:0 0 auto !important;
  margin-top:1px !important;
  color:#718197 !important;
  font-size:18px !important;
  line-height:1 !important;
  font-weight:400 !important;
}

.subforum-inline-links{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:5px 20px !important;
  min-width:0 !important;
}

.subforum-inline-links a{
  position:relative !important;
  display:inline-block !important;
  padding:0 !important;
  margin:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:none !important;
  box-shadow:none !important;
  color:#dfe8f2 !important;
  font-size:11px !important;
  font-weight:800 !important;
  line-height:1.5 !important;
  text-decoration:none !important;
  white-space:nowrap !important;
  transition:color .15s ease !important;
}

.subforum-inline-links a:hover{
  color:var(--accent) !important;
  background:none !important;
  box-shadow:none !important;
  transform:none !important;
}

.subforum-inline-links a:not(:last-child)::after{
  content:"" !important;
  position:absolute !important;
  right:-11px !important;
  top:50% !important;
  width:2px !important;
  height:2px !important;
  transform:translateY(-50%) !important;
  border-radius:50% !important;
  background:#586779 !important;
}

@media(max-width:1100px){
  .subforum-inline{
    padding-left:125px !important;
  }
}

@media(max-width:760px){
  .subforum-inline{
    padding:0 18px 16px !important;
  }

  .subforum-inline-links{
    gap:5px 16px !important;
  }

  .subforum-inline-links a{
    font-size:10px !important;
  }
}


/* ===== COMPACT FORUM ROW + LEFT-ALIGNED SUBFORUMS ===== */

/* Do not stretch the left forum panel to the height of the sidebar. */
.forum-layout{
  align-items:start !important;
}

.forum-section-stack{
  align-self:start !important;
  align-content:start !important;
  height:auto !important;
}

.forum-section-stack > .panel,
.forum-section-panel{
  align-self:start !important;
  height:auto !important;
  min-height:0 !important;
}

/* Move the simple subforum links much further left. */
.subforum-inline{
  padding:0 30px 16px 48px !important;
}

/* Keep the subforum line compact so the parent forum block stays short. */
.forum-with-subforums{
  min-height:0 !important;
  height:auto !important;
}

.forum-with-subforums > .category-row{
  min-height:0 !important;
}

.subforum-inline-links{
  min-height:0 !important;
}

@media(max-width:1100px){
  .subforum-inline{
    padding-left:48px !important;
  }
}

@media(max-width:760px){
  .subforum-inline{
    padding:0 18px 14px !important;
  }
}

/* ===== TRUE VISUAL / WYSIWYG EDITOR + MESSAGE EDITING ===== */
.wysiwyg-editor .editor-source{
  display:block;
  width:100%;
  min-height:270px;
  padding:22px 24px;
  border:0;
  outline:none;
  resize:vertical;
  background:#090f15;
  color:#edf4fb;
  font:14px/1.7 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

.wysiwyg-editor.is-ready .editor-source{
  display:none!important;
}

.editor-visual[hidden]{
  display:none!important;
}

.editor-visual{
  display:block;
  width:100%;
  min-height:270px;
  max-height:720px;
  overflow:auto;
  padding:22px 24px;
  border:0;
  border-radius:0;
  outline:none;
  background:#090f15;
  color:#edf4fb;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:14px;
  line-height:1.7;
  overflow-wrap:anywhere;
  white-space:normal;
}

.editor-visual:focus{
  box-shadow:inset 0 0 0 1px rgba(var(--accent-rgb),.16);
}

.editor-visual:empty::before{
  content:attr(data-placeholder);
  color:#667588;
  pointer-events:none;
}

.editor-visual a{
  color:#6fc5ff;
  text-decoration:underline;
  text-underline-offset:2px;
}

.editor-visual blockquote{
  margin:14px 0;
  padding:13px 16px;
  border-left:3px solid var(--accent);
  border-radius:0 10px 10px 0;
  background:rgba(var(--accent-rgb),.045);
  color:#cbd6e2;
}

.editor-visual pre{
  margin:14px 0;
  padding:14px 16px;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:10px;
  background:#060a0e;
  color:#c6f3da;
  white-space:pre-wrap;
  font-family:"Courier New",monospace;
  font-size:12px;
  line-height:1.6;
}

.editor-visual ul,
.editor-visual ol{
  margin:10px 0;
  padding-left:24px;
}

.editor-visual img{
  display:block;
  max-width:min(100%,720px);
  max-height:520px;
  margin:10px 0;
  border:1px solid var(--line);
  border-radius:12px;
  object-fit:contain;
}

.editor-live-label{
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin-left:auto;
  padding:0 9px;
  color:var(--muted);
  font-size:9px;
  font-weight:850;
  letter-spacing:.04em;
  white-space:nowrap;
}

.editor-live-label > span{
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 8px rgba(var(--accent-rgb),.42);
}

.editor-status{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:9px 16px;
  border-top:1px solid var(--line);
  background:rgba(255,255,255,.012);
  color:var(--muted);
  font-size:8px;
}

.editor-status strong{
  color:#9dafc2;
  font-size:8px;
}

.editor-status strong.over-limit{
  color:#ff7777;
}

.link-edit{
  display:inline-flex;
  align-items:center;
  padding:0;
  border:0;
  color:#8dc6ff;
  background:none;
  font-size:10px;
  font-weight:850;
  text-decoration:none;
}

.link-edit:hover{
  color:#b9ddff;
  text-decoration:underline;
}

.edit-message-card{
  max-width:none;
}

.edit-message-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
}

.edit-existing-attachments{
  margin-bottom:16px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(255,255,255,.014);
}

.edit-existing-attachments > small{
  display:block;
  margin-top:10px;
  color:var(--muted);
  font-size:8px;
}

@media(max-width:900px){
  .editor-live-label{
    width:100%;
    margin-left:0;
    padding:6px 8px 0;
  }
}

@media(max-width:600px){
  .editor-visual{
    min-height:220px;
    padding:18px;
  }

  .editor-status{
    align-items:flex-start;
    flex-direction:column;
    gap:4px;
  }

  .edit-message-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
  }
}

.post-bottom-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:auto;
  padding-top:14px;
}

.post-edit-slot{
  min-width:76px;
}

.message-edit-button{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:34px;
  padding:0 11px;
  border:1px solid var(--line);
  border-radius:9px;
  background:rgba(255,255,255,.018);
  color:#aebed0;
  font-size:9px;
  font-weight:900;
  text-decoration:none;
  transition:.15s ease;
}

.message-edit-button span{
  color:var(--accent);
  font-size:14px;
}

.message-edit-button:hover{
  color:#eef4fa;
  border-color:rgba(var(--accent-rgb),.24);
  background:rgba(var(--accent-rgb),.05);
}

.post-bottom-row .reaction-row{
  margin-top:0!important;
  margin-left:0!important;
  padding-top:0!important;
}

@media(max-width:600px){
  .post-bottom-row{
    align-items:flex-end;
  }
}


/* ===== INLINE IMAGE UPLOAD STATUS ===== */
.editor-image-status{
  margin:-1px 0 0;
  padding:9px 14px;
  border-top:1px solid var(--line);
  color:var(--muted);
  background:rgba(255,255,255,.015);
  font-size:9px;
  font-weight:800;
}

.editor-image-status.is-uploading{
  color:var(--accent);
}

.editor-image-status.is-error{
  color:#ff7373;
  background:rgba(255,90,90,.045);
}

.editor-image-status.is-success{
  color:#67e89d;
}

.editor-visual img.bb-image,
.editor-visual img{
  max-width:min(100%, 1100px);
  height:auto;
  display:block;
  margin:10px 0;
  border-radius:10px;
}


/* ===== FORUM BACKGROUND + THEME SELECTOR ===== */
.forum-header{
  background:rgba(7,10,14,.90);
}

.panel,
.post-card,
.auth-card,
.forum-hero{
  backdrop-filter:blur(7px);
  -webkit-backdrop-filter:blur(7px);
}

.panel,
.post-card,
.auth-card{
  background:linear-gradient(160deg,rgba(14,20,28,.92),rgba(8,13,19,.90));
}

.forum-hero{
  background:
    radial-gradient(circle at 88% 15%,rgba(var(--accent-rgb),.16),transparent 27%),
    linear-gradient(145deg,rgba(18,26,35,.94),rgba(8,14,20,.92));
}

.forum-footer{
  padding:28px 0 32px;
  background:rgba(5,8,12,.94);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}

.forum-footer .forum-container.forum-footer-inner{
  display:block;
}

.forum-footer-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

.forum-footer-theme{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin-top:24px;
  padding-top:24px;
  border-top:1px solid var(--line);
}

.forum-theme-copy strong,
.forum-theme-copy small{
  display:block;
}

.forum-theme-copy strong{
  color:var(--text);
  font-size:12px;
  font-weight:900;
  letter-spacing:.04em;
}

.forum-theme-copy small{
  margin-top:5px;
  color:var(--muted);
  font-size:9px;
  line-height:1.5;
}

.forum-theme-picker{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:6px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.025);
}

.forum-theme-option{
  min-height:38px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:0 12px;
  border:1px solid transparent;
  border-radius:10px;
  color:#aab8ca;
  background:transparent;
  font-size:10px;
  font-weight:850;
  cursor:pointer;
  transition:.18s ease;
}

.forum-theme-option:hover{
  color:#fff;
  background:rgba(255,255,255,.04);
}

.forum-theme-option[aria-pressed="true"]{
  color:#fff;
  border-color:rgba(var(--accent-rgb),.28);
  background:rgba(var(--accent-rgb),.10);
  box-shadow:inset 0 0 20px rgba(var(--accent-rgb),.04);
}

.forum-theme-swatch{
  width:11px;
  height:11px;
  flex:0 0 11px;
  border-radius:50%;
  box-shadow:0 0 10px currentColor;
}

.forum-theme-swatch-default{
  color:#23d17f;
  background:#23d17f;
}

.forum-theme-swatch-red{
  color:#ff5d57;
  background:#ff5d57;
}

.forum-theme-swatch-blue{
  color:#4aa8ff;
  background:#4aa8ff;
}

@media(max-width:700px){
  body{
    background-attachment:scroll,scroll,scroll;
    background-position:center top,center top,62% top;
  }

  .forum-footer-top{
    display:block;
  }

  .forum-footer-top a{
    display:block;
    margin-top:8px;
  }

  .forum-footer-theme{
    display:grid;
    justify-items:stretch;
  }

  .forum-theme-picker{
    width:100%;
    display:grid;
    grid-template-columns:repeat(3,1fr);
  }

  .forum-theme-option{
    justify-content:center;
  }
}

@media(max-width:430px){
  .forum-theme-option{
    padding:0 8px;
    font-size:9px;
  }
}


/* ===== POST ACHIEVEMENT MEDALS ===== */
.profile-medals-panel{
  padding:20px;
  overflow:hidden;
}

.profile-medals-head{
  margin-bottom:14px;
  text-align:left;
}

.profile-medals-head h2{
  margin:4px 0 0;
  font-size:15px;
}

.profile-medals-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
}

.profile-medal{
  min-width:0;
  min-height:108px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:9px 7px 8px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(255,255,255,.018);
  text-align:center;
}

.profile-medal:last-child:nth-child(odd){
  grid-column:1/-1;
  width:calc(50% - 5px);
  justify-self:center;
}

.profile-medal img{
  width:72px;
  height:82px;
  display:block;
  object-fit:contain;
  filter:drop-shadow(0 7px 12px rgba(0,0,0,.28));
}

.profile-medal strong{
  margin-top:3px;
  color:#dce7f3;
  font-size:9px;
  font-weight:900;
  letter-spacing:.035em;
}

.post-achievement-medal{
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid var(--line);
  text-align:center;
}

.post-achievement-medal img{
  width:58px;
  height:66px;
  display:block;
  margin:0 auto;
  object-fit:contain;
  filter:drop-shadow(0 6px 10px rgba(0,0,0,.28));
}

.post-achievement-medal strong{
  display:block;
  margin-top:2px;
  color:#dce7f3;
  font-size:8px;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
}

@media(max-width:850px){
  .profile-medals-panel{
    padding:18px;
  }

  .profile-medals-grid{
    grid-template-columns:repeat(5,minmax(72px,1fr));
    overflow-x:auto;
  }

  .profile-medal,
  .profile-medal:last-child:nth-child(odd){
    width:auto;
    grid-column:auto;
  }

  .post-achievement-medal{
    min-width:78px;
    margin:0 0 0 auto;
    padding:0 0 0 12px;
    border-top:0;
    border-left:1px solid var(--line);
  }

  .post-achievement-medal img{
    width:44px;
    height:50px;
  }
}

@media(max-width:700px){
  .post-achievement-medal{
    margin-left:0;
  }
}

@media(max-width:520px){
  .profile-medals-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    overflow:visible;
  }

  .profile-medal:last-child:nth-child(odd){
    grid-column:1/-1;
    width:calc(50% - 5px);
  }

  .post-achievement-medal{
    width:100%;
    margin-top:10px;
    padding:10px 0 0;
    border-left:0;
    border-top:1px solid var(--line);
  }
}


.profile-medals-group + .profile-medals-group{
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid var(--line);
}

.profile-medals-group h3{
  margin:0 0 12px;
  color:#dce7f3;
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.profile-medals-grid{
  grid-template-columns:repeat(auto-fit,minmax(92px,1fr));
}

.profile-medal:last-child:nth-child(odd){
  grid-column:auto;
  width:auto;
  justify-self:stretch;
}

.post-achievement-medals{
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid var(--line);
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px;
}

.post-achievement-medal{
  margin-top:0;
  padding-top:0;
  border-top:0;
  flex:0 0 68px;
}

.post-achievement-medal img{
  width:52px;
  height:60px;
}

.post-achievement-medal strong{
  font-size:7px;
  line-height:1.25;
}

@media(max-width:850px){
  .profile-medals-grid{
    grid-template-columns:repeat(6,minmax(78px,1fr));
  }

  .post-achievement-medals{
    margin:0 0 0 auto;
    padding:0 0 0 12px;
    border-top:0;
    border-left:1px solid var(--line);
    justify-content:flex-end;
  }

  .post-achievement-medal{
    flex-basis:62px;
    min-width:62px;
    padding:0;
    border-left:0;
  }

  .post-achievement-medal img{
    width:42px;
    height:48px;
  }
}

@media(max-width:520px){
  .profile-medals-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .post-achievement-medals{
    width:100%;
    margin-top:10px;
    padding:10px 0 0;
    border-left:0;
    border-top:1px solid var(--line);
    justify-content:center;
  }
}


/* ===== SMALLER MEDALS: 50% OF PREVIOUS SIZE ===== */
.profile-medal{
  min-height:64px !important;
  padding:5px 4px !important;
}

.profile-medal img{
  width:36px !important;
  height:41px !important;
}

.profile-medal strong{
  margin-top:1px !important;
  font-size:7px !important;
  line-height:1.15 !important;
}

.profile-medals-grid{
  grid-template-columns:repeat(auto-fit,minmax(66px,1fr)) !important;
  gap:6px !important;
}

.post-achievement-medals{
  gap:6px !important;
}

.post-achievement-medal{
  flex:0 0 40px !important;
  min-width:40px !important;
}

.post-achievement-medal img{
  width:26px !important;
  height:30px !important;
}

.post-achievement-medal strong{
  margin-top:1px !important;
  font-size:5.5px !important;
  line-height:1.1 !important;
  letter-spacing:.02em !important;
}

@media(max-width:850px){
  .profile-medals-grid{
    grid-template-columns:repeat(auto-fit,minmax(60px,1fr)) !important;
  }

  .post-achievement-medal{
    flex-basis:36px !important;
    min-width:36px !important;
  }

  .post-achievement-medal img{
    width:24px !important;
    height:27px !important;
  }
}

@media(max-width:520px){
  .profile-medals-grid{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
}


/* ===== PRIVATE MESSAGES ===== */
.messages-nav-icon{
  position:relative;
  width:42px;
  height:42px;
  display:inline-grid !important;
  place-items:center;
  flex:0 0 42px;
  padding:0 !important;
  border:1px solid var(--line);
  border-radius:13px;
  background:rgba(255,255,255,.025);
  color:#aebbc9 !important;
  transition:.18s ease;
}

.messages-nav-icon:hover,
.messages-nav-icon.active{
  border-color:rgba(var(--accent-rgb),.34);
  background:rgba(var(--accent-rgb),.08);
  color:var(--accent) !important;
}

.messages-nav-icon svg{
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.messages-nav-count{
  position:absolute;
  top:-7px;
  right:-7px;
  min-width:19px;
  height:19px;
  display:grid;
  place-items:center;
  padding:0 5px;
  border:2px solid #080c11;
  border-radius:999px;
  background:var(--accent);
  color:#07110c;
  font-size:8px;
  font-weight:1000;
  line-height:1;
}

.profile-page-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:0;
}

.profile-page-top .breadcrumbs{
  margin-bottom:0;
}

.profile-send-message{
  flex:0 0 auto;
}

.messages-page-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  margin-bottom:20px;
}

.messages-page-head .breadcrumbs{
  margin-bottom:10px;
}

.messages-page-head h1{
  margin:0;
  font-size:26px;
  line-height:1.1;
}

.messages-page-head p{
  margin:7px 0 0;
  color:var(--muted);
  font-size:10px;
}

.messages-tabs{
  display:flex;
  gap:7px;
  margin-bottom:16px;
}

.messages-tabs a{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:40px;
  padding:0 14px;
  border:1px solid var(--line);
  border-radius:11px;
  color:#aebbc9;
  background:rgba(255,255,255,.02);
  font-size:10px;
  font-weight:900;
}

.messages-tabs a:hover,
.messages-tabs a.active{
  color:#fff;
  border-color:rgba(var(--accent-rgb),.28);
  background:rgba(var(--accent-rgb),.08);
}

.messages-tabs a span{
  min-width:20px;
  height:20px;
  display:grid;
  place-items:center;
  padding:0 5px;
  border-radius:999px;
  background:rgba(255,255,255,.06);
  font-size:8px;
}

.private-compose-panel{
  max-width:900px;
}

.private-message-form{
  padding:20px 22px 24px;
}

.private-message-form textarea{
  resize:vertical;
  min-height:220px;
}

.private-message-form-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:9px;
}

.private-message-list-panel{
  overflow:hidden;
}

.private-message-list{
  display:grid;
}

.private-message-row{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) 42px;
  align-items:stretch;
  border-bottom:1px solid var(--line);
  transition:.16s ease;
}

.private-message-row:last-child{
  border-bottom:0;
}

.private-message-row:hover{
  background:rgba(255,255,255,.018);
}

.private-message-row.unread{
  background:rgba(var(--accent-rgb),.045);
}

.private-message-row.unread::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:3px;
  background:var(--accent);
}

.private-message-row-main{
  min-width:0;
  display:grid;
  grid-template-columns:46px minmax(0,1fr);
  gap:14px;
  align-items:center;
  padding:17px 8px 17px 20px;
  color:inherit;
}

.private-message-row-avatar{
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:13px;
  background:#0a1016;
  color:var(--accent);
  font-size:15px;
  font-weight:1000;
}

.private-message-row-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.private-message-row-content{
  min-width:0;
}

.private-message-row-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.private-message-row-top strong{
  font-size:11px;
}

.private-message-row-top time{
  color:var(--muted);
  font-size:8px;
  white-space:nowrap;
}

.private-message-row-subject{
  display:flex;
  align-items:center;
  gap:7px;
  margin-top:4px;
  color:#e8eef5;
  font-size:11px;
  font-weight:850;
}

.private-unread-dot{
  padding:3px 6px;
  border-radius:999px;
  background:var(--accent);
  color:#06120c;
  font-size:7px;
  font-weight:1000;
  text-transform:uppercase;
}

.private-message-row-content p{
  margin:4px 0 0;
  overflow:hidden;
  color:var(--muted);
  font-size:9px;
  line-height:1.45;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.private-message-row-delete{
  display:grid;
  place-items:center;
  padding-right:10px;
}

.private-message-row-delete button{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border:1px solid transparent;
  border-radius:9px;
  background:transparent;
  color:#687789;
  cursor:pointer;
  font-size:18px;
}

.private-message-row-delete button:hover{
  color:#ff7777;
  border-color:rgba(255,100,100,.18);
  background:rgba(255,100,100,.06);
}

.private-message-empty{
  min-height:260px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:28px;
  text-align:center;
}

.private-message-empty > div{
  width:56px;
  height:56px;
  display:grid;
  place-items:center;
  margin-bottom:14px;
  border:1px solid rgba(var(--accent-rgb),.20);
  border-radius:16px;
  background:rgba(var(--accent-rgb),.06);
  color:var(--accent);
  font-size:22px;
}

.private-message-empty strong{
  font-size:13px;
}

.private-message-empty span{
  margin-top:6px;
  color:var(--muted);
  font-size:9px;
}

.private-message-view{
  overflow:hidden;
}

.private-message-view-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:18px 22px;
  border-bottom:1px solid var(--line);
}

.private-message-person{
  display:flex;
  align-items:center;
  gap:12px;
}

.private-message-person > img,
.private-message-person > span{
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:12px;
  background:#0a1016;
  object-fit:cover;
  color:var(--accent);
  font-weight:1000;
}

.private-message-person small,
.private-message-person a{
  display:block;
}

.private-message-person small{
  margin-bottom:3px;
  color:var(--muted);
  font-size:8px;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.private-message-person a{
  font-size:11px;
  font-weight:900;
}

.private-message-view-head time{
  color:var(--muted);
  font-size:8px;
}

.private-message-subject{
  padding:20px 24px 0;
  color:#fff;
  font-size:19px;
  font-weight:950;
}

.private-message-body{
  min-height:220px;
  padding:18px 24px 28px;
  color:#d8e2ec;
  font-size:11px;
  line-height:1.75;
  overflow-wrap:anywhere;
}

.private-message-view-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:15px 22px;
  border-top:1px solid var(--line);
}

.private-message-view-actions > div{
  display:flex;
  gap:8px;
}

@media(max-width:760px){
  .profile-page-top,
  .messages-page-head{
    align-items:flex-start;
  }

  .messages-page-head{
    display:grid;
  }

  .private-message-row-main{
    grid-template-columns:38px minmax(0,1fr);
    padding-left:14px;
  }

  .private-message-row-avatar{
    width:38px;
    height:38px;
    border-radius:10px;
  }

  .private-message-row-top{
    align-items:flex-start;
    display:grid;
    gap:3px;
  }

  .private-message-row-content p{
    white-space:normal;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
  }

  .private-message-view-head,
  .private-message-view-actions{
    align-items:flex-start;
  }
}

@media(max-width:520px){
  .messages-nav-icon{
    width:38px;
    height:38px;
    flex-basis:38px;
  }

  .profile-page-top{
    display:grid;
  }

  .messages-tabs{
    display:grid;
    grid-template-columns:1fr 1fr;
  }

  .messages-tabs a{
    justify-content:center;
  }

  .private-message-view-head,
  .private-message-view-actions{
    display:grid;
  }

  .private-message-view-actions form{
    width:100%;
  }

  .private-message-view-actions form .button{
    width:100%;
  }
}


/* ===== FORUM ROW LATEST TOPIC AUTHORS ===== */
.category-last-author{
  display:block;
  margin-top:6px;
  color:var(--muted);
  font-size:8px;
  font-weight:650;
  line-height:1.3;
  letter-spacing:0;
  text-transform:none;
}

.category-last-author b{
  font-size:8px;
  font-weight:900;
  text-transform:none;
}

.category-last-reply{
  margin-top:3px;
}


/* ===== ETSOMP COINS WALLET ===== */
.profile-wallet-card{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:11px;
  margin-top:14px;
  padding:12px 14px;
  border:1px solid rgba(242,185,40,.20);
  border-radius:12px;
  background:linear-gradient(135deg,rgba(242,185,40,.075),rgba(255,255,255,.012));
  box-shadow:inset 0 0 24px rgba(242,185,40,.025);
}

.profile-wallet-icon{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  flex:0 0 34px;
  border:1px solid rgba(255,213,94,.28);
  border-radius:50%;
  color:#ffd45d;
  background:rgba(242,185,40,.08);
  box-shadow:0 0 14px rgba(242,185,40,.10);
  font-size:18px;
  font-weight:1000;
}

.profile-wallet-card strong,
.profile-wallet-card span{
  display:block;
  text-align:left;
}

.profile-wallet-card strong{
  color:#ffe293;
  font-size:13px;
  font-weight:1000;
  line-height:1.1;
}

.profile-wallet-card span{
  margin-top:3px;
  color:#a9b6c6;
  font-size:7px;
  font-weight:900;
  letter-spacing:.09em;
  text-transform:uppercase;
}

.post-wallet-balance{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  margin-top:10px;
  padding:8px 6px;
  border-top:1px solid var(--line);
  color:#ffe293;
  text-align:center;
}

.post-wallet-coin{
  color:#ffd45d;
  font-size:12px;
  line-height:1;
}

.post-wallet-balance strong{
  color:#ffe293;
  font-size:9px;
  font-weight:1000;
}

.post-wallet-balance small{
  color:#8f9db0;
  font-size:6px;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
}

@media(max-width:850px){
  .post-wallet-balance{
    margin:0 0 0 auto;
    padding:0 12px;
    border-top:0;
    border-left:1px solid var(--line);
  }
}

@media(max-width:520px){
  .post-wallet-balance{
    width:100%;
    margin-top:8px;
    padding:8px 0 0;
    border-left:0;
    border-top:1px solid var(--line);
  }
}


/* ===== VIP MEMBER ROLE ===== */
.role-badge.role-vipmember{
  color:#f2c45e !important;
  border-color:rgba(242,196,94,.72) !important;
  background:
    radial-gradient(circle at 80% 20%,rgba(144,82,255,.17),transparent 34%),
    linear-gradient(180deg,#211a30 0%,#0d0a13 49%,#17101f 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,232,170,.18),
    inset 0 -1px 0 rgba(0,0,0,.78),
    0 0 18px rgba(242,196,94,.10),
    0 7px 20px rgba(0,0,0,.30) !important;
}

.role-badge.role-vipmember::before{
  content:"◆" !important;
  left:15px !important;
  width:auto !important;
  height:auto !important;
  border:0 !important;
  transform:translateY(-50%) !important;
  color:#f8d879 !important;
  text-shadow:0 0 9px rgba(242,196,94,.55);
  font-size:14px;
  line-height:1;
}

.role-badge.role-vipmember::after{
  background:linear-gradient(90deg,#9b64ff,#f2c45e,#9b64ff) !important;
  opacity:1 !important;
  box-shadow:0 0 12px rgba(242,196,94,.45) !important;
}

.username-role-vipmember{
  color:#f2c45e !important;
  text-shadow:0 0 9px rgba(242,196,94,.16);
}

.coin-reward-notice{
  display:grid;
  gap:4px;
  margin:4px 0 14px;
  padding:11px 13px;
  border:1px solid rgba(242,196,94,.16);
  border-radius:10px;
  background:rgba(242,196,94,.035);
}

.coin-reward-notice strong{
  color:#f2c45e;
  font-size:9px;
  font-weight:950;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.coin-reward-notice span{
  color:var(--muted);
  font-size:8px;
  line-height:1.45;
}


/* ===== SECONDARY VIP MEMBER BADGE ===== */
.secondary-vip-badge{
  margin-top:7px !important;
  min-height:34px !important;
  width:auto !important;
  padding:0 20px 0 42px !important;
  font-size:8px !important;
  letter-spacing:.12em !important;
  opacity:.96;
}

.secondary-vip-badge.large{
  width:100% !important;
  min-height:46px !important;
  margin-top:9px !important;
  padding-left:52px !important;
  font-size:10px !important;
}

.post-user .secondary-vip-badge.post-role{
  width:100% !important;
  max-width:150px;
  margin-left:auto !important;
  margin-right:auto !important;
}

.secondary-vip-badge::before{
  font-size:11px !important;
  left:13px !important;
}

.secondary-vip-badge.large::before{
  left:18px !important;
  font-size:13px !important;
}

@media(max-width:850px){
  .post-user .secondary-vip-badge.post-role{
    width:auto !important;
    min-width:105px;
    margin:0 !important;
  }
}


/* ===== ETSOMP COINS SHOP ===== */
.coin-shop-hero{
  display:block !important;
  padding:30px 34px !important;
}

.coin-shop-hero-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin-bottom:22px;
}

.coin-shop-hero h1{
  margin-bottom:8px !important;
}

.coin-shop-wallet{
  min-width:170px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 16px;
  border:1px solid rgba(242,196,94,.22);
  border-radius:13px;
  background:rgba(242,196,94,.055);
}

.coin-shop-wallet-icon,
.coin-shop-price-icon{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  flex:0 0 30px;
  border:1px solid rgba(242,196,94,.28);
  border-radius:50%;
  background:rgba(242,196,94,.08);
  color:#f2c45e;
  font-size:14px;
  font-weight:1000;
}

.coin-shop-wallet strong,
.coin-shop-wallet small{
  display:block;
}

.coin-shop-wallet strong{
  color:#ffe39a;
  font-size:14px;
  line-height:1;
}

.coin-shop-wallet small{
  margin-top:4px;
  color:#9caaba;
  font-size:7px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.coin-shop-products{
  display:grid;
  gap:12px;
}

.coin-shop-product{
  min-width:0;
  display:grid;
  grid-template-columns:58px minmax(0,1fr) 210px;
  gap:18px;
  align-items:center;
  padding:18px 20px;
  border:1px solid rgba(242,196,94,.18);
  border-radius:15px;
  background:
    radial-gradient(circle at 88% 25%,rgba(143,86,255,.11),transparent 29%),
    linear-gradient(135deg,rgba(242,196,94,.045),rgba(255,255,255,.015));
}

.coin-shop-product-icon{
  width:56px;
  height:56px;
  display:grid;
  place-items:center;
  border:1px solid rgba(242,196,94,.30);
  border-radius:15px;
  color:#f2c45e;
  background:linear-gradient(145deg,#251c34,#0e0b13);
  box-shadow:0 0 18px rgba(242,196,94,.08);
  font-size:22px;
}

.coin-shop-product-type{
  color:#ad7cf5;
  font-size:7px;
  font-weight:1000;
  letter-spacing:.13em;
}

.coin-shop-product-main h2{
  margin:4px 0 0;
  color:#fff;
  font-size:18px;
}

.coin-shop-duration{
  display:block;
  margin-top:3px;
  color:#f2c45e;
  font-size:9px;
}

.coin-shop-product-main p{
  max-width:690px;
  margin:8px 0 0;
  color:#9aa8b9;
  font-size:9px;
  line-height:1.55;
}

.coin-shop-benefits{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:10px;
}

.coin-shop-benefits span{
  padding:5px 8px;
  border:1px solid rgba(242,196,94,.13);
  border-radius:999px;
  background:rgba(242,196,94,.035);
  color:#c7d0dc;
  font-size:7px;
  font-weight:800;
}

.coin-shop-product-buy{
  display:grid;
  justify-items:stretch;
  gap:8px;
  padding-left:18px;
  border-left:1px solid var(--line);
}

.coin-shop-price{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
}

.coin-shop-price .coin-shop-price-icon{
  width:23px;
  height:23px;
  flex-basis:23px;
  font-size:10px;
}

.coin-shop-price strong{
  color:#ffe39a;
  font-size:18px;
}

.coin-shop-price small{
  color:#9caaba;
  font-size:7px;
  font-weight:900;
  text-transform:uppercase;
}

.coin-shop-product-buy .button{
  width:100%;
  justify-content:center;
}

.coin-shop-product-buy .button:disabled{
  cursor:not-allowed;
  opacity:.42;
}

.coin-shop-owned,
.coin-shop-expiry,
.coin-shop-not-enough{
  display:block;
  text-align:center;
}

.coin-shop-owned{
  padding:9px 10px;
  border:1px solid rgba(85,233,145,.18);
  border-radius:10px;
  background:rgba(85,233,145,.05);
  color:#71e6a1;
  font-size:8px;
  font-weight:900;
}

.coin-shop-expiry{
  color:#b9c5d3;
  font-size:7px;
}

.coin-shop-not-enough{
  color:#ff8b8b;
  font-size:7px;
}

.coin-shop-page-title{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:24px;
}

.large-wallet{
  min-width:190px;
}

.coin-shop-page-panel{
  overflow:hidden;
}

.shop-page-products{
  padding:20px;
}

.coin-shop-coming-soon{
  min-height:100px;
  display:grid;
  place-items:center;
  align-content:center;
  padding:18px;
  border:1px dashed var(--line);
  border-radius:14px;
  color:#8795a7;
  text-align:center;
}

.coin-shop-coming-soon > span{
  font-size:25px;
}

.coin-shop-coming-soon strong{
  margin-top:4px;
  color:#aab6c5;
  font-size:10px;
}

.coin-shop-coming-soon small{
  margin-top:4px;
  font-size:7px;
}

@media(max-width:850px){
  .coin-shop-product{
    grid-template-columns:50px minmax(0,1fr);
  }

  .coin-shop-product-buy{
    grid-column:1/-1;
    padding:14px 0 0;
    border-left:0;
    border-top:1px solid var(--line);
  }

  .coin-shop-hero-head,
  .coin-shop-page-title{
    align-items:flex-start;
  }
}

@media(max-width:620px){
  .coin-shop-hero{
    padding:22px !important;
  }

  .coin-shop-hero-head,
  .coin-shop-page-title{
    display:grid;
  }

  .coin-shop-wallet{
    min-width:0;
    justify-content:flex-start;
  }

  .coin-shop-product{
    grid-template-columns:1fr;
  }

  .coin-shop-product-icon{
    width:48px;
    height:48px;
  }

  .coin-shop-product-buy{
    grid-column:auto;
  }
}

/* Visible on desktop and mobile, beside the topic title. */
.topic-lock-badge {
  display:inline-flex;
  align-items:center;
  gap:5px;
  margin-left:6px;
  padding:3px 7px;
  border:1px solid rgba(210,145,35,.45);
  border-radius:6px;
  background:rgba(210,145,35,.12);
  color:#c48419;
  font-size:11px;
  font-weight:700;
  line-height:1.2;
  vertical-align:middle;
  white-space:nowrap;
}
.topic-lock-badge svg { flex-shrink:0; }
.topic-lock-badge > span {
  color:inherit;
  font-size:inherit;
  font-weight:inherit;
  text-transform:none;
  letter-spacing:normal;
}
