:root {
  --ink: #162033;
  --muted: #6a7280;
  --line: #e8edf5;
  --paper: #ffffff;
  --soft: #f6f8fb;
  --blue: #1677ff;
  --blue-weak: #eaf1ff;
  --gold: #f6c75a;
  --gold-weak: #fff7df;
  --danger: #ec4a4a;
  --shadow: 0 18px 48px rgba(31, 52, 91, 0.12);
  --ant-primary: #1677ff;
  --ant-primary-hover: #4096ff;
  --ant-primary-active: #0958d9;
  --ant-success: #52c41a;
  --ant-warning: #faad14;
  --ant-error: #ff4d4f;
  --ant-text: #1f1f1f;
  --ant-text-secondary: rgba(0, 0, 0, 0.65);
  --ant-text-tertiary: rgba(0, 0, 0, 0.45);
  --ant-border: #d9d9d9;
  --ant-border-secondary: #f0f0f0;
  --ant-layout: #f5f5f5;
  --ant-container: #ffffff;
  --ant-container-subtle: #fafafa;
  --ant-radius: 6px;
  --ant-radius-lg: 8px;
  --ant-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 6px 16px rgba(0, 0, 0, 0.06);
  --ant-shadow-light: 0 1px 2px rgba(0, 0, 0, 0.03);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  background:
    linear-gradient(115deg, rgba(255,255,255,0.96) 0%, rgba(247,250,255,0.92) 42%, rgba(255,255,255,0.98) 100%),
    repeating-linear-gradient(135deg, rgba(22, 64, 130, 0.035) 0 1px, transparent 1px 8px);
}

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 228px 1fr;
  grid-template-rows: 72px 1fr;
}

.sidebar {
  grid-column: 1;
  grid-row: 2;
  padding: 20px 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.86), rgba(247,250,255,0.74)),
    radial-gradient(circle at 20% 0%, rgba(47,107,255,0.08), transparent 34%);
  border-right: 1px solid rgba(229, 235, 245, 0.86);
}

.crest,
.small-crest {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: #174b8e;
  border: 3px double #fff;
  box-shadow: 0 0 0 1px #174b8e;
  font-weight: 800;
}

.harbor-brand {
  display: inline-grid;
  justify-items: start;
  align-content: center;
  color: #101828;
  line-height: 1;
}

.harbor-word {
  position: relative;
  color: #a78363;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 48px;
  font-weight: 800;
  letter-spacing: 0;
}

.harbor-word::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 25px;
  width: 42px;
  height: 13px;
  border-bottom: 8px solid #a78363;
  border-left: 8px solid #a78363;
  transform: skewY(18deg);
  opacity: 0.95;
}

.harbor-word span {
  position: absolute;
  right: 1px;
  top: -8px;
  color: #a78363;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.harbor-brand strong {
  display: block;
  margin-top: 8px;
  color: #101828;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.harbor-brand-header {
  width: 174px;
  justify-items: start;
}

.harbor-brand-header .harbor-word {
  font-size: 47px;
}

.crest {
  width: 46px;
  height: 46px;
}

.small-crest {
  width: 48px;
  height: 48px;
  font-size: 18px;
}

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

.nav-item,
.nav-link {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #3b4556;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  font-size: 16px;
}

.nav-parent {
  color: #111827;
  font-weight: 700;
  background: rgba(255,255,255,0.7);
}

.nav-link {
  padding-left: 24px;
}

.nav-link.active {
  color: #2563ff;
  background: #fff;
  box-shadow: 0 12px 28px rgba(37, 99, 255, 0.08);
  font-weight: 700;
}

.nav-icon {
  width: 24px;
  text-align: center;
  color: #6481b8;
}

.chevron {
  margin-left: auto;
}

.main {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  display: grid;
  grid-template-rows: 74px 1fr;
}

.top-header {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.96), rgba(248,251,255,0.88)),
    repeating-linear-gradient(135deg, rgba(42, 74, 128, 0.05) 0 1px, transparent 1px 7px);
}

.title-group {
  display: flex;
  align-items: center;
  min-width: 0;
}

.title-divider {
  width: 1px;
  height: 40px;
  margin: 0 24px 0 4px;
  background: #d9e0eb;
}

