/* IsleMap Admin — NVIDIA / GeForce Experience Control Center */

:root {
  --bg: #0a0a0a;
  --bg-elevated: #111111;
  --panel: #1a1a1a;
  --panel-2: #141414;
  --panel-hover: #222222;
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-strong: rgba(255, 255, 255, 0.14);
  --text: #f2f2f2;
  --muted: #9a9a9a;
  --accent: #76b900;
  --accent-hover: #8fd114;
  --accent-dim: rgba(118, 185, 0, 0.16);
  --accent-glow: rgba(118, 185, 0, 0.35);
  --danger: #ff5a5a;
  --danger-dim: rgba(255, 90, 90, 0.14);
  --warn: #d4b84a;
  --font: "Segoe UI Variable", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --radius: 4px;
  --radius-lg: 8px;
  --chrome-border: #2a2a2a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: #454545 #121212;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #121212;
  border-left: 1px solid #2a2a2a;
}
::-webkit-scrollbar-thumb {
  background: #3a3a3a;
  border: 2px solid #121212;
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: #5a8f00;
}

html,
body {
  min-height: 100%;
  height: 100%;
  background: #050505;
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow: auto;
}

.window-shell {
  position: relative;
  min-height: 100%;
  background:
    radial-gradient(900px 480px at 0% 0%, rgba(118, 185, 0, 0.07), transparent 55%),
    radial-gradient(700px 420px at 100% 0%, rgba(255, 255, 255, 0.03), transparent 50%),
    linear-gradient(180deg, #0d0d0d 0%, #080808 100%);
  border: 1px solid var(--chrome-border);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.window-shell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 40;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    #5f9400 28%,
    rgba(118, 185, 0, 0.35) 55%,
    transparent 82%
  );
}

.kicker {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 10px;
}

code {
  color: var(--accent);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.92em;
}

.brand-diamond {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  background: var(--accent);
  transform: rotate(45deg);
  box-shadow: 0 0 12px var(--accent-glow);
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: #0a0a0a;
  border: 1px solid rgba(118, 185, 0, 0.35);
  border-radius: var(--radius);
  box-shadow: 0 0 24px rgba(118, 185, 0, 0.12);
  overflow: hidden;
  padding: 0;
  flex: 0 0 40px;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ——— Auth gate ——— */
.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.gate-panel {
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 32px 28px 26px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 24px 60px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}

.gate-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(118, 185, 0, 0.15));
}

.gate-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.gate-panel h1 {
  margin-top: 4px;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.lede {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 22px;
}

.gate-form {
  display: grid;
  gap: 14px;
}

.gate-foot {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--stroke);
  font-size: 12px;
}

/* ——— Controls ——— */
.field {
  display: grid;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

input,
select,
textarea {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text);
  background: #111;
  border: 1px solid #2f2f2f;
  border-radius: 2px;
  padding: 11px 12px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(118, 185, 0, 0.55);
  box-shadow: 0 0 0 1px rgba(118, 185, 0, 0.2);
}

.btn {
  appearance: none;
  cursor: pointer;
  border-radius: 2px;
  padding: 11px 18px;
  min-height: 40px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease,
    transform 80ms ease;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* —— App updates (NVIDIA Control Center) —— */
.updates-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.updates-panel,
.updates-side {
  min-width: 0;
}

.updates-panel .panel-head h3,
.updates-side .panel-head h3 {
  margin-top: 4px;
}

.updates-lead {
  margin-top: 8px;
  max-width: 52ch;
  line-height: 1.5;
}

.updates-status {
  display: grid;
  grid-template-columns: 4px 1fr;
  gap: 0;
  margin: 0 0 20px;
  border: 1px solid rgba(118, 185, 0, 0.22);
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(118, 185, 0, 0.08), rgba(0, 0, 0, 0.25));
}

