/* ===== camada visual "motion": vidro, brilho e movimento sobre app.css/views.css ===== */
:root {
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.9);
  --glass-line: rgba(15, 23, 32, 0.07);
  --glass-hi: rgba(255, 255, 255, 0.9);
  --glow: rgba(19, 120, 74, 0.28);
  --glow-2: rgba(122, 79, 192, 0.22);
  --mesh-1: rgba(19, 120, 74, 0.1);
  --mesh-2: rgba(122, 79, 192, 0.08);
  --lift: 0 18px 40px -18px rgba(16, 24, 40, 0.28), 0 2px 6px rgba(16, 24, 40, 0.05);
  --r-xl: 20px;
  --r-lg: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}
[data-theme="dark"] {
  --bg: #08090b;
  --surface: #121418;
  --surface-2: #1a1d22;
  --side-bg: #0c0d10;
  --border: #23262d;
  --border-strong: #31353e;
  --primary: #8fe36b;
  --primary-h: #a9ee8b;
  --on-primary: #08130a;
  --primary-soft: rgba(143, 227, 107, 0.12);
  --focus: #a9ee8b;
  --chart-1: #8fe36b;
  --chart-2: #c084fc;
  --chart-3: #f5b452;
  --chart-4: #f472b6;
  --chart-5: #fb7185;
  --chart-prev: #4a4f5a;
  --glass: rgba(20, 22, 27, 0.62);
  --glass-strong: rgba(24, 26, 32, 0.86);
  --glass-line: rgba(255, 255, 255, 0.07);
  --glass-hi: rgba(255, 255, 255, 0.06);
  --glow: rgba(143, 227, 107, 0.35);
  --glow-2: rgba(192, 132, 252, 0.3);
  --mesh-1: rgba(143, 227, 107, 0.09);
  --mesh-2: rgba(192, 132, 252, 0.1);
  --lift: 0 24px 50px -20px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* fundo com malha suave para o vidro ter o que desfocar */
body.app-body {
  background-color: var(--bg);
  background-image: radial-gradient(60vw 50vh at 8% -10%, var(--mesh-1), transparent 70%),
    radial-gradient(50vw 45vh at 100% 0%, var(--mesh-2), transparent 70%),
    radial-gradient(40vw 40vh at 60% 110%, var(--mesh-1), transparent 70%);
  background-attachment: fixed;
}

/* ----- vidro ----- */
.app-side,
.app-top,
.ui-card,
.dash-kpi,
.ui-metric,
.ui-vcard,
.app-account,
.ui-wiz-nav,
.ui-toolbar,
.ui-table-wrap {
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
}
.app-side {
  background: var(--glass);
  border-right: 1px solid var(--glass-line);
}
.app-top {
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-bottom-color: var(--glass-line);
}
.ui-card,
.dash-kpi,
.ui-metric,
.ui-vcard,
.ui-table-wrap {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-xl);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-sm);
}
.app-account {
  background: var(--glass-strong);
  border-color: var(--glass-line);
  border-radius: var(--r-lg);
}
.ui-vcard-foot {
  background: transparent;
  border-top-color: var(--glass-line);
}

/* navegação lateral: pílula iluminada no item ativo */
.app-nav a {
  position: relative;
  border-radius: 12px;
  transition: background-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.app-nav a:hover {
  background: color-mix(in srgb, var(--primary) 7%, transparent);
  transform: translateX(2px);
}
.app-nav a.is-active {
  outline: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 18%, transparent), color-mix(in srgb, var(--primary) 4%, transparent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 22%, transparent);
}
.app-nav a.is-active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--primary);
  box-shadow: 0 0 12px var(--glow);
}

/* ----- botões ----- */
.ui-btn {
  border-radius: 12px;
  transition: background-color 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.25s var(--ease), transform 0.18s var(--ease);
}
.ui-btn:active {
  transform: scale(0.97);
}
.ui-btn-primary {
  box-shadow: 0 6px 18px -8px var(--glow);
}
.ui-btn-primary:hover {
  box-shadow: 0 10px 26px -8px var(--glow), 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent);
}

/* ----- campos: fundo suave e foco iluminado ----- */
.ui-input,
.ui-select,
.ui-textarea {
  border-radius: 12px;
  border-color: transparent;
  background: color-mix(in srgb, var(--surface-2) 85%, transparent);
  box-shadow: inset 0 0 0 1px var(--glass-line);
  transition: border-color 0.2s, box-shadow 0.25s var(--ease), background-color 0.2s;
}
.ui-input:hover,
.ui-select:hover,
.ui-textarea:hover {
  background: var(--surface-2);
}
.ui-input:focus,
.ui-select:focus,
.ui-textarea:focus {
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent), 0 0 22px -4px var(--glow);
}
.ui-input.is-invalid,
.ui-select.is-invalid,
.ui-textarea.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 14%, transparent);
}

