/* Shared Admin UI styles */

.admin-page .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.admin-shell-body {
  margin: 0;
  min-height: 100vh;
}

.admin-shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  border-right: 1px solid rgba(124, 156, 255, 0.18);
  background:
    radial-gradient(680px 340px at 0% -20%, rgba(46, 121, 255, 0.2), transparent 62%),
    linear-gradient(180deg, rgba(9, 18, 36, 0.96), rgba(8, 13, 27, 0.98));
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  box-sizing: border-box;
  overflow: hidden;
}

.admin-brand {
  border: 1px solid rgba(124, 156, 255, 0.22);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(22, 36, 69, 0.52);
}

.admin-brand-eyebrow {
  color: #89a9d4;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-brand-title {
  color: #eff6ff;
  font-size: 18px;
  font-weight: 800;
  margin-top: 2px;
}

.admin-nav-stack {
  display: flex;
  flex-direction: column;
  gap: 7px;
  border: 1px solid rgba(124, 156, 255, 0.18);
  border-radius: 12px;
  background: rgba(14, 30, 58, 0.36);
  padding: 8px;
  align-items: stretch;
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: thin;
}

.admin-nav-link {
  text-decoration: none;
  color: #c9d8f6;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 10px;
  font-weight: 600;
  font-size: 14px;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.admin-nav-group-label {
  margin: 10px 10px 2px;
  color: #7087ad;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.admin-nav-group-label:first-child { margin-top: 3px; }

.admin-nav-link::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(152, 183, 242, 0.5);
  flex: 0 0 auto;
  transition: transform .15s ease, background-color .15s ease;
}

.admin-nav-link:hover {
  background: rgba(93, 141, 255, 0.13);
  border-color: rgba(116, 159, 255, 0.25);
  color: #f2f8ff;
}

.admin-nav-link:hover::before {
  background: rgba(198, 221, 255, 0.9);
}

.admin-nav-link.is-active {
  background: linear-gradient(180deg, rgba(38, 120, 255, 0.28), rgba(24, 78, 182, 0.28));
  border-color: rgba(92, 154, 255, 0.56);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.admin-nav-link.is-active::before {
  background: #7fe3ff;
  transform: scale(1.12);
}

.admin-nav-link-quiet {
  color: #9fb4d8;
  font-size: 14px;
}

.admin-sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid rgba(124, 156, 255, 0.18);
  padding-top: 12px;
}

.admin-user-chip {
  border: 1px solid rgba(124, 156, 255, 0.24);
  border-radius: 10px;
  padding: 7px 10px;
  color: #e5f0ff;
  background: rgba(17, 39, 71, 0.45);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-chip-muted {
  color: #9cb3d9;
  font-weight: 500;
}

.admin-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(124, 156, 255, 0.18);
  background: rgba(10, 19, 37, 0.88);
  backdrop-filter: blur(8px);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-topbar-title {
  margin: 0;
  font-size: 22px;
  color: #f4f8ff;
  letter-spacing: .2px;
  flex: 1 1 auto;
}

.admin-global-search {
  display: flex;
  gap: 7px;
  flex: 0 1 520px;
}

.admin-global-search input { min-width: 120px; width: 100%; }

.admin-role-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(124, 156, 255, .28);
  border-radius: 999px;
  background: rgba(24, 44, 80, .72);
  color: #cfe0ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.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;
}

.admin-content {
  padding: 18px 20px 20px 20px;
}

.admin-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 12px 0;
  color: #97add1;
  font-size: 13px;
}

.admin-breadcrumbs a {
  color: #cfe0ff;
  text-decoration: none;
}

.admin-breadcrumbs a:hover {
  color: #fff;
}

.admin-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.admin-create-user {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid rgba(124, 156, 255, 0.2);
  border-radius: 10px;
  background: rgba(12, 19, 38, 0.72);
}

.admin-create-user summary {
  cursor: pointer;
  font-weight: 700;
  color: #dce7ff;
}

.admin-create-user .form {
  max-width: none;
  margin: 12px 0 0;
}

.admin-page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-page-actions .btn {
  min-height: 40px;
}

.admin-danger-zone {
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 12px;
  padding: 14px;
  background: rgba(127, 29, 29, 0.12);
}

.audit-details {
  margin-top: 6px;
  max-width: 34rem;
}

.audit-details summary {
  cursor: pointer;
  color: #b9cdf2;
}

.audit-details pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  color: #dbe8ff;
}

@media (max-width: 980px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(124, 156, 255, 0.18);
  }
  .admin-nav-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
  .admin-nav-link {
    width: 100%;
  }
  .admin-content {
    padding: 14px;
  }
}

@media (max-width: 560px) {
  .admin-sidebar {
    padding: 12px 10px;
  }
  .admin-nav-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-nav-link {
    font-size: 13px;
    padding: 8px;
  }
  .admin-topbar {
    padding: 12px 14px;
  }
  .admin-topbar-title {
    font-size: 18px;
  }
}

.admin-page .nowrap {
  white-space: nowrap;
}

.admin-page .stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-page .subtle-xs {
  opacity: 0.78;
  font-size: 12px;
}

.admin-page .pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(111, 211, 255, 0.35);
  background: rgba(16, 59, 99, 0.35);
  color: #cde5ff;
  font-size: 12px;
  font-weight: 600;
}

.admin-refresh {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.admin-refresh .field-select {
  min-width: 90px;
  border-radius: 8px;
}

.admin-panel {
  background: linear-gradient(180deg, rgba(35, 49, 86, 0.45) 0%, rgba(17, 29, 58, 0.38) 100%);
  border: 1px solid rgba(124, 156, 255, 0.2);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.admin-table th,
.admin-table td {
  vertical-align: top;
}

.admin-table td {
  font-size: 14px;
  line-height: 1.35;
}

.admin-table tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.02);
}

.admin-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.05);
}

.admin-table tbody tr:hover {
  background: rgba(88, 130, 214, 0.18);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
}

.table-wrap .table {
  min-width: 960px;
}

.table-sticky thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.table-sticky-first th:first-child,
.table-sticky-first td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: inherit;
}

.table-sticky-first thead th:first-child {
  z-index: 3;
}

.js-sortable-table thead th.is-sortable {
  cursor: pointer;
  user-select: none;
}

.js-sortable-table thead th[data-sort-dir="asc"]::after {
  content: " ↑";
}

.js-sortable-table thead th[data-sort-dir="desc"]::after {
  content: " ↓";
}

.client-logs-form {
  max-width: none;
  margin-bottom: 12px;
}

.client-logs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  align-items: end;
}

.client-logs-form .form-col {
  min-width: 0;
}

.client-logs-form input,
.client-logs-form select {
  width: 100%;
  height: 42px;
  border-radius: 10px;
  border: 1px solid #2b354f;
  background: #121828;
  color: #e6e9ef;
  padding: 0 12px;
}

.client-logs-form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 36px;
  background-image:
    linear-gradient(45deg, transparent 50%, #8ea1c5 50%),
    linear-gradient(135deg, #8ea1c5 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.client-logs-form select option {
  background: #121828;
  color: #e6e9ef;
}

.client-logs-form input:focus,
.client-logs-form select:focus {
  border-color: #1ca8c0;
  box-shadow: 0 0 0 4px rgba(0, 188, 212, 0.12);
  outline: none;
}

.client-logs-actions {
  display: flex;
  align-items: end;
  gap: 8px;
}

.client-logs-actions .btn {
  min-width: 120px;
  height: 42px;
}

.client-live-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a6adbb;
  font-size: 0.9rem;
}

