/* ========== 基础样式 ========== */

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI Variable",
    "Segoe UI",
    "PingFang SC",
    "HarmonyOS Sans SC",
    "Microsoft YaHei UI",
    "Microsoft YaHei",
    "Source Han Sans SC",
    "Noto Sans SC",
    system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01", "kern";
  font-variant-ligatures: common-ligatures contextual;
  color: #1f2937;
  letter-spacing: 0.005em;
  line-height: 1.55;
}

/* CJK 段落更舒适的行高 */
p,
.text-sm,
.text-xs,
.text-base {
  line-height: 1.65;
}

/* 标题统一：字重 + 紧凑字距，避免松散感 */
h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.01em;
  color: #0f172a;
}
h1 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
h2 { font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
h3 { font-weight: 600; line-height: 1.35; }

/* 数字 / 英文段段独立 Inter 渲染，避开中文回落字体 */
.num,
.stat-number,
time,
[data-num] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum", "cv11", "ss01";
  letter-spacing: -0.01em;
}

/* 屏幕阅读器专用文本（可访问标签） */
.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;
}

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

/* ========== 顶部导航 ========== */
.nav-top-item {
  color: #4b5563;
}

.nav-top-item:hover {
  background: rgba(255, 255, 255, 0.6);
  color: #111827;
}

