:root {
  color-scheme: light;
  --bg: #fafaf7;
  --surface: #ffffff;
  --surface-soft: #f4f4ed;
  --line: #e5e3d8;
  --line-strong: #d0ccbd;
  --text: #27241f;
  --muted: #6d675a;
  --academy: #1a263a;
  --academy-2: #2c3e5e;
  --academy-soft: #eef2f7;
  --seal: #8a3434;
  --seal-soft: #fff1f0;
  --sage: #5b6b3a;
  --amber: #9a6a18;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 22px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

body {
  min-width: 320px;
}

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

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  background:
    linear-gradient(90deg, rgba(250, 250, 247, 0.92), rgba(250, 250, 247, 0.72)),
    url("data:image/svg+xml,%3Csvg width='1200' height='900' viewBox='0 0 1200 900' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1200' height='900' fill='%23f7f6ef'/%3E%3Cpath d='M0 732C192 681 329 728 489 660C681 578 740 389 944 344C1058 319 1144 341 1200 369V900H0V732Z' fill='%23e8edf4'/%3E%3Cpath d='M0 322C150 250 306 293 432 232C561 170 608 76 740 55C916 27 1071 105 1200 174V0H0V322Z' fill='%23efe7dc'/%3E%3Cpath d='M154 524H1048' stroke='%23d7d4c7' stroke-width='2'/%3E%3Cpath d='M214 464H625' stroke='%23c9d1df' stroke-width='2'/%3E%3Cpath d='M214 584H784' stroke='%23c9d1df' stroke-width='2'/%3E%3Ccircle cx='872' cy='523' r='82' fill='%23ffffff' stroke='%23d7d4c7' stroke-width='2'/%3E%3Cpath d='M837 531L865 557L914 493' stroke='%238a3434' stroke-width='10' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}

.auth-info {
  padding: 64px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100vh;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--academy);
  color: #fffdf7;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 22px;
}

.brand-title {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 22px;
  color: var(--academy);
}

.brand-subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.auth-copy {
  align-self: center;
  max-width: 860px;
}

.auth-copy h1 {
  margin: 0 0 14px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 36px;
  line-height: 1.22;
  color: var(--academy);
  letter-spacing: 0;
  white-space: nowrap;
}

.auth-copy p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.auth-metrics {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.metric-strip {
  min-width: 150px;
  padding: 14px 16px;
  border: 1px solid rgba(208, 204, 189, 0.8);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  border-radius: 8px;
}

.metric-value {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 24px;
  color: var(--academy);
}

.metric-label {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.auth-panel-wrap {
  display: flex;
  align-items: center;
  padding: 32px;
}

.auth-panel {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface-soft);
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.tab {
  border: 0;
  border-radius: 6px;
  padding: 9px 10px;
  background: transparent;
  color: var(--muted);
}

.tab.active {
  background: #fff;
  color: var(--academy);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  font-weight: 650;
}

.form-stack {
  display: grid;
  gap: 14px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  padding: 9px 11px;
  color: var(--text);
  outline: none;
}

.field textarea {
  min-height: 108px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--academy-2);
  box-shadow: 0 0 0 3px rgba(44, 62, 94, 0.12);
}

.field-hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 8px 13px;
  color: var(--text);
  background: #fff;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn:not(:disabled):active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--academy);
  color: #fffdf7;
}

.btn-primary:hover {
  background: var(--academy-2);
}

.btn-seal {
  background: var(--seal);
  color: #fffdf7;
}

.btn-seal:hover {
  background: #a13f3f;
}

.btn-ghost {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--academy);
}

.btn-ghost:hover {
  background: var(--surface-soft);
}

.btn-icon {
  width: 36px;
  min-width: 36px;
  padding: 0;
}

.demo-logins {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.demo-logins .btn {
  width: 100%;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fffdf7;
  background: var(--academy);
  font-weight: 700;
}

.avatar.small {
  width: 28px;
  height: 28px;
  font-size: 13px;
}

.avatar.large {
  width: 58px;
  height: 58px;
  font-size: 22px;
}

.user-name {
  font-size: 14px;
  font-weight: 700;
}

.user-meta,
.muted {
  color: var(--muted);
}

.user-meta {
  margin-top: 1px;
  font-size: 12px;
}

.unread-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--seal);
}

.main-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
}