.client-live-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #00bcd4;
}

.client-live-status {
  font-size: 0.85rem;
  color: #86efac;
  min-width: 90px;
}

.client-live-status.is-warning {
  color: #fbbf24;
}

#live-interval {
  min-width: 72px;
  text-align: center;
  text-align-last: center;
  font-weight: 600;
  color: #e6e9ef;
}

.log-level-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.03em;
}

.log-level-debug {
  background: #1f2937;
  color: #93c5fd;
}

.log-level-info {
  background: #1e3a2f;
  color: #86efac;
}

.log-level-warn {
  background: #4a3315;
  color: #fde68a;
}

.log-level-error {
  background: #4a1d1d;
  color: #fca5a5;
}

.log-row-new {
  animation: logRowPulse 2.2s ease;
}

@keyframes logRowPulse {
  0% {
    background: rgba(34, 197, 94, 0.22);
  }
  100% {
    background: transparent;
  }
}

/* Admin index dashboard */
.ops-shell {
  display: grid;
  gap: 14px;
}

.ops-hero {
  border: 1px solid rgba(120, 170, 255, 0.22);
  border-radius: 14px;
  padding: 16px;
  background:
    radial-gradient(1200px 220px at 0% 0%, rgba(56, 120, 255, 0.18), transparent 60%),
    radial-gradient(900px 220px at 100% 100%, rgba(5, 190, 160, 0.16), transparent 55%),
    linear-gradient(180deg, rgba(12, 22, 44, 0.9), rgba(10, 16, 30, 0.85));
}

.ops-title {
  margin: 0 0 4px 0;
  font-size: 30px;
  letter-spacing: 0.3px;
}

.ops-sub {
  margin: 0;
  color: #99b2d6;
}

.ops-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.ops-card {
  border: 1px solid rgba(112, 132, 168, 0.2);
  border-radius: 12px;
  padding: 12px 13px;
  background: linear-gradient(180deg, rgba(24, 34, 58, 0.88), rgba(20, 29, 48, 0.8));
}

.ops-k {
  font-size: 12px;
  color: #8ea8d1;
  text-transform: uppercase;
  letter-spacing: 0.9px;
}

.ops-v {
  font-size: 29px;
  font-weight: 800;
  line-height: 1.1;
  margin-top: 4px;
  color: #f2f7ff;
}

.ops-s {
  margin-top: 4px;
  font-size: 12px;
  color: #a8bedf;
}

.ops-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ops-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 181, 92, 0.45);
  color: #ffd7a4;
  background: rgba(255, 163, 73, 0.12);
  font-size: 12px;
}

.ops-panel {
  border: 1px solid rgba(112, 132, 168, 0.2);
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(19, 28, 47, 0.85), rgba(14, 21, 36, 0.8));
}

.ops-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.ops-head h3 {
  margin: 0;
  font-size: 18px;
}

.ops-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.ops-actions .btn {
  justify-content: flex-start;
  padding: 10px 12px;
}

.ops-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.ops-list li {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.02);
}

.ops-list a {
  color: #d7e8ff;
  text-decoration: none;
  display: block;
}

.ops-list a:hover {
  color: #fff;
}

.ops-list .meta {
  color: #8ea8d1;
  font-size: 12px;
  margin-top: 2px;
}

/* Admin user profile */
.user-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin-bottom: 10px;
}

.user-card {
  border: 1px solid rgba(116, 138, 173, 0.22);
  border-radius: 12px;
  padding: 11px 12px;
  background: linear-gradient(180deg, rgba(22, 33, 55, 0.88), rgba(17, 25, 41, 0.8));
}

.user-k {
  font-size: 12px;
  text-transform: uppercase;
  color: #8ea8d1;
  letter-spacing: 0.8px;
}

.user-v {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  margin-top: 3px;
  color: #f2f7ff;
}

.user-v-active {
  color: #22c55e;
}

.user-v-offline {
  color: #f2f7ff;
}

.user-admin-yes {
  color: #ef4444;
  font-weight: 700;
}

.user-v-sm {
  font-size: 18px;
}

.user-s {
  font-size: 12px;
  color: #a8bedf;
  margin-top: 3px;
}

.user-block {
  border: 1px solid rgba(116, 138, 173, 0.22);
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(18, 27, 45, 0.86), rgba(14, 21, 35, 0.8));
}

