/* css/modules/progresso.css */
/* v1.8.0 - Adiciona estilos para diagnóstico */
/* v1.7 - Aumenta min-height do gráfico Disc x Desemp. */

/* Estilos gerais para o módulo Progresso */
#module-progresso {
  /* Sem padding geral, os widgets internos já têm */
}

/* === ESTILOS PARA KPIs === */
.kpi-card-row {
  gap: 1rem;
}
@media (min-width: 1024px) {
  .kpi-card-row {
    grid-template-columns: repeat(5, 1fr);
  }
}
.kpi-card .widget-body {
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
}
.kpi-card-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(108, 117, 125, 0.15);
  color: var(--text-secondary);
}
.kpi-card-icon span[data-lucide] {
  width: 1.5em;
  height: 1.5em;
  margin: 0 !important;
}
/* Cores dos Ícones KPIs */
.kpi-card-icon.bg-blue-500\/20 {
  background-color: rgba(59, 130, 246, 0.2);
}
.kpi-card-icon.text-blue-400 {
  color: #60a5fa;
}
.kpi-card-icon.bg-green-500\/20 {
  background-color: rgba(6, 182, 212, 0.2);
}
.kpi-card-icon.text-green-400 {
  color: #06b6d4;
  filter: drop-shadow(0 0 6px rgba(6, 182, 212, 0.4));
}
.kpi-card-icon.bg-purple-500\/20 {
  background-color: rgba(168, 85, 247, 0.2);
}
.kpi-card-icon.text-purple-400 {
  color: #c084fc;
}
.kpi-card-icon.bg-yellow-500\/20 {
  background-color: rgba(234, 179, 8, 0.2);
}
.kpi-card-icon.text-yellow-400 {
  color: #facc15;
}
.kpi-card-icon.bg-red-500\/20 {
  background-color: rgba(239, 68, 68, 0.2);
}
.kpi-card-icon.text-red-400 {
  color: #f87171;
}
.kpi-card-icon.bg-gray-500\/20 {
  background-color: rgba(107, 114, 128, 0.2);
}
.kpi-card-icon.text-gray-400 {
  color: #9ca3af;
}

.kpi-card-title {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.1rem;
  font-weight: 500;
}
.kpi-card-value {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.3;
  text-shadow: 0 0 18px rgba(59, 130, 246, 0.12);
  /* color: var(--text-primary); <-- REMOVIDO v1.8 para cor dinâmica */
}
.kpi-card-secondary {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
  line-height: 1.3;
  display: block;
}
/* Cores para mudança percentual KPI Tempo */
.kpi-card-secondary .positive-change {
  color: var(--result-correct-text);
  font-weight: 500;
}
.kpi-card-secondary .negative-change {
  color: var(--result-incorrect-text);
  font-weight: 500;
}
.kpi-card-secondary .stable-change {
  color: var(--text-secondary);
}
/* === FIM ESTILOS KPIs === */

.pg-hero-grid,
.pg-ops-grid,
.pg-detail-grid {
  display: grid;
  gap: 1.25rem;
}
.pg-hero-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr);
}
.pg-ops-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.95fr);
  align-items: start;
}
.pg-ops-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.pg-detail-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
.pg-panel--list {
  grid-column: span 4;
}
.pg-panel--table {
  grid-column: span 8;
}
.pg-panel--efficiency {
  grid-column: span 7;
}
.pg-panel--diagnostic {
  grid-column: span 5;
}
.pg-chart-stage {
  position: relative;
  min-height: 280px;
  width: 100%;
  max-width: 100%;
  padding: 0.85rem;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.6)),
    radial-gradient(circle at top, rgba(59, 130, 246, 0.08), transparent 55%);
  border: 1px solid rgba(71, 85, 105, 0.42);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 12px 30px rgba(2, 6, 23, 0.25);
}
.pg-chart-stage--hero {
  min-height: 360px;
}
.pg-chart-stage--forecast {
  min-height: 340px;
}
.pg-chart-stage--compact {
  min-height: 240px;
}
.pg-chart-stage--detail {
  min-height: 340px;
}
.pg-chart-stage canvas,
#pg-burndown-chart-wrapper canvas,
#pg-tendencia-container canvas,
#pg-semanal-container canvas,
#pg-desempenho-disciplina-chart-container canvas,
#pg-perf-vs-time-container canvas {
  position: absolute;
  inset: 0.85rem;
  width: calc(100% - 1.7rem) !important;
  height: calc(100% - 1.7rem) !important;
  max-width: calc(100% - 1.7rem);
  max-height: calc(100% - 1.7rem);
  display: block;
}
.pg-forecast-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.95fr);
  gap: 1.25rem;
  align-items: stretch;
}
.pg-forecast-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
.pg-mini-panel {
  min-width: 0;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(71, 85, 105, 0.42);
  background: rgba(15, 23, 42, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.pg-mini-panel--accent {
  background:
    linear-gradient(160deg, rgba(30, 64, 175, 0.22), rgba(15, 23, 42, 0.84)),
    rgba(15, 23, 42, 0.65);
  border-color: rgba(96, 165, 250, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 18px rgba(59, 130, 246, 0.12);
}
.pg-status-pulse {
  min-height: 220px;
  display: flex;
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(59, 130, 246, 0.14), transparent 45%),
    rgba(15, 23, 42, 0.48);
  overflow: hidden;
}

.pg-avanco-shell {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
  gap: 1rem;
  align-items: center;
}

.pg-avanco-copy {
  display: grid;
  gap: 0.85rem;
  text-align: left;
}

.pg-avanco-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #67e8f9;
}

.pg-avanco-headline {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.pg-avanco-icon-wrap {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(71, 85, 105, 0.34);
  color: #cbd5e1;
  flex-shrink: 0;
}

.pg-avanco-icon-wrap span[data-lucide] {
  width: 1.2rem;
  height: 1.2rem;
}

.pg-avanco-status {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
  color: #f8fafc;
}

.pg-avanco-summary {
  margin: 0.32rem 0 0;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #cbd5e1;
}

.pg-avanco-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.pg-avanco-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.34rem 0.78rem;
  border-radius: 999px;
  border: 1px solid rgba(71, 85, 105, 0.34);
  background: rgba(15, 23, 42, 0.66);
  color: #dbeafe;
  font-size: 0.74rem;
  font-weight: 600;
  gap: 0.3rem;
}

.pg-avanco-chip strong {
  color: #f8fafc;
}

.pg-avanco-chip--delta {
  border-color: rgba(34, 211, 238, 0.24);
  color: #67e8f9;
}

.pg-avanco-pulse {
  position: relative;
  min-height: 128px;
  padding: 0.9rem 0.7rem 0.4rem;
  border-radius: 18px;
  border: 1px solid rgba(71, 85, 105, 0.3);
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.12), transparent 46%),
    rgba(15, 23, 42, 0.58);
}

.pg-avanco-trend-badge {
  position: absolute;
  top: 0.7rem;
  right: 0.85rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 1.85rem;
  padding: 0.3rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(71, 85, 105, 0.34);
  background: rgba(15, 23, 42, 0.74);
  color: #cbd5e1;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.pg-avanco-trend-badge__dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  animation: pg-pulse-cyan 1.8s infinite;
}

.pg-avanco-pulse-svg {
  width: 100%;
  height: 112px;
  overflow: visible;
}

