.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #ffffff;
}

.login-card {
  width: min(400px, 100%);
  margin: 0;
  padding: 36px;
  background: #ffffff;
}

.login-card input::placeholder {
  color: #8a8f94;
  opacity: 1;
}

.login-card > .muted {
  margin: 0 0 24px;
  text-align: center;
}

.login-card form {
  margin-top: 0;
}

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

.column-settings {
  position: relative;
}

.column-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  width: 250px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.column-menu-head {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 9px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.column-menu-head button {
  border: 0;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font-size: 11px;
}

.column-menu label {
  padding: 5px 2px;
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
}

.spacing-settings {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
}

.spacing-settings > div {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.spacing-settings input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.spacing-settings p {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 11px;
  line-height: 1.5;
}

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

.student-table th,
.student-table td {
  padding: var(--cell-y, 15px) 17px;
}

.student-table {
  table-layout: fixed;
}

.student-table th {
  position: relative;
}

.column-resizer {
  position: absolute;
  z-index: 3;
  top: 0;
  right: -5px;
  width: 10px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}

.column-resizer::after {
  content: "";
  position: absolute;
  top: 20%;
  right: 4px;
  width: 2px;
  height: 60%;
  border-radius: 2px;
  background: transparent;
}

.column-resizer:hover::after,
.resizing-column .column-resizer::after {
  background: var(--green);
}

.resizing-column {
  cursor: col-resize;
  user-select: none;
}

/* 浅蓝色简洁主题 */
:root {
  --ink: #315f7f;
  --muted: #71899a;
  --green: #73aeda;
  --lime: #dceefa;
  --cream: #ffffff;
  --line: #dce7ee;
  --shadow: 0 16px 42px rgba(49, 95, 127, .10);
}

body,
.content,
header {
  background: #ffffff;
}

.sidebar {
  background: #e8f4fc;
  color: #294f69;
  padding-top: 28px;
}

.sidebar nav {
  margin-top: 0;
}

.nav-item {
  color: #66839a;
}

.nav-item:hover,
.nav-item.active {
  background: #cfe7f7;
  color: #245f89;
}

.sidebar-foot {
  border-top-color: #c9deec;
}

.sidebar-foot small,
.sidebar-foot button {
  color: #6c8799;
}

.avatar,
.name-avatar {
  background: #d8ecf9;
  color: #315f7f;
}

.primary-btn {
  background: #73aeda;
  color: #ffffff;
}

.primary-btn:hover {
  background: #5e9bc9;
}

.tag {
  background: #e3f1fa;
  color: #3e759c;
}

.tag.gray {
  background: #edf3f7;
  color: #6e8493;
}

.tag.orange {
  background: #e8f3fb;
  color: #4b7da0;
}

.expand-btn {
  background: #eef6fb;
  color: #4e89b2;
}

.expand-btn.open {
  background: #cfe7f7;
}

.status-dot {
  background: #73aeda;
  box-shadow: 0 0 0 4px rgba(115, 174, 218, .16);
}

.detail-row td,
.student-detail {
  background: #eef5f9;
}

/* 指定品牌蓝与黑色正文 */
:root {
  --ink: #111111;
  --green: #00A3E0;
  --lime: #e6f0ff;
}

.sidebar {
  background: #00A3E0;
  color: #ffffff;
}

.nav-item {
  color: rgba(255, 255, 255, .82);
  gap: 0;
  padding-left: 18px;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, .18);
  color: #ffffff;
}

.sidebar-foot {
  border-top-color: rgba(255, 255, 255, .28);
}

.sidebar-foot strong,
.sidebar-foot small,
.sidebar-foot button {
  color: #ffffff;
}

.sidebar .avatar {
  background: #ffffff;
  color: #00A3E0;
}

main,
header,
.content,
.data-table,
.data-table th,
.data-table td,
.name-cell strong,
.search,
.select,
.ghost-btn,
.field label,
.field input,
.field select,
.field textarea,
.header-actions,
main .muted {
  color: #111111;
}

main .tag {
  color: #111111;
}

main .name-avatar {
  color: #111111;
}

main .expand-btn,
main .column-menu-head button,
main .spacing-settings p,
main .text-btn {
  color: #111111;
}

main .text-btn.danger {
  color: #111111;
}

.primary-btn {
  background: #00A3E0;
  color: #ffffff;
}

.primary-btn:hover {
  background:
    linear-gradient(rgba(255, 255, 255, .18), rgba(255, 255, 255, .18)),
    #00A3E0;
  transform: none;
}

.status-dot {
  background: #00A3E0;
  box-shadow: 0 0 0 4px rgba(0, 163, 224, .13);
}

main .name-avatar,
main .tag,
main .tag.gray,
main .tag.orange {
  background: #00A3E0;
  color: #ffffff;
}

.expand-col {
  width: 44px;
}

.expand-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: #f0f3ed;
  color: var(--green);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: transform .2s, background .2s;
}