/* ----- hero com malha de gradiente em movimento ----- */
.dash-hero {
  position: relative;
  isolation: isolate;
  border-radius: var(--r-xl);
  background: #0b3424;
  box-shadow: var(--lift);
}
.dash-hero::before {
  content: "";
  position: absolute;
  inset: -40%;
  z-index: -1;
  background: radial-gradient(35% 45% at 20% 30%, #1f9d61 0%, transparent 70%),
    radial-gradient(30% 40% at 80% 20%, #2b6b8f 0%, transparent 70%),
    radial-gradient(35% 45% at 65% 85%, #6d3fa8 0%, transparent 70%),
    radial-gradient(30% 35% at 15% 85%, #13784a 0%, transparent 70%);
  filter: blur(10px);
  animation: meshflow 22s ease-in-out infinite alternate;
}
[data-theme="dark"] .dash-hero {
  background: #0d0e12;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 30px 60px -30px rgba(143, 227, 107, 0.25);
}
[data-theme="dark"] .dash-hero::before {
  background: radial-gradient(35% 45% at 18% 25%, rgba(143, 227, 107, 0.55) 0%, transparent 70%),
    radial-gradient(30% 40% at 85% 20%, rgba(192, 132, 252, 0.45) 0%, transparent 70%),
    radial-gradient(35% 45% at 60% 90%, rgba(244, 114, 182, 0.35) 0%, transparent 70%);
}
@keyframes meshflow {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(4%, -3%, 0) rotate(8deg) scale(1.08); }
  100% { transform: translate3d(-4%, 3%, 0) rotate(-6deg) scale(1.02); }
}
.dash-hero h2 {
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.02em;
}
.dash-hero-art rect.is-top {
  fill: #b8f59a;
  filter: drop-shadow(0 0 6px rgba(184, 245, 154, 0.7));
}
.dash-hero-art rect {
  animation: barrise 0.9s var(--spring) both;
  transform-box: fill-box;
  transform-origin: bottom;
}
@keyframes barrise {
  from { transform: scaleY(0); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* ----- bento: indicadores e grade ----- */
.dash-kpis,
.dash-grid {
  gap: 16px;
}
.dash-kpi,
.ui-metric {
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.2s;
}
.dash-kpi:hover,
.ui-metric:hover {
  transform: translateY(-3px);
  box-shadow: var(--lift);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--glass-line));
}
.dash-kpi-icon,
.ui-metric-ico {
  border-radius: 12px;
  box-shadow: 0 0 0 1px color-mix(in srgb, currentColor 18%, transparent), 0 0 18px -6px currentColor;
}
.dash-kpi strong {
  font-size: 32px;
  letter-spacing: -0.02em;
}
.dash-spark polyline {
  stroke: var(--chart-2);
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--chart-2) 70%, transparent));
}
.dash-mini-stats div {
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  box-shadow: inset 0 0 0 1px var(--glass-line);
}
.dash-stackbar {
  height: 12px;
  border-radius: 99px;
  gap: 3px;
}
.dash-stackbar span {
  border-radius: 99px;
}
.ui-donut-wrap circle {
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.08));
}
[data-theme="dark"] .ui-donut-wrap circle {
  filter: drop-shadow(0 0 6px color-mix(in srgb, currentColor 40%, transparent));
}
.ui-hbar-track {
  border-radius: 99px;
}
.ui-hbar-fill {
  border-radius: 99px;
  box-shadow: 0 0 14px -2px var(--glow);
  transform-origin: left;
}

/* ----- holofote que segue o cursor ----- */
.has-spot {
  position: relative;
  overflow: hidden;
}
.has-spot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--primary) 12%, transparent), transparent 65%);
  transition: opacity 0.3s;
  z-index: 1;
}
.has-spot:hover::after {
  opacity: 1;
}

/* ----- gráfico de linha com brilho ----- */
.ui-linechart {
  overflow: visible;
}
.ui-linechart .grid {
  stroke: var(--glass-line);
  stroke-dasharray: 2 4;
}
.ui-line {
  fill: none;
  stroke: var(--c);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transition: stroke-width 0.25s, filter 0.25s;
}
.ui-line-s0 {
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--c) 55%, transparent));
}
.ui-line-s1 {
  stroke-width: 1.8;
  stroke-dasharray: 4 5;
}
.ui-linechart:hover .ui-line-s0 {
  stroke-width: 3.2;
  filter: drop-shadow(0 0 9px color-mix(in srgb, var(--c) 80%, transparent));
}
.ui-line-area {
  transition: opacity 0.3s;
}
.ui-line-col rect {
  fill: transparent;
}
.ui-line-col line {
  stroke: var(--muted);
  stroke-dasharray: 3 3;
  opacity: 0;
  transition: opacity 0.15s;
}
.ui-line-col circle {
  fill: var(--surface);
  stroke: var(--c);
  stroke-width: 2.5;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0.4);
  transition: opacity 0.15s, transform 0.25s var(--spring);
}
.ui-line-col .ui-line-pt0 {
  fill: var(--c);
  filter: drop-shadow(0 0 6px var(--c));
}
.ui-line-col:hover line,
.ui-line-col:focus-visible line,
.ui-line-col:hover circle,
.ui-line-col:focus-visible circle {
  opacity: 1;
  transform: none;
}
.ui-line-col:focus-visible {
  outline: none;
}

