:root {
  color-scheme: dark;
  --ink: #f7f4ff;
  --muted: #a9a0c5;
  --soft: #d9cdfd;
  --line: rgba(175, 126, 255, 0.28);
  --line-strong: rgba(210, 183, 255, 0.54);
  --paper: rgba(20, 17, 38, 0.78);
  --paper-solid: #151225;
  --panel: rgba(10, 9, 21, 0.72);
  --deep: #05040b;
  --purple: #8a4dff;
  --violet: #b98cff;
  --silver: #f5f1ff;
  --cyan: #54d6ff;
  --danger: #ff5d8f;
  --amber: #ffc76a;
  --good: #46e6aa;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
  --glow: 0 0 30px rgba(147, 85, 255, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 8%, rgba(133, 77, 255, 0.24), transparent 34%),
    radial-gradient(circle at 90% 16%, rgba(84, 214, 255, 0.12), transparent 30%),
    linear-gradient(145deg, #040309 0%, #0b0820 44%, #05040b 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(154, 96, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(154, 96, 255, 0.07) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.86), transparent 84%);
}

button,
textarea,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

button {
  cursor: pointer;
}

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(5, 4, 11, 0.74), rgba(5, 4, 11, 0.92)),
    radial-gradient(circle at 50% 18%, rgba(151, 86, 255, 0.28), transparent 36%);
  backdrop-filter: blur(14px);
}

.access-card {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(215, 192, 255, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(29, 24, 51, 0.96), rgba(10, 8, 21, 0.96)),
    radial-gradient(circle at 82% 0%, rgba(174, 117, 255, 0.18), transparent 34%);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.54), 0 0 44px rgba(143, 80, 255, 0.32);
}

.access-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 2px;
}

.access-brand img {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid rgba(219, 199, 255, 0.62);
  box-shadow: 0 0 28px rgba(151, 86, 255, 0.48);
}

.access-brand strong {
  display: block;
  color: #fff;
  font-size: 20px;
}

.access-brand span,
.access-card label,
.access-message {
  color: var(--soft);
  font-size: 13px;
}

.access-card label {
  font-weight: 700;
}

.access-message {
  min-height: 20px;
  margin: 0;
  line-height: 1.5;
}

body.access-locked .app-shell {
  filter: blur(8px) brightness(0.72);
  pointer-events: none;
  user-select: none;
}

.promo-marquee {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 42px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(211, 185, 255, 0.24);
  background:
    linear-gradient(90deg, rgba(7, 5, 17, 0.96), rgba(32, 22, 62, 0.96), rgba(7, 5, 17, 0.96)),
    radial-gradient(circle at 12% 50%, rgba(151, 86, 255, 0.26), transparent 32%);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.24), 0 0 24px rgba(145, 86, 255, 0.18);
}

.promo-track {
  min-width: max-content;
  display: flex;
  align-items: center;
  gap: 42px;
  padding-left: 22px;
  animation: promoMarquee 24s linear infinite;
}

.promo-track span {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(185, 140, 255, 0.44);
}

@keyframes promoMarquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-33.333%);
  }
}

.wechat-lead-card {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 18;
  width: min(368px, calc(100vw - 28px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(218, 194, 255, 0.4);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(18, 14, 35, 0.95), rgba(8, 7, 18, 0.96)),
    radial-gradient(circle at 100% 0%, rgba(178, 122, 255, 0.22), transparent 38%);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42), 0 0 30px rgba(151, 86, 255, 0.2);
  backdrop-filter: blur(18px);
}

.wechat-lead-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.wechat-lead-copy p {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.45;
}

.wechat-lead-copy strong {
  color: #fff;
  font-size: 18px;
  line-height: 1.1;
}

.wechat-lead-copy span {
  color: #f6f0ff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.wechat-lead-card img {
  width: 132px;
  height: 168px;
  object-fit: cover;
  border: 1px solid rgba(221, 200, 255, 0.48);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0 22px rgba(167, 101, 255, 0.25);
}

.app-shell {
  min-height: calc(100vh - 42px);
  display: grid;
  grid-template-columns: 304px 1fr;
  width: 100%;
  position: relative;
}

.app-shell > * {
  min-width: 0;
}

.feishu-embed .app-shell {
  grid-template-columns: 1fr;
}

