/* Mantém o aviso de privacidade dentro do fluxo da jornada.
   Antes ele era absoluto e cobria as últimas etapas em telas mais baixas. */
.journey-card {
  display: flex;
  flex-direction: column;
}

.journey-card > * {
  position: relative;
  z-index: 1;
}

.journey-card .steps {
  flex: 0 0 auto;
  margin-bottom: 24px;
}

.journey-card .privacy-note {
  position: static;
  inset: auto;
  width: 100%;
  box-sizing: border-box;
  flex: 0 0 auto;
  margin-top: auto;
  line-height: 1.45;
}

/* Indicadores do painel: ícones vetoriais e identidade por categoria. */
.kpi {
  position: relative;
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.kpi::after {
  content: '';
  position: absolute;
  width: 82px;
  height: 82px;
  right: -34px;
  top: -38px;
  border-radius: 50%;
  background: var(--kpi-glow, rgba(13, 181, 166, .08));
  pointer-events: none;
}

.kpi:hover {
  transform: translateY(-3px);
  border-color: var(--kpi-border, rgba(13, 181, 166, .32));
  box-shadow: 0 15px 34px rgba(0, 57, 51, .10);
}

.kpi .kpi-icon {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .52), 0 8px 18px rgba(0, 57, 51, .08);
  transition: transform .22s ease;
}

.kpi:hover .kpi-icon {
  transform: scale(1.07) rotate(-2deg);
}

