:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --mint: #10b981;
  --mint-soft: #d1fae5;
  --amber: #f59e0b;
  --danger: #b91c1c;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand { font-weight: 700; letter-spacing: 0.01em; }
.bar-note { color: var(--muted); font-size: 14px; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 24px; }
.narrow { max-width: 640px; margin: 0 auto; padding: 48px 24px; }
h1 { font-size: 1.8rem; margin: 0 0 8px; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
.lede, .muted { color: var(--muted); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
}
label { display: block; font-weight: 600; margin: 12px 0 6px; }
input[type="checkbox"] { width: auto; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 12px; }
.repeat { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 12px 0; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 96px; resize: vertical; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 180px; }
.button, button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 650;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button.ghost, a.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
button.warn { background: var(--danger); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.layout { display: grid; grid-template-columns: 240px 1fr; gap: 20px; }
.layout > * { min-width: 0; }
.scroll { overflow-x: auto; }
.side { display: flex; flex-direction: column; gap: 8px; }
.side button {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
}
.side button.active { border-color: var(--mint); box-shadow: inset 3px 0 0 var(--mint); }
.meter { height: 8px; background: var(--mint-soft); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.meter span { display: block; height: 100%; background: var(--mint); width: 0; }
.pill { font-size: 12px; padding: 3px 8px; border-radius: 99px; background: #e2e8f0; }
.pill.submitted { background: #dbeafe; }
.pill.locked { background: #fee2e2; }
.pill.in_progress { background: var(--mint-soft); }
.lang { display: flex; gap: 4px; background: #f1f5f9; border-radius: 999px; padding: 4px; }
.lang button { background: transparent; color: var(--ink); padding: 6px 12px; }
.lang button.active { background: var(--amber); color: #fff; }
.note { background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 12px; }
.error { color: var(--danger); }
.file { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 800px) {
  .bar { flex-wrap: wrap; align-items: center; }
  .brand { flex: 1 1 160px; }
  .layout { grid-template-columns: 1fr; }
  .side { flex-direction: row; overflow-x: auto; }
  .side button { white-space: nowrap; }
  .wrap { padding: 16px; }
}