.expand-btn.open {
  transform: rotate(90deg);
  background: var(--lime);
}

.detail-row td {
  padding: 0 !important;
  background: #f8faf6;
}

.student-detail {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 1px;
  padding: 18px 22px;
  background: var(--line);
}

.detail-item {
  min-height: 68px;
  padding: 12px 14px;
  background: #fff;
}

.detail-item span,
.detail-item strong {
  display: block;
}

.detail-item span {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
}

.detail-item strong {
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.cell-ellipsis {
  display: block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .student-detail {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }
}

.student-matches {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #d8e6ff;
  border-radius: 16px;
  background: #f7faff;
}

.student-matches-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.student-matches-head span {
  color: #666;
  font-size: 13px;
}

.student-match-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.student-match {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e0e7ef;
  border-radius: 12px;
  background: #fff;
  color: #111;
  text-align: left;
  cursor: pointer;
}

.student-match:hover {
  border-color: #00A3E0;
}

.student-match-info {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.student-match small {
  color: #666;
}

.student-match-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
  white-space: nowrap;
}

.student-match-actions button {
  padding: 8px 10px;
  border: 1px solid #00A3E0;
  border-radius: 8px;
  background: #fff;
  color: #00A3E0;
  cursor: pointer;
}

.student-match-actions button:last-child {
  background: #00A3E0;
  color: #fff;
}

.student-picker {
  display: grid;
  gap: 8px;
}

.student-picker input,
.student-picker select {
  width: 100%;
}

.document-import {
  padding: 14px 16px;
  border: 1px dashed #9dc3ff;
  border-radius: 12px;
  background: #f7faff;
}

.document-import-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.document-import-row input[type="file"] {
  width: min(360px, 100%);
  padding: 9px;
  background: #fff;
}

.document-import-row span {
  color: #555;
  font-size: 12px;
}

.agreement-class-empty,
.agreement-class-status {
  margin-bottom: 18px;
  border: 1px solid #d8e6ff;
  border-radius: 16px;
  background: #f7faff;
}

.agreement-class-empty {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 18px;
}

.agreement-class-empty span,
.agreement-summary-head > div > span {
  color: #666;
  font-size: 13px;
}

.agreement-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
}

.agreement-summary-head > div:first-child {
  display: grid;
  gap: 5px;
}

.agreement-counts {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.agreement-counts span {
  padding: 8px 12px;
  border-radius: 9px;
  background: #fff;
  color: #111;
  font-size: 13px;
}

.agreement-counts .submitted {
  background: #e9f7ef;
  color: #16733d;
}

.agreement-counts .unsubmitted {
  background: #fff0f0;
  color: #c53434;
}

.agreement-roster {
  max-height: 430px;
  overflow: auto;
  border-top: 1px solid #d8e6ff;
  border-radius: 0 0 16px 16px;
  background: #fff;
}

.submission-status {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.submission-status.done {
  background: #e9f7ef;
  color: #16733d;
}

.submission-status.pending {
  background: #fff0f0;
  color: #c53434;
}

main .tag,
main .tag.gray,
main .tag.orange {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #111111;
}

.attention-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.attention-tag {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--tag-color);
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
}

.tag-manage-button {
  padding: 4px 7px;
  border: 1px dashed #999;
  border-radius: 7px;
  background: #fff;
  color: #333;
  font-size: 11px;
  cursor: pointer;
}

.tag-presets > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-presets button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #fff;
  color: #111;
  cursor: pointer;
}

.tag-presets button span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.select-col {
  width: 42px;
  text-align: center !important;
}

.select-col input {
  width: 16px;
  height: 16px;
  accent-color: #00A3E0;
  cursor: pointer;
}

.bulk-tag-btn:not(:disabled) {
  border-color: #00A3E0;
  color: #00A3E0;
}

.bulk-selection-note {
  padding: 12px;
  border-radius: 10px;
  background: #f2f8fc;
  color: #333;
  font-size: 13px;
}

.tag-editor {
  display: grid;
  gap: 9px;
}

.tag-editor-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px 22px auto;
  gap: 9px;
  align-items: center;
}

.tag-editor-row input,
.tag-editor-row select {
  width: 100%;
}

.tag-editor-row button {
  border: 0;
  background: transparent;
  color: #c53434;
  cursor: pointer;
}

