﻿.unified-graph-map {
 --brand: #368181;
 --brand-dark: #246969;
 --brand-soft: #e8f6f5;
 --ink: #07153d;
 --text: #273854;
 --muted: #74839b;
 --line: #dce7f2;
 --legal: #3977bd;
 --family: #39956f;
 --education: #bd7b2d;
 --poa: #7059be;
 --final: #be5555;
 --document: #596a7e;
 --shadow: 0 24px 54px rgba(13, 38, 76, 0.10), 0 3px 12px rgba(13, 38, 76, 0.06);
 min-height: 100vh;
 color: var(--ink);
 font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
 background: radial-gradient(circle at 10% 10%, rgba(54,129,129,.08), transparent 28%), radial-gradient(circle at 88% 18%, rgba(112,89,190,.07), transparent 24%), linear-gradient(180deg, #fbfdff, #f3f8fb);
}

 .unified-graph-map * {
  box-sizing: border-box;
 }

 .unified-graph-map::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(54,129,129,.12) 1px, transparent 0);
  background-size: 26px 26px;
  opacity: .48;
 }

 .unified-graph-map .app {
  position: relative;
  z-index: 1;
  padding: 22px;
 }

 .unified-graph-map .layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 405px;
  gap: 18px;
  height: calc(100vh - 44px);
  min-height: 740px;
 }

 .unified-graph-map .graph-card,
 .unified-graph-map .details-card {
  background: rgba(255,255,255);
  border: 1px solid rgba(220,231,242,.95);
  border-radius: 5px;
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(16px);
 }

 .unified-graph-map .graph-card {
  position: relative;
  min-width: 0;
 }

 .unified-graph-map #cy {
  width: 100%;
  height: 100%;
  min-height: 740px;
  background: radial-gradient(circle at 50% 46%, rgba(54,129,129,.11), transparent 32%), radial-gradient(circle at 80% 72%, rgba(112,89,190,.06), transparent 24%), linear-gradient(180deg, rgba(255,255,255,.94), rgba(247,251,253,.94));
 }

 .unified-graph-map .graph-controls {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 20;
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: calc(100% - 36px);
  padding: 8px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(220,231,242,.9);
  border-radius: 5px;
  box-shadow: 0 12px 30px rgba(13,38,76,.08);
  backdrop-filter: blur(14px);
 }

 .unified-graph-map button,
 .unified-graph-map input,
 .unified-graph-map select {
  font-family: inherit;
 }

 .unified-graph-map .search,
 .unified-graph-map .select,
 .unified-graph-map .btn {
  height: 38px;
  border: 1px solid rgba(213,225,237,.95);
  background: #fff;
  border-radius: 5px;
  color: var(--text);
  box-shadow: 0 5px 14px rgba(13,38,76,.05);
  font-size: 13px;
 }

 .unified-graph-map .search {
  width: 285px;
  padding: 0 14px;
  outline: none;
  font-weight: 500;
 }

  .unified-graph-map .search::placeholder {
   color: #9aa8bc;
  }

  .unified-graph-map .search:focus {
   border-color: var(--brand);
   box-shadow: 0 0 0 4px rgba(54,129,129,.13);
  }

 .unified-graph-map .select {
  padding: 0 12px;
  cursor: pointer;
  font-weight: 600;
 }

 .unified-graph-map .btn {
  padding: 0 15px;
  /*font-weight: 800;*/
  color: var(--brand-dark);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
 }

  .unified-graph-map .btn:hover {
   transform: translateY(-1px);
   box-shadow: 0 8px 18px rgba(13,38,76,.08);
  }

  .unified-graph-map .btn.primary {
   color: #fff;
   background: var(--brand);
   border-color: var(--brand);
   box-shadow: 0 10px 20px rgba(54,129,129,.22);
  }

 .unified-graph-map .legend-panel {
  position: absolute;
  left: 18px;
  top: 18px;
  width: max-content;
  z-index: 20;
  max-width: calc(100% - 36px);
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(220,231,242,.95);
  border-radius: 5px;
  box-shadow: 0 16px 36px rgba(13,38,76,.11);
  overflow: hidden;
  backdrop-filter: blur(16px);
 }

 .unified-graph-map .legend-toggle {
  width: 100%;
  border: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(247,252,252,.94));
  color: var(--ink);
  padding: 12px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
  border-bottom: 1px solid rgba(220,231,242,.9);
  gap: 18px;
 }

  .unified-graph-map .legend-toggle span:last-child {
   color: var(--brand);
   font-size: 17px;
   line-height: 1;
   transition: transform .18s ease;
  }

 .unified-graph-map .legend-panel.collapsed .legend-toggle {
  border-bottom: 0;
 }

  .unified-graph-map .legend-panel.collapsed .legend-toggle span:last-child {
   transform: rotate(-90deg);
  }

 .unified-graph-map .legend-body {
  padding: 14px 15px 15px;
  display: grid;
  gap: 10px;
 }

 .unified-graph-map .legend-panel.collapsed .legend-body {
  display: none;
 }

 .unified-graph-map .legend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #415975;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 500;
  white-space: nowrap;
 }

 .unified-graph-map .dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 auto;
  box-shadow: 0 0 0 4px rgba(13,38,76,.04);
 }

 .unified-graph-map .details-card {
  padding: 22px;
  overflow: auto;
 }

 .unified-graph-map .details-top {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 17px;
 }

 .unified-graph-map .details-icon {
  width: 56px;
  height: 56px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 14px 25px rgba(54,129,129,.24);
  flex: 0 0 auto;
 }

 .unified-graph-map .details-title {
  margin: 0;
  font-size: 21px;
  line-height: 1.18;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.02em;
 }

 .unified-graph-map .details-path {
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
  line-height: 1.4;
  font-weight: 500;
 }

 .unified-graph-map .pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border: 1px solid rgba(54,129,129,.22);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 14px;
 }

 .unified-graph-map .description {
  color: #405877;
  font-size: 13px;
  line-height: 1.65;
  margin-bottom: 18px;
  font-weight: 500;
 }

 .unified-graph-map .info-table {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 11px 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
 }

 .unified-graph-map .info-key {
  color: var(--muted);
  font-weight: 800;
 }

 .unified-graph-map .info-value {
  color: var(--text);
  font-weight: 600;
  overflow-wrap: anywhere;
 }

 .unified-graph-map .plain-info {
  display: none;
  white-space: pre-wrap;
  color: var(--text);
  background: linear-gradient(180deg, #f8fcfd, #f4f9fa);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 16px;
  font-size: 13px;
  line-height: 1.75;
  font-weight: 500;
 }

 .unified-graph-map .hint {
  margin-top: 20px;
  padding: 14px;
  border-radius: 5px;
  background: linear-gradient(180deg, #f8fcfd, #f4f9fa);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  font-weight: 500;
 }

 .unified-graph-map .load-error {
  padding: 28px;
  color: #a03737;
  font-weight: 700;
 }
/* Fullscreen styles */
.layout:fullscreen,
.layout:-webkit-full-screen,
.layout:-moz-full-screen {
 display: grid;
 grid-template-columns: minmax(0, 1fr) 405px;
 gap: 18px;
 height: 100vh;
 padding: 18px;
 background: radial-gradient(circle at 10% 10%, rgba(54,129,129,.08), transparent 28%), radial-gradient(circle at 88% 18%, rgba(112,89,190,.07), transparent 24%), linear-gradient(180deg, #fbfdff, #f3f8fb);
 box-sizing: border-box;
}

 .layout:fullscreen .graph-card,
 .layout:-webkit-full-screen .graph-card,
 .layout:-moz-full-screen .graph-card {
  border-radius: 5px;
 }

 .layout:fullscreen .details-card,
 .layout:-webkit-full-screen .details-card,
 .layout:-moz-full-screen .details-card {
  border-radius: 5px;
  max-height: calc(100vh - 36px);
  overflow: auto;
 }

 .layout:fullscreen #cy,
 .layout:-webkit-full-screen #cy,
 .layout:-moz-full-screen #cy {
  height: calc(100vh - 36px);
  min-height: unset;
 }

@media (max-width: 1180px) {
 .unified-graph-map .layout {
  grid-template-columns: 1fr;
  height: auto;
 }

 .unified-graph-map .details-card {
  max-height: none;
 }

 .unified-graph-map #cy {
  order: 3;
  height: 780px;
 }

 .unified-graph-map .graph-controls {
  position: static;
  order: 1;
  margin: 14px;
  max-width: none;
 }

 .unified-graph-map .graph-card {
  display: flex;
  flex-direction: column;
 }

 .unified-graph-map .legend-panel {
  position: static;
  order: 2;
  align-self: flex-start;
  width: max-content;
  max-width: calc(100% - 28px);
  margin: 0 14px 12px;
 }
}

@media (max-width: 720px) {
 .unified-graph-map .app {
  padding: 12px;
 }

 .unified-graph-map .layout {
  min-height: unset;
 }

 .unified-graph-map .search {
  width: 100%;
 }

 .unified-graph-map .graph-controls {
  align-items: stretch;
  width: calc(100% - 28px);
 }

 .unified-graph-map .select,
 .unified-graph-map .btn {
  flex: 1;
 }

 .unified-graph-map .legend-panel {
  width: max-content;
  max-width: calc(100% - 28px);
 }
}
