/* =====================================================
   VISÃO GERAL — css/pages/visao-geral.css
   ===================================================== */

/* -------------------------------------------------------
   HERO BANNER
   ------------------------------------------------------- */
.vg-hero {
  background: var(--gradient);
  border-radius: 20px;
  padding: 28px 32px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.vg-hero::before {
  content: '';
  position: absolute;
  top: -70px; right: -50px;
  width: 240px; height: 240px;
  background: rgba(255,255,255,0.07);
  border-radius: 50%;
  pointer-events: none;
}
.vg-hero::after {
  content: '';
  position: absolute;
  bottom: -50px; left: 38%;
  width: 180px; height: 180px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  pointer-events: none;
}
.vg-hero-content {
  flex: 1;
  z-index: 1;
  min-width: 0;
}
.vg-greeting {
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 0.82;
  margin-bottom: 4px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.vg-hero-name {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vg-hero-subtitle {
  font-size: 0.87rem;
  opacity: 0.82;
  line-height: 1.55;
  max-width: 420px;
}

/* Score Bubble */
.vg-score-bubble {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 18px;
  padding: 20px 26px;
  text-align: center;
  z-index: 1;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-shrink: 0;
  min-width: 120px;
}
.vg-score-num {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -1px;
}
.vg-score-stars {
  font-size: 1rem;
  letter-spacing: 3px;
  margin-bottom: 6px;
  color: #fde047;
}
.vg-score-label {
  font-size: 0.68rem;
  opacity: 0.78;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* -------------------------------------------------------
   ALERTA DE DISPONIBILIDADE
   ------------------------------------------------------- */
.vg-alert {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 14px;
  margin-bottom: 18px;
  font-size: 0.87rem;
  line-height: 1.5;
  border: 1px solid;
}
.vg-alert-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.vg-alert-body { flex: 1; }
.vg-alert-title { font-weight: 700; margin-bottom: 2px; }
.vg-alert-text  { opacity: 0.85; }
.vg-alert-action {
  padding: 7px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.vg-alert-action:hover { opacity: 0.85; }

.vg-alert.warning {
  background: rgba(245,158,11,0.08);
  border-color: rgba(245,158,11,0.35);
  color: var(--text);
}
.vg-alert.warning .vg-alert-icon { color: #f59e0b; }
.vg-alert.warning .vg-alert-action {
  background: rgba(245,158,11,0.15);
  color: #b45309;
}

.vg-alert.info {
  background: rgba(59,130,246,0.08);
  border-color: rgba(59,130,246,0.3);
  color: var(--text);
}
.vg-alert.info .vg-alert-icon { color: #3b82f6; }
.vg-alert.info .vg-alert-action {
  background: rgba(59,130,246,0.15);
  color: #1d4ed8;
}

/* -------------------------------------------------------
   KPI GRID
   ------------------------------------------------------- */
.vg-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.vg-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--kpi-color, var(--primary));
  border-radius: 14px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  position: relative;
  overflow: hidden;
}
.vg-kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.09);
  border-color: var(--kpi-color, var(--primary));
}
.vg-kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: color-mix(in srgb, var(--kpi-color, var(--primary)) 12%, transparent);
  color: var(--kpi-color, var(--primary));
  margin-bottom: 4px;
}
.vg-kpi-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.vg-kpi-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.3;
}
.vg-kpi-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 4px;
  width: fit-content;
}
.vg-kpi-badge.mes     { background: rgba(34,197,94,0.12);  color: #22c55e; }
.vg-kpi-badge.ativo   { background: rgba(59,130,246,0.12); color: #3b82f6; }
.vg-kpi-badge.pendente{ background: rgba(245,158,11,0.12); color: #f59e0b; }

/* Skeleton shimmer */
.vg-kpi-card.loading .vg-kpi-icon,
.vg-kpi-card.loading .vg-kpi-value,
.vg-kpi-card.loading .vg-kpi-label,
.vg-kpi-card.loading .vg-kpi-badge {
  background: var(--bg-hover) !important;
  color: transparent !important;
  border-radius: 6px;
  animation: vg-shimmer 1.5s ease-in-out infinite;
  pointer-events: none;
}
.vg-kpi-card.loading .vg-kpi-icon  { width: 40px; height: 40px; }
.vg-kpi-card.loading .vg-kpi-value { width: 55px; height: 26px; }
.vg-kpi-card.loading .vg-kpi-label { width: 85px; height: 13px; }
.vg-kpi-card.loading .vg-kpi-badge { width: 54px; height: 18px; }

@keyframes vg-shimmer {
  0%, 100% { opacity: 0.45; }
  50%       { opacity: 1; }
}

/* -------------------------------------------------------
   CONTENT GRID  (Activity + Contratações)
   ------------------------------------------------------- */
.vg-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 22px;
}

/* -------------------------------------------------------
   TIMELINE DE ATIVIDADE
   ------------------------------------------------------- */
.vg-timeline {
  display: flex;
  flex-direction: column;
}
.vg-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 4px;
  position: relative;
}
.vg-timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 19px;
  top: 42px;
  bottom: -4px;
  width: 1px;
  background: var(--border);
}
.vg-timeline-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  border: 2px solid transparent;
  transition: transform 0.2s;
}
.vg-timeline-item:hover .vg-timeline-dot { transform: scale(1.1); }