.updates-status-rail {
  background: linear-gradient(180deg, var(--accent), #3f6400);
}

.updates-status-content {
  padding: 14px 16px;
}

.updates-status-kicker {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.updates-live-body {
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.updates-live-body .muted {
  margin-top: 6px;
  display: block;
}

.updates-form {
  display: grid;
  gap: 16px;
}

.updates-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.updates-form-grid .span-all {
  grid-column: 1 / -1;
}

.updates-drop {
  position: relative;
  border: 1px dashed rgba(118, 185, 0, 0.4);
  border-radius: 4px;
  background:
    radial-gradient(520px 140px at 0% 0%, rgba(118, 185, 0, 0.12), transparent 60%),
    #0e0e0e;
  outline: none;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease;
}

.updates-drop:hover,
.updates-drop:focus-visible,
.updates-drop.is-dragover {
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px rgba(118, 185, 0, 0.25),
    0 0 28px rgba(118, 185, 0, 0.1);
}

.updates-drop.has-file {
  border-style: solid;
  border-color: rgba(118, 185, 0, 0.55);
  background:
    radial-gradient(520px 140px at 0% 0%, rgba(118, 185, 0, 0.16), transparent 60%),
    #101410;
}

.updates-file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.updates-drop-visual {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 20px 16px;
}

.updates-drop-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: var(--accent);
  background: #151515;
  border: 1px solid rgba(118, 185, 0, 0.3);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.updates-drop-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.updates-drop-copy strong {
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.updates-drop-copy span {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.updates-browse {
  position: relative;
  z-index: 1;
  min-height: 36px;
  padding: 8px 14px;
}

.updates-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.updates-side .updates-form {
  margin-top: 4px;
}

/* Transfer modal */
.xfer-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.xfer-modal[hidden] {
  display: none !important;
}

.xfer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.xfer-card {
  position: relative;
  width: min(560px, 100%);
  border: 1px solid var(--stroke-strong);
  border-radius: 6px;
  background: linear-gradient(180deg, #171717 0%, #101010 100%);
  box-shadow:
    0 0 0 1px rgba(118, 185, 0, 0.08),
    0 30px 90px rgba(0, 0, 0, 0.65);
  padding: 22px 22px 18px;
  overflow: hidden;
}

.xfer-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #b6ff3a 40%, transparent 78%);
}

.xfer-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.xfer-head h3 {
  margin-top: 4px;
  font-size: 1.35rem;
  font-weight: 650;
}

.xfer-file {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--stroke);
}

.xfer-file-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #0a0a0a;
  background: var(--accent);
  border-radius: 3px;
}

.xfer-file-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.xfer-file-meta strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.xfer-file-meta span {
  color: var(--muted);
  font-size: 12px;
}

.xfer-percent {
  font-size: 1.5rem;
  font-weight: 750;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.xfer-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.xfer-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5a8f00, var(--accent) 55%, #c8ff4a);
  box-shadow: 0 0 16px rgba(118, 185, 0, 0.45);
  transition: width 100ms linear;
}

.xfer-modal.is-indeterminate .xfer-fill {
  width: 32% !important;
  animation: xfer-slide 1.15s ease-in-out infinite;
}

.xfer-modal.is-done .xfer-fill {
  background: linear-gradient(90deg, #5a8f00, var(--accent));
}

.xfer-modal.is-error .xfer-fill {
  background: linear-gradient(90deg, #a33, var(--danger));
  box-shadow: none;
}

.xfer-modal.is-error .xfer-percent {
  color: var(--danger);
}

@keyframes xfer-slide {
  0% {
    transform: translateX(-130%);
  }
  100% {
    transform: translateX(360%);
  }
}

.xfer-status {
  margin: 12px 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  min-height: 1.4em;
}

.xfer-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.xfer-stat {
  padding: 10px 12px;
  border: 1px solid var(--stroke);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
  display: grid;
  gap: 4px;
}

.xfer-stat-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.xfer-stat strong {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.xfer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 980px) {
  .updates-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .updates-form-grid,
  .xfer-stats {
    grid-template-columns: 1fr;
  }

  .updates-drop-visual {
    grid-template-columns: auto 1fr;
  }

  .updates-browse {
    grid-column: 1 / -1;
    justify-self: start;
  }
}


.btn-block {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(180deg, #85c900 0%, var(--accent) 100%);
  color: #0a0a0a;
  border-color: #6aa600;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 2px 8px rgba(118, 185, 0, 0.22);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #95d914 0%, var(--accent-hover) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 4px 16px rgba(118, 185, 0, 0.35);
}

.btn-ghost {
  background: transparent;
  color: #c0c0c0;
  border-color: #333;
}

.btn-ghost:hover {
  border-color: rgba(118, 185, 0, 0.45);
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.btn-danger {
  background: linear-gradient(180deg, #ff6d6d 0%, var(--danger) 100%);
  color: #fff;
  border-color: #e04545;
}

.btn-danger:hover {
  filter: brightness(1.05);
}

.btn-link {
  background: transparent;
  border: 0;
  color: var(--accent);
  min-height: 0;
  padding: 6px 8px;
  letter-spacing: 0.04em;
}

.btn-link:hover {
  color: var(--accent-hover);
}

.btn-link.is-danger {
  color: var(--danger);
}

.btn-link.is-danger:hover {
  color: #ff7a7a;
}

/* ——— Shell / sidebar ——— */
.shell {
  display: grid;
  grid-template-columns: 236px 1fr;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: 8px;
  padding: 20px 14px 0;
  border-right: 1px solid var(--stroke);
  background: #0c0c0c;
  position: relative;
}

.sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(118, 185, 0, 0.35),
    transparent
  );
  pointer-events: none;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 4px 8px 18px;
}

.brand-text strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.brand-text span {
  display: block;
  margin-top: 3px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.nav-label {
  padding: 0 10px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #666;
}

.side-nav {
  display: grid;
  gap: 2px;
  align-content: start;
  padding: 0 4px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 11px 12px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: transparent;
  color: #b0b0b0;
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.nav-ico {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: grid;
  place-items: center;
  color: #5c5c5c;
  background: none;
  transform: none;
  border-radius: 0;
}

.nav-ico svg {
  width: 16px;
  height: 16px;
  display: block;
}

.nav:hover .nav-ico {
  color: #c8c8c8;
}

.nav.is-active .nav-ico {
  color: var(--accent);
  background: none;
  box-shadow: none;
}

.nav:hover {
  background: var(--panel-hover);
  color: var(--text);
}

.nav.is-active {
  background: var(--accent-dim);
  color: var(--text);
  border-color: rgba(118, 185, 0, 0.22);
}

.nav.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--accent);
  border-radius: 1px;
  box-shadow: 0 0 10px var(--accent-glow);
}

.side-foot {
  margin-top: auto;
  padding: 12px 4px 18px;
  border-top: 1px solid var(--stroke);
  display: grid;
  gap: 10px;
}

.operator-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.operator-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid rgba(118, 185, 0, 0.28);
}

.operator-meta {
  min-width: 0;
}

.operator-meta strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.operator-meta span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace {
  padding: 24px 28px 56px;
  overflow: auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.workspace.is-map {
  overflow: hidden;
  padding-bottom: 20px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--stroke);
}

.topbar h2 {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-top: 4px;
}

.top-meta {
  display: flex;
  gap: 10px;
  align-items: center;
}

.status-pill {
  border-radius: 2px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.status-pill.is-live {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(118, 185, 0, 0.28);
}

.meta-chip {
  color: var(--muted);
  font-size: 12px;
  padding: 5px 10px;
  border: 1px solid var(--stroke);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.02);
}

.view {
  display: none;
}

.view.is-active {
  display: grid;
  gap: 16px;
}

.view-map.is-active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.stat,
.panel {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
}

.stat {
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.stat::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  opacity: 0.55;
}

.stat span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  margin-top: 10px;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.stat-hint {
  margin-top: 6px;
  color: #6e6e6e;
  font-size: 11px;
  line-height: 1.35;
}

.panel {
  padding: 18px;
}

.panel-head {
  margin-bottom: 14px;
}

.panel h3 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.toolbar {
  display: flex;
}

.toolbar input {
  width: min(420px, 100%);
}

.inline-form,
.grid-form {
  display: grid;
  gap: 10px;
}

.inline-form {
  grid-template-columns: 1fr auto;
}

.grid-form {
  grid-template-columns: 1fr 1fr 1fr auto;
  align-items: end;
}

.span-2 {
  grid-column: 1 / 3;
}

.table-wrap {
  overflow: auto;
  padding: 0;
}

.table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #161616;
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 36px 16px;
}

.empty-state {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 28px 16px 32px;
  color: var(--muted);
}

.empty-state strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}

.empty-state p {
  margin: 0;
  max-width: 360px;
  font-size: 13px;
  line-height: 1.45;
  color: #7a7a7a;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--stroke);
  vertical-align: middle;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.22);
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

td .who {
  font-weight: 650;
}

td .sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 2px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.badge.is-ok {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(118, 185, 0, 0.25);
}

.badge.is-warn {
  background: rgba(196, 160, 48, 0.12);
  color: var(--warn);
  border-color: rgba(196, 160, 48, 0.28);
}

.badge.is-off {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-color: var(--stroke);
}

.badge.is-danger {
  background: var(--danger-dim);
  color: var(--danger);
  border-color: rgba(255, 90, 90, 0.28);
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
  flex-wrap: wrap;
  white-space: nowrap;
}

dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  height: fit-content;
  max-height: calc(100vh - 32px);
  border: 1px solid var(--stroke-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  padding: 0;
  width: min(440px, calc(100% - 32px));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  overflow: auto;
}

dialog::before {
  content: "";
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(118, 185, 0, 0.2));
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

dialog form {
  display: grid;
  gap: 12px;
  padding: 22px;
}

dialog h3 {
  font-size: 18px;
  font-weight: 650;
}

dialog menu {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  background: #1a1a1a;
  border: 1px solid rgba(118, 185, 0, 0.35);
  border-left: 2px solid var(--accent);
  border-radius: 2px;
  padding: 12px 14px;
  max-width: 360px;
  font-size: 13px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

@media (max-width: 1100px) {
  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--stroke);
  }
  .side-nav {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
  }
  .nav.is-active::before {
    display: none;
  }
  .stats,
  .grid-form,
  .inline-form {
    grid-template-columns: 1fr;
  }
  .span-2 {
    grid-column: auto;
  }
  .all-players-layout {
    grid-template-columns: 1fr;
  }
  #all-players-map {
    min-height: 360px;
  }
}

/* ——— All players map ——— */
.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.field-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.ss-filter.is-active {
  border-color: rgba(118, 185, 0, 0.35);
  background: rgba(118, 185, 0, 0.12);
  color: var(--text);
}

.dest-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 10px 14px;
  border: 1px solid #2a2a2a;
  border-radius: 2px;
  background: linear-gradient(180deg, #1a1a1a 0%, #121212 100%);
  flex: 0 0 auto;
}

.dest-map-toolbar-copy {
  min-width: 140px;
  margin-right: auto;
}

.dest-map-toolbar-copy h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.dest-map-toolbar-copy p {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.waypoint-status.compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.waypoint-status-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #777;
}

.dest-coords,
.dest-remaining {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  min-width: 1.5ch;
}

.all-players-page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.all-players-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

#btn-all-players-refresh.is-busy {
  pointer-events: none;
  opacity: 0.65;
}

