/* A quiet operations desk beside the dark toy works. */
body[data-page='admin'] {
  --ground: oklch(19% 0.009 160);
  --surface: oklch(23% 0.009 160);
  --line: oklch(32% 0.009 160);
  --muted: oklch(72% 0.009 160);
  --brass: oklch(82% 0.068 85);
}
.admin-layout {
  width: 100%;
  padding: 0;
  margin: 0;
}
.admin-session {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}
#key-manager {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  min-height: 100svh;
}
.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100svh;
  padding: 30px 16px 18px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: oklch(17% 0.01 160);
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.admin-brand small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border: 1px solid oklch(45% 0.03 85);
  border-radius: 8px;
  color: var(--brass);
  font-size: 13px;
  letter-spacing: -1px;
  flex-shrink: 0;
}
.admin-sections {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 42px 0 0;
  padding: 0;
  border: 0;
}
.admin-sections button {
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  border: 1px solid transparent;
  min-height: 44px;
  padding: 11px 14px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
}
.admin-sections svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feedback-badge {
  margin-left: auto;
  padding: 2px 7px;
  min-width: 23px;
  border-radius: 20px;
  color: var(--ground);
  background: var(--brass);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.feedback-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brass);
  border-radius: 6px;
  background: var(--surface);
  font-size: 13px;
}
.admin-sections button:hover {
  background: var(--surface);
  color: var(--text);
}
.admin-sections button[aria-pressed='true'] {
  background: oklch(27% 0.015 160);
  color: var(--text);
  border-color: oklch(34% 0.02 160);
}
.admin-sections button[aria-pressed='true'] svg {
  color: var(--brass);
}
.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding-top: 40px;
}
.connection {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 9px 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.connection-dot {
  width: 5px;
  height: 5px;
  background: var(--muted);
  border-radius: 50%;
  flex-shrink: 0;
}
.play-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#logout {
  border-color: transparent;
  color: var(--muted);
}
.admin-content {
  padding: 42px 40px 56px;
  width: 100%;
  max-width: 1520px;
  min-width: 0;
  margin-inline: auto;
}
.workspace-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}
.workspace-heading h1 {
  font-size: 30px;
  letter-spacing: -1px;
  font-weight: 600;
}
.section-description {
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 0;
}
#key-manager button,
#key-manager .button {
  min-height: 38px;
  padding: 9px 13px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}