.title-group h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.user-chip {
  border: 0;
  background: rgba(255,255,255,0.72);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  color: #243044;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mode-switch {
  height: 38px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border: 1px solid #dbe5f2;
  background: rgba(246,248,251,0.8);
  border-radius: 8px;
}

.mode-button {
  min-width: 78px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  font-weight: 800;
}

.mode-button.active {
  color: #2563ff;
  background: #fff;
  box-shadow: 0 6px 18px rgba(37, 99, 255, 0.12);
}

.avatar-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 35%, #fff 0 18%, transparent 19%),
    radial-gradient(circle at 50% 78%, #fff 0 28%, transparent 29%),
    linear-gradient(135deg, #7da6ff, #e5efff);
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(255,255,255,0.76);
  border-bottom: 1px solid rgba(226, 232, 240, 0.84);
}

.page-title {
  font-size: 18px;
  font-weight: 800;
}

.filters {
  display: flex;
  gap: 18px;
}

.select-wrap {
  height: 44px;
  min-width: 240px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  background: rgba(246, 248, 251, 0.92);
  border: 1px solid rgba(230, 236, 246, 0.9);
  border-radius: 8px;
  padding: 0 14px;
}

.select-wrap.wide {
  min-width: 460px;
}

.select-wrap span {
  color: #334155;
  font-weight: 700;
}

.select-wrap select {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111827;
}

.content {
  padding: 42px 36px 76px;
  overflow: auto;
  min-height: 0;
}

.evaluation-page {
  max-width: 1540px;
  margin: 0 auto;
}

.section {
  margin-bottom: 28px;
}

.section-head {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, var(--gold-weak), #fff);
  border-radius: 999px;
  padding: 10px 26px;
  font-size: 18px;
  font-weight: 800;
}

.section-title .badge-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(47,107,255,0.18);
}

.primary-button,
.ghost-button,
.danger-button,
.text-button {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 18px;
  font-weight: 700;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #2763ff, #35b8ff);
  box-shadow: 0 10px 24px rgba(47, 107, 255, 0.24);
}

.ghost-button {
  color: #344054;
  background: #f6f8fb;
  border-color: #e4e9f2;
}

.compact-action {
  min-height: 34px;
  padding: 0 14px;
  white-space: nowrap;
}

.danger-button {
  color: #fff;
  background: var(--danger);
}

.text-button {
  color: #2f6bff;
  background: #f4f8ff;
  border-color: #e5edff;
}

.empty-state {
  min-height: 340px;
  display: grid;
  place-items: center;
  color: #1f2937;
}

.empty-state-inner {
  text-align: center;
}