.pg-avanco-pulse-area {
  fill: url(#pg-avanco-area);
  opacity: 0.85;
}

.pg-avanco-pulse-line {
  fill: none;
  stroke: url(#pg-avanco-line);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
  animation: pg-draw-line 1s ease forwards;
}

.pg-avanco-pulse-dot {
  fill: #67e8f9;
  filter: drop-shadow(0 0 10px rgba(103, 232, 249, 0.52));
  animation: pg-pulse-cyan 1.8s infinite;
}

.pg-avanco-caption {
  margin-top: 0.1rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94a3b8;
  text-align: right;
}

.pg-status-pulse.is-up .pg-avanco-icon-wrap,
.pg-status-pulse.is-up .pg-avanco-chip--delta,
.pg-status-pulse.is-up .pg-avanco-trend-badge {
  border-color: rgba(52, 211, 153, 0.28);
  color: #86efac;
}

.pg-status-pulse.is-down .pg-avanco-icon-wrap,
.pg-status-pulse.is-down .pg-avanco-chip--delta,
.pg-status-pulse.is-down .pg-avanco-trend-badge {
  border-color: rgba(248, 113, 113, 0.28);
  color: #fda4af;
}

.pg-status-pulse.is-neutral .pg-avanco-icon-wrap,
.pg-status-pulse.is-neutral .pg-avanco-chip--delta,
.pg-status-pulse.is-neutral .pg-avanco-trend-badge {
  color: #cbd5e1;
}

.pg-chart-stage canvas,
#pg-semanal-container canvas,
#pg-tendencia-container canvas {
  transition: transform 0.35s ease, filter 0.35s ease, opacity 0.35s ease;
  animation: pg-fade-rise 0.55s ease both;
}

.widget-card.pg-panel:hover .pg-chart-stage canvas,
.widget-card.pg-panel:hover #pg-semanal-container canvas,
.widget-card.pg-panel:hover #pg-tendencia-container canvas {
  transform: translateY(-1px) scale(1.005);
  filter: saturate(1.05);
}

.kpi-card-value {
  transition: transform 0.25s ease, text-shadow 0.25s ease;
}

.pg-kpi-card:hover .kpi-card-value {
  transform: translateY(-1px);
  text-shadow: 0 0 22px rgba(96, 165, 250, 0.18);
}
}
.pg-scroll-panel {
  max-height: 32rem;
  overflow: auto;
  padding-right: 0.35rem;
}
.pg-table-shell {
  padding: 0 !important;
}
.pg-table-scroll {
  max-height: 32rem;
  overflow: auto;
}
.pg-streak-shell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.9rem;
  justify-content: flex-start;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.48);
  border: 1px solid rgba(71, 85, 105, 0.35);
}
.pg-widget-note {
  font-size: 0.78rem;
  color: #94a3b8;
  text-align: left !important;
  background: rgba(15, 23, 42, 0.38) !important;
  border-top: 1px solid rgba(71, 85, 105, 0.35);
  padding: 0.85rem 1rem !important;
}

.pg-widget-note--efficiency {
  display: grid;
  gap: 0.28rem;
}

.pg-widget-note--efficiency strong {
  font-size: 0.82rem;
  color: #e2e8f0;
  font-weight: 700;
}

.pg-widget-note--efficiency span {
  font-size: 0.76rem;
  line-height: 1.55;
  color: #94a3b8;
}

.pg-efficiency-legend,
.pg-efficiency-list {
  display: grid;
  gap: 0.6rem;
}

.pg-efficiency-legend {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 0.9rem;
}

.pg-efficiency-list {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 0.85rem;
}

.pg-efficiency-legend-item,
.pg-efficiency-list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.72rem 0.82rem;
  border-radius: 14px;
  border: 1px solid rgba(71, 85, 105, 0.32);
  background: rgba(15, 23, 42, 0.48);
}

.pg-efficiency-list-item.is-highlight {
  border-color: rgba(56, 189, 248, 0.28);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.1);
}

.pg-efficiency-swatch {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999px;
  flex-shrink: 0;
  margin-top: 0.2rem;
  background: var(--eff-color, #94a3b8);
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.12);
  border: 1px solid var(--eff-border, rgba(255,255,255,0.2));
}

.pg-efficiency-legend-item strong,
.pg-efficiency-list-copy strong {
  display: block;
  font-size: 0.78rem;
  color: #e2e8f0;
  font-weight: 700;
}

.pg-efficiency-legend-item span,
.pg-efficiency-list-copy span {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.72rem;
  line-height: 1.5;
  color: #94a3b8;
}
.pg-chart-skeleton,
.pg-empty-visual {
  position: absolute;
  inset: 0.85rem;
  border-radius: 14px;
}
.pg-chart-skeleton {
  display: grid;
  align-content: center;
  gap: 0.85rem;
  padding: 1.2rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.62));
  border: 1px solid rgba(71, 85, 105, 0.32);
}
.pg-skeleton-bar,
.pg-skeleton-ring,
.pg-skeleton-line {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.68);
}
.pg-skeleton-bar::after,
.pg-skeleton-ring::after,
.pg-skeleton-line::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.32), transparent);
  animation: pg-skeleton-move 1.5s infinite;
}
.pg-skeleton-bar {
  height: 0.75rem;
}
.pg-skeleton-bar--lg {
  height: 1rem;
  width: 68%;
}
.pg-skeleton-line {
  height: 9rem;
  border-radius: 18px;
}
.pg-skeleton-ring {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  justify-self: end;
}
.pg-empty-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  background:
    radial-gradient(circle at top, rgba(6, 182, 212, 0.14), transparent 44%),
    rgba(15, 23, 42, 0.78);
  border: 1px dashed rgba(96, 165, 250, 0.35);
}
.pg-empty-visual-icon {
  width: 3.2rem;
  height: 3.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(30, 64, 175, 0.18);
  color: #60a5fa;
  box-shadow:
    0 0 24px rgba(59, 130, 246, 0.16),
    inset 0 0 0 1px rgba(96, 165, 250, 0.18);
}
.pg-empty-visual-icon span[data-lucide] {
  width: 1.4rem;
  height: 1.4rem;
}
.pg-empty-visual-title {
  font-size: 1rem;
  font-weight: 700;
  color: #e2e8f0;
}
.pg-empty-visual-text {
  max-width: 26rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #94a3b8;
}
@keyframes pg-panel-fade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes pg-skeleton-move {
  100% {
    transform: translateX(100%);
  }
}

/* --- Widget Progresso Geral (Barra) --- */
#pg-geral-container .progress-track {
  background-color: var(--input-bg);
  border-radius: 0.5rem;
  height: 1.1rem;
  overflow: hidden;
  border: 1px solid var(--input-border);
}
#pg-geral-container .progress-fill {
  height: 100%;
  border-radius: 0.5rem;
  transition: width 0.5s ease-out;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#pg-geral-container .progress-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  font-weight: 600;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}
#pg-geral-container .progress-fill[data-progress-level="low"] {
  background-color: #ef4444;
}
#pg-geral-container .progress-fill[data-progress-level="medium"] {
  background-color: #f97316;
}
#pg-geral-container .progress-fill[data-progress-level="high"] {
  background-color: #22c55e;
}
#pg-geral-tempo {
  font-size: 0.8rem;
}

/* --- Widget Gráfico de Tendência --- */
#pg-tendencia-container {
  min-height: 250px;
  position: relative;
}
#pg-tendencia-container canvas {
  position: absolute;
  inset: 0.85rem;
  width: calc(100% - 1.7rem) !important;
  height: calc(100% - 1.7rem) !important;
}

