:root {
  --bg: #0c0c0c;
  --panel: #121212;
  --panel-2: #161616;
  --line: #222222;
  --line-soft: #1a1a1a;
  --text: #f2f2f2;
  --muted: #9b9b9b;
  --muted-2: #6e6e6e;
  --white: #ffffff;
  --black: #0a0a0a;
  --ok: #3dd68c;
  --warn: #e8b339;
  --danger: #ff5c5c;
  --accent: #ff4fd8;
  --radius: 10px;
  --sidebar: 200px;
  --font: "Plus Jakarta Sans", sans-serif;
  --fade: 220ms linear;
}

* {
  box-sizing: border-box;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge legacy */
}

*::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none; /* Chrome/Safari/Edge */
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

body {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

/* ---------- sidebar ---------- */
.sidebar {
  width: var(--sidebar);
  border-right: 1px solid var(--line);
  background: #0e0e0e;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 16px 10px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 20;
  flex-shrink: 0;
}

.side-spacer {
  flex: 1 1 auto;
  min-height: 12px;
}

.side-lang {
  position: relative;
  padding: 10px 4px 2px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}

.side-lang-btn {
  width: 100%;
  border: 1px solid #2a2a2a;
  background: #151515;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ddd;
  transition: background var(--fade), border-color var(--fade);
}

.side-lang-btn:hover,
.side-lang.is-open .side-lang-btn {
  background: #1a1a1a;
  border-color: #3a3a3a;
}

.side-lang-label {
  flex: 1;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-lang-chevron {
  font-size: 0.7rem;
  opacity: 0.7;
  transition: transform 140ms ease;
}

.side-lang.is-open .side-lang-chevron {
  transform: rotate(180deg);
}

.side-lang-menu {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: calc(100% + 6px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid #2a2a2a;
  background: #121212;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  z-index: 30;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px) scale(0.96);
  transform-origin: bottom center;
  transition:
    opacity 160ms ease,
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 180ms;
}

.side-lang.is-open .side-lang-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition:
    opacity 160ms ease,
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s;
}

.side-lang-menu button {
  border: 0;
  background: transparent;
  color: #ddd;
  border-radius: 7px;
  padding: 8px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  text-align: left;
  width: 100%;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 140ms ease,
    transform 160ms cubic-bezier(0.22, 1, 0.36, 1),
    background var(--fade);
}

.side-lang.is-open .side-lang-menu button {
  opacity: 1;
  transform: translateY(0);
}

.side-lang.is-open .side-lang-menu button:nth-child(1) { transition-delay: 30ms; }
.side-lang.is-open .side-lang-menu button:nth-child(2) { transition-delay: 55ms; }
.side-lang.is-open .side-lang-menu button:nth-child(3) { transition-delay: 80ms; }

.side-lang-menu button:hover {
  background: #1d1d1d;
}

.side-lang-menu button.is-active {
  background: #222;
  color: #fff;
}

.side-lang-flag {
  width: 18px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
  pointer-events: none;
  flex-shrink: 0;
}

.side-brand {
  padding: 6px 10px 14px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.side-link {
  min-height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  color: #8a8a8a;
  transition: color var(--fade), background var(--fade), opacity var(--fade);
  font-size: 0.88rem;
  font-weight: 500;
}

.side-link svg,
.side-link .side-emoji {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  object-fit: contain;
}

.side-link span:not(.nav-badge) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-link .nav-badge {
  margin-left: auto;
  width: 18px;
  height: 18px;
  min-width: 18px;
  padding: 0;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
  overflow: hidden;
}

.side-link .nav-badge[hidden] {
  display: none !important;
}

.side-link:hover {
  color: #fff;
  background: #1a1a1a;
}

.side-link.active {
  color: #fff;
  background: #1a1a1a;
  box-shadow: inset 0 0 0 1px #2a2a2a;
}

@media (max-width: 720px) {
  :root {
    --sidebar: 56px;
  }
  .sidebar {
    align-items: center;
    padding: 16px 0;
  }
  .side-brand,
  .side-link span {
    display: none;
  }
  .side-lang {
    width: 100%;
    padding: 8px 6px;
  }
  .side-lang-btn {
    justify-content: center;
    padding: 8px 0;
  }
  .side-lang-label,
  .side-lang-chevron {
    display: none;
  }
  .side-lang-menu {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 140px;
  }
  .side-link {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
  }
}

/* ---------- shell / topbar ---------- */
.shell {
  flex: 1 1 auto;
  width: calc(100% - var(--sidebar));
  min-width: 0;
  padding: 22px 28px 40px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeIn var(--fade) forwards;
}

.topbar h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
}

.topbar .muted,
.muted {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #121212;
  color: #cfcfcf;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--fade), border-color var(--fade), opacity var(--fade), color var(--fade);
}

.icon-btn:hover {
  background: #181818;
  border-color: #2e2e2e;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

div.sensitive,
.pc-host.sensitive,
.pc-ip.sensitive {
  display: block;
  width: fit-content;
  max-width: 100%;
}

.pc-geo.sensitive {
  display: inline-flex !important;
  align-items: center;
  width: fit-content;
  max-width: 100%;
}

.icon-btn.privacy-toggle.active {
  color: #ff4fd8;
  border-color: rgba(255, 79, 216, 0.35);
  background: rgba(255, 79, 216, 0.08);
}

/* Real pixelate filter (SVG) on the content itself */
.sensitive {
  position: relative;
  display: inline-block;
  max-width: 100%;
  vertical-align: middle;
}

body.privacy-on .sensitive {
  user-select: none;
  border-radius: 4px;
  filter: url(#pixelate);
  /* slight padding so filter edges look clean */
  padding: 1px 2px;
}

.account-slot {
  opacity: 0;
  animation: fadeIn var(--fade) forwards;
  animation-delay: 40ms;
}

.account-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #121212;
  transition: border-color var(--fade), background var(--fade);
}

.account-pill:hover {
  border-color: #2e2e2e;
  background: #161616;
}

.account-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(145deg, #ff4fd8, #c44bff);
}

.account-meta {
  display: grid;
  line-height: 1.15;
  padding-right: 2px;
}

.account-meta strong {
  font-size: 0.84rem;
  font-weight: 600;
  color: #fff;
}

.account-meta span {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 500;
}

.content {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: none;
  opacity: 0;
  animation: fadeIn 260ms linear forwards;
  animation-delay: 60ms;
}

.content.wide {
  width: 100%;
  max-width: none;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #121212;
}

.hero-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.hero-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #5865f2;
  color: white;
  font-size: 1.3rem;
  font-weight: 700;
  flex-shrink: 0;
}

.hero-icon.soft {
  background: #1a1a1a;
  border: 1px solid var(--line);
  color: #ddd;
}

.hero-card h2,
.map-head h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.btn-primary,
.btn-ghost,
.actions-btn {
  border: 0;
  border-radius: 8px;
  font-weight: 600;
  padding: 9px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity var(--fade), background var(--fade), border-color var(--fade);
}

.btn-primary {
  background: var(--white);
  color: var(--black);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}

.btn-ghost:hover {
  background: #171717;
  border-color: #2e2e2e;
}

.info-form {
  display: grid;
}

.info-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  align-items: center;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line-soft);
}

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