.nav-top-item.active {
  background: #fff;
  color: #e63323;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* ========== 左侧导航 ========== */
.nav-item {
  color: #4b5563;
}

.nav-item:hover {
  background: #fff;
  color: #111827;
}

.nav-item.active {
  background: #fff;
  color: #e63323;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.nav-item.active svg {
  color: #e63323;
}

/* ========== 左侧导航图标容器 ========== */
.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
  transition: all 0.15s;
}
.nav-icon svg {
  width: 16px;
  height: 16px;
}
.nav-icon-teal    { background: #fde8e6; color: #e63323; }
.nav-icon-blue    { background: #fde8e6; color: #c0271b; }
.nav-icon-purple  { background: #fde8e6; color: #c0271b; }
.nav-icon-orange  { background: #fef3f2; color: #c0271b; }
.nav-icon-pink    { background: #fef3f2; color: #c0271b; }
.nav-icon-emerald { background: #fde8e6; color: #c0271b; }
.nav-icon-amber   { background: #fde8e6; color: #c0271b; }
.nav-icon-indigo  { background: #fde8e6; color: #9e1f15; }
.nav-icon-cyan    { background: #fde8e6; color: #c0271b; }
.nav-icon-violet  { background: #fde8e6; color: #c0271b; }

.nav-item.active .nav-icon {
  box-shadow: 0 0 0 2px rgba(230,51,35,0.15);
}

/* ========== 用户头像下拉 ========== */
.user-dropdown {
  animation: dropdownIn 0.15s ease-out;
}

@keyframes dropdownIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== 消息弹窗 ========== */
#msgPopup {
  animation: dropdownIn 0.15s ease-out;
}

/* ========== 首页背景：柔和淡紫色调 mesh ========== */
.home-bg {
  position: relative;
  background:
    radial-gradient(1200px 600px at 8% -10%, rgba(245,198,192, 0.18), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(245,198,192, 0.14), transparent 55%),
    radial-gradient(700px 500px at 50% 110%, rgba(253,232,230, 0.10), transparent 60%),
    linear-gradient(180deg, #fbfaff 0%, #f7f7fb 100%);
}

.home-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(192,39,27, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.35), transparent 55%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.35), transparent 55%);
}

/* ========== Hero 标题装饰 ========== */
.hero-sparkle {
  position: absolute;
  pointer-events: none;
  opacity: 0.85;
  filter: drop-shadow(0 4px 8px rgba(192,39,27, 0.12));
}

@keyframes sparkleFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.85; }
  50%       { transform: translateY(-4px) rotate(8deg); opacity: 1; }
}
.hero-sparkle { animation: sparkleFloat 3.6s ease-in-out infinite; }
.hero-sparkle.delay { animation-delay: 1.2s; }

/* ========== AI 助手对话框 ========== */
.ai-dialog-box {
  position: relative;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 24px -12px rgba(192,39,27, 0.18);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ai-dialog-box::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(242,121,107, 0.35), rgba(192,39,27, 0.1) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ai-dialog-box:hover,
.ai-dialog-box:focus-within {
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 18px 40px -16px rgba(192,39,27, 0.28);
  border-color: rgba(245,198,192, 0.8);
}

.ai-dialog-box:focus-within::before { opacity: 1; }

.ai-textarea {
  font-size: 14px;
  line-height: 1.6;
  color: #1f2937;
}

.ai-tool-btn {
  font-weight: 500;
}

.ai-tool-btn:hover {
  border-color: #f2796b;
  color: #e63323;
}

.ai-tool-btn.active {
  background: linear-gradient(135deg, #fef3f2 0%, #fde8e6 100%);
  border-color: #f2796b;
  color: #c0271b;
  box-shadow: 0 1px 2px rgba(192,39,27, 0.08);
}

.send-btn:hover,
.send-btn-alt:hover {
  transform: scale(1.05);
}

/* ========== 首页通用卡片 ========== */
.home-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(229, 231, 235, 0.7);
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.03),
    0 8px 24px -16px rgba(158,31,21, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.home-card:hover {
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 16px 36px -18px rgba(158,31,21, 0.22);
  border-color: rgba(245,198,192, 0.6);
}

.home-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(243, 244, 246, 0.9);
}

/* 紧凑卡（右侧栏目） */
.home-card.is-compact { border-radius: 14px; }
.home-card.is-compact .home-card-header {
  padding: 12px 16px;
}
.home-card.is-compact .section-title {
  font-size: 13px;
}
.home-card.is-compact .card-body {
  padding: 12px 16px 14px;
}

.home-card-equal-top {
  height: 360px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.home-card-equal-top .card-body {
  flex: 1;
  min-height: 0;
}

.news-card .feed-row .feed-title {
  display: block;
  white-space: nowrap;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
}

.news-card .feed-row {
  display: block;
  padding: 8px 4px;
}

.news-card .news-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.news-card .feed-row .feed-title {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-card .news-date {
  flex-shrink: 0;
  font-size: 12px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.news-card .news-summary {
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 卡片标准内容区 */
.card-body {
  padding: 16px 20px;
}

/* 列表行通用节奏 */
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  transition: background 0.15s ease;
}
.list-row + .list-row {
  border-top: 1px solid rgba(243, 244, 246, 0.9);
}

/* 资讯/智能体小行：标签 + 文本块 + 时间，统一对齐 */
.feed-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 4px;
  border-radius: 8px;
  transition: background 0.15s ease;
}
.feed-row:hover {
  background: rgba(243, 244, 246, 0.6);
}
.feed-row .feed-body {
  flex: 1;
  min-width: 0;
}
.feed-row .feed-title {
  font-size: 13.5px;
  color: #111827;
  line-height: 1.45;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.feed-row .feed-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.feed-row:hover .feed-title { color: #c0271b; }
.feed-row .feed-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.45;
}
.feed-row .feed-date {
  margin-top: 4px;
  font-size: 11.5px;
  color: #9ca3af;
  font-variant-numeric: tabular-nums;
}
.feed-tag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 4px;
  letter-spacing: 0.02em;
}
.feed-tag-policy { background: #fef2f2; color: #b91c1c; }
.feed-tag-news   { background: #fef3f2; color: #9e1f15; }
.feed-tag-school { background: #fef3f2; color: #c0271b; }

/* 智能体推荐行 */
.agent-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  transition: background 0.15s ease;
}
.agent-row:hover { background: rgba(243, 244, 246, 0.7); }
.agent-row .agent-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.agent-row .agent-icon svg { width: 18px; height: 18px; }
.agent-row .agent-body { flex: 1; min-width: 0; }
.agent-row .agent-title {
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  line-height: 1.4;
}
.agent-row .agent-desc {
  font-size: 11.5px;
  color: #6b7280;
  line-height: 1.4;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-row .agent-action {
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  background: #fef3f2;
  color: #c0271b;
  border: 1px solid rgba(245,198,192, 0.6);
  transition: background 0.15s ease;
}
.agent-row:hover .agent-action {
  background: #fde8e6;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #0f172a;
  font-size: 14px;
  letter-spacing: -0.005em;
}

.section-title-bar {
  width: 3px;
  height: 14px;
  border-radius: 3px;
  background: linear-gradient(180deg, #e63323, #c0271b);
}

/* ========== 快捷入口卡 ========== */
.quick-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.8);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 28px -18px rgba(158,31,21, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
}

.quick-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 24px 48px -20px rgba(158,31,21, 0.28);
  border-color: rgba(245,198,192, 0.8);
}

.quick-card-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  right: -60px;
  top: -80px;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.32;
  pointer-events: none;
}

.quick-card-icon {
  position: absolute;
  right: 14px;
  bottom: 8px;
  width: 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  filter: drop-shadow(0 10px 18px rgba(158,31,21, 0.18));
}

.quick-card-title {
  position: relative;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quick-card-title .star {
  color: #c0271b;
  font-size: 12px;
  transform: translateY(-6px);
}

.quick-card-desc {
  position: relative;
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #64748b;
  max-width: 65%;
}

.quick-card-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, #e63323, #c0271b);
  box-shadow: 0 6px 14px -4px rgba(192,39,27, 0.45);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.quick-card-btn:hover {
  box-shadow: 0 10px 22px -6px rgba(192,39,27, 0.55);
  transform: translateY(-1px);
}

/* ========== 应用图标项（我常用的） ========== */
.app-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 0;
  text-decoration: none;
}
.app-icon-item .app-tile {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 6px 14px -6px rgba(158,31,21, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-icon-item .app-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.28), rgba(255,255,255,0) 55%);
  pointer-events: none;
}

.app-icon-item:hover .app-tile {
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 14px 26px -10px rgba(158,31,21, 0.35);
}

.app-icon-item > span {
  color: #374151;
  font-size: 12.5px;
  letter-spacing: 0.005em;
}
.app-icon-item:hover > span {
  color: #c0271b;
}

.common-app-grid {
  min-height: 168px;
}

.common-app-grid.is-switching .app-icon-item {
  animation: commonAppIn 0.22s ease-out both;
}

.common-app-grid.is-switching .app-icon-item:nth-child(2) { animation-delay: 0.02s; }
.common-app-grid.is-switching .app-icon-item:nth-child(3) { animation-delay: 0.04s; }
.common-app-grid.is-switching .app-icon-item:nth-child(4) { animation-delay: 0.06s; }
.common-app-grid.is-switching .app-icon-item:nth-child(5) { animation-delay: 0.08s; }
.common-app-grid.is-switching .app-icon-item:nth-child(6) { animation-delay: 0.10s; }
.common-app-grid.is-switching .app-icon-item:nth-child(7) { animation-delay: 0.12s; }
.common-app-grid.is-switching .app-icon-item:nth-child(8) { animation-delay: 0.14s; }
.common-app-grid.is-switching .app-icon-item:nth-child(9) { animation-delay: 0.16s; }

.add-app-entry .add-app-tile {
  color: #e63323;
  border: 1px dashed rgba(192,39,27, 0.48);
  background: rgba(255, 255, 255, 0.72) !important;
  font-size: 24px;
  font-weight: 500;
}

.add-app-entry:hover .add-app-tile {
  color: #fff;
  border-style: solid;
  background: linear-gradient(135deg, #e63323, #e63323) !important;
}

.app-icon-item {
  border-radius: 12px;
  border: 1px solid transparent;
}

.app-icon-item.is-selected {
  background: rgba(254,243,242, 0.78);
  border-color: rgba(242,121,107, 0.58);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.62);
}

.app-icon-item.is-selected > span {
  color: #c0271b;
  font-weight: 600;
}

.add-app-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.add-app-modal.hidden {
  display: none;
}

.add-app-dialog {
  width: 520px;
  max-width: calc(100vw - 40px);
  border-radius: 14px;
  border: 1px solid rgba(245,198,192, 0.82);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 68px -36px rgba(192,39,27, 0.72);
  animation: dropdownIn 0.18s ease-out;
}

.add-app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
}

.add-app-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.add-app-header p {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

#addAppCloseBtn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: rgba(241, 245, 249, 0.9);
  color: #64748b;
  font-size: 20px;
}

.add-app-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 20px;
}

.add-app-list button {
  min-height: 74px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.8);
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.add-app-list button span {
  display: block;
  width: 30px;
  height: 30px;
  margin: 0 auto 8px;
  border-radius: 8px;
  line-height: 30px;
  color: #fff;
  background: linear-gradient(135deg, #f2796b, #e63323);
}

.add-app-list button:hover,
.add-app-list button.is-selected {
  transform: translateY(-2px);
  border-color: rgba(242,121,107, 0.86);
  background: rgba(254,243,242, 0.92);
}

.add-app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 18px;
  border-top: 1px solid rgba(226, 232, 240, 0.86);
}

.add-app-footer span {
  font-size: 12px;
  color: #64748b;
}

#addAppConfirmBtn {
  height: 32px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  background: linear-gradient(135deg, #e63323, #e63323);
}

@keyframes commonAppIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ========== 待办行 ========== */
.todo-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px 12px 22px;
  transition: background 0.15s ease, color 0.15s ease;
  cursor: pointer;
}
.todo-row + .todo-row {
  border-top: 1px solid rgba(243, 244, 246, 0.9);
}
.todo-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: transparent;
  transition: background 0.15s ease;
}
.todo-row:hover {
  background: rgba(254,243,242, 0.6);
}
.todo-row:hover::before {
  background: linear-gradient(180deg, #e63323, #c0271b);
}
.todo-row .todo-tag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 22px;
  padding: 0 8px;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.todo-row .todo-title {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  color: #1f2937;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.todo-row:hover .todo-title { color: #111827; }
.todo-row .todo-meta {
  flex-shrink: 0;
  font-size: 12px;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
}
.todo-row .todo-meta .deadline-urgent { color: #dc2626; font-weight: 500; }

.todo-row.todo-extra {
  animation: todoReveal 0.22s ease-out both;
}

#todoToggleIcon.is-expanded {
  transform: rotate(180deg);
}

@keyframes todoReveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== 待办标签 ========== */
.tag-ai-homework {
  background: #fde8e6;
  color: #e63323;
}

.tag-learning {
  background: #fde8e6;
  color: #c0271b;
}

.tag-essay {
  background: #fef3f2;
  color: #c0271b;
}

.tag-wuyu {
  background: #fde8e6;
  color: #c0271b;
}

.tag-course {
  background: #fee2e2;
  color: #dc2626;
}

/* ========== Tab 切换 ========== */
.tab-btn.active,
.res-tab.active,
.data-tab.active,
.agent-tab.active {
  background: #fff;
  color: #e63323;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

/* ========== 智能体筛选 ========== */
.agent-filter.active {
  background: #fef3f2;
  border-color: #f2796b;
  color: #e63323;
  font-weight: 500;
}

/* ========== 侧边栏整体布局 ========== */
.sidebar {
  --rail-primary: 200px;
  width: var(--rail-primary);
  transition: width 0.25s ease;
  position: relative;
  z-index: 40;
}

.sidebar .primary-rail {
  width: var(--rail-primary);
  flex-shrink: 0;
  transition: width 0.25s ease;
}

.sidebar.primary-collapsed {
  --rail-primary: 64px;
}

/* 一级收起：仅图标 */
.sidebar.primary-collapsed .nav-item,
.sidebar.primary-collapsed .more-entry {
  padding-left: 0;
  padding-right: 0;
  justify-content: center;
  gap: 0;
}

.sidebar.primary-collapsed .nav-item > span,
.sidebar.primary-collapsed .nav-item > svg:not(:first-of-type),
.sidebar.primary-collapsed .more-entry > span,
.sidebar.primary-collapsed .sidebar-toggle-label {
  display: none;
}

.sidebar.primary-collapsed .sidebar-rail-toggle {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.sidebar.primary-collapsed .sidebar-toggle-btn {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.sidebar.primary-collapsed .sidebar-footer {
  display: none;
}

/* ========== 底部「更多」入口 ========== */
.sidebar-bottom {
  flex-shrink: 0;
  background: #f8f9fb;
}

.more-entry {
  color: #4b5563;
  cursor: pointer;
}

.more-entry:hover,
.more-entry.active {
  background: #fff;
  color: #e63323;
}

.more-entry.active {
  border: 1px solid rgba(192,39,27, 0.42);
  background: linear-gradient(135deg, rgba(253,232,230, 0.96), rgba(253,232,230, 0.84));
  color: #c0271b;
  font-weight: 700;
  box-shadow:
    inset 3px 0 0 #e63323,
    0 14px 28px -22px rgba(192,39,27, 0.72);
}

.more-entry.active svg {
  color: #e63323;
  stroke-width: 2.3;
}

.more-entry:hover svg circle,
.more-entry.active svg circle {
  fill: #e63323;
}

.sidebar.primary-collapsed .more-entry {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}

/* ========== 侧栏收缩按钮 ========== */
.sidebar-rail-toggle {
  flex-shrink: 0;
  padding: 6px 8px 4px;
}

.sidebar-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: #6b7280;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #e63323;
}

.sidebar-toggle-btn--compact {
  width: auto;
  flex-shrink: 0;
}

.sidebar-toggle-label {
  white-space: nowrap;
}

/* ========== 全部应用浮层面板 ========== */
.appcenter-panel {
  position: fixed;
  top: 3.5rem; /* 顶部导航高度 */
  left: var(--sidebar-width, 200px);
  bottom: 0;
  width: 440px;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  box-shadow: 4px 0 16px -4px rgba(0, 0, 0, 0.08);
  z-index: 40;
  display: flex;
  flex-direction: column;
  animation: appcenterIn 0.2s ease-out;
  transition: left 0.25s ease;
}

.appcenter-panel::before {
  content: "选择应用添加到常用";
  display: block;
  padding: 10px 20px 0;
  color: #e63323;
  font-size: 12px;
  font-weight: 600;
}

.appcenter-panel.hidden {
  display: none;
}

@keyframes appcenterIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.appcenter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #f3f4f6;
}

.appcenter-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 20px;
}

.app-group {
  margin-bottom: 18px;
}

.app-group-title {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
  padding: 8px 4px;
  margin-bottom: 4px;
}

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

.app-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.app-card:hover {
  background: #fef3f2;
}

.app-card .app-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.app-card .app-label {
  font-size: 13px;
  color: #374151;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-card:hover .app-label {
  color: #e63323;
}

/* ========== 二级悬浮菜单面板 ========== */
.secondary-panel {
  position: absolute;
  top: 0;
  left: 100%;
  min-width: 160px;
  max-width: 220px;
  display: none;
  flex-direction: column;
  background: #fff;
  border-radius: 0 12px 12px 0;
  box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.1), 0 0 1px rgba(0, 0, 0, 0.08);
  z-index: 50;
  overflow: hidden;
}

.sidebar.sub-open .secondary-panel {
  display: flex;
  animation: panelSlideIn 0.2s ease-out;
}

.submenu-item {
  color: #4b5563;
}

.submenu-item:hover {
  background: #fef3f2;
  color: #e63323;
}

.submenu-item.active {
  background: #fef3f2;
  color: #e63323;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

@keyframes panelSlideIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 收起模式下的图标 hover 提示（tooltip） */
.sidebar.primary-collapsed .nav-item,
.sidebar.primary-collapsed .more-entry {
  position: relative;
}

.sidebar.primary-collapsed .nav-item[data-tooltip]::after,
.sidebar.primary-collapsed .more-entry[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: #1f2937;
  color: #fff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 60;
  transition: opacity 0.15s ease;
}

.sidebar.primary-collapsed .nav-item:hover[data-tooltip]::after,
.sidebar.primary-collapsed .more-entry:hover[data-tooltip]::after,
.sidebar.sub-collapsed .submenu-item:hover[data-tooltip]::after {
  opacity: 1;
}

/* ========== 导航分类 ========== */
.nav-cat.active {
  background: #fef3f2;
  color: #e63323;
}

/* ========== 应用中心图标 ========== */
.app-center-item:hover {
  border-color: #f2796b;
  box-shadow: 0 4px 12px rgba(192,39,27, 0.08);
}

/* ========== 我的资源子Tab ========== */
.mine-subtab.active {
  background: #fef3f2;
  border-color: #f2796b;
  color: #e63323;
}

/* ========== 页面切换动画 ========== */
.page-section {
  animation: fadeIn 0.2s ease-out;
}

/* ========== 原平台 iframe 接入容器 ========== */
.iframe-page-section {
  height: calc(100vh - 56px);
  background: #fff;
}

.iframe-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: #fff;
  overflow: hidden;
}

.iframe-toolbar {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
  flex-shrink: 0;
}

.iframe-page-section.iframe-embed-full .iframe-toolbar {
  display: none;
}

.iframe-page-section.iframe-embed-full .iframe-fallback {
  top: 16px;
}

.iframe-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.iframe-action-btn:hover {
  border-color: #f2796b;
  color: #c0271b;
  background: #fef3f2;
}

.iframe-action-btn.primary {
  border-color: #e63323;
  background: #e63323;
  color: #fff;
}

.iframe-action-btn.primary:hover {
  border-color: #c0271b;
  background: #c0271b;
  color: #fff;
}

.platform-iframe {
  width: 100%;
  height: 100%;
  flex: 1;
  border: 0;
  background: #fff;
}

.workshop-preview {
  flex: 1;
  overflow: auto;
  background: #f3f7fb;
}

.workshop-preview-page {
  min-height: 100%;
  width: 100%;
  margin: 0;
  padding: clamp(56px, 7vh, 78px) clamp(48px, 8vw, 128px) clamp(42px, 6vh, 64px);
  box-sizing: border-box;
  color: #071c44;
  background:
    radial-gradient(360px 220px at 84% -10%, rgba(242,121,107, 0.26), transparent 70%),
    radial-gradient(280px 260px at 4% 8%, rgba(248,169,158, 0.22), transparent 72%),
    linear-gradient(180deg, #f7fcff 0%, #f5f9fd 55%, #f1f6fb 100%);
  position: relative;
  overflow: hidden;
}

.workshop-hero {
  position: relative;
  text-align: center;
  padding-top: 38px;
}

.workshop-hero h2 {
  font-size: clamp(34px, 3vw, 46px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0;
  color: #061a42;
}

.workshop-hero p {
  margin-top: 22px;
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1.35;
  font-weight: 800;
  color: #061a42;
}

.workshop-hero p span {
  color: #e63323;
}

.workshop-float-shape {
  position: absolute;
  pointer-events: none;
  opacity: 0.46;
  filter: blur(0.2px);
}

.workshop-float-shape.shape-left {
  left: -60px;
  top: -100px;
  width: 200px;
  height: 220px;
  border: 2px solid rgba(245,198,192, 0.5);
  border-radius: 32px;
  transform: rotate(-34deg);
}

.workshop-float-shape.shape-right {
  right: 20px;
  top: -58px;
  width: 104px;
  height: 78px;
  border-radius: 18px;
  background: rgba(248,169,158, 0.34);
  transform: rotate(-32deg);
  box-shadow: 0 0 0 2px rgba(254, 226, 226, 0.42) inset;
}

.workshop-create-panel {
  margin: clamp(56px, 7vh, 86px) auto 0;
  width: 100%;
  max-width: 1372px;
  min-height: clamp(260px, 33vh, 300px);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 54px -38px rgba(15, 23, 42, 0.55);
  text-align: left;
  overflow: hidden;
}

.workshop-mode-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  height: 74px;
  border-bottom: 1px solid transparent;
}

.workshop-mode-tabs button {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  border-right: 2px solid rgba(148, 163, 184, 0.28);
  background: transparent;
  color: #5b677a;
  font-size: 20px;
  font-weight: 700;
}

.workshop-mode-tabs button:last-child {
  border-right: 0;
}

.workshop-mode-tabs button.active {
  color: #e63323;
  border: 1px solid rgba(192,39,27, 0.78);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, rgba(254,243,242, 0.98), rgba(255, 255, 255, 0.9));
}

.workshop-mode-tabs span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  border: 2px solid currentColor;
  font-size: 14px;
  line-height: 1;
}

.workshop-prompt {
  min-height: 124px;
  padding: 38px 32px;
  color: #75839a;
  font-size: 16px;
}

.workshop-create-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px 18px;
}

.workshop-options,
.workshop-create-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.workshop-options button,
.workshop-create-actions button {
  height: 44px;
  border: 0;
  border-radius: 15px;
  background: #f4f7fb;
  color: #172033;
  padding: 0 18px;
  font-size: 16px;
  font-weight: 600;
}

.workshop-create-actions .upload {
  width: 44px;
  padding: 0;
  border: 1px solid rgba(192,39,27, 0.36);
  background: #f4f0ff;
  color: #e63323;
  font-size: 22px;
}

.workshop-create-actions .create {
  color: #fff;
  background: linear-gradient(135deg, #f2796b, #e63323);
  box-shadow: 0 12px 28px -18px rgba(192,39,27, 0.8);
}

.workshop-topic-section {
  margin: 42px auto 0;
  width: 100%;
  max-width: 1372px;
}

.workshop-topic-section h3 {
  font-size: 26px;
  font-weight: 800;
  color: #061a42;
  margin-bottom: 24px;
}

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

.workshop-topic-grid button {
  height: 86px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  border: 1px solid rgba(226, 232, 240, 0.74);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  color: #111827;
  font-size: 18px;
  font-weight: 700;
  text-align: left;
}

.workshop-topic-grid span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #fef3f2;
  color: #e63323;
}

@media (max-width: 1280px) {
  .workshop-preview-page {
    padding-inline: 40px;
  }

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

@media (max-width: 900px) {
  .workshop-preview-page {
    padding: 48px 24px;
  }

  .workshop-mode-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: auto;
  }

  .workshop-mode-tabs button {
    min-height: 62px;
  }

  .workshop-create-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .workshop-topic-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.iframe-fallback {
  position: absolute;
  right: 16px;
  top: 68px;
  z-index: 2;
  width: min(360px, calc(100% - 32px));
  padding: 16px;
  border: 1px solid #f8c9c2;
  border-radius: 10px;
  background: #fef3f2;
  box-shadow: 0 12px 32px -18px rgba(120, 53, 15, 0.35);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* ========== 搜索框聚焦 ========== */
.search-input:focus {
  box-shadow: 0 0 0 3px rgba(242,121,107, 0.2);
}

/* ========== 待办列表项 ========== */
#todoList > div:hover {
  background: #f9fafb;
}

/* ========== 应用图标项 ========== */
.app-icon-item:hover .w-12 {
  transform: translateY(-2px);
  transition: transform 0.2s ease;
}

/* ========== 右侧卡片 ========== */
.group:hover .group-hover\:text-teal-700 {
  color: #e63323;
}

/* ========== 占位页统一样式 ========== */
.placeholder-hero {
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 10px 28px -14px rgba(158,31,21, 0.18);
}
.placeholder-hero svg {
  width: 40px;
  height: 40px;
}
.placeholder-card {
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.placeholder-card:hover {
  border-color: #f2796b;
  box-shadow: 0 10px 24px -16px rgba(158,31,21, 0.25);
  transform: translateY(-1px);
}
.placeholder-card-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.placeholder-card-icon svg {
  width: 22px;
  height: 22px;
}

/* ========== 数据卡片数字 tabular-nums ========== */
.stat-number {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ========== 焦点环（键盘可见） ========== */
button:focus-visible,
a:focus-visible,
[role="tab"]:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #e63323;
  outline-offset: 2px;
}

/* ========== 响应式适配 ========== */
@media (max-width: 1280px) {
  .search-input {
    width: 280px !important;
  }
}

@media (max-width: 1024px) {
  .search-input {
    width: 200px !important;
  }
}

/* ========== 首页二次设计调整：清爽教育 AI 工作台 ========== */
#page-home {
  color: #172033;
}

#page-home > .max-w-7xl {
  max-width: 1180px;
  padding-top: 26px;
  padding-bottom: 44px;
}

.home-bg {
  background:
    radial-gradient(760px 360px at 50% -6%, rgba(192,39,27, 0.16), transparent 64%),
    radial-gradient(520px 320px at 88% 10%, rgba(248,169,158, 0.12), transparent 58%),
    radial-gradient(520px 360px at 10% 80%, rgba(242,121,107, 0.08), transparent 60%),
    linear-gradient(180deg, #fbfaff 0%, #f7f8fc 55%, #f6f7fb 100%);
}

.home-bg::before {
  opacity: 0.36;
  background-size: 30px 30px;
}

#page-home .text-center.mb-8 {
  margin-bottom: 28px;
}

#page-home h1 {
  margin-bottom: 22px;
  font-size: 36px;
  line-height: 1.25;
  letter-spacing: 0;
}

.hero-sparkle {
  opacity: 0.72;
}

.ai-dialog-box {
  border-radius: 14px !important;
  border-color: rgba(245,198,192, 0.52) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 18px 42px -28px rgba(158,31,21, 0.42) !important;
}

.ai-dialog-box:hover,
.ai-dialog-box:focus-within {
  border-color: #f2796b !important;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 24px 52px -30px rgba(158,31,21, 0.5) !important;
}

.ai-textarea {
  height: 74px !important;
  padding: 15px 18px 8px !important;
}

.ai-dialog-box .border-t {
  padding: 9px 12px !important;
}

.ai-tool-btn {
  height: 30px;
  border-radius: 999px;
}

.send-btn-alt {
  width: 34px !important;
  height: 34px !important;
}

.home-card {
  border-radius: 12px;
  border-color: rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 14px 34px -26px rgba(158,31,21, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.home-card:hover {
  border-color: rgba(245,198,192, 0.74);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 22px 46px -30px rgba(158,31,21, 0.42);
}

.home-card.is-compact {
  border-radius: 12px;
}

.home-card-header {
  min-height: 52px;
  padding: 13px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.62));
}

.home-card.is-compact .home-card-header {
  min-height: 52px;
  padding: 13px 14px;
}

.home-card.is-compact .card-body {
  padding: 10px 14px 14px;
}

.section-title {
  font-size: 14px;
  color: #111827;
}

.section-title-bar {
  height: 15px;
  background: linear-gradient(180deg, #e63323, #c0271b);
}

.home-card-equal-top {
  min-height: 336px;
  height: auto;
}

.home-card-equal-top footer {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.58);
}

#todoList {
  overflow: hidden;
}

.todo-row {
  min-height: 46px;
  padding: 10px 18px;
}

.todo-row::before {
  top: 10px;
  bottom: 10px;
}

.todo-row .todo-tag {
  min-width: 70px;
  height: 21px;
  border-radius: 999px;
}

.todo-row .todo-title {
  font-size: 13.5px;
}

.todo-row .todo-meta {
  font-size: 12px;
}

.news-card .feed-row {
  padding: 8px 6px;
  border-radius: 8px;
}

.news-card .feed-row + .feed-row {
  border-top: 1px solid rgba(241, 245, 249, 0.9);
}

.news-card .feed-row .feed-title {
  font-size: 13.5px;
}

.news-card .news-summary {
  margin-top: 5px;
  font-size: 12.5px;
}

.feed-tag {
  height: 20px;
  border-radius: 6px;
}

.app-icon-item {
  gap: 8px;
  padding: 6px 0;
}

.app-icon-item .app-tile {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.08),
    0 10px 22px -14px rgba(158,31,21, 0.38);
}