/* --- Widget Gráfico de Barras Semanal --- */
#pg-semanal-container {
  min-height: 250px;
  position: relative;
  overflow: hidden;
}
#pg-semanal-container::before {
  content: "";
  position: absolute;
  inset: 0.4rem 0.8rem auto;
  height: 58%;
  pointer-events: none;
  border-radius: 999px;
  background: radial-gradient(circle at top, rgba(52, 211, 153, 0.12), transparent 68%);
  filter: blur(16px);
}
#pg-semanal-container canvas {
  position: absolute;
  inset: 0.85rem;
  width: calc(100% - 1.7rem) !important;
  height: calc(100% - 1.7rem) !important;
  z-index: 1;
}

/* --- Widget Progresso por Disciplina --- */
#pg-disciplina-progresso-container .progress-item {
  margin-bottom: 0.85rem;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(71, 85, 105, 0.28);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.52));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
#pg-disciplina-progresso-container .progress-item:last-child {
  margin-bottom: 0;
}
#pg-disciplina-progresso-container .pg-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}
#pg-disciplina-progresso-container .progress-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
  display: block;
}
#pg-disciplina-progresso-container .progress-label strong {
  color: var(--text-primary);
}
#pg-disciplina-progresso-container .progress-label .float-right {
  color: var(--text-primary);
}
#pg-disciplina-progresso-container .progress-track {
  background-color: rgba(30, 41, 59, 0.82);
  border-radius: 999px;
  height: 0.7rem;
  overflow: hidden;
  border: 1px solid rgba(71, 85, 105, 0.34);
  transition: border-color 0.2s ease;
}
#pg-disciplina-progresso-container .progress-track:hover {
  border-color: rgba(96, 165, 250, 0.45);
}
#pg-disciplina-progresso-container .progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.92), rgba(34, 197, 94, 0.92));
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.2);
}
#pg-disciplina-progresso-container .progress-fill[data-progress-level="low"] {
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.95), rgba(249, 115, 22, 0.95));
  box-shadow: 0 0 18px rgba(248, 113, 113, 0.24);
}
#pg-disciplina-progresso-container
  .progress-fill[data-progress-level="medium"] {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.95), rgba(249, 115, 22, 0.95));
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.24);
}
#pg-disciplina-progresso-container .progress-fill[data-progress-level="high"] {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.95), rgba(34, 197, 94, 0.95));
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.24);
}

/* --- Tabela Combinada --- */
#pg-tabela-combinada,
#ac-performance-matrix-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
.pg-col-disciplina {
  width: 40%;
}
.pg-col-progresso {
  width: 10%;
}
.pg-col-prog-perc {
  width: 13%;
}
.pg-col-tempo {
  width: 9%;
}
.pg-col-exprop {
  width: 7%;
}
.pg-col-acertos {
  width: 10%;
}
.pg-col-desemp {
  width: 11%;
}
#pg-tabela-combinada thead th,
#ac-performance-matrix-table thead th {
  background-color: var(--input-bg);
  padding: 0.75rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  text-transform: uppercase;
  border-bottom: 1px solid var(--card-border);
  border-top: 1px solid var(--card-border);
}
#pg-tabela-combinada tbody td,
#ac-performance-matrix-table tbody td {
  padding: 0.6rem 0.5rem;
  vertical-align: middle;
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
#pg-tabela-combinada tbody tr:hover,
#ac-performance-matrix-table tbody tr:hover {
  background-color: rgba(108, 117, 125, 0.1);
}
#pg-tabela-combinada tfoot td,
#ac-performance-matrix-table tfoot td {
  padding: 0.75rem 0.5rem;
  border-top: 1px solid var(--card-border);
}
/* Cores Desempenho Tabela */
#pg-tabela-combinada td.performance-low,
#pg-tabela-combinada tfoot td.performance-low,
#ac-performance-matrix-table td.performance-low,
#ac-performance-matrix-table tfoot td.performance-low {
  color: #f87171;
  font-weight: 500;
}
#pg-tabela-combinada td.performance-medium,
#pg-tabela-combinada tfoot td.performance-medium,
#ac-performance-matrix-table td.performance-medium,
#ac-performance-matrix-table tfoot td.performance-medium {
  color: #facc15;
  font-weight: 500;
}
#pg-tabela-combinada td.performance-high,
#pg-tabela-combinada tfoot td.performance-high,
#ac-performance-matrix-table td.performance-high,
#ac-performance-matrix-table tfoot td.performance-high {
  color: #4ade80;
  font-weight: 500;
}
#pg-tabela-combinada td.performance-none,
#pg-tabela-combinada tfoot td.performance-none,
#ac-performance-matrix-table td.performance-none,
#ac-performance-matrix-table tfoot td.performance-none {
  color: var(--text-secondary);
}
/* Barra Progresso Inline */
.pg-progress-percent {
  display: block;
  font-weight: 600;
  color: #e2e8f0;
}
.inline-progress-track {
  background-color: var(--input-border);
  border-radius: 3px;
  height: 0.6rem;
  width: 54px;
  overflow: hidden;
  display: block;
  margin: 0.35rem auto 0;
}
.inline-progress-fill {
  height: 100%;
  width: 0;
  border-radius: 3px;
  background-color: var(--accent-color);
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.18);
}
.inline-progress-fill[data-progress-level="low"] {
  background-color: #ef4444;
}
.inline-progress-fill[data-progress-level="medium"] {
  background-color: #f97316;
}
.inline-progress-fill[data-progress-level="high"] {
  background-color: #22c55e;
}
.pg-performance-badge {
  display: inline-flex;
  min-width: 3.5rem;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.62);
}
/* Alinhamentos Tabela */
#pg-tabela-combinada th.tl,
#pg-tabela-combinada td:first-child,
#ac-performance-matrix-table th.tl,
#ac-performance-matrix-table td:first-child {
  text-align: left;
  padding-left: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
}
#pg-tabela-combinada th.tc,
#pg-tabela-combinada td:not(:first-child):not(:last-child),
#ac-performance-matrix-table th.tc,
#ac-performance-matrix-table td:not(:first-child):not(:last-child) {
  text-align: center;
  white-space: nowrap;
}
#pg-tabela-combinada th:last-child,
#pg-tabela-combinada td:last-child,
#ac-performance-matrix-table th:last-child,
#ac-performance-matrix-table td:last-child {
  text-align: center;
  padding-right: 1rem;
  white-space: nowrap;
}
#pg-tabela-combinada tfoot td:first-child,
#ac-performance-matrix-table tfoot td:first-child {
  padding-left: 1rem;
}
#pg-tabela-combinada tfoot td:last-child,
#ac-performance-matrix-table tfoot td:last-child {
  padding-right: 1rem;
}

/* === GRÁFICO DISCIPLINAS X DESEMPENHO === */
#pg-desempenho-disciplina-chart-container {
  min-height: 450px;
  position: relative;
}
#pg-desempenho-disciplina-chart-container canvas {
  position: absolute;
  inset: 0.85rem;
  width: calc(100% - 1.7rem) !important;
  height: calc(100% - 1.7rem) !important;
}

/* === VISUALIZAÇÃO DE CONSTÂNCIA === */
#progresso-streak-visualizacao {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
.streak-day {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: default;
  transition:
    transform 0.16s ease-in-out,
    box-shadow 0.16s ease-in-out;
}
.streak-day:hover {
  transform: scale(1.08);
}
.streak-day.studied {
  background: radial-gradient(circle at 30% 30%, rgba(110, 231, 183, 0.95), rgba(16, 185, 129, 0.85));
  border-color: rgba(16, 185, 129, 0.28);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.18);
}
.streak-day.missed {
  background: rgba(30, 41, 59, 0.82);
  border-color: rgba(71, 85, 105, 0.22);
}

