.network-hero {
  margin: 28px auto;
  max-width: 1180px;
  border-radius: 28px;
  padding: 34px;
  display: flex;
  justify-content: space-between;
  gap: 28px;
  color: #102033;
  background:
    radial-gradient(circle at 12% 20%, rgba(34, 197, 94, .18), transparent 28%),
    radial-gradient(circle at 90% 30%, rgba(37, 99, 235, .16), transparent 30%),
    linear-gradient(135deg, #ffffff, #eef7ff);
  border: 1px solid #dbe8f6;
  box-shadow: 0 22px 60px rgba(31, 79, 140, .14);
}

.network-hero h1,
.section-head h1,
.network-results h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 4rem);
  letter-spacing: -0.05em;
}

.eyebrow {
  font-weight: 800;
  color: #2078f4;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.network-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 12px;
  align-content: center;
}

.network-stats span,
.network-tabs,
.network-filter,
.recommendation-card,
.network-card,
.form-panel,
.network-empty {
  background: rgba(255, 255, 255, .88);
  border: 1px solid #dce7f5;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(46, 76, 115, .08);
}

.network-stats span {
  padding: 18px;
  text-align: center;
}

.network-stats b {
  display: block;
  color: #2078f4;
  font-size: 2rem;
}

.network-tabs {
  max-width: 1180px;
  margin: 0 auto 26px;
  padding: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.network-tabs a {
  color: #31435e;
  text-decoration: none;
  font-weight: 800;
  padding: 12px 16px;
  border-radius: 14px;
}

.network-tabs a:hover {
  background: #eef5ff;
  color: #2078f4;
}

.recommendation-grid {
  max-width: 1180px;
  margin: 0 auto 34px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.recommendation-card,
.network-card {
  padding: 20px;
  animation: networkCardIn .45s ease both;
}

.rec-topline,
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.rec-topline h3,
.network-card h3 {
  margin: 0 0 6px;
  color: #102033;
}

.rec-topline p,
.network-card p,
.network-hero p,
.section-head p {
  color: #64748b;
}

.score-badge {
  min-width: 68px;
  text-align: center;
  padding: 10px 12px;
  border-radius: 999px;
  color: white;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(32, 120, 244, .22);
}

.score-badge.excellent { background: linear-gradient(135deg, #16a34a, #22c55e); }
.score-badge.strong { background: linear-gradient(135deg, #2078f4, #60a5fa); }
.score-badge.good { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.score-badge.possible { background: linear-gradient(135deg, #64748b, #94a3b8); }

.rec-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.rec-badges span {
  background: #eef5ff;
  color: #2d4c7c;
  border-radius: 999px;
  padding: 7px 10px;
  font-weight: 800;
  font-size: .85rem;
}

.rec-reason {
  padding: 12px;
  background: #f7fbff;
  border-left: 4px solid #2078f4;
  border-radius: 12px;
}

.rec-match {
  color: #0f766e;
  font-weight: 800;
}

.rec-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.rec-actions form {
  margin: 0;
}

.btn.soft {
  background: #eaf2ff;
  color: #2078f4;
}

.btn.quiet {
  background: #f1f5f9;
  color: #475569;
}

.network-page {
  max-width: 1480px;
  margin: 28px auto;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 22px;
  padding: 0 18px;
}

.network-results {
  min-width: 0;
}

.network-filter {
  padding: 20px;
  height: max-content;
  position: sticky;
  top: 18px;
}

.network-filter label,
.form-panel label {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  font-weight: 800;
  color: #334155;
}

.network-filter input,
.network-filter select,
.form-panel input,
.form-panel select,
.form-panel textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #cbd8ea;
  border-radius: 14px;
  font: inherit;
}

.section-head,
.form-panel,
.network-empty {
  max-width: 1180px;
  margin: 28px auto;
  padding: 24px;
}

.form-panel {
  max-width: 780px;
}

.network-onboarding {
  max-width: 1280px;
  margin: 30px auto;
  padding: 0 18px 28px;
}

.network-onboarding-hero {
  border-radius: 28px;
  padding: 36px;
  background:
    radial-gradient(1000px 300px at 0% 0%, rgba(42, 157, 143, .16), transparent 60%),
    radial-gradient(1000px 300px at 100% 0%, rgba(37, 99, 235, .16), transparent 62%),
    linear-gradient(140deg, #ffffff, #f2f8ff);
  border: 1px solid #d7e6fa;
  box-shadow: 0 18px 50px rgba(24, 55, 94, .1);
  animation: networkCardIn .45s ease both;
}

.network-onboarding-hero h1 {
  margin: 8px 0 12px;
  max-width: 920px;
  font-size: clamp(2rem, 4vw, 3.8rem);
  color: #14223b;
  letter-spacing: -0.04em;
}

.network-onboarding-hero p {
  margin: 0;
  max-width: 900px;
  color: #4f637f;
  font-size: 1.14rem;
  line-height: 1.7;
}

.onboarding-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.onboarding-grid {
  margin-top: 22px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
}

.onboarding-card {
  background: rgba(255, 255, 255, .9);
  border: 1px solid #dce8f6;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(31, 61, 105, .08);
}

.onboarding-step {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #1f80f3, #2ca3ff);
}

.onboarding-card h3 {
  margin: 12px 0 8px;
  color: #132540;
  font-size: 1.25rem;
}

.onboarding-card p {
  margin: 0;
  color: #61758f;
}

.mini-link {
  display: inline-block;
  margin-top: 12px;
  font-weight: 800;
  color: #1f80f3;
  text-decoration: none;
}

.mini-link:hover {
  text-decoration: underline;
}

.onboarding-benefits {
  margin-top: 20px;
  border: 1px solid #dce8f6;
  border-radius: 20px;
  padding: 22px 22px 10px;
  background: #ffffff;
}

.onboarding-benefits h2 {
  margin: 0 0 12px;
  color: #132540;
}

.onboarding-benefits ul {
  margin: 0;
  padding-left: 20px;
  color: #4c607c;
  line-height: 1.9;
}

.progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #e6eef8;
  overflow: hidden;
  border: 1px solid #d3e0f1;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #2078f4);
  transition: width .3s ease;
}

.profile-quality {
  margin: 12px 0 18px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #dce8f6;
  background: #fbfdff;
}

.profile-quality-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  color: #14223b;
  margin-bottom: 8px;
}

.profile-quality-head b {
  color: #2078f4;
}

.profile-quality-message {
  margin: 10px 0 0;
  color: #60748f;
  font-weight: 700;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fbff;
  border: 1px solid #e1ebf8;
  margin-bottom: 8px;
}

.metric-row span {
  color: #4e617c;
}

.metric-row b {
  color: #12223c;
}

.network-graph-card,
.relationship-panel {
  max-width: 1180px;
  margin: 0 auto 24px;
  padding: 22px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid #dce7f5;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(46, 76, 115, .08);
}

.graph-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.graph-head h2 {
  margin: 0 0 6px;
  color: #102033;
}

.graph-head p {
  margin: 0;
  color: #60748f;
}

.graph-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  color: #4b5f7b;
  font-weight: 800;
  font-size: .9rem;
}

.graph-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  display: inline-block;
}

.legend-dot.strong { background: #0f766e; }
.legend-dot.good { background: #2078f4; }
.legend-dot.growth { background: #f59e0b; }

.spider-graph {
  position: relative;
  min-height: 430px;
  height: min(54vw, 560px);
  border-radius: 18px;
  border: 1px solid #d6e4f4;
  overflow: hidden;
  background:
    linear-gradient(135deg, #f7fbff, #edf5fc 58%, #f9fbfd);
}

.spider-graph-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.spider-line {
  stroke: var(--line-color, #2078f4);
  stroke-linecap: round;
  opacity: .58;
  transition: opacity .2s ease, stroke-width .2s ease;
}

.spider-line.is-active {
  opacity: 1;
}

.spider-center,
.spider-node {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, .9);
  box-shadow: 0 16px 34px rgba(31, 56, 91, .2);
}

.spider-center {
  left: 50%;
  top: 52%;
  width: 190px;
  min-height: 118px;
  padding: 18px;
  border-radius: 18px;
  display: grid;
  align-content: center;
  gap: 4px;
  text-align: center;
  color: #102033;
  background: rgba(255, 255, 255, .96);
  z-index: 4;
}

.spider-center span,
.spider-center small {
  color: #64748b;
  font-weight: 800;
}

.spider-center strong {
  font-size: 1.05rem;
}

.spider-node {
  left: var(--node-x);
  top: var(--node-y);
  width: 154px;
  min-height: 82px;
  padding: 10px 12px;
  border-radius: 16px;
  color: #ffffff;
  background: var(--node-color, #2078f4);
  cursor: pointer;
  display: grid;
  gap: 2px;
  text-align: left;
  font: inherit;
  z-index: 3;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.spider-node:hover,
.spider-node.is-active {
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: 0 20px 42px rgba(31, 56, 91, .28);
  filter: saturate(1.08);
}

.spider-node b {
  font-size: 1.25rem;
  line-height: 1;
}

.spider-node strong,
.spider-node span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spider-node small {
  color: rgba(255, 255, 255, .9);
}

.graph-inspector {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #dce7f5;
  border-left: 5px solid var(--active-rec-color, #2078f4);
  border-radius: 14px;
  background: #fbfdff;
}

.graph-inspector span {
  color: #2078f4;
  font-weight: 900;
  text-transform: uppercase;
  font-size: .78rem;
}

.graph-inspector strong {
  display: block;
  margin: 5px 0;
  color: #102033;
  font-size: 1.2rem;
}

.graph-inspector p {
  margin: 0;
  color: #52677f;
}

.relationship-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.relationship-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  min-width: 920px;
}

.relationship-table th {
  text-align: left;
  color: #64748b;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 0 12px 4px;
}

.relationship-table td {
  padding: 14px 12px;
  background: #f8fbff;
  border-top: 1px solid #dce7f5;
  border-bottom: 1px solid #dce7f5;
  color: #102033;
  vertical-align: middle;
}

.relationship-table td:first-child {
  border-left: 5px solid var(--rec-color, #2078f4);
  border-radius: 14px 0 0 14px;
}

.relationship-table td:last-child {
  border-right: 1px solid #dce7f5;
  border-radius: 0 14px 14px 0;
}

.relationship-table tr {
  cursor: pointer;
}

.relationship-table tr.is-active td,
.relationship-table tr:hover td {
  background: #eef6ff;
}

.relationship-table td strong,
.relationship-table td b {
  display: block;
  color: #102033;
}

.relationship-table td span,
.relationship-table td small {
  display: block;
  color: #60748f;
  margin-top: 3px;
}

.fit-pill {
  display: inline-flex;
  width: max-content;
  min-width: 72px;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 10px;
  color: #ffffff !important;
  background: #64748b;
  font-weight: 900;
}

.fit-pill.strong { background: #0f766e; }
.fit-pill.good { background: #2078f4; }
.fit-pill.growth { background: #f59e0b; color: #102033 !important; }

.score-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.score-breakdown span {
  display: inline-flex !important;
  width: max-content;
  margin: 0 !important;
  padding: 4px 6px;
  border-radius: 999px;
  background: #eef5ff;
  color: #36506f !important;
  font-size: .72rem;
  font-weight: 800;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-actions form {
  margin: 0;
}

.relationship-chip {
  border: 1px solid color-mix(in srgb, var(--rec-color, #2078f4), #ffffff 45%);
  color: var(--rec-color, #2078f4) !important;
  background: color-mix(in srgb, var(--rec-color, #2078f4), #ffffff 88%) !important;
}

@keyframes networkCardIn {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 860px) {
  .network-hero,
  .section-head {
    flex-direction: column;
  }
  .network-stats {
    grid-template-columns: 1fr;
    width: 100%;
  }
  .network-page {
    grid-template-columns: 1fr;
  }
  .network-filter {
    position: static;
  }
  .graph-head {
    flex-direction: column;
  }
  .graph-legend {
    justify-content: flex-start;
  }
  .spider-graph {
    min-height: 620px;
  }
  .spider-node {
    width: 132px;
  }
  .onboarding-grid {
    grid-template-columns: 1fr;
  }
  .network-onboarding-hero {
    padding: 24px;
  }
}

/* Modern recommendations/network polish */
.network-hero {
  border-radius: 34px;
  background:
    radial-gradient(circle at 12% 18%, rgba(16, 185, 129, .20), transparent 30%),
    radial-gradient(circle at 92% 24%, rgba(37, 99, 235, .18), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(239,246,255,.86));
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px rgba(31, 79, 140, .16);
}

.network-tabs,
.network-filter,
.recommendation-card,
.network-card,
.form-panel,
.network-empty,
.network-stats span {
  border-radius: 26px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px) saturate(1.12);
}

.recommendation-card,
.network-card {
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.recommendation-card::before,
.network-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #14b8a6, #8b5cf6);
  opacity: .9;
}

.recommendation-card:hover,
.network-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37,99,235,.26);
  box-shadow: 0 26px 70px rgba(15, 23, 42, .14);
}

.score-badge {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 14px 30px rgba(37, 99, 235, .24);
}

.rec-badges span,
.network-tabs a {
  border: 1px solid rgba(37, 99, 235, .12);
}

/* --- Enhanced company connection spider web --- */
.spider-graph {
  min-height: 470px;
  height: min(56vw, 620px);
  border-radius: 24px;
  border: 1px solid rgba(148,163,184,.18);
  background:
    radial-gradient(circle at 50% 48%, rgba(59, 130, 246, .08), transparent 24%),
    radial-gradient(circle at 14% 18%, rgba(37,99,235,.08), transparent 20%),
    linear-gradient(180deg, #fbfdff, #f2f7fc 68%, #f8fbff);
}

.spider-grid-ring {
  fill: none;
  stroke: rgba(59, 130, 246, .11);
  stroke-width: .22;
}

.spider-grid-spoke {
  stroke: rgba(59, 130, 246, .10);
  stroke-width: .18;
}

.spider-grid-orbit {
  fill: none;
  stroke-width: .25;
}

.spider-grid-orbit-company {
  stroke: rgba(37, 99, 235, .20);
}

.spider-grid-orbit-growth {
  stroke: rgba(249, 115, 22, .20);
  stroke-dasharray: 2 1.8;
}

.spider-line {
  opacity: .64;
}

.spider-center {
  width: 210px;
  min-height: 132px;
  border-radius: 24px;
  box-shadow: 0 18px 42px rgba(15,23,42,.16);
}

.spider-node {
  width: 148px;
  min-height: 90px;
  padding: 12px;
  border-radius: 18px;
  box-shadow: 0 16px 34px rgba(31,56,91,.18);
}

.spider-node b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  font-size: .84rem;
}

.spider-node strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  line-height: 1.16;
}

.spider-node span,
.spider-node small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spider-node-strong,
.spider-node-good,
.spider-node-possible {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.spider-node-growth {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.graph-inspector-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.graph-inspector-meta b,
.graph-inspector-meta em {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.graph-inspector-meta b {
  background: #eff6ff;
  color: #1d4ed8;
}

.graph-inspector-meta em {
  background: #f8fafc;
  color: #475569;
}

@media (max-width: 760px) {
  .spider-graph {
    min-height: 400px;
    height: 440px;
  }

  .spider-center {
    width: 164px;
    min-height: 110px;
    padding: 16px;
  }

  .spider-node {
    width: 118px;
    min-height: 82px;
  }
}
