:root {
  --bg: #eef4fb;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-strong: #ffffff;
  --line: #d7e3f1;
  --text: #16324f;
  --muted: #73849a;
  --blue: #1f66d1;
  --blue-deep: #154c9d;
  --green: #2f8655;
  --amber: #d89b28;
  --red: #c84f4f;
  --cyan: #3b8bd9;
  --shadow: 0 18px 48px rgba(28, 70, 130, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(59, 139, 217, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(47, 134, 85, 0.14), transparent 24%),
    linear-gradient(180deg, #f5f9ff 0%, #edf3fb 100%);
}

body {
  min-width: 1280px;
}

.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 28, 52, 0.48);
  display: grid;
  place-items: center;
  z-index: 1000;
  backdrop-filter: blur(6px);
}

.login-card {
  width: 420px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 54px rgba(19, 52, 98, 0.22);
  padding: 30px 28px 24px;
}

.login-card h2,
.login-card p {
  margin: 0;
}

.login-card p {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

.login-form {
  margin-top: 22px;
  display: grid;
  gap: 14px;
}

.login-form label,
.pc-footer-grid label,
.assignment-form label,
.export-form label {
  display: grid;
  gap: 8px;
}

.login-form span,
.pc-footer-grid span,
.assignment-form span,
.export-form span {
  font-size: 13px;
  color: var(--muted);
}

.login-error {
  min-height: 20px;
  color: var(--red);
  font-size: 13px;
}

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

input,
select,
textarea {
  border: 1px solid #cfdcec;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input::placeholder,
textarea::placeholder {
  color: #9aacc1;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(31, 102, 209, 0.12);
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

button.is-loading {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

button.is-loading::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}

.link-button {
  background: transparent;
  color: var(--blue);
  padding: 0;
  font-weight: 600;
}

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

.sidebar {
  background: linear-gradient(180deg, #174d98 0%, #0f3c7a 100%);
  color: #fff;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
}

.brand h1,
.brand p {
  margin: 0;
}

.brand h1 {
  font-size: 18px;
}

.brand p {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

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

.menu-item {
  height: 46px;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  transition: 0.18s ease;
}

.menu-item:hover,
.menu-item.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.menu-icon {
  width: 24px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

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

.foot-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.08);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #7edb8d;
  margin-top: 5px;
}

.foot-card strong,
.foot-card p {
  display: block;
  margin: 0;
}

.foot-card p {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.74);
}

.main-panel {
  padding: 20px 22px 22px;
}

.topbar {
  height: 86px;
  background: linear-gradient(90deg, rgba(18, 85, 177, 0.94), rgba(42, 107, 201, 0.88));
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: #fff;
  padding: 0 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-title {
  font-size: 24px;
  font-weight: 700;
}

.topbar-subtitle {
  margin-top: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.76);
}

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

.topbar-chip {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}

.report-chip {
  color: var(--blue);
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(31, 102, 209, 0.18);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 6px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.user-badge strong,
.user-badge p {
  margin: 0;
}

.user-badge p {
  margin-top: 3px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
}

.logout-button {
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 13px;
  font-weight: 600;
}

.logout-button:hover {
  background: rgba(255, 255, 255, 0.22);
}

.view {
  display: none;
  margin-top: 18px;
}

.view.active {
  display: block;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.hero-copy,
.hero-stats,
.panel {
  background: var(--panel);
  border: 1px solid rgba(215, 227, 241, 0.86);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(31, 102, 209, 0.98), rgba(20, 81, 161, 0.92)),
    #1f66d1;
  color: #fff;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}

.hero-copy h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.3;
}

.hero-copy p:last-child {
  margin: 14px 0 0;
  max-width: 660px;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
}

.hero-stats {
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hero-stat {
  min-height: 110px;
  border-radius: 8px;
  padding: 18px;
  background: linear-gradient(180deg, #f9fbff 0%, #f0f6ff 100%);
  border: 1px solid var(--line);
}

.hero-stat span {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.hero-stat strong {
  display: block;
  margin-top: 16px;
  font-size: 30px;
  color: var(--blue-deep);
}

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

.two-three {
  grid-template-columns: 1.15fr 1fr;
  margin-bottom: 18px;
}

.panel {
  padding: 18px;
}

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

.panel-head h3 {
  margin: 0;
  font-size: 18px;
}

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

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.metric-card {
  min-height: 116px;
  border-radius: 8px;
  padding: 16px;
  color: #fff;
}

.metric-card span,
.metric-card small {
  display: block;
}

.metric-card strong {
  display: block;
  margin-top: 18px;
  font-size: 28px;
}

.metric-card small {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.metric-card.green { background: linear-gradient(135deg, #2f8655, #1e6b41); }
.metric-card.amber { background: linear-gradient(135deg, #e0a32b, #c98713); }
.metric-card.red { background: linear-gradient(135deg, #d86363, #bf4747); }
.metric-card.blue { background: linear-gradient(135deg, #3f88e6, #2368c7); }

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

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}

.progress-meta span {
  color: var(--muted);
}

.track {
  height: 10px;
  border-radius: 999px;
  background: #e7eef7;
  overflow: hidden;
}

.track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f8655, #53b576);
}

.track.warn span {
  background: linear-gradient(90deg, #d39e2e, #e0be57);
}

.indicator-overview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.indicator-overview div {
  min-height: 84px;
  border-radius: 8px;
  background: #f6f9fd;
  border: 1px solid var(--line);
  padding: 16px;
}

.indicator-overview strong,
.indicator-overview span {
  display: block;
}

.indicator-overview span {
  margin-top: 12px;
  font-size: 24px;
  color: var(--blue-deep);
  font-weight: 700;
}

.activity-list {
  display: grid;
  gap: 12px;
}

.activity-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.activity-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
}

.activity-mark.green { background: var(--green); }
.activity-mark.blue { background: var(--cyan); }
.activity-mark.red { background: var(--red); }

.activity-item strong,
.activity-item p {
  display: block;
  margin: 0;
}

.activity-item p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.status-tag {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
}

.status-tag.success {
  color: #1c6b41;
  background: rgba(47, 134, 85, 0.14);
}

.status-tag.pending {
  color: #9b6800;
  background: rgba(216, 155, 40, 0.14);
}

.status-tag.danger {
  color: #9e2e2e;
  background: rgba(200, 79, 79, 0.14);
}

.status-tag.muted {
  color: #607286;
  background: rgba(115, 132, 154, 0.15);
}

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

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-input,
select {
  height: 40px;
  padding: 0 14px;
}

.search-input {
  width: 320px;
}

.ghost-button,
.primary-button,
.segment {
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 600;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  color: var(--text);
}

.primary-button {
  background: linear-gradient(180deg, #2e76de 0%, #1f66d1 100%);
  color: #fff;
}

.primary-button.wide {
  width: 100%;
}

.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
}

.tree-panel {
  padding-bottom: 14px;
}

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

.tree-item {
  width: 100%;
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f7fafd;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}

.tree-item.active {
  background: rgba(31, 102, 209, 0.1);
  border-color: rgba(31, 102, 209, 0.35);
  color: var(--blue-deep);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 31, 54, 0.48);
  display: grid;
  place-items: center;
  z-index: 1200;
  backdrop-filter: blur(5px);
}

.modal-overlay[hidden] {
  display: none;
}

.modal-card {
  width: min(560px, calc(100vw - 32px));
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 26px 64px rgba(20, 54, 100, 0.24);
  padding: 22px;
}

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

.modal-head h3 {
  margin: 0;
  font-size: 18px;
}

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

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

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

.modal-tip {
  min-height: 20px;
  color: var(--red);
  font-size: 13px;
}

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

.picker-list {
  max-height: 420px;
  overflow: auto;
  display: grid;
  gap: 10px;
}

.picker-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  color: var(--text);
  padding: 14px;
  display: grid;
  gap: 6px;
  text-align: left;
}

.picker-item:hover {
  border-color: rgba(31, 102, 209, 0.36);
  background: rgba(31, 102, 209, 0.08);
}

.picker-item strong {
  font-size: 15px;
}

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

.tree-item {
  height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  background: #f5f8fd;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tree-item.active {
  background: rgba(31, 102, 209, 0.12);
  color: var(--blue);
}

.data-table,
.form-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td,
.form-table th,
.form-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}

.data-table th,
.form-table th {
  color: var(--muted);
  font-weight: 600;
  background: #f8fbff;
}

.data-table tbody tr:hover {
  background: rgba(31, 102, 209, 0.03);
}

.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
}

.segment {
  background: transparent;
  color: var(--muted);
}

.segment.active {
  background: #1f66d1;
  color: #fff;
}

.report-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
}

.category-panel {
  align-self: start;
}

.category-tabs {
  display: grid;
  gap: 10px;
}

.category-tab {
  padding: 12px 14px;
  border-radius: 8px;
  background: #f5f8fd;
  border: 1px solid var(--line);
  text-align: left;
}

.category-tab strong,
.category-tab span {
  display: block;
}

.category-tab strong {
  font-size: 14px;
}

.category-tab span {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.category-tab.active {
  background: rgba(31, 102, 209, 0.1);
  border-color: rgba(31, 102, 209, 0.24);
}

.report-main {
  display: grid;
  gap: 18px;
}

.subject-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.subject-grid article {
  border-radius: 8px;
  background: #f6f9fd;
  border: 1px solid var(--line);
  padding: 14px;
}

.subject-grid span,
.subject-grid strong {
  display: block;
}

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

.subject-grid strong {
  margin-top: 8px;
  font-size: 15px;
}

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

.field-input {
  width: 88px;
  height: 34px;
  padding: 0 10px;
}

.pc-footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
}

.pc-footer-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.pc-footer-grid input {
  height: 40px;
  padding: 0 14px;
}

.audit-layout {
  grid-template-columns: 1.05fr 0.95fr;
}

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

.audit-batch-bar {
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f6f9fd;
  border: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.check-all,
.audit-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.batch-actions span,
.batch-tip {
  color: var(--muted);
  font-size: 13px;
}

.batch-tip {
  margin-bottom: 12px;
}

.audit-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.audit-content {
  width: 100%;
  padding: 0;
  background: transparent;
  text-align: left;
  color: inherit;
}

.audit-item.active {
  border-color: rgba(31, 102, 209, 0.34);
  box-shadow: inset 0 0 0 1px rgba(31, 102, 209, 0.2);
}

.audit-item-top,
.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.audit-item strong,
.audit-item p,
.detail-card strong,
.detail-card p {
  display: block;
  margin: 0;
}

.audit-item p,
.detail-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.detail-panel {
  min-height: 620px;
}

.detail-card {
  display: grid;
  gap: 16px;
}

.detail-block {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbff;
}

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

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.export-grid {
  grid-template-columns: 360px 1fr;
}

.export-form,
.assignment-form {
  display: grid;
  gap: 14px;
}

.export-form label,
.assignment-form label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.user-summary-grid {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 18px;
}

.user-layout {
  grid-template-columns: 1fr 360px;
}

.assignment-panel {
  align-self: start;
}

.assignment-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 8px;
  background: #f6f9fd;
  border: 1px solid var(--line);
}

.assignment-card strong {
  display: block;
  margin-bottom: 2px;
}

.assignment-card div {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.assignment-card b {
  color: var(--text);
}

.import-panel {
  margin-top: 18px;
}

.import-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.import-fields span {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(31, 102, 209, 0.1);
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 1440px) {
  .subject-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
