:root {
  --navy-950: #06162f;
  --navy-900: #081d3f;
  --navy-850: #0c2853;
  --navy-800: #123667;
  --blue: #2867dc;
  --blue-soft: #edf3ff;
  --ink: #111b2f;
  --muted: #647189;
  --quiet: #8a95a7;
  --canvas: #f4f6f9;
  --surface: #ffffff;
  --surface-soft: #f8f9fb;
  --line: #dfe4eb;
  --line-strong: #cfd6e0;
  --green: #32945a;
  --red: #df4a52;
  --amber: #dd9216;
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

body[data-theme="dark"] {
  --navy-950: #101215;
  --navy-900: #171a1f;
  --navy-850: #20242a;
  --navy-800: #2c323a;
  --blue: #9cc4ff;
  --blue-soft: #24364e;
  --ink: #eef1f5;
  --text-secondary: #c7cdd6;
  --muted: #abb4c1;
  --quiet: #97a3b3;
  --canvas: #121416;
  --surface: #1c1f24;
  --surface-soft: #23272d;
  --surface-raised: #292e35;
  --surface-hover: #30363e;
  --control: #171a1f;
  --line: #353c46;
  --line-strong: #5b6573;
  --green: #85dbab;
  --red: #ff9b9e;
  --amber: #f3cb7d;
  --success-soft: #203b30;
  --danger-soft: #44282d;
  --warning-soft: #3d3320;
  --action-blue: #3264c6;
  --action-blue-hover: #3a70d6;
  --action-red: #b83f4d;
  --action-red-hover: #c74654;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { min-width: 320px; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

button,
input,
textarea,
select { font: inherit; }

button,
a,
input,
textarea,
select,
h1,
h2,
p { letter-spacing: 0; }

button,
a { -webkit-tap-highlight-color: transparent; }

svg { width: 18px; height: 18px; flex: 0 0 auto; }
.hidden { display: none !important; }

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 20;
  overflow: hidden;
  background: var(--navy-900);
  color: #ffffff;
  display: grid;
  grid-template-rows: 88px minmax(0, 1fr);
}

.side-brand {
  padding: 15px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 4px;
  background: var(--navy-900);
  color: #ffffff;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.brand-mark svg { width: 23px; height: 23px; }
.brand-mark.small { width: 58px; height: 58px; }
.brand-mark.logo-mark {
  background: transparent;
}
.brand-mark.logo-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.brand.inverse .brand-mark { background: transparent; color: #ffffff; }

.brand strong {
  display: block;
  color: var(--navy-950);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.05;
}

.brand span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.brand.inverse strong { color: #ffffff; }
.brand.inverse span { color: #a9b6ca; }

nav {
  padding: 12px 8px 18px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .14) transparent;
}

.nav-group { margin-bottom: 16px; }

.nav-group > p {
  margin: 0;
  padding: 5px 9px 7px;
  color: #8291a8;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
}

nav button {
  position: relative;
  width: 100%;
  min-height: 39px;
  margin: 1px 0;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #c2ccda;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

nav button svg { width: 16px; height: 16px; color: #aebcd0; }
nav button:hover { background: rgba(255, 255, 255, .055); color: #ffffff; }

nav button.active {
  background: #17396e;
  color: #ffffff;
  font-weight: 650;
}

nav button.active::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -8px;
  width: 2px;
  background: #4d88ff;
}

nav button.active svg { color: #62a0ff; }

.nav-badge {
  min-width: 24px;
  height: 20px;
  margin-left: auto;
  padding: 0 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .1);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-style: normal;
  font-weight: 650;
}

.nav-badge:empty { display: none; }

.server-card {
  margin: 0 12px 16px;
  padding: 14px;
  border: 1px solid rgba(151, 174, 209, .28);
  border-radius: 6px;
  background: rgba(5, 18, 41, .28);
}

.server-card > strong { display: block; font-size: 11px; font-weight: 650; }

.server-online {
  margin-top: 5px;
  color: #a9b7ca;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
}

.server-online i,
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #50b975;
  display: inline-block;
}

.server-card dl { margin: 12px 0; }

.server-card dl > div {
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, .09);
}

.server-card dt { color: #8796ac; font-size: 9px; }
.server-card dd { margin: 2px 0 0; color: #ffffff; font-size: 10px; font-weight: 650; }

.server-link {
  width: 100%;
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 4px;
  background: rgba(255, 255, 255, .08);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
}

.server-link svg { width: 12px; height: 12px; }

.workspace-shell { min-width: 0; }

.workspace-header {
  position: sticky;
  top: 0;
  z-index: 15;
  min-height: 64px;
  padding: 0 24px;
  background: var(--navy-900);
  display: grid;
  grid-template-columns: 1fr minmax(300px, 420px) 1fr;
  align-items: center;
}

.global-search {
  grid-column: 2;
  min-height: 38px;
  padding: 0 9px 0 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 6px;
  background: rgba(255, 255, 255, .08);
  display: flex;
  align-items: center;
  gap: 8px;
}

.global-search svg { width: 15px; height: 15px; color: #adbad0; }

.global-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font-size: 11px;
}

.global-search input::placeholder { color: #9ba9be; }

kbd {
  padding: 3px 6px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 4px;
  background: rgba(255, 255, 255, .08);
  color: #b8c3d3;
  font-family: Inter, Arial, sans-serif;
  font-size: 9px;
}

.header-actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-actions .identity {
  min-width: 160px;
  padding-left: 17px;
  border-left: 1px solid rgba(255, 255, 255, .13);
}

.identity {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #ffffff;
  font-size: 10px;
}

.identity > div:last-child { min-width: 0; }
.identity strong,
.identity span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity strong { font-weight: 650; }
.identity span { margin-top: 1px; color: #a6b3c6; font-size: 9px; }

.identity img,
.avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  background: #dfe4ea;
}

.icon-button {
  position: relative;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #c7d2e2;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.icon-button:hover { background: rgba(255, 255, 255, .08); color: #ffffff; }
.icon-button svg { width: 16px; height: 16px; }

.notification-dot {
  position: absolute;
  top: 2px;
  right: 1px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border: 2px solid var(--navy-900);
  border-radius: 50%;
  background: #4b83ef;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
}
.notification-dot:empty { display: none; }

.notification-control {
  position: relative;
}

.notification-menu {
  position: absolute;
  top: calc(100% + 13px);
  right: -6px;
  z-index: 42;
  width: min(390px, calc(100vw - 26px));
  overflow: hidden;
  border: 1px solid #d8dee7;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(4, 18, 40, .22);
}

.notification-menu::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 17px;
  width: 10px;
  height: 10px;
  border-top: 1px solid #d8dee7;
  border-left: 1px solid #d8dee7;
  background: #ffffff;
  transform: rotate(45deg);
}

.notification-head {
  position: relative;
  z-index: 1;
  min-height: 68px;
  padding: 14px 14px 13px;
  border-bottom: 1px solid #e7ebf1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notification-head strong,
.notification-head span {
  display: block;
}

.notification-head strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

.notification-head span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.notification-list {
  position: relative;
  z-index: 1;
  max-height: 360px;
  overflow-y: auto;
  padding: 6px;
}

.notification-item {
  width: 100%;
  min-height: 72px;
  padding: 10px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.notification-item:hover {
  border-color: transparent;
  background: #f4f7fb;
}

.notification-item + .notification-item {
  border-top: 1px solid #edf0f4;
}

.notification-icon {
  width: 34px;
  height: 34px;
  border-radius: 5px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
}

.notification-item.urgent .notification-icon { background: #fdebed; color: #d34750; }
.notification-item.pending .notification-icon { background: #fff4d8; color: #b57910; }
.notification-item.clear .notification-icon { background: #e8f5ec; color: #328454; }
.notification-item.quiet .notification-icon { background: #eef1f5; color: #708096; }

.notification-icon svg {
  width: 17px;
  height: 17px;
}

.notification-copy {
  min-width: 0;
}

.notification-copy strong,
.notification-copy small {
  display: block;
}

.notification-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #18263e;
  font-size: 12px;
  font-weight: 700;
}

.notification-copy small {
  margin-top: 3px;
  color: #65738b;
  font-size: 10px;
  line-height: 1.4;
}

.notification-item em,
.notification-item b {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 12px;
  background: var(--blue);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

.notification-item b {
  background: #edf3ff;
  color: var(--blue);
}

.notification-item > svg {
  width: 15px;
  height: 15px;
  color: #8190a6;
}

.notification-empty {
  min-height: 150px;
  padding: 28px 18px;
  color: var(--muted);
  display: grid;
  place-items: center;
  text-align: center;
}

.notification-empty svg {
  width: 24px;
  height: 24px;
  color: #7890b5;
}

.notification-empty strong,
.notification-empty span {
  display: block;
}

.notification-empty strong {
  margin-top: 8px;
  color: var(--ink);
  font-size: 13px;
}

.notification-empty span {
  margin-top: 3px;
  font-size: 10px;
}

.notification-foot {
  position: relative;
  z-index: 1;
  padding: 10px;
  border-top: 1px solid #e7ebf1;
  background: #fbfcfe;
}

.notification-foot button {
  width: 100%;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

#notificationButton[aria-expanded="true"] {
  background: rgba(255, 255, 255, .1);
  color: #ffffff;
}

main { width: 100%; padding: 21px 24px 44px; }

.page-title {
  min-height: 52px;
  margin-bottom: 17px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

h1 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

h2 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.eyebrow {
  margin: 0;
  color: #61708a;
  font-size: 9px;
  font-weight: 650;
  text-transform: uppercase;
}

.page-context {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.page-title > div:first-child > .eyebrow { display: none; }

.page-title-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-title-right #clock { color: var(--muted); font-size: 10px; }

.icon-button.bordered {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: #536178;
}

.icon-button.bordered:hover { border-color: #aab4c2; background: var(--surface-soft); color: var(--ink); }

button,
.primary,
.danger,
.soft,
.ghost {
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: #23324b;
  font-family: Inter, Arial, sans-serif;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

button:hover { border-color: #a8b2c1; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(40, 103, 220, .18);
  outline-offset: 1px;
}

.primary { border-color: var(--blue); background: var(--blue); color: #ffffff; }
.primary:hover { border-color: #1f56bd; background: #1f56bd; }
.danger { border-color: #d84750; background: #d84750; color: #ffffff; }
.soft { background: var(--surface-soft); }
.ghost { background: transparent; }
.compact-button { min-height: 29px; padding: 5px 9px; display: inline-flex; align-items: center; gap: 5px; }
.compact-button svg { width: 14px; height: 14px; flex: 0 0 14px; stroke: currentColor; }

.modal-footer .modal-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.modal-footer .modal-submit svg { width: 14px; height: 14px; flex: 0 0 14px; }

.actions,
.button-row,
.shortcut-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.summary-row {
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.summary-row article {
  min-width: 0;
  min-height: 126px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(18, 30, 50, .025);
}

.metric-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.metric-top span {
  color: #4f5e77;
  font-size: 9px;
  font-weight: 650;
  text-transform: uppercase;
}

.metric-top svg { width: 28px; height: 28px; color: var(--blue); }

.summary-row strong {
  display: block;
  margin-top: 12px;
  color: var(--ink);
  font-size: 25px;
  font-weight: 650;
  line-height: 1;
}

.summary-row small { display: block; margin-top: 12px; color: var(--muted); font-size: 9px; }

.two-col,
.comms-layout,
.dashboard-primary,
.development-layout { display: grid; align-items: start; gap: 16px; }

.two-col { grid-template-columns: minmax(0, 1.6fr) minmax(300px, .4fr); }
.dashboard-primary { grid-template-columns: minmax(0, 1.35fr) minmax(360px, .85fr); margin-bottom: 16px; }
.dashboard-secondary { display: grid; grid-template-columns: .75fr 1fr 1.05fr; gap: 16px; }
.comms-layout { grid-template-columns: minmax(0, 1fr) 390px; }
.development-layout { grid-template-columns: minmax(0, 1.3fr) minmax(350px, .7fr); }

.panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(18, 30, 50, .02);
}

.section-head {
  min-height: 49px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head > div { min-width: 0; }
.section-head span { display: block; margin-top: 2px; color: var(--quiet); font-size: 9px; font-weight: 500; }

.table-link {
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: #35445d;
  font-size: 9px;
  font-weight: 600;
}

.table-wrap { overflow: auto; background: var(--surface); }
table { width: 100%; min-width: 690px; border-collapse: collapse; }
.dashboard-primary > .panel:first-child table { min-width: 560px; }

th,
td {
  padding: 10px 14px;
  border-bottom: 1px solid #e8ebf0;
  text-align: left;
  vertical-align: middle;
  font-size: 9px;
}

th {
  background: #fbfcfd;
  color: #6a7790;
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
}

tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfc; }
.muted { color: var(--muted); }

.dashboard-actions-wrap {
  height: calc(100% - 53px);
  overflow: hidden;
}

.dashboard-actions-table {
  table-layout: fixed;
  min-width: 760px;
}

.dashboard-actions-table th {
  height: 42px;
  padding: 0 14px;
  background: #fbfcfe;
  color: #6c7890;
  font-size: 8px;
  font-weight: 700;
}

.dashboard-actions-table th:nth-child(1) { width: 128px; }
.dashboard-actions-table th:nth-child(2) { width: 174px; }
.dashboard-actions-table th:nth-child(3) { width: 150px; }
.dashboard-actions-table th:nth-child(4) { width: 132px; }
.dashboard-actions-table th:nth-child(6) { width: 62px; }

.dashboard-actions-table td {
  height: 50px;
  padding: 8px 14px;
  color: #26354d;
  font-size: 10px;
  line-height: 1.35;
  white-space: nowrap;
}

.dashboard-actions-table tbody tr:hover {
  background: #fbfcff;
}

.staff-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.staff-cell strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #21304a;
  font-size: 10px;
  font-weight: 650;
}

.table-avatar,
.staff-cell img {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 50%;
  background: #e9edf2;
  color: #53647d;
  display: grid;
  place-items: center;
  object-fit: cover;
}

.table-avatar svg { width: 13px; height: 13px; }

.action-cell {
  min-width: 0;
  color: #27364f;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
}

.action-cell svg {
  width: 15px;
  height: 15px;
  color: #2f6fdf;
}

.action-cell.warn svg { color: #df9c22; }
.action-cell.kick svg,
.action-cell.ban svg,
.action-cell.timeout svg { color: #e04b53; }
.action-cell.unban svg,
.action-cell.untimeout svg { color: #36a05e; }
.action-cell.note svg { color: #3979ef; }

.action-time,
.action-target,
.action-detail {
  overflow: hidden;
  text-overflow: ellipsis;
}

.action-time {
  color: #536178;
  font-variant-numeric: tabular-nums;
}

.action-target {
  color: #3d4c63;
  font-weight: 500;
}

.dashboard-actions-table .action-detail {
  max-width: none;
  color: #2d3c54;
  white-space: nowrap;
}

.row-view {
  min-height: 28px;
  padding: 5px 10px;
  border-color: #d7dee8;
  background: #ffffff;
  color: #283852;
  font-size: 9px;
  font-weight: 650;
}

.pill {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  padding: 3px 7px;
  border-radius: 4px;
  background: #eef2f7;
  color: #4c5b72;
  font-size: 8px;
  font-weight: 650;
  text-transform: uppercase;
}

.pill.open,
.pill.priority-high { background: #fff4d8; color: #916613; }
.pill.claimed,
.pill.in_progress { background: #e8f0ff; color: #2860c5; }
.pill.closed,
.pill.done { background: #e8f5ec; color: #328454; }
.pill.blocked,
.pill.priority-urgent,
.pill.ban { background: #fdebed; color: #c63f49; }
.pill.warn { background: #fff4d8; color: #916613; }
.pill.kick { background: #eef1f5; color: #536178; }
.pill.revocation,
.pill.revoked { background: #e8f5ec; color: #277843; }
.pill.priority-low { background: #eef1f5; color: #6e7a8b; }
.pill.pending { background: #fff4d8; color: #8c610d; }
.pill.approved,
.pill.accepted,
.pill.completed { background: #e8f5ec; color: #277843; }
.pill.denied,
.pill.rejected,
.pill.cancelled,
.pill.failed { background: #fdebed; color: #bd3540; }
.pill.progress { background: #e8f0ff; color: #2860c5; }

.ticket-line {
  min-height: 54px;
  padding: 11px 14px;
  border-bottom: 1px solid #e8ebf0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ticket-line strong,
.ticket-line span,
.history-list strong,
.history-list span,
.staff-block strong,
.staff-block span,
.callout strong,
.callout span { display: block; }

.ticket-line strong,
.history-list strong { font-size: 9px; font-weight: 600; }
.ticket-line span,
.history-list span { margin-top: 3px; color: var(--muted); font-size: 8px; }

.status-list { margin: 0; padding: 8px 14px; }

.status-list > div {
  min-height: 37px;
  border-bottom: 1px solid #e8ebf0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-list > div:last-child { border-bottom: 0; }
.status-list dt { color: var(--muted); font-size: 9px; }
.status-list dd { margin: 0; color: #2f3d55; font-size: 9px; font-weight: 600; }
.status-list .live-dot { margin-right: 5px; width: 6px; height: 6px; }

.panel-button {
  width: calc(100% - 28px);
  min-height: 31px;
  margin: 5px 14px 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.panel-button svg { width: 12px; height: 12px; }

.compact-list > div {
  min-height: 55px;
  padding: 10px 14px;
  border-bottom: 1px solid #e8ebf0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.compact-list strong,
.compact-list span { display: block; }
.compact-list strong { font-size: 9px; font-weight: 600; }
.compact-list span { margin-top: 3px; color: var(--muted); font-size: 8px; }

.announcement-list article {
  min-height: 65px;
  padding: 11px 14px;
  border-bottom: 1px solid #e8ebf0;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.announcement-symbol {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  flex: 0 0 17px;
  color: #315fbc;
  display: grid;
  place-items: center;
}

.announcement-symbol svg { width: 14px; height: 14px; }
.announcement-row.important .announcement-symbol { color: #53647e; }
.announcement-row.urgent .announcement-symbol { color: #d5444c; }
.announcement-copy { min-width: 0; }
.announcement-list strong { display: block; color: #17243a; font-size: 9px; font-weight: 650; }
.announcement-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.announcement-list .announcement-copy > span { display: block; margin-top: 5px; color: #718099; font-size: 8px; }
.announcement-list .announcement-copy > span b { color: #2d67c8; font-weight: 500; }

.staff-block,
.callout {
  margin: 14px;
  padding: 10px 12px;
  border: 1px solid #d6e2f4;
  border-left: 3px solid var(--blue);
  border-radius: 4px;
  background: #f5f8fd;
  color: #32435e;
}

.staff-block strong,
.callout strong { font-size: 9px; }
.staff-block span,
.callout span { margin-top: 3px; color: #64728a; font-size: 9px; line-height: 1.45; }

.empty { padding: 34px 20px; background: var(--surface); color: var(--muted); font-size: 10px; text-align: center; }
.empty.compact { padding: 16px; }

.task-list,
.resource-list { display: grid; }

.task-item {
  min-height: 78px;
  padding: 13px 15px;
  border-bottom: 1px solid #e8ebf0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 115px;
  align-items: flex-start;
  gap: 10px;
}

.task-item:last-child,
.resource-item:last-child { border-bottom: 0; }
.task-item.is-done .task-copy > strong,
.task-item.is-done .task-title-row > strong { color: var(--quiet); text-decoration: line-through; }

.task-check {
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  display: grid;
  place-items: center;
}

.task-check:disabled { cursor: default; opacity: .7; }
.task-check svg { width: 17px; height: 17px; }
.task-copy { min-width: 0; }
.task-copy > strong { display: block; font-size: 10px; font-weight: 650; }
.task-copy > p { max-width: 720px; margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.task-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task-title-row > strong { font-size: 10px; font-weight: 650; }
.task-item.is-overdue { box-shadow: inset 3px 0 0 var(--red); }

.task-meta { margin-top: 7px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task-meta > span { color: var(--muted); display: inline-flex; align-items: center; gap: 4px; font-size: 8px; }
.task-meta svg { width: 11px; height: 11px; }

.task-status {
  width: 115px;
  min-height: 29px;
  padding: 5px 7px;
  font-size: 9px;
}

.task-controls {
  width: 155px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.task-controls .task-status {
  min-width: 112px;
}

.task-controls .delete-task {
  width: 30px;
  height: 30px;
  min-height: 30px;
  color: #9a4450;
}

.task-controls .delete-task:hover {
  border-color: #e2b8bf;
  background: #fff5f6;
  color: #c93745;
}

.resource-item {
  min-height: 82px;
  padding: 13px 14px;
  border-bottom: 1px solid #e8ebf0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.resource-icon {
  width: 34px;
  height: 34px;
  border-radius: 5px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
}

.resource-icon svg { width: 16px; height: 16px; }
.resource-category { display: block; color: var(--blue); font-size: 7px; font-weight: 650; text-transform: uppercase; }
.resource-item strong { display: block; margin-top: 2px; font-size: 10px; font-weight: 650; }
.resource-item p { margin: 3px 0 0; color: var(--muted); font-size: 8px; }
.resource-item small { display: block; margin-top: 5px; color: var(--quiet); font-size: 8px; }
.resource-item.is-archived { opacity: .68; }
.resource-actions { display: flex; align-items: center; gap: 3px; }
.resource-actions a { text-decoration: none; }
.resource-actions .icon-button { color: #5e6b7f; }

.form-grid { display: grid; gap: 13px; padding: 15px; }
.modal-confirm-copy { margin: 4px 15px 0; padding: 14px 15px; border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: 5px; background: #f8fafc; color: #45546a; font-size: 12px; line-height: 1.55; }

label {
  display: grid;
  gap: 5px;
  color: #56647b;
  font-size: 9px;
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  padding: 8px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font-size: 10px;
  outline: none;
}

input:focus,
textarea:focus,
select:focus { border-color: #6290e3; box-shadow: 0 0 0 2px rgba(40, 103, 220, .09); }
textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
textarea.short-textarea { min-height: 88px; }
.split,
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.preview-panel { position: sticky; top: 80px; }

.discord-preview {
  margin: 15px;
  padding: 13px 14px;
  border-left: 4px solid var(--blue);
  border-radius: 4px;
  background: #2b2d31;
  color: #f2f3f5;
}

.discord-preview strong { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 650; }
.discord-preview p { margin: 0; color: #d4d7dc; font-size: 10px; line-height: 1.5; }
.discord-preview dl { margin: 11px 0 0; padding-top: 9px; border-top: 1px solid #44474f; }
.discord-preview dt { margin-bottom: 3px; font-size: 9px; font-weight: 650; }
.discord-preview dd { margin: 0; color: #d4d7dc; font-size: 9px; }
.discord-preview small { display: block; margin-top: 10px; color: #aeb3bc; font-size: 8px; }

.image-chip {
  display: inline-flex;
  margin-top: 9px;
  padding: 3px 6px;
  border-radius: 3px;
  background: #3d414a;
  color: #ffffff;
  font-size: 8px;
}

.history-head { margin-top: 11px; border-top: 1px solid var(--line); }
.history-list { display: grid; }
.history-list > div { padding: 10px 14px; border-bottom: 1px solid #e8ebf0; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: 20px;
  background: rgba(4, 13, 28, .66);
  display: grid;
  place-items: center;
}

.modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(4, 14, 30, .28);
}

.modal-title { padding: 14px 15px; border-bottom: 1px solid var(--line); background: var(--surface); }
.modal-title .eyebrow { color: var(--blue); }
.modal-title h2 { margin-top: 4px; }
.modal-footer { padding: 0 15px 15px; display: flex; justify-content: flex-end; gap: 7px; }

#toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  padding: 9px 12px;
  border-radius: 4px;
  background: var(--navy-950);
  color: #ffffff;
  font-size: 9px;
  opacity: 0;
  transform: translateY(7px);
  transition: .16s;
}

#toast.show { opacity: 1; transform: none; }

.code {
  color: #5e6c81;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 8px;
}

.reason { max-width: 430px; white-space: pre-wrap; line-height: 1.4; }

.inline-search {
  max-width: 320px;
}

.players-panel .section-head {
  align-items: center;
}

.player-card-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 12px;
}

.player-card {
  position: relative;
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  box-shadow: 0 1px 2px rgba(18, 30, 50, .025);
}

.player-card:hover {
  border-color: #b7c4d8;
  background: #fbfdff;
}

.player-card-hit {
  position: absolute;
  inset: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.player-card > *:not(.player-card-hit) {
  position: relative;
  z-index: 1;
}

.player-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(145deg, #17396e, #2867dc);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 750;
}

.player-avatar.large {
  width: 62px;
  height: 62px;
  font-size: 23px;
}

.player-card-main {
  min-width: 0;
}

.player-card-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.player-card-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.player-card-head span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
}

.player-card p {
  margin: 4px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 10px;
}

.player-card-meta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #66758d;
  font-size: 11px;
}

.player-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.player-card-meta svg {
  width: 13px;
  height: 13px;
}

.profile-open {
  min-width: 86px;
  justify-content: center;
}

.player-profile-backdrop {
  place-items: stretch end;
  padding: 0;
}

.player-profile-modal {
  width: min(1180px, calc(100vw - 34px));
  height: 100vh;
  max-height: none;
  border-radius: 0;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
}

.player-profile-hero {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f7faff);
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
}

.player-profile-hero .modal-x {
  order: 3;
}

.player-profile-hero h2 {
  margin: 3px 0 2px;
  font-size: 22px;
}

.player-profile-hero span {
  color: var(--muted);
  font-size: 12px;
}

.player-profile-layout {
  height: calc(100vh - 108px);
  overflow: auto;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 16px;
}

.player-profile-main,
.player-profile-side {
  display: grid;
  align-content: start;
  gap: 14px;
}

.player-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.player-action-group {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.player-action-group h4,
.profile-block h3 {
  margin: 0 0 10px;
  color: #1b2a44;
  font-size: 12px;
  font-weight: 750;
}

.player-action-group > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.observation-controls {
  grid-column: 1 / -1;
}

.observation-controls p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.observation-controls button {
  justify-content: center;
}

.watch-screen.active {
  background: #a92f3c;
  border-color: #a92f3c;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.button-link svg {
  width: 14px;
  height: 14px;
}

.player-action {
  justify-content: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.player-action svg {
  width: 14px;
  height: 14px;
}

.profile-block {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.identifier-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.identifier-grid div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e5ebf3;
  border-radius: 5px;
  background: #f8fafc;
}

.identifier-grid dt {
  margin-bottom: 3px;
  color: #687790;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.identifier-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #16243c;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 10px;
  line-height: 1.45;
}

.copy-identifiers {
  margin-top: 12px;
}

.profile-mini-row {
  padding: 10px 0;
  border-bottom: 1px solid #e8ebf0;
}

.profile-mini-row:last-child {
  border-bottom: 0;
}

.profile-mini-row strong,
.profile-mini-row span {
  display: block;
}

.profile-mini-row strong {
  color: #17243a;
  font-size: 11px;
}

.profile-mini-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.screenshot-thumb {
  margin: 0 0 10px;
  overflow: hidden;
  border: 1px solid #dfe6f0;
  border-radius: 6px;
  background: #f8fafc;
}

.screenshot-thumb:last-child {
  margin-bottom: 0;
}

.screenshot-thumb img {
  width: 100%;
  max-height: 220px;
  display: block;
  object-fit: cover;
  background: #0d1626;
}

.screenshot-thumb figcaption {
  padding: 7px 9px;
  color: #66758d;
  font-size: 9px;
}

code {
  padding: 2px 4px;
  border-radius: 3px;
  background: rgba(40, 103, 220, .08);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 8px;
}

.login-shell {
  min-height: 100vh;
  padding: 32px;
  background: var(--canvas);
  display: grid;
  place-items: center;
}

.login-frame {
  width: min(860px, 100%);
  min-height: 440px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(8, 25, 53, .13);
  display: grid;
  grid-template-columns: 1.08fr .92fr;
}

.login-branding {
  padding: 34px 40px;
  background: var(--navy-900);
  color: #ffffff;
  display: flex;
  flex-direction: column;
}

.login-intro { margin: auto 0; }
.login-intro .eyebrow { color: #78a6f7; }
.login-intro h1 { margin: 8px 0 12px; color: #ffffff; font-size: 30px; }
.login-intro p:last-child { max-width: 360px; margin: 0; color: #aebacd; font-size: 12px; line-height: 1.6; }
.system-line { color: #91a0b5; font-size: 9px; }
.system-line span { width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #50b975; display: inline-block; }

.login-card { padding: 42px 40px; display: flex; flex-direction: column; justify-content: center; }
.login-card .eyebrow { color: var(--blue); }
.login-card h2 { margin: 6px 0 8px; font-size: 22px; }
.login-card p.muted { margin: 0 0 23px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.login-card .primary { display: block; min-height: 39px; padding: 11px 13px; text-align: center; text-decoration: none; }
.login-card small { margin-top: 10px; color: var(--quiet); font-size: 8px; text-align: center; }

/* Screenshot-locked desktop layout: 1920px wide reference, 998px page viewport. */
@media (min-width: 1261px) {
  :root {
    --navy-950: #041630;
    --navy-900: #061d42;
    --navy-850: #0a2752;
    --canvas: #f7f8fa;
    --line: #dfe3e9;
  }

  .shell { grid-template-columns: 268px minmax(0, 1fr); }
  .sidebar { grid-template-rows: 70px minmax(0, 1fr); }
  .side-brand { padding: 15px 18px; }
  .brand-mark.small:not(.logo-mark) { width: 48px; height: 40px; }
  .brand-mark svg { width: 36px; height: 30px; }
  .brand strong { font-size: 18px; }
  .brand span { margin-top: 3px; font-size: 10px; }

  nav { padding: 14px 10px 16px; }
  .nav-group { margin-bottom: 16px; }
  .nav-group > p { padding: 5px 7px 7px; font-size: 9px; }
  nav button { min-height: 42px; padding: 0 16px; font-size: 12px; gap: 13px; }
  nav button svg { width: 18px; height: 18px; }
  nav button.active::before { left: -10px; width: 2px; }

  .nav-badge {
    min-width: 28px;
    height: 23px;
    margin-left: auto;
    padding: 0 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .1);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-style: normal;
    font-weight: 650;
  }

  .nav-badge:empty { display: none; }

  .server-card { margin: 0 14px 16px; padding: 14px; }
  .server-card > strong { font-size: 13px; }
  .server-online { font-size: 10px; }
  .server-card dt { font-size: 10px; }
  .server-card dd { font-size: 11px; }
  .server-link { min-height: 40px; font-size: 10px; }

  .workspace-header {
    min-height: 66px;
    padding: 0 26px;
    grid-template-columns: 1fr 384px 1fr;
  }

  .global-search { min-height: 41px; border-radius: 7px; transform: translateX(-88px); }
  .global-search input { font-size: 11px; }
  .header-actions { gap: 15px; }
  .header-actions .identity { min-width: 190px; }
  .identity { font-size: 11px; }
  .identity span { font-size: 10px; }
  .identity img,
  .avatar { width: 39px; height: 39px; }

  main { padding: 22px 28px 36px; }
  .page-title { min-height: 52px; margin-bottom: 17px; }
  h1 { font-size: 23px; }
  .page-context { margin-top: 4px; font-size: 10px; }
  .page-title-right #clock { font-size: 10px; }

  .summary-row { margin-bottom: 17px; gap: 16px; }
  .summary-row article { position: relative; min-height: 145px; padding: 17px 18px; }
  .metric-top span { font-size: 10px; }
  .metric-top svg { width: 35px; height: 35px; }
  .metric-value { margin-top: 13px; display: flex; align-items: baseline; gap: 7px; }
  .summary-row strong { margin: 0; font-size: 27px; }
  .metric-value b { color: #7d889a; font-size: 12px; font-weight: 500; }
  .summary-row small { margin-top: 15px; font-size: 10px; }
  .metric-note.up { color: #32945a; }
  .metric-note.down { color: #d94950; }
  .metric-note.link { color: #647189; }
  .metric-spark {
    position: absolute;
    right: 17px;
    bottom: 10px;
    width: 126px;
    height: 38px;
    overflow: visible;
  }
  .metric-spark polyline { fill: none; stroke: #3979ef; stroke-width: 1.5; vector-effect: non-scaling-stroke; }

  .dashboard-primary {
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
    gap: 17px;
    margin-bottom: 21px;
  }
  .dashboard-primary > .panel { height: 306px; }
  .section-head { min-height: 53px; padding: 12px 17px; }
  .section-head h2 { font-size: 14px; }
  .table-link { min-height: 31px; padding: 5px 11px; font-size: 9px; }
  .dashboard-primary table { min-width: 100%; }
  .dashboard-primary .dashboard-actions-table { min-width: 760px; }
  .dashboard-primary th { height: 40px; font-size: 8px; }
  .dashboard-primary td { height: 42px; padding: 8px 13px; font-size: 9px; }
  .dashboard-primary .dashboard-actions-table th { height: 42px; padding: 0 14px; font-size: 8px; }
  .dashboard-primary .dashboard-actions-table td { height: 50px; padding: 8px 14px; font-size: 10px; }
  .staff-cell { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
  .table-avatar,
  .staff-cell img { width: 24px; height: 24px; flex-basis: 24px; border-radius: 50%; background: #e9edf2; color: #53647d; display: grid; place-items: center; }
  .table-avatar svg { width: 13px; height: 13px; }
  .action-cell { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
  .action-cell svg { width: 15px; height: 15px; color: #3272dd; }
  .action-cell.warn svg { color: #e29a21; }
  .action-cell.kick svg,
  .action-cell.ban svg,
  .action-cell.timeout svg { color: #e04b53; }
  .action-cell.unban svg,
  .action-cell.untimeout svg { color: #36a05e; }
  .row-view { min-height: 28px; padding: 5px 10px; font-size: 9px; }

  .request-list { padding: 10px 14px; }
  .request-row {
    min-height: 47px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-bottom: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr) 86px 56px;
    align-items: center;
    gap: 10px;
  }
  .request-row:first-child { border-radius: 5px 5px 0 0; }
  .request-row:last-child { border-bottom: 1px solid var(--line); border-radius: 0 0 5px 5px; }
  .request-row strong { font-size: 9px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .request-user { color: #61708a; font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .request-row .pill { justify-self: start; text-transform: none; }
  .request-row time { color: #6d7890; font-size: 9px; text-align: right; }

  .dashboard-secondary {
    grid-template-columns: minmax(0, 1.21fr) minmax(0, .81fr) minmax(0, .8fr) minmax(0, .96fr);
    gap: 17px;
  }
  .dashboard-secondary > .panel { height: 315px; }
  .dashboard-secondary .section-head { min-height: 53px; }
  .dashboard-secondary .section-head h2 small { color: #647189; font-size: 9px; font-weight: 500; }

  .activity-chart { position: relative; height: 257px; padding: 30px 20px 40px 45px; }
  .activity-chart > svg { width: 100%; height: 168px; overflow: visible; }
  .chart-grid line { stroke: #dce4ef; stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
  .activity-line { fill: none; stroke: #2d70ef; stroke-width: 2; vector-effect: non-scaling-stroke; }
  .activity-points circle { fill: #2d70ef; }
  .chart-y { position: absolute; top: 28px; bottom: 42px; left: 16px; display: flex; flex-direction: column; justify-content: space-between; color: #6e7a90; font-size: 9px; }
  .chart-x { position: absolute; right: 18px; bottom: 30px; left: 43px; display: flex; justify-content: space-between; color: #6e7a90; font-size: 9px; }
  .chart-legend { position: absolute; bottom: 8px; left: 50%; color: #536078; display: flex; align-items: center; gap: 6px; font-size: 9px; transform: translateX(-50%); }
  .chart-legend i { width: 19px; height: 2px; background: #2d70ef; }

  .status-list { padding: 6px 17px; }
  .status-list > div { min-height: 41px; }
  .status-list dt,
  .status-list dd { font-size: 9px; }
  .status-panel .panel-button { margin-top: 4px; }

  .alert-list { padding: 9px 16px; }
  .alert-list article { min-height: 57px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
  .alert-list article:last-child { border-bottom: 0; }
  .priority-box { width: 28px; height: 28px; border-radius: 5px; background: #f2b522; color: #ffffff; display: grid; place-items: center; font-size: 9px; font-weight: 700; }
  .priority-box.urgent { background: #dc424a; }
  .priority-box.high { background: #ef9416; }
  .priority-box.low { background: #6391d9; }
  .alert-list strong { display: block; font-size: 9px; }
  .alert-list p { margin: 2px 0 0; color: #65728a; font-size: 8px; }
  .alert-list time { color: #65728a; font-size: 8px; }

  .announcement-list article { min-height: 91px; padding: 13px 17px; gap: 10px; }
  .announcement-symbol { width: 18px; height: 18px; flex-basis: 18px; }
  .announcement-symbol svg { width: 15px; height: 15px; }
  .announcement-list strong { font-size: 10px; }
  .announcement-list p { margin-top: 5px; color: #24334c; font-size: 9px; line-height: 1.45; }
  .announcement-list .announcement-copy > span { margin-top: 5px; font-size: 8px; }
  .panel-button { min-height: 35px; margin: 7px 14px 13px; font-size: 9px; }
}

@media (max-width: 1260px) {
  .shell { grid-template-columns: 220px minmax(0, 1fr); }
  .dashboard-primary { grid-template-columns: 1fr; }
  .dashboard-secondary { grid-template-columns: repeat(3, 1fr); }
  .development-layout { grid-template-columns: 1fr; }
  .member-home-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1080px) {
  .summary-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-secondary { grid-template-columns: 1fr 1fr; }
  .two-col,
  .comms-layout { grid-template-columns: 1fr; }
  .preview-panel { position: static; }
}

@media (max-width: 860px) {
  .shell { display: block; }
  .sidebar { position: static; height: auto; overflow: visible; display: block; }
  .side-brand { min-height: 66px; padding: 8px 14px; }
  .brand-mark.logo-mark,
  .brand-mark.small.logo-mark { width: 50px; height: 50px; }
  nav { padding: 6px 8px 9px; display: flex; gap: 12px; overflow-x: auto; }
  nav { scrollbar-width: none; }
  nav::-webkit-scrollbar { display: none; }
  .nav-group { margin: 0; display: flex; align-items: center; gap: 2px; }
  .nav-group > p { display: none; }
  nav button { width: auto; min-width: max-content; padding: 0 11px; }
  nav button.active::before { top: auto; right: 10px; bottom: -9px; left: 10px; width: auto; height: 2px; }
  .server-card { display: none; }
  .workspace-header { position: static; grid-template-columns: minmax(220px, 1fr) auto; padding: 0 15px; }
  .global-search { grid-column: 1; }
  .header-actions { grid-column: 2; }
  main { padding: 20px 16px 40px; }
}

@media (max-width: 680px) {
  .workspace-header { grid-template-columns: minmax(0, 1fr) auto; }
  .header-actions .identity { min-width: 0; padding-left: 10px; }
  .identity > div:last-child { display: none; }
  .header-actions { gap: 6px; }
  kbd { display: none; }
  .page-title { align-items: flex-start; flex-direction: column; gap: 7px; }
  .page-title-right { width: 100%; justify-content: space-between; }
  .summary-row { grid-template-columns: 1fr 1fr; }
  .dashboard-secondary { grid-template-columns: 1fr; }
  .split,
  .field-grid { grid-template-columns: 1fr; }
  .member-welcome { align-items: flex-start; flex-direction: column; padding: 21px; }
  .member-welcome h2 { font-size: 22px; }
  .member-quick-grid { grid-template-columns: 1fr 1fr; }
  .login-shell { padding: 16px; }
  .login-frame { min-height: 0; grid-template-columns: 1fr; }
  .login-branding { min-height: 230px; padding: 26px; }
  .login-intro { margin: 36px 0; }
  .login-intro h1 { font-size: 26px; }
  .login-card { padding: 32px 26px; }
}

@media (max-width: 430px) {
  .workspace-header { min-height: 56px; }
  .summary-row { grid-template-columns: 1fr; }
  .summary-row article { min-height: 108px; }
  .member-quick-grid { grid-template-columns: 1fr; }
  .task-item { grid-template-columns: 22px minmax(0, 1fr); }
  .task-status { grid-column: 2; width: 100%; }
  .resource-item { grid-template-columns: 34px minmax(0, 1fr); }
  .resource-actions { grid-column: 2; }
}

/* Readable operational scale and live chart treatment. */
h2 { font-size: 15px; }
.section-head span { font-size: 11px; }
th { font-size: 10px; }
td { font-size: 11px; }
button,
.primary,
.danger,
.soft,
.ghost { font-size: 11px; }
label { font-size: 11px; }
input,
textarea,
select { min-height: 36px; font-size: 12px; }
.task-copy > strong,
.resource-item strong { font-size: 12px; }
.task-copy > p,
.resource-item p { font-size: 10px; }
.resource-category { font-size: 9px; letter-spacing: 0; }
.summary-row article { position: relative; }
.metric-value { display: flex; align-items: baseline; gap: 7px; }
.metric-value strong { margin: 12px 0 0; }
.metric-value b { color: #7d889a; font-size: 12px; font-weight: 500; }
.metric-top svg { position: absolute; top: 20px; right: 21px; width: 28px; height: 28px; }
.metric-spark { position: absolute; right: 16px; bottom: 10px; width: 122px; height: 34px; overflow: visible; }
.metric-spark path { fill: url(#sparkFill); stroke: none; }
.metric-spark polyline { fill: none; }
.activity-area { fill: url(#activityFill); stroke: none; }
.live-dot.offline { background: #a9b2c0; }
.server-online i.offline { background: #a9b2c0; }
.chart-empty { height: 168px; color: var(--muted); display: grid; place-items: center; font-size: 11px; text-align: center; }

.member-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .7fr);
  gap: 16px;
  align-items: start;
}

.member-home {
  display: grid;
  gap: 18px;
}

.member-welcome {
  min-height: 124px;
  padding: 25px 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.member-welcome h2 {
  margin: 0;
  color: #12203a;
  font-size: 25px;
  line-height: 1.2;
}

.member-welcome p {
  margin: 10px 0 0;
  color: #647189;
  font-size: 13px;
}

.member-welcome p strong {
  color: var(--blue);
  font-weight: 750;
}

.member-quick-panel {
  border-color: #d6dde8;
}

.quick-title {
  min-height: 52px;
  padding: 15px 20px;
  background: var(--navy-900);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

.member-quick-grid {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
}

.member-quick-card {
  min-height: 144px;
  padding: 20px 18px;
  border: 0;
  border-radius: 0;
  background: #213854;
  color: #ffffff;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 9px;
  text-align: center;
}

.member-quick-card:hover {
  border-color: transparent;
  filter: brightness(1.04);
}

.member-quick-card.green { background: #2e825f; }
.member-quick-card.dark { background: #20232a; }
.member-quick-card.blue { background: #1f3859; }

.member-quick-card svg {
  width: 31px;
  height: 31px;
}

.member-quick-card strong {
  font-size: 14px;
  font-weight: 750;
}

.member-quick-card span {
  max-width: 190px;
  color: rgba(255, 255, 255, .76);
  font-size: 10px;
  line-height: 1.35;
}

.member-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.member-side-stack {
  display: grid;
  gap: 18px;
}

.member-post-list {
  display: grid;
}

.member-post {
  min-height: 112px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
}

.member-post:last-child {
  border-bottom: 0;
}

.member-post-icon {
  width: 40px;
  height: 40px;
  border-radius: 5px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
}

.member-post-icon.devlog {
  background: #eef2f7;
  color: #4f5e77;
}

.member-post-icon svg {
  width: 18px;
  height: 18px;
}

.member-post-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.member-post h3 {
  margin: 0;
  color: #13213a;
  font-size: 14px;
}

.member-post p {
  margin: 7px 0 0;
  color: #48566d;
  font-size: 12px;
  line-height: 1.55;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.member-post span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
}

.member-account-summary {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-account-summary img,
.profile-avatar.small {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  background: #edf1f6;
  color: #53647d;
  display: grid;
  place-items: center;
  object-fit: cover;
}

.profile-avatar.small svg {
  width: 18px;
  height: 18px;
}

.member-account-summary strong,
.member-account-summary span {
  display: block;
}

.member-account-summary strong {
  color: #17243a;
  font-size: 13px;
}

.member-account-summary span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.member-mini-list {
  display: grid;
}

.member-mini-list > div {
  min-height: 72px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
}

.member-mini-list > div:last-child {
  border-bottom: 0;
}

.member-mini-list strong,
.member-mini-list span {
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-mini-list strong {
  color: #1b2a42;
  font-size: 12px;
}

.member-mini-list span {
  grid-column: 1;
  color: var(--muted);
  font-size: 10px;
}

.member-mini-list .pill {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.member-requests-panel { grid-column: 1 / -1; }
.profile-summary { padding: 24px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.profile-summary img,
.profile-avatar { width: 64px; height: 64px; border-radius: 50%; background: #edf1f6; color: #53647d; display: grid; place-items: center; }
.profile-avatar svg { width: 26px; height: 26px; }
.profile-summary h2 { margin: 0; font-size: 20px; }
.profile-summary p { margin: 3px 0 0; color: var(--blue); font-size: 12px; font-weight: 600; }
.profile-summary span { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
.detail-list { margin: 0; padding: 8px 20px 16px; }
.detail-list > div { min-height: 45px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--muted); font-size: 11px; }
.detail-list dd { margin: 0; font-size: 11px; font-weight: 600; }
.trust-score-block { padding: 30px 22px 16px; display: flex; align-items: baseline; gap: 5px; }
.trust-score-block > strong { font-size: 44px; line-height: 1; }
.trust-score-block > span { color: var(--muted); font-size: 14px; }
.trust-level { margin-left: auto; padding: 5px 8px; border-radius: 4px; background: #e8f5ec; color: #328454; font-size: 10px; }
.trust-level.review,
.trust-level.concern { background: #fff4d8; color: #916613; }
.trust-level.restricted { background: #fdebed; color: #c63f49; }
.trust-track { height: 7px; margin: 0 22px; overflow: hidden; border-radius: 4px; background: #e8edf3; }
.trust-track i { height: 100%; background: var(--blue); display: block; }
.panel-copy { margin: 16px 22px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.trust-inline { color: var(--muted); font-size: 11px; }
.trust-inline strong { color: var(--ink); font-size: 14px; }

.roleplay-layout,
.staff-news-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.scene-form-panel,
.staff-news-layout > aside { position: sticky; top: 82px; }
.request-cards { display: grid; }
.scene-request { padding: 18px; border-bottom: 1px solid var(--line); }
.scene-request:last-child { border-bottom: 0; }
.scene-request-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.scene-request h3,
.staff-news-item h3 { margin: 3px 0 0; font-size: 13px; font-weight: 650; }
.scene-request > p { margin: 10px 0 14px; color: #46546b; font-size: 11px; line-height: 1.6; }
.scene-request dl { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.scene-request dl div { min-width: 0; }
.scene-request dt { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.scene-request dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 10px; }
.review-note { margin-top: 13px; padding: 10px 12px; border-left: 3px solid var(--blue); background: #f5f8fd; }
.review-note strong,
.review-note span { display: block; font-size: 10px; }
.review-note span { margin-top: 3px; color: var(--muted); }
.scene-actions { margin-top: 14px; display: flex; justify-content: flex-end; }
.scene-status { width: 140px; }
.score-number { min-width: 36px; color: var(--green); display: inline-block; font-size: 14px; font-weight: 700; }
.score-number.review,
.score-number.concern { color: var(--amber); }
.score-number.restricted { color: var(--red); }

.roleplay-stats {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.roleplay-stats article {
  min-height: 108px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  position: relative;
}

.roleplay-stats span {
  color: #536178;
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
}

.roleplay-stats strong {
  display: block;
  margin-top: 13px;
  color: var(--ink);
  font-size: 29px;
  font-weight: 650;
  line-height: 1;
}

.roleplay-stats svg {
  position: absolute;
  top: 21px;
  right: 21px;
  width: 25px;
  height: 25px;
  color: var(--blue);
}

.roleplay-board {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.request-filter-panel {
  position: sticky;
  top: 84px;
}

.request-filters {
  padding: 18px 20px 20px;
  display: grid;
  gap: 16px;
}

.status-filter-list {
  display: grid;
  gap: 4px;
}

.status-filter-list button {
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  border: 0;
  background: transparent;
  color: #34435b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.status-filter-list button:hover,
.status-filter-list button.active {
  background: #eef3fb;
  color: var(--blue);
}

.status-filter-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-filter-list em {
  min-width: 26px;
  min-height: 20px;
  padding: 3px 7px;
  border-radius: 10px;
  background: #eef2f7;
  color: #61708a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-style: normal;
  font-weight: 650;
}

.status-filter-list button.active em {
  background: #dbe8ff;
  color: #2358b8;
}

body[data-page="roleplay"] .request-cards {
  background: var(--surface);
}

body[data-page="roleplay"] .scene-request {
  min-height: 132px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}

.scene-status-mark {
  width: 38px;
  height: 38px;
  border-radius: 5px;
  background: #eef2f7;
  color: #627089;
  display: grid;
  place-items: center;
}

.scene-status-mark svg {
  width: 18px;
  height: 18px;
}

.scene-status-mark.pending { background: #fff4d8; color: #8c610d; }
.scene-status-mark.accepted { background: #e8f5ec; color: #277843; }
.scene-status-mark.denied { background: #fdebed; color: #bd3540; }
.scene-status-mark.progress { background: #e8f0ff; color: #2860c5; }

.scene-request-main {
  min-width: 0;
}

body[data-page="roleplay"] .scene-request-head {
  align-items: flex-start;
}

body[data-page="roleplay"] .scene-request-head .pill {
  margin-top: 1px;
  flex: 0 0 auto;
}

body[data-page="roleplay"] .scene-request h3 {
  margin-top: 4px;
  color: #14213a;
  font-size: 15px;
  line-height: 1.25;
}

body[data-page="roleplay"] .scene-request > p,
body[data-page="roleplay"] .scene-request-main > p {
  max-width: 900px;
  margin: 9px 0 14px;
  color: #46546b;
  font-size: 12px;
  line-height: 1.55;
}

body[data-page="roleplay"] .scene-request dl {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px 16px;
}

body[data-page="roleplay"] .scene-request dt {
  color: #778296;
  font-size: 9px;
  font-weight: 650;
}

body[data-page="roleplay"] .scene-request dd {
  margin-top: 4px;
  color: #26364f;
  font-size: 11px;
  font-weight: 600;
}

body[data-page="roleplay"] .scene-actions {
  min-width: 136px;
  margin-top: 0;
  align-self: stretch;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

body[data-page="roleplay"] .cancel-scene {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body[data-page="roleplay"] .cancel-scene svg {
  width: 14px;
  height: 14px;
}

.request-empty {
  min-height: 270px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
}

.request-empty svg {
  width: 28px;
  height: 28px;
  color: var(--blue);
}

.request-empty strong,
.request-empty span {
  display: block;
}

.request-empty strong {
  font-size: 15px;
}

.request-empty span {
  color: var(--muted);
  font-size: 12px;
}

.staff-news-list { display: grid; }
.staff-news-item { position: relative; min-height: 104px; padding: 17px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; }
.staff-news-item:last-child { border-bottom: 0; }
.staff-news-icon { width: 36px; height: 36px; border-radius: 5px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; }
.staff-news-icon svg { width: 17px; height: 17px; }
.staff-news-item.urgent .staff-news-icon { background: #fdebed; color: var(--red); }
.staff-news-item.important .staff-news-icon { background: #fff4d8; color: var(--amber); }
.staff-news-title { display: flex; align-items: center; gap: 8px; }
.staff-news-item p { margin: 8px 0; color: #3f4e65; font-size: 11px; line-height: 1.55; }
.staff-news-item > div > span { color: var(--muted); font-size: 9px; }

@media (min-width: 1261px) {
  .metric-top span { font-size: 10.5px; }
  .metric-top svg { top: 20px; right: 20px; width: 28px; height: 28px; }
  .summary-row small { font-size: 10px; }
  .dashboard-primary th { font-size: 9px; }
  .dashboard-primary td { font-size: 10px; }
  .request-row strong,
  .request-user,
  .request-row time { font-size: 10px; }
  .status-list dt,
  .status-list dd,
  .alert-list strong,
  .announcement-list strong { font-size: 10px; }
  .alert-list p,
  .alert-list time,
  .announcement-list p,
  .announcement-list span { font-size: 9px; }
}

@media (min-width: 1261px) and (max-width: 1450px) {
  .dashboard-secondary { grid-template-columns: 1.15fr .85fr; }
  .dashboard-secondary > .panel { height: 315px; }
}

@media (max-width: 1080px) {
  .member-layout,
  .member-home-grid,
  .roleplay-layout,
  .staff-news-layout { grid-template-columns: 1fr; }
  .scene-form-panel,
  .staff-news-layout > aside { position: static; }
}

@media (max-width: 560px) {
  .scene-request dl { grid-template-columns: 1fr; }
  .staff-news-item { grid-template-columns: 36px minmax(0, 1fr); }
  .staff-news-item > button { grid-column: 2; }
}

.account-control { position: relative; display: flex; align-items: center; }
.account-control .identity { padding-left: 17px; border-left: 1px solid rgba(255, 255, 255, .13); }
.header-actions .account-control .identity { min-width: 170px; }
.account-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 40;
  width: 258px;
  padding: 7px;
  border: 1px solid #d8dee7;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(4, 18, 40, .2);
}
.account-menu::before { content: ""; position: absolute; top: -6px; right: 13px; width: 10px; height: 10px; border-top: 1px solid #d8dee7; border-left: 1px solid #d8dee7; background: #ffffff; transform: rotate(45deg); }
.account-menu button { position: relative; z-index: 1; width: 100%; min-height: 54px; padding: 9px 10px; border: 0; background: transparent; display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 9px; text-align: left; }
.account-menu button:hover { border-color: transparent; background: #f3f6fa; }
.account-menu button + button { border-top: 1px solid #edf0f4; }
.account-menu button > svg { width: 17px; height: 17px; color: #52627a; }
.account-menu button > span,
.account-menu strong,
.account-menu small { display: block; }
.account-menu strong { color: var(--ink); font-size: 11px; font-weight: 650; }
.account-menu small { margin-top: 2px; color: var(--muted); font-size: 9px; }
#accountMenuButton[aria-expanded="true"] svg { transform: rotate(180deg); }

body[data-page]:not([data-page="dashboard"]) main { padding: 30px 36px 64px; }
body[data-page]:not([data-page="dashboard"]) .page-title { min-height: 64px; margin-bottom: 22px; }
body[data-page]:not([data-page="dashboard"]) h1 { font-size: 28px; }
body[data-page]:not([data-page="dashboard"]) .page-context { margin-top: 5px; font-size: 12px; }
body[data-page]:not([data-page="dashboard"]) .panel { border-radius: 6px; }
body[data-page]:not([data-page="dashboard"]) .section-head { min-height: 64px; padding: 15px 20px; }
body[data-page]:not([data-page="dashboard"]) .section-head h2 { font-size: 16px; }
body[data-page]:not([data-page="dashboard"]) .section-head span { margin-top: 3px; font-size: 11px; }
body[data-page]:not([data-page="dashboard"]) .table-wrap table { min-width: 780px; }
body[data-page]:not([data-page="dashboard"]) th { height: 44px; padding: 12px 18px; font-size: 10px; }
body[data-page]:not([data-page="dashboard"]) td { min-height: 54px; padding: 15px 18px; font-size: 12px; line-height: 1.5; }
body[data-page]:not([data-page="dashboard"]) td .muted,
body[data-page]:not([data-page="dashboard"]) td.code { font-size: 10px; }
body[data-page]:not([data-page="dashboard"]) main button,
body[data-page]:not([data-page="dashboard"]) main .primary,
body[data-page]:not([data-page="dashboard"]) main .soft,
body[data-page]:not([data-page="dashboard"]) main .danger,
body[data-page]:not([data-page="dashboard"]) main .ghost { min-height: 38px; padding: 8px 13px; font-size: 12px; }
body[data-page]:not([data-page="dashboard"]) main .icon-button { width: 38px; height: 38px; min-height: 38px; padding: 0; }
body[data-page]:not([data-page="dashboard"]) main .compact-button { min-height: 36px; display: inline-flex; }
body[data-page]:not([data-page="dashboard"]) main label { gap: 7px; font-size: 12px; }
body[data-page]:not([data-page="dashboard"]) main input,
body[data-page]:not([data-page="dashboard"]) main select { min-height: 42px; padding: 10px 12px; font-size: 13px; }
body[data-page]:not([data-page="dashboard"]) main textarea { min-height: 170px; padding: 11px 12px; font-size: 13px; }
body[data-page]:not([data-page="dashboard"]) main .form-grid { gap: 17px; padding: 21px; }
body[data-page]:not([data-page="dashboard"]) .empty { padding: 54px 24px; font-size: 12px; }
body[data-page]:not([data-page="dashboard"]) .pill { min-height: 23px; padding: 4px 8px; font-size: 9px; }

body[data-page="development"] .development-layout { grid-template-columns: minmax(0, 1.35fr) minmax(390px, .75fr); gap: 20px; }
body[data-page="development"] .task-item { min-height: 104px; padding: 18px 20px; grid-template-columns: 30px minmax(0, 1fr) 205px; gap: 13px; }
body[data-page="development"] .task-check { width: 28px; height: 28px; min-height: 28px; padding: 0; }
body[data-page="development"] .task-check svg { width: 20px; height: 20px; }
body[data-page="development"] .task-copy > strong { font-size: 14px; }
body[data-page="development"] .task-title-row > strong { font-size: 14px; }
body[data-page="development"] .task-copy > p { margin-top: 6px; font-size: 11px; line-height: 1.6; }
body[data-page="development"] .task-meta { margin-top: 10px; gap: 10px; }
body[data-page="development"] .task-meta > span { font-size: 10px; }
body[data-page="development"] .task-status { width: 135px; min-height: 38px; font-size: 11px; }
body[data-page="development"] .task-controls { width: 205px; }
body[data-page="development"] .task-controls .task-status { min-width: 118px; }
body[data-page="development"] .task-controls .delete-task { width: 38px; height: 38px; min-height: 38px; }
body[data-page="development"] .resource-item { min-height: 106px; padding: 18px 20px; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; }
body[data-page="development"] .resource-icon { width: 42px; height: 42px; }
body[data-page="development"] .resource-icon svg { width: 20px; height: 20px; }
body[data-page="development"] .resource-item strong { margin-top: 3px; font-size: 14px; }
body[data-page="development"] .resource-item p { margin-top: 5px; font-size: 11px; line-height: 1.5; }

body[data-page="comms"] .comms-layout { grid-template-columns: minmax(0, 1fr) 480px; gap: 20px; }
body[data-page="comms"] .form-grid { padding: 24px; gap: 19px; }
body[data-page="comms"] #commMessage { min-height: 250px; }
body[data-page="comms"] .shortcut-row { gap: 8px; }
body[data-page="comms"] .discord-preview { margin: 22px; padding: 18px 20px; }
body[data-page="comms"] .discord-preview strong { margin-bottom: 9px; font-size: 16px; }
body[data-page="comms"] .discord-preview p { font-size: 13px; line-height: 1.65; }
body[data-page="comms"] .discord-preview dt,
body[data-page="comms"] .discord-preview dd { font-size: 11px; }
body[data-page="comms"] .discord-preview small { font-size: 10px; }
body[data-page="comms"] .history-list > div { padding: 15px 20px; }
body[data-page="comms"] .history-list strong { font-size: 12px; }
body[data-page="comms"] .history-list span { margin-top: 4px; font-size: 10px; }

.game-log-kpis {
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.game-log-kpis > div {
  min-height: 104px;
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  position: relative;
}

.game-log-kpis span { color: #536178; font-size: 10px; font-weight: 650; text-transform: uppercase; }
.game-log-kpis strong { margin-top: 12px; color: var(--ink); display: block; font-size: 25px; line-height: 1; }
.game-log-kpis svg { position: absolute; top: 20px; right: 20px; width: 23px; height: 23px; color: var(--blue); }
.game-log-head { gap: 16px; }
.game-log-controls { display: flex; align-items: center; gap: 8px; }
.game-log-controls label { width: 260px; position: relative; }
.game-log-controls label svg { position: absolute; top: 50%; left: 10px; width: 14px; height: 14px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.game-log-controls input { width: 100%; padding-left: 32px; }
.game-log-controls select { min-width: 150px; }
.game-log-stream { display: grid; }
.game-log-entry {
  min-height: 116px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}
.game-log-entry:last-of-type { border-bottom: 0; }
.game-log-marker { width: 42px; height: 42px; border-radius: 5px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; }
.game-log-marker svg { width: 20px; height: 20px; }
.game-log-entry.type-fire .game-log-marker,
.game-log-entry.type-death .game-log-marker,
.game-log-entry.type-explosion .game-log-marker { background: #fff0f0; color: #c84343; }
.game-log-entry.type-join .game-log-marker { background: #eaf8f0; color: #27875a; }
.game-log-entry.type-damage .game-log-marker,
.game-log-entry.type-shooting .game-log-marker { background: #fff7df; color: #a06e00; }
.game-log-copy { min-width: 0; }
.game-log-meta { display: flex; align-items: center; gap: 8px; }
.game-log-meta span { padding: 4px 7px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.game-log-meta time { color: var(--muted); font-size: 10px; }
.game-log-meta em { margin-left: auto; color: var(--quiet); font-size: 9px; font-style: normal; }
.game-log-copy h3 { margin: 9px 0 4px; color: var(--ink); font-size: 14px; }
.game-log-copy > p { margin: 0; color: #40506a; font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.game-log-players { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.game-log-players span { padding: 5px 7px; border: 1px solid #e1e6ed; border-radius: 4px; background: #f8fafc; color: #536178; display: inline-flex; align-items: center; gap: 5px; font-size: 9px; }
.game-log-players svg { width: 11px; height: 11px; }
.game-log-images { margin-top: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.game-log-images a { max-width: 520px; border: 1px solid var(--line); border-radius: 6px; background: #081526; display: block; overflow: hidden; }
.game-log-images img { width: 100%; max-height: 300px; object-fit: cover; display: block; }

@media (max-width: 820px) {
  .game-log-kpis { grid-template-columns: 1fr; }
  .game-log-head { align-items: stretch; flex-direction: column; }
  .game-log-controls { align-items: stretch; flex-direction: column; }
  .game-log-controls label,
  .game-log-controls select { width: 100%; }
  .game-log-entry { padding: 15px; grid-template-columns: 38px minmax(0, 1fr); gap: 11px; }
  .game-log-marker { width: 38px; height: 38px; }
  .game-log-meta { align-items: flex-start; flex-wrap: wrap; }
  .game-log-meta em { margin-left: 0; }
}

.audit-list { display: grid; }
.audit-event { min-height: 116px; padding: 18px 20px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: start; gap: 14px; }
.audit-event:last-child { border-bottom: 0; }
.audit-icon { width: 42px; height: 42px; border-radius: 5px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; }
.audit-icon svg { width: 20px; height: 20px; }
.audit-copy { min-width: 0; }
.audit-title { display: flex; align-items: center; gap: 8px; }
.audit-title strong { font-size: 14px; font-weight: 650; }
.audit-title > span { color: var(--quiet); font-size: 10px; }
.audit-copy > p { margin: 5px 0 0; color: #40506a; font-size: 11px; overflow-wrap: anywhere; }
.audit-copy > p span { color: var(--muted); }
.audit-copy > p i { width: 3px; height: 3px; margin: 0 7px 2px; border-radius: 50%; background: #99a5b5; display: inline-block; }
.audit-event > time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.audit-details { margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.audit-details > div { min-width: 120px; max-width: 320px; padding: 7px 9px; border: 1px solid #e1e6ed; border-radius: 4px; background: #f8fafc; }
.audit-details dt { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.audit-details dd { margin: 2px 0 0; color: #2b3a51; font-size: 10px; overflow-wrap: anywhere; }

.staff-kpis,
.ban-kpis {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.staff-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.staff-kpis > div,
.ban-kpis > div {
  min-height: 112px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  position: relative;
}

.staff-kpis span,
.ban-kpis span { color: #536178; font-size: 10px; font-weight: 650; text-transform: uppercase; }
.staff-kpis strong,
.ban-kpis strong { margin-top: 12px; color: var(--ink); display: block; font-size: 27px; line-height: 1; }
.staff-kpis svg,
.ban-kpis svg { position: absolute; top: 22px; right: 21px; width: 25px; height: 25px; color: var(--blue); }

.directory-tools { display: flex; align-items: center; gap: 8px; }
.directory-search { width: 220px; }
.directory-tools select { width: 140px; }
.staff-directory-list { display: grid; }
.staff-directory-row {
  min-height: 88px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(170px, .72fr) minmax(280px, 1fr) 155px;
  align-items: center;
  gap: 18px;
}
.staff-directory-row:last-child { border-bottom: 0; }
.directory-person,
.directory-status { min-width: 0; display: flex; align-items: center; gap: 11px; }
.directory-person img,
.directory-avatar { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; background: #edf2f9; color: #55719e; display: grid; place-items: center; }
.directory-avatar svg { width: 18px; height: 18px; }
.directory-person strong,
.directory-person span,
.directory-status strong,
.directory-status span { display: block; }
.directory-person strong { font-size: 13px; }
.directory-person span,
.directory-status span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.directory-status strong { font-size: 11px; }
.directory-status .live-dot { width: 8px; height: 8px; flex: 0 0 8px; }
.directory-stats { margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.directory-stats div { padding: 0 13px; border-left: 1px solid var(--line); }
.directory-stats dt { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.directory-stats dd { margin: 4px 0 0; color: var(--ink); font-size: 14px; font-weight: 650; }
.directory-id { color: var(--muted); font-family: Consolas, monospace; font-size: 10px; text-align: right; }
.copy-staff-id { min-width: 0; padding: 7px 9px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.copy-staff-id svg { width: 14px; height: 14px; }
.copy-staff-id span { overflow: hidden; text-overflow: ellipsis; font-family: Consolas, monospace; font-size: 9px; }

.development-kpis {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.development-kpis article {
  min-height: 108px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  position: relative;
}
.development-kpis span { color: #536178; font-size: 10px; font-weight: 650; text-transform: uppercase; }
.development-kpis strong { display: block; margin-top: 12px; color: var(--ink); font-size: 27px; line-height: 1; }
.development-kpis svg { position: absolute; top: 21px; right: 20px; width: 24px; height: 24px; color: var(--blue); }
.development-kpis .has-alert svg { color: var(--red); }
.development-filters,
.resource-filters {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  display: grid;
  gap: 8px;
}
.development-filters { grid-template-columns: minmax(180px, 1fr) 145px 170px; }
.resource-filters { grid-template-columns: minmax(150px, 1fr) 150px auto; }
.development-filters label,
.resource-filters > label:not(.archive-toggle) { position: relative; }
.development-filters label svg,
.resource-filters > label > svg { position: absolute; top: 50%; left: 10px; width: 14px; height: 14px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.development-filters input,
.resource-filters input[type="search"] { padding-left: 32px; }
.archive-toggle { min-height: 36px; padding: 0 8px; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.archive-toggle input { width: 16px; height: 16px; padding: 0; }

.ban-tools { display: flex; align-items: center; gap: 8px; }
.ban-tools input { width: 230px; }
.ban-tools select { width: 145px; }
.ban-list { display: grid; }
.ban-record {
  min-height: 104px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 38px minmax(175px, .9fr) minmax(220px, 1.35fr) minmax(170px, .8fr) minmax(145px, .7fr) 110px;
  align-items: center;
  gap: 14px;
}
.ban-record:last-child { border-bottom: 0; }
.ban-mark { width: 36px; height: 36px; border-radius: 5px; background: #fdecee; color: #d84750; display: grid; place-items: center; }
.ban-mark.temporary { background: #fff4dd; color: #c47b09; }
.ban-mark.expired,
.ban-mark.revoked { background: #eef1f5; color: #718096; }
.ban-mark svg { width: 17px; height: 17px; }
.ban-person,
.ban-reason,
.ban-issued,
.ban-expiry { min-width: 0; }
.ban-person strong,
.ban-person span,
.ban-reason span,
.ban-reason strong,
.ban-issued span,
.ban-issued strong,
.ban-issued small,
.ban-expiry span,
.ban-expiry strong { display: block; }
.ban-person strong { font-size: 12px; }
.ban-person span { margin-top: 4px; color: var(--muted); font-family: Consolas, monospace; font-size: 9px; overflow: hidden; text-overflow: ellipsis; }
.ban-reason span,
.ban-issued span,
.ban-expiry span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.ban-reason strong,
.ban-issued strong,
.ban-expiry strong { margin-top: 4px; color: #2c3b52; font-size: 10px; font-weight: 600; line-height: 1.4; }
.ban-issued small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.ban-action { display: grid; justify-items: end; gap: 7px; }

.settings-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(360px, .72fr); align-items: start; gap: 20px; }
.settings-side { display: grid; gap: 16px; }
.permission-panel .section-head > select { width: 250px; }
.role-summary { min-height: 82px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: #fafbfd; display: flex; align-items: center; gap: 11px; }
.role-summary > div { min-width: 0; flex: 1; }
.role-summary strong,
.role-summary span { display: block; }
.role-summary strong { font-size: 13px; }
.role-summary > div > span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.role-swatch { width: 10px; height: 36px; flex: 0 0 10px; border-radius: 3px; }
.permission-list { display: grid; }
.permission-row { min-height: 76px; padding: 13px 20px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 34px minmax(0, 1fr) 76px 120px; align-items: center; gap: 12px; }
.permission-row:last-child { border-bottom: 0; }
.permission-icon { width: 32px; height: 32px; border-radius: 4px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; }
.permission-icon svg { width: 15px; height: 15px; }
.permission-row > div:nth-child(2) > span,
.permission-row > div:nth-child(2) > strong,
.permission-row > div:nth-child(2) > small { display: block; }
.permission-row > div:nth-child(2) > span { color: var(--blue); font-size: 8px; font-weight: 650; text-transform: uppercase; }
.permission-row > div:nth-child(2) > strong { margin-top: 2px; font-size: 12px; }
.permission-row > div:nth-child(2) > small { margin-top: 3px; color: var(--muted); font-family: Consolas, monospace; font-size: 9px; }
.permission-row .pill.allowed { background: #e8f5ec; color: #277843; }
.permission-row .pill.denied { background: #eef1f5; color: #68758a; }
.permission-row .permission-mode { min-height: 34px; font-size: 10px; }
.dashboard-config form { padding: 20px; }
.settings-fields { display: grid; grid-template-columns: 1fr 120px; gap: 10px; }
.widget-settings { margin: 18px -20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.setting-toggle { min-height: 66px; padding: 11px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; }
.setting-toggle:last-child { border-bottom: 0; }
.setting-toggle > span { min-width: 0; }
.setting-toggle strong,
.setting-toggle small { display: block; }
.setting-toggle strong { color: var(--ink); font-size: 11px; }
.setting-toggle small { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 400; }
.setting-toggle input { position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; pointer-events: none; }
.setting-toggle > i { width: 35px; height: 20px; padding: 2px; flex: 0 0 35px; border-radius: 10px; background: #cfd6e1; transition: background .15s ease; }
.setting-toggle > i::after { content: ""; width: 16px; height: 16px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 2px rgba(10, 25, 48, .2); display: block; transition: transform .15s ease; }
.setting-toggle input:checked + i { background: var(--blue); }
.setting-toggle input:checked + i::after { transform: translateX(15px); }
.settings-save { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.settings-save svg { width: 15px; height: 15px; }
.custom-command-panel .section-head { gap: 12px; }
.custom-command-panel .compact-button { flex: 0 0 auto; }
.custom-command-list { display: grid; gap: 0; }
.custom-command-row { min-height: 116px; padding: 16px 20px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 13px; }
.custom-command-row:first-child { border-top: 0; }
.custom-command-icon { width: 32px; height: 32px; border-radius: 4px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; }
.custom-command-icon svg { width: 15px; height: 15px; }
.custom-command-copy { min-width: 0; }
.custom-command-copy strong,
.custom-command-copy span,
.custom-command-copy p { display: block; }
.custom-command-copy strong { color: var(--ink); font-size: 13px; font-family: Consolas, monospace; }
.custom-command-copy span { margin-top: 4px; color: #44536a; font-size: 10px; line-height: 1.4; }
.custom-command-copy p { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; max-height: 44px; overflow: hidden; }
.custom-command-actions { grid-column: 2; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.custom-command-actions .pill { margin-right: auto; }
.custom-command-actions button { min-height: 31px; padding: 7px 10px; font-size: 10px; display: inline-flex; align-items: center; gap: 5px; }
.custom-command-actions svg { width: 13px; height: 13px; }
.settings-note { padding: 16px 18px; border: 1px solid #cad8ec; border-left: 3px solid var(--blue); border-radius: 5px; background: #f5f8fd; display: flex; align-items: flex-start; gap: 11px; }
.settings-note > svg { width: 19px; height: 19px; flex: 0 0 19px; color: var(--blue); }
.settings-note strong { font-size: 11px; }
.settings-note p { margin: 4px 0 0; color: #596981; font-size: 10px; line-height: 1.5; }

.dashboard-primary.widget-count-1 { grid-template-columns: 1fr; }
.dashboard-secondary.widget-count-1 { grid-template-columns: 1fr; }
.dashboard-secondary.widget-count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-secondary.widget-count-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 1200px) {
  body[data-page="development"] .development-layout,
  body[data-page="comms"] .comms-layout,
  .roleplay-board,
  .settings-layout { grid-template-columns: 1fr; }
  body[data-page="comms"] .preview-panel { position: static; }
  .request-filter-panel { position: static; }
  .staff-directory-row { grid-template-columns: minmax(210px, 1fr) minmax(170px, .8fr) minmax(240px, 1fr); }
  .copy-staff-id { display: none; }
  .ban-record { grid-template-columns: 38px minmax(160px, .8fr) minmax(210px, 1.2fr) minmax(150px, .7fr) 105px; }
  .ban-expiry { display: none; }
}

@media (max-width: 820px) {
  .development-kpis,
  .staff-kpis,
  .roleplay-stats,
  .ban-kpis { grid-template-columns: 1fr; }
  .staff-directory-head { align-items: stretch; flex-direction: column; }
  .directory-tools { align-items: stretch; flex-direction: column; }
  .directory-search,
  .directory-tools select { width: 100%; }
  .development-filters,
  .resource-filters { grid-template-columns: 1fr; }
  body[data-page="roleplay"] .scene-request { grid-template-columns: 38px minmax(0, 1fr); }
  body[data-page="roleplay"] .scene-actions { grid-column: 2; min-width: 0; justify-content: flex-start; }
  body[data-page="roleplay"] .scene-request dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .staff-directory-row { grid-template-columns: 1fr; gap: 12px; }
  .directory-stats div:first-child { border-left: 0; padding-left: 0; }
  .ban-tools { width: 100%; flex-wrap: wrap; }
  .ban-tools input,
  .ban-tools select { width: 100%; }
  .ban-record { grid-template-columns: 36px minmax(0, 1fr) auto; align-items: start; }
  .ban-reason,
  .ban-issued { grid-column: 2 / -1; }
  .ban-action { grid-column: 3; grid-row: 1; }
  .permission-panel .section-head { align-items: stretch; flex-direction: column; }
  .permission-panel .section-head > select { width: 100%; }
  .permission-row { grid-template-columns: 32px minmax(0, 1fr) 110px; }
  .permission-row > .pill { display: none; }
}

@media (max-width: 860px) {
  .account-control .identity { border-left: 0; }
  body[data-page]:not([data-page="dashboard"]) main { padding: 24px 16px 48px; }
  body[data-page]:not([data-page="dashboard"]) h1 { font-size: 24px; }
}

@media (max-width: 560px) {
  .account-menu { position: fixed; top: 112px; right: 12px; width: min(258px, calc(100vw - 24px)); }
  .account-menu::before { display: none; }
  .audit-event { grid-template-columns: 38px minmax(0, 1fr); padding: 15px; }
  .audit-icon { width: 38px; height: 38px; }
  .audit-event > time { grid-column: 2; }
  body[data-page="roleplay"] .scene-request dl { grid-template-columns: 1fr; }
  body[data-page="roleplay"] .scene-request-head { flex-direction: column; gap: 9px; }
  body[data-page="roleplay"] .scene-status { width: 100%; }
  body[data-page="development"] .task-item { grid-template-columns: 28px minmax(0, 1fr); }
  body[data-page="development"] .task-status { width: 100%; }
  body[data-page="development"] .task-controls { grid-column: 2; width: 100%; justify-content: stretch; }
  body[data-page="development"] .task-controls .task-status { flex: 1; min-width: 0; }
}

body[data-page] .account-menu button { width: 100%; min-height: 54px; padding: 9px 10px; }

.task-box { width: 19px; height: 19px; border: 2px solid #aeb8c6; border-radius: 4px; background: #ffffff; display: grid; place-items: center; }
.task-box.checked { border-color: var(--blue); background: var(--blue); color: #ffffff; }
.task-box svg { width: 13px; height: 13px; stroke-width: 2.5; }
.task-check:hover .task-box { border-color: var(--blue); }
.task-check:disabled .task-box { background: #f4f6f8; }
.resource-actions { flex-wrap: wrap; justify-content: flex-end; }
.resource-action { min-height: 34px; padding: 7px 9px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.resource-action svg { width: 14px; height: 14px; }
.resource-action span { font-size: 10px; font-weight: 600; }

@media (min-width: 861px) {
  .sidebar nav button { min-height: 39px; padding: 0 12px; font-size: 11px; }
  .sidebar nav button svg { width: 16px; height: 16px; }
}

body[data-page="development"] main .task-check { width: 28px; height: 28px; min-height: 28px; padding: 0; border: 0; background: transparent; }
body[data-page="development"] main .task-check-icon {
  width: 21px;
  height: 21px;
  color: #8fa0b8;
  stroke-width: 2;
}

body[data-page="development"] main .task-item.is-done .task-check-icon,
body[data-page="development"] main .task-check:hover .task-check-icon {
  color: var(--blue);
}

body[data-page="development"] main .task-check:disabled .task-check-icon {
  color: #b7c0cd;
}

body[data-page="development"] main .compact-button svg,
body[data-page="development"] main .resource-icon svg,
body[data-page="development"] main .resource-action svg,
body[data-page="development"] main .task-meta svg,
body[data-page="development"] main .task-controls svg {
  display: block;
  flex: 0 0 auto;
  stroke: currentColor;
}

/* Final readability and dashboard alignment pass. */
body { font-size: 14px; line-height: 1.5; }

nav button,
.sidebar nav button { min-height: 42px; font-size: 12px; }
.nav-group > p { font-size: 10px; }
.nav-badge { min-width: 27px; height: 22px; font-size: 10px; }

.sidebar { grid-template-rows: 88px minmax(0, 1fr); }
.side-brand { padding: 15px 18px; }
.brand strong { font-size: 18px; }
.brand span { font-size: 10.5px; }
.brand-mark.logo-mark,
.brand-mark.small.logo-mark { width: 58px; height: 58px; }

.workspace-header { min-height: 68px; }
.global-search input,
kbd,
.identity,
.identity span { font-size: 12px; }

main { padding: 26px 30px 46px; }
h1 { font-size: 26px; }
h2,
.section-head h2 { font-size: 16px; }
.page-context,
.section-head span { font-size: 12px; }
.eyebrow { font-size: 10px; }

button,
.primary,
.danger,
.soft,
.ghost,
.table-link { font-size: 12px; }
.table-link { min-height: 34px; padding: 7px 12px; }

input,
textarea,
select,
label { font-size: 13px; }

th { height: 44px; padding: 12px 16px; font-size: 10px; }
td { min-height: 52px; padding: 14px 16px; font-size: 12px; }
.pill { min-height: 24px; padding: 4px 9px; font-size: 10px; }
.muted,
.code,
.reason { font-size: 12px; }

.ticket-line { min-height: 64px; padding: 14px 16px; }
.ticket-line strong,
.history-list strong,
.compact-list strong,
.staff-block strong,
.callout strong { font-size: 12px; }
.ticket-line span,
.history-list span,
.compact-list span,
.staff-block span,
.callout span { font-size: 11px; }

.status-list dt,
.status-list dd { font-size: 12px; }
.status-list > div { min-height: 48px; }
.panel-button { min-height: 39px; font-size: 12px; }

.task-copy > strong,
.resource-item strong,
.directory-person strong,
.ban-person strong,
.staff-news-item h3,
.scene-request h3 { font-size: 14px; }
.task-copy > p,
.resource-item p,
.staff-news-item p,
.scene-request > p,
.scene-request-main > p { font-size: 12px; }
.task-meta > span,
.resource-category,
.scene-request dt,
.directory-stats dt,
.ban-reason span,
.ban-issued span,
.ban-expiry span { font-size: 10px; }
.scene-request dd,
.directory-status strong,
.ban-reason strong,
.ban-issued strong,
.ban-expiry strong { font-size: 12px; }

body[data-page]:not([data-page="dashboard"]) h1 { font-size: 30px; }
body[data-page]:not([data-page="dashboard"]) .page-context { font-size: 13px; }
body[data-page]:not([data-page="dashboard"]) .section-head h2 { font-size: 17px; }
body[data-page]:not([data-page="dashboard"]) .section-head span { font-size: 12px; }
body[data-page]:not([data-page="dashboard"]) td { font-size: 13px; }
body[data-page]:not([data-page="dashboard"]) th { font-size: 11px; }
body[data-page]:not([data-page="dashboard"]) .pill { font-size: 10px; }

body[data-page="dashboard"] main { padding: 24px 30px 40px; }
body[data-page="dashboard"] .page-title { min-height: 58px; margin-bottom: 18px; }
body[data-page="dashboard"] h1 { font-size: 27px; }
body[data-page="dashboard"] .page-context { font-size: 12px; }

.summary-row { gap: 16px; margin-bottom: 18px; }
.summary-row article {
  min-height: 138px;
  padding: 19px 20px;
  border-color: #d9dee6;
  box-shadow: 0 1px 3px rgba(18, 30, 50, .035);
}
.metric-top span { font-size: 11px; }
.metric-top svg { width: 33px; height: 33px; }
.summary-row strong { margin-top: 15px; font-size: 31px; }
.metric-value b { font-size: 14px; }
.summary-row small { margin-top: 14px; font-size: 11px; }

.dashboard-primary {
  grid-template-columns: minmax(0, 1.18fr) minmax(380px, .82fr);
  gap: 18px;
  margin-bottom: 18px;
}
.dashboard-primary > .panel { height: 342px; }
body[data-page="dashboard"] .section-head { min-height: 58px; padding: 15px 18px; }

.dashboard-actions-wrap { height: calc(100% - 58px); overflow: auto; }
.dashboard-actions-table { min-width: 850px; }
.dashboard-actions-table th { height: 45px; padding: 0 16px; font-size: 10px; }
.dashboard-actions-table td { height: 54px; padding: 10px 16px; font-size: 12px; }
.dashboard-actions-table th:nth-child(1) { width: 148px; }
.dashboard-actions-table th:nth-child(2) { width: 190px; }
.dashboard-actions-table th:nth-child(3) { width: 168px; }
.dashboard-actions-table th:nth-child(4) { width: 145px; }
.dashboard-actions-table th:nth-child(6) { width: 74px; }
.staff-cell strong { font-size: 12px; }
.table-avatar,
.staff-cell img { width: 28px; height: 28px; flex-basis: 28px; }
.table-avatar svg { width: 15px; height: 15px; }
.action-cell { gap: 8px; font-weight: 600; }
.action-cell svg { width: 16px; height: 16px; }
.row-view { min-height: 32px; padding: 7px 12px; font-size: 11px; }

.request-list { padding: 14px 16px; }
.request-row {
  min-height: 54px;
  padding: 0 12px;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .85fr) 104px 72px;
}
.request-row strong,
.request-user,
.request-row time { font-size: 11px; }

.dashboard-secondary {
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr) minmax(270px, .8fr) minmax(310px, .95fr);
  gap: 18px;
}
.dashboard-secondary > .panel { min-height: 330px; height: auto; }
.activity-chart { height: 272px; }
.chart-y,
.chart-x,
.chart-legend { font-size: 10px; }

.alert-list article { min-height: 64px; }
.alert-list strong,
.announcement-list strong { font-size: 12px; }
.alert-list p,
.alert-list time,
.announcement-list p,
.announcement-list span { font-size: 11px; }
.announcement-list article { min-height: 100px; }

.world-panel .section-head > svg,
.staff-tools-panel .section-head > svg {
  width: 22px;
  height: 22px;
  color: var(--blue);
}

.world-control-grid {
  padding: 15px 16px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px 78px;
  gap: 10px;
}

.world-control-grid label {
  min-width: 0;
  color: #57667e;
  font-size: 11px;
  font-weight: 650;
  display: grid;
  gap: 6px;
}

.world-control-grid select,
.world-control-grid input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #d5dde8;
  border-radius: 5px;
  background: #fff;
  color: #17243a;
  font-size: 13px;
  font-weight: 600;
}

.quick-time-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.quick-time {
  min-height: 50px;
  padding: 8px 10px;
  justify-content: flex-start;
}

.quick-time strong,
.quick-time span {
  display: block;
  text-align: left;
}

.quick-time strong { color: #17243a; font-size: 12px; }
.quick-time span { margin-top: 2px; color: #687790; font-size: 10px; }

.panel-submit {
  grid-column: 1 / -1;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.panel-submit svg {
  width: 15px;
  height: 15px;
}

.world-current {
  margin: 0 16px 16px;
  padding: 12px 13px;
  border: 1px solid #d8e2f1;
  border-left: 3px solid var(--blue);
  border-radius: 5px;
  background: #f7faff;
}

.world-current span,
.world-current strong,
.world-current small {
  display: block;
}

.world-current span {
  color: #64728a;
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
}

.world-current strong {
  margin-top: 4px;
  color: #17243a;
  font-size: 14px;
}

.world-current small {
  margin-top: 4px;
  color: #6f7e94;
  font-size: 11px;
}

.staff-tools-grid {
  padding: 14px 16px 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.staff-tool {
  min-height: 66px;
  padding: 11px;
  border: 1px solid #d9e1ec;
  border-radius: 5px;
  background: #fff;
  color: #17243a;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.staff-tool:hover {
  border-color: #b9cae3;
  background: #f8fbff;
}

.staff-tool > svg {
  width: 18px;
  height: 18px;
  color: var(--blue);
  flex: 0 0 18px;
}

.staff-tool span,
.staff-tool strong,
.staff-tool small { display: block; }
.staff-tool strong { font-size: 12px; font-weight: 700; }
.staff-tool small { margin-top: 3px; color: #66758d; font-size: 10px; }

body[data-page="dashboard"] .dashboard-secondary {
  grid-template-columns: repeat(4, minmax(260px, 1fr));
}

body[data-page="dashboard"] .activity-panel {
  grid-column: span 2;
}

@media (min-width: 1261px) {
  .sidebar { grid-template-rows: 88px minmax(0, 1fr); }
  .shell { grid-template-columns: 268px minmax(0, 1fr); }
  .side-brand { padding: 15px 18px; }
  .global-search { transform: none; }
  body[data-page="dashboard"] .dashboard-primary > .panel { height: 342px; }
  body[data-page="dashboard"] .dashboard-secondary > .panel { min-height: 330px; height: auto; }
}

@media (max-width: 1260px) {
  .dashboard-primary,
  .dashboard-secondary { grid-template-columns: 1fr; }
  .dashboard-primary > .panel,
  .dashboard-secondary > .panel { height: auto; min-height: 0; }
  body[data-page="dashboard"] .activity-panel { grid-column: auto; }
}

@media (max-width: 680px) {
  main,
  body[data-page="dashboard"] main { padding: 22px 16px 42px; }
  h1,
  body[data-page="dashboard"] h1,
  body[data-page]:not([data-page="dashboard"]) h1 { font-size: 24px; }
  .dashboard-actions-table { min-width: 760px; }
  .request-row { grid-template-columns: 1fr; padding: 12px; gap: 5px; }
  .request-row time { text-align: left; }
  .world-control-grid,
  .quick-time-row,
  .staff-tools-grid { grid-template-columns: 1fr; }
}

/* Dark surfaces and text are separate from action and status colours. */
body[data-theme="dark"] :is(.workspace-header, .sidebar, .login-branding) {
  background: var(--navy-900);
  border-color: var(--line);
}

body[data-theme="dark"] :is(
  .brand strong, h1, h2, .metric-value, .summary-row strong,
  .notification-copy strong, .task-copy > strong, .task-title-row > strong, .resource-item strong,
  .announcement-list strong, .member-post h3, .member-mini-list strong,
  .member-account-summary strong, .scene-request h3, .scene-request dd,
  .staff-cell strong, .action-cell, .action-target, .dashboard-actions-table .action-detail,
  .status-list dd, .player-action-group h4, .profile-block h3,
  .identifier-grid dd, .profile-mini-row strong, .audit-details dd,
  .ban-reason strong, .ban-issued strong, .ban-expiry strong,
  .world-current strong, .quick-time strong, .staff-tool strong,
  .development-kpis strong
) { color: var(--ink); }

body[data-theme="dark"] :is(
  td, .dashboard-actions-table td, .announcement-list p, .member-post p,
  .scene-request > p, .scene-request-main > p, .staff-news-item p,
  .game-log-copy > p, .audit-copy > p, .custom-command-copy span,
  .modal-confirm-copy, .callout
) { color: var(--text-secondary); }

body[data-theme="dark"] :is(
  .brand span, .eyebrow, label, .metric-top span, .metric-value b,
  .section-head span, .notification-copy small, .request-user, .request-row time,
  .action-time, .alert-list p, .alert-list time, .chart-y, .chart-x, .chart-legend,
  .dashboard-secondary .section-head h2 small, .member-welcome p,
  .announcement-list .announcement-copy > span, .callout span,
  .player-card-meta, .identifier-grid dt, .screenshot-thumb figcaption,
  .roleplay-stats span, .game-log-kpis span, .staff-kpis span, .ban-kpis span,
  .settings-note p, .world-current span, .world-current small,
  .world-control-grid label, .quick-time span, .staff-tool small,
  .task-copy > p, .task-meta > span, .resource-item p, .resource-item small,
  .development-kpis span
) { color: var(--muted); }

body[data-theme="dark"] :is(
  .announcement-list .announcement-copy > span b, .resource-category,
  .resource-icon, .permission-icon, .custom-command-icon, .audit-icon,
  .staff-news-icon, .member-post-icon, .notification-icon,
  .announcement-symbol, .action-cell svg
) { color: var(--blue); }

body[data-theme="dark"] :is(
  .panel, .summary-row article, .table-wrap, .section-head, .player-card,
  .modal, .modal-title, .login-card, .member-welcome, .roleplay-stats article,
  .game-log-kpis > div, .staff-kpis > div, .ban-kpis > div,
  .development-kpis article
) {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
}

body[data-theme="dark"] :is(.notification-menu, .account-menu),
body[data-theme="dark"] .notification-menu::before,
body[data-theme="dark"] .account-menu::before {
  background: var(--surface-raised);
  border-color: var(--line-strong);
}
body[data-theme="dark"] :is(.notification-menu, .account-menu, .modal) {
  box-shadow: 0 16px 48px rgba(0, 0, 0, .36);
}
body[data-theme="dark"] .modal-backdrop { background: rgba(0, 0, 0, .68); }

body[data-theme="dark"] :is(
  th, .dashboard-actions-table th, .notification-foot, .player-profile-hero,
  .role-summary, .identifier-grid div, .audit-details > div, .screenshot-thumb,
  .game-log-players span, .world-current, .callout, .modal-confirm-copy,
  .review-note, .settings-note, .development-filters, .resource-filters
) {
  background: var(--surface-soft);
  border-color: var(--line);
}
body[data-theme="dark"] :is(th, .dashboard-actions-table th) { color: var(--muted); }
body[data-theme="dark"] :is(.world-current, .review-note, .settings-note, .modal-confirm-copy) {
  border-left-color: var(--blue);
}
body[data-theme="dark"] :is(
  td, th, .notification-head, .notification-item + .notification-item,
  .account-menu button + button, .ticket-line, .history-list > div,
  .compact-list > div, .profile-mini-row, .alert-list article, .announcement-row,
  .member-quick-panel, .member-post, .member-account-summary, .member-mini-list > div
) { border-color: var(--line); }
body[data-theme="dark"] :is(tbody tr:hover, .dashboard-actions-table tbody tr:hover) {
  background: var(--surface-hover);
}
body[data-theme="dark"] .empty { background: var(--surface); color: var(--muted); }

body[data-theme="dark"] :is(
  input, textarea, select, .world-control-grid input, .world-control-grid select
) {
  background: var(--control);
  border-color: var(--line-strong);
  color: var(--ink);
  caret-color: var(--blue);
  accent-color: var(--blue);
}
body[data-theme="dark"] :is(input, textarea)::placeholder {
  color: var(--quiet);
  opacity: 1;
}
body[data-theme="dark"] option { background: var(--control); color: var(--ink); }
body[data-theme="dark"] :is(input, textarea, select):focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(156, 196, 255, .16);
}
body[data-theme="dark"] :is(button, a, input, textarea, select):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
body[data-theme="dark"] ::selection { background: #345780; color: #ffffff; }

body[data-theme="dark"] :is(button, .soft, .ghost, .primary, .danger) {
  background: var(--surface-soft);
  border-color: var(--line-strong);
  color: var(--ink);
}
body[data-theme="dark"] :is(button, .soft, .ghost):hover {
  background: var(--surface-hover);
  border-color: var(--quiet);
  color: var(--ink);
}
body[data-theme="dark"] :is(.ghost, .task-check, .notification-item, .account-menu button) {
  background: transparent;
}
body[data-theme="dark"] :is(.notification-item, .account-menu button):hover {
  background: var(--surface-hover);
  border-color: var(--line);
}
body[data-theme="dark"] :is(.icon-button.bordered, .resource-actions .icon-button, .account-menu button > svg) {
  color: var(--text-secondary);
}
body[data-theme="dark"] :is(.primary, .notification-dot, .notification-item em) {
  background: var(--action-blue);
  border-color: var(--action-blue);
  color: #ffffff;
}
body[data-theme="dark"] .primary:hover {
  background: var(--action-blue-hover);
  border-color: var(--action-blue-hover);
  color: #ffffff;
}
body[data-theme="dark"] :is(.danger, .watch-screen.active) {
  background: var(--action-red);
  border-color: var(--action-red);
  color: #ffffff;
}
body[data-theme="dark"] :is(.danger, .watch-screen.active):hover {
  background: var(--action-red-hover);
  border-color: var(--action-red-hover);
  color: #ffffff;
}
body[data-theme="dark"] .task-controls .delete-task { color: var(--red); }
body[data-theme="dark"] .task-controls .delete-task:hover {
  background: var(--danger-soft);
  border-color: var(--red);
}
body[data-theme="dark"] :is(button, input, select, textarea):disabled {
  cursor: not-allowed;
  opacity: .65;
}
body[data-theme="dark"] .player-card-hit,
body[data-theme="dark"] .player-card-hit:hover {
  background: transparent;
  border-color: transparent;
}
body[data-theme="dark"] :is(.player-card, .staff-tool):hover {
  background: var(--surface-hover);
  border-color: var(--line-strong);
}
body[data-theme="dark"] .task-item.is-done :is(.task-copy > strong, .task-title-row > strong) { color: var(--quiet); }

body[data-theme="dark"] .sidebar nav button {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}
body[data-theme="dark"] .sidebar nav button svg { color: var(--muted); }
body[data-theme="dark"] .sidebar nav button:hover {
  background: var(--surface-hover);
  color: var(--ink);
}
body[data-theme="dark"] .sidebar nav button.active {
  background: var(--blue-soft);
  color: var(--blue);
}
body[data-theme="dark"] .sidebar nav button.active svg { color: var(--blue); }
body[data-theme="dark"] .sidebar nav button.active::before { background: var(--blue); }
body[data-theme="dark"] .nav-group > p { color: var(--quiet); }
body[data-theme="dark"] .nav-badge { background: var(--surface-hover); color: var(--ink); }

body[data-theme="dark"] .workspace-header .icon-button {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}
body[data-theme="dark"] .workspace-header .icon-button:hover,
body[data-theme="dark"] .workspace-header .icon-button[aria-expanded="true"],
body[data-theme="dark"] .workspace-header .theme-toggle {
  background: var(--surface-hover);
  color: var(--ink);
}
body[data-theme="dark"] .global-search {
  background: var(--surface-soft);
  border: 1px solid var(--line-strong);
}
body[data-theme="dark"] .global-search input {
  background: transparent;
  border: 0;
  color: var(--ink);
}
body[data-theme="dark"] .global-search :is(svg, kbd) { color: var(--muted); }
body[data-theme="dark"] .identity span { color: var(--muted); }

body[data-theme="dark"] :is(
  .table-avatar, .staff-cell img, .profile-avatar, .directory-avatar, .profile-summary img,
  .member-account-summary img, .member-post-icon.devlog, .scene-status-mark,
  .status-filter-list em
),
body[data-theme="dark"] .notification-item.quiet .notification-icon {
  background: var(--surface-hover);
  color: var(--text-secondary);
}
body[data-theme="dark"] .player-avatar {
  background: var(--blue-soft);
  color: var(--blue);
}
body[data-theme="dark"] :is(.trust-track, .setting-toggle > i) { background: var(--line-strong); }
body[data-theme="dark"] .setting-toggle input:checked + i { background: var(--action-blue); }
body[data-theme="dark"] .setting-toggle input:focus-visible + i {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
body[data-theme="dark"] .task-box { background: var(--control); border-color: var(--quiet); }
body[data-theme="dark"] .task-box.checked { background: var(--action-blue); border-color: var(--blue); color: #ffffff; }
body[data-theme="dark"] .task-check:disabled .task-box { background: var(--surface-soft); }

body[data-theme="dark"] .status-filter-list button { background: transparent; color: var(--text-secondary); }
body[data-theme="dark"] .status-filter-list button:hover { background: var(--surface-hover); }
body[data-theme="dark"] .status-filter-list button.active,
body[data-theme="dark"] .status-filter-list button.active em {
  background: var(--blue-soft);
  color: var(--blue);
}

body[data-theme="dark"] :is(.member-quick-card, .member-quick-card.dark) {
  background: var(--surface-soft);
  color: var(--ink);
}
body[data-theme="dark"] .member-quick-card.blue { background: var(--blue-soft); color: var(--blue); }
body[data-theme="dark"] .member-quick-card.green { background: var(--success-soft); color: var(--green); }
body[data-theme="dark"] .member-quick-card span { color: var(--text-secondary); }
body[data-theme="dark"] .member-quick-card:hover { filter: brightness(1.15); }

body[data-theme="dark"] .pill,
body[data-theme="dark"] :is(.permission-row .pill.denied, .ban-mark.expired, .ban-mark.revoked) {
  background: var(--surface-hover);
  color: var(--text-secondary);
}
body[data-theme="dark"] :is(
  .pill.open, .pill.priority-high, .pill.warn, .pill.pending,
  .scene-status-mark.pending, .trust-level.review, .trust-level.concern,
  .ban-mark.temporary, .notification-item.pending .notification-icon,
  .staff-news-item.important .staff-news-icon,
  .game-log-entry.type-damage .game-log-marker, .game-log-entry.type-shooting .game-log-marker
) { background: var(--warning-soft); color: var(--amber); }

body[data-theme="dark"] :is(
  .pill.closed, .pill.done, .pill.completed, .pill.revocation, .pill.revoked,
  .pill.approved, .pill.accepted, .permission-row .pill.allowed,
  .scene-status-mark.accepted, .trust-level:not(.review):not(.concern):not(.restricted),
  .notification-item.clear .notification-icon, .game-log-entry.type-join .game-log-marker
) { background: var(--success-soft); color: var(--green); }

body[data-theme="dark"] :is(
  .pill.blocked, .pill.priority-urgent, .pill.ban, .pill.denied, .pill.rejected,
  .pill.cancelled, .pill.failed, .scene-status-mark.denied, .trust-level.restricted,
  .ban-mark:not(.temporary):not(.expired):not(.revoked),
  .staff-news-item.urgent .staff-news-icon, .notification-item.urgent .notification-icon,
  .game-log-entry.type-fire .game-log-marker, .game-log-entry.type-death .game-log-marker,
  .game-log-entry.type-explosion .game-log-marker
) { background: var(--danger-soft); color: var(--red); }

body[data-theme="dark"] :is(
  .pill.claimed, .pill.in_progress, .pill.progress, .pill.protected,
  .scene-status-mark.progress, .notification-item b
) { background: var(--blue-soft); color: var(--blue); }
body[data-theme="dark"] :is(.action-cell.warn svg, .priority-box, .priority-box.high) {
  color: var(--amber);
}
body[data-theme="dark"] :is(.action-cell.ban svg, .action-cell.kick svg, .action-cell.timeout svg, .announcement-row.urgent .announcement-symbol) {
  color: var(--red);
}
body[data-theme="dark"] :is(.action-cell.unban svg, .action-cell.untimeout svg, .metric-note.up) { color: var(--green); }
body[data-theme="dark"] .metric-note.down { color: var(--red); }
body[data-theme="dark"] .metric-note.link { color: var(--muted); }
body[data-theme="dark"] .priority-box,
body[data-theme="dark"] .priority-box.high { background: var(--warning-soft); }
body[data-theme="dark"] .priority-box.urgent { background: var(--danger-soft); color: var(--red); }
body[data-theme="dark"] .priority-box.low { background: var(--blue-soft); color: var(--blue); }
body[data-theme="dark"] .announcement-row.important .announcement-symbol { color: var(--text-secondary); }

body[data-theme="dark"] .chart-grid line { stroke: var(--line); }
body[data-theme="dark"] :is(.activity-line, .metric-spark polyline) { stroke: var(--blue); }
body[data-theme="dark"] .chart-legend i { background: var(--blue); }
body[data-theme="dark"] code { background: var(--surface-hover); color: var(--text-secondary); }
body[data-theme="dark"] #toast {
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}
body[data-theme="dark"] { scrollbar-color: var(--line-strong) var(--canvas); }
