/* ===================================================
   🔥 Streak Widget — Dashboard de Constância
   =================================================== */

.streak-widget {
  padding: 1.75rem;
}

.streak-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.streak-header h3 {
  font-size: var(--text-xl);
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.streak-count {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.streak-number {
  font-size: var(--text-5xl);
  font-weight: var(--font-bold);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.streak-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.streak-best {
  display: inline-block;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  margin-top: 0.25rem;
}

/* === Gráfico Semanal === */
.streak-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.625rem;
  margin-bottom: 1.5rem;
  padding: 1rem 0.5rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

.day-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  cursor: default;
  transition: transform 0.2s ease;
}

.day-cell:hover {
  transform: scale(1.05);
}

.day-label {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-transform: uppercase;
  font-weight: var(--font-semibold);
  letter-spacing: 0.03em;
}

.day-bar {
  width: 100%;
  max-width: 32px;
  min-height: 4px;
  background: var(--bg-secondary);
  border-radius: 4px;
  transition: all 0.3s ease;
  align-self: center;
}

.day-cell.ativo .day-bar {
  background: var(--gradient-success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.day-value {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-weight: var(--font-medium);
}

/* === Grid de Estatísticas === */
.streak-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.streak-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  text-align: center;
}

.stat-icon {
  font-size: 1.25rem;
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-value {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--text-primary);
}

.stat-sub {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  display: block;
  margin-top: 2px;
}

/* === Progresso de Hoje === */
.streak-today {
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

.streak-today h4 {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.today-bars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.today-item {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.today-label {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.today-bar-track {
  width: 100%;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
}

.today-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.today-bar-fill.tempo {
  background: var(--accent-tr);
}

.today-bar-fill.questoes {
  background: var(--accent-qm);
}

.streak-meta-done {
  margin-top: 0.75rem;
  padding: 0.5rem;
  text-align: center;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--status-maduro);
  background: rgba(16, 185, 129, 0.1);
  border-radius: var(--radius-sm);
}

/* === Box Semanal e Hoje === */
.semana-box, .hoje-box {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 1rem;
}

.box-title {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  font-weight: var(--font-semibold);
  letter-spacing: 0.03em;
}

.hoje-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.hoje-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
}

.hoje-icon {
  font-size: 1.25rem;
}

.hoje-value {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
}

.hoje-meta {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* === Stats Grid (Match Style) — SEMANA e HOJE === */
.stats-grid-semana {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.stat-card-semana {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card-semana:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.stat-number {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 6px;
}

.stat-label-semana {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.stat-meta-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}

.stat-meta-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.stat-meta-fill.tempo {
  background: var(--accent-tr);
}

.stat-meta-fill.questoes {
  background: var(--accent-qm);
}

.stat-meta-label {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

@media (max-width: 640px) {
  .stats-grid-semana {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .stat-number {
    font-size: 28px;
  }
}