.user-row {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.kv-line {
  color: #d7e8ff;
}

.kv-line strong {
  color: #97b2da;
  font-weight: 600;
}

.bp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.bp-list li {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  color: #dbe9ff;
}

.user-meta-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

.edit-user-form .form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.edit-user-form .form-row-half {
  grid-template-columns: repeat(auto-fit, minmax(280px, 420px));
}

.edit-user-form .form-col {
  width: 100%;
  max-width: 560px;
}

.user-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.kick-user-form {
  margin: 0 0 12px 0;
}

.btn.btn-danger {
  background: linear-gradient(180deg, #dc2626, #b91c1c);
  border-color: #991b1b;
  color: #fff;
}

.btn.btn-danger:hover {
  background: linear-gradient(180deg, #ef4444, #dc2626);
  border-color: #b91c1c;
}

.release-pager {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.release-pager > :first-child {
  justify-self: start;
}

.release-pager > :nth-child(2) {
  justify-self: center;
}

.release-pager > :last-child {
  justify-self: end;
}

.release-pager-btn {
  width: 44px;
  text-align: center;
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.release-pager-btn-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.admin-callout {
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(120, 53, 15, 0.18);
  color: #fde7c7;
  margin-bottom: 12px;
}

.admin-callout strong {
  color: #fff4df;
}

.admin-table-actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-table-note {
  margin: 0 0 8px 0;
  color: #97add1;
  font-size: 13px;
}

.copy-btn {
  margin-left: 6px;
  padding: 3px 7px;
  border-radius: 8px;
  border: 1px solid rgba(124, 156, 255, 0.24);
  background: rgba(17, 39, 71, 0.45);
  color: #cfe0ff;
  font-size: 11px;
  cursor: pointer;
}

.copy-btn:hover {
  background: rgba(41, 82, 145, 0.45);
}

.copy-btn.is-copied {
  border-color: rgba(34, 197, 94, 0.55);
  color: #dcfce7;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(124, 156, 255, 0.24);
}

.status-pill.is-fresh {
  color: #86efac;
  background: rgba(22, 101, 52, 0.18);
  border-color: rgba(34, 197, 94, 0.35);
}

.status-pill.is-stale {
  color: #fde68a;
  background: rgba(120, 53, 15, 0.22);
  border-color: rgba(245, 158, 11, 0.38);
}

.related-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 14px;
}

.related-card {
  border: 1px solid rgba(116, 138, 173, 0.22);
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(18, 27, 45, 0.86), rgba(14, 21, 35, 0.8));
}

.related-card h3 {
  margin: 0 0 8px 0;
  font-size: 15px;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.selection-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 10px;
}

/* Admin news page */
.news-admin-shell {
  display: grid;
  gap: 14px;
  align-items: start;
  grid-template-columns: 1fr;
}

.news-compose-panel,
.news-list-panel {
  border: 1px solid rgba(116, 138, 173, 0.22);
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(18, 27, 45, 0.86), rgba(14, 21, 35, 0.8));
}

.news-panel-head {
  margin-bottom: 10px;
}

.news-panel-title {
  margin: 0;
}

.news-panel-sub {
  margin: 3px 0 0;
  font-size: 13px;
}

.news-compose-form {
  margin: 0;
  max-width: none;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.news-compose-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
  align-items: start;
}

@media (max-width: 1080px) {
  .news-compose-layout {
    grid-template-columns: 1fr;
  }
}

.news-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.news-compose-actions {
  margin-top: 8px;
}

.news-row-actions {
  display: inline-flex;
  gap: 8px;
  justify-content: flex-end;
}

.news-cheatsheet {
  border: 1px solid rgba(124, 156, 255, 0.22);
  border-radius: 10px;
  background: rgba(16, 28, 48, 0.55);
  padding: 12px;
}

.news-cheatsheet h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #d7e8ff;
}

.news-cheatsheet ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.news-cheatsheet li {
  color: #b8cce9;
  font-size: 13px;
}

.news-compose-preview {
  margin-top: 14px;
}

.news-compose-preview .news-item {
  margin: 0;
  min-height: 220px;
}

/* Game server admin page */
.gs-subtle-topless {
  margin-top: 0;
}

.gs-table-filter-section {
  margin: 14px 0 18px;
}

.gs-server-filters {
  border: 1px solid rgba(113, 155, 232, 0.2);
  border-radius: 10px;
  background: rgba(13, 23, 41, 0.7);
}

.gs-server-filters summary {
  padding: 10px 13px;
  cursor: pointer;
  color: #b9cae4;
  font-size: 13px;
  font-weight: 700;
}

.gs-server-filters-body {
  display: grid;
  gap: 10px;
  padding: 0 13px 13px;
}

.gs-server-filters .admin-search-form {
  margin: 0;
}

.gs-map-section {
  margin-top: 22px;
}

.gs-map-workspace {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(113, 155, 232, 0.28);
  border-radius: 16px;
  background: #0a1222;
  box-shadow: 0 18px 48px rgba(1, 5, 15, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.gs-map-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(113, 155, 232, 0.18);
  background: linear-gradient(180deg, rgba(32, 52, 91, 0.62), rgba(18, 31, 57, 0.5));
}

.gs-map-head h3 {
  margin: 2px 0 4px;
  color: #f2f7ff;
  font-size: 21px;
}

.gs-map-head p {
  margin: 0;
  color: #9eb4d8;
  font-size: 13px;
}

.gs-map-eyebrow {
  color: #76d7f7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.gs-live-status {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  max-width: 46%;
  color: #c9d8f2;
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}

.gs-live-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #91a0b7;
  box-shadow: 0 0 0 4px rgba(145, 160, 183, 0.12);
}

.gs-live-dot.is-loading {
  background: #e7ca63;
  box-shadow: 0 0 0 4px rgba(231, 202, 99, 0.12);
  animation: gs-status-pulse 1.1s ease-in-out infinite;
}

.gs-live-dot.is-live {
  background: #62df91;
  box-shadow: 0 0 0 4px rgba(98, 223, 145, 0.13);
}

.gs-live-dot.is-paused {
  background: #8fa8cf;
}

.gs-live-dot.is-error {
  background: #ff7373;
  box-shadow: 0 0 0 4px rgba(255, 115, 115, 0.13);
}

@keyframes gs-status-pulse {
  50% { opacity: .45; }
}

.gs-control-deck {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 1px;
  border-bottom: 1px solid rgba(113, 155, 232, 0.18);
  background: rgba(113, 155, 232, 0.15);
}

.gs-control-group {
  min-width: 0;
  margin: 0;
  padding: 11px 14px 13px;
  border: 0;
  background: #0d1729;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 9px 10px;
}

.gs-control-group legend {
  float: left;
  width: 100%;
  margin: 0 0 2px;
  padding: 0;
  color: #7193c7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.gs-control-group label {
  min-width: 0;
  margin: 0;
  color: #a9bddc;
  font-size: 11px;
  font-weight: 600;
  display: grid;
  gap: 4px;
}

.gs-control-group select,
.gs-control-group input[type="number"] {
  width: auto;
  min-width: 94px;
  max-width: 190px;
  height: 34px;
  padding: 4px 8px;
  border: 1px solid #304363;
  border-radius: 7px;
  background: #101c31;
  color: #e1eafa;
  font-size: 12px;
}

.gs-control-group select:focus,
.gs-control-group input[type="number"]:focus {
  outline: 2px solid rgba(93, 196, 235, 0.34);
  outline-offset: 1px;
  border-color: #5dc4eb;
}

.gs-control-group select:disabled,
.gs-control-group input:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.gs-control-group input[type="range"] {
  width: 112px;
  accent-color: #69c8ec;
}

.gs-control-group .gs-check-control {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  white-space: nowrap;
}

.gs-slice-controls {
  display: grid;
  grid-template-columns: 32px 68px 32px;
  gap: 4px;
}

.gs-slice-controls .btn {
  min-width: 0;
  min-height: 34px;
  padding: 4px;
}

.gs-slice-controls input {
  min-width: 0;
  width: 68px;
  text-align: center;
}

.gs-view-toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(113, 155, 232, 0.18);
  background: #0b1425;
}

.gs-button-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.gs-workspace-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
  min-width: 0;
  height: clamp(570px, 68vh, 840px);
}

.gs-map-stage {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #08101f;
}

.gs-legend-load {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.gs-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: #9fb4d5;
  font-size: 11px;
}

.gs-legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
}

.gs-legend-swatch-low { background: #31c46b; }
.gs-legend-swatch-medium { background: #cfb32d; }
.gs-legend-swatch-high { background: #d53b3b; }

.gs-legend-outline {
  width: 14px;
  height: 14px;
  display: inline-block;
  border: 2px solid #7ad9ff;
  border-radius: 3px;
}

.gs-owner-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gs-viz-root {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
  background: #08101f;
}

.gs-viz-root canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.gs-map-hint {
  position: absolute;
  z-index: 2;
  left: 12px;
  bottom: 10px;
  max-width: calc(100% - 24px);
  padding: 6px 9px;
  border: 1px solid rgba(137, 174, 230, 0.16);
  border-radius: 7px;
  background: rgba(7, 14, 28, 0.76);
  color: #8299bb;
  font-size: 11px;
  pointer-events: none;
  backdrop-filter: blur(5px);
}

.gs-map-footer {
  min-height: 42px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid rgba(113, 155, 232, 0.16);
  background: #0b1425;
}

.gs-selection {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  border-left: 1px solid rgba(113, 155, 232, 0.2);
  background: #0d1729;
  scrollbar-color: #31547f #0d1729;
}

.gs-selection-empty {
  min-height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px;
  color: #b8c9e4;
  text-align: center;
}

.gs-selection-empty[hidden],
.gs-selection-content[hidden] {
  display: none;
}

.gs-selection-empty p {
  max-width: 270px;
  margin: 8px 0 0;
  color: #7f96ba;
  font-size: 13px;
  line-height: 1.5;
}

.gs-selection-empty-icon {
  margin-bottom: 12px;
  color: #63c9ee;
  font-size: 44px;
  line-height: 1;
}

.gs-selection-content {
  padding: 14px;
}

.gs-selection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.gs-selection-title {
  color: #f0f6ff;
  font-size: 16px;
  font-weight: 700;
}

.gs-selection-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gs-selection-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 10px;
}

.gs-selection-pane {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(8, 13, 27, 0.45);
}

.gs-operator-actions {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(238, 170, 82, 0.24);
  border-radius: 9px;
  background: rgba(92, 52, 18, 0.12);
}

.gs-operator-actions summary {
  cursor: pointer;
  color: #f1cb91;
  font-weight: 700;
}

.gs-owner-strip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-height: 92px;
  overflow-y: auto;
  padding: 10px 12px;
  border-top: 1px solid rgba(113, 155, 232, 0.18);
  background: #0b1425;
}

.gs-owner-strip-label {
  flex: 0 0 auto;
  padding-top: 4px;
  color: #7193c7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.gs-selection-pane-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.gs-metric-stack {
  display: grid;
  gap: 10px;
}

.gs-metric-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(10, 18, 34, 0.55);
  padding: 8px 10px;
}

