:root {
  --bg: #f4f7fb;
  --bg2: #eaf0f8;
  --ink: #152033;
  --muted: #5b6b82;
  --panel: #ffffff;
  --line: #d7e0ec;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --ok: #0f766e;
  --ok-bg: #ccfbf1;
  --bad: #b91c1c;
  --bad-bg: #fee2e2;
  --warn: #a16207;
  --warn-bg: #fef3c7;
  --sidebar: #0f2744;
  --sidebar-text: #e8eef7;
  --sidebar-muted: #93a7c3;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
  --sidebar-w: 248px;
  --shadow: 0 1px 2px rgba(15, 39, 68, 0.04), 0 8px 24px rgba(15, 39, 68, 0.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg) 0%, #ffffff 48%, var(--bg2) 100%);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(900px 420px at 12% -5%, rgba(37, 99, 235, 0.14) 0%, transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(14, 165, 233, 0.10) 0%, transparent 50%),
    linear-gradient(180deg, #f7faff, #eef3fa);
}
.login-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.75rem 1.6rem 1.5rem;
  box-shadow: var(--shadow);
}
.login-card h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 0 0 0.2rem;
  letter-spacing: -0.02em;
  color: #0f2744;
}
.login-card .sub { color: var(--muted); margin: 0 0 1.35rem; }
.login-card label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.75rem 0 0.35rem;
  color: #243552;
}
.login-card input {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
.login-card input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  border-color: #93c5fd;
}
.login-card button {
  margin-top: 1.2rem;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.login-card button:hover { background: var(--accent-2); }
.error {
  background: var(--bad-bg);
  color: var(--bad);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: linear-gradient(180deg, #0f2744 0%, #143356 100%);
  color: var(--sidebar-text);
  padding: 1.25rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.brand .name {
  font-family: var(--font-display);
  font-size: 1.55rem;
  margin: 0;
  letter-spacing: -0.02em;
  color: #ffffff;
}
.brand .role { margin: 0.15rem 0 0; color: var(--sidebar-muted); font-size: 0.85rem; }
.menu { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 0.5rem; }
.menu a {
  color: var(--sidebar-text);
  text-decoration: none;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}
.menu a:hover { background: rgba(255,255,255,0.08); text-decoration: none; }
.menu a.active { background: rgba(37, 99, 235, 0.35); color: #fff; }
.menu a.soon::after {
  content: "скоро";
  float: right;
  font-size: 0.7rem;
  color: var(--sidebar-muted);
  font-weight: 600;
  margin-top: 0.2rem;
}
.side-foot { margin-top: auto; font-size: 0.8rem; color: var(--sidebar-muted); padding: 0.4rem 0.7rem; }
.side-foot a { color: #c9d8ef; }

.main { flex: 1; min-width: 0; padding: 1.4rem 1.5rem 2rem; }
.topbar {
  display: flex; justify-content: space-between; align-items: end; gap: 1rem;
  margin-bottom: 1.2rem; flex-wrap: wrap;
}
.topbar h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0;
  letter-spacing: -0.02em;
  color: #0f2744;
}
.topbar .meta { color: var(--muted); font-size: 0.9rem; text-align: right; }

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; }
.panel {
  grid-column: span 12;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.05rem 1.15rem 1.15rem;
  box-shadow: var(--shadow);
}
.panel h2 {
  margin: 0 0 0.8rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}
@media (min-width: 900px) {
  .panel.half { grid-column: span 6; }
}
.rows { display: flex; flex-direction: column; gap: 0.5rem; }
.row {
  display: flex; justify-content: space-between; gap: 0.75rem; align-items: center;
  padding: 0.55rem 0.65rem; border-radius: 8px; background: #f5f8fc;
}
.row .name { font-weight: 600; }
.row .detail { color: var(--muted); font-size: 0.85rem; text-align: right; }
.badge {
  display: inline-flex; align-items: center;
  font-size: 0.72rem; font-weight: 700; padding: 0.18rem 0.5rem; border-radius: 999px;
}
.badge.ok { color: var(--ok); background: var(--ok-bg); }
.badge.bad { color: var(--bad); background: var(--bad-bg); }
.badge.warn { color: var(--warn); background: var(--warn-bg); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0.7rem; }
.stat {
  padding: 0.8rem 0.85rem; border-radius: 10px;
  background: #eff6ff; border: 1px solid #dbeafe;
}
.stat .n { font-family: var(--font-display); font-size: 1.55rem; font-weight: 600; line-height: 1.1; color: #1e3a8a; }
.stat .l { color: var(--muted); font-size: 0.78rem; margin-top: 0.15rem; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; }
.placeholder {
  background: var(--panel); border: 1px dashed var(--line); border-radius: 14px;
  padding: 1.5rem; color: var(--muted); max-width: 46rem;
  box-shadow: var(--shadow);
}
.emp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
  max-width: none;
}
@media (min-width: 720px) {
  .emp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .emp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.emp-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.emp-card-link:hover { text-decoration: none; }
.emp-card-link:hover .emp-card {
  border-color: #93c5fd;
  background: #f8fbff;
}
.emp-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem 1.1rem;
  max-width: none;
  width: 100%;
  height: 100%;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.emp-card-top {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 0.7rem;
}
.emp-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #dbeafe;
  background: #eff6ff;
  flex-shrink: 0;
}
.emp-card-id { min-width: 0; }
.emp-card h2 {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: #0f2744;
  line-height: 1.15;
}
.emp-role {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 0.4rem;
  line-height: 1.3;
}
.emp-blurb {
  margin: 0;
  color: #3b4d66;
  font-size: 0.9rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.emp-card p { margin: 0.25rem 0; color: var(--muted); }
.mobile-bar {
  display: none; background: var(--sidebar); color: #fff; padding: 0.75rem 1rem;
  font-family: var(--font-display); font-size: 1.2rem;
}
@media (max-width: 820px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; padding-bottom: 0.75rem; }
  .menu { flex-direction: row; flex-wrap: wrap; gap: 0.35rem; }
  .menu a { font-size: 0.85rem; padding: 0.45rem 0.55rem; }
  .menu a.soon::after { display: none; }
  .side-foot { margin-top: 0.5rem; }
  .main { padding: 1rem; }
}

/* Connections service list */
.svc-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.svc-head h2 { margin: 0; }
.svc-list { display: flex; flex-direction: column; gap: 0.65rem; }
.svc-card {
  display: flex; justify-content: space-between; gap: 0.85rem; align-items: flex-start;
  padding: 0.9rem 1rem; border-radius: 12px;
  border: 1px solid var(--line); background: #f8fbff;
  color: inherit; text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}
.svc-card:hover { border-color: #93c5fd; background: #eff6ff; }
.svc-kind {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--accent); margin-bottom: 0.2rem;
}
.svc-title { font-weight: 700; color: #0f2744; font-size: 1.02rem; }
.svc-sub { color: var(--muted); font-size: 0.82rem; margin-top: 0.2rem; word-break: break-all; }
.svc-card-side { text-align: right; flex-shrink: 0; }
.svc-meta { color: var(--muted); font-size: 0.78rem; margin-top: 0.35rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px; padding: 0.5rem 0.9rem;
  background: var(--accent); color: #fff; font-weight: 700; cursor: pointer;
  text-decoration: none; font-size: 0.9rem;
}
.btn:hover { background: var(--accent-2); color: #fff; }
.btn-ghost {
  background: #fff; color: #1e3a8a; border: 1px solid var(--line);
}
.btn-ghost:hover { background: #eff6ff; color: #1e3a8a; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.topic-form {
  padding: 0.85rem; border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.lbl { display: block; font-size: 0.8rem; font-weight: 600; margin: 0.35rem 0 0.2rem; }
.inp {
  width: 100%; margin: 0 0 0.55rem; padding: 0.55rem 0.65rem;
  border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff;
}
.chk { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; }
.stack-form { display: flex; flex-direction: column; gap: 0.15rem; max-width: 34rem; }
.folder-list {
  margin: 0; padding-left: 1.1rem; max-height: 280px; overflow: auto;
  color: var(--muted); font-size: 0.85rem;
}
@media (max-width: 640px) {
  .svc-card { flex-direction: column; }
  .svc-card-side { text-align: left; display: flex; gap: 0.6rem; align-items: center; }
  .svc-meta { margin-top: 0; }
  .topbar .meta { text-align: left; }
}

.emp-bot-row {
  display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: center;
  margin-top: 0.75rem; padding-top: 0.65rem; border-top: 1px solid var(--line);
  font-size: 0.88rem;
}
.emp-tme {
  font-weight: 700; color: var(--accent);
}
.emp-tme:hover { text-decoration: underline; }
.emp-card-link:hover { text-decoration: none; }

/* Overview team map */
.map-hero {
  margin-bottom: 1.1rem;
  padding: 1.1rem 1.25rem;
  border-radius: 16px;
  border: 1px solid #dbeafe;
  background:
    radial-gradient(700px 220px at 0% 0%, rgba(37, 99, 235, 0.12), transparent 60%),
    linear-gradient(180deg, #ffffff, #f3f8ff);
  box-shadow: var(--shadow);
}
.map-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.map-title {
  margin: 0.25rem 0 0.2rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
  color: #0f2744;
  letter-spacing: -0.02em;
}
.map-sub { margin: 0; color: var(--muted); font-size: 0.92rem; }

.team-map {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.map-hub { display: flex; justify-content: center; }
.map-ring {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
@media (min-width: 780px) {
  .map-ring { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1180px) {
  .map-ring { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.map-node {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "avatar who count"
    "doing doing doing";
  gap: 0.35rem 0.85rem;
  align-items: center;
  padding: 0.95rem 1rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
  animation: mapIn .45s ease both;
}
.map-node:hover {
  text-decoration: none;
  border-color: #93c5fd;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.12);
}
.map-node.hub {
  width: min(560px, 100%);
  background:
    radial-gradient(420px 160px at 10% 0%, rgba(37, 99, 235, 0.14), transparent 55%),
    #fff;
  border-color: #bfdbfe;
}
.map-node.busy { border-color: #93c5fd; }
.map-node.idle { opacity: 0.92; }
.map-avatar {
  grid-area: avatar;
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #dbeafe;
  background: #eff6ff;
}
.map-node.hub .map-avatar { width: 78px; height: 78px; }
.map-who { grid-area: who; min-width: 0; }
.map-name {
  font-family: var(--font-display);
  font-size: 1.28rem;
  color: #0f2744;
  line-height: 1.15;
}
.map-role {
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 0.15rem;
}
.map-count {
  grid-area: count;
  min-width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-weight: 800;
  font-size: 0.95rem;
}
.map-doing {
  grid-area: doing;
  margin-top: 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px solid #e8eef7;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: #243552;
  font-size: 0.9rem;
  line-height: 1.35;
}
.map-label {
  display: inline-block;
  width: fit-content;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.map-task {
  color: var(--muted);
  font-size: 0.82rem;
}
.map-idle { color: var(--muted); font-size: 0.88rem; }
.map-pulse {
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.25);
  animation: pulseRing 2.4s ease-out infinite;
}
@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.28); }
  70% { box-shadow: 0 0 0 12px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}
@keyframes mapIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.map-ring .map-node:nth-child(1) { animation-delay: .04s; }
.map-ring .map-node:nth-child(2) { animation-delay: .08s; }
.map-ring .map-node:nth-child(3) { animation-delay: .12s; }
.map-ring .map-node:nth-child(4) { animation-delay: .16s; }
.map-ring .map-node:nth-child(5) { animation-delay: .20s; }

/* Statistics history */
.hist-panel { max-width: none; }
.hist-list { display: flex; flex-direction: column; gap: 0.7rem; }
.hist-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbff;
  padding: 0.85rem 0.95rem;
}
.hist-row.status-running {
  border-color: #93c5fd;
  background: #eff6ff;
}
.hist-row.status-done { background: #fff; }
.hist-title {
  display: flex; justify-content: space-between; gap: 0.75rem; align-items: center;
  flex-wrap: wrap;
}
.hist-task { font-weight: 700; color: #0f2744; }
.hist-meta {
  display: flex; flex-wrap: wrap; gap: 0.55rem 1rem;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.84rem;
}
.hist-result, .hist-handoff {
  margin-top: 0.45rem;
  font-size: 0.9rem;
  color: #243552;
}
.hist-resume {
  margin-top: 0.55rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #dbeafe;
  color: #152033;
  font-size: 0.9rem;
  line-height: 1.4;
}


/* Org structure overview */
.map-hero { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: end; }
.map-legend { display: flex; flex-wrap: wrap; gap: 0.65rem 1rem; color: var(--muted); font-size: 0.8rem; }
.map-legend .lg {
  display: inline-block; width: 1.4rem; height: 0; border-top: 2px solid #93c5fd;
  vertical-align: middle; margin-right: 0.25rem;
}
.map-legend .lg.pair { border-color: #f59e0b; border-top-style: dashed; }
.map-legend .lg.handoff { border-color: #10b981; }
.map-legend .lg.reports { border-color: #60a5fa; }

.org-wrap {
  position: relative;
  min-height: 420px;
  padding-top: 3.8rem;
  padding-bottom: 2.4rem;
  overflow: visible;
}
.org-links {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; overflow: visible;
}
.org-path {
  fill: none;
  stroke: #93c5fd;
  stroke-width: 1.55;
  stroke-linecap: round;
  opacity: 0.42;
  stroke-dasharray: 3 11;
  animation: signalFlow 2.8s linear infinite, signalGlow 2.8s ease-in-out infinite;
}
.org-path.pair { stroke: #f59e0b; stroke-dasharray: 2 10; }
.org-path.handoff { stroke: #10b981; stroke-dasharray: 5 9; stroke-width: 1.7; }
.org-path.collab { stroke: #818cf8; stroke-dasharray: 4 10; }
.org-path.active {
  opacity: 0.95;
  stroke-width: 2.35;
  stroke-dasharray: 7 7;
  animation: signalFlow 1.05s linear infinite, signalGlowHot 1.05s ease-in-out infinite;
  filter: drop-shadow(0 0 3px rgba(96, 165, 250, 0.55));
}
.org-path.pair.active {
  filter: drop-shadow(0 0 3px rgba(245, 158, 11, 0.55));
}
.org-path.handoff.active {
  filter: drop-shadow(0 0 3px rgba(16, 185, 129, 0.55));
}
.org-path.collab.active {
  filter: drop-shadow(0 0 3px rgba(129, 140, 248, 0.55));
}
@keyframes signalFlow {
  to { stroke-dashoffset: -64; }
}
@keyframes signalGlow {
  0%, 100% { opacity: 0.28; }
  50% { opacity: 0.55; }
}
@keyframes signalGlowHot {
  0%, 100% { opacity: 0.72; }
  45% { opacity: 1; }
  55% { opacity: 1; }
}

.org-grid { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2.8rem; }
.org-staff {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.35rem 1.1rem;
}
@media (min-width: 780px) {
  .org-staff { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1180px) {
  .org-staff { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.org-card {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 0.95rem 1rem 1rem;
  margin-top: 1.15rem;
  animation: mapIn .5s ease both;
  animation-delay: calc(var(--i, 0) * 60ms);
  overflow: visible;
}
.org-card.hub {
  width: min(640px, 100%);
  margin: 0 auto;
  border-color: #bfdbfe;
  background:
    radial-gradient(420px 160px at 10% 0%, rgba(37, 99, 235, 0.14), transparent 55%),
    #fff;
}
.org-card.busy { border-color: #93c5fd; }
.org-card.idle { opacity: 0.95; }
.org-card-link {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.85rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.org-card-link:hover { text-decoration: none; }
/* neutralize old map-node named grid-areas inside org cards */
.org-card .map-avatar,
.org-card .map-who,
.org-card .map-count {
  grid-area: auto;
}
.org-card .map-avatar {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  position: relative;
  z-index: 1;
}
.org-card.hub .map-avatar {
  width: 72px;
  height: 72px;
}
.org-card .map-who {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.org-card .map-name {
  font-size: 1.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.org-card .map-role {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.org-card .map-count {
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
  align-self: center;
  min-width: 1.85rem;
  height: 1.85rem;
  padding: 0 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1;
}
.org-card .map-count.is-zero {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #94a3b8;
  font-weight: 600;
}
.org-card .map-pulse {
  inset: auto;
  display: none; /* pulse on hub only via :: optional; avoid covering layout */
}
.org-card.hub .map-pulse {
  display: block;
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  z-index: 0;
  pointer-events: none;
}
.org-status {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid #e8eef7;
  min-height: 1.6rem;
  position: relative;
  z-index: 1;
}

.thought-bubble {
  position: absolute;
  left: 12%;
  right: 12%;
  top: -0.55rem;
  transform: translateY(-100%);
  z-index: 2;
  padding: 0.45rem 0.65rem;
  border-radius: 14px 14px 14px 4px;
  background: #0f2744;
  color: #f8fbff;
  font-size: 0.78rem;
  line-height: 1.35;
  box-shadow: 0 8px 20px rgba(15, 39, 68, 0.18);
  opacity: 0.92;
  pointer-events: none;
}
.thought-bubble::after {
  content: "";
  position: absolute;
  left: 1.1rem; bottom: -6px;
  border: 6px solid transparent;
  border-top-color: #0f2744;
  border-bottom: 0;
}
.org-card.hub .thought-bubble { background: #1d4ed8; }
.org-card.hub .thought-bubble::after { border-top-color: #1d4ed8; }
.thought-bubble.pop { animation: thoughtPop .35s ease; }
.thought-bubble.fresh { outline: 1px solid rgba(147, 197, 253, 0.7); }
@keyframes thoughtPop {
  from { opacity: 0; transform: translateY(calc(-100% + 6px)) scale(0.96); }
  to { opacity: 0.92; transform: translateY(-100%) scale(1); }
}

/* Connections service groups */
.svc-group { margin-top: 1.25rem; }
.svc-group:first-of-type { margin-top: 0.25rem; }
.svc-group-title {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5b6b82;
}
.acl-box {
  margin: 0.55rem 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbff;
  max-width: 34rem;
}
.acl-box legend {
  padding: 0 0.25rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #243552;
}
.acl-box .chk { margin: 0.25rem 0; }
.kind-rdp .svc-kind { color: #0f766e; }
