/* Additions for the live app (sign-in screen, dev banner). Uses the mockup's tokens. */
[hidden] { display: none !important; }
body { margin: 0; }
.signin { max-width: 440px; margin: 8vh auto 0; display: grid; gap: 16px; }
.signin h1 { font-size: 26px; }
.signin .users { display: grid; gap: 6px; }
.signin .users button { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; text-align: left;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--fg); font: inherit; cursor: pointer; }
.signin .users button:hover { border-color: var(--accent); }
.devbanner { font: 500 11px var(--mono); color: var(--warn); background: var(--warn-soft); border-radius: 4px; padding: 1px 6px; }
textarea.code, #edit-text { font: 12px/1.55 var(--mono); padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sunk); color: var(--fg); }
.prose table { border-collapse: collapse; margin: 0 0 12px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 4px 8px; text-align: left; vertical-align: top; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.doclink { text-decoration: underline dotted; }
.fileline .fname { overflow-wrap: anywhere; }

/* ---------- Topology (layout B: nested boxes) ---------- */
.topo-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.topo-wrap.with-panel { grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); }
.topo-map { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.topo-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; min-width: 0;
  transition: opacity .15s, box-shadow .15s, border-color .15s; }
.topo-box:hover, .topo-box:focus-visible { border-color: var(--accent); outline: none; }
.topo-box.selected { box-shadow: 0 0 0 2px var(--accent); }
.topo-box.hit { box-shadow: 0 0 0 2px var(--warn); }
.topo-box.dim { opacity: .28; }
.topo-box.t-proxmox, .topo-box.t-outside, .topo-box.t-pve-node { background: transparent; border-style: dashed; }
.topo-box.t-vm { background: var(--sunk); }
.topo-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.topo-sum { color: var(--muted); font-size: 12px; margin-top: 2px; overflow-wrap: anywhere; }
.topo-nodes, .topo-stacks { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.topo-vms { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; margin-top: 8px; }
.topo-chips, .topo-eps { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.topo-eps { border-top: 1px dashed var(--line); padding-top: 6px; }
.topo-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 12px; background: var(--sunk);
  border: 1px solid var(--line); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topo-wayin { display: flex; align-items: stretch; gap: 6px; flex-wrap: wrap; }
.topo-wayin > .topo-box { flex: 1 1 220px; }
.topo-arrow { align-self: center; color: var(--accent); font-size: 18px; }
.topo-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; border: 2px solid transparent; }
.topo-dot.st-ok { background: var(--ok); } .topo-dot.st-warn { background: var(--warn); } .topo-dot.st-bad { background: var(--bad); }
.topo-dot.st-unknown { background: var(--muted); opacity: .6; } .topo-dot.st-none { background: transparent; border-color: var(--muted); }
.topo-product { font-size: 10.5px; padding: 1px 7px; border-radius: 99px; font-weight: 600; letter-spacing: .02em; }
.topo-product.unconfirmed { border: 1px dashed currentColor; }
.p-tech { background: #10b98121; color: var(--ok); } .p-cx { background: #8b5cf62e; color: var(--violet, #7c3aed); }
.p-venues { background: #3b82f61f; color: var(--blue, #1d4ed8); } .p-graphics { background: #f59e0b24; color: var(--warn); }
.p-platform { background: var(--sunk); color: var(--muted); }
.topo-warn { background: var(--warn); color: #000; border-radius: 99px; width: 16px; height: 16px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; }
.topo-empty { color: var(--muted); font-size: 12px; padding: 8px; }
.topo-legend { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.topo-legend .topo-dot { margin-left: 6px; }
.topo-tip { position: fixed; z-index: 50; max-width: 280px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
  box-shadow: var(--shadow); font-size: 12px; pointer-events: none; }
.topo-panel { position: sticky; top: 72px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; max-height: calc(100vh - 96px);
  overflow: auto; box-shadow: var(--shadow); }
.topo-panel h4 { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.topo-facts { width: 100%; font-size: 12.5px; border-collapse: collapse; }
.topo-facts td { padding: 3px 6px 3px 0; vertical-align: top; overflow-wrap: anywhere; }
.topo-facts td:first-child { color: var(--muted); white-space: nowrap; width: 1%; }
.topo-activity { margin: 0; padding-left: 16px; font-size: 12.5px; }
.topo-admin { margin-bottom: 12px; } .topo-admin summary { cursor: pointer; font-weight: 600; }
@media (max-width: 860px) {
  .topo-wrap.with-panel { grid-template-columns: minmax(0, 1fr); }
  .topo-panel { position: fixed; inset: 0; z-index: 60; border-radius: 0; max-height: none; }
  .topo-arrow { display: none; }
}