.info-row .label {
  color: var(--muted);
  font-size: 0.9rem;
}

.info-row .value {
  color: var(--text);
  font-weight: 500;
  word-break: break-all;
}

.info-row input {
  width: 100%;
  border: 1px solid var(--line);
  background: #0e0e0e;
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
  transition: border-color var(--fade);
}

.info-row input:focus {
  border-color: #3a3a3a;
}

.status {
  margin: 12px 0 0;
  min-height: 1.2em;
  color: var(--muted);
  font-size: 0.9rem;
}

.status.ok {
  color: var(--ok);
}

.status.err {
  color: var(--danger);
}

.result-card.hidden {
  display: none;
}

.section-block {
  padding-top: 14px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

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

.empty-box {
  border: 1px dashed #2a2a2a;
  border-radius: 10px;
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  background: #101010;
}

.empty-logs {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 16px;
  text-align: center;
  background: transparent;
}

.empty-logs-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  opacity: 0.85;
  display: block;
}

.empty-logs-text {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.back-row {
  margin-bottom: 4px;
}

.info-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.card.info-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px 18px 0;
  overflow: hidden;
  min-height: 100%;
}

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

.info-panel-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  color: #eaeaea;
}

.info-panel-title svg {
  color: #9a9a9a;
}

.badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #bbb;
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  padding: 3px 8px;
  background: #171717;
}

.kv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}

.kv {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.kv-label {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 600;
}

.kv-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f2f2f2;
  word-break: break-word;
}

.btn-copy-fiche {
  margin-top: auto;
  margin-left: -18px;
  margin-right: -18px;
  margin-bottom: 0;
  width: calc(100% + 36px);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-top: 1px solid var(--line);
  background: #151515;
  color: var(--text);
  border-radius: 0 0 var(--radius) var(--radius);
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 12px 14px;
  cursor: pointer;
  transition: background var(--fade), color var(--fade);
}

.btn-copy-fiche svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-copy-fiche:hover {
  background: #1a1a1a;
}

.btn-copy-fiche.copied {
  color: var(--ok);
}

.shot-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.shot-img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: block;
  background: #0a0a0a;
  transition: opacity var(--fade);
}

.shot-soft-split {
  display: grid;
  grid-template-columns: minmax(180px, 0.85fr) 1.35fr;
  gap: 12px;
  width: 100%;
  align-items: stretch;
}

.shot-soft-shot,
.shot-soft-software {
  min-width: 0;
  margin: 0;
}

.shot-open-compact {
  width: 100%;
  max-width: 100%;
}

.shot-img-compact {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  object-position: top center;
}

@media (max-width: 820px) {
  .shot-soft-split {
    grid-template-columns: 1fr;
  }
}

.shot-open:hover .shot-img {
  opacity: 0.92;
}

.pc-globe-btn {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #151515;
  color: #cfcfcf;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  margin: 0;
  line-height: 0;
  transition: background var(--fade), color var(--fade), border-color var(--fade);
}

.pc-globe-btn svg {
  width: 11px;
  height: 11px;
}

.pc-globe-btn:hover {
  background: #1c1c1c;
  color: #fff;
  border-color: #333;
}

.pc-globe-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.ov-map-modal .modal-panel {
  width: min(560px, 100%);
}

.ov-map-canvas {
  width: 100%;
  height: 320px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #111;
  overflow: hidden;
}

.ov-map-meta {
  margin: 0;
  font-size: 0.82rem;
}

.shot-modal-root .shot-modal-panel {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  height: min(86vh, 900px);
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: scale(0.92);
  transform-origin: center center;
  transition: opacity 200ms linear, transform 200ms linear;
}

.shot-modal-root.open .shot-modal-panel {
  opacity: 1;
  transform: scale(1);
}

