<header class="page-heading"><p class="eyebrow">OBJETIVOS LOCALES</p><h1>Temporadas del universo</h1><p>Ciclos reproducibles de catorce días con rutas económicas, científicas, pacíficas, ecológicas y militares. No requieren conexión ni pagos.</p></header>
{% if active_season %}<section class="panel" aria-labelledby="active-season-title"><h2 id="active-season-title">{{ active_season.title }}</h2><p>Comenzó <time datetime="{{ active_season.starts_at|date_iso }}">{{ active_season.starts_at|date_label }}</time> y termina <time datetime="{{ active_season.ends_at|date_iso }}">{{ active_season.ends_at|date_label }}</time>.</p><div class="card-grid">{% for objective in season_objectives %}<article class="tech-card"><div class="card-copy"><h3>{{ objective.category|capitalize }} · {{ 'Completado' if objective.completed else 'En progreso' }}</h3><p>{{ objective.description }}</p><p><strong>Progreso:</strong> {{ objective.progress|round(1) }} de {{ objective.target|round(1) }}. <strong>Recompensa:</strong> {{ objective.reward_text }}.</p><progress value="{{ objective.progress }}" max="{{ objective.target }}">{{ (objective.progress/objective.target*100)|round }} %</progress></div></article>{% endfor %}</div></section>{% endif %}
<section class="panel" aria-labelledby="titles-title"><h2 id="titles-title">Títulos cosméticos</h2>{% if empire_titles %}<div class="stacked-actions">{% for title in empire_titles %}<form method="post" action="{{ url_for('season_title_action') }}" class="inline-form"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><input type="hidden" name="title_key" value="{{ title.title_key }}"><span><strong>{{ title.title }}</strong> · {{ 'activo' if title.active else 'disponible' }}</span><button class="button" type="submit" {% if title.active %}disabled{% endif %}>Activar título</button></form>{% endfor %}</div>{% else %}<p class="empty-state">Completa objetivos para desbloquear títulos.</p>{% endif %}</section>
<section class="panel" aria-labelledby="season-archive-title"><h2 id="season-archive-title">Archivo de ciclos</h2>{% if season_repeat_requested %}<p role="status">Repetición programada al terminar el ciclo activo: {{ season_repeat_requested.title }}.</p>{% endif %}<div class="table-wrap"><table><caption>Temporadas guardadas, incluida la actual.</caption><thead><tr><th scope="col">Ciclo</th><th scope="col">Periodo</th><th scope="col">Estado</th><th scope="col">Resultado</th><th scope="col">Repetición</th></tr></thead><tbody>{% for season in season_archive %}<tr><th scope="row">{{ season.title }}</th><td>{{ season.starts_at|date_label }} — {{ season.ends_at|date_label }}</td><td>{{ season.status }}</td><td>{{ season.completed or 0 }} de {{ season.objectives or 0 }} objetivos</td><td>{% if season.status == 'archived' %}<form method="post" action="{{ url_for('season_repeat_action') }}"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><input type="hidden" name="season_id" value="{{ season.id }}"><button class="button" type="submit">Repetir después del ciclo activo</button></form>{% else %}Ciclo activo{% endif %}</td></tr>{% endfor %}</tbody></table></div></section>