.app-icon-item:hover .app-tile {
  transform: translateY(-2px);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.08),
    0 16px 28px -16px rgba(158,31,21, 0.48);
}

.agent-row {
  border-radius: 10px;
}

.agent-row .agent-icon {
  border-radius: 10px;
}

/* ========== 参考新版门户视觉：内容结构不变，仅换肤 ========== */
body {
  background: #eef8ff;
}

body > header {
  background: rgba(254,243,242, 0.86) !important;
  border-bottom-color: rgba(245,198,192, 0.64) !important;
  box-shadow: 0 1px 0 rgba(158,31,21, 0.04);
}

body > header .w-8.h-8 {
  border-radius: 10px !important;
  background: linear-gradient(135deg, #e63323 0%, #e63323 58%, #e63323 100%) !important;
  box-shadow: 0 10px 22px -14px rgba(192,39,27, 0.75);
}

.nav-top-item {
  border: 1px solid transparent;
  color: #334155;
}

.nav-top-item:hover {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(248,169,158, 0.85);
  color: #c0271b;
}

.nav-top-item.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(254,243,242, 0.82));
  border-color: rgba(245,198,192, 0.9);
  color: #e63323;
  box-shadow: 0 10px 22px -18px rgba(192,39,27, 0.45);
}

.search-input {
  background: rgba(255, 255, 255, 0.88) !important;
  border-color: rgba(245,198,192, 0.86) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

#sidebar,
.sidebar .primary-rail,
.sidebar-bottom {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(254,243,242, 0.92)) !important;
  border-color: rgba(203, 213, 225, 0.72) !important;
}

