/* BlackHatWorld-style dark theme (XenForo-like): near-black bg, gold accents. */
:root{
  --bg:#0c0d0e;
  --bg-2:#141517;
  --panel:#1a1c1e;
  --panel-head:#202327;
  --border:#2a2d31;
  --text:#d6d8db;
  --muted:#878d94;
  --gold:#d9b85c;        /* thread titles / links */
  --gold-2:#ecd690;
  --green:#3f9142;
  --green-2:#4caf50;
  --red:#d9534f;
  --header:#0a0b0c;      /* top bar */
}

*{ box-sizing:border-box; }
.min-w-0{ min-width:0; }
body{
  background:var(--bg);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  font-size:14px;
}
a{ color:var(--gold); text-decoration:none; }
a:hover{ color:var(--gold-2); text-decoration:none; }
.muted{ color:var(--muted); font-size:.84rem; }

/* ---- Top header bar ---- */
.bhw-header{
  background:var(--header);
  border-bottom:2px solid var(--gold);
  padding:0 18px;
  display:flex; align-items:center; gap:18px;
  height:50px; position:relative;
}
.bhw-brand{ color:var(--gold); font-weight:700; font-size:1.05rem; white-space:nowrap; }
.bhw-brand:hover{ color:var(--gold-2); }
.bhw-menu{ display:flex; align-items:center; gap:18px; flex:1; }
.bhw-nav{ display:flex; gap:4px; flex:1; }
.bhw-nav a{
  color:#dfe2e6; padding:6px 12px; border-radius:4px; font-weight:600; font-size:.9rem;
}
.bhw-nav a:hover{ background:#1c1f22; color:#fff; }
.bhw-nav a.active{ background:#1c1f22; color:var(--gold-2); }
.bhw-user{ display:flex; align-items:center; gap:10px; white-space:nowrap; }
.bhw-burger{
  display:none; margin-left:auto; background:none; border:1px solid var(--border);
  color:var(--gold); font-size:1.15rem; line-height:1; border-radius:5px; padding:4px 11px; cursor:pointer;
}

/* ---- Layout: sidebar + main ---- */
.bhw-shell{ display:flex; gap:18px; padding:18px; align-items:flex-start; }
.bhw-sidebar{ width:230px; flex:0 0 230px; }
.bhw-main{ flex:1; min-width:0; }
@media (max-width: 820px){
  .bhw-burger{ display:block; }
  .bhw-menu{
    display:none; position:absolute; top:50px; left:0; right:0; z-index:50;
    flex-direction:column; align-items:stretch; gap:0;
    background:var(--header); border-bottom:2px solid var(--gold); padding:8px 16px 14px;
  }
  body.nav-open .bhw-menu{ display:flex; }
  .bhw-nav{ flex-direction:column; gap:2px; }
  .bhw-nav a{ padding:11px 8px; font-size:1rem; }
  .bhw-user{ margin-top:10px; padding-top:10px; border-top:1px solid var(--border); justify-content:space-between; }
  .bhw-shell{ flex-direction:column; padding:12px; }
  .bhw-sidebar{ display:none; }   /* navigation lives in the hamburger menu on mobile */
}

/* Sidebar blocks */
.side-block{ background:var(--panel); border:1px solid var(--border); border-radius:6px; margin-bottom:16px; overflow:hidden; }
.side-head{
  background:var(--panel-head); color:var(--gold); font-weight:700; font-size:.82rem;
  text-transform:uppercase; letter-spacing:.04em; padding:9px 12px; border-bottom:1px solid var(--border);
}
.side-link{ display:flex; justify-content:space-between; align-items:center;
  padding:9px 12px; color:#cfd2d6; border-bottom:1px solid #212427; }
.side-link:last-child{ border-bottom:0; }
.side-link:hover{ background:#202327; color:#fff; }
.side-link.active{ color:var(--gold-2); background:#202327; }

/* ---- Panels / cards ---- */
.card{ background:var(--panel); border:1px solid var(--border); border-radius:6px; }
.card-header{
  background:var(--panel-head); border-bottom:1px solid var(--border);
  color:#e6e6e6; font-weight:700; padding:10px 14px;
}

/* ---- Forum-style rows ---- */
.list-row{ border-bottom:1px solid #212427; padding:.7rem 0; }
.list-row:last-child{ border-bottom:0; }
.thread-row{ display:flex; gap:12px; align-items:flex-start; padding:.7rem 0; border-bottom:1px solid #212427; }
.thread-row:last-child{ border-bottom:0; }
.bhw-avatar{
  flex:0 0 40px; width:40px; height:40px; border-radius:50%;
  background:linear-gradient(135deg,#3a3f45,#23262a);
  color:var(--gold-2); display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:1.05rem; border:1px solid var(--border);
}
.thread-row .title{ color:var(--gold); font-weight:600; }
.thread-row .title:hover{ color:var(--gold-2); }
.thread-row .meta{ color:var(--muted); font-size:.82rem; margin-top:2px; }
.row-stats{ flex:0 0 auto; text-align:right; color:var(--muted); font-size:.82rem; white-space:nowrap; }
.row-stats .n{ color:#e6e6e6; font-weight:700; }

/* reply feed (thread detail) — yellow/gold text, readable on the dark bg */
.reply-item{ padding:.75rem 0; border-bottom:1px solid #2a2d31; }
.reply-item:last-child{ border-bottom:0; }
.reply-author{ color:#f4e79e; font-weight:700; }
.reply-meta{ color:#b9a96a; font-size:.82rem; }
.reply-body{ color:#ecd97f; margin:.4rem 0; line-height:1.55; white-space:pre-wrap; word-break:break-word; }
.reply-body, .reply-author{ opacity:1; }

/* status dots */
.badge-dot{ width:.6rem; height:.6rem; border-radius:50%; display:inline-block; vertical-align:middle; }
.bg-success{ background:var(--green-2)!important; }

/* stat numbers (home) */
.stat{ font-size:1.8rem; font-weight:700; color:var(--gold-2); }

/* ---- Forms ---- */
.form-control, .form-select,
input[type=text], input[type=password], input[type=email], input[type=url], input[type=number]{
  background:#0e0f10; color:var(--text); border:1px solid var(--border); border-radius:5px;
  padding:.4rem .7rem; width:100%;
}
.form-control:focus, .form-select:focus,
input:focus{ outline:none; border-color:var(--gold); box-shadow:0 0 0 2px rgba(217,184,92,.15); }
.form-check-input{ width:auto; }
label.form-label{ color:var(--muted); }
.helptext{ font-size:.78rem; color:var(--muted); }
ul.errorlist{ font-size:.8rem; color:var(--red); list-style:none; padding-left:0; margin:.25rem 0 0; }

/* ---- Buttons ---- */
.btn-primary{ background:var(--gold); border-color:var(--gold); color:#1a1408; font-weight:600; }
.btn-primary:hover{ background:var(--gold-2); border-color:var(--gold-2); color:#1a1408; }
.btn-success{ background:var(--green); border-color:var(--green); color:#fff; }
.btn-success:hover{ background:var(--green-2); border-color:var(--green-2); color:#fff; }
.btn-outline-light{ color:#d6d8db; border-color:#3a3f45; }
.btn-outline-light:hover{ background:#23262a; color:#fff; }
.btn-outline-info{ color:var(--gold); border-color:var(--gold); }
.btn-outline-info:hover{ background:var(--gold); color:#1a1408; }
.btn-outline-danger{ color:var(--red); border-color:var(--red); }

/* ---- Alerts ---- */
.alert-success{ background:#16301a; color:#bfe6c4; border-color:#27502d; }
.alert-danger{ background:#3a1c1c; color:#f0bcbc; border-color:#5e2a2a; }
.alert-info{ background:#1d2a33; color:#bfe0f0; border-color:#2c4350; }
.alert-warning{ background:#33301c; color:#ecdf9f; border-color:#5e562a; }

.badge.bg-success{ background:var(--green-2)!important; }