/* === **NOVO** ESTILOS RELATÓRIO DIAGNÓSTICO === */
#progresso-diagnostico-report .widget-body {
  padding: 1.25rem;
}
#diagnostico-resumo-executivo {
  /* Estilos adicionais se necessário */
}

/* Estilos para as seções das categorias */
#diagnostico-cat-otimo h4,
#diagnostico-cat-moderado h4,
#diagnostico-cat-atencao h4 {
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

#diagnostico-cat-otimo ul li strong,
#diagnostico-cat-moderado ul li strong {
  color: var(--text-primary);
  font-weight: 500;
}
#diagnostico-cat-otimo ul li,
#diagnostico-cat-moderado ul li {
  font-size: 0.85rem;
  margin-left: 0.5rem; /* Indenta um pouco */
}

/* Estilos específicos para a seção de 'Atenção' */
#diagnostico-cat-atencao .p-3 {
  /* Card interno de cada disciplina */
  /* background-color: rgba(239, 68, 68, 0.05); */ /* Fundo sutil opcional */
}
#diagnostico-cat-atencao .font-semibold {
  /* Nome da disciplina */
  /* color: var(--text-error); /* Ou usar text-red-300 do tailwind */
}
#diagnostico-cat-atencao .text-amber-300 {
  /* Ação sugerida */
  /* Cor já definida, pode ajustar se necessário */
}
#diagnostico-cat-atencao [data-lucide="zap"] {
  /* Ícone de ação */
  vertical-align: -2px;
}
/* === FIM ESTILOS DIAGNÓSTICO === */

/* Responsividade */
@media (max-width: 1280px) {
  .pg-hero-grid,
  .pg-ops-grid,
  .pg-forecast-grid {
    grid-template-columns: 1fr;
  }
  .pg-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pg-panel--list,
  .pg-panel--table,
  .pg-panel--efficiency,
  .pg-panel--diagnostic {
    grid-column: span 1;
  }
}

@media (max-width: 900px) {
  .kpi-card-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kpi-card .widget-body {
    gap: 0.8rem;
  }
  .pg-detail-grid,
  .pg-forecast-metrics {
    grid-template-columns: 1fr;
  }
  .pg-chart-stage--hero {
    min-height: 320px;
  }
  .pg-chart-stage--forecast,
  .pg-chart-stage--detail {
    min-height: 300px;
  }
}

@media (max-width: 640px) {
  .kpi-card-row {
    grid-template-columns: 1fr;
  }
  .kpi-card .widget-body {
    flex-direction: row;
    align-items: center;
  }
  .kpi-card-value {
    font-size: 1.2rem;
  }
  .kpi-card-secondary {
    font-size: 0.72rem;
  }
  .pg-chart-stage {
    min-height: 240px;
    padding: 0.7rem;
  }
  .pg-chart-stage--hero {
    min-height: 280px;
  }
  .pg-scroll-panel,
  .pg-table-scroll {
    max-height: 26rem;
  }
  #pg-tabela-combinada th:nth-child(5),
  #pg-tabela-combinada td:nth-child(5),
  #ac-performance-matrix-table th:nth-child(5),
  #ac-performance-matrix-table td:nth-child(5) {
    display: none;
  }
  .pg-col-disciplina {
    width: 34%;
  }
  .pg-col-prog-perc,
  .pg-col-acertos,
  .pg-col-desemp {
    width: 14%;
  }
}

@media (max-width: 480px) {
  #pg-tabela-combinada th:nth-child(6),
  #pg-tabela-combinada td:nth-child(6),
  #ac-performance-matrix-table th:nth-child(6),
  #ac-performance-matrix-table td:nth-child(6) {
    display: none;
  }
  .pg-mini-panel {
    padding: 0.85rem;
  }
}

/* ================================================================= */
/* === METAS DE ESTUDO                                             === */
/* ================================================================= */

#pg-metas-section .widget-card {
  overflow: visible;
}

/* --- Header --- */
.pg-metas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem 0;
}
#module-progresso {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
#module-progresso .widget-card {
  min-width: 0;
}
#module-progresso .widget-card.pg-panel,
#module-progresso .kpi-card {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease,
    border-color 0.24s ease;
  animation: pg-panel-fade 0.42s ease both;
  border: 1px solid rgba(71, 85, 105, 0.5);
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 34%),
    radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.12), transparent 32%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.78));
  box-shadow:
    0 18px 48px rgba(2, 6, 23, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(14px);
}
#module-progresso .widget-card.pg-panel::before,
#module-progresso .kpi-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(96, 165, 250, 0.06), transparent 38%, rgba(251, 191, 36, 0.04));
}
#module-progresso .widget-card.pg-panel:hover,
#module-progresso .kpi-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 24px 56px rgba(2, 6, 23, 0.52),
    0 0 0 1px rgba(96, 165, 250, 0.18),
    0 0 28px rgba(59, 130, 246, 0.12);
}
.pg-metas-header-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.pg-metas-header h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.pg-metas-header h3 span[data-lucide] {
  width: 1.1em;
  height: 1.1em;
  color: #818cf8;
}
.pg-metas-count {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.28);
  color: #93c5fd;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.pg-metas-btn-new {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  border: 1px solid rgba(129, 140, 248, 0.5);
  background: rgba(129, 140, 248, 0.12);
  color: #a5b4fc;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.pg-metas-btn-new:hover {
  background: rgba(129, 140, 248, 0.22);
  border-color: rgba(129, 140, 248, 0.8);
}

/* --- Tabs --- */
.pg-metas-tabs {
  display: flex;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem 0;
  flex-wrap: wrap;
}
.pg-metas-tab {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  border: 1px solid var(--card-border, #374151);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.pg-metas-tab:hover {
  border-color: #818cf8;
  color: #a5b4fc;
}
.pg-metas-tab.active {
  background: rgba(129, 140, 248, 0.18);
  border-color: #818cf8;
  color: #e0e7ff;
  font-weight: 600;
}

/* --- Estado Vazio --- */
.pg-metas-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-secondary);
}
.pg-metas-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
  opacity: 0.5;
}
.pg-metas-empty p {
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}
.pg-metas-empty small {
  font-size: 0.78rem;
  opacity: 0.7;
}
.pg-metas-btn-first {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1.4rem;
  border-radius: 8px;
  border: 1px solid rgba(129, 140, 248, 0.6);
  background: rgba(129, 140, 248, 0.15);
  color: #a5b4fc;
  cursor: pointer;
  transition: all 0.2s;
}
.pg-metas-btn-first:hover {
  background: rgba(129, 140, 248, 0.28);
}

/* --- Goal Card Body --- */
.pg-metas-body {
  padding: 1rem 1.25rem 1.25rem;
}
.pg-meta-card-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem 1.5rem;
  align-items: start;
}