.nav-item {
  border: 1px solid transparent;
  color: #334155;
}

.nav-item:hover {
  background: rgba(254,243,242, 0.72);
  border-color: rgba(245,198,192, 0.72);
  color: #c0271b;
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(253,232,230, 0.98), rgba(253,232,230, 0.82));
  border-color: rgba(245,198,192, 0.72);
  color: #e63323;
  box-shadow: 0 12px 22px -18px rgba(192,39,27, 0.58);
}

.nav-item.active svg {
  color: #e63323;
}

#page-home > .max-w-7xl {
  max-width: 1216px;
}

#page-home .ai-dialog-shell {
  width: 100%;
  max-width: 760px;
}

.home-bg {
  background:
    linear-gradient(135deg, rgba(253,232,230, 0.86) 0%, rgba(254,243,242, 0.92) 34%, rgba(254,243,242, 0.86) 66%, rgba(253,232,230, 0.96) 100%),
    repeating-linear-gradient(128deg, rgba(230,51,35, 0.08) 0 1px, transparent 1px 18px);
}

.home-bg::before {
  opacity: 0.42;
  background:
    linear-gradient(120deg, transparent 0 22%, rgba(248,169,158, 0.16) 22% 23%, transparent 23% 100%),
    linear-gradient(145deg, transparent 0 58%, rgba(242,121,107, 0.12) 58% 59%, transparent 59% 100%);
  background-size: 100% 100%;
  mask-image: none;
  -webkit-mask-image: none;
}

#page-home h1 {
  font-size: 34px;
  color: #07152d;
}

#page-home h1 .text-transparent {
  background-image: linear-gradient(90deg, #e63323, #c0271b, #e63323) !important;
}

.hero-sparkle {
  color: #e63323;
  opacity: 0.7;
}

.ai-dialog-box {
  border-radius: 8px !important;
  border-color: rgba(248,169,158, 0.72) !important;
  background: rgba(255, 255, 255, 0.86) !important;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 18px 46px -30px rgba(192,39,27, 0.5) !important;
}

.ai-dialog-box:hover,
.ai-dialog-box:focus-within {
  border-color: rgba(192,39,27, 0.55) !important;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 22px 54px -30px rgba(192,39,27, 0.58) !important;
}

.ai-tool-btn.active {
  background: linear-gradient(135deg, rgba(253,232,230, 0.98), rgba(253,232,230, 0.92)) !important;
  border-color: rgba(242,121,107, 0.74) !important;
  color: #e63323 !important;
}

.send-btn-alt {
  background: linear-gradient(135deg, #e63323, #e63323 52%, #e63323) !important;
  box-shadow: 0 14px 28px -16px rgba(230,51,35, 0.8) !important;
}

.home-card {
  border-radius: 8px;
  border-color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    0 1px 1px rgba(255, 255, 255, 0.8) inset,
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 20px 48px -34px rgba(192,39,27, 0.56);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.home-card:hover {
  border-color: rgba(248,169,158, 0.88);
  box-shadow:
    0 1px 1px rgba(255, 255, 255, 0.86) inset,
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 24px 56px -34px rgba(192,39,27, 0.62);
}

.home-card.is-compact {
  border-radius: 8px;
}

.home-card-header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(254,243,242, 0.52));
  border-bottom-color: rgba(226, 232, 240, 0.7);
}

.section-title {
  color: #0f1f3a;
}

.section-title-bar {
  width: 4px;
  background: linear-gradient(180deg, #e63323, #c0271b);
}

.todo-row:hover,
.feed-row:hover,
.agent-row:hover {
  background: rgba(254,243,242, 0.78);
}

.todo-row:hover::before {
  background: linear-gradient(180deg, #e63323, #e63323);
}

.feed-tag-policy {
  background: rgba(254, 226, 226, 0.82);
  color: #dc2626;
}

.feed-tag-news {
  background: rgba(253,232,230, 0.9);
  color: #c0271b;
}

.feed-tag-school {
  background: rgba(253,232,230, 0.9);
  color: #e63323;
}

.news-card .news-date,
.news-card .news-summary,
.todo-row .todo-meta,
.agent-row .agent-desc {
  color: #64748b;
}

.app-icon-item .app-tile {
  border-radius: 8px;
  box-shadow:
    0 1px 1px rgba(255, 255, 255, 0.42) inset,
    0 16px 28px -18px rgba(192,39,27, 0.58);
}

.app-icon-item:hover .app-tile {
  transform: translateY(-2px);
  box-shadow:
    0 1px 1px rgba(255, 255, 255, 0.42) inset,
    0 20px 34px -18px rgba(192,39,27, 0.68);
}

.agent-row .agent-action {
  background: rgba(253,232,230, 0.72);
  border-color: rgba(242,121,107, 0.72);
}

.more-entry.active {
  background: linear-gradient(135deg, rgba(253,232,230, 0.98), rgba(253,232,230, 0.9)) !important;
  border-color: rgba(192,39,27, 0.48) !important;
  color: #c0271b !important;
  box-shadow:
    inset 4px 0 0 #e63323,
    0 16px 30px -22px rgba(192,39,27, 0.74) !important;
}

/* ========== 资源推荐列表 ========== */
.resource-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 14px 16px;
}

.resource-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.72);
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 16px 30px -26px rgba(192,39,27, 0.5);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.resource-item:hover {
  transform: translateY(-2px);
  border-color: rgba(242,121,107, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 22px 40px -28px rgba(192,39,27, 0.62);
}

.resource-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 14px 24px -16px rgba(15, 23, 42, 0.48);
}

.resource-icon svg {
  width: 25px;
  height: 25px;
}

