:root {
  --ink: #1c2b2a;
  --ink-soft: #4b5f5c;
  --line: #dfe6e4;
  --bg: #f6f8f7;
  --card: #ffffff;
  --brand: #1b4332;
  --brand-dark: #123526;
  --accent: #2d6a4f;
  --danger: #b3261e;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

a { color: var(--brand); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: var(--brand);
  color: #fff;
}
.topbar .brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 1.1rem; }
.topbar nav a { color: #d8e6df; text-decoration: none; margin-left: 20px; font-size: 0.9rem; }
.topbar nav a:hover { color: #fff; }

.page { max-width: 960px; margin: 0 auto; padding: 32px 24px 64px; }

.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.page-header h1 { margin: 0; font-size: 1.5rem; }
.page-header .actions { display: flex; gap: 8px; flex-wrap: wrap; }

h2 { font-size: 1.1rem; margin-top: 32px; }

.muted { color: var(--ink-soft); }
.small { font-size: 0.85rem; }
.error { color: var(--danger); font-weight: 600; }
.empty-state { color: var(--ink-soft); padding: 24px 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.form { max-width: 480px; display: flex; flex-direction: column; gap: 4px; }
.form label { font-weight: 600; font-size: 0.85rem; margin-top: 12px; }
.form input, .form select, .form textarea {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
}
.form button { margin-top: 20px; }

.btn {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: none;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-small { padding: 5px 10px; font-size: 0.82rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink-soft); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  margin: 2px 4px 2px 0;
  text-decoration: none;
  border: 1px solid var(--line);
  color: var(--ink);
}
.status-not_started { background: #f1f1f1; }
.status-in_progress { background: #fff3cd; border-color: #ffe08a; }
.status-submitted { background: #d7f0e3; border-color: #9fdcbb; }
.status-reviewed { background: #dbe9ff; border-color: #a9c8ff; }

.link-code { background: #eef2f0; padding: 2px 6px; border-radius: 4px; font-size: 0.82rem; }

.login-wrap { display: flex; justify-content: center; align-items: center; min-height: 80vh; }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; width: 320px; display: flex; flex-direction: column; }
.login-card h1 { margin: 0 0 4px; font-size: 1.3rem; }
.login-card input { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.login-card button { margin-top: 20px; }

.missing-box { border-color: #f0c14b; background: #fffbea; margin-bottom: 24px; }
.missing-box h2 { margin-top: 0; }
.missing-box ul { margin: 8px 0 0; padding-left: 20px; }

.review-section { margin-bottom: 24px; }
.review-table td.review-label { width: 260px; font-weight: 600; color: var(--ink-soft); }

@media print {
  .no-print { display: none !important; }
  .topbar { display: none; }
  body { background: #fff; }
}