#btn-all-players-refresh.is-busy svg {
  animation: all-players-spin 0.7s linear infinite;
}

@keyframes all-players-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  #btn-all-players-refresh.is-busy svg {
    animation: none;
  }
}

.all-players-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 260px);
  gap: 10px;
}

.dest-map-card,
.all-players-map-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
}

#all-players-map {
  width: 100%;
  flex: 1;
  min-height: 420px;
  height: auto;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid #2a2a2a;
  background: #05070d;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

#all-players-map .leaflet-container,
#all-players-map .leaflet-pane,
#all-players-map .leaflet-map-pane {
  background: #05070d !important;
  background-color: #05070d !important;
}

#all-players-map .leaflet-container {
  width: 100%;
  height: 100%;
  font: inherit;
}

#all-players-map .leaflet-image-layer {
  filter: saturate(1.05) contrast(1.08) brightness(0.92);
}

#all-players-map .leaflet-control-zoom {
  border: 1px solid #2a2a2a !important;
  border-radius: 2px !important;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

#all-players-map .leaflet-control-zoom a {
  background: #141414 !important;
  color: #f2f2f2 !important;
  border-bottom-color: #2a2a2a !important;
  width: 32px;
  height: 32px;
  line-height: 32px;
  font-size: 16px;
}

#all-players-map .leaflet-control-zoom a:hover {
  background: #1e1e1e !important;
  color: var(--accent) !important;
}