.resource-icon-doc {
  background: linear-gradient(135deg, #f2796b, #c0271b);
}

.resource-icon-ppt {
  background: linear-gradient(135deg, #f2796b, #e63323);
}

.resource-icon-video {
  background: linear-gradient(135deg, #f2796b, #e63323);
}

.resource-main {
  min-width: 0;
}

.resource-main h4 {
  margin: 0;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resource-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}

.resource-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-weight: 700;
}

.type-course {
  color: #c0271b;
  background: rgba(253,232,230, 0.92);
}

.type-ppt {
  color: #c0271b;
  background: rgba(253,232,230, 0.9);
}

.type-video {
  color: #c0271b;
  background: rgba(254,243,242, 0.92);
}

.resource-download {
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  background: linear-gradient(135deg, #e63323, #c0271b);
  box-shadow: 0 14px 24px -16px rgba(192,39,27, 0.72);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.resource-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px -16px rgba(192,39,27, 0.82);
}

/* ========== AI个备页面 ========== */
.prepare-page {
  min-height: calc(100vh - 56px);
  color: #0f172a;
  background:
    radial-gradient(760px 360px at 50% -8%, rgba(242,121,107, 0.26), transparent 64%),
    radial-gradient(620px 360px at 88% 8%, rgba(242,121,107, 0.2), transparent 62%),
    linear-gradient(135deg, #f9fbff 0%, #eef5ff 48%, #f8f4ff 100%);
}

.prepare-topbar {
  height: 60px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(203, 213, 225, 0.78);
  background: rgba(255, 255, 255, 0.34);
}

.prepare-topbar h2 {
  font-size: 20px;
  font-weight: 700;
  color: #020617;
}

.prepare-meeting-btn {
  height: 34px;
  padding: 0 16px;
  border-radius: 8px;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  background: linear-gradient(135deg, #e63323, #c0271b);
  box-shadow: 0 14px 28px -18px rgba(192,39,27, 0.78);
}

.prepare-layout {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
}

.prepare-book-panel {
  min-height: calc(100vh - 88px);
  padding: 22px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 22px 44px -34px rgba(158,31,21, 0.46);
}

.prepare-grade {
  font-size: 18px;
  font-weight: 500;
  color: #94a3b8;
}

.prepare-book-title {
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.45;
  font-weight: 800;
}

.prepare-unit,
.prepare-tree-row,
.prepare-lesson-group-title,
.prepare-lesson {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.prepare-unit {
  margin-top: 34px;
  font-size: 16px;
  font-weight: 700;
}

.prepare-lesson-group {
  margin-top: 12px;
}

.prepare-lesson-group-title {
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  background: #f1f5f9;
  font-size: 14px;
  font-weight: 500;
}

.prepare-lesson {
  height: 42px;
  gap: 10px;
  justify-content: flex-start;
  padding: 0 24px;
  border-radius: 10px;
  font-size: 14px;
}

.prepare-lesson.selected {
  background: rgba(253,232,230, 0.76);
}

.prepare-lesson.muted {
  margin-top: 14px;
}

.new-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 18px;
  border-radius: 999px;
  font-size: 11px;
  color: #e63323;
  background: #fef3f2;
  flex-shrink: 0;
}

.prepare-tree-row {
  height: 50px;
  font-size: 14px;
}

.prepare-tree-row.strong {
  font-size: 16px;
  font-weight: 700;
}

.prepare-main {
  min-width: 0;
  padding: 16px 6px 0 0;
}

.prepare-tabs {
  display: flex;
  gap: 18px;
  margin-bottom: 22px;
}

.prepare-tabs button {
  border: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.prepare-tabs button.active {
  color: #e63323;
  text-decoration: underline wavy rgba(192,39,27, 0.75);
  text-underline-offset: 6px;
}

.prepare-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 42px;
}

.prepare-action-card {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  padding: 24px 22px;
  border-radius: 14px;
  background:
    radial-gradient(180px 120px at 85% 18%, rgba(245,198,192, 0.82), transparent 65%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(254,243,242, 0.74));
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow: 0 24px 46px -34px rgba(158,31,21, 0.4);
}

.prepare-action-card h3 {
  position: relative;
  z-index: 1;
  font-size: 23px;
  font-weight: 800;
  color: #020617;
}

.prepare-action-card span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin-top: 32px;
  height: 32px;
  align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  background: linear-gradient(135deg, #e63323, #c0271b);
}

.prepare-action-card span.blue {
  background: linear-gradient(135deg, #f2796b, #e63323);
}

.prepare-action-art {
  position: absolute;
  right: 22px;
  top: 24px;
  width: 116px;
  height: 92px;
  border-radius: 24px;
  opacity: 0.9;
  transform: rotate(-8deg);
}

.art-pen {
  background:
    linear-gradient(90deg, transparent 32%, rgba(192,39,27, 0.8) 32% 42%, transparent 42%),
    radial-gradient(circle at 70% 30%, #f2796b, transparent 30%),
    linear-gradient(135deg, #fde8e6, #fde8e6);
}

.art-bag {
  background:
    radial-gradient(circle at 55% 24%, rgba(255, 255, 255, 0.8), transparent 26%),
    linear-gradient(135deg, #f8a99e, #c0271b 60%, #f2796b);
}

.art-doc {
  background:
    linear-gradient(90deg, rgba(230,51,35, 0.25), transparent 34%),
    linear-gradient(135deg, #f8a99e, #f2796b 58%, #f2796b);
}

.prepare-resource-panel {
  margin-top: 14px;
  padding: 16px 16px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.prepare-resource-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.prepare-segments,
.prepare-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prepare-segments button,
.prepare-tools button {
  height: 30px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.9);
  color: #475569;
  font-size: 13px;
}

.prepare-segments button.active {
  background: linear-gradient(135deg, #e63323, #c0271b);
  color: #fff;
  font-weight: 700;
}

.prepare-tools button:first-child {
  width: 34px;
  padding: 0;
  border: 1px solid #f8a99e;
  background: #fff;
  color: #c0271b;
}

.prepare-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-height: calc(100vh - 414px);
  overflow: auto;
  padding-right: 2px;
}

.courseware-card {
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 16px 32px -28px rgba(15, 23, 42, 0.5);
}

.courseware-cover {
  height: 198px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px;
  font-size: 22px;
  line-height: 1.45;
  font-weight: 800;
  color: #111827;
  background: #f8fafc;
}

.courseware-cover small {
  font-size: 14px;
  font-weight: 600;
}

.cover-red {
  color: #fff;
  background:
    linear-gradient(180deg, transparent 0 42%, rgba(220, 38, 38, 0.74) 42% 70%, transparent 70%),
    linear-gradient(135deg, #fef2f2, #fee2e2);
}

.cover-snow {
  color: #9e1f15;
  background:
    linear-gradient(rgba(255,255,255,0.12), rgba(255,255,255,0.12)),
    radial-gradient(circle at 50% 12%, #ffffff, transparent 22%),
    linear-gradient(135deg, #fde8e6, #94a3b8);
}

.cover-green {
  background:
    linear-gradient(180deg, #fef3f2, #fef3f2 70%, #f8a99e 70% 100%);
}

.cover-lake {
  color: #0f172a;
  background:
    linear-gradient(180deg, rgba(253,232,230, 0.6), rgba(15, 23, 42, 0.1)),
    linear-gradient(135deg, #f5c6c0, #64748b);
}

.cover-flower {
  color: #9e1f15;
  background:
    radial-gradient(circle at 65% 45%, #f2796b 0 10%, transparent 12%),
    radial-gradient(circle at 38% 42%, #f8a99e 0 8%, transparent 10%),
    linear-gradient(135deg, #fff1f2, #e2e8f0);
}

.cover-guide {
  align-items: flex-start;
  justify-content: flex-start;
  color: #c0271b;
  background:
    linear-gradient(90deg, #fef3f2 0 48%, #fff 48% 100%),
    linear-gradient(135deg, #fde8e6, #fff);
}

.cover-city {
  color: #c0271b;
  background:
    linear-gradient(rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.12)),
    linear-gradient(135deg, #fde8e6, #94a3b8);
}

.courseware-card h4 {
  min-height: 48px;
  margin: 12px 12px 6px;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 800;
  color: #0f172a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.courseware-card p,
.courseware-meta {
  margin: 0 12px;
  font-size: 12px;
  color: #64748b;
}

.courseware-card p::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: -4px;
  background: #e2e8f0;
}

.courseware-meta {
  margin-top: 8px;
  margin-bottom: 12px;
}

/* ========== frontend-design skill polish：晨光校园 · 玻璃工作台 ========== */
:root {
  --edu-ink: #08152f;
  --edu-muted: #66758f;
  --edu-line: rgba(245,198,192, 0.42);
  --edu-glass: rgba(255, 255, 255, 0.72);
  --edu-glass-strong: rgba(255, 255, 255, 0.88);
  --edu-blue: #e63323;
  --edu-violet: #e63323;
  --edu-cyan: #f2796b;
  --edu-shadow: 0 24px 60px -38px rgba(158,31,21, 0.55);
}

body {
  color: var(--edu-ink);
  background:
    radial-gradient(920px 420px at 72% -12%, rgba(248,169,158, 0.32), transparent 62%),
    radial-gradient(820px 520px at 14% 14%, rgba(248,169,158, 0.46), transparent 64%),
    linear-gradient(135deg, #f9fdff 0%, #fef3f2 46%, #f7f4ff 100%);
}

body > header {
  background: rgba(255,255,255, 0.8) !important;
  border-bottom: 1px solid rgba(245,198,192, 0.54) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

body > header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(242,121,107, 0.5), rgba(230,51,35, 0.45), transparent);
}

body > header .font-semibold.text-gray-900 {
  color: #08152f !important;
  letter-spacing: 0;
}

.nav-top-item,
.nav-item,
.more-entry {
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.nav-top-item.active,
.nav-item.active,
.more-entry.active {
  box-shadow: 0 14px 28px -22px rgba(192,39,27, 0.58);
}

.nav-item:hover,
.more-entry:hover {
  transform: translateX(2px);
}

#sidebar {
  box-shadow: 12px 0 34px -34px rgba(158,31,21, 0.5);
}

#page-home,
.prepare-page {
  position: relative;
  isolation: isolate;
}

#page-home::after,
.prepare-page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.58;
  background:
    linear-gradient(122deg, transparent 0 18%, rgba(242,121,107, 0.08) 18.2% 18.9%, transparent 19.2% 100%),
    linear-gradient(142deg, transparent 0 62%, rgba(230,51,35, 0.08) 62.2% 62.9%, transparent 63.2% 100%),
    radial-gradient(circle at 88% 88%, rgba(255, 255, 255, 0.8), transparent 18%);
}

#page-home > .max-w-7xl {
  max-width: 1224px;
}

#page-home h1 {
  color: var(--edu-ink);
  text-shadow: 0 10px 28px rgba(158,31,21, 0.08);
}

#page-home h1 .text-transparent {
  background-image: linear-gradient(92deg, #e63323 0%, #c0271b 52%, #f2796b 100%) !important;
}

.ai-dialog-shell {
  filter: drop-shadow(0 28px 48px rgba(158,31,21, 0.12));
  max-width: 760px !important;
  width: 100%;
}

.ai-dialog-box {
  border: 1px solid rgba(115, 170, 240, 0.72) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.78)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 26px 58px -40px rgba(158,31,21, 0.72) !important;
}

.ai-dialog-box::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(242,121,107, 0.3), transparent 28%, rgba(230,51,35, 0.24) 82%, transparent);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.ai-dialog-box:focus-within::after {
  opacity: 1;
}

.ai-tool-btn {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.ai-tool-btn:hover {
  background: rgba(254,243,242, 0.92) !important;
  border-color: rgba(242,121,107, 0.54) !important;
  color: #c0271b !important;
}

.send-btn-alt {
  background: linear-gradient(135deg, var(--edu-cyan), #e63323 50%, var(--edu-violet)) !important;
}

.home-card {
  border: 1px solid var(--edu-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.66));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    var(--edu-shadow);
}

.home-card:hover {
  transform: translateY(-1px);
  border-color: rgba(242,121,107, 0.58);
}

.home-card-header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(254,243,242, 0.62));
}

.section-title-bar {
  background: linear-gradient(180deg, var(--edu-violet), var(--edu-blue));
  box-shadow: 0 0 0 3px rgba(230,51,35, 0.08);
}

.todo-row,
.feed-row,
.agent-row {
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.todo-row:hover,
.feed-row:hover,
.agent-row:hover {
  transform: translateX(2px);
  background: linear-gradient(90deg, rgba(254,243,242, 0.9), rgba(254,243,242, 0.72));
}

.todo-row .todo-tag,
.feed-tag,
.agent-row .agent-action {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.app-icon-item .app-tile {
  position: relative;
  overflow: hidden;
}

.app-icon-item .app-tile::before {
  content: "";
  position: absolute;
  inset: -40% -20%;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.38), transparent 70%);
  transform: translateX(-70%) rotate(8deg);
  transition: transform 0.36s ease;
}

.app-icon-item:hover .app-tile::before {
  transform: translateX(70%) rotate(8deg);
}

.prepare-page {
  background:
    radial-gradient(860px 420px at 46% -10%, rgba(245,198,192, 0.36), transparent 62%),
    radial-gradient(680px 440px at 92% 10%, rgba(242,121,107, 0.18), transparent 62%),
    linear-gradient(135deg, #f9fdff 0%, #fef3f2 48%, #f7f3ff 100%);
}

.prepare-topbar,
.prepare-book-panel,
.prepare-action-card,
.prepare-resource-panel,
.courseware-card {
  border-color: var(--edu-line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 24px 52px -38px rgba(158,31,21, 0.52);
}

.prepare-book-panel,
.prepare-resource-panel,
.courseware-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.prepare-action-card {
  background:
    radial-gradient(180px 120px at 86% 16%, rgba(248,169,158, 0.52), transparent 66%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(254,243,242, 0.72));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.prepare-action-card:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 30px 60px -38px rgba(192,39,27, 0.64);
}

.courseware-card {
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.courseware-card:hover {
  transform: translateY(-3px);
  border-color: rgba(242,121,107, 0.62);
  box-shadow: 0 30px 58px -40px rgba(158,31,21, 0.74);
}

.courseware-cover {
  border-bottom: 1px solid rgba(226, 232, 240, 0.72);
}

@keyframes homeSoftIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#page-home .ai-dialog-shell,
#page-home .home-card,
.prepare-book-panel,
.prepare-main {
  animation: homeSoftIn 0.38s ease-out both;
}

#page-home .home-card:nth-of-type(2),
.prepare-main {
  animation-delay: 0.06s;
}

/* Homepage dashboard: keep the AI dialog fixed, make cards below adapt by column. */
.home-dashboard-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 2.15fr) minmax(320px, 1fr) !important;
  align-items: start;
}

.home-main-stack,
.home-side-stack {
  grid-column: auto !important;
  min-width: 0;
  min-height: 120px;
}

.home-main-stack > .home-card,
.home-side-stack > .home-card {
  width: 100%;
  min-width: 0;
  height: auto;
}

.home-side-stack .home-card {
  align-self: stretch;
}

.home-side-stack .home-card.is-compact .card-body {
  padding: 12px 14px 14px;
}

.home-side-stack .agent-row {
  min-height: 58px;
  border-radius: 14px;
}

.home-side-stack .agent-row .agent-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
}

.home-side-stack .agent-row .agent-title {
  max-width: 100%;
}

.dashboard-draggable-card {
  position: relative;
  cursor: grab;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    opacity 0.18s ease;
}

.dashboard-draggable-card:active {
  cursor: grabbing;
}

.dashboard-draggable-card .home-card-header {
  cursor: grab;
  user-select: none;
}

.dashboard-draggable-card .home-card-header::after {
  display: none;
}

.dashboard-drag-chrome {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.dashboard-draggable-card:hover .dashboard-drag-chrome,
.dashboard-draggable-card:focus-within .dashboard-drag-chrome,
.dashboard-draggable-card.is-dragging .dashboard-drag-chrome,
.dashboard-draggable-card.is-drop-before .dashboard-drag-chrome,
.dashboard-draggable-card.is-drop-after .dashboard-drag-chrome {
  opacity: 1;
}

.dashboard-drag-grip {
  position: absolute;
  top: 50%;
  left: -10px;
  display: grid;
  grid-template-columns: repeat(2, 3px);
  gap: 4px 5px;
  width: 24px;
  height: 32px;
  padding: 7px 6px;
  border-radius: 0 9px 9px 0;
  border: 1px solid rgba(192,39,27, 0.24);
  border-left: 0;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 8px 12px 24px -18px rgba(192,39,27, 0.72);
  transform: translateY(-50%);
}

.dashboard-drag-grip i {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: #e63323;
  box-shadow: 0 0 0 1px rgba(230,51,35, 0.08);
}

.dashboard-drag-bar {
  position: absolute;
  border-radius: 999px;
  background: linear-gradient(90deg, #e63323, #c0271b, #f2796b);
  box-shadow: 0 8px 18px -12px rgba(192,39,27, 0.8);
}

.dashboard-drag-bar-top {
  top: -7px;
  left: 50%;
  width: 60px;
  height: 6px;
  transform: translateX(-50%);
}

.dashboard-drag-bar-bottom {
  bottom: -7px;
  left: 50%;
  width: 60px;
  height: 6px;
  transform: translateX(-50%);
}

.dashboard-drag-bar-left,
.dashboard-drag-bar-right {
  top: 48%;
  width: 6px;
  height: 56px;
  transform: translateY(-50%);
}

.dashboard-drag-bar-left {
  left: -7px;
}

.dashboard-drag-bar-right {
  right: -7px;
}

.dashboard-drag-corner {
  position: absolute;
  right: -9px;
  bottom: -9px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(230,51,35, 0.3);
  background: linear-gradient(135deg, #e63323, #f2796b);
  color: #fff;
  box-shadow: 0 12px 24px -15px rgba(158,31,21, 0.72);
}

.dashboard-drag-corner svg {
  width: 15px;
  height: 15px;
}

.dashboard-draggable-card.is-dragging {
  opacity: 0.48;
  transform: scale(0.985);
  box-shadow: 0 18px 42px -30px rgba(192,39,27, 0.7);
}

.home-main-stack.is-drag-over,
.home-side-stack.is-drag-over {
  outline: 1px dashed rgba(230,51,35, 0.44);
  outline-offset: 8px;
  border-radius: 16px;
}

.dashboard-draggable-card.is-drop-before::before,
.dashboard-draggable-card.is-drop-after::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--edu-cyan), var(--edu-blue), var(--edu-violet));
  box-shadow: 0 8px 18px rgba(192,39,27, 0.24);
  z-index: 5;
}

.dashboard-draggable-card.is-drop-before::before {
  top: -11px;
}

.dashboard-draggable-card.is-drop-after::after {
  bottom: -11px;
}

.home-main-stack .dashboard-draggable-card,
.home-side-stack .dashboard-draggable-card {
  max-width: 100%;
}

.home-side-stack .common-app-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.home-side-stack .todo-row {
  grid-template-columns: minmax(72px, 88px) minmax(0, 1fr);
  row-gap: 4px;
}

.home-side-stack .todo-meta {
  grid-column: 2;
  justify-self: start;
}

@media (max-width: 1180px) {
  .home-dashboard-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .home-main-stack,
  .home-side-stack {
    grid-column: 1 / -1 !important;
  }

  .home-side-stack {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .home-side-stack {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-draggable-card .home-card-header::after {
    display: none;
  }
}

/* ========== 全局搜索弹窗 ========== */

.global-search-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease-out;
}

.global-search-modal.hidden {
  display: none;
}

.global-search-dialog {
  width: 680px;
  max-width: calc(100vw - 40px);
  max-height: calc(90vh - 10vh);
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
  box-shadow: 0 24px 64px -12px rgba(15, 23, 42, 0.18), 0 8px 16px -8px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideDown 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.global-search-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  background: #ffffff;
}

.global-search-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: rgba(241, 245, 249, 0.8);
  color: #64748b;
  cursor: pointer;
  transition: all 0.16s ease;
}

.global-search-close:hover {
  background: rgba(226, 232, 240, 0.9);
  color: #475569;
}

.global-search-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  background: rgba(248, 250, 252, 0.5);
}

.global-search-tab {
  padding: 6px 16px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s ease;
}

.global-search-tab:hover {
  background: rgba(241, 245, 249, 0.8);
  color: #475569;
}

.global-search-tab.active {
  background: #ffffff;
  color: #e63323;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.global-search-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.global-search-section {
  margin-bottom: 24px;
}

.global-search-section:last-child {
  margin-bottom: 0;
}

.global-search-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 12px;
  padding-left: 4px;
}

.global-search-history {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.global-search-history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.6);
  color: #334155;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.16s ease;
}

.global-search-history-item:hover {
  background: rgba(241, 245, 249, 0.9);
  transform: translateX(2px);
}

.global-search-history-item span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-history-item svg:last-child {
  opacity: 0;
  transition: opacity 0.16s ease;
}

.global-search-history-item:hover svg:last-child {
  opacity: 1;
}

.global-search-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.global-search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.6);
  color: #334155;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.16s ease;
}

.global-search-result-item:hover,
.global-search-result-item:focus-visible {
  background: rgba(253,232,230, 0.7);
  outline: none;
  transform: translateX(2px);
}

.global-search-result-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.global-search-result-icon.is-resource {
  background: linear-gradient(135deg, #f2796b, #c0271b);
}

.global-search-result-icon.is-agent {
  background: linear-gradient(135deg, #f2796b, #e63323);
}

.global-search-result-main {
  flex: 1;
  min-width: 0;
}

.global-search-result-title {
  font-weight: 500;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-result-title mark {
  padding: 0 1px;
  border-radius: 3px;
  background: rgba(242,121,107, 0.28);
  color: #c0271b;
  font-weight: 600;
}

.global-search-result-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-result-tag {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.95);
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

.global-search-empty {
  padding: 32px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

.global-search-group {
  margin-bottom: 16px;
}

.global-search-group:last-child {
  margin-bottom: 0;
}

.global-search-group-title {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 8px;
  padding-left: 4px;
}

.global-search-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 4px 4px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.global-search-footer-summary {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

.global-search-view-all-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #f2796b, #e63323);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.global-search-view-all-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* ========== AI互动课堂页面 ========== */
.ic-page {
  min-height: calc(100vh - 56px);
  padding: 24px;
  color: #1d1e33;
  background:
    radial-gradient(900px 420px at 12% -6%, rgba(230,51,35, 0.18), transparent 62%),
    radial-gradient(760px 380px at 88% 4%, rgba(242,121,107, 0.16), transparent 58%),
    linear-gradient(180deg, #f7f4ff 0%, #f3f6ff 42%, #faf8ff 100%);
}

.ic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.ic-title-wrap {
  position: relative;
}

.ic-title {
  font-size: 28px;
  font-weight: 700;
  color: #1d2129;
  line-height: 1.2;
}

.ic-title-underline {
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 72px;
  height: 14px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(230,51,35, 0.35), rgba(192,39,27, 0.2));
  pointer-events: none;
}

.ic-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ic-filter {
  display: block;
}

.ic-select {
  height: 36px;
  min-width: 148px;
  padding: 0 32px 0 12px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") no-repeat right 10px center / 14px;
  color: #334155;
  font-size: 13px;
  cursor: pointer;
  appearance: none;
}

.ic-select:focus {
  outline: none;
  border-color: #f2796b;
  box-shadow: 0 0 0 3px rgba(242,121,107, 0.18);
}

.ic-dashboard {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) repeat(3, minmax(0, 1.2fr));
  gap: 16px;
  margin-bottom: 24px;
}

.ic-stat-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ic-stat-card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-radius: 20px;
  min-height: 118px;
}

.ic-stat-card-green {
  background: linear-gradient(180deg, #fde8e6 0%, #fef3f2 100%);
  border: 1px solid #f8c9c2;
}

.ic-stat-card-blue {
  background: linear-gradient(180deg, #fde8e6 0%, #fef3f2 100%);
  border: 1px solid #f5c6c0;
}

.ic-stat-label {
  font-size: 15px;
  color: #4e5969;
}

.ic-stat-value {
  margin-top: 8px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  color: #1d1e33;
}

.ic-stat-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ic-stat-icon svg {
  width: 36px;
  height: 36px;
}

.ic-stat-icon-green {
  color: #e63323;
  background: rgba(230,51,35, 0.12);
}

.ic-stat-icon-blue {
  color: #c0271b;
  background: rgba(192,39,27, 0.12);
}

.ic-chart-card {
  padding: 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 2px solid #fff;
  box-shadow: 0 12px 32px -24px rgba(192,39,27, 0.35);
}

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

.ic-chart-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: #1d1e33;
}

.ic-chart-title::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, #e63323, #e63323);
}

.ic-chart-legend {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #4e5969;
}

.ic-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ic-legend-dot {
  width: 16px;
  height: 6px;
  border-radius: 999px;
  display: inline-block;
}

.ic-legend-blue {
  background: #f2796b;
}

.ic-legend-green {
  background: #e63323;
}

.ic-chart-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ic-chart-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 12px;
}

.ic-chart-row-name {
  font-size: 14px;
  color: #4e5969;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ic-chart-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ic-chart-bar-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ic-chart-bar-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(236, 236, 246, 0.9);
  overflow: hidden;
}

.ic-chart-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.ic-chart-bar-fill.blue {
  background: #f2796b;
}

.ic-chart-bar-fill.green {
  background: #e63323;
}

.ic-chart-bar-value {
  min-width: 44px;
  font-size: 12px;
  color: #4e5969;
  text-align: right;
}

.ic-chart-more {
  width: 100%;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #4e5969;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.ic-chart-more::after {
  content: "⌄";
  transition: transform 0.2s ease;
}

.ic-chart-more.is-expanded::after {
  transform: rotate(180deg);
}

.ic-chart-row.is-hidden {
  display: none;
}

.ic-section-head {
  margin-bottom: 16px;
}

.ic-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 700;
  color: #1d1e33;
}

.ic-section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, #e63323, #f2796b);
}

.ic-class-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ic-class-card {
  position: relative;
  padding: 20px;
  border-radius: 20px;
  background: #fff url("data:image/svg+xml,%3Csvg width='400' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%23f3eeff'/%3E%3Cstop offset='100%25' stop-color='%23fbf9ff'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='400' height='200' fill='url(%23g)'/%3E%3C/svg%3E") top center / 100% auto no-repeat;
  border: 1px solid rgba(242, 243, 245, 0.95);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ic-class-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.ic-class-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 118px;
  height: 44px;
  padding: 0 16px;
  border-radius: 0 20px 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
}

.ic-class-badge-live {
  background: #fef3f2;
  color: #e63323;
}

.ic-class-badge-upcoming {
  background: #fff1e9;
  color: #e37318;
}

.ic-class-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.ic-class-icon {
  width: 30px;
  height: 30px;
  color: #e63323;
  flex-shrink: 0;
}

.ic-class-icon svg {
  width: 100%;
  height: 100%;
}

.ic-class-name {
  font-size: 20px;
  font-weight: 700;
  color: #1d1e33;
}

.ic-class-count {
  margin-left: 6px;
  font-size: 14px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.45);
}

.ic-class-subject {
  display: inline-flex;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fef3f2;
  color: #c0271b;
  font-size: 12px;
}

.ic-class-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 18px 12px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f3eeff 0%, #fbf9ff 100%);
}

.ic-class-metrics > div {
  text-align: center;
  border-right: 1px solid #ececf6;
}

.ic-class-metrics > div:last-child {
  border-right: 0;
}

.ic-class-metrics strong {
  display: block;
  font-size: 30px;
  line-height: 1.1;
  color: #1d1e33;
}

.ic-class-metrics span {
  font-size: 12px;
  color: #606266;
}

.ic-class-metrics em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 13px;
  color: #606266;
}

.ic-class-course {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 84%;
  margin: 0 auto 14px;
  padding: 10px 12px;
  text-align: center;
}

.ic-class-course::before,
.ic-class-course::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(230,51,35, 0), rgba(230,51,35, 0.3), rgba(230,51,35, 0));
}

.ic-class-course::before {
  top: 0;
}

.ic-class-course::after {
  bottom: 0;
}

.ic-course-label {
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(90deg, #e63323, #f2796b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ic-course-label.muted,
.ic-course-chapter.muted {
  background: none;
  color: #86909c;
  -webkit-text-fill-color: #86909c;
}

.ic-course-time,
.ic-course-chapter {
  font-size: 14px;
  color: #4e5969;
}

.ic-class-actions {
  display: flex;
  align-items: center;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(254,243,242, 0.5) 100%);
  border: 1px solid #f2f3f5;
  overflow: hidden;
}

.ic-action-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 56px;
  border: 0;
  background: transparent;
  color: #1d1e33;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease;
}

.ic-action-btn svg {
  width: 22px;
  height: 22px;
}

.ic-action-btn:hover {
  color: #c0271b;
  background: rgba(253,232,230, 0.5);
}

.ic-action-btn + .ic-action-btn {
  border-left: 1px solid rgba(230,51,35, 0.12);
}

.ic-class-card.is-hidden {
  display: none;
}

@media (max-width: 1400px) {
  .ic-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ic-stat-stack {
    flex-direction: row;
    grid-column: 1 / -1;
  }

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

@media (max-width: 900px) {
  .ic-dashboard {
    grid-template-columns: 1fr;
  }

  .ic-stat-stack {
    flex-direction: column;
  }

  .ic-class-grid {
    grid-template-columns: 1fr;
  }

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

.ic-compare-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 45;
  width: 220px;
  padding: 14px 16px 16px;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 40px -12px rgba(192,39,27, 0.28), 0 4px 12px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: icCompareIn 0.22s ease-out;
}

.ic-compare-float.is-hidden {
  display: none;
}

.ic-compare-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: rgba(241, 245, 249, 0.9);
  color: #64748b;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.ic-compare-close:hover {
  background: rgba(226, 232, 240, 0.95);
  color: #334155;
}

.ic-compare-tip {
  margin: 0 24px 10px 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.ic-compare-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e63323, #c0271b);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 24px -14px rgba(192,39,27, 0.85);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.ic-compare-link:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -12px rgba(192,39,27, 0.9);
}

.ic-compare-reveal {
  position: fixed;
  right: 0;
  bottom: 96px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 8px 10px;
  border: 0;
  border-radius: 10px 0 0 10px;
  background: linear-gradient(135deg, #e63323, #c0271b);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: -4px 8px 20px -6px rgba(192,39,27, 0.55);
  transition: padding-right 0.16s ease, box-shadow 0.16s ease;
}

.ic-compare-reveal:hover {
  padding-right: 14px;
  box-shadow: -6px 10px 24px -6px rgba(192,39,27, 0.65);
}

.ic-compare-reveal.hidden {
  display: none;
}

@keyframes icCompareIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== 个人资料弹窗 ========== */
.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-modal.hidden {
  display: none;
}
.profile-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(2px);
}
.profile-modal-card {
  position: relative;
  width: 560px;
  max-height: 90vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  overflow: hidden;
  animation: profileModalIn 0.22s ease;
}
@keyframes profileModalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.profile-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f0f0f5;
}
.profile-modal-head h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
}
.profile-modal-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.profile-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 13px;
  color: #e63323;
  background: #fef3f2;
  border: 1px solid #fde8e6;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.profile-edit-btn:hover {
  background: #fde8e6;
  border-color: #e63323;
}
.profile-edit-btn.editing {
  background: #e63323;
  color: #fff;
  border-color: #e63323;
}
.profile-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  font-size: 20px;
  color: #9ca3af;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.profile-close-btn:hover {
  background: #f3f4f6;
  color: #4b5563;
}

