:root {
  --bg: #eef4f3;
  --surface: #ffffff;
  --surface-soft: #f8fbfa;
  --ink: #182321;
  --muted: #64716d;
  --line: #d9e1de;
  --line-strong: #bdcac6;
  --sidebar: #173331;
  --sidebar-soft: #244642;
  --teal: #0f766e;
  --teal-soft: #d9ece8;
  --blue: #2563eb;
  --blue-soft: #dbeafe;
  --indigo: #4338ca;
  --indigo-soft: #e0e7ff;
  --green: #15803d;
  --green-soft: #dcfce7;
  --amber: #b45309;
  --amber-soft: #fef3c7;
  --red: #b91c1c;
  --red-soft: #fee2e2;
  --shadow: 0 18px 45px rgba(23, 35, 33, 0.12);
  --shadow-soft: 0 10px 25px rgba(23, 35, 33, 0.07);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(15, 118, 110, 0) 280px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.045), rgba(180, 83, 9, 0.035)),
    var(--bg);
  color: var(--ink);
  font-family:
    "Segoe UI",
    "Yu Gothic UI",
    "Hiragino Sans",
    "Meiryo",
    sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(24, 35, 33, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 35, 33, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, #000 0, transparent 520px);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 18px;
}

.login-panel {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-visual {
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 42px;
  color: #f8fffd;
  background:
    linear-gradient(rgba(23, 51, 49, 0.92), rgba(23, 51, 49, 0.9)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 18px),
    linear-gradient(135deg, #0f766e, #244642 58%, #4338ca);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-box {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--teal);
  background: #e9f8f5;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.18);
}

.login-visual h1 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: 0;
}

.login-visual p {
  max-width: 32em;
  margin: 0;
  color: #dcebe8;
}

.login-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.login-form h2,
.page-header h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: 0;
}

.page-header p,
.course-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 8px;
  margin: 24px 0 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.compact-field {
  margin: 12px 0 0;
}

.login-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  margin: 24px 0 0;
  background: #edf2f1;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.auth-switch button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
}

.auth-switch button.is-active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(23, 35, 33, 0.08);
}

.form-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  color: var(--red);
  background: var(--red-soft);
  border-radius: 6px;
  font-weight: 800;
}

.text-input {
  min-height: 44px;
  width: 100%;
  padding: 9px 11px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.date-input,
.number-input,
.select-input,
.textarea-input {
  width: 100%;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.date-input,
.number-input,
.select-input {
  min-height: 36px;
  padding: 7px 9px;
}

.number-input {
  max-width: 84px;
}

.compact-input {
  min-height: 36px;
  padding: 7px 9px;
}

.textarea-input {
  min-width: 190px;
  min-height: 54px;
  padding: 8px 9px;
  resize: vertical;
}

.text-input:focus,
.date-input:focus,
.number-input:focus,
.select-input:focus,
.textarea-input:focus {
  outline: 3px solid rgba(15, 118, 110, 0.18);
  border-color: var(--teal);
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.1);
}

input:disabled {
  color: #8b9693;
  background: #f2f5f4;
  border-color: var(--line);
}

.primary-btn,
.secondary-btn,
.course-button,
.danger-btn,
.nav-btn,
.tab-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.primary-btn,
.course-button {
  padding: 0 16px;
  color: #ffffff;
  background: var(--teal);
}

.primary-btn:hover,
.course-button:hover {
  background: #0b5f59;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.22);
}

.secondary-btn {
  padding: 0 14px;
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line-strong);
}

.secondary-btn:hover {
  border-color: var(--teal);
  background: #f4f8f7;
  box-shadow: var(--shadow-soft);
}

.danger-btn {
  padding: 0 12px;
  color: var(--red);
  background: var(--red-soft);
  border-color: #f4b8b8;
  font-weight: 800;
}