#all-players-map .peer-marker {
  background: transparent !important;
  border: 0 !important;
}

#all-players-map .peer-dot {
  width: 12px;
  height: 12px;
  margin: 4px;
  border-radius: 50%;
  background: var(--peer, #ff7ab8);
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.65),
    0 0 10px color-mix(in srgb, var(--peer, #ff7ab8) 70%, transparent);
}

#all-players-map .peer-dot.is-primal {
  cursor: pointer;
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.65),
    0 0 0 3px rgba(118, 185, 0, 0.45),
    0 0 12px color-mix(in srgb, var(--peer, #ff7ab8) 70%, transparent);
}

#all-players-map .peer-dot.is-bosch {
  cursor: pointer;
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.65),
    0 0 0 3px rgba(90, 160, 220, 0.5),
    0 0 12px color-mix(in srgb, var(--peer, #ff7ab8) 70%, transparent);
}

#all-players-map .peer-meta {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  display: grid;
  gap: 2px;
  justify-items: center;
  pointer-events: none;
}

#all-players-map .peer-label {
  white-space: nowrap;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--peer, #ff7ab8) 35%, rgba(0, 0, 0, 0.75));
  border: 1px solid color-mix(in srgb, var(--peer, #ff7ab8) 55%, transparent);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

#all-players-map .peer-src {
  white-space: nowrap;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c7d0da;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

#all-players-map .peer-src.is-primal {
  color: #d7f08a;
  border-color: rgba(118, 185, 0, 0.45);
}

#all-players-map .peer-src.is-bosch {
  color: #a8d0f0;
  border-color: rgba(90, 160, 220, 0.5);
}

