* { box-sizing: border-box; }
body {
  margin: 0;
  background: #14161c;
  color: #e8e8ec;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
.wrap {
  max-width: 480px;
  margin: 48px auto;
  padding: 0 20px;
}
/* Real widen, 2026-11-18, Boss's direct ask from a real desktop screenshot:
   "the website don't use the whole page... banner img should be closer to
   full width." 960px left large empty gutters on either side on a real
   desktop monitor. Bumped generously without going fully edge-to-edge -
   body text (About Us paragraphs etc.) still reads better capped than
   stretched the full width of an ultrawide screen. */
.wrap.wide { max-width: 1400px; }
/* Breaks a page out of the centered/capped column entirely, so a sidebar
   inside it can be position:fixed flush against the real viewport edge
   (like the Trading Dashboard's) instead of sticky-within-a-centered-
   column, which left visible dead space and wasn't a true lock. */
.wrap.full-bleed { max-width: none; margin: 0; padding: 0; }

.tabbar {
  background: #1a1c24;
  border-bottom: 1px solid #2a2e3a;
  position: sticky;
  top: 0;
  z-index: 10;
}
/* Real fix, same night: the nav bar's own inner content was ALSO capped
   at 960px (same gutter problem as .wrap.wide, independent cap) - Boss's
   direct ask: "profile img should be all the way to the right and the
   nav pushed all the way left." Removed the cap entirely so the brand
   logo and nav links sit at the true left edge and the account menu/Join
   Discord sit at the true right edge on any desktop width, with side
   padding only (no centered column) so it doesn't look flush/cramped
   against the literal browser edge. */
.tabbar-inner {
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 56px;
}
.tabbar .brand {
  font-weight: 700;
  color: #e8e8ec;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  text-decoration: none;
}
.brand-logo {
  height: 38px;
  width: auto;
  display: block;
  border-radius: 50%;
}
.tabbar .tabs {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex: 1;
  gap: 20px;
  margin: 0;
}
.tabbar .tab {
  color: #a9adba;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.tabbar .tab:hover { color: #e8e8ec; }
.tabbar .tab.active {
  color: #e8e8ec;
  border-bottom-color: #5865f2;
}
.tabbar .tab-discord { margin-left: auto; }

/* Real fix, 2026-11-15 - Boss's direct ask: the account avatar should
   never get swept into the hamburger's collapsed stack on mobile - it
   stays pinned on the right at all times, a separate element from the
   collapsible NAV links, same as it already visually sat on desktop. */
.auth-slot { margin-left: auto; display: flex; align-items: center; }

/* Real mobile nav, built 2026-11-15 - Boss's direct ask: the nav never had
   a breakpoint at all, so on a narrow screen it just squeezed every tab
   into one shrinking row instead of switching to a stacked hamburger
   menu. Checkbox-hack toggle (no JS needed) - the hidden checkbox's
   :checked state is read by the CSS below via a sibling selector, same
   no-JS philosophy as the account dropdown's own :hover/:focus-within. */
.nav-toggle-checkbox { display: none; }
.nav-toggle-btn {
  display: none;
  padding: 4px 8px;
  font-size: 1.6rem;
  line-height: 1;
  color: #e8e8ec;
  cursor: pointer;
}

@media (max-width: 760px) {
  .nav-toggle-btn { display: block; }
  .tabbar .tabs {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: #1a1c24;
    border-bottom: 1px solid #2a2e3a;
    padding: 8px 20px 16px;
  }
  .nav-toggle-checkbox:checked ~ .tabs { display: flex; }
  .tabbar .tab, .tabbar .tab-discord {
    margin-left: 0;
    padding: 10px 0;
    border-bottom: 1px solid #2a2e3a;
  }
}

/* Real avatar + dropdown account menu, Boss's direct ask - replaces the
   plain "Log out" text link once logged in, same pattern as any modern
   app's top-right account menu. Hover-driven (no JS needed); :focus-within
   keeps it reachable by keyboard too. */
.account-menu {
  position: relative;
  display: flex;
  align-items: center;
}
.account-trigger {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: block;
  border-radius: 50%;
  transition: box-shadow 0.15s ease;
}
.account-trigger:hover, .account-menu:focus-within .account-trigger {
  box-shadow: 0 0 0 2px #5865f2;
}
.account-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
}
.account-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 170px;
  background: #1c1f28;
  border: 1px solid #2a2e3a;
  border-radius: 10px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 20;
}
.account-menu:hover .account-dropdown,
.account-menu:focus-within .account-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.account-dropdown a {
  color: #cfd2da;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 8px 10px;
  border-radius: 6px;
}
.account-dropdown a:hover { background: #2a2e3a; color: #e8e8ec; }

.hero {
  margin: -1px -20px 0;
}
/* Real fix, 2026-11-15 - Boss's direct ask: a hard 320px cap on .hero was
   cropping the bottom of the real banner (1942x809, ~2.4:1) at the page's
   actual rendered width (~960px wide .wrap.wide, which needs ~400px tall
   to show the full image). Removed the cap instead of guessing a new fixed
   number - this way it always shows in full regardless of viewport width
   or a future banner swap with a different aspect ratio. */
.hero-banner { width: 100%; display: block; }
.hero-content { text-align: center; margin: 24px 0 8px; }
.hero-content .logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 50%;
  background: #000;
  margin-bottom: 8px;
}
.hero-content h1 { margin-bottom: 2px; }
.tagline {
  font-size: 1.1rem;
  color: #cfd2da;
  margin-top: 0;
}
.steps {
  color: #b7bac4;
  line-height: 1.7;
  padding-left: 22px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin: 16px 0 32px;
}
.team-card {
  background: #1c1f28;
  border: 1px solid #2a2e3a;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}
.team-card .avatar {
  width: 88px;
  height: 88px;
  margin: 0 auto 10px;
}
.team-card h3 { margin: 0 0 2px; }
.team-card .title {
  color: #8ab4f8;
  font-size: 0.85rem;
  margin: 0 0 10px;
}
.team-card p.bio {
  color: #b7bac4;
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.5;
}
.team-grid.board .team-card { padding: 16px; }
/* Real fix, Boss's ask: with only 2 owners, the grid's 3rd column sat
   empty and the pair looked shoved left instead of centered. Switch this
   specific grid to flex so the real card count centers as a group. */
.team-grid.owners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.team-grid.owners .team-card { flex: 0 1 300px; }

.shop-links { display: flex; gap: 12px; margin: 12px 0 32px; }

.site-footer {
  border-top: 1px solid #2a2e3a;
  margin-top: 48px;
  padding: 24px 20px;
}
/* shell-footer (2026-11-18, Boss's direct call-out from a real photo) -
   on a fullBleed shell page (Staff Panel, Department Panel, Games) the
   footer's own independently-centered 960px column could land partly
   underneath the left sidebar's column once scrolled down. Nudges it
   right by that sidebar's real width so it clears instead, desktop only
   - on mobile the sidebar stacks above the content as a single column,
   so the footer needs no extra indent there. */
@media (min-width: 821px) {
  .site-footer.shell-footer { padding-left: var(--shell-footer-indent, 20px); }
}
.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}
.footer-links {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 10px;
}
.footer-links a {
  color: #8ab4f8;
  text-decoration: none;
  font-size: 0.85rem;
}
.footer-links a:hover { color: #e8e8ec; }
.footer-tagline {
  color: #6b6f7a;
  font-size: 0.8rem;
  margin: 0;
}

.q-block {
  padding: 14px 0;
  border-bottom: 1px solid #2a2e3a;
}
.q-block:first-of-type { border-top: 1px solid #2a2e3a; }
.q-number {
  color: #8ab4f8;
  font-weight: 600;
  margin-right: 4px;
}
.q-hint {
  color: #8f939e;
  font-size: 0.8rem;
  font-weight: 400;
}
.q-block-error { background: rgba(204, 0, 0, 0.08); }
.q-error {
  color: #ff6b6b;
  font-size: 0.85rem;
  margin: 4px 0;
}

.answer-block {
  padding: 12px 14px;
  margin: 10px 0;
  border-radius: 8px;
  border: 1px solid #2a2e3a;
  background: #1c1f28;
}
.answer-block.answer-correct {
  background: rgba(58, 170, 58, 0.12);
  border-color: #3a3;
}
.answer-block.answer-wrong {
  background: rgba(204, 0, 0, 0.12);
  border-color: #c00;
}
h1 { margin: 8px 0 4px; }
h2 { margin-top: 28px; font-size: 1rem; color: #a9adba; }

/* Boxed, livelier home-page sections, Boss's direct ask - same dark-card
   language as .team-card/.card elsewhere on the site, not a new look. */
.home-section {
  background: #1c1f28;
  border: 1px solid #2a2e3a;
  border-left: 4px solid #5865f2;
  border-radius: 12px;
  padding: 24px 28px;
  margin: 24px 0;
}
.home-section h2 {
  margin-top: 0;
  font-size: 1.3rem;
  color: #e8e8ec;
  letter-spacing: normal;
  text-transform: none;
}
/* Pending applications collapse by default, open on click - real fix,
   2026-11-15, Boss's direct ask ("not already expanded... click on it").
   Plain <details>/<summary>, no JS needed. */
details.home-section summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  color: #e8e8ec;
  padding: 2px 0;
}
details.home-section[open] summary { margin-bottom: 12px; border-bottom: 1px solid #2a2e3a; padding-bottom: 12px; }

/* A department's own real badge logo, built 2026-11-15 - shown above the
   page heading on its own department page (the smaller version lives in
   the Departments listing's .card-img instead). */
.dept-logo { display: block; max-width: 220px; height: auto; margin: 0 auto 16px; }

/* A real running log inside one block - built 2026-11-15 for the
   Whitelist Review decision history and the Department Panel's own
   activity log, Boss's direct ask ("a scroll log or a list, not a card
   per entry"). Scrolls instead of growing the page forever. */
.dept-log { padding: 8px 28px; }
.dept-log ol { margin: 0; padding-left: 1.4em; max-height: 420px; overflow-y: auto; }
.dept-log li { padding: 10px 0; border-bottom: 1px solid #2a2e3a; }
.dept-log li:last-child { border-bottom: none; }
.dept-log li a { color: #e8e8ec; font-weight: 600; text-decoration: none; }
.dept-log li a:hover { color: #5865f2; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.feature-card {
  background: #14161c;
  border: 1px solid #2a2e3a;
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.feature-card:hover { transform: translateY(-2px); border-color: #5865f2; }
.feature-icon { font-size: 1.8rem; margin-bottom: 8px; }
/* Real color fix, 2026-11-18, Boss's direct ask - star ratings were
   plain unstyled text before; gold/yellow is the conventional
   star-rating color. */
.stars { color: #f5c518; }
.feature-card h3 { margin: 0 0 6px; font-size: 0.95rem; color: #e8e8ec; }
.feature-card p { font-size: 0.85rem; margin: 0; }
/* A feature-card can also be a real link (e.g. the Games "More" section) -
   same card, just needs its anchor-ness neutralized. */
a.feature-card { display: block; text-decoration: none; color: inherit; }
/* Big bold live count on a feature-card (Staff Panel, built 2026-11-14) -
   a card with nothing meaningful to count (member lookup, BI dashboard)
   just omits this element rather than showing a fake number. */
.stat-number { font-size: 2rem; font-weight: 700; color: #5865f2; margin: 6px 0; }

/* Staff Panel sidebar shell (2026-11-18) - modeled on the Custom Trading
   Dashboard's own left-nav layout, same real color palette as the rest of
   this file. */
/* Edge-locked sidebar (2026-11-18, revised a third time same night).
   Real history: position:fixed caused a header-gap + footer-overlap bug
   -> reverted to position:sticky inside a real flex row with
   align-items:stretch (so the sidebar's box - and its border-right
   divider - would visually run the full length of tall content, not
   just one screen) -> that caused a DIFFERENT bug: Boss reported the
   sidebar scrolling away with the page instead of staying put, root-
   caused to align-items:stretch leaving position:sticky no slack to
   work with -> fixed by decoupling the divider (a ::before pseudo-
   element) from the sidebar itself (align-self: flex-start) -> Boss then
   asked directly for something stronger than sticky: "should not scroll
   with the rest of the page it's fixed. It should have its own scrolling
   ability separate." Real fix this time: genuine position:fixed, with
   the two bugs that killed it the first time actually closed instead of
   avoided - the header-gap bug (guessed 56px, real height measured live
   as 57px) is fixed by using the real measured value, and the footer-
   overlap bug (fixed spans the full viewport forever, past the real
   page's actual content) is fixed by giving the shell-page footer
   (.site-footer.shell-footer, see below) a solid background and a
   higher z-index than the sidebar, so once you scroll far enough for the
   footer to reach the bottom of the screen, it visually covers the
   sidebar's lower portion instead of the sidebar bleeding through it.
   overflow-y: auto on the sidebar itself is the "own scrolling ability
   separate" part - currently moot at ~11 nav items but means a longer
   nav list scrolls inside the sidebar, never the sidebar itself moving. */
.panel-shell { position: relative; display: flex; padding: 20px 20px 20px 0; min-height: 0; box-sizing: border-box; }
.panel-shell::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 240px;
  width: 1px;
  background: #2a2e3a;
  pointer-events: none;
}
.panel-sidebar {
  /* display/margin-top reset, found live via Boss's report that the
     sidebar sat 20px lower than the header instead of flush against it
     (measured: top 77px instead of the 57px this rule actually sets) -
     root cause confirmed by walking every stylesheet rule that matches
     this element: a generic `nav { display: flex; margin-top: 20px; }`
     rule further down this file (meant for a plain vertical link list
     elsewhere) also matches THIS element because it's a real <nav> tag
     (`<nav class="panel-sidebar">`), and this rule never overrode either
     property. Reset both explicitly instead of touching the generic
     rule, which other real <nav> elements on the site still rely on. */
  display: block;
  margin-top: 0;
  position: fixed;
  top: 57px;
  left: 0;
  bottom: 0;
  width: 240px;
  background: #14161c;
  padding: 14px;
  box-sizing: border-box;
  overflow-y: auto;
  z-index: 5;
}
.panel-sidebar-head { margin-bottom: 10px; }
.panel-sidebar-head .tier { margin: 0; font-size: 0.8rem; }

/* Sidebar visual redesign, 2026-11-25, Boss's direct ask - matches the
   approved Claude Design mockup (Dashboard-Owner.dc.html's `.sb-*`
   classes) layered on top of the existing panel-nav-item/panel-sidebar
   markup panel-shell.js depends on, so none of its click/collapse/search
   JS needed to change. Per-section collapse/expand from the mockup is
   deliberately NOT built - sections stay always-expanded here, a real
   scope cut flagged to Boss rather than silently dropped. */
.sb-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: #1b1d25;
  border: 1px solid #262935;
  margin-bottom: 10px;
}
.sb-avatar {
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  box-sizing: border-box;
  border-radius: 50%;
  background: #2a3050;
  border: 2px solid #8f939e;
  color: #e8e8ec;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
}
.sb-online-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  box-sizing: border-box;
  border-radius: 50%;
  background: #0aac23;
  border: 2px solid #1b1d25;
}
.sb-profile-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sb-name {
  margin: 0;
  font-weight: 600;
  font-size: 0.85rem;
  color: #e8e8ec;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sb-profile-text .tier { margin: 0; }
.sb-tier-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.sb-search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #1c1f28;
  border: 1px solid #2a2e3a;
  border-radius: 8px;
  padding: 0 10px;
  margin-bottom: 14px;
}
.sb-search input {
  background: transparent;
  border: 0;
  padding: 8px 0;
}
.sb-search-icon { font-size: 0.8rem; opacity: 0.6; }
.sb-sec { padding-top: 10px; border-top: 1px solid #20222b; }
.sb-sec:first-of-type { padding-top: 0; border-top: none; }
.sb-head { display: flex; align-items: center; gap: 8px; }
.sb-dot { width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0; }
.sb-item.panel-nav-item { border-radius: 10px; gap: 10px; }
.sb-tile {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
  transition: transform 0.1s ease;
}
.sb-item:hover .sb-tile { transform: scale(1.06); }
.sb-item.active .sb-tile { background: #5865f2 !important; color: #fff !important; }
.sb-count.zero { background: transparent !important; color: #6f7380 !important; font-weight: 500; }
@media (min-width: 821px) {
  .panel-sidebar.collapsed .sb-profile { justify-content: center; padding: 8px 0; background: transparent; border-color: transparent; }
  .panel-sidebar.collapsed .sb-search { display: none; }
}

/* Mobile collapse toggle - hidden entirely on desktop, same checkbox-hack
   (no JS) technique already used for the main top-nav hamburger. */
.panel-nav-toggle-checkbox { display: none; }
.panel-nav-toggle-btn { display: none; }
.panel-search { margin-bottom: 14px; }
.panel-search input {
  width: 100%;
  box-sizing: border-box;
  background: #1c1f28;
  border: 1px solid #2a2e3a;
  border-radius: 6px;
  color: #e8e8ec;
  padding: 8px 10px;
  font-size: 0.85rem;
}
.panel-nav-list { display: flex; flex-direction: column; }
/* Real sections, 2026-11-19, Boss's direct ask - group the flat nav list
   (10-16 items depending on tier) under real headers with dividers
   between them, same visual language as the divider already used between
   the main nav and secondary links on the real Trading Dashboard
   reference this whole sidebar was modeled on. */
.panel-nav-section { display: flex; flex-direction: column; gap: 2px; }
.panel-nav-divider { border: none; border-top: 1px solid #2a2e3a; margin: 12px 0; }
.panel-nav-section-label {
  margin: 0 0 4px;
  padding: 0 10px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6f7380;
}
.panel-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #c7c9d1;
  text-decoration: none;
  font-size: 0.88rem;
  transition: background 0.1s ease;
}
.panel-nav-item:hover { background: #1c1f28; }
.panel-nav-item.active { background: #5865f21a; color: #e8e8ec; border: 1px solid #5865f266; }
.panel-nav-icon { font-size: 1rem; }
.panel-nav-text { flex: 1; }
.panel-nav-badge {
  background: #2a2e3a;
  color: #9a9ca5;
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 0.75rem;
  font-weight: 600;
}
.panel-nav-badge.active { background: #5865f2; color: #fff; }
.panel-content {
  /* Real margin-left, replacing the old flex-gap spacing - .panel-sidebar
     is position:fixed now (out of flex flow entirely), so this is what
     actually reserves its 240px instead of flex doing it automatically.
     240px sidebar + the old 20px gap. The min-height sticky-slack hack
     this used to need is gone - a fixed sidebar doesn't care how tall
     the content next to it is.
     Real fix, 2026-11-19, Boss caught it live from a real screenshot: a
     huge empty gap sat to the right of every Staff Panel page, content
     "stuck to the left towards the sidebar." Root cause: .panel-content
     is .panel-shell's only remaining flex child (the sidebar left the
     flex flow when it went position:fixed) - a flex item with no flex-
     grow set defaults to shrinking to its own content's natural width
     instead of filling the row, so it never used the real available
     space at all. flex: 1 is what actually stretches it. */
  flex: 1;
  margin-left: 260px;
  min-width: 0;
  background: #14161c;
  border: 1px solid #2a2e3a;
  border-radius: 10px;
  padding: 20px;
  box-sizing: border-box;
}
.panel-content.panel-loading { opacity: 0.5; }

/* Desktop icon-rail collapse (2026-11-18, matching the real Trading
   Dashboard reference Boss pointed at directly - it doesn't fully hide
   the sidebar, it narrows to just the icons, with a small round arrow
   button docked right at the live boundary in both states). The button
   is a child of .panel-sidebar itself, positioned straddling its own
   right edge (`right: -14px`) - position:fixed still establishes a
   containing block for an absolutely-positioned child, so the button
   still rides along with the sidebar's width with zero JS position
   math. .panel-content no longer absorbs the freed space on its own
   (that was a flex-item trick, moot now the sidebar's fixed) - its own
   margin-left is toggled to match via .panel-shell.sidebar-collapsed
   below instead. */
.panel-collapse-btn {
  display: none;
  position: absolute;
  top: 70px;
  right: -14px;
  z-index: 6;
  width: 26px;
  height: 26px;
  padding: 0;
  margin-top: 0;
  border-radius: 50%;
  background: #1c1f28;
  border: 1px solid #2a2e3a;
  color: #c7c9d1;
  font-size: 0.7rem;
  cursor: pointer;
}
@media (min-width: 821px) {
  .panel-sidebar { transition: flex-basis 0.12s ease, width 0.12s ease; }
  .panel-collapse-btn { display: block; }
  .panel-sidebar.collapsed {
    width: 56px;
    padding-left: 8px;
    padding-right: 8px;
    overflow: visible;
  }
  .panel-sidebar.collapsed .panel-sidebar-head,
  .panel-sidebar.collapsed .panel-search,
  .panel-sidebar.collapsed .panel-nav-text,
  .panel-sidebar.collapsed .panel-nav-badge,
  .panel-sidebar.collapsed .panel-nav-section-label { display: none; }
  .panel-sidebar.collapsed .panel-nav-item { justify-content: center; padding: 10px 0; }
  /* The section dividers stay visible even collapsed to icons - still a
     real, useful grouping cue with no label text to make room for. */
  .panel-sidebar.collapsed .panel-nav-divider { margin: 8px 0; }
  /* Divider line tracks the collapsed width - it's a ::before on
     .panel-shell (see above), not on the sidebar itself, so it needs its
     own class toggle to follow .panel-sidebar.collapsed. .panel-content's
     margin-left needs the same tracking now the sidebar is fixed (not a
     flex item absorbing/freeing space on its own anymore). */
  .panel-shell.sidebar-collapsed::before { left: 56px; }
  .panel-shell.sidebar-collapsed .panel-content { margin-left: 76px; }
}
@media (max-width: 820px) {
  .panel-shell { display: block; padding: 16px; min-height: 0; }
  .panel-shell::before { display: none; }
  .panel-sidebar { width: 100%; box-sizing: border-box; position: static; top: auto; bottom: auto; max-height: none; overflow-y: visible; border: 1px solid #2a2e3a; border-radius: 10px; }
  .panel-content { min-height: 0; margin-left: 0; }
  /* Collapsed by default on mobile - otherwise the full 10+ item section
     list pushes real content below the fold on every load. Tap "Sections"
     to expand, same collapsible pattern as the main top-nav hamburger. */
  .panel-nav-toggle-btn {
    display: block;
    margin-top: 8px;
    padding: 8px 12px;
    background: #1c1f28;
    border: 1px solid #2a2e3a;
    border-radius: 6px;
    color: #e8e8ec;
    font-size: 0.85rem;
    cursor: pointer;
    text-align: center;
  }
  .panel-sidebar-collapsible { display: none; margin-top: 12px; }
  .panel-nav-toggle-checkbox:checked ~ .panel-sidebar-collapsible { display: block; }
}

/* Account page (rebuilt 2026-11-14, Boss's direct ask - a real profile
   header + stat tiles instead of a bare settings form). */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 20px 0 28px;
}
.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid #5865f2;
  object-fit: cover;
}
.profile-hero h1 { margin: 0 0 8px; }
.tier-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
/* Real department roster redesign, 2026-11-15 - Boss's direct ask: the
   old bare <table> "looks like crap." Same dark-card row language as
   .dept-log, one row per member instead of a plain table. */
.roster-list { padding: 4px 0; }
.roster-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid #2a2e3a;
  flex-wrap: wrap;
}
.roster-row:last-child { border-bottom: none; }
.roster-member { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 160px; }
.roster-member .avatar-sm { width: 36px; height: 36px; }
.roster-name { font-weight: 600; color: #e8e8ec; }
.roster-rank {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  border: 1px solid #383c48;
  background: #14161c;
  font-size: 0.8rem;
  color: #a9adba;
}
.roster-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.roster-actions form { margin: 0; display: flex; align-items: center; gap: 6px; }
.roster-actions select { margin-top: 0; width: auto; }
.roster-actions .btn-danger { background: #3a2126; color: #e8a0a6; }
.roster-actions .btn-danger:hover { background: #4a262c; }
.roster-actions button { margin-top: 0; padding: 8px 14px; font-size: 0.85rem; }

.profile-stats { margin-bottom: 28px; }
.profile-sections { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
/* A feature-card holding a real form reads better left-aligned than the
   centered default every other feature-card uses. */
.profile-form-card { text-align: left; }
.profile-form-card h3 { margin-top: 0; }
.social-inputs { display: flex; flex-direction: column; gap: 10px; }

.join-steps {
  list-style: none;
  counter-reset: join-step;
  padding: 0;
  margin: 20px 0;
}
.join-steps li {
  counter-increment: join-step;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}
.join-steps li::before {
  content: counter(join-step);
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #5865f2;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.join-steps li span { color: #b7bac4; line-height: 1.5; padding-top: 3px; }
p { color: #b7bac4; line-height: 1.5; }
.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: block;
}
.tier {
  display: inline-block;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  background: #2a2e3a;
  padding: 4px 10px;
  border-radius: 999px;
}
.btn, button {
  display: inline-block;
  background: #5865f2;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  margin-top: 12px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}
nav a {
  color: #8ab4f8;
  text-decoration: none;
}
form { margin-top: 12px; }
label {
  display: block;
  margin: 12px 0;
  font-size: 0.9rem;
  color: #cfd2da;
}
label.checkbox { display: flex; align-items: center; gap: 8px; }
/* Explicit inclusion list, not a :not() exclusion — an exclusion-based
   selector here previously also matched type="radio" (radio isn't
   checkbox either), stretching every radio button to a full-width block
   and pushing its circle glyph off to the right, disconnected from its
   option text (found by screenshot 2026-09-13). List every real text-like
   input type this app actually uses instead of guessing what to exclude. */
input[type="text"], input[type="email"], input[type="number"], input[type="file"],
input:not([type]), select, textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #383c48;
  background: #1c1f28;
  color: #e8e8ec;
  font-family: inherit;
  font-size: 1rem;
  box-sizing: border-box;
}
label.choice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: normal;
  margin: 8px 0;
}
label.choice input[type="radio"] {
  width: auto;
  margin: 0;
  flex-shrink: 0;
}
.choice-group { margin-top: 4px; }
textarea {
  min-height: 110px;
  resize: vertical;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 16px 0 32px;
}
.card {
  background: #1c1f28;
  border: 1px solid #2a2e3a;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-2px); border-color: #5865f2; }
.card-img {
  width: 100%;
  aspect-ratio: 1199 / 1312;
  object-fit: contain;
  display: block;
  background: #14161c;
}
.card-img.placeholder {
  background: linear-gradient(135deg, #2a2e3a, #1c1f28);
}
.card-body { padding: 14px 16px 16px; }
.card-body h3 { margin: 0 0 6px; font-size: 1.05rem; }
.card-desc {
  font-size: 0.85rem;
  min-height: 1.2em;
  margin: 0 0 10px;
}
.card .price {
  font-weight: 600;
  color: #e8e8ec;
  margin: 0 0 10px;
}
.card form { margin: 0; }
/* A card can also be a real link (the Departments listing, built
2026-11-15) - same anchor-neutralizing pattern already used for
a.feature-card. */
a.card { text-decoration: none; color: inherit; }
a.card .card-body p { color: #a9adba; }
.card button {
  width: 100%;
  margin-top: 0;
  padding: 8px 0;
}

/* Real fix, 2026-11-18, Boss caught it live on his phone - "all this
   scrolling side to side of the whole page." Confirmed: an unstyled
   8-column table rendered over 1100px wide inside a 390px viewport, and
   with no containment at all, the WHOLE PAGE stretched to fit it instead
   of just the table scrolling within its own box. display:block on the
   outer <table> turns it into a normal block-level scroll container
   while its real <tr>/<td> children still lay out with the browser's
   native table algorithm (that comes from their own default display
   values, not the ancestor's) - so it still reads as a real table, it
   just scrolls on its own now instead of taking the page with it. Still
   used by the Board+ Staff Activity dashboard and other admin tables -
   the Disciplinary Tracker moved to a real card grid instead, below. */
/* Shared staff-panel page template system, 2026-11-26 - Boss's approved
   Claude Design templates (List-Dense, List-Thumbnails, Review-Full,
   Review-Light, Form-Records, Member-Profile), posted to #design-prompts.
   One shared set of classes every redesigned admin page reuses (via
   page-chrome.js's render helpers) instead of each page inventing its own
   button/badge/row styling like the pre-2026-11-26 pages did. Exact hex
   values and structure pulled straight from the approved mockups. */
.tpl-btn { height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid #2E3240; background: #20222C; color: #E9EAF0; font: inherit; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; white-space: nowrap; text-decoration: none; box-sizing: border-box; }
.tpl-btn:hover:not(:disabled) { background: #272A35; border-color: #3A3F4E; color: #FFFFFF; }
.tpl-btn:disabled { opacity: .45; cursor: not-allowed; }
.tpl-btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.tpl-btn.primary { background: #5865F2; border-color: #5865F2; color: #FFFFFF; }
.tpl-btn.primary:hover:not(:disabled) { background: #6A76F5; border-color: #6A76F5; }
.tpl-btn.approve { background: #1E8A3A; border-color: #1E8A3A; color: #FFFFFF; }
.tpl-btn.approve:hover:not(:disabled) { background: #23A045; border-color: #23A045; }
.tpl-btn.deny { background: #C43C42; border-color: #C43C42; color: #FFFFFF; }
.tpl-btn.deny:hover:not(:disabled) { background: #D4474D; border-color: #D4474D; }
.tpl-btn.escalate { background: rgba(197,138,249,.1); border-color: rgba(197,138,249,.45); color: #D9B4FB; }
.tpl-btn.escalate:hover:not(:disabled) { background: rgba(197,138,249,.18); border-color: #C58AF9; color: #FFFFFF; }
.tpl-icon-btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid #2A2D38; background: #1B1D25; color: #B8BDCA; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.tpl-icon-btn:hover:not(:disabled) { background: #262935; color: #FFFFFF; border-color: #3A3F4E; }
.tpl-icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.tpl-icon-btn.danger:hover:not(:disabled) { background: rgba(224,90,90,.14); color: #F08A8A; border-color: rgba(224,90,90,.5); }
.tpl-lrow { transition: background .12s, border-color .12s; display: grid; align-items: center; gap: 16px; padding: 10px 14px; border-radius: 12px; background: #1E2029; border: 1px solid #262935; }
.tpl-lrow:hover { background: #1F2129; border-color: #343846; }
.tpl-row-link { color: #E9EAF0; text-decoration: none; font-weight: 600; }
.tpl-row-link:hover { color: #B3BAFF; text-decoration: underline; }
.tpl-field { display: flex; align-items: center; gap: 8px; height: 38px; border-radius: 10px; border: 1px solid #2E3240; background: #1B1D25; padding: 0 12px; box-sizing: border-box; }
.tpl-field:focus-within { border-color: #5865F2; box-shadow: 0 0 0 3px rgba(88,101,242,.2); }
.tpl-field input, .tpl-field select, .tpl-field textarea { flex: 1; min-width: 0; border: 0; background: transparent; color: #E9EAF0; font: inherit; font-size: 14px; }
.tpl-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: #1B1D25; border: 1px solid #2A2D38; }
.tpl-seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: #9CA1B0; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.tpl-seg button.is-active { background: #5865F2; color: #FFFFFF; }
.tpl-crumb { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.tpl-crumb-dot { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
.tpl-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 4px; }
.tpl-header h1 { margin: 6px 0 0; font-family: 'Lexend', Inter, sans-serif; font-size: 32px; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; color: #e8e8ec; }
.tpl-header p { margin: 4px 0 0; color: #9CA1B0; font-size: 15px; }
.tpl-tiles { display: flex; flex-wrap: wrap; gap: 14px; margin: 16px 0; }
.tpl-tile { flex: 1 1 180px; min-width: 0; box-sizing: border-box; background: #1B1D25; border: 1px solid #262935; border-radius: 14px; padding: 14px 18px; display: flex; align-items: center; gap: 14px; }
.tpl-tile-bar { width: 4px; align-self: stretch; border-radius: 4px; flex-shrink: 0; }
.tpl-tile-value { font-family: 'Lexend', sans-serif; font-size: 26px; line-height: 1.15; font-weight: 600; font-variant-numeric: tabular-nums; display: block; color: #e8e8ec; }
.tpl-tile-label { font-size: 13px; color: #9CA1B0; }
.tpl-section { background: #1B1D25; border: 1px solid #262935; border-radius: 16px; padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.tpl-section h2 { margin: 0; font-family: 'Lexend', sans-serif; font-size: 16px; font-weight: 600; color: #e8e8ec; }
.tpl-section-sub { font-size: 13px; color: #9CA1B0; }
.tpl-pill { display: inline-flex; align-items: center; gap: 8px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tpl-pill-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.tpl-rank-badge { padding: 1px 7px; border-radius: 6px; font-size: 10px; font-weight: 700; letter-spacing: .05em; }
.tpl-empty { padding: 28px; border-radius: 12px; border: 1px dashed #2E3240; color: #9CA1B0; text-align: center; font-size: 14px; }
details.tpl-section > summary { list-style: none; }
details.tpl-section > summary::-webkit-details-marker { display: none; }
details.tpl-section > summary::marker { content: ''; }

@media (max-width: 760px) {
  .tpl-lrow { grid-template-columns: 1fr !important; gap: 6px !important; }
  .tpl-lrow > * { justify-self: start !important; text-align: left !important; white-space: normal !important; }
}
.tpl-review-item { background: #1B1D25; border: 1px solid #262935; border-radius: 16px; padding: 18px 20px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 20px; align-items: center; }
.tpl-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tpl-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
@media (max-width: 760px) {
  .tpl-member-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .tpl-member-stats > div { border-left: none !important; border-top: 1px solid #262935; }
  .tpl-member-stats > div:nth-child(1), .tpl-member-stats > div:nth-child(2) { border-top: none; }
  .tpl-member-stats dd { white-space: normal !important; word-break: break-word; font-size: 18px !important; }
}


@media (max-width: 700px) {
  .tpl-form-grid { grid-template-columns: 1fr !important; }
  .tpl-form-grid > label[style*="span 2"], .tpl-form-grid > label[style*="span 3"] { grid-column: auto !important; }
}

.tpl-review-item-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tpl-review-item-action { display: flex; align-items: center; gap: 8px; }
@media (max-width: 760px) {
  .tpl-review-item { grid-template-columns: 1fr !important; }
  .tpl-review-item-action { justify-self: start !important; margin-top: 4px; }
}


.admin-table {
  width: 100%;
  max-width: 100%;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  margin: 12px 0 24px;
  font-size: 0.9rem;
}
.admin-table th, .admin-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #2a2e3a;
}
.admin-table th { color: #a9adba; font-weight: 500; }

/* Disciplinary Tracker card grid (2026-11-18, Boss's direct redesign ask,
   same night as the scroll fix above) - "give it a grid... lines and
   boxes around each thing... make it a professional list." Replaced the
   table entirely instead of just making it scroll: real roleplay/staff
   incident records read more naturally as one bordered card per record
   than as table rows anyway, and a card grid needs zero horizontal
   scrolling at ANY width - the fix above still matters for other admin
   tables, but this page doesn't need it at all now. One fixed label/
   value text size pair used everywhere (dt/dd below) - Boss's other
   direct complaint was inconsistent "small text, big text" sizing, so
   every field in every card uses the exact same two sizes, no per-field
   exceptions. */
.discipline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  margin: 16px 0 24px;
}
.discipline-card {
  border: 1px solid #2a2e3a;
  border-radius: 10px;
  padding: 14px 16px;
  background: #1c1f28;
  /* Inherited by every field below (overflow-wrap is an inherited
     property) - catches any long unbroken string (a pasted Discord
     message URL, a run-together ticket ref) anywhere in the card, not
     just the one field that happened to break mobile first. */
  overflow-wrap: anywhere;
}
.discipline-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #2a2e3a;
}
.discipline-card-head h3 { margin: 0; font-size: 1rem; color: #e8e8ec; }
.discipline-card-head a { color: #8ab4f8; text-decoration: none; }
.discipline-fields { margin: 0; }
.discipline-fields > div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px;
  padding: 3px 0;
}
.discipline-fields dt {
  margin: 0;
  font-size: 0.72rem;
  color: #9a9ca5;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.discipline-fields dd {
  margin: 0;
  font-size: 0.85rem;
  color: #e8e8ec;
  /* Real fix, found live: a long unbroken string with no spaces (one
     imported ticket ref is a raw Discord message URL) refuses to wrap by
     default, forcing the whole grid column - and with it every card in
     the single mobile column - wide enough to fit it, blowing past the
     real viewport width. overflow-wrap lets it break mid-word instead. */
  overflow-wrap: anywhere;
}
.discipline-fields dd a { color: #8ab4f8; text-decoration: none; }
.discipline-meta {
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px solid #2a2e3a;
  font-size: 0.72rem;
  color: #6f7380;
}
/* Real grouping, 2026-11-19, Boss's direct ask: a member/staff card can
   now hold more than one strike's worth of history (see discipline.js's
   groupByKey comment) - each one needs its own visual boundary inside the
   shared outer card without looking like a whole separate card itself. */
.discipline-subentries { display: flex; flex-direction: column; gap: 10px; }
.discipline-subentry + .discipline-subentry { padding-top: 10px; border-top: 1px dashed #2a2e3a; }
@media (max-width: 600px) {
  .discipline-grid { grid-template-columns: 1fr; }
}

.ticket-thread {
  max-height: 480px;
  overflow-y: auto;
  border: 1px solid #2a2e3a;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 12px 0 20px;
  background: #1c1f28;
}
.msg {
  padding: 8px 12px;
  margin: 8px 0;
  border-radius: 8px;
  max-width: 80%;
}
.msg-member { background: #23262f; margin-right: auto; }
.msg-staff { background: #2a3550; margin-left: auto; }
/* Department chat has no member/staff side distinction - everyone on the
   roster is a peer here, unlike a support ticket thread. Built 2026-11-16. */
.dept-chat-list .msg,
#dept-chat-list .msg { background: #23262f; max-width: 100%; }
.msg-meta {
  color: #8f939e;
  font-size: 0.75rem;
  margin: 0 0 4px;
}
.msg-body { color: #e8e8ec; margin: 0; white-space: pre-wrap; }

/* Discord-style chat redesign, added 2026-11-23 - Boss's direct ask, built
   off real screenshots of an old Discord ticket channel (avatar + colored
   name/role per message, flat feed, no bubble alignment). Deliberately
   NEW classes (tchat-*), not a restyle of .msg/.msg-meta/.msg-body above -
   those are still used as-is by dept.js's two chat functions and games.js,
   which don't carry an avatar element, so reusing the same classes would
   break their layout. Used only by whitelist.js (shared with staffapps.js)
   and tickets.js's chat rendering. */
/* Real bubble-chat redesign, 2026-11-25, Boss's direct ask (approved via
   Claude Design) - messages now align left/right by whether the current
   viewer sent them ("mine" vs "theirs"), each inside a real rounded
   bubble, replacing the earlier flat Discord-style feed. Avatar/name/role
   badge/time markup is unchanged, just reflowed: name+badge+time sits
   above the bubble, mirrored (row-reverse) on the viewer's own messages. */
.tchat-msg {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 4px 8px;
  margin: 2px 0;
  max-width: 80%;
}
.tchat-msg--mine { margin-left: auto; flex-direction: row-reverse; }
.tchat-avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; }
.tchat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tchat-msg--mine .tchat-main { align-items: flex-end; }
.tchat-head { display: flex; align-items: baseline; gap: 8px; margin: 0; flex-wrap: wrap; font-size: 0.8rem; }
.tchat-msg--mine .tchat-head { flex-direction: row-reverse; }
.tchat-name { font-weight: 600; }
.tchat-role {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 1px 6px;
  border-radius: 4px;
  color: #11131a;
  font-weight: 700;
}
.tchat-time { color: #6b6f7a; font-size: 0.72rem; }
.tchat-bubble {
  background: #1e2029;
  border: 1px solid #2a2d38;
  border-radius: 16px 16px 16px 4px;
  padding: 10px 14px;
  max-width: 100%;
}
.tchat-msg--mine .tchat-bubble {
  background: #222648;
  border-color: #343a6e;
  border-radius: 16px 16px 4px 16px;
}
.tchat-body { color: #e8e8ec; margin: 0; white-space: pre-wrap; word-break: break-word; }
.tchat-bubble .ticket-attachment { margin-top: 8px; max-width: 100%; border-radius: 10px; display: block; }

/* Two-column ticket layout: conversation + sidebar, matching the approved
   mockup. Wraps to a single column under 760px (the sidebar's own
   min-width forces the wrap, no separate media query needed). */
/* Real fix, 2026-11-25, Boss caught it live: implicit flex-wrap based on
   content basis is sub-pixel-fragile - the sidebar would unpredictably
   drop below the thread depending on exact viewport width (scrollbar
   presence, browser chrome, zoom), sometimes looking right after a
   refresh and wrong right after a click for no visible reason. Replaced
   with an explicit breakpoint, same deterministic approach already used
   for the Staff Panel sidebar elsewhere in this file. */
.ticket-layout { display: flex; gap: 28px; align-items: flex-start; }
.ticket-layout-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.ticket-layout-aside { flex: 0 0 300px; display: flex; flex-direction: column; gap: 16px; }
.ticket-layout-aside .home-section { margin: 0; }
@media (max-width: 760px) {
  .ticket-layout { flex-direction: column; }
  .ticket-layout-aside { flex: 1 1 auto; width: 100%; }
}

/* Escalation ladder - read-only status display, not a picker (the actual
   action is the single Escalate button elsewhere on the page). */
.ladder-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.ladder-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; font-size: 0.85rem; color: #9ca1b0; }
.ladder-item .ladder-dot { width: 8px; height: 8px; border-radius: 50%; background: #2e3240; flex-shrink: 0; }
.ladder-item.is-current { background: rgba(176,124,255,.12); color: #e9eaf0; font-weight: 600; }
.ladder-item.is-current .ladder-dot { background: #c9a6ff; }
.ladder-item.is-passed .ladder-dot { background: #4a4f5e; }
.ladder-item-tag { margin-left: auto; font-size: 0.65rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #c9a6ff; }

/* Manage Access modal */
.modal-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(8,9,12,.72); display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-dialog { width: 100%; max-width: 540px; max-height: 86vh; overflow: auto; box-sizing: border-box; background: #1c1f28; border: 1px solid #2e3240; border-radius: 16px; box-shadow: 0 24px 64px rgba(0,0,0,.55); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-dialog h2 { margin: 0; font-size: 1.2rem; }
.seg-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 10px; background: #13141a; border: 1px solid #2a2d38; }
.seg-btn { height: 36px; border: 0; border-radius: 8px; background: transparent; color: #9ca1b0; font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.seg-btn.is-active { background: #5865f2; color: #fff; }
.access-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: #20222c; border: 1px solid #2a2d38; }
.access-row.is-locked { background: #1a1b22; border-style: dashed; }
.access-row-name { font-size: 0.9rem; font-weight: 500; flex: 1; min-width: 0; }
.access-row-note { display: block; font-size: 0.72rem; color: #e0a93e; }
.access-row button { height: 32px; padding: 0 14px; border-radius: 8px; border: 0; font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; flex-shrink: 0; }
.access-row button:disabled { opacity: .5; cursor: not-allowed; }

/* Player-view escalation banner + Details card */
.escalation-banner { background: #1e1a2c; border: 1px solid #3a2f57; border-radius: 12px; padding: 16px 18px; display: flex; gap: 12px; }
.escalation-banner strong { display: block; margin-bottom: 2px; }
.escalation-banner span { color: #b4aacb; font-size: 0.85rem; }
.details-grid { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 10px; column-gap: 10px; font-size: 0.85rem; }
.details-grid dt { color: #9ca1b0; }
.details-grid dd { margin: 0; }

.msg-link { color: #7aa2ff; text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.msg-link:hover { color: #a9c2ff; }

/* Real activity-log pill, added 2026-11-25, Boss's direct ask - every
   ticket action (escalate, restrict/lift, notify, status/category change,
   add/remove player) posts one of these into the thread instead of
   happening silently. Staff-only, matches the approved Claude Design
   mockup's centered dashed-pill treatment. */
.tchat-system {
  display: flex;
  width: fit-content;
  max-width: 90%;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin: 4px auto;
  border-radius: 999px;
  background: #171920;
  border: 1px dashed #2e3240;
  color: #9ca1b0;
  font-size: 13px;
  text-align: center;
}
.tchat-system-dot { width: 6px; height: 6px; border-radius: 50%; background: #c9a6ff; flex-shrink: 0; }
.tchat-system-time { color: #6c7282; }


.color-swatches { display: flex; gap: 10px; margin: 8px 0 20px; }
.swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #383c48;
  cursor: pointer;
  padding: 0;
  margin: 0;
}
.swatch:hover { border-color: #8ab4f8; }

/* Games system (2026-11-06) */
.inline-form { display: flex; align-items: flex-end; gap: 10px; margin-top: 12px; }
.inline-form label { flex: 1; margin: 0; }
.avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 8px;
}
.answer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.answer-btn {
  background: #1c1f28;
  border: 1px solid #2a2e3a;
  color: #e8e8ec;
  text-align: left;
  white-space: normal;
  margin-top: 0;
  padding: 14px 16px;
}
.answer-btn:hover:not(:disabled) { border-color: #5865f2; }
.answer-btn:disabled { cursor: default; opacity: 0.85; }
.answer-letter { color: #8ab4f8; font-weight: 600; margin-right: 4px; }
.answer-correct { background: #1f3d2a !important; border-color: #3ba55c !important; }
.answer-wrong { background: #3d1f24 !important; border-color: #ed4245 !important; }
.answer-selected { border-color: #8ab4f8; }
.timer-bar-outer {
  width: 100%;
  height: 8px;
  background: #1c1f28;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}
.timer-bar-inner {
  height: 100%;
  width: 100%;
  background: #5865f2;
  transition: width 0.1s linear;
}
.game-results { text-align: center; }
.game-results .btn { margin: 8px; }
.player-list { margin: 16px 0; }
.player-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  border-bottom: 1px solid #2a2e3a;
}
.chat-panel { max-height: 220px; }

/* --- Games landing: real card grid + Solo/Multiplayer popup (built
   2026-11-14, styled off Boss's reference screenshots) --------------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 20px 0 32px;
}
.game-card {
  position: relative;
  background: #1c1f28;
  border: 1px solid #2a2e3a;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.game-card:hover { transform: translateY(-3px); border-color: #5865f2; }
.game-card-icon {
  font-size: 2.6rem;
  text-align: center;
  padding: 28px 0 12px;
  background: linear-gradient(135deg, #2a2e3a, #1c1f28);
}
.game-card-body { padding: 16px 18px 20px; }
.game-card-body h3 { margin: 0 0 8px; }
.game-card-body p { font-size: 0.85rem; min-height: 3.2em; }
.game-card-play { width: 100%; }

.game-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 11, 15, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
[hidden] { display: none !important; }
.game-modal-inner {
  position: relative;
  background: #1c1f28;
  border: 1px solid #2a2e3a;
  border-radius: 12px;
  padding: 28px 24px;
  width: 90%;
  max-width: 360px;
}
.game-modal-inner h3 { margin-top: 0; }
.game-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: #8f939e;
  font-size: 1.4rem;
  cursor: pointer;
  margin-top: 0;
  padding: 0;
}
.game-modal-close:hover { color: #e8e8ec; }
.game-modal-form { margin: 16px 0; }
.game-modal-form button { width: 100%; }

/* Type-in / numeric-guess answer form, used by Word Scramble, Emoji
   Riddle, and Closest Guess instead of the 4-choice answer-grid. */
.answer-typein {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}
.answer-typein input {
  flex: 1;
  background: #1c1f28;
  border: 1px solid #2a2e3a;
  border-radius: 8px;
  color: #e8e8ec;
  padding: 10px 12px;
  font-size: 1rem;
}
.answer-typein input:focus { outline: none; border-color: #5865f2; }
.answer-typein button { margin-top: 0; }

/* --- Games Lobby chat (built 2026-11-14), styled off Boss's dark-UI
   reference - a real persistent room, separate from the in-match chat
   above. --------------------------------------------------------------- */
.lobby-chat-thread {
  /* Real fixed height, not a cap on growth (2026-11-18, Boss's direct
     ask: "I know it expands as we text, fix it to stay that big anyway
     instead of expanding more") - a plain max-height only caps growth,
     it still starts small and grows toward the cap as messages arrive.
     A real height stays this tall from the very first message. Bumped
     up from the old 560px cap at the same time since "bigger" was part
     of the same ask. */
  height: 640px;
  overflow-y: auto;
  border: 1px solid #2a2e3a;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 16px 0;
  background: #14161c;
}
/* Two-row composer (2026-11-18 fix, Boss's direct call-out from a real
   photo) - the input used to share one cramped row with the emoji/attach/
   Send controls, squeezing it to a sliver in a 260px sidebar. The input
   now gets its own full-width row; controls sit on a second row below. */
.lobby-chat-form { display: flex; flex-direction: column; gap: 8px; }
.lobby-chat-input-row input[type="text"], .lobby-chat-input-row input:not([type]) {
  width: 100%;
  box-sizing: border-box;
  background: #1c1f28;
  border: 1px solid #2a2e3a;
  border-radius: 20px;
  color: #e8e8ec;
  padding: 10px 16px;
}
.lobby-chat-input-row input:focus { outline: none; border-color: #5865f2; }
.lobby-chat-controls-row { display: flex; align-items: center; gap: 6px; }
.lobby-chat-controls-row button { margin-top: 0; border-radius: 20px; }
.lobby-chat-controls-row .lobby-chat-send { margin-left: auto; }
.lobby-chat-attach {
  cursor: pointer;
  font-size: 1.3rem;
  padding: 6px 10px;
}
.lobby-chat-image {
  max-width: 260px;
  max-height: 260px;
  border-radius: 8px;
  display: block;
  margin-top: 6px;
}

/* Real emoji picker (2026-11-18) */
.lobby-chat-emoji-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 6px 8px;
  margin-top: 0;
}
.lobby-chat-emoji-panel {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  background: #1c1f28;
  border: 1px solid #2a2e3a;
  border-radius: 8px;
  padding: 8px;
  margin: 0 0 8px;
}
.lobby-chat-emoji-opt {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  margin-top: 0;
}
.lobby-chat-emoji-opt:hover { background: #2a2e3a; }

/* --- Games 3-pane shell (2026-11-18) - left picker, center game, right
   persistent chat. Same real dark palette as everywhere else on this
   site. --------------------------------------------------------------- */
/* Edge-locked layout (2026-11-18, revised three times same night).
   Real history: position:fixed caused a header-gap + footer-overlap bug
   -> reverted to sticky + align-items:stretch (so each panel's box, and
   its divider line, would visually run the real content's full length,
   not just one screen) -> that then caused THIS bug: Boss reported the
   panels scrolling away with the page instead of staying put. Root
   cause, confirmed empirically via a live getBoundingClientRect test
   (not guessed): a position:sticky element that's also stretched via
   align-items:stretch to exactly match a tall sibling's height has no
   room left for sticky to actually do anything in Chromium - its top
   edge just moves 1:1 with scroll.
   Real fix: decouple the two asks. The divider lines - the thing that
   visually needs to run the full content length - are now ::before/
   ::after pseudo-elements on .games-shell itself (which IS naturally as
   tall as the content, no stretch needed for a plain line). .games-left
   and .games-right go back to align-self: flex-start, which is what
   actually lets position:sticky engage. A fixed (not stretched)
   min-height keeps both panels a reasonable size regardless of the
   center panel's own height, and - importantly for the right/chat panel
   specifically - gives the composer-pinning rule below a real, stable
   height to fill against that isn't circularly tied to a sibling. */
.games-shell { position: relative; display: flex; align-items: stretch; gap: 20px; padding: 20px 0; min-height: 0; box-sizing: border-box; }
.games-shell::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 260px;
  width: 1px;
  background: #2a2e3a;
  pointer-events: none;
}
.games-shell::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 260px;
  width: 1px;
  background: #2a2e3a;
  pointer-events: none;
}
/* Same real nav-tag collision found on .panel-sidebar (see its own
   comment) - .games-left is also a real <nav> element, so the generic
   `nav { display: flex; margin-top: 20px; }` rule further down this file
   was quietly shifting it down by that same 20px too. */
.games-left { display: block; margin-top: 0; }
.games-left, .games-right {
  /* Natural (not explicit/min-) height, on purpose - confirmed live via
     a real scroll test: giving this sticky element its own explicit
     height close to the page's own (often short, on a normal Games
     browsing view) total height leaves sticky no real slack to work
     with, same root issue as align-items:stretch caused earlier, just
     self-inflicted this time via an explicit height instead of a
     stretched one. Natural content height is what actually lets sticky
     hold while scrolling - same proven pattern as .panel-sidebar. Real
     tradeoff accepted here: the chat composer-pin-to-the-exact-bottom
     refinement built earlier needed a tall, definite panel height to
     work, which structurally conflicts with sticky at this box's real
     size - the thread falls back to its solid fixed height (set earlier
     in this file) instead; genuinely working sticky is the higher
     priority of the two. */
  position: sticky;
  top: 56px;
  align-self: flex-start;
  flex: 0 0 260px;
  width: 260px;
  background: #14161c;
  padding: 14px;
  box-sizing: border-box;
}
.games-left { left: 0; }
.games-right { right: 0; }
.games-center {
  /* Real min-height, confirmed necessary live: same real issue as
     .panel-content's own note - the chat panel's natural height (with
     its fixed 640px thread) came close to or exceeded the real height
     of a typical Games page, leaving sticky almost no slack to work
     with, confirmed broken even with a real trivia question loaded, not
     just the empty landing view. This floor guarantees comfortable
     slack regardless of actual page content; never caps a page that's
     already taller than this. */
  min-height: calc(100vh + 150px);
  flex: 1;
  min-width: 0;
  background: #14161c;
  border: 1px solid #2a2e3a;
  border-radius: 10px;
  padding: 20px;
  box-sizing: border-box;
}
.games-center.games-center-loading { opacity: 0.5; }

/* Right/chat panel desktop collapse tab (2026-11-18, Boss's direct ask:
   "should be able to collapse while playing the game even on desktop").
   Full hide, not an icon rail - a chat thread + input has no sensible
   icon-only form the way a nav list does. Real JS toggle (games-
   shell.js), not the checkbox-hack - this also has to shrink
   .games-shell's padding on that side, which a plain CSS sibling
   selector can't reach up into an ancestor to do. Hidden on mobile,
   where the hamburger checkbox toggle already covers this same need. */
.games-collapse-tab { display: none; }
@media (min-width: 1001px) {
  .games-collapse-tab {
    display: block;
    position: fixed;
    top: 72px;
    z-index: 6;
    width: 20px;
    height: 44px;
    padding: 0;
    margin-top: 0;
    background: #1c1f28;
    border: 1px solid #2a2e3a;
    color: #c7c9d1;
    font-size: 0.75rem;
    cursor: pointer;
  }
  .games-collapse-tab-right { right: 260px; border-radius: 6px 0 0 6px; border-right: none; }
  .games-collapse-tab-right.collapsed { right: 0; }
  /* .games-right is a real flex item now (2026-11-18 revision, same
     night) - hiding it lets .games-center (flex: 1) absorb the freed
     space on its own, no more needing a padding class on .games-shell
     to fake that. The right divider (.games-shell::after) just hides
     along with it - no panel edge left to mark. */
  .games-right.panel-collapsed { display: none; }
  .games-shell.right-collapsed::after { display: none; }
}

/* Left/games-picker panel desktop icon-rail collapse (2026-11-18,
   matching the real Trading Dashboard reference Boss pointed at
   directly) - narrows to just icons instead of fully hiding, with a
   small round arrow button docked right at the panel's own edge
   (position:absolute inside .games-left - position:sticky still
   establishes a containing block for that same as fixed did, so it
   rides along with the panel's width with zero JS position math, same
   technique as the Staff Panel's .panel-collapse-btn). */
.games-collapse-btn {
  display: none;
  position: absolute;
  top: 58px;
  right: -14px;
  z-index: 6;
  width: 26px;
  height: 26px;
  padding: 0;
  margin-top: 0;
  border-radius: 50%;
  background: #1c1f28;
  border: 1px solid #2a2e3a;
  color: #c7c9d1;
  font-size: 0.7rem;
  cursor: pointer;
}
.games-left-rail { display: none; }
@media (min-width: 1001px) {
  .games-left { transition: flex-basis 0.12s ease, width 0.12s ease; }
  .games-collapse-btn { display: block; }
  .games-left.collapsed { flex-basis: 56px; width: 56px; padding-left: 8px; padding-right: 8px; overflow: visible; }
  .games-left.collapsed .games-left-expanded { display: none; }
  .games-left.collapsed .games-left-rail { display: flex; }
  /* Divider line tracks the collapsed width - it's a ::before on
     .games-shell (see above), not on the panel itself, so it needs its
     own class toggle to follow .games-left.collapsed. */
  .games-shell.left-collapsed::before { left: 56px; }
  .games-left-rail {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
  .games-rail-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #c7c9d1;
    font-size: 1.1rem;
    text-decoration: none;
    cursor: pointer;
    margin-top: 0;
  }
  .games-rail-btn:hover { background: #1c1f28; }
  .games-left-rail .games-left-divider { width: 70%; margin: 4px 0; }
}
.games-left-divider { border: none; border-top: 1px solid #2a2e3a; margin: 14px 0; }
.games-left-links { display: flex; flex-direction: column; gap: 2px; }
.games-left-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #c7c9d1;
  text-decoration: none;
  font-size: 0.88rem;
}
.games-left-link:hover { background: #1c1f28; }
.games-left-link-icon { font-size: 1.1rem; }

.games-mode-toggle { display: flex; gap: 6px; margin-bottom: 12px; }
.games-mode-btn {
  flex: 1;
  background: #1c1f28;
  border: 1px solid #2a2e3a;
  border-radius: 6px;
  color: #c7c9d1;
  padding: 8px 6px;
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 0;
}
.games-mode-btn.active { background: #5865f2; border-color: #5865f2; color: #fff; }

.games-join-form { display: flex; gap: 6px; margin-bottom: 14px; }
.games-join-form input {
  flex: 1;
  min-width: 0;
  background: #1c1f28;
  border: 1px solid #2a2e3a;
  border-radius: 6px;
  color: #e8e8ec;
  padding: 7px 10px;
  font-size: 0.85rem;
}
.games-join-form button { margin-top: 0; padding: 7px 14px; font-size: 0.85rem; }

.games-pick-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.games-pick-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #c7c9d1;
  padding: 8px 10px;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: left;
  margin-top: 0;
}
.games-pick-item:hover { background: #1c1f28; }
.games-pick-item.active { background: #5865f21a; color: #e8e8ec; border-color: #5865f266; }
.games-pick-icon { font-size: 1.2rem; }
.games-pick-detail {
  background: #1c1f28;
  border: 1px solid #2a2e3a;
  border-radius: 8px;
  padding: 12px;
}
.games-pick-blurb { font-size: 0.8rem; margin: 0 0 10px; }
.games-pick-detail select {
  width: 100%;
  background: #14161c;
  border: 1px solid #2a2e3a;
  border-radius: 6px;
  color: #e8e8ec;
  padding: 6px 8px;
  margin: 4px 0 10px;
}
.games-pick-detail .btn { width: 100%; }

/* Mobile collapse toggles (left + right panels), same zero-JS checkbox-
   hack technique already used for the Staff Panel sidebar and the main
   top-nav hamburger. */
.games-panel-toggle-checkbox { display: none; }
.games-panel-toggle-btn { display: none; position: relative; }
.games-chat-badge {
  display: inline-block;
  background: #ed4245;
  color: #fff;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 6px;
}

@media (max-width: 1000px) {
  .games-shell { padding: 16px; display: block; min-height: 0; }
  .games-shell::before, .games-shell::after { display: none; }
  .games-left, .games-right { width: 100%; box-sizing: border-box; position: static; top: auto; height: auto; max-height: none; overflow-y: visible; border: 1px solid #2a2e3a; border-radius: 10px; }
  .games-center { min-height: 0; }
  .games-panel-toggle-btn {
    display: block;
    padding: 8px 12px;
    background: #1c1f28;
    border: 1px solid #2a2e3a;
    border-radius: 6px;
    color: #e8e8ec;
    font-size: 0.85rem;
    cursor: pointer;
    text-align: center;
  }
  .games-left-collapsible, .games-right-collapsible { display: none; margin-top: 12px; }
  .games-panel-toggle-checkbox:checked ~ .games-left-collapsible,
  .games-panel-toggle-checkbox:checked ~ .games-right-collapsible { display: block; }
}

/* Homepage photo slideshow - built 2026-11-16, Boss's direct ask, redesigned
   same day after his "too big, should be horizontal" feedback. Real fix
   underneath the redesign: this CSS was being deployed to the dead,
   unreferenced root-level style.css the whole time - server.js actually
   serves public/style.css, which never got any of tonight's changes until
   this pass. Shorter box (220px, was 360px) and a real left-right sliding
   transition (translateX) instead of a crossfade, so it reads as a
   horizontal slideshow, not a giant rotating hero banner. */
/* object-fit: contain (not cover), added same day per Boss's direct ask -
   uploaded images are a real mix of horizontal and vertical (phone
   screenshots), and cover was cropping pieces off; contain always shows
   the full image, letterboxed in black (standard media-letterbox
   convention) so the bars read as deliberate, not like a bug. */
.slideshow { position: relative; padding: 0; overflow: hidden; height: 420px; background: #000; }
.slideshow-track { position: relative; width: 100%; height: 100%; }
.slideshow .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: translateX(100%);
  transition: transform 0.6s ease;
  z-index: 0;
}
.slideshow .slide.active { transform: translateX(0); z-index: 2; }
.slideshow .slide.exiting { transform: translateX(-100%); z-index: 1; }
.slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 6px;
  z-index: 2;
}
.slide-prev { left: 14px; }
.slide-next { right: 14px; }
.slide-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.slide-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.4); }
.slide-dot.active { background: #fff; }

/* Reviews carousel (2026-11-18, Boss's direct ask) - same proven
   slide-in/slide-out mechanic as the Homepage Slideshow above (shared
   JS, see server.js's wireCarousel), adapted for a page of 3 review
   cards (a real .feature-grid, same as the original static layout)
   instead of a single photo - paginated by the arrows, no auto-advance
   (Boss's direct ask: click-only here, unlike the photo slideshow which
   keeps its own auto-advance).
   Real fix, same night: review text length varies AND .feature-grid's
   column count is fluid (repeat(auto-fit, minmax(200px, 1fr)), not a
   fixed breakpoint) - on a narrow screen it collapses to one column, so
   3 stacked cards came out taller than a fixed box sized for one row of
   3 side-by-side cards, and the extra height visibly showed through into
   whatever came next on the page (Boss caught this live). The JS
   (server.js's wireCarousel, syncHeight) now measures the real height of
   whichever slide is active and sets the track to exactly that, so
   overflow: hidden here is now a correct clip, not a workaround -
   min-height is just the pre-JS fallback so there's no flash of 0 height.
   Real second bug, same cause-and-effect pass: the side padding for arrow
   clearance was on .review-slideshow itself, but translateX(100%) on a
   .slide moves it by *its own* box width, not the clipping ancestor's -
   so the slide only cleared (track width), which is (slideshow width -
   2x the side padding), leaving a slice of it visibly un-clipped at the
   edge. Padding now lives on .slide itself instead (box-sizing: border-box
   is global in this codebase, so the slide's own 100% width already
   includes that padding) - translateX(100%) then moves it by its real
   full width, matching the clipping box exactly, with no side padding on
   .review-slideshow at all to create the mismatch in the first place. */
.review-summary { color: #9aa0ab; margin-top: -8px; margin-bottom: 18px; }
.review-summary .stars { color: #f5c518; font-size: 0.9em; }
.review-slideshow { position: relative; overflow-x: hidden; overflow-y: hidden; min-height: 280px; }
.review-slideshow .slideshow-track { position: relative; width: 100%; min-height: 280px; transition: height 0.3s ease; }
.review-slideshow .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0 56px;
  box-sizing: border-box;
  transform: translateX(100%);
  transition: transform 0.6s ease;
  z-index: 0;
}
.review-slideshow .slide.active { transform: translateX(0); z-index: 2; }
.review-slideshow .slide.exiting { transform: translateX(-100%); z-index: 1; }
.review-avatar { margin: 0 auto 10px; }
/* Narrower side padding on mobile so the arrow buttons (absolutely
   positioned at 14px from each edge, same as the photo slideshow) don't
   sit on top of a review card's own text at typical widths. */
@media (max-width: 600px) {
  .review-slideshow .slide { padding: 0 44px; }
  /* Real ask, 2026-11-18, Boss: the photo slideshow's 420px desktop
     height is too tall on a phone screen - scale it down rather than
     leave it fixed at the desktop size. */
  .slideshow { height: 260px; }
}

/* Ticket queue redesign - built 2026-11-16 off Boss's real helpdesk
   screenshot (avatar + name requester column, colored status pills, stat
   counts up top). Shared between tickets.js's general staff queue and
   dept.js's department-scoped queue. */
.ticket-stat-row { display: flex; gap: 12px; margin: 12px 0 20px; }
.ticket-stat {
  background: #1c1f28;
  border: 1px solid #2a2e3a;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.85rem;
  color: #c7c9d1;
}
.ticket-stat strong { color: #e8e8ec; margin-right: 4px; }
/* Real mobile fix, 2026-11-26 - Boss hit this live on his phone (a real
   glitch screenshot): this table never got the same overflow-x fix
   .admin-table got on 2026-11-18 for the identical problem elsewhere, so
   on a narrow viewport the whole PAGE scrolled sideways instead of just
   the table, making the fixed header/avatar look like they were
   floating over misaligned columns. Same proven fix, same class shape. */
.ticket-table { width: 100%; max-width: 100%; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; border-collapse: collapse; }
.ticket-table th { text-align: left; color: #8f939e; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; padding: 8px 10px; border-bottom: 1px solid #2a2e3a; }
.ticket-table td { padding: 10px; border-bottom: 1px solid #2a2e3a; vertical-align: middle; }

/* Real fix, 2026-11-25, Boss's direct catch - a long real ticket subject
   (members can type anything) wrapped across 2-3 lines in a table row,
   blowing that one row's height out while every other row around it
   stayed single-line, throwing off the table's whole rhythm. Truncates to
   one line with an ellipsis instead of wrapping - the full real subject is
   still there as a native tooltip (title attribute) and in full on the
   ticket's own detail page, nothing is actually lost, just not wrapped
   inline anymore. Used by every table that lists ticket subjects, not just
   Recently Closed - Active and the per-staffer My Tickets widget share the
   identical bug shape if a long subject ever lands there.
*/
.subject-cell {
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticket-requester { display: flex; align-items: center; gap: 8px; }
.ticket-status-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}
.ticket-status-open { background: rgba(88, 101, 242, 0.18); color: #8ab4f8; }
.ticket-status-pending { background: rgba(224, 169, 62, 0.18); color: #e0a93e; }
.ticket-status-on_hold { background: rgba(197, 138, 249, 0.18); color: #c58af9; }
.ticket-status-solved { background: rgba(59, 165, 92, 0.18); color: #3ba55c; }
.ticket-status-closed { background: rgba(143, 147, 158, 0.18); color: #8f939e; }

/* Ticket attachments (screenshots/videos a member attaches) - built
   2026-11-16, Boss's direct ask. */
.ticket-attachment { display: block; max-width: 320px; max-height: 320px; border-radius: 8px; margin-top: 8px; }

/* Events calendar - built 2026-11-16, Boss's direct ask. Month grid table,
   each day cell stacking small event buttons that open a native <dialog>
   popup (see events.js's eventDialog()) with the full image/description. */
.calendar-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.calendar-nav h2 { margin: 0; }
.calendar-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.calendar-table th { padding: 8px; text-align: center; color: #8f939e; font-size: 0.8rem; text-transform: uppercase; }
.calendar-table td {
  border: 1px solid #2a2e3a;
  vertical-align: top;
  height: 90px;
  padding: 6px;
}
.calendar-blank { background: #15171e; }
.calendar-day-number { color: #8f939e; font-size: 0.8rem; margin-bottom: 4px; }
.calendar-event {
  display: block;
  width: 100%;
  text-align: left;
  background: rgba(88, 101, 242, 0.18);
  color: #8ab4f8;
  border: none;
  border-radius: 4px;
  padding: 3px 6px;
  margin-bottom: 3px;
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.calendar-event:hover { background: rgba(88, 101, 242, 0.32); }
.event-dialog {
  background: #1c1f28;
  color: #e8e8ec;
  border: 1px solid #2a2e3a;
  border-radius: 12px;
  padding: 24px 28px;
  max-width: 480px;
  width: 90vw;
}
.event-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.event-dialog .dialog-close {
  float: right;
  background: none;
  border: none;
  color: #8f939e;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}
.event-dialog-img { display: block; max-width: 100%; border-radius: 8px; margin: 10px 0; }