/* --- SVG Ring --- */
.pg-meta-ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.25rem;
}
.pg-meta-ring-svg {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
}
.pg-meta-ring-track {
  fill: none;
  stroke: rgba(55, 65, 81, 0.8);
  stroke-width: 9;
}
.pg-meta-ring-fill {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
  transform-origin: center;
  transform: rotate(-90deg);
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.pg-meta-ring-fill.ring-on-track { stroke: #34d399; }
.pg-meta-ring-fill.ring-delayed   { stroke: #f87171; }
.pg-meta-ring-fill.ring-completed { stroke: #818cf8; }
.pg-meta-ring-fill.ring-no-data   { stroke: #6b7280; }
.pg-meta-ring-label {
  font-size: 1.35rem;
  font-weight: 700;
  fill: var(--text-primary, #f1f5f9);
  dominant-baseline: middle;
  text-anchor: middle;
}
.pg-meta-ring-sublabel {
  font-size: 0.55rem;
  fill: var(--text-secondary, #94a3b8);
  dominant-baseline: middle;
  text-anchor: middle;
}

/* --- Status Badge --- */
.pg-meta-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  letter-spacing: 0.02em;
}
.pg-meta-status-badge .badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.pg-meta-status-badge.on-track {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.35);
}
.pg-meta-status-badge.on-track .badge-dot {
  background: #34d399;
  animation: pg-pulse-green 1.8s infinite;
}
.pg-meta-status-badge.delayed {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
}
.pg-meta-status-badge.delayed .badge-dot {
  background: #f87171;
  animation: pg-pulse-red 1.5s infinite;
}
.pg-meta-status-badge.completed {
  background: rgba(129, 140, 248, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(129, 140, 248, 0.35);
}
.pg-meta-status-badge.completed .badge-dot { background: #818cf8; }
.pg-meta-status-badge.no-data {
  background: rgba(107, 114, 128, 0.15);
  color: #9ca3af;
  border: 1px solid rgba(107, 114, 128, 0.3);
}
.pg-meta-status-badge.no-data .badge-dot { background: #6b7280; }

@keyframes pg-pulse-green {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(52,211,153,0.5); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(52,211,153,0); }
}
@keyframes pg-pulse-red {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(248,113,113,0.5); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(248,113,113,0); }
}

@keyframes pg-pulse-cyan {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.82; transform: scale(1.14); }
}

@keyframes pg-draw-line {
  to { stroke-dashoffset: 0; }
}

@keyframes pg-fade-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 960px) {
  .pg-avanco-shell {
    grid-template-columns: 1fr;
  }

  .pg-avanco-caption {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pg-avanco-pulse-line,
  .pg-avanco-pulse-dot,
  .pg-chart-stage canvas,
  #pg-semanal-container canvas,
  #pg-tendencia-container canvas {
    animation: none !important;
    transition: none !important;
  }

  .pg-kpi-card:hover .kpi-card-value {
    transform: none;
  }
}

/* --- Metrics Grid --- */
.pg-meta-info {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.pg-meta-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}
.pg-meta-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.pg-meta-target-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.pg-meta-target-date span[data-lucide] {
  width: 0.85em;
  height: 0.85em;
}
.pg-meta-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
}
.pg-meta-metric-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--card-border, #374151);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
}
.pg-meta-metric-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
}
.pg-meta-metric-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.pg-meta-metric-sub {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

/* --- Velocity Bar --- */
.pg-meta-velocity-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.pg-meta-velocity-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-secondary);
}
.pg-meta-velocity-bar-track {
  height: 6px;
  border-radius: 3px;
  background: rgba(55,65,81,0.8);
  overflow: hidden;
}
.pg-meta-velocity-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}
.pg-meta-velocity-bar-fill.bar-on-track { background: linear-gradient(90deg, #059669, #34d399); }
.pg-meta-velocity-bar-fill.bar-delayed  { background: linear-gradient(90deg, #dc2626, #f87171); }
.pg-meta-velocity-bar-fill.bar-no-data  { background: #4b5563; }

/* --- Disciplines Pills --- */
.pg-meta-disciplines {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.pg-meta-disc-pill {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.25);
  color: #a5b4fc;
  white-space: nowrap;
}
.pg-meta-disc-more {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* --- Action Buttons --- */
.pg-meta-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--card-border, #374151);
  margin-top: 0.5rem;
}
.pg-meta-btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  border: 1px solid var(--card-border, #374151);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.pg-meta-btn-icon:hover { color: var(--text-primary); border-color: #6b7280; }
.pg-meta-btn-icon.btn-delete:hover { color: #f87171; border-color: rgba(248,113,113,0.4); }
.pg-meta-btn-icon span[data-lucide] {
  width: 0.85em;
  height: 0.85em;
}

/* --- Modal Overlay --- */
#pg-meta-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
#pg-meta-modal-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
.pg-meta-modal {
  background: var(--card-background, #1e2333);
  border: 1px solid var(--card-border, #374151);
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
#pg-meta-modal-overlay.visible .pg-meta-modal {
  transform: translateY(0) scale(1);
}
.pg-meta-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--card-border, #374151);
  flex-shrink: 0;
}
.pg-meta-modal-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pg-meta-modal-title span[data-lucide] { width: 1em; height: 1em; color: #818cf8; }
.pg-meta-modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.07);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  font-size: 1rem;
}
.pg-meta-modal-close:hover { background: rgba(255,255,255,0.14); color: var(--text-primary); }
.pg-meta-modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.pg-meta-form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}
.pg-meta-form-group input[type="text"],
.pg-meta-form-group input[type="date"] {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--card-border, #374151);
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.pg-meta-form-group input:focus {
  border-color: #818cf8;
}
.pg-meta-disc-search-input {
  width: 100%;
  padding: 0.45rem 0.7rem;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  box-sizing: border-box;
  margin-bottom: 0.5rem;
  transition: border-color 0.15s;
}
.pg-meta-disc-search-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}
.pg-meta-disc-search-input:focus {
  border-color: rgba(129,140,248,0.5);
  background: rgba(129,140,248,0.06);
}
.pg-meta-disc-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.pg-meta-disc-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.65rem;
  border-radius: 7px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.pg-meta-disc-item:hover {
  background: rgba(255,255,255,0.04);
}
.pg-meta-disc-item.selected {
  background: rgba(129,140,248,0.1);
  border-color: rgba(129,140,248,0.3);
  color: #e0e7ff;
}
.pg-meta-disc-item input[type="checkbox"] {
  accent-color: #818cf8;
  width: 15px;
  height: 15px;
  cursor: pointer;
  flex-shrink: 0;
}
.pg-meta-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--card-border, #374151);
  flex-shrink: 0;
}
.pg-meta-btn-cancel {
  padding: 0.5rem 1rem;
  border-radius: 7px;
  border: 1px solid var(--card-border, #374151);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.pg-meta-btn-cancel:hover { color: var(--text-primary); }
.pg-meta-btn-save {
  padding: 0.5rem 1.3rem;
  border-radius: 7px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.pg-meta-btn-save:hover { opacity: 0.9; }
.pg-meta-btn-save:active { transform: scale(0.97); }

/* Responsivo */
@media (max-width: 640px) {
  .pg-meta-card-inner {
    grid-template-columns: 1fr;
  }
  .pg-meta-ring-wrap {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }
  .pg-meta-ring-svg { width: 80px; height: 80px; }
}

/* === EVOLUÇÃO COCKPIT OVERRIDES: KPIS / OBJETIVOS / MODAL === */
.pg-kpi-card {
  isolation: isolate;
  min-height: 126px;
}

.pg-kpi-card::after {
  content: "";
  position: absolute;
  right: -1.8rem;
  bottom: -2.6rem;
  width: 8.5rem;
  height: 8.5rem;
  border-radius: 50%;
  opacity: 0.85;
  filter: blur(8px);
  pointer-events: none;
}

.pg-kpi-card .widget-body {
  align-items: flex-start;
}

.pg-kpi-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.pg-kpi-overline {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.16rem 0.48rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.44);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #cbd5e1;
}

.pg-kpi-card .kpi-card-title {
  margin-top: 0.1rem;
}

.pg-kpi-card .kpi-card-value {
  font-size: 1.52rem;
}

.pg-kpi-card .kpi-card-secondary {
  max-width: 18rem;
}

.pg-kpi-card .kpi-card-icon {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 28px rgba(59, 130, 246, 0.16);
}

.pg-kpi-card:hover .kpi-card-icon {
  transform: translateY(-1px) scale(1.03);
}

.pg-kpi-card--tempo::after {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.22), transparent 70%);
}

.pg-kpi-card--desempenho::after {
  background: radial-gradient(circle, rgba(6, 182, 212, 0.22), transparent 70%);
}

.pg-kpi-card--progresso::after {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.2), transparent 70%);
}

.pg-kpi-card--constancia::after {
  background: radial-gradient(circle, rgba(250, 204, 21, 0.2), transparent 70%);
}

.pg-kpi-card--total::after {
  background: radial-gradient(circle, rgba(96, 165, 250, 0.2), transparent 70%);
}

.pg-metas-header {
  gap: 1rem;
  padding: 1.2rem 1.25rem 0.45rem;
}

.pg-metas-header-main {
  flex: 1;
  align-items: flex-start;
}

.pg-metas-header-copy {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.pg-metas-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.pg-metas-subtitle {
  max-width: 42rem;
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #94a3b8;
}

.pg-metas-inline-count {
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: rgba(15, 23, 42, 0.5);
  color: #a5f3fc;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pg-metas-inline-count--ghost {
  border-color: rgba(71, 85, 105, 0.28);
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.34);
}

.pg-metas-btn-new {
  min-height: 2.5rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border-color: rgba(96, 165, 250, 0.42);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(14, 165, 233, 0.16)),
    rgba(15, 23, 42, 0.78);
  color: #dbeafe;
  box-shadow: 0 0 22px rgba(59, 130, 246, 0.14);
}

.pg-metas-btn-new span[data-lucide] {
  width: 0.9rem;
  height: 0.9rem;
}

.pg-metas-btn-new:hover {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.34), rgba(14, 165, 233, 0.22)),
    rgba(15, 23, 42, 0.9);
  border-color: rgba(96, 165, 250, 0.7);
  color: #eff6ff;
}