.gs-metric-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #91acd8;
  margin-bottom: 6px;
}

.gs-kv-grid {
  display: grid;
  gap: 4px;
}

.gs-kv-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 2px 0;
}

.gs-kv-label {
  color: #a4b9df;
  font-size: 13px;
}

.gs-kv-value {
  color: #ecf3ff;
  font-weight: 600;
  font-size: 13px;
  text-align: right;
}

.gs-sev-good {
  color: #7ee7a3;
  font-weight: 700;
}

.gs-sev-warn {
  color: #f7df73;
  font-weight: 700;
}

.gs-sev-bad {
  color: #ffab66;
  font-weight: 700;
}

.gs-sev-crit {
  color: #ff6f6f;
  font-weight: 800;
}

.gs-version-stale {
  color: #ff7b7b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
}

.gs-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.gs-form-tight {
  max-width: none;
  margin: 0;
}

.gs-form-wide {
  max-width: none;
  margin: 0 0 12px 0;
}

.gs-checkbox-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 0 0 8px 0;
}

.gs-target-select {
  width: 100%;
  margin-bottom: 8px;
}

.gs-inline-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.gs-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.gs-head-row h3 {
  margin: 0;
}

.gs-table-top {
  margin-top: 10px;
}

.gs-owned-coords {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.gs-owned-chip {
  display: inline-block;
  margin: 0 8px 6px 0;
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
}

/* Small generic admin utility classes */
.admin-inline-label {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 0;
}

.admin-select-sm {
  width: 90px;
}

.admin-stat-value-sm {
  font-size: 20px;
}

.admin-form-inline {
  margin: 0;
}

.admin-title-tight {
  margin-bottom: 6px;
}

.admin-subtle-tight {
  margin-top: 0;
  margin-bottom: 10px;
}

.admin-block-mb {
  margin-bottom: 10px;
}

.admin-section-title {
  margin: 0 0 8px 0;
}

.admin-section-title-lg {
  margin: 0 0 10px 0;
}

.admin-subtle-row {
  margin: 0 0 8px 0;
}

.admin-subtle-none {
  margin: 0;
}

.admin-subtle-top {
  margin-top: 6px;
}

.admin-inline-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 6px 0 12px 0;
  flex-wrap: wrap;
}

.log-message-cell {
  max-width: 720px;
  white-space: pre-wrap;
  word-break: break-word;
}

.gs-owner-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(16, 27, 48, 0.9);
  color: #c2d1ea;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.gs-owner-chip:hover,
.gs-owner-chip.is-active {
  border-color: var(--owner-color, rgba(119, 201, 238, 0.7));
  background: rgba(41, 65, 101, 0.82);
  color: #fff;
}

.gs-owner-chip-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  background: var(--owner-color, #7f9dc8);
}

.gs-map-workspace:fullscreen {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
  background: #08101f;
}

.gs-map-workspace:fullscreen .gs-workspace-body {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}

/* Investigation, operations, and control-center surfaces */
.ops-section,
.admin-page section { margin: 0 0 24px; }

.ops-stat-grid { margin: 0 0 24px; }

.ops-quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 9px;
  margin: 0 0 18px;
}
.ops-quick-links a {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid rgba(124,156,255,.17);
  border-radius: 9px;
  background: rgba(15,27,51,.64);
  color: #dce9ff;
  text-decoration: none;
}
.ops-quick-links a:hover { border-color: rgba(103,170,255,.48); background: rgba(28,53,94,.66); }
.ops-quick-links span { color: #8fa8cf; font-size: 11px; }

.investigation-search {
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto minmax(130px, auto) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
}

.investigation-result-grid,
.scenario-grid,
.gate-grid,
.control-grid,
.component-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.investigation-result,
.scenario-card,
.gate-card,
.component-card,
.rollout-hero {
  border: 1px solid rgba(124, 156, 255, .2);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(27, 38, 67, .88), rgba(14, 22, 42, .9));
  padding: 16px;
}

.investigation-result h4,
.scenario-card h4,
.component-card h4,
.gate-card h4 { margin: 7px 0; }

