:root {
  --ink: #192437;
  --sub: #6b7788;
  --line: #dce3ea;
  --bg: #f3f6f9;
  --card: #fff;
  --nav: #26364d;
  --blue: #365676;
  --orange: #c47c39;
  --green: #287b5e;
  --red: #ae4747;
  --radius: 15px;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Pretendard, "Noto Sans KR", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a {
  color: var(--blue);
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
.shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--nav);
  color: #fff;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #ffffff16;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #fff;
  color: var(--nav);
  font-weight: 900;
}
.brand span:last-child {
  display: grid;
  gap: 3px;
}
.brand small,
.sidebar-user small {
  color: #b9c4d1;
}
.sidebar nav {
  display: grid;
  gap: 5px;
  padding: 18px 12px;
}
.sidebar nav a {
  padding: 11px 13px;
  border-radius: 9px;
  color: #e8edf3;
  font-size: 14px;
}
.sidebar nav a:hover {
  background: #ffffff12;
}
.sidebar-user {
  margin-top: auto;
  padding: 18px;
  border-top: 1px solid #ffffff16;
  display: grid;
  gap: 5px;
}
.sidebar-user form {
  margin-top: 8px;
}
.sidebar-user button {
  border: 1px solid #ffffff50;
  background: transparent;
  color: white;
  border-radius: 7px;
  padding: 6px 10px;
  cursor: pointer;
}
.main {
  min-width: 0;
}
.topbar {
  height: 65px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar > div {
  display: grid;
  gap: 3px;
}
.topbar small {
  color: var(--sub);
}
.content {
  max-width: 1480px;
  margin: auto;
  padding: 28px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 3px 16px #22334d0a;
  padding: 22px;
  margin-bottom: 18px;
}
.card.narrow {
  max-width: 640px;
}
.card h2,
.card h3 {
  margin: 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
}
.section-head p,
.help {
  margin: 5px 0 0;
  color: var(--sub);
  font-size: 13px;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.toolbar select {
  min-width: 260px;
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.metrics article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 19px;
  display: grid;
  gap: 8px;
}
.metrics small {
  color: var(--sub);
}
.metrics b {
  font-size: 28px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 9px 14px;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 650;
}
.button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.button.danger {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.button.small {
  padding: 6px 9px;
  font-size: 12px;
}
.stack {
  display: grid;
  gap: 14px;
}
.stack label,
.stack p,
.text-fields label,
.adjust-form label {
  display: grid;
  gap: 7px;
  color: var(--sub);
  font-size: 13px;
}
.stack input,
.stack select,
.stack textarea,
.toolbar select,
.inline-form input,
.adjust-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px;
  background: #fff;
  color: var(--ink);
}
.alert {
  padding: 12px 15px;
  border-radius: 10px;
  margin-bottom: 15px;
  background: #edf5ed;
  color: #27643e;
  border: 1px solid #cfe4d4;
}
.alert.error {
  background: #fff2f2;
  color: #8f3838;
  border-color: #edcccc;
}
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #26364d 0 42%, #e7edf2 42%);
}
.login-panel {
  width: min(430px, 100%);
  background: #fff;
  padding: 34px;
  border-radius: 20px;
  box-shadow: 0 25px 65px #17253835;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.login-brand div {
  display: grid;
}
.login-panel h1 {
  margin: 35px 0 5px;
}
.login-panel > p,
.security-note {
  color: var(--sub);
}
.security-note {
  display: block;
  margin-top: 18px;
  line-height: 1.6;
}
.task-list {
  display: grid;
  gap: 9px;
}
.task-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 14px 16px;
  color: var(--ink);
}
.task-row:hover {
  border-color: #9eb3c5;
  background: #f8fbfd;
}
.task-row > span:first-child {
  display: grid;
  gap: 5px;
}
.task-row small {
  color: var(--sub);
}
.badge {
  display: inline-flex;
  border-radius: 99px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  background: #eef1f4;
  color: #5e6875;
}
.badge.submitted,
.badge.finalized {
  background: #e7f4ed;
  color: var(--green);
}
.badge.in_progress,
.badge.open {
  background: #fff1df;
  color: #92591f;
}
.badge.not_started,
.badge.draft {
  background: #eff1f3;
  color: #68717c;
}
.badge.closed {
  background: #f6e9e9;
  color: #8b4242;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th,
td {
  padding: 10px 11px;
  border-bottom: 1px solid #e8edf1;
  text-align: center;
  white-space: nowrap;
}
th {
  background: #f7f9fb;
  color: #536174;
  font-size: 12px;
}
td.left {
  text-align: left;
  white-space: normal;
  min-width: 340px;
}
.inline-form {
  display: flex;
  gap: 5px;
  align-items: center;
}
.inline-form input {
  min-width: 150px;
  padding: 6px 8px;
}
.evaluation {
  display: grid;
  gap: 0;
}
.sticky-summary {
  position: sticky;
  top: 77px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-color: #b9cad7;
}
.sticky-summary > div:last-child {
  display: grid;
  text-align: right;
  gap: 4px;
}
.sticky-summary > div:last-child b {
  font-size: 22px;
  color: var(--blue);
}
.sticky-summary small {
  color: var(--sub);
}
.review-source {
  background: #f1f6fa;
}
.review-source p {
  color: var(--sub);
  font-size: 13px;
}
.question-group h3 {
  color: var(--blue);
  font-size: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.question {
  padding: 17px 0;
  border-bottom: 1px solid #edf0f3;
}
.question:last-child {
  border-bottom: 0;
}
.question-title {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.question-title small {
  color: var(--sub);
  white-space: nowrap;
}
.score-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.score-options input {
  position: absolute;
  opacity: 0;
}
.score-options span {
  display: grid;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px;
  cursor: pointer;
}
.score-options span small {
  color: var(--sub);
  font-size: 10px;
}
.score-options input:checked + span {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.score-options input:checked + span small {
  color: #dfe9f1;
}
.text-fields {
  display: grid;
  gap: 16px;
}
.text-fields textarea {
  min-height: 105px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fffdf5;
  resize: vertical;
}
.submit-bar {
  position: sticky;
  bottom: 0;
  z-index: 15;
  display: flex;
  gap: 15px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 -5px 22px #25384c18;
}
.submit-bar small {
  color: var(--sub);
}
.opinion {
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px;
  margin-top: 10px;
  line-height: 1.6;
}
.opinion b {
  display: block;
  color: var(--blue);
  margin-bottom: 5px;
}
.adjust-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-top: 16px;
}
.grade {
  font-size: 17px;
}
.grade.S {
  color: #b23e3e;
}
.grade.A {
  color: #315c82;
}
.grade.B {
  color: #2d7657;
}
.grade.C {
  color: #a36625;
}
.grade.D {
  color: #707780;
}
.chart {
  min-height: 260px;
  display: grid;
  place-items: center;
  color: var(--sub);
}
.chart svg {
  width: 100%;
  max-height: 300px;
}
.chart line {
  stroke: #dce3ea;
  stroke-dasharray: 5 5;
}
.chart polyline {
  fill: none;
  stroke: #365676;
  stroke-width: 3;
}
.chart circle {
  fill: #c47c39;
}
.chart text {
  font-size: 11px;
  fill: #607084;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 10px;
  color: var(--sub);
  font-size: 12px;
}
.chart-legend span::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 3px;
  margin-right: 6px;
  vertical-align: middle;
  background: currentColor;
}
.chart-legend .final { color: #365676; }
.chart-legend .self { color: #c47c39; }
.chart-legend .internal { color: #287b5e; }
.chart-legend .cross { color: #765691; }
.chart-legend .leader { color: #ae4747; }
.history-note {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.history-note:last-child { border-bottom: 0; }
.history-note > b { color: var(--blue); }
.history-note p {
  margin: 9px 0 0;
  line-height: 1.65;
}
.history-note p span {
  display: inline-block;
  min-width: 72px;
  margin-right: 8px;
  color: var(--sub);
  font-size: 12px;
  font-weight: 700;
}
.empty {
  text-align: center;
  padding: 35px;
  color: var(--sub);
}
@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
  }
  .sidebar-user {
    display: none;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .content {
    padding: 18px;
  }
  .score-options {
    grid-template-columns: repeat(5, minmax(64px, 1fr));
  }
}
@media (max-width: 620px) {
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .score-options {
    display: flex;
    overflow: auto;
  }
  .score-options label {
    min-width: 86px;
  }
  .question-title {
    display: grid;
  }
  .adjust-form {
    grid-template-columns: 1fr;
  }
  .submit-bar {
    display: grid;
  }
  .login-page {
    background: #26364d;
  }
  .topbar {
    padding: 0 18px;
  }
}
@media print {
  .sidebar,
  .topbar,
  .toolbar,
  .actions,
  .submit-bar {
    display: none !important;
  }
  .shell {
    display: block;
  }
  .content {
    max-width: none;
    padding: 0;
  }
  .card {
    box-shadow: none;
    break-inside: avoid;
  }
}