.tag-color-preview {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.student-table th[data-column-head] {
  cursor: grab;
  user-select: none;
}

.student-table th[data-column-head]:active {
  cursor: grabbing;
}

.column-drag-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.column-drag-label::first-letter {
  color: #999;
}

.student-table th.dragging-column {
  opacity: .45;
  background: #eef4ff;
}

.student-table th.column-drop-target {
  background: #e5efff;
  box-shadow: inset 4px 0 0 #00A3E0;
}

.column-resizer {
  cursor: col-resize;
}

.student-filter-panel {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid #dce5ef;
  border-radius: 15px;
  background: #f8fafc;
}

.student-filter-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.student-filter-title span,
.filter-summary {
  color: #666;
  font-size: 12px;
}

.student-filter-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(150px, .75fr)) auto;
  gap: 10px;
}

.student-filter-controls .search,
.student-filter-controls .select,
.student-filter-controls .ghost-btn {
  width: 100%;
  min-width: 0;
}

.student-tools {
  margin-bottom: 14px;
}

#passwordField {
  margin-top: 16px;
}

.sidebar-foot .user-avatar {
  position: relative;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .72);
  background: #fff;
  color: #00A3E0;
  font-size: 16px;
  cursor: pointer;
}

.sidebar-foot .user-avatar:hover {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .2);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.competition-intro {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding: 24px;
  border: 1px solid #dbe8ef;
  border-radius: 18px;
  background: #f7fcff;
}

.competition-intro > div:first-child {
  max-width: 760px;
}

.competition-kicker {
  margin: 0 0 7px;
  color: #00A3E0;
  font-size: 12px;
  font-weight: 700;
}

.competition-intro h3 {
  margin: 0 0 10px;
  color: #111;
  font-size: 25px;
}

.competition-intro p:not(.competition-kicker) {
  margin: 0;
  color: #555;
  font-size: 13px;
  line-height: 1.7;
}

.competition-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  gap: 8px;
  min-width: 290px;
}

.certificate-counts {
  grid-template-columns: repeat(2, minmax(110px, 1fr));
}

.competition-counts button {
  border: 1px solid #dbe8ef;
  border-radius: 13px;
  background: #fff;
  color: #111;
  cursor: pointer;
}

.competition-counts button.active {
  border-color: #00A3E0;
  box-shadow: inset 0 0 0 1px #00A3E0;
}

.competition-counts strong,
.competition-counts span {
  display: block;
}

.competition-counts strong {
  margin-bottom: 4px;
  font-size: 23px;
}

.competition-counts span {
  font-size: 12px;
}

.competition-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

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

.competition-card {
  padding: 21px;
  border: 1px solid #e2e7eb;
  border-radius: 16px;
  background: #fff;
}

.competition-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.competition-category,
.competition-status {
  display: inline-block;
  margin: 0 6px 10px 0;
  padding: 4px 8px;
  border-radius: 5px;
  background: #eef8fc;
  color: #111;
  font-size: 11px;
}

.competition-status {
  background: #f3f4f6;
}

.competition-rating {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 13px;
  letter-spacing: 1px;
  vertical-align: middle;
}

.competition-card h3 {
  margin: 0;
  color: #111;
  font-size: 18px;
}

.competition-full-name {
  margin: 6px 0 0;
  color: #666;
  font-size: 12px;
}

.competition-card dl {
  display: grid;
  gap: 9px;
  margin: 18px 0 0;
}

.competition-card dl div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
}

.competition-card dt {
  color: #777;
  font-size: 12px;
}

.competition-card dd {
  margin: 0;
  color: #222;
  font-size: 12px;
  line-height: 1.55;
}

.competition-note {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid #edf0f2;
  color: #444;
  font-size: 12px;
  line-height: 1.65;
}

.competition-link {
  display: inline-block;
  margin-top: 12px;
  color: #00A3E0;
  font-size: 12px;
  text-decoration: none;
}

.competition-empty {
  grid-column: 1 / -1;
  padding: 70px 20px;
  border: 1px solid #e2e7eb;
  border-radius: 16px;
  background: #fff;
  color: #777;
  text-align: center;
}

@media (max-width: 700px) {
  .student-matches-head,
  .document-import-row {
    align-items: stretch;
    flex-direction: column;
  }

  .student-match {
    flex-wrap: wrap;
  }

  .student-match-actions {
    width: 100%;
    margin-left: 0;
  }

  .agreement-class-empty,
  .agreement-summary-head {
    align-items: stretch;
    flex-direction: column;
  }

  .tag-editor-row {
    grid-template-columns: 1fr 100px auto;
  }

  .tag-color-preview {
    display: none;
  }

  .student-filter-title {
    align-items: stretch;
    flex-direction: column;
  }

  .student-filter-controls {
    grid-template-columns: 1fr;
  }

  .competition-intro,
  .competition-toolbar {
    flex-direction: column;
  }

  .competition-counts {
    min-width: 0;
  }

  .competition-list {
    grid-template-columns: 1fr;
  }
}