.investigation-result-kind,
.severity-label,
.eyebrow {
  color: #8fb5e8;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.investigation-result-foot,
.alert-card,
.alert-card-actions,
.rollout-hero,
.access-overview {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.related-links { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

.timeline-list { display: grid; gap: 8px; }
.timeline-event {
  display: grid;
  grid-template-columns: 180px 110px minmax(200px, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid rgba(124, 156, 255, .15);
  border-left: 3px solid #648bc6;
  border-radius: 8px;
  background: rgba(15, 24, 44, .72);
}
.timeline-event p { margin: 4px 0 0; }
.timeline-event time, .timeline-source { color: #9fb4d8; font-size: 12px; }
.severity-critical { border-left-color: #ff637d !important; }
.severity-warning { border-left-color: #f4bf58 !important; }
.severity-info { border-left-color: #58bfe8 !important; }

.world-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.world-filter-grid label, .config-form label, .stack-form label { display: grid; gap: 5px; }
.world-filter-grid .form-actions { align-self: end; }
.entity-inspector { border-top: 1px solid rgba(124,156,255,.18); padding-top: 18px; }
.entity-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.entity-summary-grid > div { border: 1px solid rgba(124,156,255,.14); border-radius: 8px; padding: 10px; background: rgba(9,17,33,.4); }
.entity-summary-grid span { display: block; color: #8fa6ca; font-size: 11px; margin-bottom: 4px; text-transform: uppercase; }
.component-card pre, .job-json-grid pre { max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-all; }

.alert-list { display: grid; gap: 10px; }
.alert-card { align-items: flex-start; border: 1px solid rgba(124,156,255,.18); border-left: 4px solid #6595d8; border-radius: 10px; padding: 14px 16px; background: rgba(15,24,44,.78); }
.alert-card h4 { margin: 7px 0 4px; }
.alert-card p { margin: 0 0 8px; }
.alert-card-actions { justify-content: flex-end; align-items: flex-end; flex-direction: column; min-width: min(100%, 360px); }
.inline-reason-form { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.inline-reason-form input { min-width: 180px; }
.ack-note { color: #98b1d6; font-size: 12px; text-align: right; }
.ack-note span { color: #d8e5fb; }
.resolved-alerts summary, .config-editor summary, details.admin-panel > summary { cursor: pointer; font-weight: 750; }

.rollout-hero { margin-bottom: 20px; }
.rollout-hero.is-active { border-color: rgba(87,197,241,.42); box-shadow: inset 0 1px rgba(255,255,255,.05); }
.rollout-hero h3 { margin: 5px 0; font-size: 22px; }
.rollout-progress { min-width: 150px; text-align: center; }
.rollout-progress strong { display: block; font-size: 30px; color: #f5f9ff; }
.rollout-progress span { color: #9fb4d8; }
.gate-card { padding: 12px 14px; }
.gate-card > span, .health-label, .job-status { display: inline-flex; border-radius: 999px; padding: 3px 8px; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.gate-pass, .health-healthy, .job-succeeded { border-color: rgba(66,211,145,.4); }
.gate-pass > span, .health-healthy, .job-succeeded { color: #72e8ad; background: rgba(32,130,82,.18); }
.gate-fail, .health-critical, .job-failed, .job-cancelled { border-color: rgba(255,93,120,.42); }
.gate-fail > span, .health-critical, .job-failed, .job-cancelled { color: #ff8fa2; background: rgba(149,35,59,.2); }
.gate-unknown > span, .health-warning, .job-queued { color: #f5c86d; background: rgba(139,94,22,.2); }
.job-running { color: #72d7ff; background: rgba(34,117,154,.2); }

.scenario-card { display: flex; justify-content: space-between; flex-direction: column; min-height: 185px; }
.scenario-card form { display: flex; align-items: flex-end; gap: 8px; justify-content: flex-end; }
.stack-form { display: grid; gap: 9px; }
.danger-zone { border: 1px solid rgba(255,92,119,.26); border-radius: 12px; padding: 16px; background: rgba(84,20,35,.14); }
.btn-danger { border-color: rgba(255,88,116,.5) !important; background: rgba(168,40,63,.42) !important; color: #fff !important; }

.job-detail { margin-bottom: 20px; }
.job-progress { height: 8px; border-radius: 999px; overflow: hidden; background: rgba(93,121,168,.2); }
.job-progress > div { height: 100%; min-width: 2px; background: linear-gradient(90deg,#3f8cff,#65d8ef); }
.job-json-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.job-json-grid > div { min-width: 0; }

.support-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 16px; align-items: start; }
.support-case { position: sticky; top: 78px; }
.support-case textarea { min-height: 110px; }
.admin-table tr.is-selected td { background: rgba(58,116,204,.14); }

.config-filter { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 18px; }
.config-form { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 14px; }
.config-form .span-2 { grid-column: span 2; }
.config-form textarea { min-height: 100px; }
.config-value { margin: 0; max-width: 520px; max-height: 130px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.is-muted { opacity: .64; }
.checkbox-label { display: flex !important; grid-template-columns: auto 1fr; align-items: center; }

.access-overview { align-items: stretch; margin-bottom: 18px; }
.access-overview > * { flex: 1 1 0; }

@media (max-width: 1050px) {
  .admin-shell { grid-template-columns: 210px 1fr; }
  .admin-topbar { flex-wrap: wrap; }
  .admin-topbar-title { flex-basis: 100%; }
  .admin-global-search { flex: 1 1 320px; }
  .world-filter-grid { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .support-layout { grid-template-columns: 1fr; }
  .support-case { position: static; }
}

@media (max-width: 760px) {
  .admin-shell { display: block; }
  .admin-sidebar { position: static; width: auto; height: auto; overflow: visible; }
  .admin-nav-stack { max-height: 300px; }
  .admin-content { padding: 14px; }
  .admin-role-chip { display: none; }
  .investigation-search { grid-template-columns: 1fr; }
  .timeline-event { grid-template-columns: 1fr; }
  .world-filter-grid, .config-form, .job-json-grid { grid-template-columns: 1fr; }
  .config-form .span-2 { grid-column: auto; }
  .alert-card, .rollout-hero, .access-overview { align-items: stretch; flex-direction: column; }
  .alert-card-actions { min-width: 0; align-items: stretch; }
}

/* Player/session route debugger */
.session-path { display: flex; align-items: stretch; gap: 7px; margin: 12px 0; overflow-x: auto; padding-bottom: 5px; }
.session-path-node { display: grid; align-content: start; gap: 4px; flex: 1 0 145px; min-width: 0; padding: 10px 11px; border: 1px solid rgba(124,156,255,.2); border-radius: 9px; background: rgba(14,25,47,.78); }
.session-path-node > span { color: #8fb5e8; font-size: 10px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.session-path-node strong { overflow-wrap: anywhere; color: #e9f1ff; }
.session-path-node small { color: #8fa8cf; overflow-wrap: anywhere; }
.session-path-arrow { display: grid; place-items: center; color: #648bc6; font-size: 20px; }
.session-debug-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.session-raw-details { border-top: 1px solid rgba(124,156,255,.16); padding-top: 10px; }
.session-raw-details summary { cursor: pointer; color: #b9cdf2; font-weight: 700; }

/* Persisted entity comparison */
.entity-compare-form { display: flex; align-items: flex-end; gap: 9px; flex-wrap: wrap; margin: 14px 0 18px; padding: 12px; border: 1px solid rgba(124,156,255,.18); border-radius: 10px; background: rgba(12,21,40,.62); }
.entity-compare-form label { display: grid; flex: 1 1 300px; gap: 5px; }
.entity-comparison { margin: 0 0 18px; padding: 15px; border: 1px solid rgba(87,197,241,.26); border-radius: 12px; background: rgba(13,24,44,.72); }
.comparison-grid { display: grid; gap: 9px; }
.comparison-card { padding: 12px; border: 1px solid rgba(124,156,255,.16); border-left: 3px solid #f5bf58; border-radius: 9px; background: rgba(20,31,56,.72); }
.comparison-card h4 { margin: 0; }
.comparison-same { border-left-color: #42d391; opacity: .82; }
.comparison-left-only, .comparison-right-only { border-left-color: #ff8fa2; }
.comparison-sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.comparison-sides > div { min-width: 0; padding: 9px; border-radius: 7px; background: rgba(7,14,28,.48); }
.comparison-sides span { color: #8fb5e8; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.comparison-sides p { overflow-wrap: anywhere; }
.comparison-sides code { color: #9fb4d8; }
@media (max-width: 760px) { .comparison-sides { grid-template-columns: minmax(0, 1fr); } }

/* System health and dependency topology */
.system-health-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.health-number-healthy { color: #72e8ad; }
.health-number-degraded { color: #f5c86d; }
.health-number-down { color: #ff8fa2; }

.preflight-banner {
  display: grid;
  grid-template-columns: minmax(240px, .65fr) minmax(0, 1.35fr);
  gap: 18px;
  align-items: center;
  margin: 0 0 22px;
  padding: 16px 18px;
  border: 1px solid rgba(124, 156, 255, .24);
  border-radius: 12px;
  background: rgba(15, 26, 48, .86);
}
.preflight-banner h3 { margin: 5px 0 0; }
.preflight-ready { border-color: rgba(66, 211, 145, .38); background: rgba(20, 91, 59, .14); }
.preflight-warning { border-color: rgba(245, 191, 88, .38); background: rgba(121, 78, 17, .14); }
.preflight-blocked { border-color: rgba(255, 93, 120, .4); background: rgba(112, 27, 44, .16); }
.preflight-messages { display: grid; gap: 5px; color: #bdcce4; }
.preflight-compact { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 18px; padding: 10px 13px; border: 1px solid rgba(124,156,255,.24); border-radius: 9px; background: rgba(15,26,48,.82); }
.preflight-compact > div { display: grid; gap: 3px; }

.dependency-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.dependency-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(124, 156, 255, .2);
  border-left: 3px solid #648bc6;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(25, 36, 64, .9), rgba(12, 20, 38, .92));
}
.dependency-healthy { border-left-color: #42d391; }
.dependency-degraded { border-left-color: #f5bf58; }
.dependency-down { border-left-color: #ff5d78; }
.dependency-card-head, .dependency-card-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dependency-card h4 { margin: 4px 0 0; font-size: 17px; }
.dependency-status-healthy { color: #86efac; border-color: rgba(66,211,145,.38); }
.dependency-status-degraded { color: #fde68a; border-color: rgba(245,191,88,.38); }
.dependency-status-down { color: #ff9bad; border-color: rgba(255,93,120,.4); }
.dependency-facts { display: grid; gap: 7px; margin: 0; }
.dependency-facts > div { display: grid; grid-template-columns: 115px minmax(0, 1fr); gap: 8px; }
.dependency-facts dt { color: #8fa8cf; font-size: 12px; }
.dependency-facts dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.availability-track { width: 100%; height: 7px; border: 0; border-radius: 999px; overflow: hidden; background: rgba(93,121,168,.2); }
.availability-track::-webkit-progress-bar { background: rgba(93,121,168,.2); }
.availability-track::-webkit-progress-value { background: linear-gradient(90deg, #3f8cff, #65d8ef); }
.availability-track::-moz-progress-bar { background: linear-gradient(90deg, #3f8cff, #65d8ef); }
.dependency-impact { flex: 1 1 auto; margin: 0; color: #b9cbe6; line-height: 1.45; }
.dependency-error { margin: 0; padding: 8px 10px; border-radius: 7px; background: rgba(115, 29, 46, .22); color: #ffabb9; overflow-wrap: anywhere; font-size: 12px; }
.dependency-card-foot { align-items: center; border-top: 1px solid rgba(124,156,255,.14); padding-top: 10px; }
.system-health-runbook { margin-top: 22px; }
.system-health-runbook .control-grid > div { padding: 12px; border-radius: 9px; background: rgba(15,27,51,.6); }
.system-health-runbook p { margin-bottom: 0; color: #9fb4d8; }

@media (max-width: 1350px) { .dependency-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .system-health-summary, .dependency-grid, .preflight-banner { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1500px) {
  .gs-control-deck {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }
}

@media (max-width: 1180px) {
  .gs-workspace-body {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
  }

  .gs-map-stage {
    height: clamp(520px, 68vh, 760px);
  }

  .gs-selection {
    max-height: 680px;
    border-top: 1px solid rgba(113, 155, 232, 0.2);
    border-left: 0;
  }

  .gs-selection-empty {
    min-height: 210px;
  }

  .gs-selection-grid {
    grid-template-columns: minmax(260px, .75fr) minmax(340px, 1.25fr);
  }
}

@media (max-width: 720px) {
  .gs-map-head,
  .gs-view-toolbar,
  .gs-map-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .gs-live-status {
    max-width: none;
    text-align: left;
  }

  .gs-control-deck {
    grid-template-columns: minmax(0, 1fr);
  }

  .gs-map-stage {
    height: 520px;
  }

  .gs-selection-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .gs-map-hint {
    display: none;
  }

  .gs-owner-strip {
    flex-direction: column;
  }
}

/* 2026 console polish: one title hierarchy, stable data density, and bounded inspectors. */
.admin-breadcrumbs {
  display: none;
}

.admin-page-head h2,
.ops-head h3,
.news-panel-head h3 {
  margin-top: 4px;
}

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

.ops-stat-grid .stat-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.ops-stat-grid .stat-value {
  display: block;
  line-height: 1.1;
}

.ops-stat-grid .stat-value-time {
  font-size: 1.35rem;
}

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

.investigation-result {
  min-width: 0;
}

.investigation-result h4,
.investigation-result .mono,
.investigation-result p {
  overflow-wrap: anywhere;
}

.investigation-search-hint {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  color: #8fa8cf;
  font-size: 12px;
}

.component-card p {
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.component-card pre {
  max-height: 180px;
  overflow: auto;
}

.client-logs-form {
  padding: 16px;
  border-radius: 12px;
}

.client-logs-grid {
  grid-template-columns: minmax(260px, 1.4fr) minmax(180px, 1fr) minmax(140px, .7fr) minmax(220px, 1.2fr) minmax(110px, .55fr) minmax(110px, .55fr);
}

.client-logs-actions {
  grid-column: 1 / -1;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  padding-top: 4px;
}

.client-logs-actions .btn {
  flex: 0 0 auto;
  min-width: auto;
}

.client-logs-actions #live-interval {
  width: 86px;
  height: 36px;
}

.audit-details-trigger {
  margin-top: 7px;
}

.audit-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 48px));
  padding: 0;
  border: 1px solid rgba(124, 156, 255, .35);
  border-radius: 14px;
  background: #0c1426;
  color: #e8f0ff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .65);
}

.audit-dialog::backdrop {
  background: rgba(3, 7, 18, .78);
  backdrop-filter: blur(3px);
}

.audit-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(124, 156, 255, .2);
}

.audit-dialog-head h3 {
  margin: 4px 0 0;
}

.audit-dialog pre {
  margin: 0;
  padding: 20px;
  max-height: calc(100vh - 180px);
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.55;
}

.planet-stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.planet-detail-card {
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid rgba(87, 197, 241, .3);
  border-radius: 14px;
  background: radial-gradient(circle at top right, rgba(53, 111, 190, .18), transparent 38%), linear-gradient(180deg, rgba(24, 35, 62, .96), rgba(12, 20, 38, .96));
}

.planet-detail-summary {
  margin: 18px 0 14px;
}

.planet-generator-details {
  border-top: 1px solid rgba(124, 156, 255, .18);
  padding-top: 12px;
}

.planet-generator-details summary {
  cursor: pointer;
  color: #d7e7ff;
  font-weight: 750;
}

.planet-generator-details pre {
  max-height: 320px;
  overflow: auto;
  padding: 14px;
  border-radius: 9px;
  background: rgba(5, 10, 22, .72);
  color: #bdd4f6;
}

.planet-catalog-panel {
  padding: 16px;
}

.planet-filter-box {
  display: grid;
  justify-items: end;
  gap: 5px;
  width: min(420px, 100%);
}

.planet-filter-box input {
  width: 100%;
}

.planet-table td:first-child {
  min-width: 190px;
}

.empty-state-inline {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 26px;
  color: #9fb4d8;
  text-align: center;
}

.empty-state-inline strong {
  color: #e5efff;
  font-size: 16px;
}

.warning {
  padding: 10px 12px;
  border: 1px solid rgba(245, 191, 88, .32);
  border-radius: 9px;
  background: rgba(121, 78, 17, .16);
  color: #f6d58f;
}

.news-page-head {
  padding: 4px 0 8px;
}

.news-compose-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  gap: 18px;
  padding: 18px;
  background: radial-gradient(circle at top left, rgba(58, 119, 204, .14), transparent 34%), linear-gradient(180deg, rgba(18, 27, 48, .96), rgba(10, 17, 32, .96));
}

.news-compose-panel > .news-panel-head {
  grid-column: 1 / -1;
  margin-bottom: -2px;
}

.news-compose-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.news-compose-preview {
  position: sticky;
  top: 76px;
  margin: 0;
  min-width: 0;
}

.news-compose-preview .panel-head {
  margin-bottom: 8px;
}

.news-compose-preview .news-item {
  min-height: 440px;
  max-height: 720px;
  margin: 0;
  overflow: auto;
  border-color: rgba(87, 197, 241, .24);
  box-shadow: none;
}

.news-cheatsheet {
  padding: 10px 12px;
}

.news-cheatsheet summary {
  cursor: pointer;
  color: #d7e8ff;
  font-weight: 750;
}

.news-cheatsheet[open] summary {
  margin-bottom: 10px;
}

.news-list-panel {
  padding: 18px;
}

.news-table td {
  vertical-align: middle;
}

.alert-owner {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: baseline;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(87, 197, 241, .22);
  border-radius: 8px;
  background: rgba(24, 61, 93, .22);
}

.alert-owner strong { color: #bfe8ff; }
.alert-owner span { color: #a8bad8; font-size: 12px; }

.alert-manage {
  width: min(430px, 100%);
  padding-top: 2px;
  text-align: left;
}

.alert-manage summary {
  cursor: pointer;
  color: #9fb8df;
  font-size: 12px;
  font-weight: 750;
}

.alert-manage-actions {
  display: grid;
  gap: 7px;
  margin-top: 8px;
  padding: 9px;
  border: 1px solid rgba(124, 156, 255, .18);
  border-radius: 8px;
  background: rgba(6, 13, 27, .42);
}

.alert-manage-actions form {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 0;
}

.alert-manage-actions input,
.alert-manage-actions select { min-width: 0; flex: 1; }

.btn:disabled {
  cursor: not-allowed;
  opacity: .45;
  filter: saturate(.45);
  box-shadow: none;
}

form.is-submitting { opacity: .78; }

@media (max-width: 1500px) {
  .investigation-result-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .client-logs-grid { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
}

@media (max-width: 1100px) {
  .ops-stat-grid, .investigation-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-compose-panel { grid-template-columns: minmax(0, 1fr); }
  .news-compose-panel > .news-panel-head { grid-column: auto; }
  .news-compose-preview { position: static; }
}

@media (max-width: 760px) {
  .ops-stat-grid, .investigation-result-grid, .planet-stat-grid, .client-logs-grid { grid-template-columns: minmax(0, 1fr); }
  .planet-filter-box { justify-items: start; width: 100%; }
}

/* Blueprint Foundry workspace. Kept namespaced so the public-site form and
   table primitives cannot constrain the admin console layout. */
.foundry-page {
  --foundry-panel: rgba(13, 23, 42, .88);
  --foundry-panel-strong: rgba(18, 31, 56, .96);
  --foundry-line: rgba(120, 157, 218, .2);
  --foundry-line-strong: rgba(97, 183, 238, .38);
  width: min(100%, 1720px);
  margin: 0 auto;
}

.foundry-page .admin-page-head {
  margin: 0 0 22px;
  padding: 4px 2px 0;
}

.foundry-page .admin-page-head > div {
  max-width: 980px;
}

.foundry-page .admin-page-head h2 {
  margin: 3px 0 5px;
  color: #f4f8ff;
  font-size: clamp(25px, 2.3vw, 38px);
  line-height: 1.15;
  letter-spacing: -.025em;
}

.foundry-eyebrow {
  color: #6fd7ff;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.foundry-lead {
  max-width: 900px;
  margin: 0;
  color: #9db1cf;
  font-size: 14px;
  line-height: 1.6;
}

.admin-page .foundry-panel {
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid var(--foundry-line);
  border-radius: 14px;
  background:
    radial-gradient(circle at 0 0, rgba(57, 127, 218, .12), transparent 30%),
    linear-gradient(180deg, var(--foundry-panel-strong), var(--foundry-panel));
  box-shadow: inset 0 1px rgba(255, 255, 255, .025), 0 18px 45px rgba(0, 0, 0, .16);
}

.foundry-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.foundry-panel-head > div:first-child {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.foundry-panel-head h3 {
  margin: 0;
  color: #eef5ff;
  font-size: 18px;
  line-height: 1.3;
}

.foundry-panel-head p {
  margin: 3px 0 0;
  color: #8fa6c8;
  font-size: 12px;
  line-height: 1.45;
}

.foundry-step {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(87, 197, 241, .3);
  border-radius: 10px;
  background: rgba(24, 92, 139, .22);
  color: #78dcff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}

.foundry-service-badge,
.foundry-count-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(89, 184, 224, .25);
  border-radius: 999px;
  background: rgba(26, 71, 105, .24);
  color: #a8c9e4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.foundry-service-badge i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #62dfa4;
  box-shadow: 0 0 9px rgba(98, 223, 164, .7);
}

.foundry-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(310px, .7fr);
  gap: 18px;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.foundry-brief-column,
.foundry-settings-column {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 14px;
}

.foundry-settings-column {
  padding: 16px;
  border: 1px solid rgba(120, 157, 218, .16);
  border-radius: 11px;
  background: rgba(7, 14, 28, .44);
}

.foundry-settings-column h4 {
  margin: 0;
  color: #e8f1ff;
  font-size: 14px;
}

.foundry-settings-column > div:first-child p {
  margin: 3px 0 0;
  color: #8198bb;
  font-size: 11px;
  line-height: 1.45;
}

.foundry-field {
  display: grid;
  min-width: 0;
  gap: 6px;
  margin: 0;
  color: #c7d7ee;
  font-size: 12px;
  font-weight: 750;
}

.foundry-field > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.foundry-field em {
  color: #7189ad;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.foundry-field small {
  color: #7188aa;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
}

.foundry-page .foundry-field input,
.foundry-page .foundry-field select,
.foundry-page .foundry-field textarea,
.foundry-page .inline-reason-form input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(110, 145, 201, .25);
  border-radius: 9px;
  background: rgba(5, 12, 25, .78);
  color: #e7effc;
  font: inherit;
  font-weight: 550;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.foundry-page .foundry-field input,
.foundry-page .foundry-field select,
.foundry-page .inline-reason-form input {
  min-height: 40px;
  padding: 9px 11px;
}

.foundry-page .foundry-field textarea {
  min-height: 188px;
  padding: 12px;
  resize: vertical;
  line-height: 1.55;
}

.foundry-page .foundry-field input::placeholder,
.foundry-page .foundry-field textarea::placeholder,
.foundry-page .inline-reason-form input::placeholder {
  color: #526887;
}

.foundry-page .foundry-field input:focus,
.foundry-page .foundry-field select:focus,
.foundry-page .foundry-field textarea:focus,
.foundry-page .inline-reason-form input:focus {
  border-color: #4bbde9;
  background: rgba(7, 16, 32, .96);
  box-shadow: 0 0 0 3px rgba(75, 189, 233, .12);
}

.foundry-reference-field input[type="file"] {
  padding: 5px;
  color: #8da5c6;
}

.foundry-reference-field input[type="file"]::file-selector-button {
  min-height: 29px;
  margin-right: 10px;
  padding: 5px 10px;
  border: 1px solid rgba(99, 169, 226, .3);
  border-radius: 7px;
  background: rgba(37, 83, 132, .45);
  color: #dbeaff;
  font: inherit;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.foundry-budget-grid {
  display: grid;
  grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
  gap: 10px;
}

.foundry-settings-note {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border-left: 2px solid #439fd2;
  border-radius: 0 8px 8px 0;
  background: rgba(28, 72, 111, .18);
}

.foundry-settings-note strong {
  color: #bfe4fb;
  font-size: 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.foundry-settings-note span {
  color: #829abf;
  font-size: 10px;
  line-height: 1.45;
}

.foundry-start-button {
  width: 100%;
  min-height: 42px;
  justify-content: space-between;
  margin-top: 1px;
  padding: 9px 13px;
  border-radius: 9px;
  font-size: 12px;
}

.foundry-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(120, 157, 218, .14);
  border-radius: 10px;
  background: rgba(5, 11, 23, .42);
}

.foundry-job-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  font-size: 12px;
}

.foundry-job-table th {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(120, 157, 218, .2);
  background: rgba(16, 29, 52, .9);
  color: #8099bd;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.foundry-job-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(120, 157, 218, .11);
  color: #b7c8df;
  vertical-align: middle;
  white-space: nowrap;
}

.foundry-job-table tbody tr:last-child td {
  border-bottom: 0;
}

.foundry-job-table tbody tr:not(:only-child):hover {
  background: rgba(45, 99, 158, .11);
}

.foundry-job-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #dceaff;
  text-decoration: none;
}

.foundry-job-link span {
  color: #62c9f2;
  font-size: 10px;
  opacity: 0;
  transition: opacity .15s ease;
}

.foundry-job-table tr:hover .foundry-job-link span {
  opacity: 1;
}

.foundry-job-table .meta {
  margin-top: 2px;
  color: #6880a3;
  font-size: 10px;
}

.foundry-empty-state {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 34px 18px;
  color: #6e88ad;
  text-align: center;
  white-space: normal;
}

.foundry-empty-state > span {
  display: grid;
  width: 32px;
  height: 32px;
  margin-bottom: 3px;
  place-items: center;
  border: 1px solid rgba(103, 178, 225, .24);
  border-radius: 9px;
  color: #65c7ed;
}

.foundry-empty-state strong {
  color: #b9cae1;
  font-size: 13px;
}

.foundry-empty-state p {
  max-width: 480px;
  margin: 0;
  font-size: 11px;
}

.foundry-observer-note {
  color: #9cb2d1;
}

/* Job workspace */
.admin-page .foundry-status-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(100px, 1fr));
  gap: 8px;
  padding: 10px;
}

.foundry-status-strip > div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(120, 157, 218, .12);
  border-radius: 9px;
  background: rgba(6, 13, 27, .42);
}

.foundry-status-strip .meta {
  color: #6f87aa;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.foundry-status-strip strong:not(.pill) {
  color: #e1ebfa;
  font-size: 14px;
}

.foundry-activity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-color: rgba(75, 189, 233, .34);
  background: linear-gradient(120deg, rgba(22, 62, 105, .48), rgba(10, 22, 42, .84));
}

.foundry-activity-pulse {
  width: 11px;
  height: 11px;
  border-radius: 50%;
	background: #687f9f;
	box-shadow: none;
}

.foundry-activity.is-active .foundry-activity-pulse {
	background: #5ed4ff;
  box-shadow: 0 0 0 0 rgba(94, 212, 255, .45);
  animation: foundry-activity-pulse 1.8s infinite;
}

.foundry-activity.is-stale {
  border-color: rgba(220, 103, 94, .55);
}

.foundry-activity.is-slow:not(.is-stale) {
  border-color: rgba(225, 162, 72, .55);
}

.foundry-activity.is-slow:not(.is-stale) .foundry-activity-pulse {
  background: #e1a248;
}

.foundry-activity.is-stale .foundry-activity-pulse {
  background: #ed806f;
  animation: none;
}

.foundry-activity-copy,
.foundry-activity-health {
  display: grid;
  gap: 3px;
}

.foundry-activity-copy .meta {
  color: #70a9cd;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.foundry-activity-copy strong {
  color: #edf7ff;
  font-size: 14px;
}

.foundry-activity-copy > span:last-child,
.foundry-activity-health {
  color: #91aac9;
  font-size: 10px;
}

.foundry-activity-health {
  justify-items: end;
  white-space: nowrap;
}

.foundry-current-issue {
  margin: 0;
	padding: 11px 14px;
	border: 1px solid rgba(225, 162, 72, .5);
	border-radius: 9px;
	background: rgba(105, 67, 17, .24);
	color: #f0c47f;
	font-size: 11px;
	line-height: 1.5;
}

@keyframes foundry-activity-pulse {
  70% { box-shadow: 0 0 0 8px rgba(94, 212, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(94, 212, 255, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .foundry-activity.is-active .foundry-activity-pulse { animation: none; }
}

.foundry-view-grid,
.foundry-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.foundry-view-card {
  min-width: 0;
}

.foundry-view-head {
  align-items: flex-start;
}

.foundry-view-head > div:first-child {
  display: block;
}

.foundry-viewer,
.foundry-render-frame {
  min-height: 460px;
  height: min(58vh, 650px);
  overflow: hidden;
  border: 1px solid rgba(120, 157, 218, .18);
  border-radius: 10px;
  background: #070d18;
  box-shadow: inset 0 0 80px rgba(29, 77, 126, .08);
}

.foundry-viewer canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.foundry-viewer-fallback,
.foundry-empty-render {
  display: grid;
  height: 100%;
  padding: 24px;
  place-items: center;
  color: #7890b2;
  text-align: center;
}

.foundry-render-frame {
  display: grid;
  place-items: center;
}

.foundry-render-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.foundry-render-frame img[hidden] {
  display: none;
}

.foundry-source-panel {
  min-width: 0;
}

.foundry-lua-source {
  max-height: min(52vh, 620px);
  margin: 0;
  padding: 16px 18px;
  overflow: auto;
  border: 1px solid rgba(120, 157, 218, .18);
  border-radius: 10px;
  background: #050b15;
  color: #b9d9ed;
  font: 12px/1.6 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  tab-size: 2;
  white-space: pre;
}

.foundry-lua-source:focus {
  border-color: #4bbde9;
  box-shadow: 0 0 0 3px rgba(75, 189, 233, .12);
  outline: none;
}

.foundry-brief-details {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(120, 157, 218, .14);
}

.foundry-brief-details summary {
  color: #8eabd0;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.foundry-prompt {
  max-height: 22rem;
  margin-top: 10px;
  padding: 12px;
  overflow: auto;
  border-radius: 8px;
  background: rgba(5, 11, 23, .7);
  color: #adbed6;
  line-height: 1.55;
  white-space: pre-wrap;
}

.foundry-events {
  max-height: 26rem;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.foundry-events li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-color: rgba(120, 157, 218, .13);
  border-bottom: 1px solid rgba(120, 157, 218, .13);
  color: #b5c6dd;
  font-size: 11px;
}

.foundry-events li > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.foundry-events li > div span {
  max-width: 62ch;
  overflow-wrap: anywhere;
  color: #829abb;
  line-height: 1.45;
}

.foundry-events li > .meta {
  flex: 0 0 auto;
  white-space: nowrap;
}

.foundry-actions {
  display: grid;
  gap: 10px;
}

.foundry-actions .inline-reason-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 10px;
  width: 100%;
  margin: 0;
}

.foundry-actions .inline-reason-form .btn {
  min-width: 190px;
}

.foundry-state-running { border-color: #4f8fd8; color: #8ec5ff; }
.foundry-state-ready { border-color: #4bbf87; color: #78e0ac; }
.foundry-state-failed,
.foundry-state-cancelled { border-color: #b85b65; color: #f09aa3; }
.foundry-state-published { border-color: #bda654; color: #f1d86e; }

@media (max-width: 1180px) {
  .foundry-create-form { grid-template-columns: minmax(0, 1.3fr) minmax(290px, .8fr); }
  .foundry-viewer, .foundry-render-frame { min-height: 390px; }
}

@media (max-width: 920px) {
  .foundry-create-form,
  .foundry-view-grid,
  .foundry-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-page .foundry-status-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .admin-page .foundry-panel { padding: 13px; border-radius: 11px; }
  .foundry-panel-head { align-items: flex-start; }
  .foundry-service-badge { display: none; }
  .foundry-budget-grid,
  .admin-page .foundry-status-strip,
  .foundry-actions .inline-reason-form { grid-template-columns: minmax(0, 1fr); }
  .foundry-actions .inline-reason-form .btn { width: 100%; min-width: 0; }
  .foundry-viewer, .foundry-render-frame { min-height: 320px; height: 52vh; }
  .foundry-activity { grid-template-columns: auto minmax(0, 1fr); }
  .foundry-activity-health { grid-column: 2; justify-items: start; }
}