.sidebar {
  min-height: calc(100vh - 66px);
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 14px 12px;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 6px;
  padding: 10px 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.nav button:hover,
.nav button.active {
  background: var(--surface-soft);
  color: var(--academy);
}

.nav button.active {
  border-left-color: var(--seal);
  font-weight: 700;
}

.side-note {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.content {
  width: 100%;
  max-width: 1380px;
  padding: 28px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
}

.page-head h1 {
  margin: 0 0 5px;
  color: var(--academy);
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 26px;
  letter-spacing: 0;
}

.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

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

.span-2 {
  grid-column: span 2;
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.card.pad {
  padding: 18px;
}

.card.clickable,
.student-card.clickable {
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.card.clickable:hover,
.student-card.clickable:hover {
  border-color: var(--academy-2);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.student-card {
  display: flex;
  flex-direction: column;
  min-height: 310px;
}

.student-hero {
  background: linear-gradient(180deg, #fff, #fbfbf7);
}

.student-profile-snippet {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.student-profile-snippet div,
.student-profile-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
  min-width: 0;
}

.student-profile-snippet span,
.student-profile-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.student-profile-snippet strong,
.student-profile-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

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

.profile-grid-wide {
  grid-column: span 4;
}

.profile-preview {
  display: grid;
  gap: 14px;
}

.achievement-panel.needs-review {
  border-color: #ead39f;
  background: #fffdf7;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 26px rgba(154, 106, 24, 0.08);
}

.graduation-achievement-card {
  border-color: #d8cfaa;
  background: linear-gradient(180deg, #fffdf7, #ffffff);
}

.graduation-achievement-card.approved {
  border-color: #c7dfbe;
  background: linear-gradient(180deg, #f7fbf3, #ffffff);
}

.graduation-achievement-card.pending {
  border-color: #ead39f;
  background: linear-gradient(180deg, #fffaf0, #ffffff);
}

.graduation-achievement-card.revising {
  border-color: #efc7c5;
  background: linear-gradient(180deg, #fff8f7, #ffffff);
}

.graduation-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
  margin: 12px 0 14px;
}

.graduation-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--academy-2);
}

.graduation-achievement-card.approved .graduation-progress-bar {
  background: var(--sage);
}

.graduation-achievement-card.pending .graduation-progress-bar {
  background: var(--amber);
}

.graduation-achievement-card.revising .graduation-progress-bar {
  background: var(--seal);
}

.achievement-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.achievement-kpis div,
.achievement-kpi-action {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.74);
  text-align: left;
}

.achievement-kpi-action {
  color: inherit;
}

.achievement-kpi-action.clickable {
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.achievement-kpi-action.clickable:hover {
  border-color: var(--academy-2);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.achievement-kpis strong {
  display: block;
  color: var(--academy);
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 24px;
  line-height: 1;
}

.achievement-kpis span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.graduation-achievement-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.graduation-achievement-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.graduation-note,
.graduation-achievement-row {
  min-width: 0;
}

.student-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.student-metrics div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: var(--surface-soft);
}

.student-metrics strong {
  display: block;
  color: var(--academy);
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 20px;
  line-height: 1;
}

.student-metrics span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

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

.section-title h2,
.section-title h3 {
  margin: 0;
  color: var(--academy);
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 18px;
  letter-spacing: 0;
}

.stat-card {
  padding: 18px;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
}

.stat-value {
  margin-top: 4px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 32px;
  color: var(--academy);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  white-space: nowrap;
}

.pill.pending {
  border: 1px solid #ead39f;
  background: #fff8e7;
  color: var(--amber);
}

.pill.drafting {
  border: 1px solid #cfd8e7;
  background: var(--academy-soft);
  color: var(--academy-2);
}

.pill.revising {
  border: 1px solid #efc7c5;
  background: var(--seal-soft);
  color: var(--seal);
}

.pill.approved {
  border: 1px solid #c7dfbe;
  background: #f0f7eb;
  color: var(--sage);
}

.pill.neutral {
  background: var(--surface-soft);
  color: var(--muted);
}

.pill.high {
  background: var(--seal-soft);
  color: var(--seal);
}

.pill.medium {
  background: #fff8e7;
  color: var(--amber);
}

.pill.low {
  background: var(--surface-soft);
  color: var(--muted);
}

.stage-bar {
  display: flex;
  align-items: flex-start;
  width: 100%;
  overflow-x: auto;
  padding: 2px 0 4px;
}

.stage-step {
  display: flex;
  align-items: flex-start;
  flex: 1 0 96px;
  min-width: 86px;
}

.stage-content {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 64px;
}

.stage-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid var(--line-strong);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stage-label {
  color: var(--muted);
  font-size: 12px;
}

.stage-step.done .stage-dot {
  border-color: var(--academy-2);
  background: var(--academy-2);
  color: #fff;
}

.stage-step.current .stage-dot {
  border-color: var(--seal);
  background: var(--seal);
  color: #fff;
}

.stage-step.done .stage-label {
  color: var(--academy-2);
}

.stage-step.current .stage-label {
  color: var(--seal);
  font-weight: 700;
}

.stage-line {
  height: 2px;
  flex: 1;
  margin: 13px 4px 0;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 4px, transparent 4px 8px);
}

.stage-line.done {
  background: var(--academy-2);
}

.list {
  display: grid;
  gap: 10px;
}

.list-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.list-item.soft {
  background: var(--surface-soft);
}

.audit-list {
  display: grid;
  gap: 10px;
}

.audit-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.audit-main {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
}

.audit-copy {
  min-width: 0;
}

.audit-title,
.audit-summary {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.audit-summary {
  margin-top: 8px;
  line-height: 1.7;
  color: var(--text);
}

.audit-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.audit-item.compact {
  grid-template-columns: minmax(0, 1fr);
}

.audit-item.compact .audit-actions {
  margin-top: 10px;
}

.achievement-card.needs-review {
  border-color: #ead39f;
  background: #fffaf0;
}

.achievement-actions {
  justify-content: flex-end;
  margin-top: 12px;
  flex-wrap: wrap;
}

.detail-grid {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.detail-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

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

.detail-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.file-pill {
  border: 1px solid #cfd8e7;
  appearance: none;
  background: var(--surface-soft);
  cursor: pointer;
  color: var(--academy-2);
  text-decoration: none;
}

.file-pill:hover {
  color: var(--academy);
  text-decoration: underline;
}

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

.attachment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.attachment-row strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
}

.attachment-row.unavailable {
  background: var(--surface-soft);
}

.list-item.clickable {
  cursor: pointer;
}

.list-item.clickable:hover {
  border-color: var(--academy-2);
  box-shadow: var(--shadow);
}

.target-highlight {
  border-color: var(--seal) !important;
  box-shadow: 0 0 0 3px rgba(138, 52, 52, 0.12), var(--shadow) !important;
  animation: targetPulse 1.4s ease 0s 2;
}

@keyframes targetPulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(138, 52, 52, 0.12), var(--shadow);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(138, 52, 52, 0.2), 0 14px 32px rgba(15, 23, 42, 0.1);
  }
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.row.between {
  justify-content: space-between;
}

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

.stack {
  display: grid;
  gap: 12px;
}

.title-line {
  color: var(--text);
  font-weight: 700;
}

.small {
  font-size: 12px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

tr:hover td {
  background: #fdfdf9;
}

.timeline {
  position: relative;
  display: grid;
  gap: 14px;
  padding-left: 22px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 6px;
  width: 2px;
  background: var(--line);
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--seal);
}

.timeline-item.teacher::before {
  border-color: var(--academy-2);
  background: var(--academy-2);
}

.timeline-body {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  line-height: 1.7;
}

.empty-title {
  color: var(--text);
  font-weight: 700;
}

.empty-detail {
  max-width: 460px;
}

.empty-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.message-item .row.start {
  align-items: flex-start;
}

.message-action {
  flex: 0 0 auto;
}

.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.chip {
  border: 0;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 7px 11px;
  font-size: 13px;
}

.chip.active {
  background: var(--academy);
  color: #fffdf7;
}

.todo-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 16px;
  align-items: start;
}

.todo-column {
  min-width: 0;
}

.todo-column .list {
  min-width: 0;
}

.todo-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  overflow: hidden;
  transform: perspective(900px) rotateY(0) translateY(0);
  transition: box-shadow 0.16s ease, transform 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
  will-change: transform;
}

.todo-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: flex-start;
}

.todo-card-copy {
  min-width: 0;
}

.todo-title,
.todo-desc,
.todo-due,
.todo-subtask-copy span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.todo-title {
  line-height: 1.35;
}

.todo-desc {
  margin-top: 5px;
  line-height: 1.6;
}

.todo-card-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  align-items: center;
}

.todo-card-actions .btn:not(.btn-icon) {
  min-width: 54px;
}

.todo-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  margin-top: 8px;
}

.todo-meta-row .pill {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.todo-subtasks {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin-top: 10px;
}

.todo-subtask-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  background: #fff;
}

.todo-subtask-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.todo-subtask-copy span {
  min-width: 0;
}

.todo-due {
  margin-top: 8px;
}

.todo-card[draggable="true"] {
  cursor: grab;
}

.todo-card.dragging {
  opacity: 0.88;
  cursor: grabbing;
  box-shadow: 0 18px 42px rgba(18, 26, 41, 0.2);
  transform: perspective(900px) rotateY(var(--tilt, 0deg)) rotateX(3deg) translateY(-4px) scale(1.015);
}

.todo-drop-zone {
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.todo-drop-zone.over {
  border-color: var(--academy-2);
  background: #f8fafd;
  box-shadow: inset 0 0 0 2px rgba(44, 62, 94, 0.12);
}

.todo-card.overdue {
  border-color: #efc7c5;
  background: #fff8f7;
}

.todo-card.done .title-line {
  color: var(--muted);
  text-decoration: line-through;
}

.gantt-card {
  overflow: hidden;
}

.gantt-scroll {
  overflow-x: auto;
  padding-bottom: 6px;
}

.gantt-grid {
  display: grid;
  grid-template-columns: 240px minmax(520px, 1fr);
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.gantt-label,
.gantt-timeline {
  min-height: 56px;
  border-bottom: 1px solid var(--line);
}

.gantt-label {
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.gantt-head {
  min-height: 42px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.gantt-timeline {
  position: relative;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(229, 227, 216, 0.82) 0,
      rgba(229, 227, 216, 0.82) 1px,
      transparent 1px,
      transparent 42px
    );
}

.gantt-tick {
  position: absolute;
  top: 11px;
  transform: translateX(-50%);
  white-space: nowrap;
}

.gantt-bar {
  position: absolute;
  top: 15px;
  height: 26px;
  min-width: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  box-shadow: 0 7px 16px rgba(18, 26, 41, 0.12);
}

.gantt-bar.pending {
  background: var(--amber);
}

.gantt-bar.in_progress {
  background: var(--academy-2);
}

.gantt-bar.done {
  background: var(--sage);
}

.gantt-bar.archived {
  background: var(--muted);
}

.gantt-bar.overdue {
  background: var(--seal);
}

.gantt-date {
  position: absolute;
  top: 18px;
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(18, 26, 41, 0.42);
  backdrop-filter: blur(7px);
}

.modal-panel {
  width: min(620px, 100%);
  max-height: min(720px, 92vh);
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(18, 26, 41, 0.22);
}

.modal-inner {
  padding: 22px;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 22px;
  bottom: 22px;
  max-width: min(420px, calc(100vw - 44px));
  border-radius: 8px;
  padding: 11px 14px;
  background: var(--academy);
  color: #fffdf7;
  box-shadow: var(--shadow);
}

.danger {
  color: var(--seal);
}

.success {
  color: var(--sage);
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

@media (max-width: 1080px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: auto;
    padding: 32px;
    gap: 42px;
  }

  .auth-copy {
    align-self: flex-start;
  }

  .auth-copy h1 {
    white-space: normal;
  }

  .auth-panel-wrap {
    padding-top: 0;
  }

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

  .sidebar {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

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

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

  .profile-grid-wide {
    grid-column: span 2;
  }

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

  .span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 720px) {
  .topbar {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
  }

  .content {
    padding: 18px;
  }

  .page-head {
    flex-direction: column;
  }

  .grid.cols-4,
  .grid.cols-3,
  .grid.cols-2,
  .student-profile-grid,
  .todo-board,
  .field-row {
    grid-template-columns: 1fr;
  }

  .profile-grid-wide {
    grid-column: span 1;
  }

  .audit-item {
    grid-template-columns: 1fr;
  }

  .audit-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

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

  .graduation-achievement-row {
    flex-direction: column;
  }

  .message-item .row.start {
    flex-wrap: wrap;
  }

  .message-action {
    margin-left: 28px;
  }

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

  .auth-info,
  .auth-panel-wrap {
    padding: 20px;
  }

  .auth-copy h1 {
    font-size: 28px;
  }
}