/* ----- cards de vaga e empresa: flutuam e mostram ações ao passar o mouse ----- */
.ui-vcard {
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.2s;
}
.ui-vcard:hover,
.ui-vcard:focus-within {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--lift);
  border-color: color-mix(in srgb, var(--primary) 26%, var(--glass-line));
}
.ui-vcard-media img,
.ui-ccard-media img {
  transition: transform 0.6s var(--ease);
}
.ui-vcard:hover .ui-vcard-media img,
.ui-vcard:hover .ui-ccard-media img {
  transform: scale(1.05);
}
.ui-vtag {
  border-radius: 99px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  box-shadow: inset 0 0 0 1px var(--glass-line);
}
.ui-ccard-logo .ui-logo,
.ui-vcard-emp .ui-logo {
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.35), 0 0 0 3px var(--surface);
}
@media (hover: hover) and (pointer: fine) {
  .ui-vcard-foot:not(.is-pinned) {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s var(--ease), transform 0.3s var(--ease);
  }
  .ui-vcard:hover .ui-vcard-foot,
  .ui-vcard:focus-within .ui-vcard-foot {
    opacity: 1;
    transform: none;
  }
}

/* ----- etapas: conectores que acendem e troca deslizante ----- */
.ui-stepper {
  position: relative;
  gap: 0;
}
.ui-stepper li {
  position: relative;
}
.ui-stepper li + li::before {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(100% - 14px);
  width: 28px;
  height: 2px;
  margin-top: -1px;
  background: var(--border-strong);
  z-index: 0;
  transition: background-color 0.4s, box-shadow 0.4s;
}
.ui-stepper li.is-done + li::before,
.ui-stepper li.is-done + li.is-current::before {
  background: var(--primary);
  box-shadow: 0 0 10px var(--glow);
}
.ui-stepper button {
  position: relative;
  z-index: 1;
  margin: 0 7px;
  width: calc(100% - 14px);
  border-radius: 14px;
  border-color: var(--glass-line);
  background: var(--glass);
  transition: border-color 0.3s, background-color 0.3s, box-shadow 0.3s, color 0.3s;
}
.ui-stepper .is-current button {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent), 0 0 24px -8px var(--glow);
}
.ui-stepper .n {
  transition: background-color 0.3s, color 0.3s, box-shadow 0.3s, transform 0.4s var(--spring);
}
.ui-stepper .is-current .n {
  transform: scale(1.12);
  box-shadow: 0 0 14px var(--glow);
}
.ui-stepper .is-done .n {
  box-shadow: 0 0 10px var(--glow);
}
.ui-progress {
  border-radius: 99px;
  overflow: hidden;
}
.ui-progress i {
  border-radius: 99px;
  box-shadow: 0 0 12px var(--glow);
  transition: width 0.5s var(--ease);
}
.ui-wiz-on .ui-step {
  animation: none;
}
.ui-wiz-on .ui-step.is-in-next {
  animation: stepnext 0.42s var(--ease) both;
}
.ui-wiz-on .ui-step.is-in-prev {
  animation: stepprev 0.42s var(--ease) both;
}
@keyframes stepnext {
  from { opacity: 0; transform: translateX(48px); }
  to { opacity: 1; transform: none; }
}
@keyframes stepprev {
  from { opacity: 0; transform: translateX(-48px); }
  to { opacity: 1; transform: none; }
}
.ui-wiz-on .ui-step {
  overflow: hidden;
}
@media (min-width: 900px) {
  .ui-wiz-on .ui-step .ui-grid-2,
  .ui-wiz-on .ui-step .ui-row-2 {
    gap: 16px 20px;
  }
}