/* 头像区域 */
.profile-avatar-section {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px 8px;
}
.profile-avatar-large {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f2796b, #f2796b);
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-avatar-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-avatar-name {
  font-size: 17px;
  font-weight: 600;
  color: #1a1a2e;
}
.profile-avatar-role {
  font-size: 13px;
  color: #9ca3af;
}

/* 表单 */
.profile-modal-body {
  padding: 0 0 8px;
  overflow-y: auto;
  max-height: calc(90vh - 140px);
}
.profile-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  padding: 16px 24px 20px;
}
.profile-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile-label {
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
}
.required-star {
  color: #ef4444;
  margin-right: 2px;
}
.profile-input,
.profile-select {
  padding: 9px 12px;
  font-size: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  color: #1a1a2e;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
  appearance: auto;
}
.profile-input[disabled],
.profile-select[disabled] {
  background: #f9fafb;
  color: #374151;
  cursor: default;
  border-color: #e5e7eb;
}
.profile-input:not([disabled]),
.profile-select:not([disabled]) {
  background: #fff;
  border-color: #f2796b;
  cursor: text;
}
.profile-input:not([disabled]):focus,
.profile-select:not([disabled]):focus {
  border-color: #e63323;
  box-shadow: 0 0 0 3px rgba(230,51,35,0.1);
}
.profile-input-readonly {
  background: #f3f4f6 !important;
  color: #9ca3af !important;
  cursor: not-allowed !important;
  border-color: #e5e7eb !important;
}
.profile-hint {
  font-size: 11px;
  color: #9ca3af;
  margin-top: -2px;
}