.kpi-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kpi.total {
  --kpi-glow: rgba(13, 181, 166, .12);
  --kpi-border: rgba(13, 181, 166, .42);
}
.kpi.total .kpi-icon {
  color: #007d72;
  background: linear-gradient(145deg, #e3faf5, #c6f2e8);
}

.kpi.new {
  --kpi-glow: rgba(40, 123, 255, .12);
  --kpi-border: rgba(40, 123, 255, .36);
}
.kpi.new .kpi-icon {
  color: #1667d9;
  background: linear-gradient(145deg, #edf5ff, #d8e9ff);
}

.kpi.evaluation {
  --kpi-glow: rgba(255, 168, 0, .14);
  --kpi-border: rgba(222, 139, 0, .40);
}
.kpi.evaluation .kpi-icon {
  color: #b66b00;
  background: linear-gradient(145deg, #fff7e5, #ffe8b9);
}

.kpi.approved {
  --kpi-glow: rgba(134, 205, 24, .14);
  --kpi-border: rgba(112, 176, 9, .42);
}
.kpi.approved .kpi-icon {
  color: #477b00;
  background: linear-gradient(145deg, #f2fbdc, #def3a9);
}

html[data-theme='dark'] .kpi .kpi-icon {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 10px 22px rgba(0, 0, 0, .22);
}
html[data-theme='dark'] .kpi.total .kpi-icon { color: #74e2d5; background: linear-gradient(145deg, #124d47, #0a3b36); }
html[data-theme='dark'] .kpi.new .kpi-icon { color: #91bcff; background: linear-gradient(145deg, #173e72, #102f56); }
html[data-theme='dark'] .kpi.evaluation .kpi-icon { color: #ffd27a; background: linear-gradient(145deg, #614716, #47330e); }
html[data-theme='dark'] .kpi.approved .kpi-icon { color: #c8ef73; background: linear-gradient(145deg, #385715, #293f10); }

.kpi > div {
  min-width: 0;
}

.kpi small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.dashboard-insights {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(310px, .85fr);
  gap: 18px;
  margin-bottom: 20px;
}

.insight-card {
  min-height: 310px;
  padding: 22px;
}

.insight-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.insight-head h2 {
  margin: 3px 0 0;
  font-size: 20px;
}

.live-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  padding: 0 11px;
  border-radius: 99px;
  background: var(--mint);
  color: var(--brand-2);
  font-size: 11px;
  font-weight: 800;
}

.live-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1fbd7b;
  box-shadow: 0 0 0 4px rgba(31, 189, 123, .12);
}

.live-pill.changed {
  background: #dcf8ed;
  color: #007a5c;
  animation: liveSyncPulse .75s ease;
}

.live-pill.changed i {
  animation: liveDotPulse .75s ease;
}

@keyframes liveSyncPulse {
  0% { transform: scale(.97); box-shadow: 0 0 0 0 rgba(31, 189, 123, .28); }
  60% { transform: scale(1.02); box-shadow: 0 0 0 9px rgba(31, 189, 123, 0); }
  100% { transform: scale(1); }
}

@keyframes liveDotPulse {
  50% { transform: scale(1.55); }
}

.recent-list {
  display: grid;
}

.recent-item {
  width: 100%;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto 22px;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

.recent-item:last-child {
  border-bottom: 0;
}

.recent-item:hover {
  background: var(--soft);
  transform: translateX(3px);
}

.recent-avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--brand-2), var(--teal));
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.recent-person {
  min-width: 0;
}

.recent-person b,
.recent-person small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-person b {
  font-size: 14px;
}

.recent-person small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.recent-arrow {
  color: var(--brand-2);
  font-size: 22px;
}

.funnel-list {
  display: grid;
  gap: 14px;
  padding-top: 18px;
}

.funnel-row {
  display: grid;
  gap: 7px;
}

.funnel-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.funnel-meta b {
  color: var(--text);
  font-size: 14px;
}

.funnel-track {
  height: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--soft);
}

.funnel-fill {
  display: block;
  width: var(--funnel-width, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00a895, #a8ee31);
  box-shadow: 0 0 14px rgba(13, 181, 166, .23);
  transition: width .65s cubic-bezier(.2, .8, .2, 1);
}

.funnel-fill.entrevista { background: linear-gradient(90deg, #1b8cff, #62c5ff); }
.funnel-fill.teste { background: linear-gradient(90deg, #7356e8, #a88cff); }
.funnel-fill.aprovado { background: linear-gradient(90deg, #45a90b, #b7f333); }

.funnel-summary {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 2px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--mint);
  color: var(--brand-2);
}

.funnel-summary strong {
  font-size: 21px;
}

.funnel-summary span {
  font-size: 11px;
  line-height: 1.35;
}

.insight-loading,
.insight-empty {
  padding: 58px 20px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

html[data-theme='dark'] .funnel-summary,
html[data-theme='dark'] .live-pill {
  background: rgba(13, 181, 166, .12);
}

.employment-card {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, var(--paper), var(--soft));
}

.employment-head,
.employment-head > div,
.current-job {
  display: flex;
  align-items: center;
}

.employment-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.employment-head > div {
  gap: 10px;
}

.employment-head h4 {
  margin: 0;
  font-size: 16px;
}

.employment-index {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--mint);
  color: var(--brand-2);
  font-size: 11px;
  font-weight: 900;
}

.current-job {
  gap: 8px;
  color: var(--brand-2);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.current-job input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  accent-color: var(--teal);
}

.employment-fields {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(150px, 1fr) minmax(150px, 1fr);
  gap: 12px;
}

.employment-fields input:disabled {
  opacity: .58;
  cursor: not-allowed;
  background: var(--line);
}

html[data-theme='dark'] .employment-card {
  background: linear-gradient(145deg, var(--paper), rgba(13, 181, 166, .04));
}

@media (prefers-reduced-motion: reduce) {
  .kpi,
  .kpi .kpi-icon,
  .recent-item,
  .funnel-fill {
    transition: none;
  }
}

@media (min-width: 801px) and (max-width: 1100px) {
  .journey-card .privacy-note {
    padding: 13px;
    font-size: 11px;
  }
}

@media (max-width: 800px) {
  .employment-fields {
    grid-template-columns: 1fr 1fr;
  }

  .employment-fields .company-name {
    grid-column: 1 / -1;
  }

  .dashboard-insights {
    grid-template-columns: 1fr;
  }

  .insight-card {
    min-height: 0;
    padding: 17px;
  }

  .journey-card h1 {
    max-width: 195px;
  }

  .progress-ring {
    width: 78px;
    height: 78px;
    margin: 0;
    right: 20px;
    top: 14px;
  }

  .progress-ring strong {
    font-size: 20px;
  }

  .steps {
    margin-top: 30px;
    margin-bottom: 0;
  }
}

@media (max-width: 480px) {
  .employment-card {
    padding: 15px;
  }

  .employment-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .employment-fields {
    grid-template-columns: 1fr;
  }

  .employment-fields .company-name {
    grid-column: auto;
  }

  .recent-item {
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    padding-inline: 2px;
  }

  .recent-item .status {
    display: none;
  }

  .insight-head {
    align-items: center;
  }

  .live-pill {
    padding-inline: 9px;
    font-size: 10px;
  }

  .elo-lockup img {
    width: 70px;
  }

  .done-screen {
    padding: 18px 0 10px;
  }

  .done-screen h2 {
    font-size: 27px;
    line-height: 1.12;
  }

  .protocol-box {
    box-sizing: border-box;
    width: 100%;
    margin-top: 20px;
    padding: 17px 13px;
  }

  .protocol-box strong {
    font-size: 19px;
    overflow-wrap: anywhere;
  }

  .protocol-copy {
    width: 100%;
    justify-content: center;
  }

  .done-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .done-actions .btn {
    width: 100%;
  }
}
