:root {
  --page-bg: #080808;
  --paper: #111;
  --paper-dark: #000;
  --line: #3c3c3c;
  --line-soft: #5b4630;
  --orange: #d86f13;
  --orange-dark: #a94d08;
  --text: #e7e1d8;
  --muted: #a89d91;
  --error: #ff7a68;
  --success: #74d183;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Tahoma, Verdana, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  background:
    radial-gradient(circle at 50% 42%, rgba(216, 111, 19, 0.07), transparent 270px),
    linear-gradient(180deg, #080808 0%, #0c0c0c 45%, #070707 100%);
}

a {
  color: var(--orange-dark);
  text-decoration: underline;
}

a:hover {
  color: var(--orange);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid #1e1e1e;
  background: #080808;
}

.header-inner {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  min-height: 54px;
  padding: 0 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 5px;
  margin-left: 300px;
  font-family: "Segoe UI", Tahoma, Verdana, Arial, sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
}

.brand span:first-child {
  color: #fff;
}

.brand span:last-child {
  color: var(--orange);
  font-weight: 700;
}

.forum-nav {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 24px;
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  transform: translateX(-50%);
}

.forum-nav a {
  display: flex;
  align-items: center;
  gap: 7px;
  position: relative;
  min-height: 100%;
  padding: 0 2px;
  color: #9c9c9c;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.forum-nav a::after {
  content: "";
  position: absolute;
  left: 2px;
  right: -2px;
  bottom: 0;
  height: 2px;
  background: var(--orange);
  opacity: 0;
  transform: scaleX(0.45);
}

.forum-nav svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.forum-nav a:hover,
.forum-nav a[aria-current="page"] {
  color: var(--orange);
}

.forum-nav a:hover::after,
.forum-nav a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.user-panel {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  margin-right: 300px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d7c7b7;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.user-panel:hover {
  border: 0;
  background: transparent;
  color: #d7c7b7;
}

.user-avatar {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #5b4630;
  border-radius: 50%;
  background: linear-gradient(#181818, #0b0b0b);
  color: var(--orange);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(216, 111, 19, 0.16);
  background-size: 130%;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.user-name {
  color: #fff;
  font-weight: 700;
}

.user-panel:hover .user-name {
  color: var(--orange);
}

.account-menu {
  position: absolute;
  top: 54px;
  right: 300px;
  z-index: 20;
  width: 350px;
  border: 1px solid #303030;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 6px),
    #171717;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45);
}

.account-separator {
  height: 1px;
  margin: 0 16px;
  background: #303030;
}

.account-head {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
}

.account-avatar {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid #5b4630;
  border-radius: 50%;
  background: linear-gradient(#181818, #0b0b0b);
  color: var(--orange);
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(216, 111, 19, 0.14);
  background-size: 130%;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.account-head strong {
  display: block;
  color: var(--orange);
  font-size: 14px;
}

.account-head span {
  display: block;
  margin: 3px 0 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.account-stats {
  display: grid;
  gap: 5px;
  margin: 0;
}

.account-stats div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.account-stats dt,
.account-stats dd {
  margin: 0;
  font-size: 12px;
}

.account-stats dt {
  color: #8f8f8f;
}

.account-stats dd {
  color: #d7c7b7;
  text-align: right;
}

.account-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
  padding: 10px 16px 0;
}

.account-links-simple {
  grid-template-columns: 1fr 1fr;
  padding-bottom: 6px;
}

.account-links a,
.logout-link {
  color: #858585;
  font-size: 13px;
  line-height: 1.95;
  text-decoration: none;
}

.account-links a:hover,
.logout-link:hover {
  color: var(--orange);
}

.logout-link {
  display: block;
  margin: 6px 16px 0;
  padding-top: 7px;
  border-top: 1px solid #303030;
}

.is-hidden {
  display: none !important;
}

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 55px);
  padding: 16px;
}

.forum-page {
  min-height: calc(100vh - 55px);
  padding: 54px 24px;
}

.forum-shell {
  display: grid;
  grid-template-columns: minmax(0, 1080px) 360px;
  gap: 24px;
  width: min(1464px, 100%);
  margin: 0 auto;
}

.forum-sidebar,
.forum-content {
  display: grid;
  align-content: start;
  gap: 20px;
}

.forum-card {
  border: 1px solid var(--line);
  background: rgba(17, 17, 17, 0.94);
  box-shadow: 0 0 18px rgba(216, 111, 19, 0.045);
}

.forum-categories {
  display: grid;
  gap: 20px;
}

.forum-placeholder {
  margin: 0;
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
}

.forum-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.forum-card-title h2 {
  margin: 0;
  color: #ffb35d;
  font-size: 15px;
  text-transform: uppercase;
}

.notice-card {
  padding: 16px 18px;
  border: 1px solid #7a3f19;
  background: rgba(216, 111, 19, 0.08);
  color: #ffb35d;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 0 18px rgba(216, 111, 19, 0.12);
}

.panel-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-controls span {
  width: 11px;
  height: 1px;
  background: #8d8d8d;
}

.shoutbox-card {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 90px),
    rgba(17, 17, 17, 0.94);
}

.chat-feed {
  display: grid;
  align-content: start;
  gap: 6px;
  height: 420px;
  padding: 14px 16px 10px;
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #6e2d00 #111;
}

/* Visible custom scrollbar for the shoutbox so users can clearly see and grab it. */
.chat-feed::-webkit-scrollbar {
  width: 10px;
}

.chat-feed::-webkit-scrollbar-track {
  background: #0c0c0c;
  border-left: 1px solid #1f1f1f;
}

.chat-feed::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #d86f13, #6e2d00);
  border: 2px solid #0c0c0c;
  border-radius: 6px;
  min-height: 30px;
}

.chat-feed::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff8a2a, #8a3a04);
}

.chat-line {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 3px;
  color: #ddd;
  font-size: 12px;
}

.chat-line:hover {
  border-color: #272727;
  background: rgba(255, 255, 255, 0.018);
}

.chat-line p {
  margin: 0;
}

.chat-line strong {
  color: var(--orange);
}

.chat-line .name-white {
  color: #f4f4f4;
}

.chat-line .name-purple {
  color: #a776ff;
}

.chat-line .name-red {
  color: #ff4d4d;
}

.role-name.role-staff,
.role-name.role-owner,
.chat-line .role-staff,
.chat-line .role-owner {
  color: #ff4d4d !important;
  text-shadow: 0 0 7px rgba(255, 77, 77, 0.75), 0 0 16px rgba(255, 77, 77, 0.28);
}

.role-name.role-support,
.chat-line .role-support {
  color: #a776ff !important;
}

.role-name.role-resseler,
.chat-line .role-resseler {
  color: #ffd35a !important;
  text-shadow: 0 0 7px rgba(255, 211, 90, 0.78), 0 0 16px rgba(255, 211, 90, 0.26);
}

.role-name.role-user,
.chat-line .role-user {
  color: #f4f4f4;
}

.member-link {
  text-decoration: none;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}

.member-link:hover {
  color: var(--orange) !important;
}

/* Chat username glow: subscribers = orange, admins = red (reinforced) */
.member-link.chat-name-sub {
  color: #e8a050 !important;
  text-shadow: 0 0 7px rgba(216, 111, 19, 0.85), 0 0 18px rgba(216, 111, 19, 0.45);
}

.member-link.chat-name-admin {
  color: #ff6b6b !important;
  text-shadow: 0 0 8px rgba(255, 77, 77, 0.9), 0 0 20px rgba(255, 77, 77, 0.5);
}

.chat-line time {
  color: #777;
  font-size: 10px;
}

.mini-avatar {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #2a2a2a;
  border-radius: 50%;
  background: #222;
  color: var(--orange);
  font-size: 11px;
  font-weight: 700;
  background-size: 130%;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.mini-avatar-link {
  display: inline-grid;
  place-items: center;
  text-decoration: none;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.mini-avatar-link:hover .mini-avatar {
  border-color: var(--orange);
  filter: brightness(1.08);
}

.mini-avatar-link:hover {
  transform: scale(1.05);
}

.user-avatar.has-image,
.account-avatar.has-image,
.mini-avatar.has-image {
  color: transparent;
}

.chat-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 16px 18px 18px;
  border-top: 1px solid #242424;
  background: rgba(0, 0, 0, 0.18);
}

.chat-input-row input {
  min-height: 42px;
  border-color: #2c2c2c;
  background: #0b0b0b;
}

.chat-input-row button {
  min-width: 88px;
}

.chat-input-row button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.category-card {
  overflow: hidden;
  padding-bottom: 14px;
}

.forum-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 120px 310px;
  gap: 18px;
  align-items: center;
  min-height: 104px;
  margin: 14px 16px 0;
  padding: 16px;
  border: 1px solid #292929;
  border-left-color: #3a2b20;
  background: linear-gradient(180deg, #181818, #131313);
  color: var(--text);
  text-decoration: none;
}

.forum-row:hover {
  border-color: #51351f;
  background: linear-gradient(180deg, #1c1a18, #151515);
}

.forum-info strong,
.last-post strong {
  display: block;
  color: #e7e1d8;
  font-size: 17px;
}

.forum-info small,
.forum-stats small,
.last-post small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.forum-stats {
  justify-self: center;
  min-width: 86px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
}

.forum-stats strong {
  display: block;
  color: #f5f5f5;
  font-size: 22px;
  line-height: 1;
}

.last-post strong {
  color: var(--orange);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.last-post {
  min-width: 0;
  padding-left: 14px;
  border-left: 1px solid #2f2f2f;
}

.forum-icon {
  display: block;
  width: 38px;
  height: 38px;
  padding: 8px;
  border: 1px solid #6b4325;
  border-radius: 5px;
  background: #0b0b0b;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025), 0 0 12px rgba(216, 111, 19, 0.08);
  color: var(--orange);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.online-list {
  margin: 0;
  padding: 18px;
  color: #a776ff;
  font-size: 14px;
  line-height: 1.45;
}

.online-list span {
  color: var(--orange);
}

.sidebar-total {
  padding: 10px 18px;
  border-top: 1px solid #242424;
  color: #777;
  font-size: 12px;
}

.sidebar-post {
  display: block;
  padding: 16px 18px;
  border-top: 1px solid #242424;
  text-decoration: none;
}

.sidebar-post strong {
  display: block;
  color: var(--orange);
  font-size: 14px;
}

.sidebar-post small,
.sidebar-post span {
  display: block;
  margin-top: 3px;
  color: #80758f;
  font-size: 12px;
}

.stats-panel {
  margin: 0;
  padding: 10px 18px 12px;
}

.stats-panel div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid #242424;
}

.stats-panel div:last-child {
  border-bottom: 0;
}

.stats-panel dt,
.stats-panel dd {
  margin: 0;
  font-size: 13px;
}

.stats-panel dt {
  color: #aaa;
}

.stats-panel dd {
  color: #e7e1d8;
  font-weight: 700;
  text-align: right;
}

.settings-page {
  width: min(1540px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.settings-page h1 {
  margin: 0 0 26px;
  color: #fff;
  font-size: 24px;
}

.settings-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 24px;
}

.settings-sidebar {
  display: grid;
  align-content: start;
  gap: 24px;
}

.settings-menu,
.settings-card,
.redeem-panel {
  border: 1px solid #303030;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 6px),
    rgba(17, 17, 17, 0.94);
}

.settings-menu {
  padding: 0 0 14px;
  overflow: hidden;
}

.settings-menu h2 {
  margin: 0;
  min-height: 46px;
  padding: 14px 18px 0;
  width: auto;
  border-bottom: 1px solid #303030;
  color: #fff;
  background: transparent;
  font-size: 15px;
  text-transform: uppercase;
}

.settings-menu a {
  display: block;
  margin: 10px 16px 0;
  padding: 10px 12px;
  border: 1px solid #292929;
  border-left-color: #3a2b20;
  background: linear-gradient(180deg, #181818, #131313);
  color: #858585;
  font-size: 14px;
  text-decoration: none;
}

.settings-menu a:hover,
.settings-menu a.is-active {
  color: var(--orange);
}

.settings-menu a.is-active {
  border-color: #51351f;
  color: var(--orange);
  font-weight: 700;
}

.logout-menu {
  padding: 6px 0 16px;
}

.upgrade-content {
  display: grid;
  align-content: start;
  gap: 24px;
}

.redeem-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px;
}

.redeem-message {
  grid-column: 1 / -1;
}

.redeem-panel input {
  min-height: 40px;
  border: 1px solid #303030;
  border-radius: 3px;
  background: #0d0d0d;
  color: #fff;
}

.redeem-panel input::placeholder {
  color: #777;
}

.redeem-panel input:focus {
  outline: 1px solid rgba(216, 111, 19, 0.7);
  border-color: var(--orange);
  box-shadow: 0 0 14px rgba(216, 111, 19, 0.08);
}

.redeem-panel button {
  min-width: 96px;
  min-height: 40px;
  border: 1px solid #6e2d00;
  border-radius: 3px;
  background: linear-gradient(#1b1b1b, #111);
  color: var(--orange);
  text-shadow: none;
}

.redeem-panel button:hover {
  color: #111;
  background: linear-gradient(#ff9a34, #d86f13);
}

.settings-card {
  padding: 18px;
}

.settings-card h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 16px;
  text-transform: none;
}

.subscription-note {
  text-align: center;
}

.subscription-note p {
  margin: 0;
  color: #fff;
  font-weight: 700;
}

.subscription-note a {
  color: var(--orange);
  text-decoration: none;
}

.settings-card ul {
  margin: 0;
  color: #fff;
  font-weight: 700;
}

.upgrade-card {
  padding: 0 0 14px;
  overflow: hidden;
}

.upgrade-card h2 {
  margin: 0;
  min-height: 46px;
  padding: 14px 18px 0;
  border-bottom: 1px solid #303030;
  color: #ffb35d;
  font-size: 15px;
  text-transform: uppercase;
}

.upgrade-row {
  display: grid;
  grid-template-columns: 300px auto;
  gap: 14px;
  align-items: center;
  min-height: 88px;
  margin: 14px 16px 0;
  padding: 16px;
  border: 1px solid #292929;
  background: linear-gradient(180deg, #181818, #131313);
}

.upgrade-row:hover {
  border-color: #3c3c3c;
  background: linear-gradient(180deg, #1c1a18, #151515);
}

.upgrade-name {
  text-align: right;
}

.upgrade-name strong {
  display: block;
  color: #fff;
  font-size: 14px;
}

.upgrade-name span {
  color: var(--muted);
  font-size: 12px;
}

.purchase-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #fff;
  font-size: 13px;
}

.purchase-option input {
  accent-color: var(--orange);
}

.upgrade-row select {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #303030;
  background: #151515;
  color: #fff;
}

.upgrade-row button {
  min-height: 34px;
  border-color: #303030;
  background: #151515;
  color: #fff;
  text-shadow: none;
}

.upgrade-row button:hover {
  color: var(--orange);
  background: #181818;
}

.upgrade-row a {
  color: #fff;
  text-decoration: none;
}

.upgrade-row a:hover {
  color: var(--orange);
}

.purchased-row {
  grid-template-columns: 300px 1fr;
}

.purchased-row p {
  margin: 0;
  padding-left: 20px;
  border-left: 1px solid #303030;
  color: #fff;
  font-weight: 700;
}

.details-card {
  padding: 0 0 14px;
  overflow: hidden;
}

.details-card h2 {
  margin: 0;
  min-height: 46px;
  padding: 14px 18px 0;
  border-bottom: 1px solid #303030;
  color: #ffb35d;
  font-size: 15px;
  text-transform: uppercase;
}

.details-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 76px;
  margin: 14px 16px 0;
  padding: 14px 16px;
  border: 1px solid #292929;
  border-left-color: #3a2b20;
  background: linear-gradient(180deg, #181818, #131313);
}

.details-row span,
.settings-check span {
  display: block;
  color: #aaa;
  font-size: 12px;
}

.details-row strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 14px;
  word-break: break-word;
}

.details-row button {
  min-height: 32px;
  border-color: #303030;
  background: #151515;
  color: var(--orange);
  text-shadow: none;
}

.details-row button:hover {
  color: #111;
  background: linear-gradient(#ff9a34, #d86f13);
}

.settings-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 16px 0;
  padding: 13px 16px;
  border: 1px solid #292929;
  border-left-color: #3a2b20;
  background: linear-gradient(180deg, #181818, #131313);
  cursor: pointer;
}

.settings-check input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--orange);
}

.settings-check span {
  color: #e7e1d8;
  font-size: 14px;
}

.invitation-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 14px;
}

.invitation-summary div {
  padding: 4px 0;
}

.invitation-summary h2 {
  margin: 0 0 6px;
  color: #aaa;
  font-size: 13px;
  text-transform: none;
}

.invitation-summary strong {
  display: block;
  color: var(--orange);
  font-size: 18px;
}

.simple-summary {
  background: transparent;
}

.invitations-card {
  padding: 0 0 14px;
  overflow: hidden;
}

.invitations-card h2 {
  margin: 0;
  min-height: 46px;
  padding: 14px 18px 0;
  border-bottom: 1px solid #303030;
  color: #ffb35d;
  font-size: 15px;
  text-transform: uppercase;
}

.invitations-table {
  margin: 14px 16px 0;
  border: 1px solid #292929;
  background: #111;
  overflow-x: auto;
}

.table-head,
.table-row {
  display: grid;
  grid-template-columns: 130px 110px minmax(360px, 1fr) 150px 32px;
  gap: 14px;
  align-items: center;
  min-width: 820px;
}

.table-head {
  padding: 11px 14px;
  border-bottom: 1px solid #292929;
  color: #aaa;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.table-row {
  padding: 14px;
  color: #e7e1d8;
  font-size: 13px;
}

.invite-code {
  display: inline-block;
  max-width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--orange);
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  font-weight: 400;
  text-align: left;
  text-shadow: none;
  white-space: nowrap;
  cursor: pointer;
}

.invite-code:hover {
  background: transparent;
  color: #ffb35d;
}

.invite-code.is-hidden-code {
  color: transparent;
  text-shadow: 0 0 7px rgba(216, 111, 19, 0.95);
  user-select: none;
}

.member-not-found-only {
  margin: 80px auto;
  text-align: center;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.public-profile-page {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(1320px, calc(100% - 24px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.profile-breadcrumb {
  justify-self: stretch;
  color: var(--orange);
  font-size: 13px;
  font-weight: 700;
}

.profile-breadcrumb span {
  color: #8a8a8a;
}

.public-profile-card {
  border: 1px solid #303030;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 6px),
    rgba(17, 17, 17, 0.94);
  box-shadow: 0 0 18px rgba(216, 111, 19, 0.045);
  overflow: hidden;
}

.member-profile-card {
  width: min(1290px, 100%);
}

.member-cover {
  display: grid;
  align-items: end;
  position: relative;
  min-height: 215px;
  padding: 0 36px 30px 204px;
  border-bottom: 1px solid #303030;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.7)),
    radial-gradient(circle at 22% 18%, rgba(216, 111, 19, 0.23), transparent 220px),
    linear-gradient(135deg, #272727, #111 58%, #20150f);
  background-position: center;
  background-size: cover;
  cursor: pointer;
}

.member-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.32);
  opacity: 0;
  pointer-events: none;
}

.banner-change-hint {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 6px 9px;
  border: 1px solid rgba(216, 111, 19, 0.5);
  background: rgba(0, 0, 0, 0.58);
  color: #ffb35d;
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
}

.member-cover:hover::before,
.member-cover:hover .banner-change-hint {
  opacity: 1;
}

.member-info-panel {
  display: grid;
  margin-bottom: 15px;
  position: relative;
  z-index: 2;
  gap: 3px;
  max-width: 345px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: #f5f5f5;
}

.member-info-panel h1 {
  margin: 0;
  color: var(--orange);
  font-size: 21px;
  text-shadow: 1px 1px 0 #000;
}

.member-info-panel p {
  margin: 0;
  color: #d7d7d7;
  font-size: 12px;
  font-weight: 600;
}

.profile-badges {
  display: flex;
}

.profile-badges span {
  width: max-content;
  padding: 2px 7px;
  border: 1px solid #6e2d00;
  background: rgba(216, 111, 19, 0.1);
  color: #ffb35d;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.profile-avatar {
  display: grid;
  position: absolute;
  left: 42px;
  bottom: 30px;
  z-index: 3;
  width: 132px;
  height: 132px;
  place-items: center;
  border: 1px solid #6b4325;
  border-radius: 50%;
  background:
    url("../png/istockphoto-1495088043-612x612.jpg") center / 140% no-repeat,
    linear-gradient(145deg, #2a2a2a, #0a0a0a);
  color: var(--orange);
  font-size: 50px;
  font-weight: 800;
  box-shadow: 0 0 16px rgba(216, 111, 19, 0.12);
  overflow: hidden;
  cursor: pointer;
}

.profile-avatar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  opacity: 0;
}

.profile-avatar span {
  position: relative;
  z-index: 1;
  padding: 5px 8px;
  border: 1px solid rgba(216, 111, 19, 0.45);
  background: rgba(0, 0, 0, 0.55);
  color: #ffb35d;
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
}

.profile-avatar:hover::before,
.profile-avatar:hover span {
  opacity: 1;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 22px 42px;
}

.profile-stats div {
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
}

.profile-stats dt,
.profile-stats dd {
  margin: 0;
}

.profile-stats dt {
  color: #777;
  font-size: 12px;
  text-transform: lowercase;
}

.profile-stats dd {
  margin-bottom: 4px;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}

.profile-stats div:last-child dd {
  color: var(--orange);
  text-shadow: 1px 1px 0 #000;
}

.profile-file-input {
  display: none;
}

/* ── Members directory page ──────────────────────────────────────────── */
.members-page {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 16px;
  color: var(--text);
}

.members-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  align-items: start;
}

.members-search-panel {
  border: 1px solid #303030;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 6px),
    rgba(17, 17, 17, 0.94);
  padding: 14px 18px 16px;
  position: sticky;
  top: 70px;
}

.members-search-panel h1 {
  margin: 0 0 4px;
  font-size: 15px;
  color: #ffb35d;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.members-search-hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.members-search-form {
  display: grid;
  gap: 8px;
}

.members-search-form input {
  width: 100%;
  padding: 9px 12px;
  background: #0c0c0c;
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}

.members-search-form input:focus {
  border-color: var(--orange);
  outline: none;
  box-shadow: 0 0 0 1px rgba(216, 111, 19, 0.35);
}

.members-search-form button {
  padding: 9px 12px;
  background: linear-gradient(180deg, #d86f13, #a94d08);
  border: 1px solid #6e2d00;
  border-radius: 3px;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.members-search-form button:hover {
  background: linear-gradient(180deg, #ff8a2a, #b94f08);
}

.members-total {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid #1f1f1f;
  padding-top: 10px;
}

.members-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* Re-use the look of settings/upgrade cards (border #303030, diagonal
   hatch background, uppercase orange title, inner rows with #292929
   borders and #181818->#131313 gradient). */
.members-card {
  border: 1px solid #303030;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 6px),
    rgba(17, 17, 17, 0.94);
  padding: 0 0 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Fixed footprint so all three cards align and the See more button
     always sits at the bottom regardless of how many users are inside. */
  min-height: 360px;
}

.members-card .members-list {
  flex: 1 1 auto;
}

.members-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  min-height: 46px;
  padding: 14px 18px 12px;
  border-bottom: 1px solid #303030;
  background: transparent;
}

.members-card-head h2 {
  margin: 0;
  color: #ffb35d;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 700;
}

.members-card-count {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.members-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.members-list > li {
  margin: 14px 16px 0;
}

/* Plain text rows: no card border, no gradient, just spacing. */
.members-list > li {
  margin: 0;
}

.members-row-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px;
  border: none;
  background: transparent;
  text-decoration: none;
  color: #fff;
  transition: color 0.12s ease;
}

.members-row-link:hover {
  background: rgba(255, 255, 255, 0.02);
}

.members-row-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid #303030;
}

.members-row-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0;
  flex: 1;
  line-height: 1.3;
}

.members-row-meta-top {
  color: var(--muted);
  font-size: 11px;
  display: block;
}

.members-row-name strong {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.members-row-stats {
  display: flex;
  gap: 12px;
  color: #ddd;
  font-size: 11px;
  font-weight: 600;
}

.members-row-stats em {
  color: var(--muted);
  font-style: normal;
  font-weight: 400;
  margin-right: 4px;
  text-transform: none;
  letter-spacing: 0;
}

.members-see-more {
  /* Visually loud, anchored to the bottom of the card. */
  margin: 14px 16px 0;
  padding: 12px 14px;
  min-height: 44px;
  border: 1px solid #ff8a2a;
  border-radius: 3px;
  background: linear-gradient(180deg, #ff9a34, #d86f13);
  color: #fff;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  cursor: pointer;
  font-weight: 800;
  font-family: inherit;
  text-align: center;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 14px rgba(216, 111, 19, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: filter 0.15s ease, transform 0.05s ease;
  align-self: stretch;
}

.members-see-more:hover {
  filter: brightness(1.1);
}

.members-see-more:active {
  transform: translateY(1px);
}

.members-empty {
  list-style: none;
  padding: 16px 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* ── Members modal (paginated full list) ─────────────────────────────── */
.members-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.members-modal.is-hidden { display: none; }

.members-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
}

.members-modal-card {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  border: 1px solid #303030;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 6px),
    rgba(17, 17, 17, 0.98);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.members-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #303030;
}

.members-modal-head h2 {
  margin: 0;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #ffb35d;
}

.members-modal-close {
  border: 1px solid #303030;
  background: #161616;
  color: #ddd;
  width: 30px;
  height: 30px;
  border-radius: 3px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}

.members-modal-close:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.members-modal-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  overflow-y: auto;
  flex: 1 1 auto;
  scrollbar-width: thin;
  scrollbar-color: #6e2d00 #111;
}

.members-modal-list::-webkit-scrollbar { width: 8px; }
.members-modal-list::-webkit-scrollbar-track { background: #0c0c0c; }
.members-modal-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #d86f13, #6e2d00);
  border-radius: 4px;
}

.members-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid #303030;
  gap: 12px;
}

.members-modal-prev,
.members-modal-next {
  min-height: 32px;
  padding: 6px 14px;
  border: 1px solid #6e2d00;
  border-radius: 3px;
  background: linear-gradient(#1b1b1b, #111);
  color: var(--orange);
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.members-modal-prev:hover:not(:disabled),
.members-modal-next:hover:not(:disabled) {
  color: #111;
  background: linear-gradient(#ff9a34, #d86f13);
}

.members-modal-prev:disabled,
.members-modal-next:disabled {
  opacity: 0.4;
  cursor: default;
}

.members-modal-pages {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

/* ── Announcements board page ─────────────────────────────────────────── */
.announcements-page {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 16px;
}

.announcement-board-card {
  border: 1px solid #303030;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 6px),
    rgba(17, 17, 17, 0.94);
  padding: 0 0 16px;
}

.announcement-board-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid #303030;
}

.announcement-board-head h1 {
  margin: 6px 0 4px;
  color: #ffb35d;
  font-size: 22px;
}

.announcement-board-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.announcement-create-form {
  display: grid;
  gap: 10px;
  margin: 16px 18px 0;
}

.announcement-create-form.is-hidden { display: none; }

.announcement-create-form input,
.announcement-create-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #2a2a2a;
  background: #111;
  color: #fff;
  font: inherit;
}

.announcement-create-form input:focus,
.announcement-create-form textarea:focus {
  outline: none;
  border-color: var(--orange);
}

.announcement-create-actions {
  display: flex;
  justify-content: flex-end;
}

.announcement-create-actions button {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid #6e2d00;
  background: linear-gradient(180deg, #ff9a34, #d86f13);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.announcement-thread-list {
  list-style: none;
  margin: 16px 18px 0;
  padding: 0;
}

.announcement-thread-row + .announcement-thread-row {
  margin-top: 10px;
}

.announcement-thread-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #292929;
  background: linear-gradient(180deg, #181818, #131313);
  color: #fff;
  text-decoration: none;
}

.announcement-thread-link:hover {
  border-color: #3c3c3c;
  background: linear-gradient(180deg, #1c1a18, #151515);
}

.announcement-thread-link strong {
  font-size: 15px;
}

.announcement-thread-link small {
  color: var(--muted);
  font-size: 12px;
}

/* ── Rich text editor (used in announcements) ────────────────────────── */
.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px;
  border: 1px solid #2a2a2a;
  border-bottom: none;
  background: linear-gradient(180deg, #1a1a1a, #131313);
}

.rich-btn {
  min-width: 32px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid #2a2a2a;
  background: linear-gradient(180deg, #1c1c1c, #141414);
  color: #ddd;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  border-radius: 3px;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.rich-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: linear-gradient(180deg, #232323, #161616);
}

.rich-btn.is-active {
  border-color: var(--orange);
  background: linear-gradient(180deg, #ff9a34, #d86f13);
  color: #111;
  box-shadow: 0 0 10px rgba(216, 111, 19, 0.45),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.rich-btn:active {
  transform: translateY(1px);
}

.rich-sep {
  width: 1px;
  height: 22px;
  margin: 3px 4px;
  background: #2a2a2a;
}

.rich-editor {
  min-height: 140px;
  max-height: 360px;
  overflow-y: auto;
  padding: 12px 14px;
  border: 1px solid #2a2a2a;
  background: #111;
  color: #fff;
  font: inherit;
  line-height: 1.5;
}

.rich-editor:focus {
  outline: none;
  border-color: var(--orange);
}

.rich-editor:empty::before {
  content: attr(data-placeholder);
  color: #555;
  pointer-events: none;
}

.rich-editor a {
  color: var(--orange);
  text-decoration: underline;
}

.rich-editor img {
  max-width: 100%;
  border: 1px solid #2a2a2a;
  margin: 6px 0;
}

/* Plain orange text-styled button (no background, no border). */
.text-link-button {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--orange);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  letter-spacing: 0.2px;
  text-decoration: none;
  transition: color 0.12s ease, text-shadow 0.12s ease;
}

.text-link-button:hover {
  color: #ff9a34;
  text-shadow: 0 0 8px rgba(255, 154, 52, 0.45);
  text-decoration: underline;
}

.text-link-button:disabled {
  opacity: 0.5;
  cursor: default;
  text-decoration: none;
  text-shadow: none;
}

/* ── Custom checkbox: clearly shows ON / OFF ─────────────────────────── */
.settings-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid #2a2a2a;
  background: linear-gradient(180deg, #181818, #131313);
  border-radius: 3px;
  cursor: pointer;
  color: #ddd;
  font-size: 13px;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
  user-select: none;
}

.settings-check:hover {
  border-color: #3c3c3c;
}

.settings-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid #4a4a4a;
  background: #0e0e0e;
  border-radius: 3px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.settings-check input[type="checkbox"]:hover {
  border-color: var(--orange);
}

.settings-check input[type="checkbox"]:checked {
  background: linear-gradient(180deg, #ff9a34, #d86f13);
  border-color: #6e2d00;
  box-shadow: 0 0 8px rgba(216, 111, 19, 0.45);
}

.settings-check input[type="checkbox"]:checked::after {
  content: "✓";
  color: #111;
  font-weight: 900;
  font-size: 13px;
  line-height: 1;
}

.settings-check input[type="checkbox"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.settings-check:has(input[type="checkbox"]:checked) {
  border-color: var(--orange);
  background: linear-gradient(180deg, rgba(216, 111, 19, 0.18), rgba(110, 45, 0, 0.08));
  color: #ffb35d;
}

.announcement-lock-row {
  display: inline-flex;
  margin: 4px 0;
}

/* ───────────────────────────── Thread page ──────────────────────────── */
.thread-page {
  max-width: 940px;
  margin: 28px auto 60px;
  padding: 0 16px;
  display: grid;
  gap: 22px;
}

/* Outer card hosting the original post + replies + reply form. */
.thread-card {
  border: 1px solid #2a2a2a;
  background: linear-gradient(180deg, #141414 0%, #0e0e0e 100%);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Header (breadcrumb + title + meta). */
.thread-head {
  position: relative;
  padding: 22px 26px 18px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(216, 111, 19, 0.08), transparent 60%),
    linear-gradient(180deg, #1a1a1a, #131313);
  border-bottom: 1px solid #2a2a2a;
}

.thread-head .profile-breadcrumb {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.thread-head .profile-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dashed #444;
}

.thread-head .profile-breadcrumb a:hover {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

.thread-head h1 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1.25;
}

.thread-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12.5px;
}

.thread-author-avatar {
  width: 30px;
  height: 30px;
  border: 1px solid #303030;
  flex-shrink: 0;
}

.thread-meta strong {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.thread-meta time,
.thread-meta #threadDate {
  color: #888;
  font-size: 12px;
  position: relative;
  padding-left: 10px;
}

.thread-meta #threadDate::before {
  content: "·";
  position: absolute;
  left: 0;
  color: #555;
}

.thread-locked-badge {
  margin-left: auto;
  padding: 4px 10px;
  border: 1px solid #6e2d00;
  background: rgba(216, 111, 19, 0.15);
  color: var(--orange);
  font-weight: 700;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.thread-locked-badge::before {
  content: "🔒";
  font-size: 11px;
}

.thread-locked-badge.is-hidden { display: none; }

/* Original post body. */
.thread-body {
  padding: 22px 26px 24px;
  color: #ececec;
  line-height: 1.65;
  font-size: 14.5px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.thread-body a {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.thread-body img {
  max-width: 100%;
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  margin: 10px 0;
  display: block;
}

.thread-body p { margin: 0 0 12px; }
.thread-body ul, .thread-body ol { margin: 0 0 12px 24px; }
.thread-body li { margin: 0 0 4px; }
.thread-body blockquote {
  margin: 0 0 12px;
  padding: 8px 14px;
  border-left: 3px solid var(--orange);
  color: #ccc;
  background: rgba(216, 111, 19, 0.04);
  border-radius: 0 3px 3px 0;
}
.thread-body code, .thread-body pre {
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: Consolas, "JetBrains Mono", monospace;
  font-size: 12.5px;
}
.thread-body pre { padding: 12px 14px; overflow-x: auto; }
.thread-body h1, .thread-body h2, .thread-body h3 {
  color: #fff;
  margin: 16px 0 10px;
}

.thread-empty { color: var(--muted); font-style: italic; }

/* ───────────── Replies list ───────────── */
.thread-replies {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 26px;
  margin: 4px 0 0;
}

.thread-replies:empty { padding: 0; margin: 0; }

.thread-replies::before {
  content: attr(data-label);
}

.thread-replies-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  font-weight: 700;
  margin: 4px 0 10px;
  padding-top: 12px;
  border-top: 1px dashed #262626;
}

.thread-reply {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid #1f1f1f;
}

.thread-reply:first-of-type { border-top: none; }

.thread-reply-side {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.thread-reply-avatar {
  width: 40px;
  height: 40px;
  border: 1px solid #303030;
  border-radius: 50%;
}

.thread-reply-main {
  min-width: 0;
}

.thread-reply-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 6px;
}

.thread-reply-head strong {
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
}

.thread-reply-date {
  margin-left: auto;
  font-size: 11.5px;
  color: #777;
}

.thread-reply-body {
  color: #ececec;
  line-height: 1.55;
  font-size: 13.5px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.thread-reply-body a { color: var(--orange); text-decoration: underline; text-underline-offset: 2px; }
.thread-reply-body img { max-width: 100%; border: 1px solid #2a2a2a; border-radius: 3px; margin: 8px 0; display: block; }
.thread-reply-body p { margin: 0 0 8px; }
.thread-reply-body p:last-child { margin-bottom: 0; }
.thread-reply-body ul, .thread-reply-body ol { margin: 0 0 8px 22px; }

/* ───────────── Reply form / state strip ───────────── */
.thread-foot {
  padding: 18px 26px 22px;
  border-top: 1px solid #2a2a2a;
  background: linear-gradient(180deg, #131313, #0e0e0e);
}

.thread-foot.is-hidden { display: none; }

.thread-reply-state {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
  text-align: center;
  padding: 12px 8px;
  border: 1px dashed #2c2c2c;
  border-radius: 4px;
  background: #101010;
}

.thread-reply-state.is-locked {
  color: #ffb35d;
  background: rgba(216, 111, 19, 0.08);
  border-color: #6e2d00;
  border-style: solid;
  font-weight: 600;
  font-style: normal;
}

.thread-reply-state.is-hidden { display: none; }

.thread-reply-form {
  display: grid;
  gap: 12px;
  margin: 0;
}

.thread-reply-form.is-hidden { display: none; }

.thread-reply-form-title {
  margin: 0 0 4px;
  color: #ccc;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.thread-reply-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.thread-reply-hint {
  color: var(--muted);
  font-size: 11.5px;
  margin-right: auto;
}

.thread-reply-submit {
  min-height: 38px;
  padding: 0 22px;
  border: 1px solid #6e2d00;
  background: linear-gradient(180deg, #ff9a34, #d86f13);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 12.5px;
  box-shadow: 0 0 12px rgba(216, 111, 19, 0.25);
  transition: filter 0.12s ease, transform 0.05s ease;
}

.thread-reply-submit:hover { filter: brightness(1.08); }
.thread-reply-submit:active { transform: translateY(1px); }
.thread-reply-submit:disabled { opacity: 0.5; cursor: default; box-shadow: none; }

/* Admin moderation buttons (delete reply / delete thread). */
.thread-mod-button {
  margin-left: 8px;
  padding: 3px 10px;
  border: 1px solid #5a1a1a;
  background: rgba(255, 60, 60, 0.08);
  color: #ff6b6b;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.thread-mod-button:hover {
  background: linear-gradient(180deg, #ff6b6b, #c2382d);
  border-color: #c2382d;
  color: #fff;
}

.thread-delete-thread {
  position: absolute;
  top: 18px;
  right: 22px;
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
  clip-path: inset(100%);
  clip: rect(0 0 0 0);
  overflow: hidden;
}

@media (max-width: 900px) {
  .members-shell {
    grid-template-columns: 1fr;
  }
  .members-columns {
    grid-template-columns: 1fr;
  }
  .members-search-panel {
    position: static;
  }
}

/* ── Role-aware badge & avatar glow on the public profile ─────────────── */
.profile-badges span.role-staff,
.profile-badges span.role-owner {
  border-color: #743030;
  background: rgba(255, 77, 77, 0.12);
  color: #ff6b6b;
  text-shadow: 0 0 7px rgba(255, 77, 77, 0.75), 0 0 16px rgba(255, 77, 77, 0.28);
  box-shadow: 0 0 10px rgba(255, 77, 77, 0.18);
}

.profile-badges span.role-support {
  border-color: #4b3470;
  background: rgba(167, 118, 255, 0.12);
  color: #a776ff;
  box-shadow: 0 0 10px rgba(167, 118, 255, 0.18);
}

.profile-badges span.role-resseler {
  border-color: #6a5524;
  background: rgba(255, 211, 90, 0.1);
  color: #ffd35a;
  text-shadow: 0 0 7px rgba(255, 211, 90, 0.78), 0 0 16px rgba(255, 211, 90, 0.26);
  box-shadow: 0 0 10px rgba(255, 211, 90, 0.18);
}

.profile-badges span.role-user {
  border-color: #6e2d00;
  background: rgba(216, 111, 19, 0.1);
  color: #ffb35d;
}

.member-info-panel h1.role-staff,
.member-info-panel h1.role-owner {
  color: #ff6b6b;
  text-shadow: 0 0 8px rgba(255, 77, 77, 0.85), 0 0 18px rgba(255, 77, 77, 0.4);
}

.member-info-panel h1.role-support {
  color: #a776ff;
  text-shadow: 0 0 8px rgba(167, 118, 255, 0.7);
}

.member-info-panel h1.role-resseler {
  color: #ffd35a;
  text-shadow: 0 0 8px rgba(255, 211, 90, 0.78), 0 0 18px rgba(255, 211, 90, 0.32);
}

.profile-avatar.role-staff,
.profile-avatar.role-owner {
  border-color: #743030;
  box-shadow:
    0 0 18px rgba(255, 77, 77, 0.55),
    0 0 36px rgba(255, 77, 77, 0.28);
}

.profile-avatar.role-support {
  border-color: #4b3470;
  box-shadow:
    0 0 18px rgba(167, 118, 255, 0.45),
    0 0 36px rgba(167, 118, 255, 0.22);
}

.profile-avatar.role-resseler {
  border-color: #6a5524;
  box-shadow:
    0 0 18px rgba(255, 211, 90, 0.5),
    0 0 36px rgba(255, 211, 90, 0.25);
}

/* Read-only profile (viewing someone else): hide edit affordances. */
.profile-avatar.is-readonly,
.member-cover.is-readonly {
  cursor: default;
}

.profile-avatar.is-readonly::before,
.profile-avatar.is-readonly span,
.member-cover.is-readonly::before,
.member-cover.is-readonly .banner-change-hint {
  display: none !important;
}

.admin-page {
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
  padding: 38px 0 64px;
}

.admin-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.admin-title-row h1 {
  margin: 0;
  color: #fff;
  font-size: 24px;
}

.admin-title-row p {
  margin: 6px 0 0;
  color: var(--muted);
}

.admin-refresh {
  min-width: 96px;
  border-color: #303030;
  background: #151515;
  color: var(--orange);
  text-shadow: none;
}

.admin-refresh:hover {
  color: #111;
  background: linear-gradient(#ff9a34, #d86f13);
}

.admin-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 78px;
}

.admin-menu {
  padding-bottom: 14px;
}

.admin-tab-button {
  display: block;
  width: calc(100% - 32px);
  min-height: 0;
  margin: 10px 16px 0;
  padding: 10px 12px;
  border: 1px solid #292929;
  border-left-color: #3a2b20;
  background: linear-gradient(180deg, #181818, #131313);
  color: #858585;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  text-align: left;
  text-shadow: none;
}

.admin-tab-button:hover,
.admin-tab-button.is-active {
  border-color: #51351f;
  color: var(--orange);
  background: linear-gradient(180deg, #1c1a18, #151515);
}

.admin-tab-button.is-active {
  font-weight: 700;
}

.admin-workspace {
  min-width: 0;
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.is-active {
  display: grid;
  gap: 24px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.admin-stat,
.admin-card {
  border: 1px solid #303030;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 6px),
    rgba(17, 17, 17, 0.94);
  box-shadow: 0 0 18px rgba(216, 111, 19, 0.045);
}

.admin-stat {
  min-height: 86px;
  padding: 15px 16px;
}

.admin-stat span {
  display: block;
  color: #8f8f8f;
  font-size: 12px;
  text-transform: uppercase;
}

.admin-stat strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: 24px;
}

.admin-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.admin-overview-grid div {
  min-height: 74px;
  padding: 14px;
  border: 1px solid #292929;
  border-left-color: #3a2b20;
  background: linear-gradient(180deg, #181818, #131313);
}

.admin-overview-grid span {
  display: block;
  color: #8f8f8f;
  font-size: 12px;
  text-transform: uppercase;
}

.admin-overview-grid strong {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 16px;
}

.admin-shell {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.admin-users-grid {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.admin-card {
  overflow: hidden;
}

.admin-card-wide {
  grid-column: 1 / -1;
}

.admin-card h2 {
  margin: 0;
  min-height: 46px;
  padding: 14px 18px 0;
  border-bottom: 1px solid #303030;
  color: #ffb35d;
  font-size: 15px;
  text-transform: uppercase;
}

.admin-form {
  padding: 16px 18px 18px;
}

.compact-admin-form {
  border-bottom: 1px solid #303030;
}

.admin-check {
  margin: 14px 0 0;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.admin-actions .form-message {
  margin: 0;
}

.admin-list {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
}

.admin-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 180px;
  gap: 14px;
  align-items: center;
  min-height: 66px;
  padding: 13px 14px;
  border: 1px solid #292929;
  border-left-color: #3a2b20;
  background: linear-gradient(180deg, #181818, #131313);
}

.invite-admin-row,
.subscription-key-row {
  grid-template-columns: minmax(0, 1fr) 96px 118px 82px;
}

.subscription-admin-row {
  grid-template-columns: minmax(0, 1fr) 96px 170px;
}

.user-role-row {
  grid-template-columns: minmax(0, 1fr) 170px 82px;
}

.admin-list-main {
  min-width: 0;
}

.admin-list-main strong,
.admin-list-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-list-main strong {
  color: #fff;
  font-size: 14px;
}

.admin-list-main span,
.admin-date {
  color: #8f8f8f;
  font-size: 12px;
}

.admin-code {
  color: var(--orange) !important;
  font-family: Consolas, "Courier New", monospace;
}

.role-pill {
  min-width: 74px;
  padding: 5px 8px;
  border: 1px solid #303030;
  background: #111;
  color: #aaa;
  font-size: 12px;
  text-align: center;
}

.role-pill.is-admin {
  border-color: #6e2d00;
  color: #ffb35d;
}

.role-pill-staff,
.role-pill-owner {
  border-color: #743030;
  color: #ff6262;
  box-shadow: 0 0 12px rgba(255, 77, 77, 0.16);
}

.role-pill-support {
  border-color: #4b3470;
  color: #a776ff;
}

.role-pill-resseler {
  border-color: #6a5524;
  color: #ffd35a;
  box-shadow: 0 0 12px rgba(255, 211, 90, 0.16);
}

.admin-role-select {
  min-height: 32px;
}

.admin-save-button {
  min-width: 74px;
  min-height: 30px;
  padding: 0 10px;
  border-color: #303030;
  background: #151515;
  color: var(--orange);
  text-shadow: none;
}

.admin-save-button:hover {
  color: #111;
  background: linear-gradient(#ff9a34, #d86f13);
}

.admin-delete-button {
  min-width: 74px;
  min-height: 30px;
  padding: 0 10px;
  border-color: #3a2420;
  background: #151515;
  color: #d88957;
  text-shadow: none;
}

.admin-delete-button:hover {
  color: #fff;
  background: #5a1d12;
}

.danger-button {
  background: #7a1a1a;
  color: #ffb3b3;
  border: 1px solid #a02020;
}

.danger-button:hover {
  background: #a02020;
  color: #fff;
}

.admin-empty {
  margin: 0;
  padding: 14px;
  color: var(--muted);
}

.auth-panel {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 0 22px rgba(216, 111, 19, 0.08);
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(#2b2119, #141414);
  color: #ffb35d;
  text-shadow: 1px 1px 0 #000;
}

.panel-title h1 {
  margin: 0;
  font-size: 15px;
}

.auth-form {
  padding: 20px 20px 7px;
}

.auth-form.is-hidden {
  display: none;
}

.form-row {
  margin-bottom: 12px;
}

label,
.form-row label {
  display: block;
  margin-bottom: 4px;
  color: #f3d6b8;
  font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
select {
  width: 100%;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid var(--line-soft);
  border-top-color: #8b5d31;
  background: #080808;
  color: var(--text);
  font: inherit;
}

select {
  cursor: pointer;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 42px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0;
  display: grid;
  width: 38px;
  height: calc(100% - 2px);
  min-height: 0;
  padding: 0;
  place-items: center;
  border: 0;
  border-left: 1px solid var(--line-soft);
  background: transparent;
  color: #8e8e8e;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle.is-active {
  background: transparent;
  color: var(--orange);
}

.eye-icon {
  display: block;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

input:focus {
  outline: 2px solid rgba(216, 111, 19, 0.35);
  border-color: var(--orange-dark);
}

.password-strength {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.strength-track {
  display: block;
  height: 5px;
  overflow: hidden;
  border: 1px solid #2e261f;
  background: #070707;
}

.strength-fill {
  display: block;
  width: 0;
  height: 100%;
  background: #555;
}

.strength-label {
  min-width: 98px;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.password-strength.is-weak .strength-fill {
  width: 33%;
  background: #b53a2e;
}

.password-strength.is-medium .strength-fill {
  width: 66%;
  background: #d86f13;
}

.password-strength.is-strong .strength-fill {
  width: 100%;
  background: #48a85c;
}

.password-strength.is-weak .strength-label {
  color: #ff7a68;
}

.password-strength.is-medium .strength-label {
  color: #ffb35d;
}

.password-strength.is-strong .strength-label {
  color: #74d183;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 2px 0 18px;
}

.forgot-link,
.register-link {
  color: #c58a58;
  font-size: 12px;
  text-decoration: none;
}

.forgot-link:hover,
.register-link:hover {
  color: var(--orange);
  text-decoration: underline;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #d7c7b7;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
}

.checkbox-row input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--orange);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #3a3028;
}

button {
  min-height: 34px;
  padding: 0 16px;
  border: 1px solid #6e2d00;
  background: linear-gradient(#ff9a34, #d86f13);
  color: #111;
  font: inherit;
  font-weight: 700;
  text-shadow: 1px 1px 0 var(--orange-dark);
  cursor: pointer;
}

button:hover {
  background: linear-gradient(#ffb15d, #ec7d18);
}

.form-message {
  min-height: 0;
  margin: 0;
  font-weight: 700;
}

.form-message:not(:empty) {
  min-height: 20px;
  margin-top: 12px;
}

.form-message.is-error {
  color: var(--error);
}

.form-message.is-success {
  color: var(--success);
}

@media (max-width: 760px) {
  .header-inner {
    flex-wrap: wrap;
    min-height: 50px;
    padding: 12px 14px;
  }

  .forum-nav {
    position: static;
    transform: none;
    order: 3;
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    gap: 18px;
    overflow-x: auto;
  }

  .forum-nav a {
    min-height: 34px;
    padding: 0 12px;
  }

  .user-panel {
    margin-left: auto;
  }

  .forum-shell {
    grid-template-columns: 1fr;
  }

  .forum-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .forum-stats,
  .last-post {
    grid-column: 2;
    justify-self: stretch;
  }

  .last-post {
    padding-left: 0;
    border-left: 0;
  }

  .member-cover {
    min-height: 240px;
    padding: 120px 16px 18px;
  }

  .profile-avatar {
    top: 18px;
    bottom: auto;
    left: 50%;
    width: 82px;
    height: 82px;
    font-size: 32px;
    transform: translateX(-50%);
  }

  .member-info-panel {
    max-width: none;
    text-align: center;
  }

  .profile-badges {
    justify-content: center;
  }

  .profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 0;
  }

  .admin-page {
    width: min(100% - 24px, 720px);
  }

  .admin-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-layout,
  .admin-stats-grid,
  .admin-shell,
  .admin-users-grid,
  .admin-overview-grid {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
  }

  .admin-card-wide {
    grid-column: auto;
  }

  .admin-list-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 440px) {
  .brand {
    font-size: 29px;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .form-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .password-strength {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .strength-label {
    text-align: left;
  }
}