.pg-metas-tabs {
  gap: 0.55rem;
  padding: 0.2rem 1.25rem 0;
}

.pg-metas-tab {
  min-height: 2.25rem;
  padding: 0.42rem 0.95rem;
  border-color: rgba(71, 85, 105, 0.42);
  background: rgba(15, 23, 42, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.pg-metas-tab.active {
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.24), rgba(34, 211, 238, 0.1)),
    rgba(15, 23, 42, 0.78);
  border-color: rgba(129, 140, 248, 0.62);
  box-shadow: 0 0 18px rgba(99, 102, 241, 0.14);
}

.pg-metas-body {
  padding: 0.95rem 1.25rem 1.3rem;
}

.pg-metas-empty {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-height: 18rem;
  padding: 2.25rem 1.4rem;
  border-radius: 24px;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(circle at top, rgba(34, 211, 238, 0.12), transparent 30%),
    radial-gradient(circle at bottom, rgba(99, 102, 241, 0.16), transparent 40%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.74));
  border: 1px solid rgba(71, 85, 105, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 20px 40px rgba(2, 6, 23, 0.24);
}

.pg-metas-empty::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0, rgba(148, 163, 184, 0.06) 50%, transparent 100%);
  opacity: 0.35;
}

.pg-metas-empty-orb {
  width: 6.2rem;
  height: 6.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(34, 211, 238, 0.18), rgba(14, 116, 144, 0.08) 60%, transparent 72%);
  box-shadow:
    0 0 34px rgba(34, 211, 238, 0.12),
    inset 0 0 0 1px rgba(34, 211, 238, 0.14);
}

.pg-metas-empty-icon {
  width: 4.25rem;
  height: 4.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  color: #67e8f9;
  opacity: 1;
}

.pg-metas-empty-icon span[data-lucide] {
  width: 1.8rem;
  height: 1.8rem;
}

.pg-metas-empty-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #38bdf8;
}

.pg-metas-empty-title {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 700;
  color: #f8fafc;
}

.pg-metas-empty small {
  max-width: 38rem;
  font-size: 0.84rem;
  line-height: 1.7;
  color: #94a3b8;
  opacity: 1;
}

.pg-metas-empty-signals {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}

.pg-metas-empty-signal {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 2rem;
  padding: 0.34rem 0.78rem;
  border-radius: 999px;
  border: 1px solid rgba(71, 85, 105, 0.4);
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  font-size: 0.74rem;
  font-weight: 600;
}

.pg-metas-empty-signal span[data-lucide] {
  width: 0.88rem;
  height: 0.88rem;
  color: #67e8f9;
}

.pg-metas-btn-first {
  min-height: 2.85rem;
  margin-top: 0.35rem;
  padding: 0.6rem 1.35rem;
  border-radius: 999px;
  border-color: rgba(96, 165, 250, 0.5);
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.26), rgba(14, 165, 233, 0.16)),
    rgba(15, 23, 42, 0.82);
  color: #e0e7ff;
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.18);
}

.pg-metas-btn-first span[data-lucide] {
  width: 0.95rem;
  height: 0.95rem;
}

.pg-metas-btn-first:hover {
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.34), rgba(14, 165, 233, 0.22)),
    rgba(15, 23, 42, 0.92);
}

.pg-meta-card-inner {
  position: relative;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 1.3rem 1.45rem;
  padding: 1.2rem;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.1), transparent 24%),
    radial-gradient(circle at bottom left, rgba(99, 102, 241, 0.14), transparent 28%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.72));
  border: 1px solid rgba(71, 85, 105, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 18px 42px rgba(2, 6, 23, 0.24);
}

.pg-meta-card-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(96, 165, 250, 0.06), transparent 38%, rgba(34, 197, 94, 0.04));
}

.pg-meta-ring-wrap {
  position: relative;
  justify-content: center;
  min-height: 100%;
  padding: 1.05rem 0.9rem;
  border-radius: 20px;
  background:
    radial-gradient(circle at top, rgba(34, 211, 238, 0.08), transparent 40%),
    rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(71, 85, 105, 0.34);
}

.pg-meta-ring-glow {
  position: absolute;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 72%);
  filter: blur(8px);
  pointer-events: none;
}

.pg-meta-info {
  gap: 1rem;
}

.pg-meta-title-copy {
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
  min-width: 0;
}

.pg-meta-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #67e8f9;
}

.pg-meta-name {
  font-size: 1.14rem;
  letter-spacing: 0.01em;
}

.pg-meta-target-date {
  min-height: 2.15rem;
  padding: 0.38rem 0.82rem;
  border-radius: 999px;
  border: 1px solid rgba(71, 85, 105, 0.34);
  background: rgba(15, 23, 42, 0.7);
  color: #cbd5e1;
}

.pg-meta-signal-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.pg-meta-signal-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2rem;
  padding: 0.35rem 0.78rem;
  border-radius: 999px;
  border: 1px solid rgba(71, 85, 105, 0.36);
  background: rgba(15, 23, 42, 0.68);
  color: #dbeafe;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.pg-meta-signal-chip span[data-lucide] {
  width: 0.88rem;
  height: 0.88rem;
  color: #67e8f9;
}