.sidebar {
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(15, 12, 31, 0.98), rgba(9, 7, 20, 0.94)),
    radial-gradient(circle at 20% 0%, rgba(170, 123, 255, 0.22), transparent 36%);
  border-right: 1px solid var(--line);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow: hidden;
  box-shadow: 24px 0 60px rgba(0, 0, 0, 0.32);
}

.feishu-embed .sidebar {
  gap: 14px;
  border-right: 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
}

.mark {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  overflow: hidden;
  background: #070610;
  border: 1px solid rgba(204, 178, 255, 0.56);
  box-shadow: 0 0 0 4px rgba(139, 80, 255, 0.08), 0 0 28px rgba(151, 86, 255, 0.58);
}

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

.brand h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0;
  color: #fff;
  text-shadow: 0 0 18px rgba(180, 130, 255, 0.45);
}

.brand p {
  margin: 6px 0 0;
  color: var(--soft);
  font-size: 13px;
}

.workflow-list {
  display: grid;
  gap: 9px;
}

.feishu-embed .workflow-list {
  display: flex;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 6px;
}

.workflow {
  min-height: 42px;
  text-align: left;
  color: #d6ccf5;
  border: 1px solid rgba(197, 161, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 8px;
  padding: 0 13px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.feishu-embed .workflow {
  flex: 0 0 auto;
  min-width: 116px;
  text-align: center;
}

.workflow:hover {
  border-color: rgba(198, 162, 255, 0.45);
  background: rgba(137, 78, 255, 0.16);
  color: #fff;
  transform: translateY(-1px);
}

.workflow.active {
  color: #fff;
  border-color: rgba(221, 202, 255, 0.76);
  background: linear-gradient(135deg, rgba(114, 61, 255, 0.86), rgba(189, 145, 255, 0.52));
  box-shadow: 0 0 28px rgba(152, 87, 255, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.status-panel {
  margin-top: auto;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.052);
  border: 1px solid rgba(193, 154, 255, 0.18);
  border-radius: 8px;
  color: var(--soft);
  font-size: 13px;
}

.feishu-embed .status-panel {
  margin-top: 0;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 0 16px rgba(255, 199, 106, 0.72);
}

.status-dot.ready {
  background: var(--good);
  box-shadow: 0 0 16px rgba(70, 230, 170, 0.72);
}

.workspace {
  padding: 28px;
  overflow: hidden;
  min-width: 0;
}

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

.eyebrow {
  margin: 0 0 7px;
  font-size: 12px;
  font-weight: 800;
  color: var(--violet);
  letter-spacing: 0;
}

.topbar h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: 0;
  color: var(--silver);
  text-shadow: 0 0 26px rgba(166, 103, 255, 0.42);
}

.top-actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.secondary-button,
.primary-button {
  border: 1px solid rgba(207, 177, 255, 0.34);
  min-height: 40px;
  border-radius: 8px;
  padding: 0 15px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.icon-button:hover,
.secondary-button:hover {
  border-color: rgba(222, 204, 255, 0.72);
  background: rgba(154, 96, 255, 0.14);
}

.primary-button {
  border-color: rgba(221, 200, 255, 0.78);
  background: linear-gradient(135deg, #6f3cff, #b783ff);
  color: #fff;
  min-width: 112px;
  font-weight: 700;
  box-shadow: 0 0 24px rgba(139, 80, 255, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.primary-button[disabled] {
  opacity: 0.65;
  cursor: progress;
}

.input-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(360px, 1.15fr);
  gap: 16px;
}

.input-grid.no-upload {
  grid-template-columns: 1fr;
}

.upload-panel,
.upload-zone,
.context-panel,
.panel,
.report-panel {
  background:
    linear-gradient(180deg, rgba(27, 23, 49, 0.88), rgba(13, 11, 26, 0.88)),
    radial-gradient(circle at 80% 0%, rgba(138, 77, 255, 0.13), transparent 34%);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.upload-panel {
  padding: 16px;
}

.upload-panel[hidden],
.slot-card[hidden],
.category-grid[hidden],
#assetNotesBlock[hidden] {
  display: none !important;
}

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

.upload-panel-head strong {
  color: #fff;
  font-size: 17px;
}

.upload-panel-head small {
  color: var(--muted);
  text-align: right;
}

.upload-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.slot-card {
  position: relative;
  min-height: 142px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 12px;
  border: 1px dashed rgba(191, 152, 255, 0.3);
  border-radius: 8px;
  background: rgba(5, 4, 12, 0.44);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.slot-card:hover {
  border-color: rgba(221, 200, 255, 0.72);
  background: rgba(134, 76, 255, 0.12);
  transform: translateY(-1px);
}

.slot-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
}

.slot-card strong {
  color: #fff;
  font-size: 15px;
}

.slot-card small {
  color: var(--muted);
  line-height: 1.45;
}

.slot-card::after {
  content: "选择文件";
  justify-self: start;
  margin-top: 2px;
  padding: 7px 10px;
  border: 1px solid rgba(221, 200, 255, 0.58);
  border-radius: 8px;
  color: #fff;
  background: rgba(137, 82, 255, 0.28);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(137, 82, 255, 0.22);
}

.slot-card.is-filled::after {
  content: "继续上传";
}

.slot-status {
  justify-self: start;
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid rgba(190, 153, 255, 0.22);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
}

.slot-status.is-filled {
  color: #dfffee;
  border-color: rgba(70, 230, 170, 0.38);
  background: rgba(70, 230, 170, 0.1);
}

.slot-preview {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  color: #7c719e;
  font-size: 12px;
}

.slot-preview img {
  width: 48px;
  height: 32px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(193, 154, 255, 0.22);
}

.slot-preview span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-zone {
  min-height: 250px;
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
  overflow: hidden;
}

.upload-zone::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(191, 152, 255, 0.32);
  border-radius: 8px;
  pointer-events: none;
}

.upload-zone.dragging {
  outline: 2px solid var(--violet);
  outline-offset: -6px;
}

.upload-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.upload-visual {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 25%, #fff, #b98cff 36%, #5b2bd4 72%);
  color: #fff;
  font-size: 38px;
  font-weight: 500;
  box-shadow: 0 0 34px rgba(164, 99, 255, 0.58);
}

.upload-zone strong {
  font-size: 18px;
  color: #fff;
}

.upload-zone small {
  color: var(--muted);
  max-width: 440px;
}

.context-panel {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.category-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.context-panel label {
  color: var(--soft);
  font-size: 14px;
  font-weight: 700;
}

textarea,
input[type="url"],
input[type="password"],
input[type="text"],
input[type="file"],
select {
  width: 100%;
  border: 1px solid rgba(190, 153, 255, 0.24);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(5, 4, 12, 0.58);
  outline: none;
}

textarea {
  min-height: 144px;
  resize: vertical;
  padding: 12px;
  line-height: 1.55;
}

input[type="url"],
input[type="password"],
input[type="text"],
input[type="file"],
select {
  min-height: 40px;
  padding: 0 12px;
}

input[type="file"] {
  padding: 8px 10px;
  color: var(--muted);
}

textarea:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="text"]:focus,
input[type="file"]:focus,
select:focus {
  border-color: rgba(221, 200, 255, 0.78);
  box-shadow: 0 0 0 3px rgba(138, 77, 255, 0.18);
}

textarea::placeholder,
input::placeholder {
  color: #7c719e;
}

.field-block {
  display: grid;
  gap: 8px;
}

.short-textarea {
  min-height: 78px;
}

#linkBlock {
  display: none;
}

#linkBlock.is-visible,
#tableTemplateBlock.is-visible {
  display: grid;
}

#tableTemplateBlock {
  display: none;
}

#tableTemplateStatus {
  color: var(--muted);
  line-height: 1.45;
}

