<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>姓名记录管理</title>
  <style>
  body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 20px;
  background-color: #f5f5f5;
  }
  .container {
  max-width: 800px;
  margin: 0 auto;
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  }
  h2 {
  text-align: center;
  color: #333;
  margin-bottom: 20px;
  }
  table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  }
  td {
  padding: 8px;
  text-align: center;
  border: 1px solid #ddd;
  }
  .btn {
  display: block;
  width: 200px;
  margin: 10px auto;
  padding: 10px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  text-decoration: none;
  text-align: center;
  }
  .btn:hover {
  background-color: #45a049;
  }
  .btn-reset {
  background-color: #f44336;
  }
  .btn-reset:hover {
  background-color: #da190b;
  }
  .label {
  text-align: center;
  margin-top: 15px;
  font-weight: bold;
  color: #666;
  font-size: 18px;
  }
  </style>
</head>
<body>
  <div class="container">
  <h2>签到情况</h2>
  {{table_html}}
  <div class="label">讲台</div>
  <form method="POST" action="/checkin/{{classroom_id}}/save">
  <input type="hidden" name="action" value="save">
  <button type="submit" class="btn">保存为 CSV</button>
  </form>
  <form method="POST" action="/checkin/{{classroom_id}}/reset" onsubmit="return confirm('确定要重置所有数据吗？此操作不可恢复！');">
  <input type="hidden" name="action" value="reset">
  <button type="submit" class="btn btn-reset">重置</button>
  </form>
  </div>
</body>
</html>