/* 底部按钮 */
.profile-modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid #f0f0f5;
  background: #fafafa;
  border-radius: 0 0 16px 16px;
}
.profile-btn-cancel {
  padding: 8px 20px;
  font-size: 14px;
  color: #6b7280;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.profile-btn-cancel:hover {
  background: #f3f4f6;
}
.profile-btn-save {
  padding: 8px 20px;
  font-size: 14px;
  color: #fff;
  background: #e63323;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.15s;
}
.profile-btn-save:hover {
  background: #c0271b;
}

/* 个人资料 - 分隔线 */
.profile-section-divider {
  height: 1px;
  background: #f0f0f5;
  margin: 0 24px;
}

/* 个人资料 - 职务区块 */
.profile-duty-section {
  padding: 12px 24px 16px;
}
.profile-duty-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.profile-duty-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
}
.profile-duty-empty {
  font-size: 13px;
  color: #9ca3af;
  padding: 10px 14px;
  background: #f9fafb;
  border: 1px dashed #e5e7eb;
  border-radius: 8px;
  text-align: center;
}
.profile-duty-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.profile-duty-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  font-size: 13px;
  color: #4b5563;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}
.profile-tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  margin-left: 2px;
  font-size: 14px;
  line-height: 1;
  color: #9ca3af;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.15s;
}
.profile-tag-remove:hover {
  color: #ef4444;
  background: #fef2f2;
}
.profile-duty-add-btn {
  padding: 4px 12px;
  font-size: 12px;
  color: #e63323;
  background: #fef3f2;
  border: 1px solid #f8a99e;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.profile-duty-add-btn:hover {
  background: #fde8e6;
  border-color: #f2796b;
}
.profile-duty-input-row {
  margin-top: 8px;
}
.profile-duty-input {
  width: 100%;
  padding: 7px 12px;
  font-size: 13px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s;
}
.profile-duty-input:focus {
  border-color: #e63323;
  box-shadow: 0 0 0 2px rgba(230,51,35,0.1);
}

