:root {
  color-scheme: dark;
  --bg: #121218;
  --surface: rgba(29, 29, 38, 0.94);
  --surface-raised: #252530;
  --line: rgba(228, 224, 239, 0.12);
  --text: #f4f0f7;
  --muted: #aaa5b2;
  --accent: #e48f88;
  --accent-strong: #efa69d;
  --success: #94d5b4;
  --danger: #ef9d9d;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(ellipse at 70% -10%, rgba(111, 81, 118, 0.2), transparent 44%),
    radial-gradient(ellipse at 0% 80%, rgba(172, 106, 101, 0.08), transparent 40%),
    var(--bg);
}

a { color: var(--accent-strong); text-underline-offset: 3px; }
button, input { font: inherit; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.12;
  pointer-events: none;
}
.ambient-one { top: 16%; left: 72%; background: #8a668f; }
.ambient-two { bottom: -12rem; left: -8rem; background: #c77c76; }

.topbar {
  width: min(1160px, calc(100% - 48px));
  height: 82px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
  font-size: 18px;
  font-weight: 720;
  letter-spacing: -0.045em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #17151b;
  background: var(--accent);
  border-radius: 10px;
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 800;
}
.brand-dot { color: var(--accent); }
.topbar-label, .eyebrow {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.16em;
}

.shell {
  width: min(1160px, calc(100% - 48px));
  min-height: calc(100vh - 144px);
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 56px 0 72px;
}
.card {
  width: min(100%, 468px);
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.card.wide { width: min(100%, 880px); }
.eyebrow { margin: 0 0 15px; }
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 12px;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.055em;
}
h2 { font-size: 20px; letter-spacing: -0.035em; }
h3 { margin: 0 0 8px; font-size: 15px; }
.lead { margin-bottom: 26px; color: var(--muted); line-height: 1.6; font-size: 14px; }
.brand-large { margin-bottom: 28px; }

.form-stack { display: grid; gap: 15px; }
.field { display: grid; gap: 7px; }
.field label { color: #ded9e5; font-size: 12px; font-weight: 650; }
.field input {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  color: var(--text);
  background: #17171e;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(228, 143, 136, 0.13); }
input::placeholder { color: #77727e; }

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #1a171d;
  background: var(--accent);
  cursor: pointer;
  text-decoration: none;
  font-weight: 750;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}
.button:hover { transform: translateY(-1px); background: var(--accent-strong); }
.button:disabled { opacity: 0.6; cursor: wait; transform: none; }
.button.secondary {
  color: var(--text);
  border-color: var(--line);
  background: transparent;
}
.button.secondary:hover { background: var(--surface-raised); }
.button.danger { color: var(--danger); border-color: rgba(239,157,157,0.24); background: transparent; }
.button.small { min-height: 34px; padding: 0 11px; font-size: 12px; }
.text-link { display: inline-block; margin-top: 20px; font-size: 13px; }
.form-actions { margin-top: 6px; }
.message {
  min-height: 20px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.message.error { color: var(--danger); }
.message.success { color: var(--success); }
.notice {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255,255,255,0.025);
  font-size: 12px;
  line-height: 1.5;
}
.token-box { display: flex; gap: 8px; margin-top: 12px; }
.token-box input { min-width: 0; flex: 1; font-size: 12px; }

.dashboard { width: 100%; align-self: start; }
.dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 26px;
}
.dashboard-head .lead { margin-bottom: 0; }
.dashboard-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}
.panel.full { grid-column: 1 / -1; }
.panel p { margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 16px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.tool-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--text);
  background: rgba(255,255,255,0.02);
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}
.tool-card:hover { transform: translateY(-2px); border-color: rgba(228,143,136,0.42); background: var(--surface-raised); }
.tool-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tool-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tool-card-heading h3 { margin: 0; }
.tool-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.tool-status { flex: 0 0 auto; padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 10px; }
.tool-placeholder { max-width: 720px; }
.invite-list { display: grid; gap: 9px; margin-top: 18px; }
.invite-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.invite-email { overflow-wrap: anywhere; font-size: 13px; font-weight: 650; }
.invite-status { color: var(--muted); font-size: 11px; white-space: nowrap; }
.toolbar { display: flex; align-items: center; gap: 10px; }
.loading { display: flex; align-items: center; gap: 11px; color: var(--muted); font-size: 13px; }
.loading-screen { width: 100%; min-height: 100svh; justify-content: center; background: #fff; }
.loading-screen img { display: block; width: 64px; height: 64px; }
.loading-variant-dark { display: none !important; }
html[data-loader-theme="dark"] .loading-screen { background: #17161a; }
html[data-loader-theme="dark"] .loading-variant-light { display: none !important; }
html[data-loader-theme="dark"] .loading-variant-dark { display: block !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
body.app-starting { min-height: 100svh; background: #fff; }
body.app-starting .ambient,
body.app-starting > .topbar,
body.app-starting > .site-footer { display: none; }
body.app-starting .shell { width: 100%; max-width: none; min-height: 100svh; margin: 0; padding: 0; }
html[data-loader-theme="dark"] body.app-starting { color-scheme: dark; background: #17161a; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.site-footer {
  width: min(1160px, calc(100% - 48px));
  min-height: 62px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border-top: 1px solid var(--line);
  color: #77727e;
  font-size: 11px;
}

@media (max-width: 680px) {
  .topbar, .shell, .site-footer { width: min(100% - 32px, 1160px); }
  .topbar { height: 70px; }
  .topbar-label { max-width: 130px; text-align: right; line-height: 1.5; }
  .shell { min-height: calc(100vh - 132px); padding: 34px 0 44px; }
  .card { padding: 25px 21px; border-radius: 17px; }
  .dashboard-head { flex-direction: column; }
  .dashboard-actions { justify-content: flex-start; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: 1fr; }
  .panel.full { grid-column: auto; }
  .invite-row { grid-template-columns: 1fr auto; }
  .invite-status { grid-column: 1; grid-row: 2; }
  .invite-row .button { grid-column: 2; grid-row: 1 / span 2; }
  .site-footer { align-items: flex-start; justify-content: center; flex-direction: column; padding: 14px 0; gap: 5px; }
}

 
/* Minimal NoxsLabs Platform sign-in */
@font-face {
  font-family: "Orbitron";
  src: url("/fonts/orbitron-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}
body.login-page {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-raised: #f7f6f4;
  --line: #dce2ea;
  --text: #242328;
  --muted: #716c74;
  --accent: #d50000;
  --accent-strong: #d50000;
  --success: #216b47;
  --danger: #a61b1b;
  --shadow: none;
  isolation: isolate;
  color-scheme: light;
  color: var(--text);
  background: #ffffff;
  font-family: Arial, "Liberation Sans", sans-serif;
}
.login-page::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url("/noxslabs-logo.png");
  background-position: center 47%;
  background-repeat: no-repeat;
  background-size: min(108vw, 108vh);
  content: "";
  opacity: .13;
  pointer-events: none;
}
.login-page .ambient, .login-page .topbar, .login-page .site-footer { display: none; }
.login-page .shell {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  min-height: 100svh;
  max-width: none;
  align-items: flex-start;
  justify-content: center;
  margin: 0;
  padding: clamp(66px, 11vh, 112px) 24px 40px;
}
.login-card {
  display: block;
  width: min(100%, 500px);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--text);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.platform-heading {
  display: grid;
  justify-items: center;
  gap: 0;
  margin: 0 0 40px;
  text-align: center;
}
.platform-heading h1 {
  margin: 0;
  color: #171719;
  font-family: "Orbitron", "Arial Black", Arial, sans-serif;
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.12;
  text-wrap: balance;
}
.login-card .form-stack { display: grid; gap: 18px; }
.login-page .field { display: grid; gap: 8px; }
.login-page .field label {
  color: var(--text);
  font-family: Arial, "Liberation Sans", sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.login-page .field input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid #cfd4da;
  border-radius: 2px;
  outline: none;
  color: var(--text);
  background: #ffffff;
  font-size: 15px;
}
.login-page .field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgb(138 3 3 / 12%);
}
.login-page .field input::placeholder { color: #8b858c; }
.forgot-link {
  justify-self: end;
  margin-top: -4px;
  color: var(--accent);
  font-size: 13px;
  text-decoration: none;
}
.forgot-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.login-submit {
  display: flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 2px;
  border: 1px solid var(--accent);
  border-radius: 2px;
  color: #ffffff;
  background: var(--accent);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}
.login-page .login-submit:hover {
  transform: none;
  background: #6e0202;
}
.login-submit svg { width: 18px; height: 18px; }
.login-card .message {
  min-height: 20px;
  margin: -7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}
.login-card .message.error { color: var(--danger); }
@media (max-width: 480px) {
  .login-page .shell { padding: 64px 24px 32px; }
  .platform-heading { margin-bottom: 34px; }
  .platform-heading h1 { font-size: clamp(28px, 7.5vw, 36px); }
}
body.workspace-page {
  color-scheme: light;
  --workspace-bg: #f8f8f9;
  --workspace-surface: #ffffff;
  --workspace-line: #e7e7e9;
  --workspace-text: #242328;
  --workspace-muted: #77727e;
  --accent: #d50000;
  min-height: 100vh;
  color: var(--workspace-text);
  background: var(--workspace-bg);
  font-family: Arial, "Liberation Sans", sans-serif;
}

.workspace-page .ambient,
.workspace-page > .topbar,
.workspace-page > .site-footer { display: none; }

.workspace-page .shell {
  display: block;
  width: 100%;
  max-width: none;
  min-height: 100svh;
  margin: 0;
  padding: 0;
}

.workspace-layout { min-height: 100svh; background: var(--workspace-bg); }

.workspace-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(20px, 5vw, 64px);
  border-bottom: 1px solid var(--workspace-line);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
}

.workspace-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--workspace-text);
  text-decoration: none;
}

.workspace-logo { display: grid; width: 27px; height: 27px; place-items: center; }
.workspace-logo svg { width: 100%; height: 100%; fill: var(--accent); }
.workspace-wordmark { display: inline-flex; align-items: baseline; gap: 7px; }

.workspace-wordmark strong {
  font-family: "Orbitron", "Arial Black", Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.055em;
}

.workspace-wordmark span { color: var(--workspace-muted); font-size: 14px; }
.workspace-actions { display: flex; align-items: center; gap: 10px; }
.workspace-action { position: relative; }

.workspace-icon-button,
.workspace-profile-button {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #45424a;
  background: transparent;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.workspace-icon-button:hover,
.workspace-profile-button:hover,
.workspace-icon-button[aria-expanded="true"],
.workspace-profile-button[aria-expanded="true"] {
  border-color: var(--workspace-line);
  background: #f8f8f9;
}

.workspace-icon-button:focus-visible,
.workspace-profile-button:focus-visible,
.workspace-menu-button:focus-visible,
.workspace-brand:focus-visible {
  outline: 2px solid #c50000;
  outline-offset: 3px;
}

.workspace-icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workspace-profile-button { justify-content: flex-start; gap: 9px; padding: 0 9px 0 4px; }

.workspace-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #f0caca;
  border-radius: 50%;
  color: #a60000;
  background: #fff4f3;
  font-size: 12px;
  font-weight: 700;
}

.workspace-profile-name {
  max-width: 190px;
  overflow: hidden;
  color: var(--workspace-text);
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-caret { display: grid; width: 16px; height: 16px; place-items: center; color: var(--workspace-muted); }
.workspace-caret svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.workspace-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: min(290px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid var(--workspace-line);
  border-radius: 12px;
  color: var(--workspace-text);
  background: var(--workspace-surface);
  box-shadow: 0 12px 38px rgba(23, 22, 25, .12);
}

.workspace-popover[hidden] { display: none; }
.workspace-popover-title { margin: 0 0 8px; font-size: 15px; font-weight: 700; letter-spacing: -.015em; }
.workspace-popover-note { margin: 0; color: var(--workspace-muted); font-size: 14px; line-height: 1.5; }
.workspace-profile-popover { width: min(300px, calc(100vw - 32px)); }

.workspace-role {
  display: inline-flex;
  margin-top: 8px;
  padding: 5px 8px;
  border: 1px solid #f0d1d1;
  border-radius: 999px;
  color: #8f1010;
  background: #fff8f7;
  font-size: 12px;
  font-weight: 700;
}

.workspace-divider { height: 1px; margin: 15px 0 10px; background: var(--workspace-line); }

.workspace-menu-button {
  width: 100%;
  min-height: 38px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  color: #514d55;
  background: transparent;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
}

.workspace-menu-button:hover { color: #8f1010; background: #fff5f4; }
.workspace-menu-button:disabled { opacity: .55; cursor: wait; }
.workspace-canvas {
  min-height: calc(100svh - 76px);
  padding: 30px clamp(20px, 4vw, 56px) 36px;
}

.graph-shell { width: min(1360px, 100%); margin: 0 auto; }

.graph-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 0 auto 14px;
}

.graph-control {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid #dedee2;
  border-radius: 50%;
  color: #242328;
  background: #fff;
  box-shadow: 0 4px 16px rgba(32, 30, 36, .06);
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.graph-control:hover {
  color: #b50000;
  border-color: #e7bcbc;
  background: #fffafa;
  transform: translateY(-1px);
}

.graph-control:focus-visible {
  outline: 2px solid #c50000;
  outline-offset: 3px;
}

.graph-zoom { font-size: 27px; font-weight: 400; line-height: 1; }
.graph-home { width: 56px; height: 56px; }
.graph-home svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }

.graph-stage {
  position: relative;
  height: min(76svh, 840px);
  min-height: 580px;
  overflow: hidden;
  border: 1px solid #2c2c32;
  border-radius: 20px;
  background:
    radial-gradient(ellipse at 50% 48%, rgba(129, 41, 47, .16), transparent 43%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    #141417;
  background-size: auto, 38px 38px, 38px 38px, auto;
  box-shadow: 0 22px 72px rgba(20, 18, 25, .12);
}

.collaboration-graph { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.collaboration-graph.is-dragging { cursor: grabbing; }

.graph-badge {
  position: absolute;
  top: 17px;
  right: 20px;
  color: rgba(235, 232, 238, .58);
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 11px;
  letter-spacing: .08em;
  pointer-events: none;
}

.graph-legend {
  position: absolute;
  right: 20px;
  bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
  color: rgba(235, 232, 238, .62);
  font-size: 12px;
  pointer-events: none;
}

.graph-legend-item { display: inline-flex; align-items: center; gap: 7px; }
.graph-legend-item::before { content: ""; width: 7px; height: 7px; display: inline-block; border-radius: 50%; }
.graph-legend-you::before { background: #ef303f; box-shadow: 0 0 10px rgba(239, 48, 63, .7); }
.graph-legend-members::before { background: #aaa9b2; }
.graph-legend-boundaries::before { width: 11px; height: 8px; border: 1px solid #777481; border-radius: 2px; }

.graph-containers { pointer-events: none; }
.platform-boundary { fill: rgba(255,255,255,.012); stroke: rgba(238,236,242,.30); stroke-width: 1.2; }
.platform-boundary-label { fill: rgba(244,241,248,.76); font-size: 14px; font-weight: 700; letter-spacing: .16em; }
.platform-boundary-mark { fill: #e22534; }
.graph-area-frame { stroke-width: 1.2; stroke-dasharray: 5 8; }
.area-agents { fill: rgba(115,95,155,.045); stroke: rgba(164,145,208,.48); }
.area-interfaces { fill: rgba(80,127,145,.045); stroke: rgba(125,177,193,.48); }
.area-science { fill: rgba(152,108,91,.045); stroke: rgba(193,145,124,.48); }
.graph-area-label { fill: rgba(231,226,238,.72); font-size: 13px; font-weight: 650; letter-spacing: .12em; }

.graph-edge-layer { pointer-events: none; }
.graph-link { fill: none; stroke-linecap: round; }
.graph-link-shared { stroke: rgba(210,208,218,.35); stroke-width: 1.35; stroke-dasharray: 4 6; }
.graph-link-current { stroke: rgba(231,45,58,.72); stroke-width: 1.8; }

.graph-project-card { fill: #202025; stroke: #55545d; stroke-width: 1.2; }
.graph-project:hover .graph-project-card { stroke: #aaa7b1; }
.graph-project-code { fill: #a7a4ae; font-family: "IBM Plex Mono", Consolas, monospace; font-size: 10px; letter-spacing: .11em; }
.graph-project-title { fill: #f6f3f7; font-size: 14px; font-weight: 650; }
.graph-project-rule { stroke: rgba(228,224,239,.12); stroke-width: 1; }
.graph-member-node { fill: #aaa9b2; stroke: #202025; stroke-width: 2; }
.graph-member-label { fill: #c0bdc6; font-size: 11px; }

.graph-focus-glow { fill: rgba(236,35,51,.12); }
.graph-focus-ring { fill: none; stroke: rgba(245,74,85,.82); stroke-width: 1.2; }
.graph-focus-node { fill: #e32939; stroke: #ffabb2; stroke-width: 1.5; }
.graph-focus-initial { fill: #fff; font-size: 17px; font-weight: 750; }
.graph-focus-name { fill: #fff; font-size: 15px; font-weight: 700; }
.graph-focus-caption { fill: rgba(244,241,248,.60); font-family: "IBM Plex Mono", Consolas, monospace; font-size: 10px; letter-spacing: .14em; }

@media (max-width: 560px) {
  .workspace-topbar { min-height: 68px; padding: 0 16px; gap: 12px; }
  .workspace-wordmark strong { font-size: 14px; }
  .workspace-wordmark span { font-size: 14px; }
  .workspace-logo { width: 23px; height: 23px; }
  .workspace-actions { gap: 2px; }
  .workspace-profile-button { padding-right: 5px; }
  .workspace-profile-name,
  .workspace-caret { display: none; }
  .workspace-icon-button { min-width: 36px; height: 36px; }
  .workspace-canvas { min-height: calc(100svh - 68px); padding: 20px 12px 26px; }
  .graph-shell { width: 100%; }
  .graph-controls { margin-bottom: 10px; gap: 9px; }
  .graph-control { width: 42px; height: 42px; }
  .graph-home { width: 48px; height: 48px; }
  .graph-stage { height: 68svh; min-height: 520px; overflow-x: auto; }
  .collaboration-graph { width: 920px; max-width: none; }
  .graph-badge { top: 12px; right: 12px; font-size: 10px; }
  .graph-legend { right: 12px; bottom: 12px; left: 12px; justify-content: flex-start; gap: 10px; font-size: 11px; }
}

/* Graph exploration stays inside the original centered navigation width. */
body.workspace-page { --workspace-column-width: min(40vw, 1080px); }

.workspace-topbar {
  width: var(--workspace-column-width);
  margin: 0 auto;
  padding-right: clamp(16px, 2vw, 30px);
  padding-left: clamp(16px, 2vw, 30px);
}

.workspace-canvas {
  width: var(--workspace-column-width);
  min-height: calc(100svh - 76px);
  margin: 0 auto;
  padding: 24px 0 30px;
}

.network-shell { width: 100%; margin: 0 auto; }
.network-controls { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 0 auto 8px; }

.network-example-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 8px 12px; }
.network-example-status { margin: 0; color: #77737d; font-size: 13px; }
.network-example-toggle { min-height: 36px; padding: 0 14px; border: 1px solid #e1bfc2; border-radius: 999px; color: #9b101c; background: #fff; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.network-example-toggle:hover { background: #fff6f6; border-color: #c74d56; }
.network-example-toggle:focus-visible { outline: 2px solid #c50000; outline-offset: 2px; }
.network-gesture-hint { margin: -4px 0 8px; color: #85818a; text-align: center; font-size: 11px; }

.network-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0 auto 5px;
}

.network-filter-button {
  position: relative;
  width: 32px;
  height: 32px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: opacity 140ms ease, border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.network-filter-button:hover { border-color: #ead0d2; background: #fff8f8; transform: translateY(-1px); }
.network-filter-button:focus-visible { outline: 2px solid #c50000; outline-offset: 2px; }
.network-filter-button[aria-pressed="false"] { opacity: .24; }
.network-filter-button svg { width: 22px; height: 22px; overflow: visible; }

.network-control {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #252329;
  background: transparent;
  font-size: 34px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: color 140ms ease, opacity 140ms ease;
}

.network-control:hover:not(:disabled) { color: #b50000; }
.network-control:disabled { opacity: .32; cursor: default; }
.network-control:focus-visible { outline: 2px solid #c50000; outline-offset: 2px; }
.network-home { width: 52px; height: 52px; border: 1px solid #aaa8ae; }
.network-home svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.network-stage {
  width: 100%;
  height: min(72svh, 740px);
  min-height: 500px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: default;
  overscroll-behavior: contain;
}
.network-stage.is-space-pan-mode { cursor: grab; }
.network-stage.is-panning { cursor: grabbing; user-select: none; }
.network-entity-movable { cursor: grab; }
.network-stage.is-moving-node,
.network-stage.is-moving-node .network-entity-movable { cursor: grabbing; user-select: none; }

.network-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.network-links { fill: none; }
.network-edge { fill: none; stroke: #aaa6af; stroke-width: 1.45; opacity: .76; animation: connectionAppear 260ms ease both; }
.network-edge-current { stroke: #c82633; stroke-width: 1.8; opacity: .82; }
.network-entity { animation: sphereAppear 280ms cubic-bezier(.2,.8,.2,1) both; }
.network-entity-expandable { cursor: pointer; }
.network-entity-expandable:hover { filter: drop-shadow(0 2px 4px rgba(70, 26, 33, .22)); }
.network-entity-hit-area { fill: transparent; pointer-events: all; cursor: pointer; }
.network-user-disc { fill: #d91e2d; stroke: #a8111c; stroke-width: 1.2; }
.network-glyph { overflow: visible; pointer-events: all; }
.network-entity-expandable .network-glyph { cursor: pointer; }
.network-entity-label { fill: #28262d; font-size: 18px; font-weight: 650; }
.network-entity-project .network-entity-label { font-size: 20px; }
.network-entity-label-global { font-size: 21px; }
.network-entity-type { fill: #85818a; font-size: 15px; font-weight: 550; letter-spacing: .07em; }
.network-empty-state { margin: 0; color: #77737d; text-align: center; font-size: 14px; }

@keyframes sphereAppear {
  from { opacity: 0; transform: scale(.72); transform-box: fill-box; transform-origin: center; }
  to { opacity: 1; transform: scale(1); transform-box: fill-box; transform-origin: center; }
}

@keyframes connectionAppear {
  from { opacity: 0; }
  to { opacity: .74; }
}

@media (max-width: 760px) {
  body.workspace-page { --workspace-column-width: calc(100vw - 24px); }
  .workspace-topbar { width: var(--workspace-column-width); min-height: 68px; padding: 0 12px; }
  .workspace-canvas { width: var(--workspace-column-width); min-height: calc(100svh - 68px); padding: 16px 0 24px; }
  .network-controls { gap: 16px; margin-bottom: 8px; }
  .network-control { width: 42px; height: 42px; }
  .network-home { width: 46px; height: 46px; }
  .network-stage { height: 68svh; min-height: 460px; }
  .network-example-row { margin-right: 2px; margin-left: 2px; gap: 8px; }
  .network-example-status { font-size: 12px; }
  .network-example-toggle { flex-shrink: 0; padding: 0 10px; font-size: 12px; }
  .network-entity-label { font-size: 17px; }
}

.network-filter-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; margin-left: 8px; }

.network-filter-action { min-height: 28px; padding: 0 10px; border: 1px solid #e8d8d9; border-radius: 999px; color: #5d5961; background: #fff; font: inherit; font-size: 11px; font-weight: 650; cursor: pointer; transition: border-color 140ms ease, color 140ms ease, background 140ms ease; }

.network-filter-action:hover { border-color: #c50000; color: #a30d18; background: #fff8f8; }

.network-filter-action:focus-visible { outline: 2px solid #c50000; outline-offset: 2px; }

.network-stage.is-moving-node .network-edge { animation-play-state: paused; }

.network-node-dragged .network-entity { animation: none; opacity: 1; }

.network-entity-label, .network-entity-type { pointer-events: none; }

.admin-console { display: grid; gap: 22px; padding: 22px; }
.admin-console-host { width: 100%; min-width: 0; }
.workspace-loading { display: grid; place-items: center; color: #77727d; }
.admin-console-nav { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; border-bottom: 1px solid #e7e4e9; }
.admin-console-button { min-height: 38px; padding: 0 14px; border: 1px solid #dedbe1; border-radius: 10px; background: #fff; color: #4b4650; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; transition: color .15s ease, background .15s ease, border-color .15s ease; }
.admin-console-button:hover { border-color: #bc2531; color: #a51c28; }
.admin-console-button.active { color: #fff; background: #ae202b; border-color: #ae202b; }
.admin-console-button.primary { color: #fff; background: #ae202b; border-color: #ae202b; }
.admin-console-button.primary:hover { background: #901822; border-color: #901822; }
.admin-console-button.secondary { background: transparent; }
.admin-console-button.danger { color: #a51c28; border-color: #e6babc; background: #fff8f8; }
.admin-console-button.small { min-height: 32px; padding: 0 10px; font-size: 12px; }
.admin-console-button:disabled { opacity: .55; cursor: wait; }
.admin-console-content { display: grid; gap: 20px; min-width: 0; }
.admin-console-toast, .admin-console-inline-note { margin: 0; padding: 12px 14px; border-radius: 10px; color: #286444; background: #eff8f2; font-size: 13px; }
.admin-console-toast-error, .admin-console-error { color: #9a1b27; background: #fff2f2; }
.admin-console-error { margin: 12px 0 0; padding: 12px; border-radius: 10px; }
.admin-console-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.admin-console-metric { display: grid; gap: 8px; padding: 18px; border: 1px solid #e7e4e9; border-radius: 14px; background: #fff; }
.admin-console-metric span { color: #77727d; font-size: 13px; }
.admin-console-metric strong { color: #27242b; font-size: 27px; line-height: 1; }
.admin-console-callout { display: grid; justify-items: start; gap: 10px; padding: 24px; border: 1px solid #eadcdd; border-radius: 16px; background: linear-gradient(135deg, #fff 0%, #fff8f8 100%); }
.admin-console-callout h3, .admin-console-callout p { margin: 0; }
.admin-console-eyebrow { color: #a51c28; font-size: 12px; font-weight: 750; letter-spacing: .1em; }
.admin-console-callout h3 { font-size: 21px; }
.admin-console-callout p:not(.admin-console-eyebrow) { max-width: 720px; color: #6c6671; line-height: 1.55; }
.admin-console-field { display: grid; gap: 7px; color: #39353e; font-size: 13px; font-weight: 650; }
.admin-console-input { width: 100%; min-height: 42px; box-sizing: border-box; padding: 9px 11px; border: 1px solid #d9d6dc; border-radius: 9px; background: #fff; color: #29262e; font: inherit; font-size: 14px; }
textarea.admin-console-input { min-height: 84px; resize: vertical; }
.admin-console-input:focus { outline: 2px solid #bd2733; outline-offset: 1px; }
.admin-console-person-picker { max-width: 520px; }
.admin-console-person-summary { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid #e5e2e8; border-radius: 13px; background: #fff; }
.admin-console-avatar { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%; color: #a51c28; background: #fff1f1; font-weight: 750; }
.admin-console-person-summary > div:last-child { display: grid; gap: 3px; }
.admin-console-person-summary span { color: #77727d; font-size: 13px; }
.admin-console-role { color: #a51c28 !important; font-size: 11px !important; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.admin-console-graph-form, .admin-console-form, .admin-console-resource-form, .admin-console-invitation-form { display: grid; gap: 16px; padding: 20px; border: 1px solid #e5e2e8; border-radius: 14px; background: #fff; }
.admin-console-graph-form h3, .admin-console-form h3, .admin-console-resource-form h3, .admin-console-invitation-form h3 { margin: 0; font-size: 18px; }
.admin-console-preset-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.admin-console-check-group { min-width: 0; margin: 0; padding: 14px; border: 1px solid #e8e5ea; border-radius: 11px; }
.admin-console-check-group legend { padding: 0 6px; color: #37333c; font-weight: 700; }
.admin-console-note { margin: -2px 0 9px; color: #77727d; font-size: 12px; line-height: 1.45; }
.admin-console-check-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.admin-console-check { display: flex; align-items: flex-start; gap: 9px; padding: 9px 10px; border: 1px solid #efedf0; border-radius: 8px; color: #4c4751; font-size: 13px; cursor: pointer; }
.admin-console-check input { margin: 2px 0 0; accent-color: #ad202b; }
.admin-console-form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-console-empty { margin: 0; color: #79747e; font-size: 13px; }
.admin-console-empty.large { max-width: 620px; padding: 16px; border: 1px dashed #d8d4db; border-radius: 12px; line-height: 1.5; }
.admin-console-two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; }
.admin-console-list-title { margin: 8px 0 -8px; font-size: 17px; }
.admin-console-record-list { display: grid; gap: 8px; }
.admin-console-record { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid #e8e5ea; border-radius: 11px; background: #fff; }
.admin-console-record > div:first-child { display: grid; gap: 4px; min-width: 0; }
.admin-console-record strong { overflow-wrap: anywhere; color: #2c2930; }
.admin-console-record span { color: #77727d; font-size: 12px; line-height: 1.4; }
.admin-console-record-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; flex: 0 0 auto; }
.admin-console-default-tag { padding: 7px 10px; border-radius: 999px; color: #a51c28 !important; background: #fff1f1; font-weight: 700; }
.admin-console-link-box { display: flex; gap: 8px; align-items: center; }
.admin-console-link-box .admin-console-input { flex: 1 1 auto; }
.admin-console-reset-form { margin-top: 14px; }

body.theme-dark .admin-console-nav { border-color: #3c3941; }
body.theme-dark .admin-console-button { color: #e3dfe6; border-color: #48444d; background: #26242a; }
body.theme-dark .admin-console-button:hover { color: #ff9aa1; border-color: #bd3540; }
body.theme-dark .admin-console-button.active, body.theme-dark .admin-console-button.primary { color: #fff; background: #ae202b; border-color: #ae202b; }
body.theme-dark .admin-console-button.danger { color: #ff9aa1; border-color: #70343a; background: #342327; }
body.theme-dark .admin-console-metric, body.theme-dark .admin-console-person-summary, body.theme-dark .admin-console-graph-form, body.theme-dark .admin-console-form, body.theme-dark .admin-console-resource-form, body.theme-dark .admin-console-invitation-form, body.theme-dark .admin-console-record { border-color: #3d3942; background: #211f24; }
body.theme-dark .admin-console-metric strong, body.theme-dark .admin-console-record strong, body.theme-dark .admin-console-graph-form h3, body.theme-dark .admin-console-form h3, body.theme-dark .admin-console-resource-form h3, body.theme-dark .admin-console-invitation-form h3 { color: #f2eff4; }
body.theme-dark .admin-console-field, body.theme-dark .admin-console-check-group legend { color: #e5e1e8; }
body.theme-dark .admin-console-input { color: #f1edf3; border-color: #4b4650; background: #19171b; }
body.theme-dark .admin-console-check-group, body.theme-dark .admin-console-check { border-color: #3d3942; }
body.theme-dark .admin-console-check { color: #ddd9e0; }
body.theme-dark .admin-console-callout { border-color: #58343a; background: linear-gradient(135deg, #242126 0%, #302125 100%); }
body.theme-dark .admin-console-callout p:not(.admin-console-eyebrow) { color: #bbb5c1; }
body.theme-dark .admin-console-default-tag { color: #ff9aa1 !important; background: #40272c; }
body.theme-dark .admin-console-toast { color: #a8dbb9; background: #203127; }
body.theme-dark .admin-console-toast-error, body.theme-dark .admin-console-error { color: #ffadb3; background: #382327; }

@media (max-width: 760px) {
  .admin-console { gap: 16px; padding: 14px; }
  .admin-console-nav { gap: 6px; }
  .admin-console-nav .admin-console-button { white-space: nowrap; }
  .admin-console-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-console-two-columns { grid-template-columns: 1fr; }
  .admin-console-preset-bar { grid-template-columns: 1fr; }
  .admin-console-record { align-items: flex-start; flex-direction: column; }
  .admin-console-record-actions { justify-content: flex-start; }
  .admin-console-link-box { align-items: stretch; flex-direction: column; }
}

/* Plataforma: marca oficial y contraste de administración */
.brand-mark.is-platform-mark { color: #c50000; background: transparent; border-radius: 0; }
.brand-mark.is-platform-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand-wordmark { display: inline-flex; align-items: baseline; gap: 8px; }
.brand-wordmark strong { color: inherit; font-size: inherit; letter-spacing: inherit; }
.brand-wordmark > span { color: #77727e; font-size: .9em; font-weight: 500; letter-spacing: -.025em; }
.platform-heading h1.platform-login-title { display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-size: clamp(22px, 5vw, 34px); line-height: 1; white-space: nowrap; }
.platform-login-title > span { white-space: nowrap; }
.platform-login-mark { display: inline-grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; }
.platform-login-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.dashboard-theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

body.theme-light {
  color-scheme: light;
  --bg: #f5f4f6;
  --surface: #ffffff;
  --surface-raised: #f0eef2;
  --line: #e4e1e6;
  --text: #25232a;
  --muted: #716c74;
  --accent: #d50000;
  --accent-strong: #d50000;
  --success: #216b47;
  --danger: #a61b1b;
  --shadow: none;
  color: var(--text);
  background: #f5f4f6;
}

body.theme-dark .admin-console-callout,
body.theme-dark .admin-console-person-summary {
  color: #211f25;
  border-color: #e3e0e5;
  background: #ffffff;
}
body.theme-dark .admin-console-callout h3,
body.theme-dark .admin-console-person-summary strong { color: #211f25; }
body.theme-dark .admin-console-callout p:not(.admin-console-eyebrow),
body.theme-dark .admin-console-person-summary span:not(.admin-console-role) { color: #55515a; }
body.theme-light .admin-console-callout h3,
body.theme-light .admin-console-person-summary strong { color: #211f25; }
body.theme-light .admin-console-callout p:not(.admin-console-eyebrow),
body.theme-light .admin-console-person-summary span:not(.admin-console-role) { color: #55515a; }
body.theme-light .brand-wordmark > span { color: #716c74; }


.admin-console-lean-panel { display: grid; gap: 14px; padding: 18px; border: 1px solid #e8e5ea; border-radius: 12px; background: #fff; }
.admin-console-lean-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.admin-console-lean-header h2 { margin: 4px 0 0; color: #2c2930; font-size: 20px; }
.admin-console-lean-header .admin-console-eyebrow { margin: 0; color: #77727d; font-size: 10px; font-weight: 750; letter-spacing: .1em; }
.admin-console-lean-status { margin: 0; color: #77727d; font-size: 13px; }
.admin-console-lean-status[data-state="valid"] { color: #18764d; }
.admin-console-lean-status[data-state="invalid"], .admin-console-lean-status[data-state="error"] { color: #a51c28; }
.admin-console-lean-list { display: grid; gap: 9px; }
.admin-console-lean-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 14px; padding: 14px; border: 1px solid #e8e5ea; border-radius: 10px; background: #fcfbfc; }
.admin-console-lean-copy { display: grid; gap: 5px; min-width: 0; }
.admin-console-lean-copy strong { color: #2c2930; overflow-wrap: anywhere; }
.admin-console-lean-copy span, .admin-console-lean-copy small { color: #77727d; font-size: 12px; line-height: 1.45; }
.admin-console-lean-actions { display: grid; justify-items: end; gap: 9px; }
.admin-console-lean-details { width: min(520px, 42vw); color: #77727d; font-size: 12px; }
.admin-console-lean-details summary { cursor: pointer; }
.admin-console-lean-source, .admin-console-lean-output { width: min(600px, 60vw); max-height: 320px; overflow: auto; margin: 8px 0 0; padding: 11px; border: 1px solid #e8e5ea; border-radius: 8px; color: #4b4650; background: #f7f6f8; font: 11px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-console-lean-output { width: 100%; max-height: 360px; margin: 0; }
body.theme-dark .admin-console-lean-panel { border-color: #3d3942; background: #211f24; }
body.theme-dark .admin-console-lean-header h2, body.theme-dark .admin-console-lean-copy strong { color: #f2eff4; }
body.theme-dark .admin-console-lean-item { border-color: #3d3942; background: #252228; }
body.theme-dark .admin-console-lean-source, body.theme-dark .admin-console-lean-output { border-color: #3d3942; color: #e3dfe6; background: #19171c; }
@media (max-width: 760px) {
  .admin-console-lean-item { grid-template-columns: minmax(0, 1fr); }
  .admin-console-lean-actions { justify-items: stretch; }
  .admin-console-lean-details, .admin-console-lean-source { width: 100%; }
}

