:root {
  color: #17213a;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --blue: #4b79ee;
  --blue-strong: #3568e8;
  --blue-soft: #eaf2ff;
  --line: #e5e9f2;
  --panel: #ffffff;
  --surface: #f4f7fb;
  --muted: #77829a;
  --text: #17213a;
  --header-height: 56px;
  --sidebar-width: 318px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: #eef2f7;
}

body {
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(75, 121, 238, 0.34);
  outline-offset: 2px;
}

.is-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;
}

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

.topbar {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 36px 0 28px;
  color: #fff;
  background: linear-gradient(100deg, var(--blue-strong), #527ff0);
  box-shadow: 0 2px 12px rgba(42, 79, 164, 0.16);
}

.brand-group,
.account-area {
  display: flex;
  align-items: center;
}

.brand-group {
  min-width: 0;
  gap: 12px;
}

.brand-icon {
  font-size: 22px;
  filter: saturate(0.75);
}

.brand-title {
  overflow: hidden;
  font-size: 18px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-area {
  flex: 0 0 auto;
  gap: 14px;
  font-size: 14px;
}

.clock {
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}

.user-icon {
  opacity: 0.85;
}

.user-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-action,
.icon-button {
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.topbar-action {
  padding: 8px 2px;
}

.topbar-action:hover {
  text-decoration: underline;
}

.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 8px;
  font-size: 21px;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.13);
}

.workspace {
  min-height: 100vh;
  padding-top: var(--header-height);
}

.course-sidebar {
  position: fixed;
  z-index: 30;
  top: var(--header-height);
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  overflow: auto;
  border-right: 1px solid #dce2ed;
  background: var(--panel);
  box-shadow: 4px 0 14px rgba(25, 43, 76, 0.035);
}

.sidebar-heading {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  font-size: 15px;
}

.curriculum-tree {
  padding: 10px 0 32px;
}

.tree-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 8px 16px;
  border: 0;
  color: #3d4960;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.tree-row:hover {
  color: var(--blue-strong);
  background: #f3f7ff;
}

.tree-row.is-selected {
  color: #2f69e9;
  background: var(--blue-soft);
}

.tree-row.depth-1 {
  padding-left: 42px;
}

.tree-row.depth-2,
.tree-row.depth-3,
.tree-row.depth-4 {
  padding-left: 60px;
}

.tree-caret,
.tree-icon {
  flex: 0 0 auto;
  margin-right: 9px;
}

.tree-caret {
  width: 10px;
  color: #acb5c5;
  font-size: 10px;
}

.tree-icon {
  font-size: 14px;
}

.tree-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-shell {
  min-height: calc(100vh - var(--header-height));
  margin-left: var(--sidebar-width);
  padding: 12px;
  background: #f2f5f9;
}

.breadcrumb {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 10px 20px;
  margin-bottom: 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #68748a;
  background: #fff;
  font-size: 14px;
}

.breadcrumb-button {
  padding: 5px 2px;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.breadcrumb-button:hover {
  color: var(--blue-strong);
}

.breadcrumb-separator {
  margin: 0 10px;
  color: #b4bdca;
}

.breadcrumb-current {
  color: #26324a;
  font-weight: 600;
}

.view-panel {
  min-height: calc(100vh - var(--header-height) - 82px);
  padding: 20px 18px 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.view-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.view-heading h1,
.module-hero h1 {
  margin: 2px 0 0;
  color: #141d30;
  font-size: 23px;
  line-height: 1.3;
}

.section-kicker,
.eyebrow {
  margin: 0;
  color: var(--blue-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.search-box {
  display: flex;
  align-items: center;
  width: min(280px, 40vw);
  height: 36px;
  padding: 0 12px;
  border: 1px solid #d9dfeb;
  border-radius: 5px;
  color: #5d83dc;
  background: #fff;
}

.search-box:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(75, 121, 238, 0.1);
}

.search-box input {
  min-width: 0;
  flex: 1;
  height: 100%;
  padding: 0 0 0 7px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search-box input::placeholder {
  color: #a9b3c5;
}

.catalog-card,
.module-table,
.detail-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.catalog-card-title,
.module-table-head,
.objective-head {
  background: #f3f6fa;
  color: #202b42;
  font-size: 14px;
  font-weight: 600;
}

.catalog-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
}

.course-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 11px 18px;
  border: 0;
  border-top: 1px solid #edf0f5;
  color: #48556e;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.course-item:hover {
  color: var(--blue-strong);
  background: #f8faff;
}

.course-item-icon {
  margin-right: 12px;
  color: #6b9aff;
}

.course-item-name {
  min-width: 0;
  flex: 1;
}

.course-item-count {
  flex: 0 0 auto;
  margin-left: 12px;
  color: #9aa4b5;
  font-size: 12px;
}

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

.course-summary {
  padding: 4px 0 16px;
}

.compact-heading {
  margin-bottom: 14px;
}

.filter-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 40px;
}

.filter-label {
  flex: 0 0 34px;
  padding-top: 7px;
  color: #4e596d;
  font-size: 14px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  min-width: 56px;
  height: 31px;
  padding: 0 14px;
  border: 1px solid #d9dfeb;
  border-radius: 4px;
  color: #566176;
  background: #fff;
  cursor: pointer;
}

.filter-button:hover,
.filter-button.is-active {
  border-color: var(--blue);
  color: var(--blue-strong);
  background: #f3f7ff;
}

.module-table-head,
.module-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px;
  align-items: center;
  gap: 20px;
}