.course-module {
  display: grid;
  gap: 18px;
}

.course-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.36fr);
  gap: 18px;
  align-items: end;
  padding: 22px;
  border: 1px solid rgba(218, 194, 255, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(23, 18, 43, 0.94), rgba(7, 6, 16, 0.96)),
    radial-gradient(circle at 82% 0%, rgba(184, 126, 255, 0.24), transparent 36%);
  box-shadow: var(--shadow), 0 0 30px rgba(151, 86, 255, 0.18);
}

.course-hero h3,
.course-section h3 {
  margin: 0;
  color: #fff;
  letter-spacing: 0;
}

.course-hero h3 {
  font-size: 36px;
  line-height: 1.1;
}

.course-hero p,
.course-section-head p,
.source-panel p {
  margin: 8px 0 0;
  color: var(--soft);
  line-height: 1.65;
}

.course-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.course-stats span {
  min-height: 86px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(197, 161, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--soft);
  font-size: 13px;
  text-align: center;
}

.course-stats strong {
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.course-section {
  display: grid;
  gap: 14px;
}

.course-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding-top: 4px;
}

.course-section-head h3 {
  font-size: 24px;
}

.course-section-head > p {
  max-width: 520px;
  text-align: right;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.course-card,
.resource-card {
  border: 1px solid rgba(193, 154, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(27, 23, 49, 0.86), rgba(11, 9, 22, 0.9)),
    radial-gradient(circle at 92% 0%, rgba(138, 77, 255, 0.12), transparent 34%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.course-card {
  min-height: 362px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 15px;
}

.course-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.course-card-top span,
.course-card-top strong,
.resource-card span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  border: 1px solid rgba(211, 185, 255, 0.28);
  border-radius: 8px;
  color: var(--soft);
  background: rgba(126, 72, 255, 0.14);
  font-size: 12px;
}

.course-card h4 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0;
}

.course-card p,
.course-card li,
.resource-card p {
  color: var(--soft);
  line-height: 1.55;
  font-size: 13px;
}

.course-card p,
.resource-card p {
  margin: 0;
}

.course-card ul {
  margin: 0;
  padding-left: 18px;
}

.course-card li {
  margin: 6px 0;
}

.course-practice {
  margin-top: auto;
  display: grid;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(193, 154, 255, 0.16);
}

.course-practice span {
  color: var(--violet);
  font-size: 12px;
  font-weight: 800;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.resource-card {
  min-height: 176px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.resource-card:hover {
  border-color: rgba(222, 204, 255, 0.72);
  transform: translateY(-2px);
  background:
    linear-gradient(180deg, rgba(42, 32, 74, 0.9), rgba(14, 11, 28, 0.92)),
    radial-gradient(circle at 92% 0%, rgba(176, 115, 255, 0.2), transparent 38%);
}

.resource-card strong {
  color: #fff;
  font-size: 18px;
  line-height: 1.3;
}

.resource-card em {
  align-self: end;
  justify-self: start;
  margin-top: 4px;
  padding: 7px 10px;
  border: 1px solid rgba(221, 200, 255, 0.5);
  border-radius: 8px;
  color: #fff;
  background: rgba(137, 82, 255, 0.24);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.source-panel {
  grid-template-columns: minmax(0, 0.8fr) minmax(240px, 1fr);
  align-items: center;
  padding: 16px;
  border-top: 1px solid rgba(193, 154, 255, 0.16);
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.source-links a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(193, 154, 255, 0.22);
  background: rgba(255, 255, 255, 0.045);
  color: var(--soft);
  text-decoration: none;
  font-size: 13px;
}

.source-links a:hover {
  color: #fff;
  border-color: rgba(222, 204, 255, 0.62);
}

.courseware-page {
  user-select: text;
}

.resource-page {
  user-select: text;
}

.courseware-page.access-locked .courseware-shell,
.resource-page.access-locked .resource-shell {
  filter: blur(8px) brightness(0.72);
  pointer-events: none;
  user-select: none;
}

.courseware-shell,
.resource-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 54px;
}

.courseware-header,
.resource-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.courseware-back,
.resource-back {
  order: 2;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border: 1px solid rgba(207, 177, 255, 0.34);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

.courseware-back:hover,
.resource-back:hover {
  border-color: rgba(222, 204, 255, 0.72);
  background: rgba(154, 96, 255, 0.14);
}

.courseware-cover,
.resource-cover {
  margin-bottom: 16px;
}

.courseware-lock-note {
  display: inline-block;
  margin-top: 12px !important;
  padding: 9px 11px;
  border: 1px solid rgba(70, 230, 170, 0.28);
  border-radius: 8px;
  background: rgba(70, 230, 170, 0.08);
  color: #dfffee !important;
  font-size: 13px;
}

.courseware-nav {
  position: sticky;
  top: 48px;
  z-index: 10;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px;
  margin-bottom: 16px;
  border: 1px solid rgba(193, 154, 255, 0.2);
  border-radius: 8px;
  background: rgba(8, 7, 18, 0.88);
  backdrop-filter: blur(16px);
}

.courseware-nav a {
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(193, 154, 255, 0.16);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.courseware-nav a:hover {
  color: #fff;
  border-color: rgba(222, 204, 255, 0.56);
}

.courseware-article {
  display: grid;
  gap: 14px;
}

.courseware-overview,
.courseware-lesson,
.courseware-sources {
  padding: 20px;
  border: 1px solid rgba(193, 154, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(27, 23, 49, 0.86), rgba(11, 9, 22, 0.9)),
    radial-gradient(circle at 92% 0%, rgba(138, 77, 255, 0.12), transparent 34%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.courseware-overview h2,
.courseware-lesson h2,
.courseware-sources h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: 0;
}

.courseware-lesson > span {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  margin-bottom: 10px;
  padding: 0 9px;
  border: 1px solid rgba(211, 185, 255, 0.28);
  border-radius: 8px;
  color: var(--soft);
  background: rgba(126, 72, 255, 0.14);
  font-size: 12px;
  font-weight: 800;
}

.courseware-article h3 {
  margin: 16px 0 8px;
  color: var(--violet);
  font-size: 16px;
  letter-spacing: 0;
}

.courseware-article p,
.courseware-article li {
  color: var(--soft);
  font-size: 15px;
  line-height: 1.75;
}

.courseware-article p,
.courseware-article ol,
.courseware-article ul {
  margin-top: 0;
}

.courseware-prompt {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(84, 214, 255, 0.2);
  border-radius: 8px;
  background: rgba(84, 214, 255, 0.06);
  color: #e8fbff;
  line-height: 1.65;
}

.courseware-sources .source-links {
  justify-content: flex-start;
}

.resource-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 240px) auto auto;
  gap: 10px;
  align-items: center;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(193, 154, 255, 0.2);
  border-radius: 8px;
  background: rgba(8, 7, 18, 0.7);
}

.resource-download {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(221, 200, 255, 0.78);
  border-radius: 8px;
  background: linear-gradient(135deg, #6f3cff, #b783ff);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
}

.resource-count {
  color: var(--soft);
  font-size: 13px;
  white-space: nowrap;
}

.resource-table-card {
  overflow: hidden;
  border: 1px solid rgba(193, 154, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(27, 23, 49, 0.86), rgba(11, 9, 22, 0.9)),
    radial-gradient(circle at 92% 0%, rgba(138, 77, 255, 0.12), transparent 34%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.resource-table-scroll {
  overflow: auto;
  max-height: 68vh;
}

.resource-table-scroll table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  color: var(--soft);
  font-size: 13px;
}

.resource-table-scroll th,
.resource-table-scroll td {
  border: 1px solid rgba(193, 154, 255, 0.16);
  padding: 10px;
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}

.resource-table-scroll th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #fff;
  background: rgba(101, 56, 210, 0.92);
}

.resource-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.resource-tab {
  min-height: 34px;
  border: 1px solid rgba(193, 154, 255, 0.2);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.045);
}

.resource-tab.active {
  color: #fff;
  border-color: rgba(221, 202, 255, 0.76);
  background: linear-gradient(135deg, rgba(114, 61, 255, 0.86), rgba(189, 145, 255, 0.52));
}

.resource-pager {
  display: flex;
  gap: 8px;
}

.resource-pager button {
  min-height: 36px;
  border: 1px solid rgba(207, 177, 255, 0.34);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.resource-pager button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media print {
  .courseware-page {
    display: none;
  }
}

.preview-strip {
  min-height: 86px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 14px 0;
}

.thumb {
  width: 108px;
  height: 72px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-solid);
}

.video-thumb {
  width: 144px;
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 15, 36, 0.9);
  padding: 8px;
  color: var(--ink);
  font-size: 12px;
}

.video-thumb strong {
  font-size: 13px;
}

.result-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.panel,
.report-panel {
  min-height: 236px;
  padding: 16px;
}

.report-panel {
  grid-column: 1 / -1;
}

.panel-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-head h3 {
  margin: 0;
  font-size: 16px;
  color: #fff;
}

.panel-head span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 8px;
  background: rgba(126, 72, 255, 0.18);
  border: 1px solid rgba(190, 153, 255, 0.24);
  color: var(--soft);
  font-size: 12px;
}

.metric-table {
  display: grid;
  gap: 8px;
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  min-height: 38px;
  align-items: center;
  border-bottom: 1px solid rgba(193, 154, 255, 0.13);
}

.metric-name {
  color: var(--muted);
  font-size: 13px;
}

.metric-value {
  font-weight: 800;
  text-align: right;
  color: #fff;
}

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

.mini-card {
  border: 1px solid rgba(193, 154, 255, 0.16);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.mini-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: #fff;
}

.mini-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.priority-high {
  border-left: 4px solid var(--danger);
}

.priority-mid {
  border-left: 4px solid var(--amber);
}

.priority-low {
  border-left: 4px solid var(--cyan);
}

.report-output {
  margin: 0;
  word-break: break-word;
  color: #efe9ff;
  line-height: 1.65;
  background: rgba(5, 4, 12, 0.58);
  border: 1px solid rgba(193, 154, 255, 0.18);
  border-radius: 8px;
  padding: 14px;
  min-height: 220px;
  max-height: 540px;
  overflow: auto;
}

.report-output h1,
.report-output h2,
.report-output h3,
.report-output p,
.report-output ul,
.report-output ol {
  margin: 0;
}

.report-output h1 {
  font-size: 24px;
  line-height: 1.24;
  margin-bottom: 16px;
  color: #fff;
}

.report-output h2 {
  margin: 18px 0 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(193, 154, 255, 0.15);
  color: var(--soft);
  font-size: 18px;
}

.report-output h3 {
  margin: 14px 0 6px;
  color: #fff;
  font-size: 15px;
}

.report-output p {
  margin-bottom: 8px;
  color: #efe9ff;
}

.report-output ul,
.report-output ol {
  padding-left: 22px;
  margin-bottom: 10px;
}

.report-output li {
  margin: 5px 0;
}

.report-output table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 13px;
}

.report-output th,
.report-output td {
  border: 1px solid rgba(193, 154, 255, 0.2);
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

.report-output th {
  color: #fff;
  background: rgba(126, 72, 255, 0.18);
}

@media (max-width: 980px) {
  .promo-marquee {
    height: 38px;
  }

  .promo-track {
    gap: 28px;
    padding-left: 16px;
    animation-duration: 18s;
  }

  .promo-track span {
    font-size: 13px;
  }

  .wechat-lead-card {
    right: 12px;
    bottom: 12px;
    width: min(330px, calc(100vw - 24px));
    grid-template-columns: minmax(0, 1fr) 94px;
    gap: 10px;
    padding: 10px;
  }

  .wechat-lead-copy p {
    font-size: 11px;
  }

  .wechat-lead-copy strong {
    font-size: 15px;
  }

  .wechat-lead-copy span {
    font-size: 10px;
  }

  .wechat-lead-card img {
    width: 94px;
    height: 120px;
  }

  .app-shell {
    min-height: calc(100vh - 38px);
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    gap: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workflow-list {
    display: flex;
    overflow-x: auto;
    padding-bottom: 6px;
    max-width: 100%;
    min-width: 0;
  }

  .workflow {
    flex: 0 0 auto;
    min-width: 116px;
    text-align: center;
  }

  .status-panel {
    margin-top: 0;
  }

  .input-grid,
  .result-layout {
    grid-template-columns: 1fr;
  }

  .course-hero,
  .source-panel {
    grid-template-columns: 1fr;
  }

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

  .course-section-head > p {
    text-align: left;
  }

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

  .courseware-header,
  .resource-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .courseware-back,
  .resource-back {
    order: 0;
  }

  .resource-toolbar {
    grid-template-columns: 1fr;
  }

  .source-links {
    justify-content: flex-start;
  }

  .upload-slots,
  .category-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .workspace,
  .sidebar {
    padding: 16px;
  }

  .brand {
    min-height: 58px;
  }

  .mark {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

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

  .topbar h2 {
    font-size: 30px;
  }

  .form-actions,
  .top-actions {
    width: 100%;
  }

  .primary-button,
  .secondary-button,
  .icon-button {
    flex: 1;
  }

  .course-hero {
    padding: 18px;
  }

  .course-hero h3 {
    font-size: 30px;
  }

  .course-stats {
    grid-template-columns: 1fr;
  }

  .course-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .course-card {
    min-height: auto;
  }
}
