/* ============================================================
   PROPOSTA DETALHES 2 - GRAFO INTERATIVO FULLSCREEN
   Inspirado na animação de constelação e nós de conexões curriculares
   ============================================================ */

.proposal-graph-page[hidden]{
  display:none!important;
}

.proposal-graph-page{
  position:fixed;
  top:0;
  left:0;
  right:0;
  bottom:0;
  width:100vw;
  height:100vh;
  height:100dvh;
  z-index:90;
  display:flex;
  flex-direction:column;
  background:#101014;
  color:#f3eff8;
  overflow:hidden;
  user-select:none;
}

body.has-proposal-graph{
  overflow:hidden!important;
}

body[data-theme="light"] .proposal-graph-page{
  background:#f6f4fa;
  color:#1a1322;
}

/* Barra superior integrada de navegação, foco e filtros */
.proposal-topbar{
  position:sticky;
  top:0;
  left:0;
  right:0;
  z-index:35;
  display:flex;
  flex-direction:column;
  padding:0;
  background:rgba(16,16,20,0.96);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  border-bottom:1px solid rgba(255,255,255,0.08);
  box-shadow:0 6px 24px rgba(0,0,0,0.38);
}

body[data-theme="light"] .proposal-topbar{
  background:rgba(251,250,253,0.96);
  border-bottom:1px solid rgba(0,0,0,0.08);
  box-shadow:0 4px 18px rgba(0,0,0,0.05);
}

.proposal-topbar-primary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:10px 24px 8px;
}

@media(max-width:900px){
  .proposal-topbar-primary{
    padding:8px 14px 6px;
    gap:10px;
  }
}

.proposal-nav-group{
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
}

.proposal-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  height:32px;
  padding:0 13px;
  border-radius:20px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.05);
  color:#f0ebf5;
  font-family:'DM Sans',Arial,sans-serif;
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  transition:all .18s ease;
  white-space:nowrap;
}

.proposal-btn:hover{
  background:rgba(255,255,255,0.12);
  border-color:rgba(255,255,255,0.25);
  color:#fff;
  transform:translateY(-1px);
}

body[data-theme="light"] .proposal-btn{
  border-color:rgba(0,0,0,0.12);
  background:#ffffff;
  color:#2c2336;
  box-shadow:0 1px 3px rgba(0,0,0,0.04);
}

body[data-theme="light"] .proposal-btn:hover{
  background:#f6f3f9;
  border-color:rgba(0,0,0,0.2);
  color:#0f0717;
}

/* Pílula central elegante com a habilidade ativa e descrição truncada */
.proposal-skill-pill{
  display:flex;
  align-items:center;
  gap:12px;
  flex:1 1 auto;
  max-width:min(720px,56vw);
  margin:0 auto;
  padding:6px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.09);
  background:rgba(255,255,255,0.035);
  cursor:pointer;
  transition:all .2s cubic-bezier(0.16,1,0.3,1);
  text-decoration:none;
}