.shot-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.shot-modal-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.shot-zoom-label {
  min-width: 52px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.shot-stage {
  flex: 1;
  min-height: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0a0a0a;
  overflow: hidden;
  display: grid;
  place-items: center;
  cursor: grab;
  touch-action: none;
}

.shot-stage.dragging {
  cursor: grabbing;
}

.shot-modal-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.shot-modal-hint {
  margin: 0;
  text-align: center;
  color: var(--muted-2);
  font-size: 0.75rem;
}

@media (max-width: 900px) {
  .info-panels,
  .kv-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- stats (Vue d'ensemble style) ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.stat-card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #121212;
  padding: 14px 16px;
  min-height: 88px;
  display: grid;
  align-content: space-between;
  transition: border-color var(--fade), background var(--fade);
}

.stat-card:hover {
  border-color: #2e2e2e;
  background: #141414;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.84rem;
}

.stat-card strong {
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  font-weight: 650;
}

.stat-card em {
  font-style: normal;
  color: var(--muted-2);
  font-size: 0.75rem;
}

/* ---------- detail mini map ---------- */
.detail-map-card {
  padding: 0;
  overflow: hidden;
}

.detail-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.detail-map-head h3 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: #ddd;
}

.detail-map-meta {
  font-size: 0.75rem;
  color: var(--muted-2);
}

.detail-map-canvas {
  height: 220px;
  width: 100%;
  background: #111;
}

.detail-map-empty {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-2);
  font-size: 0.85rem;
}

/* ---------- map ---------- */
.map-card {
  padding: 0;
  overflow: visible;
  min-height: 62vh;
  width: 100%;
}

.map-head {
  position: relative;
  z-index: 999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.map-head h2 {
  color: #ddd;
  font-size: 0.92rem;
  font-weight: 600;
}

.map-head-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.map-style-wrap {
  position: relative;
  z-index: 999;
}

.map-style-menu button.is-active {
  background: #1d1d1d;
  color: #fff;
}

.map-canvas {
  height: 62vh;
  min-height: 420px;
  width: 100%;
  background: #111;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.hit-marker {
  background: transparent !important;
  border: 0 !important;
}

.hit-pin {
  position: relative;
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

.hit-pin.cluster {
  width: 44px;
  height: 44px;
}

.hit-pin img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
}

.hit-pin-count {
  position: absolute;
  right: -4px;
  top: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #111;
  border: 1px solid #3a3a3a;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}

.leaflet-container {
  background: #d4dde5;
  font-family: var(--font);
}

.leaflet-bar {
  border: 1px solid #2a2a2a !important;
  box-shadow: none !important;
}

.leaflet-bar a {
  background: #151515 !important;
  color: #ddd !important;
  border-bottom-color: #2a2a2a !important;
  width: 28px !important;
  height: 28px !important;
  line-height: 28px !important;
  transition: background var(--fade), opacity var(--fade);
}

.leaflet-bar a:hover {
  background: #1c1c1c !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #151515;
  color: #eee;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.map-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  color: var(--muted);
  background: #111;
  z-index: 500;
  font-size: 0.9rem;
}

/* ---------- Devices ---------- */
.device-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: visible;
  isolation: isolate;
}

.device-row {
  position: relative;
  display: grid;
  grid-template-columns: 14px 1.2fr 1fr 1.2fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #141414;
  overflow: visible;
  z-index: 1;
}

.device-row.is-new {
  opacity: 0;
  animation: fadeIn 220ms linear forwards;
}

.device-row.is-menu-open {
  z-index: 60;
}

.device-status {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #3dd68c;
  box-shadow: 0 0 0 3px rgba(61, 214, 140, 0.18);
}

.device-seen {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.device-online-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(61, 214, 140, 0.28);
  background: rgba(61, 214, 140, 0.08);
  color: #7dffb2;
  font-size: 0.78rem;
  font-weight: 600;
}

.hero-right-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.device-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.device-options {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.device-options-btn {
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.device-options-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  top: auto;
  z-index: 70;
  min-width: 230px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #151515;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.device-options-menu.is-portal {
  position: fixed;
  right: auto;
  bottom: auto;
  left: 0;
  top: 0;
  z-index: 200;
  width: 230px;
  min-width: 230px;
  max-width: 260px;
  box-sizing: border-box;
}

.device-option-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #ddd;
  font: inherit;
  font-size: 0.86rem;
  text-align: left;
  cursor: pointer;
}

.device-option-item:hover {
  background: #1c1c1c;
  color: #fff;
}

.watch-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: stretch;
  padding: 10px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
}

.watch-modal.open {
  display: grid;
}

.watch-panel {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0d0d0d;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.watch-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.watch-head h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #f0f0f0;
}

.watch-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.watch-toolbar .loot-dl-btn {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.watch-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #050505;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.watch-stage.is-panning {
  cursor: grabbing;
}

.watch-viewport {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.watch-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
  opacity: 0;
  pointer-events: none;
  image-rendering: auto;
}

.watch-img.is-front {
  opacity: 1;
}

.watch-hint {
  margin: 0;
  flex-shrink: 0;
  font-size: 0.78rem;
}

.notify-modal {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.notify-modal.open {
  display: grid;
}

.notify-panel {
  width: min(420px, 100%);
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #101010;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.notify-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notify-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}

.notify-field input,
.notify-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #121212;
  color: #ececec;
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
}

.notify-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---------- Floating blob windows ---------- */
#backupytor-blob-host {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 120;
}

.blob-win {
  position: absolute;
  pointer-events: auto;
  width: min(420px, calc(100vw - 24px));
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #101010;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 180px;
  resize: both;
}

.blob-win.is-screen {
  width: min(960px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 48px));
  min-width: 520px;
  min-height: 360px;
}

