/* NiceOffer 交付管理系统 — 统一生产端样式 */

:root {
  --no-primary: #0052d9;
  --no-primary-hover: #003cab;
  --no-primary-bg: #ecf2fe;
  --no-accent: #0594fa;
  --no-bg: #eef1f6;
  --no-bg-gradient: linear-gradient(160deg, #eef1f6 0%, #e8eef8 50%, #f5f7fa 100%);
  --no-surface: #ffffff;
  --no-text: #1d2129;
  --no-text-secondary: #6b7280;
  --no-border: #e7e9ec;
  --no-radius: 12px;
  --no-radius-sm: 8px;
  --no-shadow: 0 2px 16px rgba(0, 32, 96, 0.06);
  --no-shadow-lg: 0 8px 32px rgba(0, 32, 96, 0.08);
  --no-max-width: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--no-bg-gradient);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: var(--no-text);
  line-height: 1.5;
}

a {
  color: var(--no-primary);
  text-decoration: none;
}

a:hover {
  color: var(--no-primary-hover);
  text-decoration: underline;
}

/* 布局 */
.layout,
.no-shell,
.page {
  max-width: var(--no-max-width);
  margin: 0 auto;
  padding: 20px 16px 48px;
}

/* 顶栏 */
.header,
.no-topbar {
  background: var(--no-surface);
  border-radius: var(--no-radius);
  padding: 16px 24px;
  margin-bottom: 20px;
  box-shadow: var(--no-shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.header h1,
.no-topbar h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.header .sub,
.header .tip,
.no-topbar .sub {
  color: var(--no-text-secondary);
  font-size: 13px;
  margin-top: 4px;
}

.no-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.no-brand:hover {
  text-decoration: none;
}

.no-link-back {
  font-size: 14px;
  color: var(--no-primary);
  white-space: nowrap;
}

.no-link-back:hover {
  color: var(--no-primary-hover);
}

.no-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--no-primary) 0%, var(--no-accent) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 82, 217, 0.25);
}

/* 统计卡片 */
.stats,
.no-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card,
.no-stat-card {
  background: var(--no-surface);
  border-radius: var(--no-radius);
  padding: 18px 20px;
  box-shadow: var(--no-shadow);
  border: 1px solid var(--no-border);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover,
.no-stat-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--no-shadow-lg);
}

.stat-label,
.no-stat-label {
  color: var(--no-text-secondary);
  font-size: 13px;
  margin-bottom: 8px;
}

.stat-value,
.no-stat-value {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.stat-value.todo,
.no-stat-value.todo {
  color: #e37318;
}

/* 工具栏 */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-summary {
  color: var(--no-text-secondary);
  font-size: 13px;
  margin-left: 8px;
}

/* 内容块 */
.hw-box {
  background: #f8fafc;
  padding: 14px 16px;
  border-radius: var(--no-radius-sm);
  margin-top: 10px;
  white-space: pre-wrap;
  line-height: 1.65;
  border: 1px solid var(--no-border);
}

.lesson-dlg-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 14px;
}

.code-tag {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 12px;
  background: var(--no-primary-bg);
  padding: 2px 8px;
  border-radius: 4px;
}

/* 入学引导 */
.onboard-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--no-border);
}

.onboard-step:last-child {
  border-bottom: none;
}

.review-img {
  max-width: 100%;
  max-height: 200px;
  margin-top: 8px;
  border-radius: var(--no-radius-sm);
  border: 1px solid var(--no-border);
}

/* 看板 */
.dist-bar {
  display: flex;
  height: 32px;
  border-radius: var(--no-radius-sm);
  overflow: hidden;
  margin: 12px 0;
}

.dist-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  min-width: 2px;
  font-weight: 500;
}