.danger-btn:hover {
  color: #ffffff;
  background: var(--red);
  border-color: var(--red);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  min-height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 26px 18px;
  color: #f8fffd;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 45%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 14px),
    var(--sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar .brand-mark {
  padding: 0 6px;
}

.profile {
  display: grid;
  gap: 6px;
  padding: 16px;
  background: var(--sidebar-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.profile-name {
  font-weight: 800;
}

.profile-role {
  color: #b8cfca;
  font-size: 12px;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.nav-btn {
  position: relative;
  justify-content: flex-start;
  width: 100%;
  padding: 0 12px;
  color: #dcebe8;
  background: transparent;
}

.nav-btn:hover,
.nav-btn.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-btn.is-active::before {
  content: "";
  width: 3px;
  height: 20px;
  position: absolute;
  left: 0;
  border-radius: 999px;
  background: #7dd3fc;
}

.sidebar-footer {
  margin-top: auto;
}

.main {
  min-width: 0;
  padding: 34px;
}

.page-header {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(189, 202, 198, 0.75);
}

.course-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.course-card {
  min-height: 270px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(23, 35, 33, 0.06);
}

.course-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.course-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
}

.course-badge {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  font-weight: 800;
}

.course-badge.ip {
  color: var(--teal);
  background: var(--teal-soft);
}

.course-badge.feb {
  color: var(--blue);
  background: var(--blue-soft);
}

.course-button {
  margin-top: auto;
  width: fit-content;
}

.notification-panel {
  margin-bottom: 18px;
  padding: 16px;
  background:
    linear-gradient(90deg, rgba(254, 243, 199, 0.72), rgba(255, 255, 255, 0.9)),
    var(--surface);
  border: 1px solid #f3d58c;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.notification-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.notification-head span,
.notification-days {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  color: var(--amber);
  background: var(--amber-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.notification-list {
  display: grid;
  gap: 8px;
}

.notification-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid #f1deb1;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(180, 83, 9, 0.06);
}

.notification-item div {
  display: grid;
  gap: 2px;
}

.notification-item span {
  color: var(--muted);
  font-size: 13px;
}

.tabs {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  margin-bottom: 16px;
  background: rgba(237, 242, 241, 0.84);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.tab-btn {
  min-height: 36px;
  padding: 0 13px;
  color: var(--muted);
  background: transparent;
}

.tab-btn.is-active {
  color: var(--ink);
  background: var(--surface);
  border-color: rgba(15, 118, 110, 0.18);
  box-shadow: 0 5px 14px rgba(23, 35, 33, 0.1);
}

.admin-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  margin-bottom: 16px;
  background: rgba(237, 242, 241, 0.84);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.admin-panel {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.admin-panel-head h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: 0;
}

.admin-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-count,
.code-chip {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0 10px;
  color: var(--muted);
  background: #edf2f1;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.admin-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.admin-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: var(--surface);
}

.admin-test-table {
  min-width: 1460px;
}

.admin-pass-table {
  min-width: 760px;
}

.admin-student-table {
  min-width: 1440px;
}

.admin-table th,
.admin-table td {
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th:last-child,
.admin-table td:last-child {
  border-right: 0;
}

.admin-table tbody tr:last-child th,
.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-table thead th {
  color: var(--muted);
  background: #edf2f1;
  font-size: 12px;
  white-space: nowrap;
}

.admin-table tbody tr:nth-child(even) td,
.admin-table tbody tr:nth-child(even) th {
  background: #fbfdfc;
}

.admin-table tbody tr:hover td,
.admin-table tbody tr:hover th {
  background: #f2f8f6;
}

.admin-test-name {
  min-width: 210px;
}

.admin-note {
  min-width: 260px;
}

.order-input {
  max-width: 72px;
}

.student-no-input,
.class-input,
.login-name-input,
.password-input {
  min-width: 120px;
}

.admin-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  white-space: nowrap;
}

.admin-check input,
.course-checks input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.admin-check span {
  color: var(--muted);
  font-size: 13px;
}

.course-checks {
  display: grid;
  gap: 8px;
  min-width: 180px;
}

.course-checks label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.target-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.target-filters label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.target-quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.target-toggle {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: #f7faf9;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 800;
}

.target-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.target-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.target-summary div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  border-left: 4px solid var(--teal);
}

.target-summary span {
  color: var(--muted);
  font-size: 12px;
}

.target-summary strong {
  font-size: 19px;
  line-height: 1.25;
}

.target-list-table {
  min-width: 1420px;
}

.target-list-table tbody tr.is-failed th,
.target-list-table tbody tr.is-failed td,
.target-list-table tbody tr.is-failed {
  background: #fffafa;
}

.highlight-cell {
  color: var(--red);
  background: var(--red-soft) !important;
  font-weight: 800;
}

.empty-cell {
  padding: 18px !important;
  color: var(--muted);
  text-align: center !important;
}

.stage-panel {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-title-row h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: 0;
}

.gantt-title-row {
  align-items: flex-start;
}

.panel-lead {
  margin: 5px 0 0;
  color: var(--muted);
}

.pass-score-chip {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 12px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.gantt-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.gantt-summary div {
  display: grid;
  gap: 2px;
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  border-left: 4px solid var(--teal);
}

.gantt-summary div:nth-child(2) {
  border-left-color: var(--blue);
}

.gantt-summary div:nth-child(3) {
  border-left-color: var(--green);
}

.gantt-summary div:nth-child(4) {
  border-left-color: var(--red);
}

.gantt-summary span {
  color: var(--muted);
  font-size: 12px;
}

.gantt-summary strong {
  font-size: 22px;
  line-height: 1.2;
}

.pre-oral-panel {
  margin-bottom: 16px;
  padding: 16px;
  background: #f7faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pre-oral-panel.is-required {
  background: #fffafa;
  border-color: #f4b8b8;
}

.pre-oral-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.pre-oral-head h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0;
}

.pre-oral-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.pre-oral-status {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.pre-oral-status.required {
  color: var(--red);
  background: var(--red-soft);
}

.pre-oral-status.optional {
  color: var(--muted);
  background: #edf2f1;
}

.pre-oral-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 12px;
}

.pre-oral-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pre-oral-field span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pre-oral-note {
  grid-column: 1 / -1;
}

.date-compare-panel {
  margin-bottom: 16px;
  padding: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.date-compare-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.date-compare-head h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0;
}

.date-compare-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.date-compare-metrics {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.date-compare-metrics span,
.date-status {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.date-compare-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 0.9fr);
  gap: 14px;
}

.date-compare-chart {
  display: grid;
  gap: 9px;
}

.date-bar-row {
  display: grid;
  grid-template-columns: minmax(130px, 190px) minmax(180px, 1fr);
  gap: 10px;
  align-items: center;
}

.date-bar-name {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.date-bar-track {
  position: relative;
  min-height: 38px;
  background: linear-gradient(90deg, #e3ece9, #f8fbfa);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.date-marker {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.date-marker span {
  position: absolute;
  top: -24px;
  left: 50%;
  padding: 2px 6px;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.date-marker.target {
  background: var(--blue);
}

.date-marker.actual {
  top: calc(50% + 8px);
  background: var(--green);
}

.date-marker.actual span {
  top: 12px;
}

.date-compare-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.date-compare-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  background: var(--surface);
}

.date-compare-table th,
.date-compare-table td {
  padding: 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.date-compare-table th:last-child,
.date-compare-table td:last-child {
  border-right: 0;
}

.date-compare-table tbody tr:last-child td {
  border-bottom: 0;
}

.date-compare-table thead th {
  color: var(--muted);
  background: #edf2f1;
  font-size: 12px;
  white-space: nowrap;
}

.date-status.done {
  color: var(--green);
  background: var(--green-soft);
  border-color: transparent;
}

.date-status.attention {
  color: var(--red);
  background: var(--red-soft);
  border-color: transparent;
}

.date-status.pending {
  color: var(--muted);
  background: #edf2f1;
}

.empty-inline {
  margin: 0;
  color: var(--muted);
}

.gantt-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.gantt-table {
  width: 100%;
  min-width: 1560px;
  border-collapse: collapse;
  background: var(--surface);
}

.feb-gantt-table {
  min-width: 1320px;
}

.gantt-table th,
.gantt-table td {
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.gantt-table th:last-child,
.gantt-table td:last-child {
  border-right: 0;
}

.gantt-table tbody tr:last-child th,
.gantt-table tbody tr:last-child td {
  border-bottom: 0;
}

.gantt-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: #edf2f1;
  font-size: 12px;
  white-space: nowrap;
}

.gantt-table tbody th {
  width: 190px;
  background: #fbfdfc;
}

.gantt-table tbody tr:nth-child(even) td,
.gantt-table tbody tr:nth-child(even) th {
  background: #fbfdfc;
}

.gantt-table tbody tr:hover td,
.gantt-table tbody tr:hover th {
  background: #f2f8f6;
}

.gantt-table tbody tr.is-failed th,
.gantt-table tbody tr.is-failed td {
  background: #fffafa;
}

.gantt-table tbody tr.pre-oral-row th,
.gantt-table tbody tr.pre-oral-row td {
  background: #eef9f7;
}

.gantt-table tbody tr.pre-oral-row.is-required th,
.gantt-table tbody tr.pre-oral-row.is-required td {
  background: #fffafa;
}

.test-name {
  display: block;
  font-weight: 800;
}

.row-note {
  display: inline-flex;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.not-applicable {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.input-wrap {
  display: grid;
  gap: 5px;
  min-width: 136px;
}

.input-wrap.is-required input {
  border-color: #fca5a5;
  background: #fffafa;
}

.input-wrap.is-disabled {
  opacity: 0.72;
}

.required-badge {
  width: fit-content;
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 11px;
  font-weight: 800;
}

.result-chip {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.result-chip.pending {
  color: var(--muted);
  background: #edf2f1;
}

.result-chip.passed {
  color: var(--green);
  background: var(--green-soft);
}

.result-chip.failed {
  color: var(--red);
  background: var(--red-soft);
}

.exam-panel {
  margin-bottom: 16px;
  padding: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.exam-title-row {
  margin-bottom: 12px;
}

.exam-title-row h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0;
}

.exam-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 12px;
  align-items: start;
}

.exam-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.exam-note-field {
  grid-column: 1 / -1;
}

.timeline-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.timeline-item,
.check-row {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.timeline-number {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #ffffff;
  background: var(--teal);
  border-radius: 999px;
  font-weight: 800;
}

.check-preview {
  display: grid;
  gap: 10px;
}

.check-row {
  min-height: 54px;
}

.check-row .icon {
  color: var(--teal);
}

.checklist-title-row {
  align-items: flex-start;
}

.checklist-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.checklist-summary div {
  display: grid;
  gap: 4px;
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  border-left: 4px solid var(--teal);
}

.checklist-summary div:nth-child(2) {
  border-left-color: var(--blue);
}

.checklist-summary span {
  color: var(--muted);
  font-size: 12px;
}

.checklist-summary strong {
  font-size: 21px;
  line-height: 1.25;
}

.checklist-summary small {
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

.checklist-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.checklist-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: var(--surface);
}

.checklist-table th,
.checklist-table td {
  padding: 11px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.checklist-table th:last-child,
.checklist-table td:last-child {
  border-right: 0;
}

.checklist-table tbody tr:last-child th,
.checklist-table tbody tr:last-child td {
  border-bottom: 0;
}

.checklist-table thead th {
  color: var(--muted);
  background: #edf2f1;
  font-size: 12px;
  white-space: nowrap;
}

.checklist-table tbody th {
  min-width: 240px;
  background: #fbfdfc;
}

.checklist-table tbody tr.is-done th,
.checklist-table tbody tr.is-done td {
  background: #f7fcf8;
}

.checklist-table tbody tr:hover th,
.checklist-table tbody tr:hover td {
  background: #f2f8f6;
}

.check-input {
  width: 20px;
  height: 20px;
  accent-color: var(--teal);
}

.checklist-note {
  min-width: 260px;
}

.type-chip,
.status-chip {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.type-chip.required {
  color: var(--red);
  background: var(--red-soft);
}

.type-chip.optional {
  color: var(--blue);
  background: var(--blue-soft);
}

.status-chip.done {
  color: var(--green);
  background: var(--green-soft);
}

.status-chip.todo {
  color: var(--muted);
  background: #edf2f1;
}

@media (max-width: 920px) {
  .login-panel,
  .app-shell,
  .course-grid {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 310px;
  }

  .sidebar {
    min-height: auto;
  }

  .side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .course-page-header {
    flex-direction: column;
  }

  .timeline-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gantt-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checklist-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exam-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .target-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .target-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .date-compare-layout {
    grid-template-columns: 1fr;
  }

  .pre-oral-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .login-screen,
  .main {
    padding: 18px;
  }

  .login-visual,
  .login-form {
    padding: 28px 22px;
  }

  .login-visual h1 {
    font-size: 28px;
  }

  .login-two-col {
    grid-template-columns: 1fr;
  }

  .course-button,
  .secondary-btn {
    width: 100%;
  }

  .notification-item,
  .date-compare-head,
  .pre-oral-head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-head-actions {
    justify-content: stretch;
  }

  .admin-head-actions .secondary-btn,
  .admin-head-actions .admin-count {
    width: 100%;
  }

  .tabs,
  .admin-tabs {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .admin-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .timeline-preview {
    grid-template-columns: 1fr;
  }

  .gantt-summary {
    grid-template-columns: 1fr;
  }

  .checklist-summary {
    grid-template-columns: 1fr;
  }

  .gantt-title-row {
    flex-direction: column;
  }

  .checklist-title-row {
    flex-direction: column;
  }

  .exam-grid {
    grid-template-columns: 1fr;
  }

  .target-filters,
  .target-summary {
    grid-template-columns: 1fr;
  }

  .date-bar-row {
    grid-template-columns: 1fr;
  }

  .date-marker span {
    display: none;
  }

  .pass-score-chip {
    width: fit-content;
  }
}
