:root {
  --bg: #0b1220;
  --panel: #0f1b2d;
  --panel2: #12223a;
  --text: #e6eefc;
  --muted: #99a9c6;
  --border: rgba(255, 255, 255, 0.08);
  --red: #ff4d4d;
  --yellow: #ffcc00;
  --green: #22c55e;
  --gray: rgba(255, 255, 255, 0.12);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(1200px 600px at 20% -10%, rgba(34,197,94,0.12), transparent),
              radial-gradient(900px 500px at 90% 0%, rgba(255,77,77,0.12), transparent),
              var(--bg);
  color: var(--text);
}

a { color: #9cd6ff; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.muted { color: var(--muted); margin-top: 6px; }

.container { max-width: 1100px; margin: 18px auto; padding: 0 14px 40px; }

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 27, 45, 0.6);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.title { font-size: 18px; font-weight: 700; }
.subtitle { color: var(--muted); margin-top: 4px; font-size: 13px; }
.userbox { text-align: right; }
.user { font-size: 13px; color: var(--muted); }
.role { margin-top: 6px; }

.card {
  background: linear-gradient(180deg, rgba(18, 34, 58, 0.95), rgba(15, 27, 45, 0.95));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-top: 12px;
}
.card-title { font-weight: 700; margin-bottom: 10px; }

.list { list-style: none; padding: 0; margin: 0; }
.list-item { padding: 10px 0; border-top: 1px solid var(--border); }
.list-item:first-child { border-top: 0; }
.task-title { font-weight: 600; }
.task-meta { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}
.badge-gray { background: rgba(255, 255, 255, 0.04); }
.badge-red { background: rgba(255, 77, 77, 0.12); color: #ffd1d1; }
.badge-yellow { background: rgba(255, 204, 0, 0.12); color: #fff2b3; }
.badge-green { background: rgba(34, 197, 94, 0.12); color: #bff5d4; }

.form { display: flex; flex-direction: column; gap: 10px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
label { color: var(--muted); font-size: 12px; }
input, select, textarea {
  background: rgba(0,0,0,0.18);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 10px;
  font-size: 13px;
}
textarea { resize: vertical; }

.notice {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(34, 197, 94, 0.12);
  color: #bff5d4;
  margin-bottom: 10px;
  font-size: 13px;
}
.notice-error {
  background: rgba(255, 77, 77, 0.12);
  color: #ffd1d1;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
}
.btn-secondary { background: rgba(255,255,255,0.04); }

.programs { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.program {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0,0,0,0.12);
  overflow: hidden;
}
.program-summary {
  cursor: pointer;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  list-style: none;
}
.program-summary::-webkit-details-marker { display: none; }
.program-left, .program-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.program-name { font-weight: 700; }
.program-body { padding: 10px 12px 14px; border-top: 1px solid var(--border); }

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-green { background: var(--green); box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12); }
.dot-yellow { background: var(--yellow); box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.12); }
.dot-red { background: var(--red); box-shadow: 0 0 0 4px rgba(255, 77, 77, 0.12); }

.tree { list-style: none; padding-left: 14px; margin: 10px 0 0; }
.tree-item { margin-top: 8px; padding-left: 10px; border-left: 1px dashed rgba(255,255,255,0.16); }
.tree-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.tree-main { font-size: 13px; }
.tree-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.project-desc { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.35; white-space: pre-wrap; }

.question-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.question-body { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.question-choice { display: flex; align-items: center; gap: 8px; }
.radio { display: flex; align-items: center; gap: 8px; margin-top: 6px; cursor: pointer; }