.blob-webcam-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.blob-webcam-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.blob-webcam-toolbar .blob-field {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.blob-webcam-toolbar select {
  width: 100%;
  margin-top: 4px;
  border: 1px solid #2a2a2a;
  background: #151515;
  color: #ddd;
  border-radius: 8px;
  padding: 7px 10px;
  font: inherit;
  font-size: 0.8rem;
}

.blob-webcam-wrap .blob-screen-stage {
  flex: 1;
  min-height: 0;
}

.blob-win.is-audio {
  width: min(380px, calc(100vw - 24px));
  min-height: 220px;
  resize: none;
}

.blob-win.is-keys {
  width: min(420px, calc(100vw - 24px));
  min-height: 260px;
  height: 300px;
  resize: both;
}

.blob-win.is-files {
  width: min(520px, calc(100vw - 32px));
  height: min(480px, calc(100vh - 48px));
  min-width: 360px;
  min-height: 280px;
}

.blob-files-body {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 220px;
}

.blob-files-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.blob-files-path {
  flex: 1;
  min-width: 0;
  border: 1px solid #2a2a2a;
  background: #151515;
  color: #ddd;
  border-radius: 8px;
  padding: 7px 10px;
  font: inherit;
  font-size: 0.78rem;
}

.blob-files-list {
  flex: 1;
  overflow: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.blob-files-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  color: #ddd;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
}

.blob-files-row:hover {
  background: #1a1a1a;
}

.blob-files-ico {
  font-size: 0.9rem;
  line-height: 1;
}

.blob-files-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blob-files-meta {
  color: var(--muted-2);
  font-size: 0.72rem;
  white-space: nowrap;
}

.blob-files-empty {
  color: var(--muted);
  font-size: 0.82rem;
  padding: 18px 12px;
  text-align: center;
}

.blob-keys-body {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 200px;
}

.blob-keys-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.blob-keys-log {
  flex: 1;
  overflow: auto;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  background: #0a0a0a;
}

.key-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #171717;
  color: #eee;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

.blob-win-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  cursor: grab;
  user-select: none;
  background: #141414;
}

.blob-win-head:active {
  cursor: grabbing;
}

.blob-win-title {
  font-size: 0.82rem;
  font-weight: 650;
  color: #eee;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blob-win-meta {
  color: var(--muted);
  font-size: 0.72rem;
}

.blob-win-actions {
  display: inline-flex;
  gap: 6px;
  flex-shrink: 0;
}

.blob-win-body {
  position: relative;
  flex: 1;
  min-height: 160px;
  background: #050505;
}

.blob-win.is-screen .blob-win-body {
  min-height: 300px;
  height: 100%;
}

.blob-screen-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.blob-screen-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  background: #000;
}

.blob-screen-stage img.is-front {
  opacity: 1;
}

.blob-audio-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.blob-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--muted);
}

.blob-field select {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #121212;
  color: #ececec;
  padding: 8px 10px;
  font: inherit;
}

.blob-audio-levels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.blob-level {
  height: 6px;
  border-radius: 999px;
  background: #1c1c1c;
  overflow: hidden;
}

.blob-level > span {
  display: block;
  height: 100%;
  width: 0%;
  background: #3dd68c;
}

/* ---------- PC rows ---------- */
#logs,
.pc-list {
  isolation: isolate;
  overflow: visible;
}

.pc-row {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.9fr 0.85fr 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #141414;
  color: inherit;
  cursor: pointer;
  transition: border-color var(--fade), background var(--fade), opacity var(--fade);
  overflow: visible;
  z-index: 1;
  opacity: 0;
  animation: fadeIn 220ms linear forwards;
}

.pc-row.is-menu-open {
  z-index: 60;
}

.pc-row:hover {
  border-color: #2e2e2e;
  background: #171717;
}

.pc-col {
  min-width: 0;
}

.pc-name {
  font-weight: 650;
  letter-spacing: -0.02em;
  font-size: 0.95rem;
}

.pc-host {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-ip {
  font-weight: 600;
  font-size: 0.9rem;
}

.pc-geo {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
}

.pc-geo > span {
  position: relative;
  top: 1px;
}

.flag-img {
  width: 18px;
  height: 18px;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  background: #1a1a1a;
}

.flag-img.flag-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.app-logo {
  width: 2.3vh;
  height: 2.3vh;
  margin-right: 0.4vh;
  object-fit: cover;
  display: inline-block;
}

.app-loot-btn {
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  line-height: 0;
}

.app-loot-btn:hover .app-logo {
  filter: brightness(1.15);
}

.loot-cat-icon {
  width: 16px;
  height: 16px;
  margin-right: 0;
}

.bh-card .bh-root-panel {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 0;
}

.bh-panel {
  overflow: hidden;
  height: 0;
  opacity: 0;
  transition: height 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
  will-change: height, opacity;
}

.bh-panel.is-open {
  opacity: 1;
}

.bh-panel-inner {
  padding-top: 8px;
}

.bh-root-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.bh-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #121212;
  overflow: hidden;
}

.bh-group-summary {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
  text-align: left;
  transition: background 0.18s ease;
}

.bh-group-summary:hover {
  background: rgba(255, 255, 255, 0.03);
}

.bh-ctx-menu {
  position: fixed;
  z-index: 9999;
  width: 180px;
  min-width: 180px;
  max-width: 220px;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
  background: #151515;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(4px) scale(0.98);
  transform-origin: top left;
  animation: bhCtxIn 160ms ease forwards;
}

.bh-ctx-menu.is-closing {
  animation: bhCtxOut 120ms ease forwards;
  pointer-events: none;
}