.seg-on_track { background: #2ba471; }
.seg-delayed { background: #e34d59; }
.seg-ahead { background: var(--no-primary); }
.seg-pending { background: #c5c5c5; color: #555; }

.board-filter {
  margin-bottom: 14px;
}

/* 激活页 */
.agreement-box {
  height: 300px;
  overflow-y: auto;
  border: 1px solid var(--no-border);
  border-radius: var(--no-radius-sm);
  padding: 18px 20px;
  background: #fafbfc;
  font-size: 14px;
  line-height: 1.75;
}

.agreement-box h3 {
  margin: 18px 0 8px;
  font-size: 15px;
  color: var(--no-text);
}

.agreement-box h3:first-child {
  margin-top: 0;
}

/* 首页 */
.home-hero {
  text-align: center;
  padding: 48px 24px 36px;
  margin-bottom: 28px;
}

.home-hero h1 {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--no-primary), var(--no-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-hero p {
  margin: 0;
  color: var(--no-text-secondary);
  font-size: 16px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.role-card {
  background: var(--no-surface);
  border-radius: var(--no-radius);
  padding: 28px 24px;
  box-shadow: var(--no-shadow);
  border: 1px solid var(--no-border);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.role-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--no-shadow-lg);
  border-color: var(--no-primary);
  text-decoration: none;
}

.role-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.role-card-icon.student { background: #ecf2fe; }
.role-card-icon.teacher { background: #e8f8f2; }
.role-card-icon.admin { background: #fff3e0; }
.role-card-icon.activate { background: #f3e8ff; }

.role-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
}

.role-card p {
  margin: 0;
  color: var(--no-text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.home-footer {
  background: var(--no-surface);
  border-radius: var(--no-radius);
  padding: 20px 24px;
  box-shadow: var(--no-shadow);
  border: 1px solid var(--no-border);
}

.home-footer h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--no-text-secondary);
}

.home-footer pre {
  margin: 0;
  background: #f8fafc;
  padding: 14px 16px;
  border-radius: var(--no-radius-sm);
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  border: 1px solid var(--no-border);
}

/* TDesign 下拉在 Tabs/Card 内正常弹出 */
.t-tabs__content,
.t-tab-panel,
.layout .t-card,
.layout .t-form {
  overflow: visible;
}

.select-popup-fix {
  width: 100%;
}

.date-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.date-picker-row .t-date-picker {
  flex: 1;
}

/* 入学引导资料 */
.onboard-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.onboard-material-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--no-border);
}

.onboard-material-row:last-child {
  border-bottom: none;
}

.onboard-material-info h4 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
}

.onboard-material-info p {
  margin: 0;
  font-size: 12px;
  color: var(--no-text-secondary);
}
.t-card {
  border-radius: var(--no-radius) !important;
  box-shadow: var(--no-shadow) !important;
  border: 1px solid var(--no-border) !important;
}

/* 学员中心 · 交付清单表格 */
.delivery-table .t-table__header th,
.delivery-table .t-table__body td {
  padding: 10px 12px !important;
  vertical-align: middle;
}

.delivery-table .delivery-status-cell {
  max-width: 200px;
  line-height: 1.45;
}

.delivery-table .delivery-status-cell .t-tag {
  white-space: normal;
  height: auto;
  padding: 4px 8px;
  line-height: 1.4;
  text-align: left;
}

.delivery-table .t-table__body td:last-child .t-space {
  row-gap: 6px;
}

/* 响应式 */
@media (max-width: 640px) {
  .home-hero h1 {
    font-size: 26px;
  }

  .stats,
  .no-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-value,
  .no-stat-value {
    font-size: 20px;
  }
}

.next-lesson-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

/* 学员主页 — 学习资源库入口 */
.kb-resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.kb-resource-card {
  display: block;
  padding: 18px 20px;
  border-radius: var(--no-radius-sm);
  border: 1px solid var(--no-border);
  background: linear-gradient(180deg, #fafbfd 0%, #fff 100%);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.kb-resource-card:hover {
  border-color: #b5c7ff;
  box-shadow: var(--no-shadow);
  text-decoration: none;
  color: inherit;
}

.kb-resource-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.kb-resource-card-head strong {
  font-size: 16px;
}

.kb-resource-desc {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--no-text-secondary);
  line-height: 1.55;
}

.kb-resource-modules {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.kb-resource-module-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  color: #4e5969;
  background: #f2f3f5;
  border-radius: 4px;
}

.kb-resource-link {
  font-size: 13px;
  color: var(--no-primary);
  font-weight: 500;
}

@media (max-width: 768px) {
  .kb-resource-grid {
    grid-template-columns: 1fr;
  }
}