#key-manager input,
#key-manager select {
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 13px;
}
#key-manager .primary {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--ink);
}
#key-manager .primary:hover {
  background: oklch(88% 0.05 85);
}
#toggle-create {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}
#toggle-create span {
  font-size: 18px;
  line-height: 1;
}
.create-section {
  padding: 24px;
  margin-bottom: 26px;
  border: 1px solid oklch(42% 0.03 85);
  border-radius: 8px;
  background: var(--surface);
}
.form-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.form-heading h2 {
  font-size: 17px;
  margin: 0;
}
.form-heading button {
  color: var(--muted);
}
.create-form {
  display: grid;
  grid-template-columns: minmax(120px, 1.7fr) minmax(120px, 1fr) auto;
  align-items: end;
  gap: 16px;
  margin: 20px 0 0;
  padding: 0;
  border: 0;
}
.create-form label {
  font-size: 12px;
  margin-bottom: 8px;
}
#key-manager .create-form button {
  min-height: 40px;
}
.new-key {
  margin: 0 0 24px;
  padding: 24px;
  background: oklch(25% 0.02 160);
  border: 1px solid var(--brass);
  border-radius: 8px;
}
.new-key h2 {
  font-size: 18px;
  margin: 0;
}
.new-key p {
  margin: 8px 0 18px;
  font-size: 13px;
  color: var(--muted);
}
.copy-row {
  display: flex;
  gap: 8px;
}
.copy-row input {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, monospace;
}
.registry-heading {
  margin: 0 0 18px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
}
.registry-heading h2 {
  font-size: 15px;
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.1px;
}
.registry-heading > div {
  display: flex;
  gap: 8px;
  align-items: center;
}
.registry-heading input {
  width: 220px;
  max-width: 100%;
}
.registry-heading select {
  width: auto;
  min-width: 140px;
}
.registry-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  min-height: 36px;
  gap: 12px;
}
#key-count {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
#archive-expired {
  color: var(--muted);
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: oklch(20.5% 0.009 160);
}
.table-wrap > table {
  min-width: 700px;
}
.table-wrap > table > tbody > tr > td:first-child {
  width: 23%;
  min-width: 160px;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
th {
  padding: 13px 16px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 17px 16px;
  border-bottom: 1px solid var(--line);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
tbody > tr:last-child > td {
  border-bottom: 0;
}
tbody > tr:not(.activity-row):hover {
  background: oklch(24% 0.009 160);
}
td:first-child {
  overflow-wrap: anywhere;
}
td:last-child {
  text-align: right;
  min-width: 140px;
}
td strong {
  font-weight: 550;
  font-size: 13px;
}
.cell-meta {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.multiple-browsers {
  color: var(--brass);
}
.key-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 5px;
  border: 1px solid var(--line);
  text-transform: capitalize;
  font-size: 11px;
}
.key-status.active {
  background: oklch(27% 0.025 155);
  color: oklch(83% 0.07 155);
  border-color: oklch(36% 0.04 155);
}
.key-status.paused {
  background: oklch(27% 0.025 85);
  color: var(--brass);
  border-color: oklch(38% 0.035 85);
}
.key-status.revoked {
  color: oklch(80% 0.08 35);
}
.key-status.expired {
  color: var(--muted);
}
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}
#key-manager .row-actions button {
  padding: 7px 11px;
  min-height: 34px;
  font-size: 11px;
}
#key-manager .danger {
  color: oklch(80% 0.085 35);
}
.manage-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.manage-actions span {
  margin-right: auto;
  font-size: 13px;
}
.manage-actions button[aria-pressed='true'] {
  color: var(--brass);
  border-color: var(--brass);
}
.activity-row > td {
  padding: 0;
  text-align: left;
}
.activity-panel {
  padding: 24px;
  background: oklch(23% 0.012 160);
}
.activity-panel h3 {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 550;
}
.browser-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 10px;
  font-size: 12px;
}
.browser-heading span {
  font-size: 11px;
}
.activity-table {
  min-width: 550px;
}
.activity-table th {
  background: transparent;
}
.activity-table td,
.activity-table th {
  padding: 10px;
}
.activity-table td:first-child {
  font-family: ui-monospace, monospace;
}
.activity-table td:last-child {
  min-width: 60px;
}
.section-note {
  margin-top: 22px;
  color: var(--muted);
  font-size: 11px;
}
summary {
  cursor: pointer;
  min-height: 30px;
  padding-block: 7px;
}
.section-note p {
  margin: 8px 0;
  max-width: 75ch;
}
.empty {
  padding: 48px 24px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  max-width: none;
}
.table-wrap:has(tbody:empty) {
  display: none;
}
#gameplay-panel .table-wrap > table {
  min-width: 820px;
}
#gameplay-rows td:nth-child(3) {
  min-width: 170px;
}
#gameplay-rows td:last-child {
  min-width: 145px;
  color: var(--muted);
  font-size: 11px;
}
.presence {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}
.presence.online {
  color: oklch(80% 0.075 155);
}
.presence.online::before {
  content: '●';
  margin-right: 5px;
  font-size: 8px;
}
#feedback-list {
  border-top: 1px solid var(--line);
}
#feedback-list:empty {
  border: 0;
}
.feedback-record {
  border-bottom: 1px solid var(--line);
  padding: 25px 2px;
}
.feedback-record header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.feedback-record h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}
.feedback-record time {
  font-size: 11px;
  white-space: nowrap;
}
.feedback-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}
.feedback-state {
  color: var(--muted);
  font-size: 10px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.feedback-state.open {
  color: var(--brass);
}
.feedback-message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 75ch;
  line-height: 1.7;
  font-size: 14px;
  margin: 16px 0 12px;
}
.feedback-record > .help {
  font-size: 11px;
}
.feedback-record details {
  font-size: 11px;
  color: var(--muted);
  max-width: 75ch;
}
.feedback-record .row-actions {
  justify-content: flex-start;
  align-items: center;
  margin-top: 14px;
}
#feedback-more {
  margin-top: 20px;
}
#playtest-status,
#manager-status {
  padding: 12px 15px;
  border: 1px solid oklch(43% 0.04 85);
  border-radius: 6px;
  background: oklch(25% 0.02 85);
  margin: 0 0 20px;
}
@media (max-width: 1180px) {
  .admin-content {
    padding: 32px 24px;
  }
  #key-manager {
    grid-template-columns: 188px minmax(0, 1fr);
  }
  .admin-sidebar {
    padding-inline: 12px;
  }
  .admin-brand {
    padding-inline: 2px;
    font-size: 12px;
  }
  .registry-heading {
    align-items: start;
    flex-direction: column;
  }
  .registry-heading > div {
    width: 100%;
    flex-wrap: wrap;
  }
  .registry-heading input {
    flex: 1;
    min-width: 150px;
  }
}
@media (max-width: 760px) {
  #key-manager {
    display: block;
  }
  .admin-sidebar {
    position: static;
    height: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .admin-brand small {
    display: none;
  }
  .admin-sections {
    flex-direction: row;
    margin-top: 20px;
  }
  .admin-sections button {
    flex: 1;
    justify-content: center;
  }
  .sidebar-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 16px;
    gap: 8px;
  }
  .connection {
    margin-right: auto;
    padding: 0;
  }
  .admin-content {
    padding: 26px 16px;
  }
  .workspace-heading {
    align-items: start;
    gap: 16px;
  }
  .workspace-heading h1 {
    font-size: 26px;
  }
  .workspace-heading .section-description {
    max-width: 28ch;
  }
  .create-form {
    grid-template-columns: 1fr;
  }
  .copy-row {
    flex-wrap: wrap;
  }
  .copy-row input {
    flex-basis: 100%;
  }
  .registry-heading select {
    min-width: 120px;
  }
  .feedback-record header {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }
}

.room-progress {
  display: block;
  appearance: none;
  width: 76px;
  height: 3px;
  margin-top: 7px;
  border: 0;
  border-radius: 2px;
  background: var(--line);
  color: var(--brass);
}
.room-progress::-webkit-progress-bar {
  background: var(--line);
  border-radius: 2px;
}
.room-progress::-webkit-progress-value {
  background: var(--brass);
  border-radius: 2px;
}
.room-progress::-moz-progress-bar {
  background: var(--brass);
  border-radius: 2px;
}
