:root {
  --bg: #f6f9fc;
  --panel: #ffffff;
  --panel-soft: #f0f7fc;
  --panel-hover: #f8fbfe;
  --line: #dce7f1;
  --line-strong: #bad1e4;
  --text: #112033;
  --muted: #64758a;
  --muted-strong: #40566d;
  --cyan: #0ea5c6;
  --cyan-strong: #087895;
  --green: #26864b;
  --green-bg: #e9f8ef;
  --amber: #9a6500;
  --amber-bg: #fff5dc;
  --red: #bd334b;
  --red-bg: #fff0f3;
  --shadow: 0 1px 2px rgba(15, 35, 55, 0.04), 0 14px 36px rgba(28, 82, 124, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

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

body.is-signed-out .app-shell {
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
}

body.is-signed-out .sidebar {
  min-height: 100vh;
  background: #ffffff;
}

body.is-signed-out .sidebar-status,
body.is-signed-out .nav,
body.is-signed-out .topbar,
body.is-signed-out .command-bar,
body.is-signed-out .content-panel {
  display: none !important;
}

body.is-signed-out .workspace {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

body.is-signed-out .auth-panel {
  width: 100%;
  min-height: auto;
}

body.is-signed-out .auth-card {
  width: min(520px, 100%);
}

.brand,
.sidebar-status,
.auth-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #e8f7ff;
  color: var(--cyan-strong);
  font-weight: 800;
}

.brand strong,
.brand span,
.sidebar-status strong,
.sidebar-status span {
  display: block;
}

.brand span,
.sidebar-status span,
.sidebar-footer label,
.metric span,
.metric small,
.panel-header span,
.auth-card p {
  color: var(--muted);
}

.sidebar-status {
  min-height: 54px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.state-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
}

.state-dot.is-online {
  background: var(--green);
}

.state-dot.is-busy {
  background: var(--amber);
}

.state-dot.is-error {
  background: var(--red);
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-strong);
  text-align: left;
}

.nav-item span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.nav-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item.is-active {
  border-color: var(--line-strong);
  background: #edf8fd;
  color: var(--text);
}

.nav-item.is-active span {
  border-color: #9bd8e8;
  background: #dff5fb;
  color: var(--cyan-strong);
}

.nav-item:disabled,
.nav-item.is-disabled {
  opacity: 0.52;
}

.nav-item:disabled:hover,
.nav-item.is-disabled:hover {
  border-color: transparent;
  background: transparent;
}

.sidebar-footer {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.workspace {
  min-width: 0;
  padding: 20px 24px;
}

.topbar,
.topbar-actions,
.form-row,
.toolbar,
.command-bar,
.quick-actions,
.command-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar {
  justify-content: space-between;
  margin-bottom: 12px;
}

.form-row {
  flex-wrap: wrap;
}

.form-row > label {
  flex: 1 1 160px;
  min-width: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  letter-spacing: 0;
}

h2 {
  font-size: 16px;
  letter-spacing: 0;
}

.view-subtitle,
#view-subtitle {
  color: var(--muted);
}

.admin-chip {
  max-width: 300px;
  overflow: hidden;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted-strong);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-bar {
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.command-status {
  color: var(--muted-strong);
}

.auth-panel {
  min-height: calc(100vh - 136px);
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(470px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-card-header {
  margin-bottom: 16px;
}

.auth-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.auth-summary span,
.chip-button,
.role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.bootstrap {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.bootstrap summary {
  color: var(--cyan-strong);
  cursor: pointer;
}

.mfa-fields {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #cfe8f4;
  border-radius: 8px;
  background: #f7fcff;
}

.mfa-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.content-panel,
.view {
  display: grid;
  gap: 16px;
}

.is-hidden {
  display: none !important;
}

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

.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric {
  display: grid;
  gap: 6px;
  padding: 15px 16px;
  border-left: 3px solid var(--line-strong);
}

.metric strong {
  font-size: 28px;
  line-height: 1;
}

.metric-good {
  border-left-color: var(--green);
}

.metric-warn {
  border-left-color: var(--amber);
}

.metric-danger {
  border-left-color: var(--red);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}

.panel {
  min-width: 0;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.compact-panel {
  align-self: start;
}

.scope-list {
  display: grid;
}

.scope-list div {
  display: grid;
  gap: 3px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.scope-list div:last-child {
  border-bottom: 0;
}

.scope-list span {
  color: var(--muted);
}

.audit-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.audit-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 180px;
  gap: 12px;
  padding: 11px 16px;
  background: var(--panel);
}

.audit-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-row span {
  color: var(--muted);
}

.toolbar {
  justify-content: space-between;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(220px, 420px) auto;
  gap: 10px;
}

.audit-toolbar {
  align-items: stretch;
}

.support-toolbar {
  align-items: stretch;
}

.launcher-toolbar {
  align-items: stretch;
}

.legal-toolbar {
  align-items: stretch;
}

.audit-filter-form {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 0.8fr) minmax(150px, 0.7fr) minmax(170px, 0.8fr) minmax(170px, 0.8fr) 92px auto auto;
  gap: 10px;
}

.support-filter-form {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(220px, 1fr) 150px 150px 150px auto auto;
  gap: 10px;
}

.moderation-filter-form {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(220px, 1fr) 150px 170px 150px 160px auto auto;
  gap: 10px;
}

.launcher-filter-form {
  display: grid;
  width: 100%;
  grid-template-columns: 150px 170px 150px auto auto;
  gap: 10px;
}

.legal-settings-form {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
  white-space: nowrap;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.pagination-bar span {
  min-width: 130px;
  color: var(--muted-strong);
  font-weight: 800;
  text-align: center;
}

.players-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 560px);
  gap: 16px;
  align-items: start;
}

.support-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 16px;
  align-items: start;
}

.moderation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
  gap: 16px;
  align-items: start;
}

.launcher-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 460px;
  gap: 16px;
  align-items: start;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(480px, 1.35fr) minmax(300px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.launcher-detail {
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.legal-detail-panel {
  max-height: calc(100vh - 40px);
}

.security-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.security-sessions-panel {
  grid-column: 1 / -1;
}

.security-actions {
  display: flex;
  gap: 10px;
  padding: 0 16px 16px;
}

.security-form {
  padding-top: 0;
}

.staff-lockout-box {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.staff-lockout-box div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.staff-lockout-box strong {
  color: var(--muted-strong);
  font-size: 12px;
}

.staff-lockout-box span {
  color: var(--text);
  font-weight: 800;
  text-align: right;
}

.legal-doc-list {
  display: grid;
}

.legal-doc-row {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 13px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  text-align: left;
}

.legal-doc-row:last-child {
  border-bottom: 0;
}

.legal-doc-row:hover {
  background: var(--panel-hover);
}

.legal-doc-row.is-selected {
  background: #e8f7ff;
}

.legal-doc-row strong,
.legal-doc-row span {
  overflow-wrap: anywhere;
}

.legal-doc-row > span {
  color: var(--muted);
}

.legal-doc-row small {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.legal-empty {
  padding: 18px 16px;
  color: var(--muted);
}

.legal-empty.is-error {
  color: var(--red);
}

.legal-actions {
  padding: 0 16px 16px;
}

.legal-document-form textarea[name="body"] {
  min-height: 340px;
}

.legal-approval-section .panel-header,
.legal-version-section .panel-header {
  align-items: center;
}

.legal-approval-row {
  border-left: 3px solid rgba(38, 139, 210, 0.35);
}

.legal-approval-row small {
  line-height: 1.45;
  white-space: normal;
}

.legal-version-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.legal-version-row strong,
.legal-version-row span,
.legal-version-row small {
  grid-column: 1;
}

.legal-version-row button {
  grid-row: 1 / span 3;
  grid-column: 2;
}

.legal-form-row {
  align-items: start;
}

.legal-form-row label {
  flex: 1 1 0;
  min-width: 0;
}

.legal-actions .secondary-button,
.legal-settings-form .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.secondary-button.is-disabled {
  pointer-events: none;
  opacity: 0.62;
}

.legal-checklist {
  display: grid;
}

.legal-checklist div {
  display: grid;
  gap: 4px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.legal-checklist div:last-child {
  border-bottom: 0;
}

.legal-checklist strong {
  color: var(--text);
}

.legal-checklist span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.security-secret-box {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

.totp-setup-grid {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.totp-qr-frame {
  display: grid;
  place-items: center;
  min-height: 172px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.totp-qr-frame img {
  width: min(148px, 100%);
  aspect-ratio: 1;
  display: block;
}

.totp-setup-copy {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.recovery-code-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 16px 16px;
}

.recovery-code-list code {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fcff;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 800;
}

.session-list {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.session-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.session-row.is-current {
  border-color: #9bd8e8;
  background: #f2fbfd;
}

.session-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.session-title,
.session-meta,
.session-agent {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.session-title strong {
  overflow-wrap: anywhere;
}

.session-title span {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
}

.session-meta,
.session-agent {
  color: var(--muted);
  font-size: 12px;
}

.session-agent span {
  overflow-wrap: anywhere;
}

.session-empty {
  padding: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.table-panel {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
}

.compact-table {
  min-width: 0;
}

th,
td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

tbody tr {
  background: var(--panel);
}

tbody tr:hover {
  background: var(--panel-hover);
}

tbody tr.is-selected {
  background: #e8f7ff;
}

tbody tr.is-selected td {
  border-bottom-color: #b9e3ef;
}

.empty-row td,
.loading-row td,
.error-row td {
  padding: 24px 14px;
  color: var(--muted);
  text-align: center;
}

.error-row td {
  color: var(--red);
}

.status {
  display: inline-flex;
  min-width: 76px;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--green-bg);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.status.Suspended {
  background: var(--amber-bg);
  color: var(--amber);
}

.status.Locked {
  background: var(--red-bg);
  color: var(--red);
}

.status.Deleted {
  background: var(--red-bg);
  color: var(--red);
}

.status.Open,
.status.Pending,
.status.Submitted,
.status.submitted,
.status.pending,
.status.InReview,
.status.ChangesRequested {
  background: var(--amber-bg);
  color: var(--amber);
}

.status.Resolved,
.status.Approved,
.status.approved,
.status.published,
.status.clean {
  background: var(--green-bg);
  color: var(--green);
}

.status.Closed,
.status.Draft,
.status.draft,
.status.revoked,
.status.not_uploaded,
.status.Cancelled {
  background: var(--panel-soft);
  color: var(--muted-strong);
}

.status.Rejected,
.status.rejected,
.status.infected,
.status.failed {
  background: var(--red-bg);
  color: var(--red);
}

.status.maintenance {
  background: var(--amber-bg);
  color: var(--amber);
}

.status.disabled,
.status.false {
  background: var(--red-bg);
  color: var(--red);
}

.status.active,
.status.true {
  background: var(--green-bg);
  color: var(--green);
}

.priority {
  display: inline-flex;
  min-width: 68px;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
}

.priority.High,
.priority.Urgent {
  background: var(--red-bg);
  color: var(--red);
}

.priority.Low {
  background: var(--green-bg);
  color: var(--green);
}

.role-badge.admin {
  border-color: #d8c7f0;
  background: #f5f0ff;
  color: #6840a8;
}

.role-badge.moderator {
  border-color: #c6dff0;
  background: #eef8ff;
  color: #116587;
}

.role-badge.support {
  border-color: #cfe9da;
  background: #effaf3;
  color: #257146;
}

.detail-panel {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.stack {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.detail-sections {
  display: grid;
  border-top: 1px solid var(--line);
}

.detail-section {
  display: grid;
  gap: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.detail-section:last-child {
  border-bottom: 0;
}

.detail-section .scope-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.compact-form {
  padding: 10px 0 12px;
}

.compact-list {
  display: grid;
  gap: 8px;
}

.compact-row,
.compact-empty {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  text-align: left;
}

.compact-row strong,
.compact-row span,
.compact-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-row span,
.compact-row small,
.compact-empty {
  color: var(--muted);
}

.compact-row small {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
}

.compact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.compact-actions .secondary-button,
.compact-actions .danger-button {
  min-height: 30px;
  padding: 6px 10px;
}

.compact-row-button {
  appearance: none;
  width: 100%;
  color: inherit;
  cursor: pointer;
}

.compact-row-button:hover {
  border-color: var(--line-strong);
  background: #f5fbff;
}

.auth-card .stack,
.bootstrap .stack {
  padding: 0;
}

.support-thread {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

.message-list {
  display: grid;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.message-row {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

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

.message-row strong {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 12px;
}

.message-row span {
  color: var(--text);
  white-space: normal;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  outline: none;
}

input,
select {
  height: 38px;
}

textarea {
  min-height: 104px;
  resize: vertical;
  font: 12px/1.5 "JetBrains Mono", Consolas, monospace;
  text-transform: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(14, 165, 198, 0.14);
}

.inline-check {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-transform: none;
}

.inline-check input {
  width: 16px;
  height: 16px;
}

.stack h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0;
}

.divider {
  height: 1px;
  background: var(--line);
}

.inline-panel-header {
  padding: 0;
  border-bottom: 0;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.icon-button,
.chip-button {
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 8px 12px;
  font-weight: 800;
}

.primary-button {
  background: var(--cyan);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--cyan-strong);
}

.secondary-button,
.ghost-button,
.icon-button {
  border-color: var(--line);
  background: #ffffff;
  color: var(--text);
}

.secondary-button:hover,
.ghost-button:hover,
.icon-button:hover,
.chip-button:hover {
  border-color: var(--line-strong);
  background: var(--panel-hover);
}

.chip-button.is-active {
  border-color: #9bd8e8;
  background: #e4f7fc;
  color: var(--cyan-strong);
}

.danger-button {
  border-color: #ffd3dc;
  background: var(--red-bg);
  color: var(--red);
}

.danger-button:hover {
  border-color: #f0a9b7;
}

.icon-button {
  width: 36px;
  padding: 0;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(440px, calc(100vw - 36px));
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-error {
  border-color: #f0a9b7;
  color: var(--red);
}

.toast.is-success {
  border-color: #afe0c2;
  color: var(--green);
}

@media (max-width: 1120px) {
  .section-grid,
  .players-layout,
  .support-layout,
  .moderation-layout,
  .launcher-layout,
  .legal-layout,
  .security-layout {
    grid-template-columns: 1fr;
  }

  .audit-filter-form,
  .support-filter-form,
  .moderation-filter-form,
  .launcher-filter-form,
  .legal-settings-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-panel {
    position: static;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .workspace {
    padding: 16px;
  }

  .topbar,
  .toolbar,
  .topbar-actions,
  .command-bar,
  .quick-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .metrics-grid,
  .search-form,
    .audit-filter-form,
    .support-filter-form,
    .moderation-filter-form,
    .legal-settings-form,
    .recovery-code-list,
  .totp-setup-grid,
  .session-row,
  .auth-summary {
    grid-template-columns: 1fr;
  }

  .totp-qr-frame {
    min-height: 156px;
  }

  .pagination-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-bar span {
    width: 100%;
    min-width: 0;
  }

  .audit-row {
    grid-template-columns: 1fr;
  }

  .legal-form-row {
    flex-direction: column;
  }
}

.mono-text {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  word-break: break-all;
}