/* ----- central de relatórios ----- */
.dl-center {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.dl-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.2s;
}
.dl-card:hover,
.dl-card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--lift);
  border-color: color-mix(in srgb, var(--primary) 26%, var(--glass-line));
}
.dl-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dl-ico {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: var(--tone, var(--primary));
  background: color-mix(in srgb, var(--tone, var(--primary)) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone, var(--primary)) 30%, transparent), 0 0 26px -8px var(--tone, var(--primary));
  transition: transform 0.5s var(--spring), box-shadow 0.3s;
}
.dl-card:hover .dl-ico {
  transform: rotate(-6deg) scale(1.08);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone, var(--primary)) 45%, transparent), 0 0 34px -6px var(--tone, var(--primary));
}
.dl-card h2 {
  margin: 0;
  font-size: 17px;
}
.dl-count {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.dl-count small {
  margin-left: 6px;
  font: 500 13px var(--font-body);
  color: var(--muted);
  letter-spacing: 0;
}
.dl-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.dl-opts {
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  box-shadow: inset 0 0 0 1px var(--glass-line);
}
.dl-opts summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.dl-opts summary::-webkit-details-marker {
  display: none;
}
.dl-opts summary .vg-ico {
  transition: transform 0.3s var(--ease);
}
.dl-opts[open] summary .vg-ico {
  transform: rotate(90deg);
}
.dl-opts-body {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px;
}
.dl-opts-body label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.dl-opts[open] .dl-opts-body {
  animation: dlopen 0.35s var(--ease);
}
@keyframes dlopen {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
.dl-btn {
  position: relative;
  margin-top: auto;
  overflow: hidden;
}
.dl-btn > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dl-btn .dl-busy,
.dl-btn .dl-fin,
.dl-btn.is-loading .dl-idle,
.dl-btn.is-done .dl-idle {
  display: none;
}
.dl-btn.is-loading .dl-busy,
.dl-btn.is-done .dl-fin {
  display: inline-flex;
}
.dl-btn.is-loading {
  pointer-events: none;
}
.dl-spin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
.dl-fin .vg-ico {
  animation: popin 0.45s var(--spring);
}
.dl-btn.is-done {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent), 0 10px 26px -8px var(--glow);
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes popin {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.dl-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
}
@media (max-width: 980px) {
  .dl-center {
    grid-template-columns: 1fr;
  }
}

/* ----- entrada escalonada (só com JS ativo; sem JS tudo aparece) ----- */
.motion-on [data-reveal]:not(.is-in) {
  opacity: 0;
  transform: translateY(22px) scale(0.985);
}
.motion-on [data-reveal].is-in {
  transition: opacity 0.6s var(--ease) var(--d, 0ms), transform 0.7s var(--ease) var(--d, 0ms);
}
.motion-on [data-reveal].is-in.ui-vcard,
.motion-on [data-reveal].is-in.dash-kpi,
.motion-on [data-reveal].is-in.ui-metric,
.motion-on [data-reveal].is-in.dl-card {
  transition: opacity 0.6s var(--ease) var(--d, 0ms), transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.2s;
}
.motion-on .ui-line-s0 {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.motion-on .ui-line-s1 {
  opacity: 0;
}
.motion-on .ui-line-area {
  opacity: 0;
}
.motion-on .is-drawn .ui-line-s0 {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.4s var(--ease) 0.15s, stroke-width 0.25s, filter 0.25s;
}
.motion-on .is-drawn .ui-line-s1 {
  opacity: 1;
  transition: opacity 0.8s 0.9s;
}
.motion-on .is-drawn .ui-line-area {
  opacity: 1;
  transition: opacity 0.9s 0.7s;
}
.motion-on .ui-hbar-fill {
  transform: scaleX(0);
}
.motion-on .is-drawn .ui-hbar-fill {
  transform: none;
  transition: transform 1s var(--ease) calc(var(--i, 0) * 60ms + 150ms);
}

@media (max-width: 640px) {
  .ui-stepper button {
    margin: 0 2px;
    width: calc(100% - 4px);
    padding: 4px;
    gap: 6px;
  }
  .ui-stepper .n {
    width: 22px;
    height: 22px;
    font-size: 11.5px;
  }
  .ui-stepper li + li::before {
    display: none;
  }
  .ui-stepper .is-current {
    min-width: 0;
  }
}
@media (max-width: 760px) {
  .ui-vcard:hover,
  .ui-vcard:focus-within {
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dash-hero::before,
  .dash-hero-art rect,
  .ui-wiz-on .ui-step.is-in-next,
  .ui-wiz-on .ui-step.is-in-prev {
    animation: none;
  }
  .motion-on [data-reveal]:not(.is-in) {
    opacity: 1;
    transform: none;
  }
  .motion-on .ui-line,
  .motion-on .ui-line-area,
  .motion-on .ui-hbar-fill {
    stroke-dashoffset: 0;
    opacity: 1;
    transform: none;
  }
  .ui-vcard:hover,
  .ui-vcard:focus-within,
  .dash-kpi:hover,
  .ui-metric:hover,
  .dl-card:hover {
    transform: none;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}