.vg-timeline-item[data-status="aguardando"] .vg-timeline-dot {
  background: rgba(245,158,11,0.12); color: #f59e0b; border-color: rgba(245,158,11,0.3);
}
.vg-timeline-item[data-status="andamento"] .vg-timeline-dot {
  background: rgba(59,130,246,0.12); color: #3b82f6; border-color: rgba(59,130,246,0.3);
}
.vg-timeline-item[data-status="concluido"] .vg-timeline-dot {
  background: rgba(34,197,94,0.12); color: #22c55e; border-color: rgba(34,197,94,0.3);
}
.vg-timeline-item[data-status="entregue"] .vg-timeline-dot {
  background: rgba(99,102,241,0.12); color: #6366f1; border-color: rgba(99,102,241,0.3);
}
.vg-timeline-item[data-status="recusado"] .vg-timeline-dot,
.vg-timeline-item[data-status="cancelado"] .vg-timeline-dot {
  background: rgba(239,68,68,0.1); color: #ef4444; border-color: rgba(239,68,68,0.2);
}

.vg-timeline-content { flex: 1; padding-top: 5px; }
.vg-timeline-text {
  font-size: 0.84rem;
  color: var(--text);
  line-height: 1.4;
  font-weight: 500;
}
.vg-timeline-time {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 3px;
}

/* -------------------------------------------------------
   CONTRATAÇÕES RECENTES
   ------------------------------------------------------- */
.vg-contratacao-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  transition: background 0.2s;
  cursor: pointer;
}
.vg-contratacao-item:hover { background: var(--bg-hover); }
.vg-contratacao-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--primary-light);
  flex-shrink: 0;
}
.vg-contratacao-info { flex: 1; min-width: 0; }
.vg-contratacao-titulo {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vg-contratacao-meta {
  font-size: 0.73rem;
  color: var(--text-dim);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* -------------------------------------------------------
   AÇÕES RÁPIDAS
   ------------------------------------------------------- */
.vg-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}
.vg-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  color: var(--text-muted);
}
.vg-action-btn:hover {
  border-color: var(--primary);
  color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.07);
  background: var(--bg-card);
}
.vg-action-btn i  { font-size: 1.6rem; }
.vg-action-btn span { font-size: 0.8rem; font-weight: 500; text-align: center; }

/* -------------------------------------------------------
   EMPTY STATE INTERNO
   ------------------------------------------------------- */
.vg-empty {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-dim);
}
.vg-empty i {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
  opacity: 0.5;
}
.vg-empty p {
  font-size: 0.82rem;
  line-height: 1.55;
}

/* -------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------- */
@media (max-width: 1100px) {
  .vg-kpi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .vg-kpi-grid     { grid-template-columns: repeat(2, 1fr); }
  .vg-content-grid { grid-template-columns: 1fr; }
  .vg-quick-actions{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .vg-hero         { flex-direction: column; align-items: flex-start; }
  .vg-score-bubble { align-self: stretch; }
  .vg-hero-name    { font-size: 1.4rem; }
  .vg-kpi-grid     { grid-template-columns: 1fr 1fr; }
}