.pg-meta-metrics {
  gap: 0.7rem;
}

.pg-meta-metric-item {
  padding: 0.75rem 0.85rem;
  border-radius: 16px;
  border: 1px solid rgba(71, 85, 105, 0.34);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.5));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.pg-meta-metric-item--accent {
  border-color: rgba(34, 211, 238, 0.24);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(10, 18, 34, 0.82), rgba(15, 23, 42, 0.56));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 0 18px rgba(34, 211, 238, 0.06);
}

.pg-meta-metric-value {
  font-size: 1.06rem;
}

.pg-meta-velocity-bar-wrap {
  padding: 0.85rem 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(71, 85, 105, 0.34);
  background: rgba(15, 23, 42, 0.54);
}

.pg-meta-velocity-bar-wrap--highlight {
  gap: 0.72rem;
  border-color: rgba(34, 211, 238, 0.22);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(10, 18, 34, 0.82), rgba(15, 23, 42, 0.58));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 0 20px rgba(15, 23, 42, 0.12);
}

.pg-meta-velocity-bar-wrap--highlight.is-on-track {
  border-color: rgba(52, 211, 153, 0.24);
}

.pg-meta-velocity-bar-wrap--highlight.is-delayed {
  border-color: rgba(248, 113, 113, 0.26);
}

.pg-meta-velocity-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.pg-meta-velocity-current {
  display: grid;
  gap: 0.2rem;
}

.pg-meta-velocity-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
}

.pg-meta-velocity-value {
  display: inline-flex;
  align-items: baseline;
  gap: 0.32rem;
  font-size: 1.28rem;
  line-height: 1;
  color: #f8fafc;
}

.pg-meta-velocity-value small {
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
}

.pg-meta-velocity-compare {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pg-meta-velocity-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(71, 85, 105, 0.34);
  background: rgba(15, 23, 42, 0.72);
  color: #dbeafe;
  font-size: 0.75rem;
  font-weight: 700;
}

.pg-meta-velocity-chip--target {
  border-color: rgba(34, 211, 238, 0.26);
  color: #67e8f9;
}

.pg-meta-velocity-bar-labels {
  flex-wrap: wrap;
  gap: 0.55rem;
  font-weight: 600;
}

.pg-meta-velocity-caption {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #67e8f9;
}

.pg-meta-velocity-bar-wrap--highlight.is-delayed .pg-meta-velocity-caption {
  color: #fda4af;
}

.pg-meta-velocity-bar-wrap--highlight.is-on-track .pg-meta-velocity-caption {
  color: #6ee7b7;
}

.pg-meta-execution-hint {
  display: grid;
  gap: 0.32rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(71, 85, 105, 0.34);
  background: rgba(15, 23, 42, 0.58);
}

.pg-meta-execution-hint strong {
  font-size: 0.94rem;
  color: #f8fafc;
}

.pg-meta-execution-hint p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #cbd5e1;
}

.pg-meta-execution-kicker {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pg-meta-execution-hint--info {
  border-color: rgba(34, 211, 238, 0.28);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.1), transparent 28%),
    rgba(15, 23, 42, 0.62);
}

.pg-meta-execution-hint--info .pg-meta-execution-kicker {
  color: #67e8f9;
}

.pg-meta-execution-hint--danger {
  border-color: rgba(248, 113, 113, 0.3);
  background:
    radial-gradient(circle at top right, rgba(248, 113, 113, 0.12), transparent 30%),
    rgba(15, 23, 42, 0.62);
}

.pg-meta-execution-hint--danger .pg-meta-execution-kicker {
  color: #fda4af;
}

.pg-meta-execution-hint--success {
  border-color: rgba(34, 197, 94, 0.28);
  background:
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.1), transparent 28%),
    rgba(15, 23, 42, 0.62);
}

.pg-meta-execution-hint--success .pg-meta-execution-kicker {
  color: #86efac;
}

.pg-meta-execution-hint--neutral .pg-meta-execution-kicker {
  color: #cbd5e1;
}

.pg-meta-disciplines-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.pg-meta-disciplines-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: #e2e8f0;
}

.pg-meta-disciplines-label span[data-lucide] {
  width: 0.92rem;
  height: 0.92rem;
  color: #67e8f9;
}

.pg-meta-disciplines-caption {
  font-size: 0.72rem;
  color: #94a3b8;
}

.pg-meta-disc-pill {
  padding: 0.34rem 0.72rem;
  border-radius: 999px;
  border-color: rgba(96, 165, 250, 0.24);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(34, 211, 238, 0.08)),
    rgba(15, 23, 42, 0.72);
  color: #bfdbfe;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.08);
}

.pg-meta-disc-more {
  font-style: normal;
  color: #94a3b8;
}

.pg-meta-actions {
  padding-top: 0.85rem;
  margin-top: 0.2rem;
  border-top: 1px solid rgba(71, 85, 105, 0.28);
}

.pg-meta-btn-icon {
  min-height: 2.4rem;
  padding: 0.45rem 0.92rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  border-color: rgba(71, 85, 105, 0.36);
  color: #cbd5e1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.pg-meta-btn-icon span[data-lucide] {
  width: 0.9rem;
  height: 0.9rem;
}

.pg-meta-btn-icon--edit:hover {
  color: #67e8f9;
  border-color: rgba(34, 211, 238, 0.36);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.1);
}

.pg-meta-btn-icon--delete:hover {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.42);
  box-shadow: 0 0 18px rgba(248, 113, 113, 0.08);
}

.pg-meta-btn-icon--archive:hover {
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.38);
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.1);
}

.pg-meta-btn-icon--duplicate:hover {
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.38);
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.1);
}

.pg-metas-count--ghost {
  background: rgba(15, 23, 42, 0.62);
  color: #94a3b8;
  border-color: rgba(71, 85, 105, 0.32);
}

.pg-metas-empty--history {
  min-height: 14rem;
}

.pg-goal-history {
  margin-top: 1rem;
  display: grid;
  gap: 0.9rem;
}

.pg-goal-history-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.pg-goal-history-kicker {
  display: inline-block;
  margin-bottom: 0.28rem;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #67e8f9;
}

.pg-goal-history-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
}

.pg-goal-history-count {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(71, 85, 105, 0.32);
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 600;
}

.pg-goal-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}

.pg-goal-history-card {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid rgba(71, 85, 105, 0.32);
  background:
    radial-gradient(circle at top right, rgba(99, 102, 241, 0.08), transparent 28%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.pg-goal-history-card.completed {
  border-color: rgba(34, 197, 94, 0.26);
}

.pg-goal-history-card.archived {
  border-color: rgba(148, 163, 184, 0.22);
}

.pg-goal-history-top {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
}

.pg-goal-history-copy {
  min-width: 0;
}

.pg-goal-history-copy h5 {
  margin: 0.4rem 0 0.25rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: #f8fafc;
}

.pg-goal-history-copy p {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.55;
  color: #94a3b8;
}

.pg-goal-history-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  min-height: 1.9rem;
  padding: 0.24rem 0.68rem;
  border-radius: 999px;
  border: 1px solid rgba(71, 85, 105, 0.32);
  background: rgba(15, 23, 42, 0.65);
  color: #cbd5e1;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pg-goal-history-chip.completed {
  border-color: rgba(34, 197, 94, 0.28);
  color: #86efac;
}

.pg-goal-history-chip.archived {
  border-color: rgba(148, 163, 184, 0.22);
  color: #cbd5e1;
}

.pg-goal-history-chip span[data-lucide] {
  width: 0.8rem;
  height: 0.8rem;
}

.pg-goal-history-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: radial-gradient(circle, rgba(34, 211, 238, 0.14), rgba(15, 23, 42, 0.9));
  color: #f8fafc;
  font-weight: 700;
  flex-shrink: 0;
}