.empty-illustration {
  width: 74px;
  height: 86px;
  margin: 0 auto 16px;
  border-radius: 12px;
  background:
    linear-gradient(#d8e6ff 0 0) 22px 24px / 30px 5px no-repeat,
    linear-gradient(#d8e6ff 0 0) 22px 38px / 30px 5px no-repeat,
    linear-gradient(#d8e6ff 0 0) 22px 52px / 24px 5px no-repeat,
    linear-gradient(160deg, #f7fbff, #dce9ff);
  box-shadow: inset 0 0 0 1px #cfe0ff;
  position: relative;
}

.empty-illustration::before,
.empty-illustration::after {
  content: "";
  position: absolute;
  background: #d6e4ff;
  border-radius: 999px;
}

.empty-illustration::before {
  width: 22px;
  height: 4px;
  top: -12px;
  left: 4px;
  transform: rotate(56deg);
}

.empty-illustration::after {
  width: 22px;
  height: 4px;
  top: -12px;
  right: 4px;
  transform: rotate(-56deg);
}

.deed-list {
  display: grid;
  gap: 16px;
}

.indicator-stack {
  display: grid;
  gap: 18px;
}

.indicator-card {
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.indicator-head {
  min-height: 38px;
  margin-bottom: 12px;
}

.inline-teacher-card {
  padding: 16px 18px;
}

.indicator-deed-list {
  margin-top: 14px;
}

.deed-card,
.teacher-card,
.signature-card,
.placeholder-panel {
  background: rgba(248, 250, 252, 0.94);
  border-radius: 8px;
  border: 1px solid rgba(236, 240, 246, 0.9);
}

.deed-card {
  padding: 18px;
  box-shadow: 0 10px 32px rgba(31, 41, 55, 0.04);
}

.deed-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.deed-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.deed-time {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.deed-actions {
  display: flex;
  gap: 8px;
}

.deed-desc {
  margin: 14px 0 0;
  color: #172033;
  line-height: 1.75;
  white-space: pre-wrap;
}

.image-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 112px));
  gap: 10px;
}

.thumb {
  width: 112px;
  height: 84px;
  border-radius: 8px;
  border: 1px solid #e0e7f2;
  object-fit: cover;
  background: #eef3fb;
  cursor: zoom-in;
}

.placeholder-panel {
  min-height: 72px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  color: #111827;
}

.teacher-list {
  display: grid;
  gap: 16px;
}

.teacher-card {
  padding: 20px 18px;
}

.teacher-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.teacher-card p {
  margin: 0;
  color: #172033;
  line-height: 1.75;
}

.modal-subtitle {
  margin-top: 4px;
  color: #667085;
  font-size: 13px;
}

.signature-card {
  width: 310px;
  height: 150px;
  display: grid;
  place-items: center;
  background: #fff;
  overflow: hidden;
}

.signature-card span {
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: 58px;
  transform: rotate(-9deg);
  color: #111;
}

.teacher-workspace {
  max-width: 1640px;
  margin: 0 auto;
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(230px, 1fr));
  gap: 16px;
}

.class-card {
  min-height: 168px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background: rgba(255,255,255,0.9);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(31,41,55,0.05);
}

.class-card.active {
  border-color: #28c76f;
  box-shadow: 0 0 0 3px rgba(40,199,111,0.2);
}

.class-card h3 {
  margin: 0;
  padding: 14px 18px;
  font-size: 17px;
  border-bottom: 1px solid #e6edf6;
}

.class-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px 18px;
  color: #334155;
  font-weight: 700;
}

.class-meta span {
  min-width: 0;
}

.class-meta span:last-child {
  white-space: nowrap;
}

.class-action-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 0 18px 16px;
}

.class-action-row .text-button {
  width: 100%;
  border-radius: 999px;
  background: #f1f3f6;
  color: #334155;
}

.round-menu {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #f1f3f6;
  color: #64748b;
}

.teacher-toolbar {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #64748b;
}

.breadcrumb button {
  border: 0;
  background: transparent;
  color: #2563ff;
  font-weight: 800;
}

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

.segment {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 999px;
  background: #f3f6fa;
}

.segment span {
  min-width: 74px;
  text-align: center;
  padding: 8px 16px;
  border-radius: 999px;
  color: #64748b;
  font-weight: 800;
}

.segment .active {
  color: #2563ff;
  background: #fff;
}

.search-box {
  width: 210px;
  height: 40px;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0 14px;
  outline: 0;
}

.student-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(108px, 1fr));
  gap: 38px 36px;
}

.student-card {
  position: relative;
  min-height: 152px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  text-align: center;
  padding: 14px 8px;
  color: #111827;
}

.student-card:hover,
.student-card.active {
  border-color: #cbdcff;
  background: rgba(255,255,255,0.78);
  box-shadow: 0 14px 34px rgba(47,107,255,0.12);
}

