/* Thin Gold Line RP theme: black field, gold lettering, red (fire) / blue (EMS) edge glow */
:root {
  --bg: #050507; --panel: #0d101c; --panel2: #141929; --sunk: #08090f;
  --line: #242a3e; --line2: #313852; --line-gold: #5b4a17;
  --gold: #d4af37; --gold2: #f3d67a; --gold-dark: #8f6f14;
  --gold-grad: linear-gradient(180deg, #f7e394 0%, #d4af37 52%, #946f12 100%);
  --text: #f1ece0; --text2: #c9c6bd; --muted: #8e93a8;
  --red: #c8202b; --blue: #1f4fd6; --green: #2ecc71;
  --ok: #7ee2a7; --ok-bg: #0f2619; --ok-line: #1f6b3e;
  --bad: #f29a9a; --bad-bg: #2a1114; --bad-line: #7a2a30;
  --info: #8fb4ff; --info-bg: #0f1c3a; --info-line: #2c4a8a;
  --warn: #f3d67a; --warn-bg: #261f07;
  --display: "Cinzel", "Trajan Pro", Georgia, "Times New Roman", serif;
  --r: 10px; --r-sm: 7px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 90px; }
body {
  margin: 0; color: var(--text);
  font: 15px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(900px 520px at 0% 0%, rgba(200, 32, 43, .2), transparent 62%),
    radial-gradient(900px 520px at 100% 0%, rgba(31, 79, 214, .24), transparent 62%),
    radial-gradient(700px 400px at 50% 110%, rgba(212, 175, 55, .08), transparent 65%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
}
a { color: var(--gold2); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--s5); }
main.wrap { padding-bottom: 120px; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; }
.meta { color: var(--muted); font-size: 13px; }
.hint { color: var(--muted); font-size: 13px; margin: 0; }
.row { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 200px; }
.stack { display: flex; flex-direction: column; gap: var(--s4); }
.view { animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- header ---------- */
header.top {
  background: rgba(5, 5, 7, .9); backdrop-filter: blur(8px);
  border-bottom: 2px solid; border-image: linear-gradient(90deg, var(--red), var(--gold) 28%, var(--gold) 72%, var(--blue)) 1;
  position: sticky; top: 0; z-index: 20;
}
header.top .wrap { display: flex; align-items: center; gap: var(--s5); min-height: 66px; flex-wrap: wrap; padding-top: var(--s2); padding-bottom: var(--s2); }
.brand { display: flex; align-items: center; gap: var(--s3); text-decoration: none; flex: none; }
.brand span { font-family: var(--display); font-weight: 800; font-size: 16px; letter-spacing: .6px; text-transform: uppercase;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand .logo { width: 42px; height: 42px; border-radius: 50%; filter: drop-shadow(0 0 6px rgba(212, 175, 55, .45)); }
nav { display: flex; align-items: center; gap: 2px; flex: 1; flex-wrap: wrap; }
nav a { color: var(--muted); padding: 8px 12px; border-radius: var(--r-sm); font-weight: 600; font-size: 14px; letter-spacing: .2px; text-decoration: none; transition: color .15s, background .15s; white-space: nowrap; }
nav a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
nav a.active { color: var(--gold2); background: rgba(212, 175, 55, .1); }
nav a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.navsep { width: 1px; height: 20px; background: var(--line2); margin: 0 var(--s2); }
.user { display: flex; align-items: center; gap: var(--s2); font-size: 14px; flex: none; }
.uname { color: var(--text2); }
.signout { color: var(--muted); text-decoration: none; font-size: 13px; padding: 4px 8px; border-radius: var(--r-sm); }
.signout:hover { color: var(--text); background: rgba(255, 255, 255, .05); }

/* ---------- page heading ---------- */
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s5); flex-wrap: wrap; margin: var(--s6) 0 var(--s5); }
.pagehead-aside { flex: 0 1 320px; }
h1 { font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1.2; letter-spacing: .5px; margin: 0; text-transform: uppercase;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
h1::after {
  content: ""; display: block; height: 18px; margin-top: 6px; width: 260px; max-width: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 18'%3E%3Cpath d='M0 9H70L80 9L88 2L98 16L106 9H150L158 9L164 1L172 17L180 9H260' fill='none' stroke='%23d4af37' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat left center / 260px 18px;
  filter: drop-shadow(0 0 3px rgba(212, 175, 55, .7));
}
.sub { color: var(--muted); margin: var(--s2) 0 0; max-width: 620px; }
h2 { font-size: 16px; font-weight: 700; margin: 0; color: var(--text); letter-spacing: .2px; }
.sechead { font-family: var(--display); color: var(--gold2); font-size: 15px; text-transform: uppercase; letter-spacing: .8px; margin: var(--s6) 0 var(--s3); }
.col > .sechead:first-child { margin-top: 0; }
.crumb { background: none; border: 0; padding: 0; color: var(--muted); font-size: 14px; margin-top: var(--s5); }
.crumb:hover { color: var(--gold2); }
a.crumb { display: inline-block; text-decoration: none; }
.crumb + .pagehead { margin-top: var(--s3); }

/* ---------- surfaces ---------- */
.card { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s5); }
.card h3 { margin: 0; font-size: 16px; color: var(--gold2); font-family: var(--display); letter-spacing: .3px; }
.card p { margin: 0; }
.panel { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: var(--s4); }
.panel-head { padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.panel-body { padding: var(--s5); }
.panel-body > .field:last-child, .panel-body > .picker:last-child { margin-bottom: 0; }
.cardhead { display: flex; justify-content: space-between; gap: var(--s3); align-items: flex-start; flex-wrap: wrap; }
.headright { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s1); }
.cardfoot { margin-top: var(--s4); display: flex; gap: var(--s2); flex-wrap: wrap; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s4); }
.appcard { text-align: left; display: flex; flex-direction: column; gap: var(--s2); min-height: 160px; border-top: 2px solid var(--line-gold); transition: border-color .15s, transform .15s, box-shadow .15s; }
.appcard p { color: var(--muted); font-size: 14px; flex: 1; }
.appcard-foot { display: flex; justify-content: space-between; align-items: center; padding-top: var(--s3); border-top: 1px solid var(--line); }
.appcard .go { color: var(--gold); font-weight: 600; font-size: 14px; transition: transform .15s; }
.appcard:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 8px 26px rgba(212, 175, 55, .14); }
.appcard:hover .go { transform: translateX(3px); }
.appcard:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--s4); align-items: start; }
.twocol { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: var(--s5); align-items: start; margin-top: var(--s5); }
@media (max-width: 860px) { .split, .twocol { grid-template-columns: 1fr; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--gold-grad); color: #1a1405; border: 1px solid transparent; padding: 9px 18px; border-radius: var(--r-sm); font-weight: 700; font-size: 14px; letter-spacing: .2px; text-decoration: none; box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset; transition: filter .15s, border-color .15s, background .15s; white-space: nowrap; }
.btn:hover { filter: brightness(1.1); }
.btn:focus-visible, nav button:focus-visible, .icon:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn.big { padding: 12px 26px; font-size: 15px; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line2); box-shadow: none; }
.btn.ghost:hover { border-color: var(--gold); filter: none; }
.btn.text { background: transparent; color: var(--muted); box-shadow: none; padding-left: 8px; padding-right: 8px; font-weight: 600; }
.btn.text:hover { color: var(--text); background: rgba(255, 255, 255, .05); filter: none; }
.btn.text.danger:hover { color: var(--bad); background: rgba(200, 32, 43, .1); }
.btn.green { background: var(--green); color: #04210f; box-shadow: none; }
.btn.red { background: var(--red); color: #fff; box-shadow: none; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.icon { background: none; border: 1px solid transparent; color: var(--muted); width: 26px; height: 22px; border-radius: 5px; font-size: 10px; line-height: 1; }
.icon:hover:not(:disabled) { color: var(--gold2); border-color: var(--line2); }
.icon:disabled { opacity: .25; cursor: default; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s5); }
.lbl { font-weight: 600; font-size: 14px; color: var(--text); }
.req { color: var(--gold); }
.opt { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 4px; }
input[type=text], input[type=search], input[type=password], select, textarea { width: 100%; background: var(--sunk); color: var(--text); border: 1px solid var(--line2); border-radius: var(--r-sm); padding: 10px 12px; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #5d6276; }
textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
input:hover, select:hover, textarea:hover { border-color: #414a69; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, .15); }
input[type=checkbox] { accent-color: var(--gold); width: 16px; height: 16px; margin: 0; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.qfoot { display: flex; justify-content: space-between; gap: var(--s3); margin-top: 6px; min-height: 18px; }
.count { color: #5d6276; font-size: 12px; margin-left: auto; }
.count.near { color: var(--warn); }
.qerr { color: var(--bad); font-size: 13px; }
.searchbox input { padding-left: 34px; background: var(--sunk) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238e93a8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3.5 3.5'/%3E%3C/svg%3E") no-repeat 11px center; }

/* application form */
.formcard { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.progress { display: flex; align-items: center; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, .18); }
.bar { flex: 1; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; background: var(--gold-grad); border-radius: 99px; transition: width .3s ease; }
.qblock { display: grid; grid-template-columns: 34px 1fr; gap: var(--s4); padding: var(--s5); border-bottom: 1px solid var(--line); transition: background .15s; }
.qblock:last-child { border-bottom: 0; }
.qblock:focus-within { background: rgba(212, 175, 55, .03); }
.qblock .lbl { display: block; margin: 4px 0 var(--s2); font-size: 15px; }
.qnum { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--gold2); border: 1px solid var(--line-gold); background: rgba(212, 175, 55, .07); flex: none; }
.qblock:focus-within .qnum { background: var(--gold-grad); color: #1a1405; border-color: transparent; }
.qblock.invalid .qnum { border-color: var(--bad-line); color: var(--bad); background: var(--bad-bg); }
.qblock.invalid input, .qblock.invalid textarea { border-color: var(--bad-line); }

.stickybar { position: sticky; bottom: 0; z-index: 10; margin-top: var(--s5); padding: var(--s3) 0 var(--s4); background: linear-gradient(180deg, transparent, var(--bg) 35%); }
.stickybar-in { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; background: rgba(13, 16, 28, .95); backdrop-filter: blur(6px); border: 1px solid var(--line2); border-radius: var(--r); padding: var(--s3) var(--s4); box-shadow: 0 -6px 30px rgba(0, 0, 0, .45); }
.savestate { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 7px; }
.savestate::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line2); }
.savestate.ok::before { background: var(--green); }
.savestate.busy::before { background: var(--gold); animation: pulse 1s infinite; }
.savestate.err { color: var(--bad); } .savestate.err::before { background: var(--red); }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- callouts, notes, toasts ---------- */
.callout { padding: var(--s3) var(--s4); border-radius: var(--r-sm); border: 1px solid; border-left-width: 3px; margin-bottom: var(--s4); font-size: 14px; }
.callout.info { background: var(--info-bg); border-color: var(--info-line); color: #c8d8ff; }
.callout.warn { background: var(--warn-bg); border-color: var(--line-gold); color: var(--gold2); }
.note { margin-top: var(--s4); padding: var(--s3) var(--s4); background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-sm); white-space: pre-wrap; color: var(--text2); font-size: 14px; }
.note-lbl { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.waiting { margin-top: var(--s3) !important; }

.toast { position: fixed; right: 20px; bottom: 20px; z-index: 50; max-width: min(420px, calc(100vw - 40px)); display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s3) var(--s3) var(--s3) var(--s4); border-radius: var(--r); border: 1px solid; box-shadow: 0 10px 40px rgba(0, 0, 0, .55); font-size: 14px; animation: toastin .2s ease-out; transition: opacity .35s, transform .35s; }
.toast.out { opacity: 0; transform: translateY(8px); }
.toast.ok { background: var(--ok-bg); border-color: var(--ok-line); color: #b8f0cf; }
.toast.err { background: var(--bad-bg); border-color: var(--bad-line); color: #f7c0c0; }
.toast-x { background: none; border: 0; color: inherit; opacity: .6; font-size: 18px; line-height: 1; padding: 0 4px; }
.toast-x:hover { opacity: 1; }
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } }

.empty { text-align: center; padding: var(--s7) var(--s5); border: 1px dashed var(--line2); border-radius: var(--r); color: var(--muted); }
.empty-title { color: var(--text2); font-weight: 600; font-size: 16px; }
.empty p { margin: 6px 0 0; font-size: 14px; }
.empty .btn { margin-top: var(--s4); }
.loading { display: flex; align-items: center; gap: var(--s3); color: var(--muted); padding: var(--s7) 0; justify-content: center; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line2); border-top-color: var(--gold); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- status ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid transparent; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.pending { background: #2e2608; color: var(--gold2); border-color: var(--line-gold); }
.badge.accepted { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.badge.denied { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.badge.correction { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.badge.bypass, .badge.closed { background: #1b1d27; color: #b6bacb; border-color: var(--line2); }
.badge.open { background: #2e2608; color: var(--gold2); border-color: var(--line-gold); }

/* submission cards: colored left edge by status */
.subcard { border-left: 3px solid var(--line2); }
.subcard.s-pending { border-left-color: var(--gold); }
.subcard.s-accepted { border-left-color: var(--green); }
.subcard.s-denied { border-left-color: var(--red); }
.subcard.s-correction { border-left-color: #4f7de0; }
.who { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.who h3 { font-family: inherit; font-size: 16px; letter-spacing: 0; color: var(--text); }
.who-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.decision { margin-top: var(--s4); padding: var(--s3) var(--s4); border-radius: var(--r-sm); background: var(--sunk); border: 1px solid var(--line); font-size: 14px; color: var(--text2); }
.decision-note { margin-top: 4px; color: var(--text); white-space: pre-wrap; }
.fold { margin-top: var(--s3); border-top: 1px solid var(--line); }
.fold summary { cursor: pointer; padding: var(--s3) 0 0; color: var(--gold2); font-size: 14px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; }
.fold[open] summary::before { transform: rotate(45deg); }
.answers { padding-top: var(--s2); }
.qa { margin-top: var(--s4); }
.qa .q { font-weight: 600; font-size: 14px; color: var(--text); margin-bottom: 6px; display: flex; gap: 6px; }
.qa .qi { color: var(--gold); }
.qa .a { white-space: pre-wrap; background: var(--sunk); border: 1px solid var(--line); border-left: 2px solid var(--gold-dark); border-radius: var(--r-sm); padding: 10px 12px; color: var(--text2); font-size: 14px; }
.qa .a.none { color: var(--muted); font-style: italic; }
.timeline { list-style: none; padding: 0; margin: var(--s3) 0 0; border-left: 1px solid var(--line2); margin-left: 4px; }
.timeline li { position: relative; display: flex; justify-content: space-between; gap: var(--s3); padding: 4px 0 8px 18px; font-size: 14px; flex-wrap: wrap; }
.timeline li::before { content: ""; position: absolute; left: -4px; top: 11px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-dark); }
.actionbar { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.actionbar .row { gap: 6px; }
.drawer { margin-top: var(--s3); padding: var(--s4); border-radius: var(--r-sm); background: var(--sunk); border: 1px solid var(--line2); display: flex; flex-direction: column; gap: var(--s2); }
.drawer.deny { border-color: var(--bad-line); }
.drawer.corr { border-color: var(--info-line); }

/* segmented filter */
.segmented { display: flex; gap: 4px; padding: 4px; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: var(--s5); overflow-x: auto; width: fit-content; max-width: 100%; }
.segmented button { background: none; border: 0; color: var(--muted); padding: 7px 14px; border-radius: var(--r-sm); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--panel2); color: var(--gold2); box-shadow: 0 0 0 1px var(--line-gold); }
.cnt { font-size: 12px; min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--line); color: var(--text2); text-align: center; }
.segmented button.active .cnt { background: rgba(212, 175, 55, .18); color: var(--gold2); }

/* ---------- avatars, chips ---------- */
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-gold); flex: none; object-fit: cover; }
.avatar.sm { width: 30px; height: 30px; }
.avatar.lg { width: 76px; height: 76px; }
.avatar.initials { display: inline-grid; place-items: center; background: linear-gradient(135deg, #2a2412, #14120a); color: var(--gold2); font-weight: 700; font-size: 14px; }
.avatar.sm.initials { font-size: 11px; }
.avatar.lg.initials { font-size: 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border: 1px solid var(--line2); border-radius: 999px; font-size: 13px; background: var(--sunk); }
.chip-x { background: none; border: 0; color: var(--muted); padding: 0 0 0 2px; font-size: 16px; line-height: 1; }
.chip-x:hover { color: var(--bad); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- users ---------- */
.table { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); }
.trow { display: grid; grid-template-columns: minmax(0, 1fr) 120px 150px; gap: var(--s4); align-items: center; padding: var(--s3) var(--s5); width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); }
button.trow:hover { background: rgba(212, 175, 55, .05); }
.thead { border-top: 0; background: var(--sunk); font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); font-weight: 700; padding-top: 10px; padding-bottom: 10px; }
@media (max-width: 600px) { .trow { grid-template-columns: minmax(0, 1fr) auto; } .trow > :last-child { display: none; } }
.profile { display: flex; gap: var(--s5); align-items: center; margin-top: var(--s4); flex-wrap: wrap; }
.profile-main { flex: 1; min-width: 240px; }
.profile h2 { font-family: var(--display); font-size: 22px; color: var(--gold2); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--s3); margin-top: var(--s4); }
.stats > div { display: flex; flex-direction: column; padding: 10px 12px; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-sm); }
.stats strong { font-size: 15px; }
.stats strong.yes { color: var(--ok); } .stats strong.no { color: var(--bad); }
.notes { display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s4); }
.snote { padding: 10px 12px; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-sm); }
.snote-head { display: flex; align-items: center; gap: var(--s2); font-size: 13px; }
.snote-head .btn { margin-left: auto; padding: 2px 6px; }
.snote-text { margin-top: 4px; white-space: pre-wrap; font-size: 14px; color: var(--text2); }
.list-rows { padding: 0; }
.lrow { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: var(--s3) var(--s5); border-top: 1px solid var(--line); }
.lrow:first-child { border-top: 0; }

/* support */
.steps ol { margin: var(--s3) 0 0; padding-left: 20px; color: var(--text2); font-size: 14px; }
.steps li { margin-bottom: var(--s2); }
.steps li::marker { color: var(--gold); font-weight: 700; }
.ticket { display: flex; gap: var(--s4); align-items: flex-start; }
.ticket p { color: var(--text2); margin-top: 6px; }
.ticket-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; font-weight: 800; color: #1a1405; background: var(--gold-grad); flex: none; }

/* ---------- admin ---------- */
.admin { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: var(--s5); align-items: start; }
@media (max-width: 820px) { .admin { grid-template-columns: 1fr; } .side { position: static !important; } }
.side { position: sticky; top: 90px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s2); display: flex; flex-direction: column; gap: 2px; }
.side-head { display: flex; justify-content: space-between; padding: var(--s2) 10px; }
.side .item { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); text-align: left; padding: 9px 10px; border: 1px solid transparent; border-radius: var(--r-sm); background: none; font-size: 14px; color: var(--text2); }
.side .item:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.side .item.active { border-color: var(--line-gold); color: var(--gold2); background: rgba(212, 175, 55, .08); }
.side .item.new { color: var(--gold); font-weight: 600; margin-top: var(--s1); border-top: 1px solid var(--line); border-radius: 0 0 var(--r-sm) var(--r-sm); padding-top: 12px; }
.side .item.new.active { border-radius: var(--r-sm); }
.editor-title { display: flex; align-items: baseline; gap: var(--s3); margin-bottom: var(--s4); flex-wrap: wrap; }
.editor-title h2 { font-family: var(--display); font-size: 20px; color: var(--gold2); }
.picker { border: 1px solid var(--line2); border-radius: var(--r-sm); background: var(--sunk); overflow: hidden; }
.picker-head { display: flex; align-items: center; gap: var(--s3); padding: 6px 6px 6px 6px; border-bottom: 1px solid var(--line); }
.picker-head .meta { white-space: nowrap; padding-right: 6px; }
input.rolefilter { border: 0; background: transparent; padding: 6px 8px; box-shadow: none !important; }
.rolebox { max-height: 196px; overflow: auto; padding: 6px; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 2px 8px; }
.roleitem { display: flex; align-items: center; gap: 8px; padding: 6px 8px; cursor: pointer; font-size: 14px; border-radius: 5px; color: var(--text2); }
.roleitem:hover { background: rgba(255, 255, 255, .04); }
.roleitem.on { color: var(--text); background: rgba(212, 175, 55, .07); }
.qlist { display: flex; flex-direction: column; gap: var(--s3); margin-bottom: var(--s4); }
.qedit { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: var(--s3); background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--s3); }
.qedit:focus-within { border-color: var(--line-gold); }
.qedit-side { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.qedit-side .qnum { width: 26px; height: 26px; font-size: 12px; }
.qedit-main { display: flex; flex-direction: column; gap: var(--s2); }
.qedit-main input[type=text] { background: var(--panel); }
.qedit-main input[type=text]:first-child { font-weight: 600; }
.qedit-opts { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.qedit-opts select { width: auto; background-color: var(--panel); padding: 6px 10px; font-size: 13px; }
.qedit-opts .btn { margin-left: auto; }

/* discord panel preview */
.dc-msg { background: #313338; border-radius: 8px; padding: var(--s4); }
.dc-embed { border-left: 4px solid var(--gold); background: #2b2d31; border-radius: 4px; padding: 10px 14px; }
.dc-title { font-weight: 700; color: #f2f3f5; margin-bottom: 4px; }
.dc-desc { color: #dbdee1; font-size: 14px; white-space: pre-wrap; }
.dc-btn { display: inline-block; margin-top: 10px; background: #248046; color: #fff; padding: 6px 16px; border-radius: 4px; font-size: 14px; font-weight: 500; }

/* ---------- login / blocked ---------- */
.center { text-align: center; padding: 64px 20px 80px; display: flex; flex-direction: column; align-items: center; }
.center .hero { width: min(280px, 64vw); border-radius: 50%; filter: drop-shadow(0 0 22px rgba(212, 175, 55, .35)); margin-bottom: var(--s4); }
.center h1 { font-size: 34px; }
.center h1::after { margin-left: auto; margin-right: auto; background-position: center; }
.center p { color: var(--muted); max-width: 460px; margin: var(--s4) auto var(--s5); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2b2f44; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* ===================== community ===================== */
.ico { flex: none; }
.btn.block { width: 100%; }
.btn.discord { background: #5865f2; color: #fff; box-shadow: none; }
.btn.discord:hover { filter: brightness(1.12); }
.btn .ico { margin-right: 2px; }

/* header menus */
.iconbtn { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line2); background: var(--sunk); color: var(--text2); }
.iconbtn:hover, .dd.open .iconbtn { color: var(--gold2); border-color: var(--line-gold); }
.pip { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.acctbtn { display: flex; align-items: center; gap: 8px; background: none; border: 1px solid transparent; border-radius: 99px; padding: 3px 10px 3px 3px; }
.acctbtn:hover, .dd.open .acctbtn { border-color: var(--line2); background: var(--sunk); }
.caret { width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-2px); }
.dd { position: relative; }
.menu { display: none; position: absolute; right: 0; top: calc(100% + 10px); z-index: 40; width: 250px; background: #10131f; border: 1px solid var(--line2); border-radius: var(--r); box-shadow: 0 18px 50px rgba(0, 0, 0, .6); overflow: hidden; }
.menu.wide { width: 340px; }
.dd.open .menu { display: block; animation: fade .14s ease-out; }
.menu-title { padding: 12px 16px 10px; font-family: var(--display); font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--text); border-bottom: 2px solid; border-image: linear-gradient(90deg, var(--gold) 60px, var(--line) 60px) 1; }
.menu-list { max-height: 360px; overflow: auto; padding: 6px; }
.menu-convo { display: flex; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); text-decoration: none; color: var(--text2); background: rgba(255, 255, 255, .02); margin-bottom: 4px; }
.menu-convo:hover { background: rgba(255, 255, 255, .06); }
.menu-convo.unread { background: rgba(212, 175, 55, .1); }
.menu-convo.unread strong { color: var(--gold2); }
.mc-text, .dm-item-text, .wpost-text, .flast-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.mc-text strong, .mc-text .meta, .dm-item-text strong, .dm-item-text .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-text strong { font-size: 14px; }
.menu-foot { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.menu-foot a { color: var(--text2); text-decoration: none; } .menu-foot a:hover { color: var(--gold2); }
.menu-empty { padding: 18px 16px; color: var(--muted); font-size: 14px; display: flex; justify-content: center; }
.menu-head { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.menu-item { display: block; padding: 10px 16px; color: var(--text2); text-decoration: none; font-size: 14px; }
.menu-item:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.menu-item.danger { border-top: 1px solid var(--line); color: var(--muted); } .menu-item.danger:hover { color: var(--bad); }

/* footer */
.foot { border-top: 1px solid var(--line); margin-top: var(--s6); padding: var(--s5) 0; color: var(--muted); font-size: 13px; }
.foot .wrap { display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.foot-links { display: flex; gap: var(--s4); }
.foot a { color: var(--muted); text-decoration: none; } .foot a:hover { color: var(--gold2); }

/* tags + role badges */
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; margin-right: 6px; vertical-align: 1px; background: #2a2f44; color: #d8dbe6; letter-spacing: .2px; }
.tag.pin { background: #3a2f0b; color: var(--gold2); }
.tag.closed { background: #b3202a; color: #fff; }
.tag.lbl-resolved, .tag.lbl-accepted { background: #1d5b37; color: #c9f5da; }
.tag.lbl-in-progress, .tag.lbl-acknowledged { background: #24407e; color: #d2e0ff; }
.tag.lbl-denied, .tag.lbl-not-a-bug { background: #4a2328; color: #f5c7c7; }
.rbadge { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; padding: 2px 8px; border-radius: 4px; }
.rbadge.admin { background: linear-gradient(90deg, var(--red), #8a1219); color: #fff; }
.rbadge.staff { background: var(--gold-grad); color: #1a1405; }
.rbadge.system { background: #2a2f44; color: var(--text2); }
.ulink { color: var(--text2); text-decoration: none; font-weight: 600; }
a.ulink:hover { color: var(--gold2); text-decoration: underline; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: var(--s5); font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--gold2); }
.crumbs .sep { opacity: .5; }
.crumbs + .pagehead { margin-top: var(--s3); }
.avatar.xl { width: 104px; height: 104px; border-width: 3px; border-color: var(--bg); }
.avatar.xl.initials { font-size: 36px; }

/* home */
.hero-band { position: relative; display: flex; align-items: center; gap: var(--s6); margin: var(--s5) 0 var(--s4); padding: var(--s6); border-radius: 16px; overflow: hidden; border: 1px solid var(--line);
  background: radial-gradient(500px 300px at 0% 50%, rgba(200, 32, 43, .22), transparent 70%), radial-gradient(500px 300px at 100% 50%, rgba(31, 79, 214, .26), transparent 70%), linear-gradient(180deg, var(--panel2), var(--panel)); }
.hero-band::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--red), var(--gold) 30%, var(--gold) 70%, var(--blue)); }
.hero-logo { width: 210px; height: 210px; border-radius: 50%; filter: drop-shadow(0 0 26px rgba(212, 175, 55, .35)); flex: none; }
.hero-text h1 { font-size: 42px; }
.eyebrow { margin: 0 0 6px; color: var(--gold); text-transform: uppercase; letter-spacing: 2px; font-size: 12px; font-weight: 700; }
.lead { color: var(--text2); font-size: 16px; max-width: 560px; margin: var(--s3) 0 var(--s5); }
.hero-cta { gap: var(--s3); }
.statstrip { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); margin-bottom: var(--s4); }
.statstrip > div { padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); display: flex; flex-direction: column; align-items: center; }
.statstrip strong { font-family: var(--display); font-size: 26px; color: var(--gold2); line-height: 1.2; }
.statstrip span { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
.depts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); margin-bottom: var(--s4); }
.dept { display: block; padding: var(--s5); border-radius: var(--r); border: 1px solid var(--line); text-decoration: none; color: var(--text); background: var(--panel); position: relative; overflow: hidden; transition: transform .15s, border-color .15s; }
.dept::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; }
.dept.d0::before { background: var(--blue); } .dept.d1::before { background: var(--red); } .dept.d2::before { background: var(--gold); }
.dept:hover { transform: translateY(-2px); border-color: var(--line-gold); }
.dept h3 { margin: 0 0 4px; font-family: var(--display); color: var(--gold2); font-size: 17px; }
.dept p { margin: 0 0 var(--s3); color: var(--muted); font-size: 14px; }
.dept .go { color: var(--gold); font-size: 13px; font-weight: 600; }
.sechead-row { display: flex; justify-content: space-between; align-items: baseline; margin: var(--s6) 0 var(--s3); }
.sechead-row .sechead { margin: 0; }
.sechead-row a { font-size: 13px; color: var(--muted); }
.home-cols { margin-top: 0; }
.announce-head { display: flex; gap: var(--s3); align-items: center; }
.announce-title { font-size: 17px; font-weight: 700; color: var(--text); text-decoration: none; }
.announce-title:hover { color: var(--gold2); }
.announce-body { margin-top: var(--s3) !important; color: var(--text2); font-size: 14px; }

/* forum index */
.forum-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s5); align-items: start; }
.forum-layout > .col { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.sidebar { display: flex; flex-direction: column; gap: var(--s4); }
.fcat { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); }
.fcat-head { padding: 12px var(--s5); background: linear-gradient(90deg, rgba(212, 175, 55, .16), rgba(212, 175, 55, .02)); border-bottom: 1px solid var(--line-gold); }
.fcat-head h2 { font-family: var(--display); font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: var(--gold2); }
.frow { display: grid; grid-template-columns: 44px minmax(0, 1fr) 120px 210px; gap: var(--s4); align-items: center; padding: 14px var(--s5); border-top: 1px solid var(--line); }
.frow:first-of-type { border-top: 0; }
.frow:hover { background: rgba(255, 255, 255, .015); }
.ficon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--gold); background: rgba(212, 175, 55, .08); border: 1px solid var(--line-gold); }
.ficon.priv { color: #8fb4ff; background: var(--info-bg); border-color: var(--info-line); }
.ficon.staff { color: #f2a6a6; background: var(--bad-bg); border-color: var(--bad-line); }
.fname { font-weight: 700; color: var(--text); text-decoration: none; font-size: 15px; }
.fname:hover { color: var(--gold2); }
.fmain .meta { margin: 2px 0 0; }
.fstats { display: flex; gap: var(--s4); text-align: center; }
.fstats > div, .tstats > span { display: flex; flex-direction: column; line-height: 1.3; min-width: 54px; }
.fstats .meta, .tstats .meta { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; }
.flast { display: flex; gap: 10px; align-items: center; min-width: 0; }
.flast-text a { color: var(--text2); text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flast-text a:hover { color: var(--gold2); }
.flast-text .meta { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.widget { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.widget-head { padding: 14px var(--s4) 10px; font-family: var(--display); font-weight: 800; font-size: 14px; letter-spacing: .5px; color: var(--text); border-bottom: 2px solid; border-image: linear-gradient(90deg, var(--line) 70%, var(--gold-dark) 70%) 1; }
.wpad { padding: var(--s4); margin: 0; }
.wforums { display: flex; flex-direction: column; padding: 8px; gap: 3px; }
.wforums a { padding: 7px 10px; border-radius: 6px; background: rgba(255, 255, 255, .03); color: var(--text2); text-decoration: none; font-size: 14px; }
.wforums a:hover { background: rgba(255, 255, 255, .07); color: var(--text); }
.wf-cat { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; padding: 8px 4px 2px; font-weight: 700; }
.wlist { display: flex; flex-direction: column; padding: 8px; gap: 4px; }
.wpost { display: flex; gap: 10px; padding: 8px; border-radius: 6px; text-decoration: none; background: rgba(255, 255, 255, .03); }
.wpost:hover { background: rgba(255, 255, 255, .07); }
.wpost-title { color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wpost .meta { font-size: 12px; }
.wstats { display: grid; grid-template-columns: 1fr auto; gap: 8px var(--s3); padding: var(--s4); margin: 0; font-size: 14px; }
.wstats dt { color: var(--muted); } .wstats dd { margin: 0; text-align: right; font-weight: 600; }

/* thread lists */
.tlist { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); }
.tlist-head { padding: 10px var(--s5); background: var(--sunk); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.trow2 { display: grid; grid-template-columns: 40px minmax(0, 1fr) 140px 130px; gap: var(--s4); align-items: center; padding: 12px var(--s5); border-top: 1px solid var(--line); }
.tlist-head + .trow2 { border-top: 0; }
.trow2.pinned { background: rgba(212, 175, 55, .04); }
.trow2:hover { background: rgba(255, 255, 255, .02); }
.tmain { display: flex; flex-direction: column; min-width: 0; }
.ttitle { color: var(--text); font-weight: 600; text-decoration: none; font-size: 15px; }
.ttitle:hover { color: var(--gold2); }
.tstats { display: flex; gap: var(--s3); text-align: center; }
.tlast { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.35; }
.tlast a { text-decoration: none; } .tlast a:hover { color: var(--gold2); }
.snippet { grid-column: 2 / -1; margin: 0; color: var(--muted); font-size: 13px; }
.pager { display: flex; gap: 4px; flex-wrap: wrap; margin: var(--s4) 0; }
.pg { min-width: 34px; height: 32px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: 6px; border: 1px solid var(--line2); color: var(--text2); text-decoration: none; font-size: 13px; font-weight: 600; }
a.pg:hover { border-color: var(--gold); color: var(--gold2); }
.pg.cur { background: var(--gold-grad); color: #1a1405; border-color: transparent; }
.pg.gap { border: 0; }

/* thread */
.thead2 { margin: var(--s3) 0 var(--s4); }
h1.ttl { font-family: inherit; text-transform: none; letter-spacing: 0; font-size: 26px; background: none; color: var(--text); -webkit-background-clip: border-box; background-clip: border-box; }
h1.ttl::after { display: none; }
h1.ttl .tag { font-size: 13px; vertical-align: 4px; }
.tmeta { margin-top: 6px; }
.modbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px var(--s4); border: 1px dashed var(--line-gold); border-radius: var(--r-sm); background: rgba(212, 175, 55, .04); margin-bottom: var(--s4); }
.modbar-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--gold); font-weight: 800; margin-right: 4px; }
.modbar select { width: auto; padding: 5px 10px; font-size: 13px; }
.posts { display: flex; flex-direction: column; gap: var(--s4); }
.post { display: grid; grid-template-columns: 170px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; scroll-margin-top: 90px; }
.post-author { padding: var(--s5) var(--s4); background: linear-gradient(180deg, var(--panel2), var(--sunk)); border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.pa-name { font-size: 15px; word-break: break-word; }
.pa-stats { display: grid; grid-template-columns: auto auto; gap: 2px 10px; margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.pa-stats dt { text-align: left; } .pa-stats dd { margin: 0; text-align: right; color: var(--text2); }
.post-main { padding: var(--s4) var(--s5); display: flex; flex-direction: column; min-width: 0; }
.post-head { display: flex; justify-content: space-between; padding-bottom: 10px; margin-bottom: var(--s3); border-bottom: 1px solid var(--line); }
.post-head a { text-decoration: none; } .post-head a:hover { color: var(--gold2); }
.post-body { flex: 1; }
.post-actions { display: flex; justify-content: flex-end; gap: 2px; margin-top: var(--s4); }
.edited { margin-top: var(--s3); font-style: italic; }
.rich { color: var(--text); font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.rich p { margin: 0 0 var(--s3); } .rich p:last-child { margin-bottom: 0; }
.rich blockquote { margin: 0 0 var(--s3); padding: 10px 14px; border-left: 3px solid var(--gold-dark); background: var(--sunk); border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--text2); font-size: 14px; }
.rich cite { display: block; font-style: normal; font-weight: 700; color: var(--gold2); font-size: 13px; margin-bottom: 4px; }
.rich code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: var(--sunk); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.rich a { overflow-wrap: anywhere; }
.reply { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: var(--s4); margin-top: var(--s5); padding: var(--s5); border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.join-cta { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s5); }
.composer { border: 1px solid var(--line2); border-radius: var(--r-sm); background: var(--sunk); overflow: hidden; }
.composer:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, .15); }
.composer textarea { border: 0; border-radius: 0; box-shadow: none !important; background: transparent; min-height: 140px; }
.toolbar { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.tb { min-width: 32px; height: 30px; padding: 0 8px; border: 0; border-radius: 5px; background: none; color: var(--text2); font-size: 14px; }
.tb:hover, .tb.on { background: rgba(255, 255, 255, .07); color: var(--gold2); }
.tb.wide { font-size: 13px; font-weight: 600; }
.tb-space { flex: 1; }
.preview { padding: 12px; min-height: 140px; }
.composer-foot { display: flex; justify-content: space-between; gap: var(--s3); padding: 6px 10px; border-top: 1px solid var(--line); }
.composer-foot .meta { font-size: 12px; }

/* modal */
.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .65); backdrop-filter: blur(2px); display: grid; place-items: start center; padding: 8vh 16px 16px; overflow: auto; animation: fade .15s ease-out; }
.modal { width: min(560px, 100%); background: var(--panel); border: 1px solid var(--line2); border-radius: var(--r); overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px var(--s5); background: linear-gradient(90deg, #8f6f14, #d4af37); }
.modal-head h2 { font-family: var(--display); font-size: 16px; text-transform: uppercase; letter-spacing: 1px; color: #1a1405; }
.modal-x { background: none; border: 0; font-size: 24px; line-height: 1; color: #1a1405; opacity: .7; }
.modal-x:hover { opacity: 1; }
.modal-body { padding: var(--s3) var(--s4) var(--s4); max-height: 70vh; overflow: auto; }
.pick-cat { margin-top: var(--s3); }
.pick-cat-name { font-family: var(--display); font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: .6px; padding: 6px 4px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.pick-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 6px; color: var(--text2); text-decoration: none; font-size: 14px; background: rgba(255, 255, 255, .025); margin-top: 3px; }
.pick-row:hover { background: rgba(212, 175, 55, .1); color: var(--text); }
.pick-count { display: flex; flex-direction: column; align-items: center; line-height: 1.2; font-size: 13px; font-weight: 600; }
.pick-count .meta { font-size: 10px; text-transform: uppercase; }

/* members / profile */
.grid.members { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.member { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; text-decoration: none; color: var(--text); }
.member:hover { border-color: var(--line-gold); }
.profile-card { padding: 0; overflow: hidden; margin-top: var(--s5); }
.profile-banner { height: 120px; background: radial-gradient(400px 160px at 15% 0%, rgba(200, 32, 43, .45), transparent 70%), radial-gradient(400px 160px at 85% 0%, rgba(31, 79, 214, .5), transparent 70%), linear-gradient(180deg, #1a1e30, var(--panel2)); border-bottom: 1px solid var(--line-gold); }
.profile-row { display: flex; align-items: flex-end; gap: var(--s4); padding: 0 var(--s5); margin-top: -52px; flex-wrap: wrap; }
.profile-row .profile-main { padding-bottom: 6px; }
h1.pname { font-family: inherit; text-transform: none; font-size: 26px; letter-spacing: 0; background: none; color: var(--text); -webkit-background-clip: border-box; background-clip: border-box; }
h1.pname::after { display: none; }
.profile-card .stats { padding: 0 var(--s5) var(--s5); }
.activity { padding: var(--s3) var(--s5); border-top: 1px solid var(--line); display: flex; flex-direction: column; }
.activity:first-child { border-top: 0; }
.activity a { color: var(--text); font-weight: 600; text-decoration: none; } .activity a:hover { color: var(--gold2); }
.activity p { margin: 4px 0 0; color: var(--text2); font-size: 14px; }

/* direct messages */
.dm-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); min-height: 560px; }
.dm-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; max-height: 72vh; overflow: auto; }
.dm-list-head { display: flex; justify-content: space-between; align-items: center; padding: 12px var(--s4); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); }
.dm-item { display: flex; gap: 10px; padding: 12px var(--s4); border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text2); }
.dm-item:hover { background: rgba(255, 255, 255, .03); }
.dm-item.active { background: rgba(212, 175, 55, .09); box-shadow: inset 3px 0 0 var(--gold); }
.dm-item.unread strong { color: var(--gold2); }
.dm-item.unread strong::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-left: 6px; vertical-align: 2px; }
.dm-pane { display: flex; flex-direction: column; min-width: 0; }
.dm-pane > .empty { margin: auto var(--s5); border: 0; }
.dm-head { display: flex; align-items: center; gap: var(--s3); padding: 12px var(--s5); border-bottom: 1px solid var(--line); }
.dm-head > div { flex: 1; min-width: 0; }
.dm-back { display: none; text-decoration: none; color: var(--text2); font-size: 20px; }
.dm-msgs { flex: 1; overflow: auto; padding: var(--s5); display: flex; flex-direction: column; gap: var(--s3); max-height: 58vh; }
.dm-msg { display: flex; gap: 10px; align-items: flex-end; max-width: 78%; }
.dm-msg.mine { align-self: flex-end; }
.dm-bubble { background: var(--panel2); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 10px 14px; min-width: 0; }
.dm-msg.mine .dm-bubble { background: rgba(212, 175, 55, .12); border-color: var(--line-gold); border-radius: 14px 14px 4px 14px; }
.dm-meta { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.dm-meta strong { color: var(--text2); }
.dm-bubble .rich { font-size: 14px; }
.dm-reply { display: flex; gap: var(--s2); padding: var(--s3) var(--s4); border-top: 1px solid var(--line); align-items: flex-end; }
.dm-reply textarea { min-height: 46px; }
.dm-ro { padding: var(--s3) var(--s5); border-top: 1px solid var(--line); margin: 0; }
.narrow { max-width: 760px; }
.suggest-wrap { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: #10131f; border: 1px solid var(--line2); border-radius: var(--r-sm); padding: 4px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.suggest-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: 0; padding: 8px; border-radius: 5px; color: var(--text2); }
.suggest-item:hover { background: rgba(255, 255, 255, .06); color: var(--text); }

/* auth */
.auth { display: flex; justify-content: center; padding: var(--s6) 0; }
.auth-card { width: min(440px, 100%); background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 14px; padding: var(--s6) var(--s6) var(--s5); text-align: center; box-shadow: 0 30px 70px rgba(0, 0, 0, .45); border-top: 2px solid var(--gold-dark); }
.auth-logo { width: 92px; height: 92px; border-radius: 50%; filter: drop-shadow(0 0 14px rgba(212, 175, 55, .35)); }
.auth-card h1 { font-size: 24px; margin-top: var(--s3); }
.auth-card h1::after { margin: 6px auto 0; background-position: center; width: 200px; background-size: 200px 14px; height: 14px; }
.auth-card .sub { margin: var(--s2) auto var(--s4); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: var(--s4); }
.auth-tabs a { padding: 8px; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.auth-tabs a.active { background: var(--panel2); color: var(--gold2); box-shadow: 0 0 0 1px var(--line-gold); }
.center-hint { margin-top: 8px; }
.or { display: flex; align-items: center; gap: var(--s3); margin: var(--s4) 0; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line2); }
.auth-form { text-align: left; }
.auth-form .field { margin-bottom: var(--s4); }
.auth-form input[type=password] { width: 100%; background: var(--sunk); color: var(--text); border: 1px solid var(--line2); border-radius: var(--r-sm); padding: 10px 12px; }
.auth-form input[type=password]:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, .15); }
.hint.bad { color: var(--bad); }
.meter { height: 4px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.meter span { display: block; height: 100%; width: 0; transition: width .2s, background .2s; background: var(--red); }
.meter[data-lvl="2"] span { background: #e0a526; } .meter[data-lvl="3"] span { background: #9fcf3c; } .meter[data-lvl="4"] span { background: var(--green); }
.agree { margin-bottom: var(--s4); font-size: 14px; color: var(--text2); }
.auth-err { color: var(--bad); font-size: 14px; min-height: 20px; margin-bottom: var(--s2); }
.auth-switch { margin-top: var(--s4); }
.account-grid input[type=password], .panel input[type=password] { width: 100%; background: var(--sunk); color: var(--text); border: 1px solid var(--line2); border-radius: var(--r-sm); padding: 10px 12px; }
.panel input[type=password]:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, .15); }
.linked { margin: 0; color: var(--text2); display: flex; align-items: center; gap: 6px; }
.col { min-width: 0; }
.split > .col { display: flex; flex-direction: column; }

/* application gate */
.gate { display: flex; gap: var(--s5); align-items: center; }
.gate-icon img { width: 84px; height: 84px; border-radius: 50%; }
.gate p { color: var(--text2); margin-top: 6px !important; max-width: 560px; }

/* admin forum editor */
.fadmin-head { flex-direction: row !important; justify-content: space-between; align-items: center; gap: var(--s3); }
input.cat-name { font-weight: 700; font-family: var(--display); color: var(--gold2); max-width: 420px; }
.fadmin .qedit { margin-bottom: var(--s3); }

.fstats { gap: var(--s2); }
@media (max-width: 1180px) {
  .frow { grid-template-columns: 44px minmax(0, 1fr) 120px; }
  .flast { display: none; }
}
@media (max-width: 960px) {
  .forum-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .hero-band { flex-direction: column; text-align: center; padding: var(--s5); gap: var(--s4); }
  .hero-band h1::after { margin-left: auto; margin-right: auto; background-position: center; }
  .hero-logo { width: 140px; height: 140px; }
  .hero-text h1 { font-size: 30px; }
  .hero-cta { justify-content: center; }
  .depts { grid-template-columns: 1fr; }
  .frow { grid-template-columns: 40px minmax(0, 1fr); padding: 12px var(--s4); }
  .fstats { display: none; }
  .trow2 { grid-template-columns: 36px minmax(0, 1fr); padding: 12px var(--s4); }
  .tstats, .tlast { display: none; }
  .post { grid-template-columns: 1fr; }
  .post-author { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); padding: var(--s3) var(--s4); text-align: left; }
  .post-author .avatar.lg { width: 40px; height: 40px; font-size: 14px; }
  .pa-stats { display: none; }
  .post-main { padding: var(--s4); }
  .reply { grid-template-columns: 1fr; padding: var(--s4); }
  .reply > .avatar { display: none; }
  .dm-layout { grid-template-columns: 1fr; }
  .dm-layout.has-convo .dm-list { display: none; }
  .dm-layout:not(.has-convo) .dm-pane { display: none; }
  .dm-back { display: block; }
  .dm-msg { max-width: 92%; }
  .menu.wide { width: min(340px, calc(100vw - 24px)); right: -60px; }
  .auth-card { padding: var(--s5) var(--s4); }
  .gate { flex-direction: column; text-align: center; }
  .profile-row { justify-content: center; text-align: center; }
}

.navdd { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--muted); padding: 8px 12px; border-radius: var(--r-sm); font-weight: 600; font-size: 14px; }
.navdd:hover, .dd.open .navdd { color: var(--text); background: rgba(255, 255, 255, .04); }
.navdd.active { color: var(--gold2); background: rgba(212, 175, 55, .1); }
.menu.left { left: 0; right: auto; width: 200px; }
.menu-item.on { color: var(--gold2); background: rgba(212, 175, 55, .08); }

/* ===================== real estate ===================== */
.segmented a { color: var(--muted); padding: 7px 14px; border-radius: var(--r-sm); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; text-decoration: none; }
.segmented a:hover { color: var(--text); }
.segmented a.active { background: var(--panel2); color: var(--gold2); box-shadow: 0 0 0 1px var(--line-gold); }
.cnt.dark { background: rgba(0, 0, 0, .25); color: #1a1405; margin-left: 6px; }
.rbar { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.rbar .segmented { margin-bottom: 0; }
.rbar-right { flex-wrap: nowrap; }
.rbar-right .searchbox { width: 260px; }
.rbar-right select { width: auto; }
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: var(--s4); }
.rgrid > .empty { grid-column: 1 / -1; }
.rcard { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); text-decoration: none; color: var(--text); transition: transform .15s, border-color .15s, box-shadow .15s; }
.rcard:hover { transform: translateY(-3px); border-color: var(--line-gold); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.rcard.sold { opacity: .7; }
.rcard-img { position: relative; aspect-ratio: 16 / 10; background: var(--sunk); }
.rphoto { width: 100%; height: 100%; object-fit: cover; display: block; }
.rphoto.ph { display: grid; place-items: center; color: var(--line2); background: repeating-linear-gradient(135deg, var(--sunk), var(--sunk) 12px, #0b0d16 12px, #0b0d16 24px); }
.rstatus { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; padding: 3px 9px; border-radius: 4px; }
.rcard-img .rstatus { position: absolute; top: 10px; left: 10px; }
.rstatus.available { background: var(--green); color: #04210f; }
.rstatus.pending { background: #e0a526; color: #241800; }
.rstatus.sold { background: var(--red); color: #fff; }
.rtype { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: rgba(5, 5, 7, .75); color: var(--text2); border: 1px solid var(--line2); }
.rcard-img .rtype { position: absolute; top: 10px; right: 10px; }
.rtype.business { color: #8fb4ff; } .rtype.home { color: var(--gold2); }
.rtype.inline { background: var(--sunk); }
.rcard-body { padding: var(--s4); display: flex; flex-direction: column; gap: 4px; flex: 1; }
.rprice { font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--gold2); }
.rprice.big { font-size: 28px; }
.rcard h3 { margin: 0; font-size: 16px; }
.rloc { display: flex; align-items: center; gap: 4px; }
.rhl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rhl span { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--sunk); border: 1px solid var(--line); color: var(--text2); }
.rmine { margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--info); }
.rdetail { margin-top: var(--s4); }
.gallery { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--sunk); }
.gallery-main { aspect-ratio: 16 / 9; }
.rphoto.big { width: 100%; height: 100%; }
.thumbs { display: flex; gap: 6px; padding: 8px; overflow-x: auto; background: var(--panel); border-top: 1px solid var(--line); }
.thumb { flex: none; width: 92px; height: 60px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: none; opacity: .65; }
.thumb.on, .thumb:hover { border-color: var(--gold); opacity: 1; }
.rhead { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s4); flex-wrap: wrap; margin: var(--s5) 0 var(--s4); }
h1.rtitle { font-family: inherit; text-transform: none; letter-spacing: 0; font-size: 28px; margin-top: 8px; background: none; color: var(--text); -webkit-background-clip: border-box; background-clip: border-box; }
h1.rtitle::after { display: none; }
.rfeatures { list-style: none; padding: 0; margin: 0 0 var(--s4); display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.rfeatures li { padding: 10px 12px 10px 32px; position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 14px; }
.rfeatures li::before { content: ""; position: absolute; left: 13px; top: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); transform: translateY(-50%); }
.buybox { position: sticky; top: 90px; display: flex; flex-direction: column; gap: var(--s3); border-top: 2px solid var(--gold-dark); }
.buybox .field { margin-bottom: 0; }
.buy-head { padding-bottom: var(--s3); border-bottom: 1px solid var(--line); }
.choices { display: flex; flex-direction: column; gap: 6px; }
.choices.row2 { flex-direction: row; flex-wrap: wrap; }
.choices.row2 .choice { flex: 1; min-width: 200px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line2); border-radius: var(--r-sm); cursor: pointer; background: var(--sunk); }
.choice:has(input:checked) { border-color: var(--gold); background: rgba(212, 175, 55, .07); }
.choice input { accent-color: var(--gold); margin-top: 3px; }
.choice > span { display: flex; flex-direction: column; font-size: 14px; }
.fine { font-size: 12px; margin: 0; }
.reqstate { display: flex; flex-direction: column; gap: 6px; }
.reqstate p { margin: 0; }
.wstats.compact { padding: 8px 0 0; }
.badge.r-new { background: #2e2608; color: var(--gold2); border-color: var(--line-gold); }
.badge.r-contacted { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.badge.r-completed { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.badge.r-declined, .badge.r-cancelled { background: #1b1d27; color: #b6bacb; border-color: var(--line2); }
.rreq { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: var(--s4); }
.rreq-img { display: block; border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 4 / 3; }
.rreq-title { font-weight: 700; font-size: 16px; color: var(--text); text-decoration: none; }
.rreq-title:hover { color: var(--gold2); }
.rfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--s2); margin-top: var(--s4); }
.rfacts > div { display: flex; flex-direction: column; padding: 8px 12px; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-sm); }
.rfacts strong { font-size: 14px; overflow-wrap: anywhere; }
.rlrow { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto auto; }
.rl-thumb { width: 88px; height: 58px; border-radius: 6px; overflow: hidden; }
.rl-main { display: flex; flex-direction: column; min-width: 0; }
.rl-main a { color: var(--text); text-decoration: none; } .rl-main a:hover { color: var(--gold2); }
.row2-fields { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.imgprev { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 6px; margin-top: var(--s3); }
.imgprev .rphoto { aspect-ratio: 4 / 3; border-radius: 6px; height: auto; }
@media (max-width: 720px) {
  .rbar-right { flex-wrap: wrap; width: 100%; }
  .rbar-right .searchbox { width: 100%; }
  .rreq { grid-template-columns: 1fr; }
  .rreq-img { aspect-ratio: 16 / 9; }
  .rlrow { grid-template-columns: 64px minmax(0, 1fr); }
  .rl-thumb { width: 64px; height: 44px; }
  .row2-fields { grid-template-columns: 1fr; }
  .buybox { position: static; }
  .rprice.big { font-size: 24px; }
  .menu.left { position: fixed; top: 112px; left: 12px; right: 12px; width: auto; }
}

@media (max-width: 460px) { .brand span { display: none; } }

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  .wrap { padding: 0 var(--s4); }
  header.top .wrap { gap: var(--s2) var(--s3); }
  nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .user { margin-left: auto; }
  .uname { display: none; }
  .pagehead { margin-top: var(--s5); }
  .pagehead-aside { flex-basis: 100%; }
  h1 { font-size: 23px; }
  .card, .panel-body { padding: var(--s4); }
  .panel-head { padding: var(--s3) var(--s4); }
  .qblock { grid-template-columns: 1fr; gap: var(--s2); padding: var(--s4); }
  .actionbar { flex-direction: column; align-items: stretch; }
  .headright { flex-direction: row; align-items: center; }
}