/* ============================================================
   红白扁平主题覆盖（朱红 #E63323）· 去玻璃拟态、白底卡片
   追加在末尾，优先级最高，统一收敛视觉。
   ============================================================ */
:root {
  --brand:#e63323; --brand-deep:#c0271b; --brand-dark:#9e1f15;
  --brand-coral:#f2796b; --brand-bg:#fef3f2; --brand-bg2:#fde8e6;
  --brand-border:#f5c6c0; --surface:#ffffff; --page-bg:#f5f6f8; --line:#ececef;
  --edu-violet:#e63323; --edu-blue:#c0271b; --edu-cyan:#f2796b;
  --edu-line:#ececef; --edu-shadow:0 10px 28px -22px rgba(15,23,42,0.22);
}
body { background:var(--page-bg) !important; color:#1f2933; }
body > header {
  background:#ffffff !important; border-bottom:1px solid var(--line) !important;
  backdrop-filter:none !important; -webkit-backdrop-filter:none !important;
  box-shadow:0 1px 0 rgba(15,23,42,0.04);
}
body > header::after { display:none !important; }
.home-bg, .prepare-page, .ic-page { background:var(--page-bg) !important; }
.home-bg::before, .home-bg::after,
#page-home::after, .prepare-page::after, .ic-page::after {
  display:none !important; content:none !important;
}
.home-card, .home-card.is-compact {
  background:#ffffff !important; border:1px solid var(--line) !important;
  border-radius:12px !important;
  box-shadow:0 1px 2px rgba(15,23,42,0.04), 0 8px 22px -18px rgba(15,23,42,0.16) !important;
  backdrop-filter:none !important; -webkit-backdrop-filter:none !important;
}
.home-card:hover {
  border-color:var(--brand-border) !important;
  box-shadow:0 1px 2px rgba(15,23,42,0.05), 0 14px 30px -20px rgba(230,51,35,0.20) !important;
  transform:none !important;
}
.home-card-header { background:#ffffff !important; border-bottom:1px solid var(--line) !important; }
.section-title-bar, .ic-chart-title::before, .ic-section-title::before {
  background:var(--brand) !important; box-shadow:none !important;
}
.ai-dialog-box {
  background:#ffffff !important; border:1px solid var(--line) !important;
  box-shadow:0 1px 2px rgba(15,23,42,0.04), 0 12px 30px -22px rgba(15,23,42,0.18) !important;
}
.ai-dialog-box::before, .ai-dialog-box::after { display:none !important; }
.ai-dialog-box:hover, .ai-dialog-box:focus-within {
  border-color:var(--brand) !important;
  box-shadow:0 0 0 3px rgba(230,51,35,0.12), 0 12px 30px -22px rgba(230,51,35,0.22) !important;
}
#sidebar, .sidebar .primary-rail, .sidebar-bottom {
  background:#ffffff !important; border-color:var(--line) !important;
}
#sidebar { box-shadow:1px 0 0 rgba(15,23,42,0.04); }
.nav-item, .nav-top-item, .more-entry { border:1px solid transparent; color:#475569; }
.nav-item:hover, .more-entry:hover, .nav-top-item:hover {
  background:var(--brand-bg) !important; border-color:var(--brand-border) !important;
  color:var(--brand-deep) !important; transform:none !important;
}
.nav-item.active, .nav-top-item.active, .more-entry.active,
.submenu-item.active, .nav-cat.active {
  background:var(--brand-bg) !important; border-color:var(--brand-border) !important;
  color:var(--brand-deep) !important; box-shadow:inset 2px 0 0 var(--brand) !important;
}
.nav-item.active svg, .more-entry.active svg { color:var(--brand) !important; }
.prepare-book-panel, .prepare-resource-panel, .courseware-card,
.ic-chart-card, .ic-compare-float {
  background:#ffffff !important; backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important; border-color:var(--line) !important;
  box-shadow:0 1px 2px rgba(15,23,42,0.04), 0 10px 26px -20px rgba(15,23,42,0.16) !important;
}
.app-icon-item .app-tile::before { display:none !important; }
button:focus-visible, a:focus-visible, input:focus-visible,
textarea:focus-visible, [role="tab"]:focus-visible { outline-color:var(--brand) !important; }
