:root {
  color-scheme: dark;
  --bg-deep: #0b0e0e;
  --bg: #0d0f0f;
  --input-bg: #0c0f0f;
  --surface-header: #111414;
  --surface-raised: #121515;
  --surface: #151818;
  --surface-strong: #1c2020;
  --surface-hover: #232828;
  --control-active: #29302f;
  --border: #303636;
  --border-soft: #252a2a;
  --border-strong: #3a4140;
  --border-hover: #596260;
  --scroll-thumb: #3a4240;
  --text: #f1f4f3;
  --text-dim: #d3dad8;
  --muted: #98a2a0;
  --faint: #6f7977;
  --placeholder: #68716f;
  --green: #36c77b;
  --green-bright: #78dda5;
  --green-soft: rgba(54, 199, 123, .12);
  --red: #ff5c67;
  --red-bright: #ff9aa1;
  --red-soft: rgba(255, 92, 103, .11);
  --amber: #efb64f;
  --amber-bright: #f6cd83;
  --blue: #66a9ff;
  --blue-bright: #9bc7ff;
  --blue-soft: rgba(102, 169, 255, .11);
  --violet: #b38cff;
  --dll-signed: #36c77b;
  --dll-signed-soft: rgba(54, 199, 123, .1);
  --dll-allowlisted: #ef9f3f;
  --dll-allowlisted-soft: rgba(239, 159, 63, .11);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { color: var(--text); background: var(--bg); }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button { color: inherit; }
h1, h2, h3, p { margin: 0; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex="0"]:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: -2px; }
.app { height: 100%; }
.panel-shell { width: 100%; height: 100%; display: grid; grid-template-rows: 62px 78px minmax(0, 1fr) 30px; overflow: hidden; background: var(--bg); border: 1px solid var(--border-strong); border-radius: 6px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 18px; border-bottom: 1px solid var(--border); background: var(--surface-raised); }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-logo { width: 38px; height: 38px; object-fit: contain; }
.brand h1 { font-size: 17px; line-height: 1.2; font-weight: 700; }
.brand p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.role-badge { color: var(--green); border: 1px solid var(--border); border-radius: 999px; padding: 3px 7px; font-size: 10px; font-weight: 700; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.updated-at { margin-inline-end: 6px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.icon-button { width: 36px; height: 36px; display: inline-grid; place-items: center; flex: 0 0 36px; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-strong); color: var(--muted); font-size: 21px; line-height: 1; cursor: pointer; }
.icon-button:hover { border-color: var(--border-hover); color: var(--text); background: var(--surface-hover); }
.summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1px solid var(--border); background: var(--surface); }
.stat-cell { min-width: 0; padding: 13px 18px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; border: 0; border-inline-start: 1px solid var(--border-soft); background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.stat-cell:hover { background: var(--surface-hover); }
.stat-cell[aria-pressed="true"] { background: var(--surface-hover); box-shadow: inset 0 -2px 0 var(--green); }
.stat-cell:first-child { border-inline-start: 0; }
.stat-label { color: var(--muted); font-size: 12px; white-space: normal; }
.stat-cell strong { font-size: 25px; line-height: 1; font-variant-numeric: tabular-nums; }
.protected-stat strong { color: var(--green); }
.warning-stat strong { color: var(--amber); }
.danger-stat strong { color: var(--red); }
.ban-stat strong { color: var(--violet); }
.workspace { min-height: 0; display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.players-pane, .details-pane { min-width: 0; min-height: 0; }
.players-pane { display: grid; grid-template-rows: auto minmax(0, 1fr); border-inline-end: 1px solid var(--border); background: var(--surface-header); }
.pane-toolbar { padding: 15px; border-bottom: 1px solid var(--border); }
.pane-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pane-title-row h2, .feed-header h2 { font-size: 15px; }
.count-badge { min-width: 28px; height: 22px; display: inline-grid; place-items: center; padding: 0 7px; border-radius: 999px; background: var(--surface-strong); border: 1px solid var(--border); color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.search-field { display: block; }
.search-field input { width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--border); border-radius: 6px; background: var(--input-bg); color: var(--text); }
.search-field input::placeholder { color: var(--muted); }
.segmented-control { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 10px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.segmented-control button { min-width: 0; min-height: 36px; padding: 3px 5px; border: 0; border-inline-start: 1px solid var(--border); background: var(--surface-raised); color: var(--muted); font-size: 12px; cursor: pointer; }
.segmented-control button:first-child { border-inline-start: 0; }
.segmented-control button:hover { background: var(--surface-hover); color: var(--text); }
.segmented-control button.active { background: var(--control-active); color: var(--text); box-shadow: inset 0 -2px 0 var(--green); }
.filter-label { margin-top: 9px; color: var(--amber); font-size: 12px; }
.player-list-scroll, .event-list, .dll-panel { min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-color: var(--scroll-thumb) transparent; scrollbar-width: thin; }
.player-row { width: 100%; min-height: 74px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 13px; border: 0; border-bottom: 1px solid var(--border-soft); background: transparent; text-align: start; cursor: pointer; }
.player-row:hover { background: var(--surface-hover); }
.player-row.selected { background: var(--surface-hover); box-shadow: inset -3px 0 0 var(--green); }
.player-row.banned { box-shadow: inset -3px 0 0 var(--violet); }
.player-initial, .profile-avatar { display: grid; place-items: center; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-hover); color: var(--text-dim); font-weight: 700; text-transform: uppercase; }
.player-initial { width: 36px; height: 36px; }
.player-copy { min-width: 0; }
.player-name-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.player-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.status-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--faint); }
.status-dot.protected { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.player-identifier { margin-top: 5px; color: var(--muted); font-size: 11px; }
.player-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; color: var(--muted); font-size: 11px; }
.alert-badge { min-width: 22px; height: 20px; display: inline-grid; place-items: center; padding: 0 6px; border-radius: 999px; color: var(--red); background: var(--red-soft); border: 1px solid rgba(255, 92, 103, .3); font-size: 11px; font-weight: 700; }
.details-pane { display: grid; grid-template-rows: auto auto auto auto minmax(0, 1fr) auto; overflow: hidden; }
.feed-header, .player-heading { grid-row: 1; }
.feed-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.details-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--border); background: var(--surface-header); }
.back-button { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-strong); color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer; }
.back-button:hover { background: var(--green-soft); color: var(--green-bright); }
.back-hint { padding: 2px 7px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface-strong); color: var(--muted); font-size: 10px; font-weight: 700; }
.profile-header { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-header); }
.profile-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.profile-avatar { width: 48px; height: 48px; flex: 0 0 48px; font-size: 18px; }
.profile-copy { min-width: 0; }
.profile-name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; min-width: 0; }
.profile-copy h2 { font-size: 18px; }
.profile-identity { margin-top: 5px; color: var(--muted); font-family: Consolas, "Courier New", monospace; font-size: 11px; }
.status-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-strong); color: var(--muted); font-size: 11px; white-space: nowrap; }
.status-badge.protected { border-color: rgba(54, 199, 123, .35); background: var(--green-soft); color: var(--green-bright); }
.profile-metrics { display: grid; grid-template-columns: repeat(2, minmax(48px, 1fr)); gap: 18px; }
.profile-metrics span, .profile-metrics strong { display: block; }
.profile-metrics span { color: var(--muted); font-size: 11px; }
.profile-metrics strong { margin-top: 4px; font-size: 16px; }
.detail-tabs { grid-row: 2; min-height: 42px; display: flex; align-items: end; gap: 18px; padding: 0 16px; border-bottom: 1px solid var(--border); background: var(--surface-header); }
.detail-tabs button { height: 42px; padding: 0 2px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 12px; font-weight: 650; cursor: pointer; }
.detail-tabs button[aria-selected="true"] { border-bottom-color: var(--green); color: var(--text); }
.activity-tools { grid-row: 3; max-height: 128px; overflow: auto; overscroll-behavior: contain; scrollbar-color: var(--scroll-thumb) transparent; scrollbar-width: thin; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface-header); }
.activity-tools.player-activity-tools { display: grid; gap: 8px; }
.log-primary-tools { display: grid; grid-template-columns: minmax(100px, 1fr) 140px 125px; gap: 8px; }
.log-primary-tools > label { min-width: 0; }
.activity-tools input:not([type="checkbox"]), .activity-tools select { width: 100%; min-width: 0; height: 34px; border: 1px solid var(--border); border-radius: 6px; padding: 5px 9px; background: var(--input-bg); color: var(--text); font: inherit; font-size: 12px; }
.activity-tools input::placeholder { color: var(--muted); }
.activity-tools input[type="checkbox"] { accent-color: var(--green); width: 14px; height: 14px; }
.log-view-bar, .log-view-options, .log-view-commands { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.log-view-options { flex: 1 1 auto; font-size: 12px; color: var(--muted); }
.log-view-options label { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.log-view-commands { margin-inline-start: auto; }
.text-button { min-height: 32px; padding: 5px 9px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface-strong); color: var(--text); font-size: 12px; cursor: pointer; }
.text-button:hover { background: var(--surface-hover); }
.log-advanced-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-top: 10px; border-top: 1px solid var(--border-soft); }
.log-advanced-fields > label { display: grid; gap: 5px; min-width: 0; }
.log-field-caption { font-size: 11px; color: var(--muted); }
.console-header { grid-row: 4; display: grid; grid-template-columns: 10px 72px 92px 95px minmax(0, 1fr) auto; gap: 10px; padding: 7px 14px; background: var(--surface); border-bottom: 1px solid var(--border); color: var(--muted); font-size: 10px; }
.event-list { grid-row: 5; }
.console-row { border-bottom: 1px solid var(--border-soft); border-inline-start: 3px solid var(--blue); background: var(--bg-deep); }
.console-row.severity-critical { border-inline-start-color: var(--red); }
.console-row.severity-success { border-inline-start-color: var(--green); }
.console-row.severity-critical .console-category { color: var(--red-bright); }
.console-row.severity-success .console-category { color: var(--green); }
.console-summary { display: grid; grid-template-columns: 10px 72px 92px 95px minmax(0, 1fr) auto; align-items: baseline; gap: 10px; padding: 11px 14px; cursor: pointer; list-style: none; min-height: 42px; }
.console-summary::-webkit-details-marker { display: none; }
.console-chevron { color: var(--muted); font: 12px Consolas, monospace; transition: transform 100ms; }
.console-row[open] > .console-summary .console-chevron { transform: rotate(90deg); }
.console-summary:hover { background: var(--surface-hover); }
.console-time, .console-category, .console-player { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.console-time { font-variant-numeric: tabular-nums; white-space: nowrap; direction: ltr; }
.console-player { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console-message { min-width: 0; font-size: 12px; }
.console-message strong { margin-inline-end: 10px; font-weight: 600; }
.console-preview { color: var(--muted); font-family: Consolas, monospace; overflow-wrap: anywhere; }
.console-compact .console-summary { padding: 6px 12px; min-height: 29px; }
.console-compact .console-message { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-view .console-header, .player-console-row > .console-summary { grid-template-columns: 10px 96px 92px minmax(0, 1fr) auto; }
.player-view .player-column { display: none; }
.console-details { padding: 10px 16px 14px; border-top: 1px solid var(--border-soft); }
.console-details pre { margin: 10px 0; color: var(--text-dim); font: 12px/1.6 Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.console-detail-tools { display: flex; flex-wrap: wrap; gap: 16px; }
.console-event-meta { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.activity-status { grid-row: 6; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.empty-state { padding: 25px 16px; color: var(--muted); font-size: 13px; }
.dll-panel { grid-row: 3 / 6; }
.dll-demo-notice { padding: 12px 16px; color: var(--muted); font-size: 12px; line-height: 1.5; border-bottom: 1px solid var(--border); }
.dll-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 84px; padding: 11px 16px; border-bottom: 1px solid var(--border-soft); border-inline-start: 3px solid var(--border-strong); }
.dll-row.status-signed { border-inline-start-color: var(--dll-signed); background: var(--dll-signed-soft); }
.dll-row.status-allowlisted { border-inline-start-color: var(--dll-allowlisted); background: var(--dll-allowlisted-soft); }
.dll-row.status-unapproved { border-inline-start-color: var(--red); background: var(--red-soft); }
.dll-status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-signed .dll-status-dot { background: var(--dll-signed); }
.status-allowlisted .dll-status-dot { background: var(--dll-allowlisted); }
.status-unapproved .dll-status-dot { background: var(--red); }
.dll-copy { min-width: 0; }
.dll-name-line { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; min-width: 0; }
.dll-name-line h3 { min-width: 0; overflow: hidden; color: var(--text); font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.dll-state-label { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.dll-copy p { margin-top: 6px; font-size: 12px; color: var(--muted); }
.statusbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 13px; border-top: 1px solid var(--border); background: var(--surface-header); color: var(--muted); font-size: 11px; }
.mobile-player-picker { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 1000px) {
  .stat-cell { padding: 10px 12px; }
  .console-header, .console-summary { grid-template-columns: 10px 64px 75px 68px minmax(0, 1fr) auto; gap: 8px; }
  .log-primary-tools { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .log-primary-tools > .log-search { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .panel-shell { grid-template-rows: 58px 118px minmax(0, 1fr) 34px; }
  .topbar { gap: 8px; padding: 0 12px; }
  .brand { gap: 8px; }
  .brand h1 { font-size: 15px; }
  .brand-logo { width: 34px; height: 34px; }
  .updated-at { display: none; }
  .summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-cell { padding: 7px 12px; gap: 3px; border-bottom: 1px solid var(--border-soft); }
  .stat-label { font-size: 11px; }
  .stat-cell strong { font-size: 21px; }
  .workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: 52px minmax(0, 1fr); }
  .players-pane { display: block; border-inline-end: 0; border-bottom: 1px solid var(--border); }
  .pane-toolbar, .player-list-scroll { display: none; }
  .mobile-player-picker { display: flex; align-items: center; gap: 12px; height: 100%; padding: 8px 12px; color: var(--muted); font-size: 12px; }
  .mobile-player-picker select { width: 100%; min-width: 0; height: 34px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; color: var(--text); background: var(--input-bg); }
  .feed-header { padding: 10px 12px; }
  .activity-tools { padding: 8px 12px; }
  .log-primary-tools { gap: 6px; }
  .log-view-bar, .log-view-options, .log-view-commands { gap: 8px; }
  .console-header { display: none; }
  .console-summary, .player-console-row > .console-summary { grid-template-columns: 10px 64px minmax(0, 1fr); align-items: baseline; gap: 4px 8px; }
  .console-summary .console-time { grid-column: 2; grid-row: 1; }
  .console-summary .console-category { grid-column: 3; grid-row: 1; }
  .console-summary .console-player { grid-column: 3; grid-row: 2; }
  .console-summary .console-message { grid-column: 2 / -1; grid-row: 2; white-space: normal; }
  .console-summary .console-player + .console-message { grid-row: 3; }
  .console-preview { display: none; }
  .console-compact .console-summary { min-height: 48px; padding: 8px 12px; }
  .profile-header { padding: 8px 12px; gap: 8px; min-height: 74px; }
  .profile-avatar { width: 36px; height: 36px; flex-basis: 36px; font-size: 15px; }
  .profile-main { gap: 8px; }
  .profile-copy h2 { font-size: 16px; }
  .profile-name-line { gap: 5px; }
  .profile-metrics { gap: 10px; grid-template-columns: repeat(2, minmax(35px, 1fr)); }
  .details-toolbar { padding: 6px 12px; }
  .detail-tabs { padding: 0 12px; min-height: 36px; }
  .detail-tabs button { height: 36px; }
  .activity-status { padding: 7px 12px; font-size: 10px; }
  .statusbar { padding: 0 12px; font-size: 10px; }
  .statusbar span:last-child { max-width: 62%; text-align: right; }
}
@media (max-width: 280px) {
  .role-badge { display: none; }
  .brand-logo { width: 28px; height: 28px; flex: 0 0 28px; }
  .brand h1, .brand p { white-space: nowrap; }
  .topbar { padding-inline: 10px; }
  .activity-tools { max-height: 112px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