.bh-ctx-label {
  padding: 6px 10px 8px;
  font-size: 0.72rem;
  color: var(--muted-2, #888);
  border-bottom: 1px solid #2a2a2a;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bh-ctx-item {
  border: 0;
  background: transparent;
  color: #ddd;
  text-align: left;
  padding: 9px 10px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  transition: background var(--fade, 140ms ease);
  display: flex;
  align-items: center;
  gap: 8px;
}

.bh-ctx-item:hover {
  background: #1d1d1d;
}

@keyframes bhCtxIn {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes bhCtxOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(4px) scale(0.98);
  }
}

.bh-group-title {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: #eaeaea;
}

.bh-chevron {
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  color: #9a9a9a;
  flex-shrink: 0;
}

.bh-group-summary.is-open .bh-chevron,
.loot-dl-btn.is-open .bh-chevron {
  transform: rotate(180deg);
}

.bh-group-body {
  border-top: 1px solid transparent;
}

.bh-group-body.is-open {
  border-top-color: var(--line);
}

.bh-group-body .bh-panel-inner {
  max-height: 320px;
  overflow: auto;
  padding-top: 0;
}

.bh-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  animation: bh-row-in 0.28s ease both;
}

.bh-group-body.is-open .bh-row:nth-child(1) { animation-delay: 0.02s; }
.bh-group-body.is-open .bh-row:nth-child(2) { animation-delay: 0.04s; }
.bh-group-body.is-open .bh-row:nth-child(3) { animation-delay: 0.06s; }
.bh-group-body.is-open .bh-row:nth-child(4) { animation-delay: 0.08s; }
.bh-group-body.is-open .bh-row:nth-child(5) { animation-delay: 0.1s; }
.bh-group-body.is-open .bh-row:nth-child(n+6) { animation-delay: 0.12s; }

@keyframes bh-row-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bh-row:last-child {
  border-bottom: none;
}

.bh-row-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.bh-copy-mini {
  width: 30px;
  height: 30px;
  margin-top: 2px;
}

.bh-copy-mini svg {
  width: 14px;
  height: 14px;
}

.bh-url {
  font-size: 0.84rem;
  color: #e8e8e8;
  text-decoration: none;
  word-break: break-all;
}

a.bh-url:hover {
  color: #fff;
  text-decoration: underline;
}

.bh-meta {
  font-size: 0.72rem;
  color: var(--muted-2);
}

.agents-hero-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.agents-search {
  width: min(280px, 70vw);
  padding: 9px 12px 9px 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #151515 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%236e6e6e' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 12px center no-repeat;
  color: var(--text);
  font: inherit;
}

.dc-card {
  max-width: none;
}

.dc-search-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.dc-search {
  flex: 1;
  min-width: 0;
  padding: 11px 14px 11px 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #151515 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%236e6e6e' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 14px center no-repeat;
  color: var(--text);
  font: inherit;
}

.dc-search:focus {
  outline: none;
  border-color: #3a3a3a;
}

.dc-status {
  margin: 12px 0 0;
}

.dc-status.err {
  color: #ff6b6b;
}

.dc-profile {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.dc-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: #1a1a1a;
  flex-shrink: 0;
}

.dc-profile-main {
  min-width: 0;
}

.dc-name {
  font-size: 1.15rem;
  font-weight: 650;
}

.dc-username {
  margin-top: 2px;
  font-size: 0.9rem;
}

.dc-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.dc-meta {
  margin-top: 14px;
}

.dc-meta .value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.agents-search:focus {
  outline: none;
  border-color: #3a3a3a;
}

.agents-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.agent-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #121212;
  min-width: 0;
}

.eff-block {
  margin-top: 10px;
  width: 100%;
  max-width: none;
}

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

.eff-title {
  font-size: 0.78rem;
  color: #cfcfcf;
}

.eff-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid #2a2a2a;
  background: #151515;
  color: #9b9b9b;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.eff-badge.is-on {
  border-color: rgba(61, 214, 140, 0.35);
  background: rgba(61, 214, 140, 0.08);
  color: #3dd68c;
}

.eff-track {
  display: grid;
  grid-template-columns: repeat(30, minmax(0, 1fr));
  gap: 2px;
  width: 100%;
  height: 22px;
}

.eff-cell {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  background: #1b1b1b;
  min-width: 0;
}

