:root{
  --irf-blue:#0b5ed7;
  --irf-cyan:#15b7e8;
  --irf-navy:#082247;
  --irf-soft:#eef8ff;
  --irf-border:rgba(12,34,71,.10);
}
.skip-link{position:absolute;left:-999px;top:auto;width:1px;height:1px;overflow:hidden;z-index:9999;background:#fff;color:#082247;padding:.75rem;border-radius:.75rem}
.skip-link:focus{left:1rem;top:1rem;width:auto;height:auto;box-shadow:0 10px 30px rgba(0,0,0,.18)}
.brand-title{font-size:.96rem;line-height:1.1}.brand-subtitle{font-size:.72rem}.admin-sidebar{background:linear-gradient(180deg,#061b3d 0%,#08305f 55%,#0a5e9e 100%)}
.sidebar-nav .nav-link{border-radius:16px}.sidebar-nav .nav-link.active,.sidebar-nav .nav-link:hover{background:rgba(255,255,255,.14)}
.content-card{background:#fff;border:1px solid var(--irf-border);border-radius:24px;padding:1.25rem;box-shadow:0 18px 45px rgba(8,34,71,.07)}
.section-title{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:1rem}.section-title span{color:#6c757d;font-size:.875rem}
.board-category{border-top:1px solid var(--irf-border);padding-top:1.1rem;margin-top:1.1rem}.board-category:first-of-type{border-top:0;margin-top:0;padding-top:0}.board-category h3{font-size:1rem;margin:0}.board-category p{color:#6c757d;margin:.25rem 0 .85rem}
.board-card{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:1rem;padding:1rem;border:1px solid var(--irf-border);border-radius:18px;text-decoration:none;color:inherit;margin-bottom:.75rem;background:linear-gradient(135deg,#fff,#f8fbff);transition:.18s ease}.board-card:hover{transform:translateY(-2px);box-shadow:0 12px 34px rgba(8,34,71,.10);border-color:rgba(21,183,232,.45)}
.board-icon{width:44px;height:44px;border-radius:15px;display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,var(--irf-blue),var(--irf-cyan))}.board-copy strong{display:block}.board-copy small{display:block;color:#6c757d}.board-count{text-align:center;font-weight:800;color:var(--irf-navy)}.board-count small{display:block;font-weight:500;color:#6c757d;font-size:.75rem}
.thread-list{padding:0;overflow:hidden}.thread-row{display:grid;grid-template-columns:auto 1fr auto;gap:1rem;padding:1.1rem 1.25rem;border-bottom:1px solid var(--irf-border);align-items:start}.thread-row:last-child{border-bottom:0}.thread-icon{width:48px;height:48px;border-radius:17px;background:var(--irf-soft);display:grid;place-items:center;color:var(--irf-blue);font-size:1.35rem}.thread-main h2 a{text-decoration:none;color:var(--irf-navy)}.thread-main h2 a:hover{color:var(--irf-blue)}.thread-meta{font-size:.84rem;color:#6c757d;margin-bottom:.35rem}.thread-stats{min-width:80px;text-align:center;display:grid;grid-template-columns:1fr 1fr;gap:.15rem .6rem}.thread-stats strong{font-size:1rem;color:var(--irf-navy)}.thread-stats span{font-size:.72rem;color:#6c757d;text-transform:uppercase;letter-spacing:.04em}
.mini-thread{border-bottom:1px solid var(--irf-border);padding:.85rem 0}.mini-thread:last-child{border-bottom:0}.mini-thread a{display:block;text-decoration:none;font-weight:700;color:var(--irf-navy)}.mini-thread small{display:block;color:#6c757d;margin-top:.2rem}
.post-card{display:grid;grid-template-columns:230px 1fr;gap:1rem;border-top:1px solid var(--irf-border);padding:1.25rem 0}.post-card:first-of-type{border-top:0;padding-top:0}.post-body{min-width:0}.post-date{font-size:.84rem;color:#6c757d;margin-bottom:.6rem}.rich-text{line-height:1.68;color:#26364f}.profile-mini{display:flex;gap:.8rem;align-items:flex-start}.avatar-lg{width:58px;height:58px}.avatar-xl{width:96px;height:96px}.reply-box{background:#f8fbff;border:1px solid var(--irf-border);border-radius:20px;padding:1rem;margin-top:1.5rem}
.vouch-score{display:inline-grid;grid-template-columns:auto auto;gap:.35rem;align-items:center;border:1px solid var(--irf-border);border-radius:999px;padding:.45rem .8rem;background:#f8fbff}.vouch-score strong{font-size:1.25rem;color:var(--irf-blue)}.vouch-score span{font-size:.86rem;color:#6c757d}.profile-list{display:grid;grid-template-columns:180px 1fr;gap:.75rem 1rem}.profile-list dt{color:#6c757d}.profile-list dd{margin:0;min-height:1.25rem}.vouch-item,.message-card,.report-card{border:1px solid var(--irf-border);border-radius:18px;padding:1rem;margin-bottom:.75rem;background:#fff}.message-card{background:linear-gradient(135deg,#fff,#f8fbff)}
.genre-pills{display:flex;flex-wrap:wrap;gap:.55rem;align-items:center}.genre-pills span{font-weight:700;color:var(--irf-navy)}.genre-pills a{padding:.45rem .75rem;border-radius:999px;background:#fff;border:1px solid var(--irf-border);text-decoration:none;color:var(--irf-blue);font-weight:700}.genre-pills a:hover{background:var(--irf-blue);color:#fff}
.admin-tile{display:block;background:#fff;border:1px solid var(--irf-border);border-radius:24px;padding:1.25rem;text-decoration:none;color:inherit;height:100%;box-shadow:0 18px 45px rgba(8,34,71,.07)}.admin-tile i{font-size:2rem;color:var(--irf-blue)}.admin-tile strong{display:block;margin-top:.65rem}.admin-tile span{display:block;color:#6c757d}.admin-tile:hover{transform:translateY(-2px);border-color:rgba(21,183,232,.45)}
.form-label{font-weight:700;color:#1d3557}.form-control,.form-select{border-radius:14px}.btn{border-radius:14px}.badge{border-radius:999px}.page-heading{gap:1rem}.heading-actions{display:flex;gap:.5rem;flex-wrap:wrap}.metric-card{min-height:142px}
@media (max-width: 991px){.post-card{grid-template-columns:1fr}.thread-row{grid-template-columns:auto 1fr}.thread-stats{grid-column:2;display:flex;text-align:left}.profile-list{grid-template-columns:1fr}.page-heading{align-items:flex-start}.heading-actions{width:100%}.heading-actions .btn{width:100%}}
@media (max-width: 575px){.thread-row{grid-template-columns:1fr}.thread-icon{display:none}.thread-stats{grid-column:1}.content-card{border-radius:18px;padding:1rem}.board-card{grid-template-columns:1fr}.board-count{text-align:left}.navbar-actions{gap:.35rem}}
[data-bs-theme="dark"] .content-card,[data-bs-theme="dark"] .board-card,[data-bs-theme="dark"] .message-card,[data-bs-theme="dark"] .report-card,[data-bs-theme="dark"] .admin-tile{background:#132035;color:#e8eef8;border-color:rgba(255,255,255,.10)}
[data-bs-theme="dark"] .thread-main h2 a,[data-bs-theme="dark"] .mini-thread a{color:#eff6ff}[data-bs-theme="dark"] .reply-box,[data-bs-theme="dark"] .thread-icon,[data-bs-theme="dark"] .vouch-score{background:#0f1a2b;border-color:rgba(255,255,255,.10)}
.brand-banner{display:grid;grid-template-columns:minmax(220px,360px) 1fr;align-items:center;gap:1.2rem;background:linear-gradient(135deg,#fff,#f2fbff)}
.brand-banner img{width:100%;height:auto;display:block}.brand-banner strong{display:block;font-size:1.1rem;color:var(--irf-navy)}.brand-banner span{display:block;color:#6c757d}
@media (max-width: 767px){.brand-banner{grid-template-columns:1fr}.brand-banner img{max-width:360px}}

/* Forum topic/thread upgrade */
.forum-index-card .board-category h3{display:flex;align-items:center;gap:.5rem;color:var(--irf-navy)}
.forum-board-card{grid-template-columns:auto minmax(0,1fr) 120px}.forum-board-card .board-copy em{display:block;font-style:normal;color:#6c757d;font-size:.78rem;margin-top:.35rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.forum-board-card .board-count{display:grid;grid-template-columns:1fr 1fr;gap:.2rem .6rem;align-items:center}.forum-board-card .board-count b{font-size:1.1rem;color:var(--irf-navy)}
.forum-toolbar{display:flex;justify-content:space-between;align-items:center;gap:1rem}.forum-toolbar strong{display:block;color:var(--irf-navy)}.forum-toolbar span{display:block;color:#6c757d;font-size:.9rem}.forum-toolbar form{min-width:260px}.forum-topic-list{overflow:visible}.forum-topic-row{grid-template-columns:auto minmax(0,1fr) 112px 150px;align-items:center}.topic-flags{display:flex;gap:.35rem;flex-wrap:wrap;margin-bottom:.25rem}.topic-tags{display:flex;gap:.35rem;flex-wrap:wrap}.topic-tags span{border:1px solid var(--irf-border);background:#f8fbff;border-radius:999px;padding:.25rem .55rem;color:#42617f;font-size:.76rem;font-weight:700}.forum-stats{grid-template-columns:1fr 1fr 1fr;min-width:112px}.latest-post-box{border-left:1px solid var(--irf-border);padding-left:1rem;min-width:0}.latest-post-box span,.latest-post-box small{display:block;color:#6c757d;font-size:.76rem}.latest-post-box strong{display:block;color:var(--irf-navy);font-size:.86rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.forum-thread-header{padding:.85rem 1rem}.thread-title-strip{display:flex;align-items:center;justify-content:space-between;gap:1rem}.thread-quick-stats{display:flex;gap:.55rem;flex-wrap:wrap}.thread-quick-stats span{border:1px solid var(--irf-border);border-radius:999px;background:#f8fbff;padding:.35rem .65rem;color:#42617f;font-size:.84rem;font-weight:700}.forum-post{position:relative}.post-topline{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:.65rem}.post-topline .post-date a{font-weight:800;text-decoration:none;color:var(--irf-blue)}.quoted-reply{border-left:4px solid var(--irf-cyan);background:#f3fbff;border-radius:12px;padding:.55rem .75rem;margin-bottom:.75rem;color:#42617f;font-size:.9rem}.reaction-bar{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:1rem}.reaction-form{display:inline;margin:0}.reaction-pill{display:inline-flex;align-items:center;gap:.32rem;border:1px solid var(--irf-border);background:#fff;color:#1d3557;border-radius:999px;padding:.35rem .6rem;font-size:.82rem;font-weight:700;line-height:1;transition:.15s ease}.reaction-pill:hover,.reaction-pill.is-active{background:linear-gradient(135deg,var(--irf-blue),var(--irf-cyan));color:#fff;border-color:transparent;box-shadow:0 8px 18px rgba(11,94,215,.2)}.reaction-pill strong{background:rgba(0,0,0,.08);border-radius:999px;padding:.15rem .35rem;font-size:.74rem}.reaction-pill.disabled{opacity:.72}.reply-context{display:flex;justify-content:space-between;align-items:center;gap:.75rem;background:#eef8ff;border:1px solid rgba(21,183,232,.35);border-radius:14px;padding:.65rem .8rem;margin-bottom:.75rem;color:var(--irf-navy);font-weight:700}.share-panel .share-grid{display:grid;grid-template-columns:1fr 1fr;gap:.5rem}.feature-list{list-style:none;margin:0;padding:0;display:grid;gap:.65rem}.feature-list li{display:flex;gap:.55rem;align-items:flex-start;color:#42617f}.feature-list i{color:var(--irf-blue);font-size:1.05rem;margin-top:.05rem}
[data-bs-theme="dark"] .topic-tags span,[data-bs-theme="dark"] .thread-quick-stats span,[data-bs-theme="dark"] .reaction-pill,[data-bs-theme="dark"] .quoted-reply,[data-bs-theme="dark"] .reply-context{background:#0f1a2b;border-color:rgba(255,255,255,.10);color:#e8eef8}[data-bs-theme="dark"] .latest-post-box{border-color:rgba(255,255,255,.10)}[data-bs-theme="dark"] .latest-post-box strong,[data-bs-theme="dark"] .forum-board-card .board-count b{color:#eff6ff}
@media (max-width:1199px){.forum-topic-row{grid-template-columns:auto 1fr 100px}.latest-post-box{grid-column:2 / 4;border-left:0;border-top:1px solid var(--irf-border);padding:.75rem 0 0;margin-top:.25rem}}
@media (max-width:767px){.forum-toolbar{align-items:stretch;flex-direction:column}.forum-toolbar form{min-width:0;width:100%}.forum-topic-row{grid-template-columns:1fr}.forum-stats{display:flex;text-align:left}.latest-post-box{grid-column:auto}.post-topline{align-items:flex-start;flex-direction:column}.share-panel .share-grid{grid-template-columns:1fr}.forum-board-card{grid-template-columns:1fr}.forum-board-card .board-count{display:flex;text-align:left}.forum-board-card .board-copy em{white-space:normal}}

/* V3 CRUD/profile upgrades */
.avatar-img{object-fit:cover;border-radius:50%;background:#eef4ff;border:2px solid rgba(19,109,211,.12)}
.avatar-sm{width:34px;height:34px}.avatar-md{width:44px;height:44px}.avatar-lg{width:64px;height:64px}.avatar-xl{width:118px;height:118px}
.role-crown{margin-left:.25rem;vertical-align:-.08em;filter:drop-shadow(0 1px 1px rgba(0,0,0,.18))}.admin-crown{color:#ffc107}.mod-crown{color:#95a0b8}
.user-display-link .role-crown{margin-left:.18rem}.profile-name .role-crown{font-size:.9em}.badge .role-crown{margin-left:0;margin-right:.15rem;color:inherit;filter:none}
.post-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.35rem;justify-content:flex-end}.post-actions form{margin:0}.forum-post .post-topline{gap:.75rem;align-items:flex-start}.admin-users-table td{vertical-align:middle}.admin-users-table .avatar-sm{flex:0 0 auto}.profile-mini .role-crown{font-size:.95em}.content-card .bg-light{background:linear-gradient(135deg, rgba(25,118,210,.07), rgba(35,189,238,.08))!important}
@media (max-width: 575.98px){.post-actions{justify-content:flex-start;width:100%;margin-top:.5rem}.forum-post .post-topline{flex-direction:column}.admin-users-table .d-flex{flex-wrap:wrap}}

/* V4 branding, public-readonly and sidebar visibility fixes */
:root{
  --sidebar-width: 310px;
}
html, body{
  max-width: 100%;
  overflow-x: hidden;
}
.admin-shell,
.admin-main,
.dashboard-content,
.dashboard-content > .container-fluid{
  min-width: 0;
  max-width: 100%;
}
.admin-sidebar{
  left: 0;
  right: auto;
  width: var(--sidebar-width);
  max-width: 100vw;
  overflow-x: hidden;
}
.admin-main{
  margin-left: var(--sidebar-width);
}
.brand-copy,
.sidebar-nav .nav-link,
.sidebar-user,
.sidebar-footer{
  min-width: 0;
}
.brand-title,
.brand-subtitle{
  white-space: normal;
  overflow-wrap: anywhere;
}
.sidebar-nav .nav-link{
  width: calc(100% - 1.5rem);
  margin-inline: .75rem;
}
.sidebar-nav .nav-text{
  white-space: normal;
  line-height: 1.2;
}
.post-actions:empty{
  display:none;
}
.guest-readonly-box{
  display:flex;
  align-items:flex-start;
  gap:.85rem;
  border:1px solid rgba(21,183,232,.35);
  background:linear-gradient(135deg,#f6fbff,#eef9ff);
  color:#183153;
  border-radius:18px;
  padding:1rem;
}
.guest-readonly-box > i{
  width:42px;
  height:42px;
  border-radius:14px;
  display:inline-grid;
  place-items:center;
  flex:0 0 auto;
  background:#fff;
  color:var(--irf-blue);
  box-shadow:0 10px 24px rgba(8,34,71,.08);
}
.guest-readonly-box strong,
.guest-readonly-box span{
  display:block;
}
.guest-readonly-box span{
  color:#42617f;
}
[data-bs-theme="dark"] .guest-readonly-box{
  background:#0f1a2b;
  border-color:rgba(255,255,255,.12);
  color:#eff6ff;
}
[data-bs-theme="dark"] .guest-readonly-box > i{
  background:#132035;
}
[data-bs-theme="dark"] .guest-readonly-box span{
  color:#c8d8ec;
}
@media (min-width: 992px){
  body:not(.sidebar-mini) .admin-sidebar{
    transform:none !important;
  }
  body.sidebar-mini .sidebar-user strong,
  body.sidebar-mini .sidebar-user small{
    display:none;
  }
}
@media (max-width: 991.98px){
  .admin-sidebar{
    width:min(310px, calc(100vw - 18px));
    transform:translateX(-105%);
  }
  body.sidebar-open .admin-sidebar{
    transform:translateX(0);
  }
  .admin-main{
    margin-left:0 !important;
  }
  .admin-navbar{
    min-height:64px;
  }
}
@media (max-width: 575.98px){
  .navbar-actions .btn{
    padding-inline:.55rem;
  }
  .page-heading .heading-actions{
    display:grid;
    grid-template-columns:1fr;
    width:100%;
  }
}

/* V5 final polish: clean forum layout, visible sidebar, better mobile, no hidden left edge */
:root{
  --sidebar-width:260px;
  --sidebar-mini-width:76px;
  --admin-sidebar-border:rgba(255,255,255,.14);
  --admin-sidebar-text-strong:#ffffff;
  --admin-sidebar-muted:#c7d7ee;
  --irf-blue:#1266d6;
  --irf-cyan:#08b8e8;
  --irf-navy:#071d3d;
  --irf-border:rgba(7,29,61,.12);
}
body{background:linear-gradient(180deg,#f7fbff 0%,#edf4fb 100%);}
.admin-shell{display:block;min-height:100vh;overflow-x:hidden;}
.admin-sidebar{
  width:var(--sidebar-width)!important;
  background:linear-gradient(180deg,#061a37 0%,#072a55 52%,#074f86 100%)!important;
  color:#fff!important;
  box-shadow:18px 0 42px rgba(6,26,55,.22);
  border-right:1px solid rgba(255,255,255,.08);
}
.admin-main{margin-left:var(--sidebar-width)!important;min-width:0;max-width:calc(100vw - var(--sidebar-width));}
.admin-navbar{border-bottom:1px solid rgba(7,29,61,.10);box-shadow:0 10px 24px rgba(7,29,61,.06);}
.dashboard-content>.container-fluid{max-width:1440px;margin-inline:auto;}
.sidebar-header{padding:1rem .95rem;border-bottom:1px solid rgba(255,255,255,.10);}
.brand-mark{gap:.65rem;min-width:0;}
.brand-icon{width:40px;height:40px;border-radius:14px;background:linear-gradient(135deg,#0b5ed7,#08b8e8);box-shadow:0 12px 28px rgba(8,184,232,.16);}
.brand-title{color:#fff!important;font-size:.94rem;font-weight:900;line-height:1.15;white-space:normal;overflow-wrap:anywhere;}
.brand-subtitle{color:#b7d6f4!important;font-size:.73rem;white-space:normal;overflow-wrap:anywhere;}
.sidebar-nav{padding:.85rem .65rem;gap:.28rem;}
.sidebar-nav .nav-link{
  width:100%!important;
  margin:0!important;
  min-height:44px;
  border-radius:14px!important;
  color:#dcecff!important;
  background:transparent;
  opacity:1!important;
  font-size:.92rem;
  padding:.7rem .7rem!important;
}
.sidebar-nav .nav-link:hover,.sidebar-nav .nav-link:focus,.sidebar-nav .nav-link.active{
  color:#fff!important;
  background:rgba(255,255,255,.14)!important;
  transform:none!important;
}
.sidebar-nav .nav-icon{background:rgba(255,255,255,.12)!important;color:#bfe7ff!important;border-radius:12px;width:32px;height:32px;}
.sidebar-nav .nav-text{color:inherit!important;white-space:normal;overflow-wrap:anywhere;line-height:1.2;}
.sidebar-user{
  margin:auto .85rem .85rem!important;
  padding:.9rem!important;
  border:1px solid rgba(255,255,255,.14)!important;
  border-radius:18px!important;
  background:rgba(255,255,255,.10)!important;
  color:#fff!important;
}
.sidebar-user strong,.sidebar-user .user-display-link{color:#fff!important;font-weight:900!important;}
.sidebar-user small{color:#cfe2ff!important;}
.sidebar-footer{margin-inline:.85rem!important;padding:.8rem 0 1rem!important;color:#cfe2ff!important;white-space:normal!important;}
.profile-button{max-width:min(260px,42vw);}
.profile-button .profile-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:170px;}
.content-card,.metric-card,.panel{border-radius:18px!important;border-color:rgba(7,29,61,.10)!important;box-shadow:0 14px 34px rgba(7,29,61,.07)!important;}
.page-heading{align-items:flex-start;}
.page-heading-copy{min-width:0;}
.page-heading-copy h1{overflow-wrap:anywhere;}
.thread-list{padding:0!important;}
.forum-topic-row{
  grid-template-columns:42px minmax(0,1fr) 108px 145px!important;
  gap:.9rem!important;
  padding:.95rem 1rem!important;
  border-bottom:1px solid rgba(7,29,61,.09)!important;
  background:#fff;
}
.forum-topic-row:hover{background:#f8fbff;}
.thread-icon{width:42px;height:42px;border-radius:50%;font-size:1rem;background:#eef6ff;color:var(--irf-blue);}
.thread-main h2{font-size:1rem;margin-bottom:.15rem!important;}
.thread-main h2 a{color:#b42323!important;font-weight:700;}
.thread-main h2 a:hover{color:var(--irf-blue)!important;text-decoration:underline;}
.thread-meta{font-size:.78rem;color:#667085!important;}
.thread-main p{font-size:.9rem;margin-bottom:.45rem!important;}
.topic-tags span{font-size:.72rem;background:#f3f7fb;}
.forum-stats{min-width:104px;grid-template-columns:auto 1fr!important;gap:.05rem .35rem!important;text-align:left!important;}
.forum-stats strong{font-size:.93rem;line-height:1.1;color:#111827;}
.forum-stats span{font-size:.7rem;text-transform:none;letter-spacing:0;color:#667085;}
.latest-post-box{min-width:0;padding-left:.85rem;}
.latest-post-box strong{font-size:.78rem;}
.latest-post-box small{font-size:.72rem;}
.forum-board-card{grid-template-columns:42px minmax(0,1fr) 112px!important;padding:.85rem!important;border-radius:16px!important;}
.board-icon{width:42px;height:42px;border-radius:14px;}
.board-copy strong{font-size:.98rem;color:#0f2748;}
.board-copy small{font-size:.82rem;}
.post-card{grid-template-columns:205px minmax(0,1fr)!important;gap:1.1rem!important;}
.profile-mini{display:grid!important;grid-template-columns:auto minmax(0,1fr);align-items:start;}
.profile-mini .user-display-link,.profile-mini div{min-width:0;overflow-wrap:anywhere;}
.rich-text{font-size:.98rem;}
.reaction-pill{box-shadow:none!important;}
.guest-readonly-box{margin-top:1rem;}
.admin-users-table{min-width:760px;}
.table-responsive{border-radius:16px;}
@media (min-width:992px){
  body.sidebar-mini .admin-main{margin-left:var(--sidebar-mini-width)!important;max-width:calc(100vw - var(--sidebar-mini-width));}
  body.sidebar-mini .admin-sidebar{width:var(--sidebar-mini-width)!important;}
  body.sidebar-mini .sidebar-user{padding:.55rem!important;margin-inline:.55rem!important;}
  body.sidebar-mini .sidebar-nav{padding-inline:.5rem;}
}
@media (max-width:1199.98px){
  .forum-topic-row{grid-template-columns:42px minmax(0,1fr) 96px!important;}
  .latest-post-box{grid-column:2 / 4!important;border-left:0!important;border-top:1px solid rgba(7,29,61,.09);padding:.65rem 0 0!important;margin-top:.2rem;}
  .admin-main{max-width:calc(100vw - var(--sidebar-width));}
}
@media (max-width:991.98px){
  .admin-sidebar{width:min(286px,calc(100vw - 22px))!important;transform:translateX(-106%)!important;}
  body.sidebar-open .admin-sidebar{transform:translateX(0)!important;}
  .admin-main{margin-left:0!important;max-width:100vw!important;}
  .profile-button{max-width:44px;padding:.35rem!important;}
  .profile-button .profile-name{display:none!important;}
  .search-input{max-width:none;}
}
@media (max-width:767.98px){
  .forum-topic-row{grid-template-columns:1fr!important;padding:.85rem!important;}
  .thread-icon{display:none!important;}
  .forum-stats{display:flex!important;gap:.4rem .7rem;flex-wrap:wrap;}
  .latest-post-box{grid-column:auto!important;border-top:1px solid rgba(7,29,61,.09)!important;}
  .forum-board-card{grid-template-columns:1fr!important;}
  .forum-board-card .board-count{display:flex!important;gap:.7rem;text-align:left!important;}
  .post-card{grid-template-columns:1fr!important;}
  .post-actions{justify-content:flex-start!important;}
  .navbar-actions{gap:.4rem!important;}
}
@media (max-width:575.98px){
  .dashboard-content>.container-fluid{padding-left:.75rem!important;padding-right:.75rem!important;}
  .content-card{padding:.9rem!important;border-radius:14px!important;}
  .page-icon{width:40px;height:40px;}
  .brand-banner img{max-width:100%;}
  .thread-main h2{font-size:.96rem;}
}

/* V6 media attachments */
.attachment-upload-box{
  background:linear-gradient(135deg,rgba(15,91,190,.07),rgba(9,178,255,.07));
  border:1px dashed rgba(15,91,190,.28);
  border-radius:18px;
  padding:1rem;
}
.post-attachments{margin-top:1rem;}
.post-attachments h3{font-size:.92rem;font-weight:800;color:#0f2748;margin:0 0 .7rem;display:flex;align-items:center;gap:.4rem;}
.attachment-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.85rem;}
.attachment-card{border:1px solid rgba(7,29,61,.1);background:#fff;border-radius:16px;padding:.85rem;box-shadow:0 10px 24px rgba(15,39,72,.07);min-width:0;}
.attachment-head{display:flex;align-items:flex-start;justify-content:space-between;gap:.8rem;margin-bottom:.7rem;}
.attachment-head span{font-weight:800;color:#12263f;overflow-wrap:anywhere;line-height:1.25;}
.attachment-head i{color:#0f5bbe;margin-right:.25rem;}
.attachment-head small{white-space:nowrap;color:#667085;font-size:.72rem;}
.attachment-card audio,.attachment-card video{width:100%;max-width:100%;border-radius:12px;outline:none;background:#0b1220;}
.attachment-card video{max-height:320px;}
.attachment-card img{width:100%;max-height:260px;object-fit:contain;background:#f8fafc;border:1px solid rgba(7,29,61,.08);border-radius:12px;}
.attachment-actions{display:flex;align-items:center;justify-content:space-between;gap:.7rem;margin-top:.75rem;flex-wrap:wrap;}
.attachment-actions small{color:#667085;}
.attachment-delete{margin-top:.6rem;}
.attachment-locked,.attachment-preview-note{display:flex;align-items:center;gap:.7rem;background:#f8fafc;border:1px solid rgba(7,29,61,.08);border-radius:12px;padding:.85rem;color:#475467;flex-wrap:wrap;}
.attachment-locked i,.attachment-preview-note i{font-size:1.25rem;color:#0f5bbe;}
.attachment-locked span,.attachment-preview-note span{flex:1;min-width:160px;}
@media (max-width:767.98px){.attachment-grid{grid-template-columns:1fr}.attachment-head{display:block}.attachment-head small{display:block;margin-top:.25rem}.attachment-actions{align-items:flex-start;flex-direction:column}}

/* V7 community rules */
.rules-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:1.2rem;align-items:start;}
.rules-card{padding:1.35rem!important;}
.rules-intro{display:flex;gap:1rem;align-items:flex-start;padding:1rem;border-radius:18px;background:linear-gradient(135deg,rgba(15,91,190,.08),rgba(9,178,255,.08));border:1px solid rgba(15,91,190,.12);margin-bottom:1rem;}
.rules-icon{width:48px;height:48px;border-radius:16px;display:inline-flex;align-items:center;justify-content:center;background:#0f5bbe;color:#fff;font-size:1.35rem;box-shadow:0 14px 30px rgba(15,91,190,.2);flex:0 0 auto;}
.rules-intro h2{font-size:1.12rem;margin:0 0 .35rem;font-weight:900;color:#10233f;}
.rules-intro p{margin:0;color:#5b677a;line-height:1.55;}
.rules-grid{display:grid;gap:.9rem;}
.rule-item{display:grid;grid-template-columns:46px minmax(0,1fr);gap:.85rem;padding:1rem;border:1px solid rgba(7,29,61,.09);border-radius:18px;background:#fff;box-shadow:0 12px 28px rgba(15,39,72,.06);}
.rule-number{width:40px;height:40px;border-radius:14px;background:#eff6ff;color:#0f5bbe;font-weight:900;display:inline-flex;align-items:center;justify-content:center;border:1px solid rgba(15,91,190,.16);}
.rule-item h3{font-size:1rem;font-weight:900;margin:0 0 .35rem;color:#10233f;}
.rule-item p{margin:0;color:#5b677a;line-height:1.58;}
.rules-side{position:sticky;top:1rem;}
.rules-side h2{font-size:1rem;font-weight:900;color:#10233f;display:flex;align-items:center;gap:.45rem;}
.rules-side h2 i{color:#e0a100;}
.rules-side p{color:#5b677a;line-height:1.55;}
.rules-consent-box{border:1px solid rgba(15,91,190,.18);background:linear-gradient(135deg,rgba(15,91,190,.06),rgba(9,178,255,.06));border-radius:16px;padding:1rem;}
.rules-consent-box .form-check-label{color:#10233f;}
.rules-consent-box small{display:block;margin-top:.4rem;color:#5b677a;line-height:1.45;}
@media (max-width:991.98px){.rules-layout{grid-template-columns:1fr}.rules-side{position:static}.rules-intro{display:block}.rules-icon{margin-bottom:.75rem}}
@media (max-width:575.98px){.rule-item{grid-template-columns:1fr}.rule-number{margin-bottom:.2rem}}


/* V8 station directory cards */
.station-directory-intro{display:flex;gap:1rem;align-items:flex-start;background:linear-gradient(135deg,rgba(15,91,190,.08),rgba(9,178,255,.08));border:1px solid rgba(15,91,190,.16)!important;}
.station-directory-intro>i{width:48px;height:48px;border-radius:16px;background:#0f5bbe;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:1.35rem;box-shadow:0 14px 30px rgba(15,91,190,.18);flex:0 0 auto;}
.station-directory-intro strong{display:block;color:#10233f;font-weight:900;margin-bottom:.25rem;}
.station-directory-intro span{color:#5b677a;line-height:1.55;}
.station-directory-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;align-items:start;}
.station-card{background:#fff;border:1px solid rgba(7,29,61,.09);border-radius:22px;padding:1.1rem;box-shadow:0 18px 44px rgba(15,39,72,.08);min-width:0;position:relative;overflow:hidden;}
.station-card::before{content:"";position:absolute;inset:0 0 auto 0;height:5px;background:linear-gradient(90deg,#0f5bbe,#09b2ff,#27d3ff);}
.station-card-top{display:flex;gap:1rem;align-items:flex-start;}
.station-logo{width:86px;height:86px;border-radius:22px;object-fit:cover;background:#f8fafc;border:1px solid rgba(7,29,61,.1);box-shadow:0 10px 22px rgba(15,39,72,.1);flex:0 0 auto;}
.station-title-wrap{min-width:0;flex:1;}
.station-badges{display:flex;gap:.35rem;align-items:center;flex-wrap:wrap;margin-bottom:.4rem;}
.station-title-wrap h2{font-size:1.15rem;margin:0 0 .35rem;font-weight:900;line-height:1.2;}
.station-title-wrap h2 a{color:#10233f;text-decoration:none;}
.station-title-wrap h2 a:hover{color:#0f5bbe;text-decoration:underline;}
.station-title-wrap p{margin:0;color:#667085;line-height:1.5;font-size:.92rem;}
.station-meta-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem;margin:1rem 0;}
.station-meta-grid span{display:flex;flex-direction:column;gap:.15rem;background:#f8fafc;border:1px solid rgba(7,29,61,.07);border-radius:14px;padding:.75rem;color:#475467;min-width:0;overflow-wrap:anywhere;}
.station-meta-grid i{color:#0f5bbe;font-size:1rem;}
.station-meta-grid strong{color:#10233f;font-size:.76rem;text-transform:uppercase;letter-spacing:.04em;}
.station-card-actions{display:flex;gap:.55rem;flex-wrap:wrap;align-items:center;}
.station-card-actions .btn{border-radius:999px;font-weight:800;}
.station-player-panel{margin-top:1rem;border:1px solid rgba(15,91,190,.16);background:linear-gradient(135deg,rgba(15,91,190,.06),rgba(9,178,255,.06));border-radius:18px;padding:.9rem;}
.station-now-playing{display:flex;gap:.7rem;align-items:flex-start;margin-bottom:.75rem;color:#10233f;}
.station-now-playing i{font-size:1.35rem;color:#0f5bbe;}
.station-now-playing strong{display:block;font-weight:900;}
.station-now-playing small{display:block;color:#667085;}
.station-audio{width:100%;max-width:100%;}
.station-card-footer{display:flex;justify-content:space-between;gap:.7rem;flex-wrap:wrap;border-top:1px solid rgba(7,29,61,.08);padding-top:.75rem;margin-top:.9rem;color:#667085;font-size:.82rem;}
.station-thread-player{text-align:center;}
.station-thread-player .station-logo{margin:0 auto .75rem;display:block;width:110px;height:110px;}
.station-form-hint{display:flex;gap:.8rem;align-items:flex-start;border:1px solid rgba(15,91,190,.16);background:linear-gradient(135deg,rgba(15,91,190,.06),rgba(9,178,255,.06));border-radius:16px;padding:1rem;}
.station-form-hint i{color:#0f5bbe;font-size:1.25rem;}
.station-form-hint strong{display:block;color:#10233f;font-weight:900;}
.station-form-hint span{display:block;color:#667085;line-height:1.45;}
@media (max-width:1199.98px){.station-directory-grid{grid-template-columns:1fr;}}
@media (max-width:575.98px){.station-card-top{display:block}.station-logo{width:76px;height:76px;margin-bottom:.75rem}.station-meta-grid{grid-template-columns:1fr}.station-card-actions{align-items:stretch;flex-direction:column}.station-card-actions .btn{width:100%}.station-directory-intro{display:block}.station-directory-intro>i{margin-bottom:.75rem}}
