/* ============ VISTA DE PROGRESO (escritorio ≥768px) ============ */
/* Estadísticas agregadas del profesor: KPIs, frecuencia semanal,
   top actividades, cobertura curricular y metas/alertas.
   Igual que schedule-view.css y curriculum-view.css, esta vista está
   pensada únicamente para pantallas de escritorio — en móvil se oculta
   con display:none y getInitialView() redirige a 'today'. */

/* ── Layout principal ── */
.progress-view {
  grid-column: 2 / 4;
  background: transparent;
  overflow-y: auto;
  padding: 28px 40px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Ocultar en móvil ── */
@media (max-width: 767px) {
  .progress-view { display: none; }
}

/* ── Cabecera ── */
.progress-view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.progress-view-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--fg);
  margin: 0;
}
.progress-view-sub {
  font-size: 13px;
  color: var(--fg-muted);
  margin-top: 5px;
}
.progress-demo-badge {
  color: var(--accent);
  font-weight: 600;
}

/* ── Filtros ── */
.progress-filters {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
}
.progress-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--fg-muted);
  min-width: 220px;
}
.progress-guest-note {
  font-size: 12px;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
}

/* ── Estados de carga / error ── */
.progress-loading,
.progress-error,
.progress-empty-note {
  padding: 20px 0;
  font-size: 14px;
  color: var(--fg-muted);
}
.progress-error { color: var(--coral); }

/* ── Secciones genéricas ── */
.progress-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}
.progress-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.progress-section-sub {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--fg-muted);
  font-size: 12px;
}

/* ── KPI Grid ── */
.progress-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 1100px) {
  .progress-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

.progress-kpi-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  background: var(--bg-surface, var(--bg));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.progress-kpi-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.progress-kpi-label {
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.3;
}
.progress-kpi-sub {
  font-size: 11px;
  color: var(--fg-muted);
  opacity: 0.75;
}

/* ── Frecuencia semanal (barras) ── */
.progress-freq-chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 120px;
  padding: 0 4px;
}
.progress-freq-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex: 1;
  height: 100%;
}
.progress-freq-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--fg-muted);
  height: 14px;
  line-height: 14px;
}
.progress-freq-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid var(--line);
}
.progress-freq-bar {
  width: 100%;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
  min-height: 3px;
  transition: height 0.3s ease;
  opacity: 0.85;
}
.progress-freq-bar:hover { opacity: 1; }
.progress-freq-label {
  font-size: 10px;
  color: var(--fg-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ── Top actividades ── */
.progress-top-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.progress-top-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--bg-surface, var(--bg));
  border: 1px solid var(--line);
  font-size: 13px;
  transition: background 0.15s;
}
.progress-top-item:hover { background: var(--bg-hover, var(--line)); }
.progress-top-rank {
  font-weight: 700;
  color: var(--fg-muted);
  min-width: 20px;
  text-align: right;
  font-size: 12px;
}
.progress-top-name {
  flex: 1;
  color: var(--fg);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.progress-top-phase {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  padding: 2px 7px;
  border-radius: 20px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.progress-top-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--fg-muted);
  min-width: 28px;
  text-align: right;
}

/* ── Cobertura curricular ── */
.progress-coverage-bar-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.progress-coverage-bar-track {
  flex: 1;
  height: 10px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
  min-width: 120px;
}
.progress-coverage-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.4s ease;
}
.progress-coverage-bar-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
}

.progress-coverage-competencies {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.progress-coverage-comp {
  background: var(--bg-surface, var(--bg));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  min-width: 90px;
}
.progress-coverage-comp-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}
.progress-coverage-comp-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.progress-coverage-criteria-dots {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.progress-coverage-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
  border: 1px solid var(--fg-muted);
  opacity: 0.45;
  transition: background 0.2s, opacity 0.2s;
  cursor: default;
}
.progress-coverage-dot.covered {
  background: var(--accent);
  border-color: var(--accent);
  opacity: 1;
}

.progress-coverage-hint {
  font-size: 12px;
  color: var(--fg-muted);
  margin: 0;
}
.progress-coverage-link {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  text-decoration: underline;
  font-weight: 600;
}
.progress-coverage-link:hover { opacity: 0.8; }

/* ── Metas y alertas ── */
.progress-goals-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.progress-goal-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  border-left: 3px solid transparent;
}
.progress-goal-ok {
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-panel));
  border-color: var(--accent);
}
.progress-goal-warn {
  background: color-mix(in srgb, var(--coral) 8%, var(--bg-panel));
  border-color: var(--coral);
}
.progress-goal-info {
  background: color-mix(in srgb, var(--fg-muted) 8%, var(--bg-panel));
  border-color: var(--fg-muted);
}
.progress-goal-icon {
  font-size: 16px;
  line-height: 1.3;
  flex-shrink: 0;
}
.progress-goal-text {
  color: var(--fg);
  line-height: 1.45;
}