.student-avatar {
  width: 68px;
  height: 68px;
  margin: 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 34%, #ffe5dc 0 22%, transparent 23%),
    radial-gradient(circle at 50% 58%, #1f2937 0 32%, transparent 33%),
    linear-gradient(135deg, #e9f0ff, #f7fbff);
  box-shadow: inset 0 0 0 8px #edf3ff;
}

.student-avatar.boy {
  background:
    radial-gradient(circle at 50% 34%, #ffe0cc 0 22%, transparent 23%),
    radial-gradient(circle at 50% 55%, #334155 0 30%, transparent 31%),
    linear-gradient(135deg, #eaf2ff, #f7fbff);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 24px;
  margin-top: -8px;
  border-radius: 999px;
  background: #fff1bf;
  color: #27a8f3;
  font-size: 13px;
  font-weight: 800;
}

.status-pill.pending {
  color: #f59e0b;
}

.student-name {
  margin-top: 7px;
  font-weight: 800;
}

.student-no {
  margin-top: 5px;
  font-size: 12px;
  color: #334155;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 38;
  display: flex;
  justify-content: flex-end;
  background: rgba(15,23,42,0.46);
}

.teacher-drawer-panel {
  width: min(520px, 96vw);
  height: 100vh;
  background: #fff;
  box-shadow: -24px 0 70px rgba(15,23,42,0.22);
}

.teacher-form {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 22px 16px;
  border-bottom: 1px solid #e4ebf5;
}

.drawer-head h2 {
  margin: 4px 0 0;
  font-size: 20px;
}

.drawer-body {
  overflow: auto;
  padding: 18px 22px 24px;
}

.drawer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid #e4ebf5;
}

.drawer-section {
  margin-bottom: 24px;
}

.drawer-section-title {
  margin: 0 0 12px;
  padding-left: 10px;
  border-left: 6px solid var(--blue);
  font-size: 17px;
}

.readonly-deed {
  padding: 14px;
  border: 1px solid #e6edf6;
  border-radius: 8px;
  background: #f8fafc;
  margin-bottom: 12px;
}

.readonly-deed h4 {
  margin: 0;
  font-size: 15px;
}

.readonly-deed p {
  margin: 8px 0 0;
  color: #334155;
  line-height: 1.65;
}

.drawer-image-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.drawer-image-row .thumb {
  width: 78px;
  height: 58px;
}

.drawer-field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.drawer-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drawer-field-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.drawer-field-actions .compact-action {
  min-width: 0;
}

.ai-action {
  white-space: nowrap;
}

.drawer-indicator-deeds {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e7edf7;
  border-radius: 8px;
  background: #fbfdff;
}

.drawer-indicator-deeds .readonly-deed {
  margin-bottom: 0;
  background: #fff;
}

.drawer-field label {
  color: #344054;
  font-weight: 800;
}

.drawer-field textarea,
.drawer-field select {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  outline: 0;
  padding: 12px;
}

.drawer-field textarea {
  min-height: 118px;
  resize: vertical;
  line-height: 1.6;
}

.drawer-field textarea[readonly],
.drawer-field select:disabled {
  color: #475569;
  background: #f2f5f9;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.48);
  padding: 24px;
}

.modal-panel {
  width: min(720px, 96vw);
  max-height: min(860px, 92vh);
  overflow: auto;
  background: var(--paper);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 24px 14px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.eyebrow {
  margin: 0;
  color: var(--blue);
  font-weight: 800;
  font-size: 13px;
}

.icon-button {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #d9e2f0;
  background: #fff;
  font-size: 24px;
  color: #334155;
}

.field {
  display: grid;
  gap: 8px;
  padding: 18px 24px 0;
}

.field > span {
  font-weight: 800;
}

.field b {
  color: var(--danger);
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  outline: 0;
  padding: 13px 14px;
  color: #101828;
}

.field textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.65;
}

.field small {
  justify-self: end;
  color: var(--muted);
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 92px));
  gap: 10px;
}

.upload-tile,
.upload-add {
  width: 92px;
  height: 92px;
  border-radius: 8px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  overflow: hidden;
  position: relative;
}

.upload-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
}

.upload-add {
  display: grid;
  place-items: center;
  color: #4b5563;
  font-size: 30px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 22px 24px 24px;
}

#imageViewer {
  z-index: 70;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: center;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(2px);
}

.image-close {
  position: fixed;
  top: 22px;
  right: 24px;
  z-index: 2;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255,255,255,0.58);
  border-radius: 10px;
  background: rgba(255,255,255,0.16);
  color: #fff;
  font-size: 34px;
  line-height: 1;
}

.image-viewer-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(980px, 74vw);
  max-width: 980px;
  touch-action: pan-y;
}

#viewerImage {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.34);
}

.viewer-nav {
  position: absolute;
  top: 50%;
  width: 54px;
  height: 76px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  color: #fff;
  font-size: 48px;
  line-height: 1;
}

.viewer-prev {
  left: -78px;
}