.module-table-head {
  min-height: 42px;
  padding: 0 16px;
}

.module-row {
  width: 100%;
  min-height: 46px;
  padding: 9px 16px;
  border: 0;
  border-top: 1px solid #edf0f5;
  color: #2d394f;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.module-row:hover {
  color: var(--blue-strong);
  background: #f8faff;
}

.module-title-cell {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mode-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 7px;
  border-radius: 50%;
  color: #fff;
  background: #7b9cf1;
  font-size: 10px;
}

.type-badge,
.target-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-width: 42px;
  min-height: 23px;
  padding: 2px 9px;
  border-radius: 5px;
  color: #3a77e8;
  background: #eaf3ff;
  font-size: 12px;
}

.type-badge.tone-1 {
  color: #ef941e;
  background: #fff3df;
}

.type-badge.tone-2 {
  color: #7c52e9;
  background: #f0eaff;
}

.type-badge.tone-3 {
  color: #e35f5f;
  background: #ffeded;
}

.module-detail {
  padding: 18px 14px 36px;
}

.module-hero {
  padding: 0 2px 18px;
}

.module-code {
  margin: 8px 0 14px;
  color: #6c778d;
  font-size: 14px;
}

.launch-button,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 20px;
  border-radius: 4px;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 6px 18px rgba(61, 107, 222, 0.18);
  font-weight: 600;
  text-decoration: none;
}

.launch-button:hover,
.primary-link:hover {
  background: #376be8;
}

.launch-unavailable {
  margin: 8px 0 0;
  color: #9a6b2c;
  font-size: 13px;
}

.detail-section {
  margin-top: 14px;
}

.detail-section h2 {
  margin: 0;
  padding: 13px 15px 10px;
  color: #242f45;
  font-size: 16px;
}

.detail-section h2 small {
  margin-left: 5px;
  color: #929daf;
  font-size: 13px;
  font-weight: 400;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 16px;
  margin: 0;
  padding: 16px;
  background: #f4f7fb;
}

.info-grid > div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
}

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

.info-grid dt {
  color: #5c687e;
  font-size: 13px;
}

.info-grid dd {
  min-height: 31px;
  margin: 0;
  padding: 6px 10px;
  overflow: hidden;
  border: 1px solid #d7deea;
  border-radius: 4px;
  color: #344057;
  background: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.objective-head,
.objective-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 80px;
  align-items: center;
  gap: 16px;
}

.objective-head {
  min-height: 43px;
  padding: 0 16px;
}

.objective-head span:last-child,
.objective-weight {
  text-align: right;
}

.objective-row {
  min-height: 44px;
  padding: 8px 16px;
  border-top: 1px solid #edf0f5;
  color: #4b566c;
  font-size: 13px;
}

.objective-weight {
  font-variant-numeric: tabular-nums;
}

.notice {
  margin: 0 0 8px;
  padding: 11px 14px;
  border: 1px solid #ffd79a;
  border-radius: 5px;
  color: #8a5a16;
  background: #fff8e8;
}

.loading-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height) - 90px);
  color: var(--muted);
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #dfe7f6;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

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

.sign-in-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: calc(var(--header-height) + 40px) 20px 40px;
  background:
    radial-gradient(circle at 12% 20%, rgba(75, 121, 238, 0.15), transparent 32%),
    linear-gradient(145deg, #f7faff, #edf3ff);
}

.sign-in-card {
  width: min(480px, 100%);
  padding: 42px 38px;
  border: 1px solid rgba(75, 121, 238, 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 60px rgba(37, 65, 127, 0.12);
  text-align: center;
}

.sign-in-emblem {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 18px;
  background: var(--blue-soft);
  font-size: 30px;
}

.sign-in-card .eyebrow {
  margin-bottom: 8px;
}

.sign-in-card h1 {
  margin: 0;
  font-size: 27px;
}

.sign-in-copy {
  margin: 15px 0 26px;
  color: #69758c;
  line-height: 1.75;
}

.sidebar-backdrop {
  display: none;
}

@media (max-width: 1080px) {
  :root {
    --sidebar-width: 272px;
  }

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

@media (max-width: 760px) {
  .topbar {
    padding: 0 12px;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .brand-icon,
  .clock,
  .user-icon {
    display: none;
  }

  .brand-title {
    font-size: 16px;
  }

  .account-area {
    gap: 10px;
  }

  .user-name {
    max-width: 92px;
  }

  .course-sidebar {
    width: min(86vw, 320px);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  body.nav-open .course-sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 25;
    inset: var(--header-height) 0 0;
    display: block;
    border: 0;
    background: rgba(20, 31, 54, 0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  body.nav-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .content-shell {
    margin-left: 0;
    padding: 7px;
  }

  .breadcrumb {
    min-height: 46px;
    padding: 8px 12px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .view-panel {
    min-height: calc(100vh - var(--header-height) - 64px);
    padding: 16px 12px 28px;
  }

  .view-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .search-box {
    width: 100%;
  }

  .module-table-head,
  .module-row {
    grid-template-columns: minmax(0, 1fr) 64px;
    gap: 8px;
  }

  .module-table-head,
  .module-row {
    padding-right: 10px;
    padding-left: 10px;
  }

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

  .filter-button {
    min-width: 52px;
    padding: 0 10px;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .info-grid .wide-info {
    grid-column: auto;
  }

  .objective-head,
  .objective-row {
    grid-template-columns: 70px minmax(0, 1fr) 48px;
    gap: 8px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .sign-in-card {
    padding: 34px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
