/* Shared components for every registry, detail page, tab and dialog. */
:root { --radius: 4px; --surface-inset: #141a16; --line-soft: #232d26; }
.admin-main { max-width: 2200px; }
.admin-main > *, .panel-card, .card-head > div, .page-toolbar > div { min-width: 0; }
.panel-card, .stat-card, .metric-card, .network-system-card, .screenshot-card,
.pixelar-inventory-panel, .inventory-modal, .inventory-item-tooltip {
  background: var(--panel); border-color: var(--line); border-radius: 4px; box-shadow: none;
}
.panel-card:hover, .metric-card:hover, .network-system-card:hover { background: var(--panel); box-shadow: none; }
.admin-body .panel-card .card-head h2, .admin-body .section-head h2,
.admin-body .modal-head h2, .admin-role-head h2 {
  font: 700 24px/1.2 var(--font-display); letter-spacing: 0; text-transform: none;
}
.card-head { gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.page-toolbar h1 { font-size: clamp(32px, 3.4vw, 48px); letter-spacing: -.015em; }
.page-toolbar .page-description { max-width: 62ch; margin: 12px 0 0; color: #c5cec7; font-size: 14px; font-weight: 400; line-height: 1.6; }
.player-subline { font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 400; color: var(--muted); }
.field-help, .empty-state, .bill-action-note { color: var(--muted); font-size: 14px; font-weight: 400; line-height: 1.6; letter-spacing: 0; text-transform: none; }
.field-help { margin: 16px 0 0; }
.empty-state { padding: 18px 0; }
.search-form { min-width: 0; width: min(440px, 100%); flex-shrink: 0; }
.search-form input { min-width: 0; }

/* Quiet neutral controls, green primary actions, clear destructive actions. */
.admin-body :is(.table-button, .secondary-button, .copy-command, .inline-tabs button, .character-tabs a, .permission-group-tabs button),
.admin-body .search-form button {
  min-height: 40px; padding: 8px 13px; border-radius: 3px; border: 1px solid #3a493e;
  background: #1a241d; color: var(--text); box-shadow: none; transform: none;
  font: 600 14px/1.25 var(--font-body); letter-spacing: 0; text-transform: none;
  text-decoration: none; transition: background 140ms, border-color 140ms, color 140ms;
}
.admin-body :is(.table-button, .secondary-button, .copy-command):hover { background: #253329; border-color: #637e69; color: #d7f5dc; transform: none; box-shadow: none; }
.admin-body .search-form button, .admin-body .button-primary { background: #4bc84b; border-color: #4bc84b; color: #071008; }
.admin-body .search-form button:hover, .admin-body .button-primary:hover { background: #70df70; color: #071008; }
.admin-body .table-button.danger-lite { color: #ffc4c4; background: #2b1c1d; border-color: #664043; }
.admin-body .table-button.danger-lite:hover { background: #3a2225; border-color: #a46065; }
.admin-body .table-button.icon-only { min-width: 40px; width: 40px; height: 40px; padding: 0; }
.admin-body :is(.table-button.disabled, button:disabled) { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.admin-body :is(.inline-tabs button, .character-tabs a, .permission-group-tabs button).active { color: #b1f2b5; background: #203627; border-color: #527d59; box-shadow: inset 0 -2px #4bc84b; }
.character-tabs a.is-wiped { color: #ffc4c4; background: #2b1c1d; border-color: #664043; }
.admin-body :is(.chip, .badge, .bill-status, .retention-cell) { border-radius: 3px; white-space: nowrap; overflow-wrap: normal; word-break: normal; font-size: 12px; line-height: 1.4; letter-spacing: 0; text-transform: none; font-weight: 600; flex-shrink: 0; }
.chip { padding: 5px 9px; min-width: max-content; }
.chip-strong { color: #9beaa1; background: #1c3122; border-color: #3a6542; }
.admin-body :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea) {
  border-radius: 3px; background-color: var(--surface-inset); border-color: #39473d;
  color: var(--text); font-family: var(--font-body); font-size: 14px; font-weight: 400; letter-spacing: 0; text-transform: none; color-scheme: dark;
}
.admin-body :is(.logs-filter-form, .bills-filter-form, .screenshot-filter-form, .admin-role-settings) label > span,
.admin-body .inventory-modal label { color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.admin-body :is(input, select, textarea, button, a):focus-visible { outline: 2px solid #9beaa1; outline-offset: 3px; }
.filter-input:focus-within { outline: 2px solid #9beaa1; outline-offset: 3px; }
.admin-body .filter-input input { background: transparent; }

/* Tables keep identifiers and status labels intact; long prose can wrap. */
.table-wrap { max-width: 100%; border: 1px solid var(--line-soft); border-radius: 4px; scrollbar-gutter: stable; }
.data-table { width: 100%; min-width: 650px; border-collapse: collapse; }
.data-table :is(th, td) { padding: 14px 15px; border-color: var(--line-soft); vertical-align: top; }
.data-table th { background: var(--surface-inset); color: #b9c6bd; font: 600 12px/1.4 var(--font-body); letter-spacing: 0; text-transform: none; white-space: nowrap; }
.data-table td { color: #d5ddd7; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.data-table td:first-child { white-space: nowrap; overflow-wrap: normal; font-variant-numeric: tabular-nums; }
.data-table td strong { color: var(--text); font-weight: 600; }
.data-table td small { color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.55; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #ffffff03; }
.data-table .table-actions { width: 1%; white-space: nowrap; }
.table-action-row { display: flex; gap: 8px; align-items: center; }
.data-table .table-actions .table-button { margin: 0; }
.bans-table { min-width: 1040px; table-layout: auto; }
.bans-table :is(th, td):nth-child(1) { width: 70px; }
.bans-table :is(th, td):nth-child(2) { min-width: 220px; max-width: 260px; }
.bans-table .sanction-reason { min-width: 280px; max-width: 480px; }
.sanction-reason p { margin: 0 0 8px; white-space: pre-line; }
.sanction-identifiers { margin-top: 8px; font-size: 12px; }
.sanction-identifiers summary { cursor: pointer; color: #b1d5b8; padding-block: 4px; }
.bans-table :is(th, td):nth-child(4) { min-width: 172px; font-variant-numeric: tabular-nums; }
.bans-table :is(th, td):nth-child(5) { min-width: 80px; }
.bans-table .table-action-row { flex-direction: column; align-items: stretch; }
.bans-table .inline-action-form, .bans-table .inline-action-form button { width: 100%; }
.bans-table td { padding-top: 20px; padding-bottom: 20px; }
.logs-table { min-width: 1500px; }
.logs-table .log-message { min-width: 320px; max-width: 480px; }
.logs-table :is(th, td):nth-child(3) { min-width: 165px; }
.logs-table :is(th, td):nth-child(6) { min-width: 160px; }
.logs-table :is(th, td):nth-child(7) { min-width: 190px; max-width: 240px; }
.logs-table :is(th, td):nth-child(8) { min-width: 100px; }
.log-json-row pre { padding: 18px; background: var(--surface-inset); color: #d5ddd7; font-size: 13px; overflow-wrap: anywhere; }
.logs-pagination p { font-size: 13px; font-weight: 400; }

/* Player and linked records use the same surfaces as the registries. */
.player-summary-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 20px; }
.player-block { margin-top: 20px; }
.sanctions-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
.sanctions-card .data-table.compact { min-width: 850px; table-layout: auto; }
.sanctions-card :is(th, td) { overflow: visible; text-overflow: clip; }
.sanctions-card :is(th, td):last-child { width: auto; min-width: 170px; }
.sanctions-card :is(th, td):nth-child(3) { width: 35%; min-width: 220px; white-space: pre-line; }
.admin-body :is(.info-list dt, .info-list.dense dt) { color: var(--muted); font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.admin-body :is(.info-list dd, .info-list.dense dd) { min-width: 0; color: var(--text); font-size: 14px; font-weight: 400; overflow-wrap: anywhere; }
.player-info-card .info-list.dense, .character-info-grid { background: transparent; border-color: var(--line-soft); border-radius: 3px; }
.player-info-card .info-list.dense dt, .character-info-grid dt { background: var(--surface-inset); }
.player-info-card .info-list.dense :is(dt, dd), .character-info-grid :is(dt, dd) { padding: 11px 14px; border-color: var(--line-soft); }
.flag-grid span, .mini-metrics span, .bourse-summary-grid span { background: var(--surface-inset); border-color: var(--line-soft); border-radius: 3px; }
.admin-body :is(.flag-grid b, .mini-metrics b, .bourse-summary-grid b) { font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.flag-grid strong, .bourse-summary-grid strong { font-family: var(--font-display); font-size: 28px; font-weight: 700; }
.admin-action-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.action-tile { padding: 18px; gap: 6px 12px; border-radius: 4px; border-color: var(--line); background: var(--surface-inset); box-shadow: none; }
.action-tile:hover { background: #1c2820; box-shadow: none; transform: none; }
.action-tile span { font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.action-tile small { font-size: 13px; font-weight: 400; line-height: 1.5; text-transform: none; }
.action-tile i { border: 0; background: transparent; }
.character-action-bar { padding: 0 0 18px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; gap: 8px; }
.character-data-grid section, .permission-matrix section { background: var(--surface-inset); border-radius: 4px; }
.character-data-grid h3, .permission-matrix h3 { font-size: 15px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.json-stack details, .vehicle-json { background: transparent; border-radius: 3px; }
.json-stack summary, .vehicle-json summary { font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: 0; min-height: 40px; }
.permission-checks label { font-weight: 400; font-size: 13px; }
.permission-checks label strong { font-size: 13px; font-weight: 500; }
.permission-checks label small { font-size: 12px; font-weight: 400; }
.role-picker-item { background: var(--surface-inset); border-radius: 3px; }
.role-picker-item strong, .permission-toolbar strong, .switch-line { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; }
.inventory-modal { max-height: calc(100dvh - 40px); overflow-y: auto; padding: 24px; gap: 18px; box-shadow: 0 24px 80px #0008; }
.modal-head button { width: 40px; height: 40px; flex-shrink: 0; background: var(--surface-inset); }
.pixelar-inventory-panel { min-width: 0; }
.inventory-slot, .inventory-slot.empty { border-color: var(--line); background: var(--surface-inset); border-radius: 3px; }
.inventory-slot:hover { background: #243329; }
.inventory-header-stats span { background: var(--surface-inset); border-radius: 3px; }
.inventory-item-tooltip { border-color: #526657; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); color: var(--text); }
.leaflet-popup-content-wrapper { border-radius: 4px; }
.network-system-card, .screenshot-card { border-radius: 4px; }
.dialog-open { overflow: hidden; }
.auth-shell:not(.login-layout) { width: 100%; padding: 24px; }
.auth-shell:not(.login-layout) .auth-card { min-width: 0; width: min(560px, 100%); border-radius: 4px; overflow-wrap: anywhere; }
.auth-shell:not(.login-layout) .auth-card h1 { font-size: clamp(30px, 5vw, 44px); }
.online-panel-inner, .online-player-modal, .online-summary-card, .online-roster-card { background: var(--panel); border-color: var(--line); border-radius: 4px; }
.online-player-modal, .online-player-modal-head { font-family: var(--font-body); }
.tx-player-modal-nav, .tx-player-modal-content, .tx-player-modal-actions { background: var(--panel); }
.tx-action-dialog, .pixelar-select-menu, .pixelar-select-trigger { background: var(--surface-inset); border-color: var(--line); border-radius: 4px; box-shadow: none; }
.pixelar-select-trigger, .pixelar-select-menu button, .tx-player-modal-nav button, .inventory-header-action { font: 600 14px/1.4 var(--font-body); text-transform: none; letter-spacing: 0; border-radius: 3px; }
.pixelar-select-trigger:hover, .pixelar-select.open .pixelar-select-trigger { background: #233328; box-shadow: none; }
.tx-player-modal-nav button { min-height: 40px; }
.online-player-modal { width: min(760px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; }
.tx-player-modal-layout { grid-template-columns: 170px minmax(0, 1fr); }
.tx-modal-row span, .tx-modal-row strong { font-size: 14px; font-weight: 500; }
.tx-player-modal-actions { flex-wrap: wrap; }
.tx-info-row > span, .tx-info-row > strong, .tx-form-field > span, .tx-notes span { font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.screenshot-lightbox-shell, .screenshot-loading, .screenshot-context { border-radius: 4px; }

@media (max-width: 1250px) {
  .admin-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-toolbar { flex-wrap: wrap; }
  .character-info-grid { grid-template-columns: 130px minmax(0, 1fr); }
  .inventory-shell { grid-template-columns: minmax(0, 1fr); }
  .inventory-meta { position: static; }
}
@media (max-width: 900px) {
  .player-summary-grid, .bill-detail-hero, .administration-role-workspace { grid-template-columns: minmax(0, 1fr); }
  .role-picker-card { position: static; max-height: 320px; }
  .logs-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .tx-player-modal-layout { grid-template-columns: minmax(0, 1fr); }
  .tx-player-modal-nav { display: flex; flex-wrap: wrap; padding: 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .tx-player-modal-nav button { flex: 1 1 40%; }
  .tx-player-modal-content { padding: 16px; }
  .tx-modal-row { grid-template-columns: 110px minmax(0, 1fr); }
  .tx-player-modal-actions .table-button { flex: 1 1 40%; }
  .tx-form-row { grid-template-columns: minmax(0, 1fr); }
  .admin-body .panel-card { padding: 16px; }
  .admin-body .panel-card .card-head h2 { font-size: 22px; }
  .search-form { width: 100%; flex-wrap: wrap; }
  .search-form input { flex: 1 1 180px; }
  .search-form button { flex: 1; }
  .player-summary-grid, .character-data-grid, .admin-action-grid { grid-template-columns: minmax(0, 1fr); }
  .player-info-card .info-list.dense, .character-info-grid { grid-template-columns: 112px minmax(0, 1fr); }
  .player-info-card .info-list.dense :is(dt, dd), .character-info-grid :is(dt, dd) { padding: 10px; font-size: 12px; }
  .character-tabs, .inline-tabs { gap: 6px; }
  .inline-tabs button { flex: 1 0 auto; }
  .logs-filter-form, .bills-filter-form, .screenshot-filter-form, .permission-matrix.compact, .admin-role-settings { grid-template-columns: minmax(0, 1fr); }
  .logs-filter-actions .table-button { flex: 1; }
  .inventory-modal { padding: 18px; }
  .page-toolbar .page-description { font-size: 13px; }
  .admin-role-head, .admin-role-actions { flex-wrap: wrap; }
}
