{% extends "base.html" %}

{% block title %}工作台大屏{% endblock %}

{% block content %}
  <section class="page-header">
    <span class="eyebrow">Workbench</span>
    <h1 class="page-title">工作台</h1>
    <p class="page-lead">用简洁视图展示当前批次状态、主要问题和下一步动作。</p>
  </section>

  <section class="metric-grid">
    <article class="metric-card">
      <div class="metric-label">当前阶段</div>
      <div class="metric-value">{{ batch.stage }}</div>
    </article>
    <article class="metric-card">
      <div class="metric-label">整体完成度</div>
      <div class="metric-value">{{ batch.completion }}</div>
    </article>
    <article class="metric-card">
      <div class="metric-label">高优先级问题</div>
      <div class="metric-value">03</div>
    </article>
  </section>

  <section class="grid-3">
    <article class="panel">
      <h2 class="section-title">流程</h2>
      <div class="stack" style="margin-top: 14px;">
        {% for step in workflow_overview %}
          <div class="detail-item"><strong>{{ step.title }}</strong><div class="muted">{{ step.detail }}</div></div>
        {% endfor %}
      </div>
    </article>

    <article class="panel">
      <h2 class="section-title">执行记录</h2>
      <div class="stack" style="margin-top: 14px;">
        {% for step in workflow_steps %}
          <div class="detail-item"><strong>{{ step.time }} {{ step.title }}</strong><div class="muted">{{ step.detail }}</div></div>
        {% endfor %}
      </div>
    </article>

    <article class="panel">
      <h2 class="section-title">待处理问题</h2>
      <ul class="risk-list">
        {% for risk in risk_board %}
          <li class="risk-item">
            <strong>{{ risk.title }}</strong>
            <div class="muted">{{ risk.action|default:risk.detail }}</div>
          </li>
        {% endfor %}
      </ul>
    </article>
  </section>
{% endblock %}