.eff-cell.level-1 { background: #1f4d38; }
.eff-cell.level-2 { background: #247a4f; }
.eff-cell.level-3 { background: #2db56d; }
.eff-cell.level-4 { background: #3dd68c; }

.eff-foot {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.7rem;
  color: var(--muted-2);
}

.eff-foot span:last-child {
  text-align: right;
}

.action-danger-btn {
  color: #ff8e8e;
  border-color: #3a2222;
}

.action-danger-btn:hover {
  color: #ff5c5c;
  border-color: #5a2a2a;
  background: #1a1010;
}

/* ---------- docs ---------- */
.docs-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.docs-nav {
  position: sticky;
  top: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #101010;
  padding: 12px;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.docs-search {
  width: 100%;
  margin-bottom: 12px;
  padding: 9px 12px 9px 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #151515 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%236e6e6e' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 12px center no-repeat;
  color: var(--text);
}

.docs-nav-group {
  margin-bottom: 12px;
}

.docs-nav-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0 0 6px 4px;
}

.docs-nav button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #cfcfcf;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.84rem;
  margin-bottom: 2px;
}

.docs-nav button:hover {
  background: #171717;
  color: #fff;
}

.docs-nav button.is-active {
  background: #1c1c1c;
  color: #fff;
}

.docs-sheet {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #101010;
  padding: 22px 24px 28px;
  min-height: 60vh;
}

.docs-crumb {
  color: var(--muted-2);
  font-size: 0.78rem;
  margin: 0 0 14px;
}

.docs-sheet h1 {
  margin: 0 0 10px;
  font-size: 1.55rem;
}

.docs-hl {
  background: #ffe566;
  color: #111;
  padding: 0 2px;
  border-radius: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.docs-sheet h2 {
  margin: 22px 0 8px;
  font-size: 1.05rem;
}

.docs-sheet p,
.docs-sheet li {
  color: #c9c9c9;
  font-size: 0.92rem;
  line-height: 1.55;
}

.docs-sheet ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.docs-callout {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #2a2a2a;
  background: #141414;
  color: #d6d6d6;
  font-size: 0.88rem;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 0.88rem;
}

.docs-table th,
.docs-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid #1f1f1f;
}

.docs-table th {
  color: #9b9b9b;
  font-weight: 600;
}

.docs-pager {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.docs-pager button {
  border: 1px solid var(--line);
  background: #151515;
  color: #ddd;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 0.84rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(46%, 320px);
}

.docs-pager button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-pager button svg {
  flex-shrink: 0;
  opacity: 0.85;
}

.docs-pager button:hover {
  background: #1b1b1b;
}

.docs-pager button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .agents-hero {
    flex-direction: column;
    align-items: stretch;
  }
  .agents-hero-right {
    width: 100%;
  }
  .agents-search {
    flex: 1;
    width: auto;
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }
  .docs-nav {
    position: static;
    max-height: none;
  }
}

.agent-card-main {
  min-width: 0;
  flex: 1;
}

.agent-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.agent-card-title strong {
  font-size: 0.95rem;
}

.agent-card-meta {
  font-size: 0.78rem;
  margin-top: 2px;
  word-break: break-all;
}

.agent-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
  margin-top: auto;
}

.agent-card-actions .btn-primary,
.agent-card-actions .btn-ghost {
  padding: 7px 10px;
  font-size: 0.8rem;
}

.agent-edit-form {
  display: grid;
  gap: 12px;
}

.agent-edit-hint {
  margin: -4px 0 0;
  font-size: 0.78rem;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-actions-right {
  display: inline-flex;
  gap: 8px;
  margin-left: auto;
}

@media (max-width: 720px) {
  .agent-card {
    flex-direction: column;
    align-items: stretch;
  }
  .agent-card-actions {
    justify-content: flex-end;
  }
}

.contacts-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.contacts-card {
  min-width: 0;
  margin: 0;
}

.contact-title-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.contacts-list {
  max-height: 280px;
  overflow: auto;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}

.contact-row {
  padding-left: 2px;
  padding-right: 2px;
}

.contact-empty {
  padding: 14px 4px;
  font-size: 0.82rem;
  color: var(--muted-2);
}

@media (max-width: 820px) {
  .contacts-split {
    grid-template-columns: 1fr;
  }
}

.loot-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px 2px;
}

.loot-file-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.loot-file-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: #f2f2f2;
  word-break: break-all;
}

.loot-file-size {
  font-size: 0.75rem;
  color: var(--muted-2);
  font-weight: 500;
}

.loot-file-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.loot-dl-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #151515;
  color: #cfcfcf;
  display: grid;
  place-items: center;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--fade), border-color var(--fade), color var(--fade);
}

.loot-dl-btn:hover {
  background: #1a1a1a;
  border-color: #2e2e2e;
  color: #fff;
}

.loot-dl-btn.copied {
  color: var(--ok);
  border-color: rgba(61, 214, 140, 0.35);
}

.roblox-profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.roblox-headshot {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0e0e0e;
  object-fit: cover;
  flex-shrink: 0;
}


.roblox-profile-row .loot-file-meta {
  flex: 1;
  min-width: 0;
}