.proposal-skill-pill:hover,
.proposal-skill-pill:focus-visible{
  transform:translateY(-1px);
  border-color:color-mix(in srgb,var(--skill-accent,#b5a0ff) 55%,rgba(255,255,255,0.25));
  background:color-mix(in srgb,var(--skill-accent,#b5a0ff) 10%,rgba(255,255,255,0.05));
  box-shadow:0 4px 18px color-mix(in srgb,var(--skill-accent,#b5a0ff) 22%,transparent);
  outline:none;
}

body[data-theme="light"] .proposal-skill-pill{
  background:rgba(255,255,255,0.85);
  border-color:rgba(0,0,0,0.09);
  box-shadow:0 2px 8px rgba(0,0,0,0.04);
}

body[data-theme="light"] .proposal-skill-pill:hover,
body[data-theme="light"] .proposal-skill-pill:focus-visible{
  background:#ffffff;
  border-color:color-mix(in srgb,var(--skill-accent,#7d3fa8) 45%,#d8d3e0);
  box-shadow:0 4px 16px color-mix(in srgb,var(--skill-accent,#7d3fa8) 16%,transparent);
}

.proposal-skill-pill-head{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:2px;
  flex:0 0 auto;
  min-width:0;
}

.proposal-skill-code{
  font-family:'Space Grotesk',Inter,sans-serif;
  font-size:15px;
  font-weight:800;
  color:#fff;
  letter-spacing:-.2px;
  line-height:1.2;
}

body[data-theme="light"] .proposal-skill-code{
  color:#1b1224;
}

.proposal-skill-subline{
  display:flex;
  align-items:center;
  gap:6px;
  white-space:nowrap;
}

.proposal-skill-meta{
  font-size:11px;
  color:#b4adbc;
  line-height:1.2;
}

body[data-theme="light"] .proposal-skill-meta{
  color:#61586a;
}

.proposal-conn-tag{
  display:inline-flex;
  align-items:center;
  padding:1px 6px;
  border-radius:8px;
  font-size:9.5px;
  font-weight:700;
  line-height:1.2;
  color:color-mix(in srgb,var(--skill-accent,#b5a0ff) 85%,#ffffff);
  background:color-mix(in srgb,var(--skill-accent,#b5a0ff) 20%,transparent);
  border:1px solid color-mix(in srgb,var(--skill-accent,#b5a0ff) 35%,transparent);
}

body[data-theme="light"] .proposal-conn-tag{
  color:color-mix(in srgb,var(--skill-accent,#7d3fa8) 85%,#000000);
  background:color-mix(in srgb,var(--skill-accent,#7d3fa8) 12%,transparent);
  border-color:color-mix(in srgb,var(--skill-accent,#7d3fa8) 28%,transparent);
}

.proposal-skill-divider{
  width:1px;
  height:28px;
  background:rgba(255,255,255,0.1);
  flex:0 0 1px;
}

body[data-theme="light"] .proposal-skill-divider{
  background:rgba(0,0,0,0.08);
}

.proposal-skill-desc{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  margin:0;
  color:#cfc9d6;
  font-size:11.5px;
  line-height:1.4;
  font-weight:450;
  text-align:left;
  flex:1 1 auto;
  min-width:0;
}

body[data-theme="light"] .proposal-skill-desc{
  color:#473f50;
}

/* Ações de visualização (zoom / centralizar) */
.proposal-view-actions{
  display:flex;
  align-items:center;
  gap:6px;
  flex:0 0 auto;
}

.proposal-tool-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:32px;
  height:32px;
  padding:0;
  border-radius:50%;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.05);
  color:#eee8f5;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
  transition:all .18s ease;
}

.proposal-tool-btn:hover{
  border-color:rgba(255,255,255,0.3);
  background:rgba(255,255,255,0.14);
  color:#fff;
  transform:scale(1.05);
}

body[data-theme="light"] .proposal-tool-btn{
  border-color:rgba(0,0,0,0.12);
  background:#ffffff;
  color:#2c2136;
  box-shadow:0 1px 3px rgba(0,0,0,0.04);
}

body[data-theme="light"] .proposal-tool-btn:hover{
  background:#f5f2f8;
  border-color:rgba(0,0,0,0.22);
  color:#000;
}

/* Área do Grafo / Canvas */
.proposal-canvas-wrap{
  position:relative;
  flex:1 1 auto;
  width:100%;
  height:100%;
  min-height:0;
  overflow:hidden;
  cursor:grab;
  background:radial-gradient(ellipse 65% 65% at 50% 50%, rgba(181,160,255,0.06), transparent 75%);
}

.proposal-canvas-wrap.is-dragging{
  cursor:grabbing;
}

body[data-theme="light"] .proposal-canvas-wrap{
  background:radial-gradient(ellipse 65% 65% at 50% 50%, rgba(125,63,168,0.05), transparent 75%);
}

/* Sub-barra de ferramentas e filtros integrada à base do topbar */
.graph2-map-controls-top{
  position:relative;
  width:100%;
  z-index:30;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:5px 24px 6px;
  background:rgba(12,11,16,0.65);
  border-top:1px solid rgba(255,255,255,0.06);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  box-shadow:none;
  max-width:none;
  transform:none;
  left:auto;
  top:auto;
}

body[data-theme="light"] .graph2-map-controls-top{
  background:rgba(244,242,248,0.88);
  border-top:1px solid rgba(0,0,0,0.06);
}

.graph2-map-controls-top::-webkit-scrollbar{display:none}

.graph2-filter-chips-wrap{
  display:flex;
  align-items:center;
  gap:7px;
  flex:1 1 auto;
  min-width:0;
  overflow-x:auto;
  scrollbar-width:none;
  padding:1px 0;
}

.graph2-filter-chips-wrap::-webkit-scrollbar{
  display:none;
}

.graph2-filter-label{
  display:inline-flex;
  align-items:center;
  gap:5px;
  font-size:11px;
  font-weight:700;
  color:#cfc9d6;
  white-space:nowrap;
  padding-right:6px;
  border-right:1px solid rgba(255,255,255,0.12);
  flex:0 0 auto;
}

body[data-theme="light"] .graph2-filter-label{
  color:#4a3f55;
  border-right-color:rgba(0,0,0,0.1);
}

.proposal-legend-btn{
  border-color:rgba(255,255,255,0.15)!important;
  background:rgba(255,255,255,0.06)!important;
  color:#eee9f5!important;
  font-weight:700!important;
  font-size:11.5px!important;
  padding:4px 12px!important;
  border-radius:18px!important;
  flex:0 0 auto;
  margin-left:auto;
  cursor:pointer;
  transition:all .18s ease;
  white-space:nowrap;
}

.proposal-legend-btn:hover{
  background:rgba(255,255,255,0.14)!important;
  color:#fff!important;
  border-color:rgba(255,255,255,0.3)!important;
  transform:translateY(-1px);
}

.proposal-legend-btn.is-active{
  border-color:color-mix(in srgb,var(--skill-accent,#b5a0ff) 60%,#ffffff)!important;
  background:color-mix(in srgb,var(--skill-accent,#b5a0ff) 26%,#1f1a29)!important;
  color:#fff!important;
  box-shadow:0 0 12px color-mix(in srgb,var(--skill-accent,#b5a0ff) 40%,transparent)!important;
}

.legend-btn-icon{
  flex:0 0 auto;
}

.legend-toggle-caret{
  font-size:11px;
  line-height:1;
  opacity:0.8;
  margin-left:1px;
}

body[data-theme="light"] .proposal-legend-btn{
  border-color:rgba(0,0,0,0.12)!important;
  background:#ffffff!important;
  color:#2d2238!important;
  box-shadow:0 1px 3px rgba(0,0,0,0.04);
}

body[data-theme="light"] .proposal-legend-btn:hover{
  background:#f6f3f9!important;
  border-color:rgba(0,0,0,0.22)!important;
  color:#000!important;
}

body[data-theme="light"] .proposal-legend-btn.is-active{
  border-color:var(--skill-accent,#7d3fa8)!important;
  background:color-mix(in srgb,var(--skill-accent,#7d3fa8) 16%,#ffffff)!important;
  color:#150921!important;
  box-shadow:0 2px 10px color-mix(in srgb,var(--skill-accent,#7d3fa8) 25%,transparent)!important;
}

/* Chips de filtro com suporte a multi-seleção */
.proposal-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:30px;
  padding:4px 11px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(255,255,255,0.05);
  color:#d6d0dc;
  font-size:11px;
  font-weight:600;
  cursor:pointer;
  transition:all .18s ease;
  white-space:nowrap;
  user-select:none;
}

.proposal-chip:hover{
  border-color:rgba(255,255,255,0.3);
  background:rgba(255,255,255,0.1);
  color:#fff;
  transform:translateY(-1px);
}

.proposal-chip.is-active{
  border-color:var(--filter-accent,#b5a0ff)!important;
  background:color-mix(in srgb,var(--filter-accent,#b5a0ff) 32%,#191724)!important;
  color:#ffffff!important;
  font-weight:800!important;
  box-shadow:0 0 14px color-mix(in srgb,var(--filter-accent,#b5a0ff) 50%,transparent),0 2px 6px rgba(0,0,0,0.35)!important;
  transform:translateY(-1px);
}

.proposal-chip-check{
  display:inline-block;
  font-size:10px;
  font-weight:900;
  opacity:0;
  transform:scale(0);
  transition:all .18s ease;
  margin-right:-2px;
}

.proposal-chip.is-active .proposal-chip-check{
  opacity:1;
  transform:scale(1);
}

.proposal-chip-dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--filter-accent,#b5a0ff);
  flex:0 0 auto;
  box-shadow:0 0 6px var(--filter-accent,#b5a0ff);
}

.proposal-chip-count{
  font-size:10px;
  font-weight:700;
  padding:1px 5px;
  border-radius:8px;
  background:rgba(255,255,255,0.12);
  color:#f0ecf4;
}

.proposal-chip.is-active .proposal-chip-count{
  background:rgba(255,255,255,0.24);
  color:#ffffff;
}

body[data-theme="light"] .proposal-chip{
  border-color:rgba(0,0,0,0.12);
  background:rgba(0,0,0,0.04);
  color:#453a50;
}

body[data-theme="light"] .proposal-chip:hover{
  background:rgba(0,0,0,0.08);
  color:#100718;
}

body[data-theme="light"] .proposal-chip.is-active{
  background:color-mix(in srgb,var(--filter-accent,#7d3fa8) 22%,#ffffff)!important;
  border-color:var(--filter-accent,#7d3fa8)!important;
  color:#12071c!important;
  box-shadow:0 2px 12px color-mix(in srgb,var(--filter-accent,#7d3fa8) 35%,transparent)!important;
}

body[data-theme="light"] .proposal-chip-count{
  background:rgba(0,0,0,0.07);
  color:#3a2e45;
}

/* Legenda Vertical à esquerda do mapa */
.graph2-map-legend,
.graph2-vertical-legend{
  position:absolute;
  top:68px;
  left:20px;
  bottom:20px;
  width:285px;
  max-width:calc(100vw - 36px);
  z-index:32;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:12px;
  padding:15px 15px 13px;
  border-radius:18px;
  background:rgba(18,16,24,0.94);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  border:1px solid rgba(255,255,255,0.14);
  box-shadow:0 14px 45px rgba(0,0,0,0.5);
  font-size:11px;
  color:#d5cfdc;
  overflow-y:auto;
  scrollbar-width:thin;
  pointer-events:auto;
  animation:legend-slide-in .22s cubic-bezier(0.16,1,0.3,1);
}

@keyframes legend-slide-in{
  from{opacity:0;transform:translateX(-14px)}
  to{opacity:1;transform:translateX(0)}
}

.graph2-map-legend[hidden],
.graph2-vertical-legend[hidden]{
  display:none!important;
}

body[data-theme="light"] .graph2-map-legend,
body[data-theme="light"] .graph2-vertical-legend{
  background:rgba(255,255,255,0.96);
  border-color:rgba(0,0,0,0.12);
  box-shadow:0 12px 35px rgba(0,0,0,0.1);
  color:#3f3549;
}

.legend-vertical-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding-bottom:10px;
  border-bottom:1px solid rgba(255,255,255,0.1);
}

body[data-theme="light"] .legend-vertical-head{
  border-bottom-color:rgba(0,0,0,0.08);
}

.legend-vertical-title{
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:#fff;
  font-size:12.5px;
  font-weight:800;
}

body[data-theme="light"] .legend-vertical-title{
  color:#150921;
}

.legend-close-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  border:0;
  border-radius:50%;
  background:rgba(255,255,255,0.08);
  color:#dcd6e2;
  font-size:15px;
  line-height:1;
  cursor:pointer;
  transition:all .15s ease;
}

.legend-close-btn:hover{
  background:rgba(255,255,255,0.2);
  color:#fff;
}

body[data-theme="light"] .legend-close-btn{
  background:rgba(0,0,0,0.06);
  color:#443a4e;
}

body[data-theme="light"] .legend-close-btn:hover{
  background:rgba(0,0,0,0.12);
  color:#000;
}

.legend-vertical-section{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.legend-sec-title{
  font-size:10px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:#a59eb0;
}

body[data-theme="light"] .legend-sec-title{
  color:#6c6278;
}

.legend-items-vertical,
.legend-items{
  display:flex;
  flex-direction:column;
  gap:7px;
  width:100%;
}

.legend-item-v,
.legend-item{
  display:flex;
  align-items:flex-start;
  gap:8px;
  line-height:1.35;
  font-size:11px;
}

.legend-item-v strong,
.legend-item strong{
  color:#f4edf8;
  font-weight:700;
}

body[data-theme="light"] .legend-item-v strong,
body[data-theme="light"] .legend-item strong{
  color:#190e24;
}

.legend-item-v span,
.legend-item span{
  color:#bcb5c4;
}

body[data-theme="light"] .legend-item-v span,
body[data-theme="light"] .legend-item span{
  color:#554b5f;
}

.legend-row-flows{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding-top:10px;
  border-top:1px solid rgba(255,255,255,0.08);
  font-size:10.5px;
  color:#bcb5c6;
}

body[data-theme="light"] .legend-row-flows{
  border-top-color:rgba(0,0,0,0.08);
  color:#61556e;
}

.legend-flow-tag{
  display:inline-flex;
  align-items:center;
  gap:5px;
  white-space:nowrap;
}

.flow-preview-line{
  display:inline-block;
  width:16px;
  height:3px;
  border-radius:2px;
  position:relative;
  background:rgba(255,255,255,0.15);
  overflow:hidden;
}

body[data-theme="light"] .flow-preview-line{
  background:rgba(0,0,0,0.12);
}

.flow-preview-line::after{
  content:'';
  position:absolute;
  top:0;
  height:100%;
  width:6px;
  border-radius:2px;
}

.flow-preview-in::after{
  background:#61b8ff;
  animation:legend-preview-in 1.4s ease-in-out infinite;
}

.flow-preview-out::after{
  background:#ffb86b;
  animation:legend-preview-out 1.4s ease-in-out infinite;
}

.flow-preview-bounce::after{
  background:#7de2b8;
  animation:legend-preview-bounce 1.6s ease-in-out infinite alternate;
}

.flow-preview-fast::after{
  width:4px;
  background:#c9a4e0;
  animation:legend-preview-out 0.8s linear infinite;
}

.flow-preview-dot{
  display:inline-block;
  width:6px;
  height:6px;
  border-radius:50%;
  background:#7dc9e8;
  box-shadow:0 0 6px #7dc9e8;
  animation:legend-preview-dot 1.5s ease-in-out infinite;
}

@keyframes legend-preview-in{
  0%{transform:translateX(10px);opacity:.3}
  50%{opacity:1}
  100%{transform:translateX(-4px);opacity:.3}
}

@keyframes legend-preview-out{
  0%{transform:translateX(-4px);opacity:.3}
  50%{opacity:1}
  100%{transform:translateX(10px);opacity:.3}
}

@keyframes legend-preview-bounce{
  0%{transform:translateX(-4px)}
  100%{transform:translateX(9px)}
}

@keyframes legend-preview-dot{
  0%,100%{transform:scale(0.8);opacity:.6}
  50%{transform:scale(1.3);opacity:1}
}

.graph2-map-legend::-webkit-scrollbar,
.graph2-vertical-legend::-webkit-scrollbar{
  width:5px;
}

.graph2-map-legend::-webkit-scrollbar-thumb,
.graph2-vertical-legend::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,0.18);
  border-radius:4px;
}

.legend-header{
  display:flex;
  align-items:center;
  gap:6px;
}

.legend-title{
  display:inline-flex;
  align-items:center;
  gap:5px;
  font-size:11.5px;
  font-weight:800;
  color:#fff;
}

body[data-theme="light"] .legend-title{
  color:#100718;
}

.legend-dot{
  width:9px;
  height:9px;
  border-radius:50%;
  background:var(--c,#b5a0ff);
  flex:0 0 auto;
  box-shadow:0 0 6px var(--c,#b5a0ff);
  margin-top:2px;
}

.legend-dot.is-central{
  width:12px;
  height:12px;
  border:2px solid #fff;
  margin-top:1px;
}

body[data-theme="light"] .legend-dot.is-central{
  border-color:#100718;
}

.legend-vertical-foot,
.legend-hint{
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:auto;
  padding-top:10px;
  border-top:1px solid rgba(255,255,255,0.08);
  font-size:10px;
  font-weight:600;
  color:#bcb5c6;
  line-height:1.4;
}

body[data-theme="light"] .legend-vertical-foot,
body[data-theme="light"] .legend-hint{
  border-top-color:rgba(0,0,0,0.08);
  color:#665972;
}

/* Badges de subtipo Reúna nos nós */
.graph2-sub-pill{
  fill:rgba(18,16,25,0.92);
  stroke:var(--c,#f2a365);
  stroke-width:0.9;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.graph2-sub-text{
  font-size:8px;
  font-weight:800;
  fill:#fff;
  text-anchor:middle;
  letter-spacing:.02em;
  pointer-events:none;
}

body[data-theme="light"] .graph2-sub-pill{
  fill:rgba(255,255,255,0.95);
  stroke:var(--c,#a8551e);
  filter:drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

body[data-theme="light"] .graph2-sub-text{
  fill:#150921;
}

/* Modal e Legenda: pílulas e caixa Reúna */
.reuna-pill{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:2px 7px;
  border-radius:10px;
  font-size:10px;
  font-weight:750;
  color:#fff;
  white-space:nowrap;
  flex:0 0 auto;
}

.reuna-pill--af{background:#9e521e;border:1px solid #d97838}
.reuna-pill--ac{background:#23527c;border:1px solid #4383be}
.reuna-pill--ef{background:#593b77;border:1px solid #8e62bc}

.hab-dialog-reuna-box{
  margin:10px 0 14px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid color-mix(in srgb,var(--skill-accent,#f2a365) 30%,rgba(255,255,255,0.1));
  background:color-mix(in srgb,var(--skill-accent,#f2a365) 8%,rgba(255,255,255,0.03));
  display:flex;
  flex-direction:column;
  gap:6px;
}

.hab-dialog-reuna-head{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
}

.hab-dialog-reuna-seq{
  font-size:11px;
  color:#d7d0de;
}

.hab-dialog-reuna-unit{
  margin:0;
  font-size:11px;
  color:#c7bfcf;
  line-height:1.45;
}

.hab-dialog-reuna-rotulo{
  margin:0;
  font-size:10.5px;
  color:#b5adc0;
  font-style:italic;
  line-height:1.4;
}

body[data-theme="light"] .hab-dialog-reuna-box{
  border-color:color-mix(in srgb,var(--skill-accent,#b5581c) 30%,rgba(0,0,0,0.12));
  background:color-mix(in srgb,var(--skill-accent,#b5581c) 8%,rgba(0,0,0,0.02));
}

body[data-theme="light"] .hab-dialog-reuna-seq{color:#43394d}
body[data-theme="light"] .hab-dialog-reuna-unit{color:#493f54}
body[data-theme="light"] .hab-dialog-reuna-rotulo{color:#61566c}

/* SVG do Grafo */
.proposal-svg{
  display:block;
  width:100%;
  height:100%;
  overflow:visible;
}

/* Linhas e conexões */
.graph2-wire{
  fill:none;
  stroke:color-mix(in srgb,var(--c,#b5a0ff) 26%,#302b3a);
  stroke-width:1.5;
  transition:stroke .2s ease,stroke-width .2s ease;
}

body[data-theme="light"] .graph2-wire{
  stroke:color-mix(in srgb,var(--c,#7d3fa8) 32%,#c8c1d2);
}

.graph2-wire.is-highlighted{
  stroke:var(--c,#b5a0ff);
  stroke-width:2.8;
  filter:drop-shadow(0 0 6px var(--c,#b5a0ff));
}

/* Fluxos animados com sentido semântico das conexões */
.graph2-flow{
  fill:none;
  stroke:var(--c,#b5a0ff);
  stroke-linecap:round;
  opacity:.88;
  pointer-events:none;
}

/* Keyframes direcionais dos fluxos */
@keyframes graph2-flow-out{
  from{stroke-dashoffset:0}
  to{stroke-dashoffset:-100}
}

@keyframes graph2-flow-in{
  from{stroke-dashoffset:-100}
  to{stroke-dashoffset:0}
}

@keyframes graph2-flow-bounce{
  0%{stroke-dashoffset:0}
  50%{stroke-dashoffset:-100}
  100%{stroke-dashoffset:0}
}

/* 1. Pré-requisito (Vêm antes): percorre do pré até a habilidade central */
.graph2-flow.flow-anteriores{
  stroke-width:2.8;
  stroke-dasharray:12 88;
  filter:drop-shadow(0 0 5px var(--c,#61b8ff));
  animation:graph2-flow-in var(--dur,4.8s) linear infinite;
}

/* 2. Pós / Continuidade (Vêm depois): percorre da habilidade central até o vem depois */
.graph2-flow.flow-posteriores{
  stroke-width:2.8;
  stroke-dasharray:12 88;
  filter:drop-shadow(0 0 5px var(--c,#ffb86b));
  animation:graph2-flow-out var(--dur,4.8s) linear infinite;
}

/* 3. Interdisciplinar IA: vai e volta entre os nós */
.graph2-flow.flow-interdisciplinar{
  stroke-width:2.8;
  stroke-dasharray:12 88;
  filter:drop-shadow(0 0 5px var(--c,#7de2b8));
  animation:graph2-flow-bounce var(--dur,4.2s) ease-in-out infinite;
}

/* 4. Competências: barra menor, mas bem rápida */
.graph2-flow.flow-competencias{
  stroke-width:2.2;
  stroke-dasharray:5 95;
  filter:drop-shadow(0 0 5px var(--c,#c9a4e0));
  animation:graph2-flow-out var(--dur,1.8s) linear infinite;
}

/* 5. CIEB e Computação: bolinha percorrendo da habilidade até o CIEB ou Computação */
.graph2-flow.flow-cieb-comp{
  stroke-width:6.5;
  stroke-dasharray:0.1 99.9;
  filter:drop-shadow(0 0 7px var(--c,#7dc9e8));
  animation:graph2-flow-out var(--dur,4.5s) linear infinite;
}

/* Reúna e articulações gerais padrão */
.graph2-flow.flow-reuna,
.graph2-flow.flow-default{
  stroke-width:2.8;
  stroke-dasharray:12 88;
  filter:drop-shadow(0 0 5px var(--c,#b5a0ff));
  animation:graph2-flow-out var(--dur,5s) linear infinite;
}

body[data-theme="light"] .graph2-flow{
  filter:drop-shadow(0 0 4px var(--c,#7d3fa8));
}

body[data-theme="light"] .graph2-flow.flow-cieb-comp{
  filter:drop-shadow(0 0 5px var(--c,#0e7490));
}

/* Nós do grafo - ESTÁTICOS, sem movimentação nem pulsos de translação */
.graph2-node{
  cursor:pointer;
  outline:none;
}

.graph2-halo{
  fill:var(--c,#b5a0ff);
  opacity:.25;
  transition:opacity .2s ease, filter .2s ease;
}

.graph2-node:hover .graph2-halo,
.graph2-node:focus-visible .graph2-halo{
  opacity:.55;
  filter:drop-shadow(0 0 8px var(--c,#b5a0ff));
}

.graph2-core{
  fill:var(--c,#b5a0ff);
  stroke:#101014;
  stroke-width:1.5;
  filter:drop-shadow(0 0 6px var(--c,#b5a0ff));
  transition:filter .2s ease;
}

.graph2-node:hover .graph2-core,
.graph2-node:focus-visible .graph2-core{
  filter:drop-shadow(0 0 10px var(--c,#b5a0ff));
}

/* Cápsula do código da habilidade (apenas código) */
.graph2-badge-bg{
  fill:#17151e;
  stroke:color-mix(in srgb,var(--c,#b5a0ff) 40%,#3d3748);
  stroke-width:1;
  rx:12px;
  transition:fill .18s ease, stroke .18s ease, stroke-width .18s ease, filter .18s ease;
  filter:drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

body[data-theme="light"] .graph2-badge-bg{
  fill:#ffffff;
  stroke:color-mix(in srgb,var(--c,#7d3fa8) 45%,#d0c9d9);
  filter:drop-shadow(0 2px 6px rgba(0,0,0,0.08));
}

.graph2-node:hover .graph2-badge-bg,
.graph2-node:focus-visible .graph2-badge-bg{
  stroke:var(--c,#b5a0ff);
  stroke-width:2;
  fill:color-mix(in srgb,var(--c,#b5a0ff) 26%,#17151e);
  filter:drop-shadow(0 2px 10px color-mix(in srgb,var(--c,#b5a0ff) 40%,transparent));
}

body[data-theme="light"] .graph2-node:hover .graph2-badge-bg,
body[data-theme="light"] .graph2-node:focus-visible .graph2-badge-bg{
  stroke:var(--c,#7d3fa8);
  stroke-width:2;
  fill:color-mix(in srgb,var(--c,#7d3fa8) 18%,#ffffff);
}

.graph2-label{
  fill:#fff;
  font-family:Inter,"Segoe UI",Arial,sans-serif;
  font-size:11px;
  font-weight:800;
  text-anchor:middle;
  dominant-baseline:central;
  letter-spacing:.02em;
  pointer-events:none;
}

body[data-theme="light"] .graph2-label{
  fill:#150d1d;
}

/* Nó Central */
.graph2-node.is-central{
  cursor:pointer;
}

.graph2-node.is-central .graph2-halo{
  opacity:.35;
}

.graph2-node.is-central:hover .graph2-halo{
  opacity:.6;
  filter:drop-shadow(0 0 14px var(--c,#b5a0ff));
}

.graph2-node.is-central .graph2-badge-bg{
  fill:color-mix(in srgb,var(--c,#b5a0ff) 26%,#161320);
  stroke:var(--c,#b5a0ff);
  stroke-width:2;
  filter:drop-shadow(0 0 12px color-mix(in srgb,var(--c,#b5a0ff) 45%,transparent));
}

body[data-theme="light"] .graph2-node.is-central .graph2-badge-bg{
  fill:color-mix(in srgb,var(--c,#7d3fa8) 18%,#ffffff);
  stroke:var(--c,#7d3fa8);
}

.graph2-node.is-central .graph2-label{
  font-size:13px;
  font-weight:900;
}

/* ============================================================
   AÇÕES SUPERIORES NA PÁGINA DE DETALHES
   Harmonização entre "Voltar ao catálogo" e o atalho do Grafo
   ============================================================ */
.detail-top-nav-actions{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:18px;
}

.detail-top-nav-actions .back-button{
  padding:0;
  margin:0;
  display:inline-flex;
  align-items:center;
  height:32px;
  line-height:1;
}

/* Botão moderno de atalho para o Grafo 2.0 */
.proposal-graph-btn,
.proposal-graph-button{
  display:inline-flex;
  align-items:center;
  gap:7px;
  height:32px;
  padding:0 14px;
  border-radius:999px;
  border:1px solid color-mix(in srgb,var(--detail-accent,#b5a0ff) 45%,rgba(255,255,255,0.15));
  background:rgba(255,255,255,0.05);
  color:#f7f4fb;
  font-size:12.5px;
  font-weight:600;
  font-family:'DM Sans',Arial,sans-serif;
  cursor:pointer;
  transition:all .2s cubic-bezier(0.16,1,0.3,1);
  box-shadow:0 2px 8px rgba(0,0,0,0.25);
  text-decoration:none;
  white-space:nowrap;
}

.proposal-graph-btn:hover,
.proposal-graph-button:hover{
  border-color:var(--detail-accent,#b5a0ff);
  background:color-mix(in srgb,var(--detail-accent,#b5a0ff) 20%,rgba(255,255,255,0.08));
  color:#fff;
  box-shadow:0 4px 18px color-mix(in srgb,var(--detail-accent,#b5a0ff) 40%,transparent);
  transform:translateY(-1px);
}

.proposal-graph-btn:hover .proposal-btn-launch,
.proposal-graph-button:hover .proposal-btn-launch{
  transform:translate(1px,-1px);
}

.proposal-btn-graph-icon{
  flex:0 0 14px;
  color:var(--detail-accent,#b5a0ff);
  filter:drop-shadow(0 0 4px color-mix(in srgb,var(--detail-accent,#b5a0ff) 50%,transparent));
}

.proposal-btn-label{
  letter-spacing:.01em;
}

.proposal-btn-pill{
  display:inline-flex;
  align-items:center;
  padding:1px 6px;
  border-radius:6px;
  font-size:10px;
  font-weight:800;
  line-height:1.2;
  letter-spacing:.03em;
  background:color-mix(in srgb,var(--detail-accent,#b5a0ff) 26%,transparent);
  color:color-mix(in srgb,var(--detail-accent,#b5a0ff) 90%,#ffffff);
  border:1px solid color-mix(in srgb,var(--detail-accent,#b5a0ff) 40%,transparent);
}

.proposal-btn-launch{
  flex:0 0 11px;
  opacity:.75;
  transition:transform .18s ease;
}

body[data-theme="light"] .proposal-graph-btn,
body[data-theme="light"] .proposal-graph-button{
  border-color:color-mix(in srgb,var(--detail-accent,#7d3fa8) 35%,#d5cfdd);
  background:#ffffff;
  color:#241b2e;
  box-shadow:0 2px 6px rgba(0,0,0,0.05);
}

body[data-theme="light"] .proposal-graph-btn:hover,
body[data-theme="light"] .proposal-graph-button:hover{
  border-color:var(--detail-accent,#7d3fa8);
  background:color-mix(in srgb,var(--detail-accent,#7d3fa8) 8%,#ffffff);
  color:#0f0718;
  box-shadow:0 4px 16px color-mix(in srgb,var(--detail-accent,#7d3fa8) 25%,transparent);
}

body[data-theme="light"] .proposal-btn-graph-icon{
  color:var(--detail-accent,#7d3fa8);
  filter:none;
}

body[data-theme="light"] .proposal-btn-pill{
  background:color-mix(in srgb,var(--detail-accent,#7d3fa8) 14%,transparent);
  color:color-mix(in srgb,var(--detail-accent,#7d3fa8) 85%,#000000);
  border-color:color-mix(in srgb,var(--detail-accent,#7d3fa8) 30%,transparent);
}

/* Badge de contagem de conexões no canto inferior direito de todos os cartões */
.card-bottom-meta{
  position:absolute;
  right:9px;
  bottom:8px;
  display:flex;
  align-items:center;
  pointer-events:none;
  z-index:2;
}

.card-conn-badge{
  display:inline-flex;
  align-items:center;
  gap:3.5px;
  padding:2px 7px;
  border-radius:10px;
  font-size:10.5px;
  font-weight:700;
  line-height:1.2;
  color:color-mix(in srgb,var(--accent,#b5a0ff) 80%,#ffffff);
  background:color-mix(in srgb,var(--accent,#b5a0ff) 14%,#16131d);
  border:1px solid color-mix(in srgb,var(--accent,#b5a0ff) 32%,#3a3344);
  box-shadow:0 1px 4px rgba(0,0,0,0.35);
  letter-spacing:.02em;
  transition:all .18s ease;
}

body[data-theme="light"] .card-conn-badge{
  color:color-mix(in srgb,var(--accent,#7d3fa8) 85%,#1c1324);
  background:color-mix(in srgb,var(--accent,#7d3fa8) 12%,#ffffff);
  border-color:color-mix(in srgb,var(--accent,#7d3fa8) 32%,#d4cddc);
  box-shadow:0 1px 3px rgba(0,0,0,0.06);
}

.card-conn-icon{
  display:block;
  stroke:currentColor;
  opacity:.85;
}

.skill-card:hover .card-conn-badge,
.skill-card:focus-visible .card-conn-badge{
  border-color:var(--accent,#b5a0ff);
  background:color-mix(in srgb,var(--accent,#b5a0ff) 26%,#16131d);
  box-shadow:0 0 8px color-mix(in srgb,var(--accent,#b5a0ff) 35%,transparent);
}

body[data-theme="light"] .skill-card:hover .card-conn-badge,
body[data-theme="light"] .skill-card:focus-visible .card-conn-badge{
  border-color:var(--accent,#7d3fa8);
  background:color-mix(in srgb,var(--accent,#7d3fa8) 22%,#ffffff);
  box-shadow:0 0 8px color-mix(in srgb,var(--accent,#7d3fa8) 25%,transparent);
}

@media(max-width:860px){
  .proposal-topbar{padding:10px 14px;flex-direction:column;align-items:stretch;gap:8px}
  .graph2-map-controls-top{top:8px;padding:6px 10px;gap:6px}
  .graph2-map-legend{bottom:8px;padding:6px 12px;gap:8px;font-size:10.5px}
  .legend-hint{display:none}
}