#all-players-map .peer-seen {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e8eef5;
  font-size: 9px;
  font-weight: 700;
}

#all-players-map .peer-seen-eye {
  width: 10px;
  height: 10px;
  fill: currentColor;
}

.all-players-side {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
}

.all-players-side-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 8px;
}

.all-players-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  flex: 1;
  min-height: 0;
  display: grid;
  gap: 4px;
  align-content: start;
}

.all-players-list li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 8px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
}

.all-players-list li:hover {
  background: var(--panel-hover);
}

.all-players-list li.is-primal {
  border-color: rgba(118, 185, 0, 0.22);
}

.all-players-list li.is-bosch {
  border-color: rgba(90, 160, 220, 0.28);
}

.all-players-list .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--peer, #ff7ab8);
  box-shadow: 0 0 8px color-mix(in srgb, var(--peer, #ff7ab8) 60%, transparent);
}

.all-players-list .name-wrap {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.all-players-list .name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.all-players-list .ap-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 10px;
  color: var(--muted);
}

.all-players-list .ap-list-src,
.all-players-list .ap-list-dino {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.all-players-list li.is-primal .ap-list-src {
  color: #b7d96a;
}

.all-players-list li.is-bosch .ap-list-src {
  color: #8eb8e0;
}

.all-players-list .age {
  font-size: 11px;
  font-weight: 700;
  color: #9aa3ad;
}

.ap-leaflet-popup .leaflet-popup-content-wrapper {
  background: #121212;
  color: var(--text);
  border: 1px solid #2f2f2f;
  border-radius: 4px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}

.ap-leaflet-popup .leaflet-popup-tip {
  background: #121212;
}

.ap-leaflet-popup .leaflet-popup-content {
  margin: 10px 12px;
  min-width: 180px;
}

.ap-popup {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.ap-popup-bosch {
  grid-template-columns: minmax(0, 1fr);
}

.ap-popup-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 3px;
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
}

.ap-popup-img-empty {
  background:
    linear-gradient(135deg, #1a1a1a 25%, transparent 25%) -8px 0 / 16px 16px,
    linear-gradient(225deg, #1a1a1a 25%, transparent 25%) -8px 0 / 16px 16px,
    #0d0d0d;
}

.ap-popup-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ap-popup-user {
  font-size: 13px;
  color: #f2f5f8;
}

.ap-popup-char,
.ap-popup-dino,
.ap-popup-coords {
  font-size: 12px;
  color: #c4ced8;
}

.ap-popup-src {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b7d96a;
}