.discord-accounts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.discord-account + .discord-account {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.discord-profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.discord-profile-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.discord-token-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.discord-token-text {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.3;
  word-break: break-all;
}

.discord-token-row .loot-dl-btn {
  flex-shrink: 0;
}

.discord-profile-row .loot-file-actions {
  align-self: center;
}

.discord-name-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.discord-name-row .loot-file-name {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-badges {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  flex: 0 0 auto;
}

.discord-badge {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.loot-view-panel {
  width: min(720px, 100%);
}

.loot-view-content {
  margin: 0 0 14px;
  max-height: min(58vh, 520px);
  overflow: auto;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0e0e0e;
  color: #d8d8d8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.app-logo.missing {
  opacity: 0.7;
}

.pc-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.tag-blue {
  background: rgba(88, 101, 242, 0.15);
  color: #9aa4ff;
  border: 1px solid rgba(88, 101, 242, 0.25);
}

.tag-mute {
  color: var(--muted-2);
  font-size: 0.78rem;
  font-weight: 600;
}

.icon-cluster {
  display: flex;
  align-items: center;
  gap: 3px;
}

.app-ico {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #1a1a1a;
  font-size: 0.68rem;
  font-weight: 800;
  color: #cfcfcf;
  transition: opacity var(--fade);
}

.app-ico.chrome { background: #1b2430; color: #8ab4f8; }
.app-ico.firefox { background: #2a1d18; color: #ff7139; }
.app-ico.opera { background: #2a171b; color: #ff1b2d; }
.app-ico.edge { background: #17222e; color: #33c1ff; }
.app-ico.brave { background: #2a1a14; color: #fb542b; }
.app-ico.vivaldi { background: #2a1518; color: #ef3939; }
.app-ico.discord { background: #1b1f3a; color: #7289da; }
.app-ico.steam { background: #172028; color: #66c0f4; }
.app-ico.spotify { background: #14241c; color: #1db954; }
.app-ico.telegram { background: #142430; color: #2aabee; }
.app-ico.roblox { background: #1d1d24; color: #e8e8e8; }
.app-ico.vscode { background: #142230; color: #31a8ff; }
.app-ico.more { background: #1a1a1a; color: #aaa; font-size: 0.65rem; }

.pc-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.star-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #6d6d6d;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color var(--fade), background var(--fade);
}

.star-btn:hover {
  color: #ffd166;
  background: rgba(255, 209, 102, 0.08);
}

.star-btn.active {
  color: #ffd166;
}

.star-btn svg {
  width: 15px;
  height: 15px;
}

.ago {
  color: var(--muted-2);
  font-size: 0.8rem;
  min-width: 48px;
  text-align: right;
}

.actions-wrap {
  position: relative;
  z-index: 2;
}

.actions-btn {
  background: #171717;
  color: #ddd;
  border: 1px solid #2a2a2a;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  font-size: 0.82rem;
}

.actions-btn:hover {
  background: #1c1c1c;
}

.actions-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  top: auto;
  width: 180px;
  min-width: 180px;
  max-width: 220px;
  background: #151515;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  display: none;
  z-index: 70;
  opacity: 0;
  box-sizing: border-box;
}

.actions-menu.is-portal {
  position: fixed;
  right: auto;
  bottom: auto;
  left: 0;
  top: 0;
  z-index: 200;
  width: 180px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.actions-menu.is-portal::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.actions-menu.map-style-menu {
  right: 0;
  left: auto;
  top: calc(100% + 6px);
  bottom: auto;
  width: 180px;
  z-index: 999;
}

.actions-menu.open {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  animation: fadeIn 160ms linear forwards;
}

.actions-menu button,
.actions-menu a {
  border: 0;
  background: transparent;
  color: #ddd;
  text-align: left;
  padding: 9px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.86rem;
  transition: background var(--fade);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.actions-menu button.action-toggle {
  width: 100%;
}

.actions-menu button.action-toggle > span:not(.toggle-switch) {
  flex: 1;
  min-width: 0;
}

.toggle-switch {
  position: relative;
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  flex-shrink: 0;
  margin-left: auto;
  transition: background 140ms ease, border-color 140ms ease;
}

.toggle-switch i {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #bbb;
  transition: transform 140ms ease, background 140ms ease;
}

.toggle-switch.is-on {
  background: #2f6fed;
  border-color: #4a82f0;
}

.toggle-switch.is-on i {
  transform: translateX(16px);
  background: #fff;
}

.actions-menu button:hover,
.actions-menu a:hover {
  background: #1d1d1d;
}

.actions-menu .action-danger {
  color: #ff6b6b;
}

.actions-menu .action-danger:hover {
  background: rgba(255, 80, 80, 0.12);
}

.actions-menu .action-danger svg {
  flex-shrink: 0;
}

.actions-submenu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.actions-submenu-toggle {
  width: 100%;
  justify-content: flex-start;
}

.actions-submenu-toggle .actions-submenu-chevron {
  margin-left: auto;
  opacity: 0.7;
  transition: transform 140ms ease;
}

.actions-submenu.is-open .actions-submenu-chevron {
  transform: rotate(180deg);
}

.actions-submenu-panel {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0 2px 10px;
  margin: 0 0 2px 8px;
  border-left: 1px solid #2a2a2a;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.actions-submenu-panel::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.actions-submenu-label {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #777;
  padding: 6px 10px 2px;
}

.actions-submenu-panel[hidden] {
  display: none !important;
}

.actions-submenu-panel button {
  width: 100%;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes skeletonShine {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.sk {
  display: block;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    #1a1a1a 0%,
    #242424 40%,
    #1a1a1a 80%
  );
  background-size: 200% 100%;
  animation: skeletonShine 1.15s linear infinite;
}

.sk-line {
  height: 12px;
  width: 100%;
}

.sk-line.sm {
  height: 10px;
  width: 55%;
}

.sk-line.md {
  width: 72%;
}

.sk-line.lg {
  height: 22px;
  width: 42%;
}

.sk-circle {
  width: 18px;
  height: 18px;
  border-radius: 999px;
}

.sk-chip {
  width: 24px;
  height: 24px;
  border-radius: 7px;
}

.sk-stat {
  min-height: 88px;
  padding: 14px 16px;
  display: grid;
  gap: 12px;
  align-content: space-between;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #121212;
}

.sk-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.9fr 0.85fr 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #141414;
}

.sk-row-block {
  display: grid;
  gap: 8px;
}

.sk-icons {
  display: flex;
  gap: 4px;
}

.sk-map {
  position: absolute;
  inset: 0;
  z-index: 500;
  background: #111;
  display: grid;
  place-items: center;
  transition: opacity 200ms linear;
}

.sk-map.hide {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.sk-map-inner {
  width: min(280px, 70%);
  display: grid;
  gap: 10px;
}

.sk-detail-card {
  display: grid;
  gap: 14px;
}

.sk-detail-hero {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sk-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

@media (max-width: 1100px) {
  .sk-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .sk-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- create agent modal ---------- */
.modal-root {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  visibility: hidden;
  pointer-events: none;
}

.modal-root.open {
  visibility: visible;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  opacity: 0;
  transition: opacity 200ms linear;
}

.modal-root.open .modal-backdrop {
  opacity: 1;
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 16px 16px 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: scale(0.88);
  transform-origin: center center;
  transition: opacity 200ms linear, transform 200ms linear;
}

.modal-root.open .modal-panel {
  opacity: 1;
  transform: scale(1);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.modal-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.modal-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #aaa;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background var(--fade), color var(--fade), border-color var(--fade);
}

.modal-close:hover {
  background: #1c1c1c;
  border-color: #2a2a2a;
  color: #fff;
}

.modal-field {
  display: grid;
  gap: 6px;
  margin-bottom: 11px;
}

.modal-field label {
  font-size: 0.84rem;
  color: #eee;
  font-weight: 500;
}

.modal-field input {
  width: 100%;
  border: 1px solid #2a2a2a;
  background: #101010;
  color: #fff;
  border-radius: 9px;
  padding: 9px 11px;
  outline: none;
  transition: border-color var(--fade);
}

.modal-field input:focus {
  border-color: #3a3a3a;
}

.modal-field .hint {
  margin: 0;
  color: var(--muted-2);
  font-size: 0.78rem;
}

.icon-drop {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  min-height: 112px;
  padding: 16px;
  border: 1px dashed #333;
  border-radius: 12px;
  background: #101010;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
  overflow: hidden;
}

.icon-drop:hover,
.icon-drop.is-drag {
  border-color: #666;
  background: #141414;
}

.icon-drop.has-icon {
  border-style: solid;
  border-color: #2a2a2a;
}

.icon-drop-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.icon-drop.has-icon .icon-drop-img {
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #2a2a2a;
  background: #0a0a0a;
}

.icon-drop-text {
  display: grid;
  gap: 4px;
  text-align: center;
}

.icon-drop-title {
  color: #ddd;
  font-size: 0.88rem;
  font-weight: 600;
}

.icon-drop-sub {
  color: var(--muted-2);
  font-size: 0.75rem;
}

.size-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.size-slider {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 36px;
  display: flex;
  align-items: center;
  touch-action: none;
  cursor: pointer;
  user-select: none;
}

.size-slider-track {
  position: relative;
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: #2a2a2a;
  overflow: hidden;
}

.size-slider-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: #fff;
  will-change: width;
}

.size-slider-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 10px;
  height: 26px;
  margin-left: -5px;
  margin-top: -13px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  will-change: left;
  pointer-events: none;
  z-index: 2;
}

.size-slider.is-dragging .size-slider-thumb {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.size-slider-value {
  min-width: 64px;
  text-align: right;
  font-size: 0.86rem;
  font-weight: 650;
  color: #ddd;
  font-variant-numeric: tabular-nums;
}

.size-random-btn {
  height: 34px;
  padding: 0 10px;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.modal-preview {
  border: 1px solid #2a2a2a;
  background: #101010;
  border-radius: 9px;
  padding: 9px 11px;
  color: #9a9a9a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  margin-bottom: 12px;
  word-break: break-all;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.modal-actions .btn-primary,
.modal-actions .btn-ghost {
  padding: 8px 12px;
  font-size: 0.88rem;
}

.modal-status {
  min-height: 1.2em;
  margin: 0 0 10px;
  font-size: 0.86rem;
  color: var(--muted);
}

.modal-status.ok {
  color: var(--ok);
}

.modal-status.err {
  color: var(--danger);
}

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

.btn-check svg {
  width: 16px;
  height: 16px;
}

.hidden {
  display: none !important;
}

.modal-success {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 12px 10px;
  min-height: 260px;
  gap: 10px;
  animation: fadeIn 200ms linear;
}

.modal-success-close {
  position: absolute;
  top: 0;
  right: 0;
}

.modal-success-emoji {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 6px 0 4px;
}

.modal-success h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.modal-success-text {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  max-width: 300px;
}

.modal-success-text a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.modal-success .btn-primary {
  margin-top: 4px;
  min-width: 120px;
}

@media (max-width: 1100px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pc-row {
    grid-template-columns: 1fr 1fr;
  }
  .pc-end {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 16px;
  }
  .hero-card {
    flex-direction: column;
    align-items: stretch;
  }
  .info-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .stat-grid,
  .pc-row {
    grid-template-columns: 1fr;
  }
  .map-canvas,
  .map-card {
    min-height: 320px;
  }
  .map-canvas {
    height: 320px;
  }
}

/* ---------- login ---------- */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background:
    radial-gradient(900px 480px at 12% -10%, rgba(255, 79, 216, 0.12), transparent 55%),
    radial-gradient(700px 420px at 90% 110%, rgba(61, 214, 140, 0.08), transparent 50%),
    var(--bg);
}

.login-shell {
  width: min(420px, calc(100% - 32px));
  padding: 24px 0;
}

.login-panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #141414 0%, #101010 100%);
  border-radius: 14px;
  padding: 28px 24px 24px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.login-brand {
  margin: 0 0 18px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}

.login-title {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.login-sub {
  margin: 8px 0 22px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-label {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.login-input {
  width: 100%;
  border: 1px solid var(--line);
  background: #0b0b0b;
  color: var(--text);
  border-radius: 10px;
  padding: 12px 12px;
  outline: none;
}

.login-input:focus {
  border-color: #3a3a3a;
}

.login-error {
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 0.86rem;
  min-height: 1.2em;
}

.login-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.login-btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 14px;
  background: #f2f2f2;
  color: #0a0a0a;
  font-weight: 650;
  cursor: pointer;
}

.login-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.login-btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.account-pill .account-logout {
  margin-left: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.72rem;
  cursor: pointer;
}

.account-pill .account-logout:hover {
  color: var(--text);
  border-color: #333;
}