.viewer-next {
  right: -78px;
}

.viewer-meta {
  min-height: 54px;
  display: grid;
  justify-items: center;
  gap: 12px;
}

#viewerCounter {
  min-width: 64px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  color: #fff;
  text-align: center;
  font-weight: 800;
}

.viewer-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 8px;
  gap: 8px;
}

.viewer-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.48);
}

.viewer-dot.active {
  width: 28px;
  background: #fff;
}

.confirm-pop {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.38);
}

.confirm-card {
  width: min(380px, 92vw);
  background: #fff;
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.confirm-card h3 {
  margin: 0 0 8px;
}

.confirm-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.confirm-actions {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.toast {
  position: fixed;
  left: 50%;
  top: 22px;
  z-index: 60;
  transform: translateX(-50%);
  max-width: min(560px, 92vw);
  background: #1f2937;
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  box-shadow: 0 14px 42px rgba(0,0,0,0.22);
}

/* Ant Design visual pass */
body {
  color: var(--ant-text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-size: 14px;
  line-height: 1.5715;
  background: var(--ant-layout);
}

button,
input,
textarea,
select {
  color: var(--ant-text);
}

button {
  transition:
    color 0.2s,
    background-color 0.2s,
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(22, 119, 255, 0.2);
  outline-offset: 2px;
}

.app-shell {
  grid-template-columns: 228px minmax(0, 1fr);
  grid-template-rows: 64px minmax(0, 1fr);
  background: var(--ant-layout);
}

.top-header {
  height: 64px;
  padding: 0 24px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92)),
    repeating-linear-gradient(135deg, rgba(22, 119, 255, 0.035) 0 1px, transparent 1px 8px);
  border-bottom: 1px solid var(--ant-border-secondary);
  box-shadow: var(--ant-shadow-light);
}

.harbor-brand-header {
  width: 174px;
}

.harbor-brand-header .harbor-word {
  color: #a78363;
  font-size: 44px;
  line-height: 0.9;
}

.harbor-word::before {
  top: 22px;
  width: 40px;
  border-bottom-width: 7px;
  border-left-width: 7px;
}

.harbor-word span {
  top: -8px;
  font-size: 12px;
}

.title-divider {
  height: 36px;
  margin: 0 22px 0 2px;
  background: var(--ant-border);
}

.title-group h1 {
  color: var(--ant-text);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

.header-actions {
  gap: 12px;
}

.mode-switch {
  height: 40px;
  padding: 4px;
  border-color: var(--ant-border);
  background: var(--ant-container-subtle);
  border-radius: var(--ant-radius-lg);
}

.mode-button {
  min-width: 76px;
  border-radius: var(--ant-radius);
  color: var(--ant-text-secondary);
  font-weight: 600;
}

.mode-button.active {
  color: var(--ant-primary);
  background: var(--ant-container);
  box-shadow: var(--ant-shadow-light);
}

.user-chip {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--ant-radius-lg);
  background: transparent;
  color: var(--ant-text-secondary);
}

.user-chip:hover {
  background: var(--ant-container-subtle);
  border-color: var(--ant-border-secondary);
}

.avatar-dot {
  width: 32px;
  height: 32px;
  background:
    radial-gradient(circle at 50% 36%, #fff 0 17%, transparent 18%),
    radial-gradient(circle at 50% 78%, #fff 0 28%, transparent 29%),
    linear-gradient(135deg, #91caff, #d6e4ff);
}

.sidebar {
  padding: 16px 12px;
  background: var(--ant-container);
  border-right: 1px solid var(--ant-border-secondary);
}

.side-nav {
  gap: 4px;
}

.nav-item,
.nav-link {
  min-height: 44px;
  border-radius: var(--ant-radius-lg);
  color: var(--ant-text-secondary);
  font-size: 14px;
  gap: 10px;
  padding: 0 16px;
}

.nav-parent {
  color: var(--ant-text);
  background: transparent;
  font-weight: 600;
}

.nav-link {
  padding-left: 16px;
}

.nav-item:hover,
.nav-link:hover {
  color: var(--ant-primary);
  background: #f5f8ff;
}

.nav-link.active {
  color: var(--ant-primary);
  background: #e6f4ff;
  box-shadow: none;
  font-weight: 600;
}

.nav-icon {
  color: #8c8c8c;
}

.main {
  grid-template-rows: 64px minmax(0, 1fr);
  background: var(--ant-layout);
}

.filter-bar {
  padding: 0 24px;
  background: var(--ant-container);
  border-bottom: 1px solid var(--ant-border-secondary);
}

.page-title {
  color: var(--ant-text);
  font-size: 18px;
  font-weight: 600;
}

.filters {
  gap: 16px;
}

.select-wrap {
  height: 40px;
  min-width: 250px;
  gap: 8px;
  padding: 0 12px;
  border-color: var(--ant-border);
  border-radius: var(--ant-radius);
  background: var(--ant-container);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.select-wrap:hover,
.select-wrap:focus-within {
  border-color: var(--ant-primary-hover);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.08);
}

.select-wrap.wide {
  min-width: 430px;
}

.select-wrap span {
  color: var(--ant-text-secondary);
  font-size: 14px;
  font-weight: 600;
}

.select-wrap select {
  color: var(--ant-text);
  font-size: 14px;
}

.content {
  padding: 24px;
  background: var(--ant-layout);
}

.evaluation-page,
.teacher-workspace {
  max-width: 1560px;
}

.section {
  margin-bottom: 24px;
}

.section-head {
  min-height: 48px;
  gap: 16px;
}

.section-title {
  gap: 8px;
  padding: 0;
  background: transparent;
  border-radius: 0;
  color: var(--ant-text);
  font-size: 18px;
  font-weight: 600;
}

.section-title .badge-icon {
  width: 26px;
  height: 26px;
  border-radius: var(--ant-radius);
  color: var(--ant-primary);
  background: #e6f4ff;
  box-shadow: inset 0 0 0 1px #bae0ff;
}

.indicator-stack {
  gap: 16px;
}

.indicator-card {
  padding: 20px 24px;
  border: 1px solid var(--ant-border-secondary);
  border-radius: var(--ant-radius-lg);
  background: var(--ant-container);
  box-shadow: var(--ant-shadow-light);
}

.indicator-card:hover {
  box-shadow: var(--ant-shadow);
}

.indicator-head {
  min-height: 40px;
  margin-bottom: 12px;
}

.inline-teacher-card,
.placeholder-panel,
.teacher-card,
.signature-card {
  border-color: var(--ant-border-secondary);
  border-radius: var(--ant-radius);
  background: var(--ant-container-subtle);
}

.inline-teacher-card {
  padding: 14px 16px;
}

.placeholder-panel {
  min-height: 64px;
  padding: 0 16px;
  color: var(--ant-text-tertiary);
}

.deed-list {
  gap: 16px;
}

.deed-card {
  padding: 16px;
  border: 1px solid var(--ant-border-secondary);
  border-radius: var(--ant-radius-lg);
  background: var(--ant-container-subtle);
  box-shadow: none;
}

.deed-title {
  color: var(--ant-text);
  font-size: 16px;
  font-weight: 600;
}

.deed-time,
.student-no,
.modal-subtitle {
  color: var(--ant-text-tertiary);
}

.deed-desc,
.teacher-card p,
.readonly-deed p {
  color: var(--ant-text-secondary);
  line-height: 1.714;
}

.image-grid {
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(104px, 104px));
}

.thumb {
  width: 104px;
  height: 78px;
  border-color: var(--ant-border-secondary);
  border-radius: var(--ant-radius);
  background: #f5f5f5;
}

.primary-button,
.ghost-button,
.danger-button,
.text-button {
  min-height: 32px;
  border-radius: var(--ant-radius);
  padding: 0 15px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: none;
}

.primary-button {
  color: #fff;
  background: var(--ant-primary);
  border-color: var(--ant-primary);
}

.primary-button:hover {
  background: var(--ant-primary-hover);
  border-color: var(--ant-primary-hover);
}

.primary-button:active {
  background: var(--ant-primary-active);
  border-color: var(--ant-primary-active);
}

.ghost-button {
  color: var(--ant-text-secondary);
  background: var(--ant-container);
  border-color: var(--ant-border);
}

.ghost-button:hover {
  color: var(--ant-primary);
  border-color: var(--ant-primary-hover);
}

.compact-action {
  min-height: 32px;
  padding: 0 12px;
}

.danger-button {
  color: #fff;
  background: var(--ant-error);
  border-color: var(--ant-error);
}

.danger-button:hover {
  background: #ff7875;
  border-color: #ff7875;
}

.text-button {
  color: var(--ant-primary);
  background: transparent;
  border-color: transparent;
}

.text-button:hover {
  color: var(--ant-primary-hover);
  background: #e6f4ff;
}

.empty-state {
  min-height: 360px;
  color: var(--ant-text-secondary);
}

.empty-illustration {
  opacity: 0.86;
}

.class-grid {
  gap: 16px;
}

.class-card {
  min-height: 156px;
  border-color: var(--ant-border-secondary);
  border-radius: var(--ant-radius-lg);
  background: var(--ant-container);
  box-shadow: var(--ant-shadow-light);
}

.class-card:hover {
  border-color: #91caff;
  box-shadow: var(--ant-shadow);
}

.class-card.active {
  border-color: var(--ant-primary);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

.class-card h3 {
  padding: 13px 16px;
  border-bottom-color: var(--ant-border-secondary);
  font-size: 16px;
  font-weight: 600;
}

.class-meta {
  padding: 14px 16px;
  color: var(--ant-text-secondary);
  font-weight: 500;
}

.class-action-row {
  padding: 0 16px 16px;
}

.class-action-row .text-button,
.round-menu {
  background: #f5f5f5;
  color: var(--ant-text-secondary);
}

.teacher-toolbar {
  min-height: 48px;
  margin-bottom: 24px;
}

.breadcrumb {
  color: var(--ant-text-tertiary);
}

.breadcrumb button {
  color: var(--ant-primary);
  font-weight: 500;
}

.segment {
  padding: 2px;
  border: 1px solid var(--ant-border-secondary);
  border-radius: var(--ant-radius);
  background: var(--ant-container-subtle);
}

.segment span {
  min-width: 72px;
  padding: 6px 12px;
  border-radius: 4px;
  color: var(--ant-text-secondary);
  font-weight: 500;
}

.segment .active {
  color: var(--ant-primary);
  background: var(--ant-container);
  box-shadow: var(--ant-shadow-light);
}

.search-box {
  height: 40px;
  border-color: var(--ant-border);
  border-radius: var(--ant-radius);
  background: var(--ant-container);
}

.search-box:focus {
  border-color: var(--ant-primary-hover);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.08);
}

.student-grid {
  gap: 32px 28px;
}

.student-card {
  min-height: 148px;
  border-radius: var(--ant-radius-lg);
}

.student-card:hover,
.student-card.active {
  border-color: #91caff;
  background: var(--ant-container);
  box-shadow: var(--ant-shadow);
}

.student-avatar {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: end center;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #eef4ff 0%, #eaf1ff 100%);
  box-shadow: inset 0 0 0 8px rgba(230, 244, 255, 0.92);
}

.student-avatar.boy {
  background: linear-gradient(135deg, #eef4ff 0%, #eaf1ff 100%);
}

.student-avatar img {
  width: 86px;
  height: 86px;
  display: block;
  object-fit: contain;
  object-position: center bottom;
  transform: translateY(6px);
  pointer-events: none;
}

.status-pill {
  background: #e6f4ff;
  color: var(--ant-primary);
  font-weight: 500;
}

.status-pill.pending {
  background: #fff7e6;
  color: var(--ant-warning);
}

.drawer-backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.teacher-drawer-panel {
  width: min(560px, 96vw);
  box-shadow: -6px 0 16px rgba(0, 0, 0, 0.08), -9px 0 28px rgba(0, 0, 0, 0.05);
}

.drawer-head {
  padding: 16px 24px;
  border-bottom-color: var(--ant-border-secondary);
}

.drawer-head h2 {
  color: var(--ant-text);
  font-size: 18px;
  font-weight: 600;
}

.drawer-body {
  padding: 20px 24px 24px;
  background: var(--ant-container);
}

.drawer-actions {
  padding: 12px 24px;
  border-top-color: var(--ant-border-secondary);
  background: var(--ant-container);
}

.drawer-section {
  margin-bottom: 20px;
}

.drawer-section-title {
  border-left-color: var(--ant-primary);
  border-left-width: 4px;
  font-size: 16px;
  font-weight: 600;
}

.readonly-deed {
  padding: 14px 16px;
  border-color: var(--ant-border-secondary);
  border-radius: var(--ant-radius-lg);
  background: var(--ant-container-subtle);
}

.drawer-indicator-deeds {
  padding: 12px;
  border-color: var(--ant-border-secondary);
  border-radius: var(--ant-radius-lg);
  background: var(--ant-container-subtle);
}

.drawer-field {
  gap: 8px;
  margin-bottom: 16px;
}

.drawer-field label {
  color: var(--ant-text-secondary);
  font-weight: 500;
}

.drawer-field textarea,
.drawer-field select,
.field input,
.field textarea {
  border-color: var(--ant-border);
  border-radius: var(--ant-radius);
  background: var(--ant-container);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.drawer-field textarea:hover,
.drawer-field select:hover,
.field input:hover,
.field textarea:hover {
  border-color: var(--ant-primary-hover);
}

.drawer-field textarea:focus,
.drawer-field select:focus,
.field input:focus,
.field textarea:focus {
  border-color: var(--ant-primary-hover);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.08);
}

.drawer-field textarea[readonly],
.drawer-field select:disabled {
  color: var(--ant-text-secondary);
  background: #f5f5f5;
}

.modal-backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.modal-panel,
.confirm-card {
  border-radius: var(--ant-radius-lg);
  background: var(--ant-container);
  box-shadow: var(--ant-shadow);
}

.modal-head {
  padding: 18px 24px 14px;
  border-bottom-color: var(--ant-border-secondary);
}

.modal-head h2 {
  color: var(--ant-text);
  font-size: 20px;
  font-weight: 600;
}

.eyebrow {
  color: var(--ant-primary);
  font-weight: 600;
}

.icon-button {
  border-color: var(--ant-border);
  border-radius: var(--ant-radius);
  color: var(--ant-text-secondary);
  background: var(--ant-container);
}

.icon-button:hover {
  color: var(--ant-primary);
  border-color: var(--ant-primary-hover);
}

.field {
  gap: 8px;
  padding: 16px 24px 0;
}

.field > span {
  color: var(--ant-text-secondary);
  font-weight: 500;
}

.field b {
  color: var(--ant-error);
}

.field small {
  color: var(--ant-text-tertiary);
}

.upload-grid {
  gap: 8px;
}

.upload-tile,
.upload-add {
  border-color: var(--ant-border);
  border-radius: var(--ant-radius);
  background: var(--ant-container-subtle);
}

.upload-add {
  color: var(--ant-text-tertiary);
}

.upload-add:hover {
  color: var(--ant-primary);
  border-color: var(--ant-primary-hover);
  background: #f5f8ff;
}

.modal-actions {
  gap: 8px;
  padding: 20px 24px 24px;
}

.confirm-card h3 {
  color: var(--ant-text);
  font-size: 16px;
  font-weight: 600;
}

.confirm-card p {
  color: var(--ant-text-secondary);
}

.toast {
  border-radius: var(--ant-radius-lg);
  background: rgba(0, 0, 0, 0.82);
  box-shadow: var(--ant-shadow);
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .sidebar {
    display: none;
  }

  .main {
    grid-column: 1;
    grid-row: 2;
    grid-template-rows: auto 1fr;
  }

  .top-header {
    grid-column: 1;
    grid-row: 1;
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .filter-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .title-group {
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .harbor-brand-header {
    width: 158px;
  }

  .harbor-brand-header .harbor-word {
    font-size: 42px;
  }

  .title-divider {
    display: none;
  }

  .title-group h1 {
    font-size: 20px;
    white-space: normal;
  }

  .filters {
    flex-direction: column;
  }

  .select-wrap,
  .select-wrap.wide {
    min-width: 0;
    width: 100%;
  }

  .content {
    padding: 24px 16px 48px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .deed-top {
    flex-direction: column;
  }
}