.pg-goal-history-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.pg-goal-history-metric {
  padding: 0.72rem 0.76rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(71, 85, 105, 0.28);
}

.pg-goal-history-metric span {
  display: block;
  margin-bottom: 0.18rem;
  font-size: 0.7rem;
  color: #94a3b8;
}

.pg-goal-history-metric strong {
  display: block;
  font-size: 0.83rem;
  color: #e2e8f0;
}

.pg-goal-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.pg-metas-loading {
  padding: 0.25rem;
  border-radius: 22px;
  border: 1px solid rgba(71, 85, 105, 0.32);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.62));
}

.pg-metas-loading .pg-chart-skeleton {
  position: relative;
  inset: auto;
  min-height: 12.5rem;
  border-radius: 18px;
}

.pg-metas-loading-text {
  margin: 0;
  padding: 0.85rem 1rem 1rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.78rem;
}

#pg-meta-modal-overlay {
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(10px);
}

.pg-meta-modal {
  max-width: 980px;
  border-radius: 24px;
  border: 1px solid rgba(71, 85, 105, 0.38);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.1), transparent 24%),
    radial-gradient(circle at bottom left, rgba(99, 102, 241, 0.12), transparent 28%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.86));
  overflow: hidden;
  box-shadow:
    0 26px 80px rgba(2, 6, 23, 0.58),
    0 0 0 1px rgba(96, 165, 250, 0.08);
}

.pg-meta-modal-header {
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid rgba(71, 85, 105, 0.28);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.58));
}

.pg-meta-modal-body {
  padding: 0;
}

.pg-meta-modal-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.92fr);
  gap: 0;
}

.pg-meta-modal-main {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pg-meta-form-intro {
  padding: 1rem 1rem 1.05rem;
  border-radius: 18px;
  border: 1px solid rgba(71, 85, 105, 0.34);
  background:
    radial-gradient(circle at top, rgba(34, 211, 238, 0.1), transparent 36%),
    rgba(15, 23, 42, 0.56);
}

.pg-meta-form-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #67e8f9;
}

.pg-meta-form-subtitle {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.7;
  color: #94a3b8;
}

.pg-meta-modal-side {
  padding: 1.35rem 1.35rem 1.35rem 0;
}

.pg-meta-side-panel {
  height: 100%;
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid rgba(71, 85, 105, 0.3);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.58));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.pg-meta-side-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 1.9rem;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  background: rgba(6, 182, 212, 0.1);
  color: #67e8f9;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pg-meta-side-chip span[data-lucide] {
  width: 0.84rem;
  height: 0.84rem;
}

.pg-meta-side-panel h4 {
  margin: 1rem 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
}

.pg-meta-side-panel p {
  margin: 0 0 1rem;
  font-size: 0.83rem;
  line-height: 1.7;
  color: #94a3b8;
}

.pg-meta-side-signals {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pg-meta-side-signal {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.8rem 0.85rem;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid rgba(71, 85, 105, 0.28);
}

.pg-meta-side-signal > span[data-lucide] {
  width: 1rem;
  height: 1rem;
  margin-top: 0.1rem;
  color: #67e8f9;
  flex-shrink: 0;
}

.pg-meta-side-signal strong {
  display: block;
  margin-bottom: 0.18rem;
  font-size: 0.8rem;
  color: #e2e8f0;
}

.pg-meta-side-signal small {
  font-size: 0.73rem;
  line-height: 1.55;
  color: #94a3b8;
}

.pg-meta-form-group label {
  color: #cbd5e1;
}

.pg-meta-form-group input[type="text"],
.pg-meta-form-group input[type="date"],
.pg-meta-disc-search-input {
  min-height: 2.9rem;
  border-radius: 14px;
  border-color: rgba(71, 85, 105, 0.4);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.pg-meta-form-group input:focus,
.pg-meta-disc-search-input:focus {
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.14),
    0 0 22px rgba(34, 211, 238, 0.08);
}

.pg-meta-disc-list {
  padding: 0.35rem;
  border-radius: 16px;
  border: 1px solid rgba(71, 85, 105, 0.34);
  background: rgba(15, 23, 42, 0.52);
}

.pg-meta-disc-item {
  min-height: 2.55rem;
  border-radius: 12px;
}

.pg-meta-disc-item:hover {
  background: rgba(34, 211, 238, 0.06);
}

.pg-meta-disc-item.selected {
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(34, 211, 238, 0.08)),
    rgba(15, 23, 42, 0.82);
  border-color: rgba(129, 140, 248, 0.34);
}

.pg-meta-modal-footer {
  padding: 1rem 1.35rem 1.15rem;
  border-top: 1px solid rgba(71, 85, 105, 0.28);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.78));
}

.pg-meta-btn-cancel,
.pg-meta-btn-save {
  min-height: 2.75rem;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
}

.pg-meta-btn-cancel {
  border-color: rgba(71, 85, 105, 0.36);
  background: rgba(15, 23, 42, 0.7);
}

.pg-meta-btn-cancel:hover {
  border-color: rgba(148, 163, 184, 0.36);
}

.pg-meta-btn-save {
  background: linear-gradient(135deg, #2563eb, #22d3ee);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.16);
}

@media (max-width: 960px) {
  .pg-meta-modal-shell {
    grid-template-columns: 1fr;
  }

  .pg-meta-modal-side {
    padding: 0 1.35rem 1.35rem;
  }
}

@media (max-width: 640px) {
  .pg-kpi-card .widget-body {
    gap: 0.85rem;
  }

  .pg-kpi-card .kpi-card-value {
    font-size: 1.36rem;
  }

  .pg-metas-header {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1rem 0.35rem;
  }

  .pg-metas-header-main {
    flex-direction: column;
    gap: 0.75rem;
  }

  .pg-metas-tabs {
    padding: 0.2rem 1rem 0;
  }

  .pg-metas-body {
    padding: 0.85rem 1rem 1rem;
  }

  .pg-metas-empty {
    min-height: 16rem;
    padding: 1.8rem 1rem;
  }

  .pg-meta-card-inner {
    padding: 1rem;
  }

  .pg-meta-signal-strip,
  .pg-meta-disciplines-head,
  .pg-meta-velocity-bar-labels {
    flex-direction: column;
    align-items: stretch;
  }

  .pg-meta-actions {
    justify-content: stretch;
  }

  .pg-meta-btn-icon {
    flex: 1;
    justify-content: center;
  }

  .pg-meta-modal-main {
    padding: 1rem;
  }

  .pg-meta-modal-side {
    padding: 0 1rem 1rem;
  }

  .pg-meta-modal-footer {
    padding: 0.9rem 1rem 1rem;
    flex-direction: column-reverse;
  }

  .pg-goal-history-metrics {
    grid-template-columns: 1fr;
  }

  .pg-goal-history-top {
    flex-direction: column;
  }

  .pg-meta-btn-cancel,
  .pg-meta-btn-save {
    width: 100%;
    justify-content: center;
  }
}
