/* 学业冲刺学习计划管理软件 V1.0 · 全局样式 */
/* 设计变量：低饱和蓝灰底 + 单一主色，卡片圆角 16px */

:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #0f172a;
  --sub: #475569;
  --muted: #94a3b8;
  --line: #e6eaf2;
  --line-strong: #d3dbe8;
  --radius: 16px;
  --radius-sm: 12px;
  --accent: #4f7cff;
  --accent-ink: #2c5bd8;
  --accent-soft: #edf2ff;
  --warn: #f59e0b;
  --warn-soft: #fff7e6;
  --danger: #ef4444;
  --danger-soft: #fef2f2;
  --ok: #22c55e;
  --ok-soft: #ecfdf3;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 26px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 22px 60px rgba(15, 23, 42, 0.16);
  --font: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC",
    "Hiragino Sans GB", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: var(--ink);
}

svg {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.num {
  font-variant-numeric: tabular-nums;
}

/* ---------- 外壳布局 ---------- */

.app {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 232px;
  padding: 22px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--card);
  border-right: 1px solid var(--line);
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 4px 14px;
  border-bottom: 1px dashed var(--line);
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  background: linear-gradient(135deg, #4f7cff, #7c9bff);
  box-shadow: 0 6px 16px rgba(79, 124, 255, 0.32);
}

.brand-text strong {
  display: block;
  font-size: 15px;
  letter-spacing: 0.2px;
}

.brand-text span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.4px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--sub);
  font-size: 14px;
  transition: background 160ms ease, color 160ms ease;
}

.nav-item:hover {
  background: #f6f8fe;
  color: var(--ink);
}

.nav-item.is-active {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
}

.nav-item .nav-icon,
.nav-item svg {
  width: 20px;
  height: 20px;
  flex: none;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item .nav-count {
  margin-left: auto;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eef2f9;
  color: var(--sub);
  font-size: 11px;
  display: grid;
  place-items: center;
}

.nav-item.is-active .nav-count {
  background: #dfe8ff;
  color: var(--accent-ink);
}

.sidebar-foot {
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e8efff;
  color: var(--accent-ink);
  font-weight: 700;
}

.user-chip strong {
  display: block;
  font-size: 13px;
}

.user-chip span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.stage {
  margin-left: 232px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 32px;
  background: rgba(244, 246, 251, 0.92);
  backdrop-filter: blur(8px);
}

.topbar-title {
  min-width: 0;
}

.topbar-title h1 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-title p {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

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

.view {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 4px 32px 40px;
  flex: 1;
}

.tabbar {
  display: none;
}

.fab {
  position: fixed;
  right: 20px;
  bottom: 84px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: none;
  place-items: center;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 30px rgba(79, 124, 255, 0.4);
  z-index: 40;
}

.fab svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
}

/* ---------- 通用组件 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 140ms ease, box-shadow 140ms ease,
    background 140ms ease, border-color 140ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(79, 124, 255, 0.28);
}

.btn-primary:hover {
  background: #4470f0;
}

.btn-ghost {
  background: var(--card);
  border-color: var(--line);
  color: var(--sub);
}

.btn-ghost:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-soft {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn-sm {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 10px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--sub);
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-icon svg,
.btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #f2f5fb;
  color: var(--sub);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.chip-light {
  background: rgba(255, 255, 255, 0.18);
  color: #eef3ff;
}

.chip-accent {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.chip-warn {
  background: var(--warn-soft);
  color: #b45309;
}

.chip-danger {
  background: var(--danger-soft);
  color: #b91c1c;
}

.chip-ok {
  background: var(--ok-soft);
  color: #15803d;
}

.badge-sprint {
  background: linear-gradient(135deg, #ff8a4c, #f4653a);
  color: #fff;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
}

.panel-head h3 {
  font-size: 15px;
  font-weight: 700;
}

.panel-head p {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.panel-body {
  padding: 0 20px 18px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 2px 12px;
}

.section-head h3 {
  font-size: 15px;
  font-weight: 700;
}

.section-head p {
  font-size: 12px;
  color: var(--muted);
}

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

.page-head h2 {
  font-size: 20px;
  font-weight: 700;
}

.page-head p {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.sub {
  color: var(--sub);
}

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

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

.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* 进度条与进度环 */

.bar {
  height: 8px;
  border-radius: 999px;
  background: #eef2f9;
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 320ms ease;
}

.bar-warn > span {
  background: var(--warn);
}

.bar-danger > span {
  background: var(--danger);
}

.ring {
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: #eef2f9;
}

.ring-value {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dasharray 420ms ease;
}

.ring-wrap {
  position: relative;
  display: inline-grid;
  place-items: center;
}

.ring-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
}

.ring-center strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
}

.ring-center span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
}

/* ---------- 今日 ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px;
  border-radius: var(--radius);
  color: #fff;
  background:
    radial-gradient(120% 180% at 100% 0%, rgba(124, 155, 255, 0.9), transparent 60%),
    linear-gradient(120deg, #3f6df0 0%, #4f7cff 52%, #6f8dff 100%);
  box-shadow: 0 16px 38px rgba(63, 109, 240, 0.28);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -70px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.hero-main {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hero-eyebrow {
  font-size: 12px;
  letter-spacing: 0.6px;
  color: rgba(255, 255, 255, 0.78);
}

.hero-title {
  margin-top: 4px;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.35;
}

.hero-number {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 4px;
}

.hero-sub {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hero-ring {
  position: relative;
  z-index: 1;
  flex: none;
  padding: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.hero-ring .ring-track {
  stroke: rgba(255, 255, 255, 0.22);
}

.hero-ring .ring-value {
  stroke: #fff;
}

.hero-ring .ring-center strong {
  color: #fff;
  font-size: 20px;
}

.hero-ring .ring-center span {
  color: rgba(255, 255, 255, 0.74);
}

.today-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 316px;
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.side-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px;
}

.task-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px 13px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fdfdff;
  transition: border-color 160ms ease, box-shadow 160ms ease,
    transform 160ms ease;
}

.task-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--course, var(--accent));
}

.task-card:hover {
  border-color: #d8e2f7;
  box-shadow: var(--shadow-sm);
}

.task-card.is-done {
  background: #fafbfe;
}

.task-card.is-done .task-title {
  color: var(--muted);
  text-decoration: line-through;
}

.task-check {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 50%;
  border: 1.6px solid #cdd8ea;
  background: #fff;
  display: grid;
  place-items: center;
  color: transparent;
  transition: all 160ms ease;
}

.task-check svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.task-check:hover {
  border-color: var(--accent);
}

.task-card.is-done .task-check {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}

.task-main {
  flex: 1;
  min-width: 0;
}

.task-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  word-break: break-word;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

.task-course {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--sub);
}

.task-course .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--course, var(--accent));
}

.task-time {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.task-time svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  opacity: 0.9;
  transition: opacity 160ms ease;
}

.task-card:hover .task-actions,
.task-card:focus-within .task-actions {
  opacity: 1;
}

.task-link {
  height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--sub);
  font-size: 11px;
}

.task-link:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}

.panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 20px 16px;
  margin-top: 4px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--muted);
}

.link {
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 12px;
}

.link:hover {
  text-decoration: underline;
}

.ring-panel {
  padding: 14px 16px;
}

.ring-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ring-side {
  flex: none;
}

.ring-facts {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12px;
}

.ring-facts strong {
  font-size: 13px;
}

.pomodoro {
  padding: 14px 16px;
}

.timer-display {
  margin: 4px 0 2px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.timer-hint {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.55;
}

.timer-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.timer-actions .btn {
  flex: 1;
}

.review-panel {
  padding: 14px 16px;
}

.review-count {
  margin-top: 2px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
}

/* ---------- 课程 ---------- */

.capacity-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-radius: var(--radius);
  border: 1px solid #cfe0ff;
  background: linear-gradient(120deg, #f3f7ff, #ffffff);
}

.capacity-banner.is-warn {
  border-color: #fde68a;
  background: linear-gradient(120deg, #fff8ec, #ffffff);
}

.capacity-banner.is-danger {
  border-color: #fecaca;
  background: linear-gradient(120deg, #fff1f1, #ffffff);
}

.capacity-icon {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.capacity-banner.is-warn .capacity-icon {
  background: #fef3c7;
  color: #b45309;
}

.capacity-banner.is-danger .capacity-icon {
  background: #fee2e2;
  color: #b91c1c;
}

.capacity-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.capacity-text {
  flex: 1;
  min-width: 0;
}

.capacity-text strong {
  display: block;
  font-size: 14px;
}

.capacity-text p {
  margin-top: 2px;
  font-size: 12px;
  color: var(--sub);
}

.capacity-actions {
  flex: none;
  display: flex;
  gap: 8px;
}

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

.course-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease,
    border-color 160ms ease;
}

.course-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #dbe5f7;
}

.course-card.is-archived {
  opacity: 0.72;
}

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

.course-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.course-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--course, var(--accent));
  flex: none;
}

.course-title h4 {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.course-sub {
  font-size: 11px;
  color: var(--muted);
}

.course-body {
  display: flex;
  align-items: center;
  gap: 14px;
}

.course-facts {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.course-fact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.course-fact strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.week-line {
  margin-top: 2px;
}

.course-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.course-foot .grow {
  flex: 1;
}

.archive-list {
  margin-top: 22px;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
  background: #fbfcfe;
}

.archive-list summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--sub);
}

.archive-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12px;
}

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

/* ---------- 课程详情 ---------- */

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
}

.detail-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-title h2 {
  font-size: 20px;
  font-weight: 700;
}

.detail-title .course-dot {
  width: 12px;
  height: 12px;
}

.detail-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.detail-actions {
  display: flex;
  gap: 8px;
  flex: none;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.stat-card {
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
}

.stat-card .stat-label {
  font-size: 12px;
  color: var(--muted);
}

.stat-card .stat-value {
  margin-top: 4px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.stat-card .stat-value small {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 3px;
}

.stat-card .stat-hint {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.ladder {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px 20px 18px;
}

.ladder-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0 12px 22px;
}

.ladder-item::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 18px;
  bottom: -2px;
  width: 2px;
  background: var(--line);
}

.ladder-item:last-child::before {
  display: none;
}

.ladder-node {
  position: absolute;
  left: 0;
  top: 14px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
}

.ladder-item.is-deadline .ladder-node {
  border-color: var(--danger);
}

.ladder-item.is-past .ladder-node {
  background: var(--ok);
  border-color: var(--ok);
}

.ladder-main {
  flex: 1;
  min-width: 0;
}

.ladder-label {
  font-size: 13px;
  font-weight: 600;
}

.ladder-date {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.ladder-side {
  flex: none;
  text-align: right;
}

.ladder-side strong {
  display: block;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.ladder-side span {
  font-size: 11px;
  color: var(--muted);
}

.explain-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 20px 18px;
}

.explain-item {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--sub);
  line-height: 1.65;
}

.explain-item .num-tag {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 700;
}

.mini-list {
  display: flex;
  flex-direction: column;
  padding: 0 16px 16px;
}

.mini-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px dashed var(--line);
  font-size: 12px;
}

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

.mini-row .grow {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-row time {
  color: var(--muted);
  font-size: 11px;
  flex: none;
}

.mini-row .minutes {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  flex: none;
}

.task-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}

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

.task-row .grow {
  flex: 1;
  min-width: 0;
}

.task-row.is-done .title {
  color: var(--muted);
  text-decoration: line-through;
}

/* ---------- 收件箱 ---------- */

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.filter-chip {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--sub);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-chip.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
}

.filter-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--course, var(--accent));
}

.inbox-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inbox-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
}

.inbox-main {
  flex: 1;
  min-width: 0;
}

.inbox-title {
  font-size: 14px;
  font-weight: 600;
}

.inbox-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted);
}

.inbox-actions {
  display: flex;
  gap: 6px;
  flex: none;
}

/* ---------- 复习 ---------- */

.review-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

.review-card {
  position: relative;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  overflow: hidden;
}

.review-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--course, var(--accent));
}

.review-card.is-expanded {
  border-color: #cddcff;
  box-shadow: 0 14px 30px rgba(79, 124, 255, 0.12);
}

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

.review-topic {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.review-note {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.review-back {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.review-hint {
  font-size: 12px;
  color: var(--sub);
  line-height: 1.7;
}

.review-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.review-actions .btn {
  flex: 1;
}

.review-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--muted);
}

.flip-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px dashed var(--line-strong);
  color: var(--sub);
  font-size: 12px;
  background: #fbfcfe;
}

.flip-btn:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* ---------- 统计 ---------- */

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

.kpi {
  padding: 15px 17px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
}

.kpi-label {
  font-size: 12px;
  color: var(--muted);
}

.kpi-value {
  margin-top: 3px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.kpi-value small {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 3px;
}

.kpi-hint {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.chart-card {
  margin-top: 16px;
  padding: 18px 20px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
}

.chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chart-head h3 {
  font-size: 15px;
  font-weight: 700;
}

.chart-head p {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--sub);
}

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

.legend .swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--swatch);
}

.chart-svg {
  width: 100%;
  height: auto;
  margin-top: 8px;
  overflow: visible;
}

.chart-svg text {
  font-family: var(--font);
  fill: #94a3b8;
  font-size: 11px;
}

.chart-svg .grid-line {
  stroke: #eef2f9;
  stroke-width: 1;
}

.stats-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.progress-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 0 20px 18px;
}

.progress-row .between {
  font-size: 12px;
  margin-bottom: 5px;
}

.progress-row .between strong {
  font-size: 13px;
}

.capacity-card {
  padding: 18px 20px;
}

.capacity-card h3 {
  font-size: 15px;
  font-weight: 700;
}

.capacity-figures {
  display: flex;
  gap: 22px;
  margin-top: 10px;
}

.capacity-figures div span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.capacity-figures div strong {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.suggestion-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.suggestion {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: var(--sub);
  line-height: 1.65;
}

.suggestion .idx {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #f1f5fd;
  color: var(--accent-ink);
  font-size: 10px;
  font-weight: 700;
}

/* ---------- 设置 ---------- */

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  padding: 4px 20px 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field.is-full {
  grid-column: 1 / -1;
}

.field > label {
  font-size: 12px;
  font-weight: 600;
  color: var(--sub);
}

.field .hint {
  font-size: 11px;
  color: var(--muted);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fcfdff;
  font-size: 13px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.14);
}

.textarea {
  min-height: 74px;
  resize: vertical;
  line-height: 1.6;
}

.input.is-error,
.select.is-error {
  border-color: var(--danger);
}

.error-text {
  font-size: 11px;
  color: var(--danger);
}

.range-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.range-value {
  flex: none;
  min-width: 62px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}

.switch {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #dfe6f2;
  transition: background 160ms ease;
  flex: none;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease;
}

.switch.is-on {
  background: var(--accent);
}

.switch.is-on::after {
  transform: translateX(20px);
}

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}

.account-card {
  padding: 18px 20px;
}

.account-card h3 {
  font-size: 15px;
  font-weight: 700;
}

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12px;
}

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

.account-row .label {
  color: var(--muted);
}

/* ---------- 登录 ---------- */

body[data-layout="auth"] .sidebar,
body[data-layout="auth"] .topbar,
body[data-layout="auth"] .tabbar,
body[data-layout="auth"] .fab {
  display: none;
}

body[data-layout="auth"] .stage {
  margin-left: 0;
}

body[data-layout="auth"] .view {
  max-width: none;
  padding: 0;
}

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.auth-brand {
  position: relative;
  padding: 56px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background:
    radial-gradient(90% 120% at 100% 100%, rgba(140, 160, 255, 0.55), transparent 60%),
    linear-gradient(150deg, #2f53c8 0%, #4f7cff 55%, #6e8dff 100%);
  overflow: hidden;
}

.auth-brand::after {
  content: "";
  position: absolute;
  right: -80px;
  top: 12%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.auth-brand .brand-logo {
  width: 52px;
  height: 52px;
  font-size: 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.auth-brand h1 {
  margin-top: 22px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.auth-brand h2 {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
}

.auth-points {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 380px;
}

.auth-point {
  display: flex;
  gap: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.auth-point .dot {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  font-size: 11px;
  font-weight: 700;
}

.auth-foot {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: var(--card);
}

.auth-form {
  width: 100%;
  max-width: 340px;
}

.auth-form h3 {
  font-size: 22px;
  font-weight: 700;
}

.auth-form .sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.auth-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 24px;
}

.auth-form .btn-primary {
  width: 100%;
  min-height: 46px;
  margin-top: 20px;
  font-size: 14px;
}

.auth-hint {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f6f8fe;
  border: 1px dashed var(--line-strong);
  font-size: 11px;
  color: var(--sub);
  line-height: 1.7;
}

.auth-hint code {
  font-family: "Consolas", "Menlo", monospace;
  color: var(--accent-ink);
}

.auth-error {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--danger-soft);
  color: #b91c1c;
  font-size: 12px;
}

/* ---------- 抽屉 ---------- */

.sheet-root {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
}

.sheet-root[data-open="true"] {
  display: block;
}

.sheet-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  animation: fade-in 160ms ease;
}

.sheet {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 452px;
  max-width: 94vw;
  display: flex;
  flex-direction: column;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  animation: slide-in 180ms ease;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.sheet-head h3 {
  font-size: 16px;
  font-weight: 700;
}

.sheet-head p {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.sheet-close {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
}

.sheet-close:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.sheet-close svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
}

.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
}

.sheet-foot {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}

.sheet-foot .btn {
  flex: 1;
}

.sheet-preview {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f6f8fe;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--sub);
}

.swatch-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.swatch-btn {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 2px solid transparent;
  background: var(--swatch);
}

.swatch-btn.is-active {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
  box-shadow: 0 0 0 2px #fff inset;
}

.chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mini-chip {
  height: 30px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--sub);
  font-size: 12px;
}

.mini-chip.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
}

/* ---------- 提示与弹窗 ---------- */

.toast-root {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 78vw;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 13px;
  box-shadow: var(--shadow-md);
  animation: toast-in 180ms ease;
}

.toast.is-error {
  background: #b91c1c;
}

.toast.is-ok {
  background: #15803d;
}

.dialog-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  background: rgba(15, 23, 42, 0.45);
}

.dialog-root[data-open="true"] {
  display: grid;
}

.dialog {
  width: 360px;
  max-width: 92vw;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  animation: fade-up 160ms ease;
}

.dialog h3 {
  font-size: 16px;
  font-weight: 700;
}

.dialog p {
  margin-top: 8px;
  font-size: 13px;
  color: var(--sub);
  line-height: 1.7;
}

.dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.dialog-actions .btn {
  flex: 1;
}

/* ---------- 空态与加载 ---------- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 34px 20px;
  text-align: center;
}

.empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-ink);
  margin-bottom: 2px;
}

.empty-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty h4 {
  font-size: 14px;
  font-weight: 700;
}

.empty p {
  font-size: 12px;
  color: var(--muted);
  max-width: 360px;
  line-height: 1.7;
}

.empty .btn {
  margin-top: 8px;
}

.boot-hint {
  padding: 60px 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.page-error {
  margin: 40px auto;
  max-width: 460px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid #fecaca;
  background: var(--danger-soft);
  text-align: center;
}

.page-error h4 {
  font-size: 15px;
  font-weight: 700;
  color: #b91c1c;
}

.page-error p {
  margin-top: 6px;
  font-size: 12px;
  color: #7f1d1d;
  word-break: break-word;
}

.page-error .btn {
  margin-top: 14px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--muted);
}

.back-link:hover {
  color: var(--accent-ink);
}

.back-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- 响应式 ---------- */

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

  .today-grid {
    grid-template-columns: minmax(0, 1fr) 286px;
  }

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

@media (max-width: 1023px) {
  .sidebar {
    display: none;
  }

  .stage {
    margin-left: 0;
  }

  .topbar {
    padding: 12px 18px 10px;
  }

  .topbar-title h1 {
    font-size: 19px;
  }

  .view {
    padding: 0 18px 96px;
  }

  .today-grid,
  .detail-grid,
  .stats-lower,
  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    justify-content: space-around;
    gap: 2px;
    padding: 8px 6px 10px;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(8px);
  }

  .tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 0;
    border-radius: 10px;
    color: var(--muted);
    font-size: 10px;
  }

  .tab-item.is-active {
    color: var(--accent-ink);
    font-weight: 600;
  }

  .tab-item svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.7;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .fab {
    display: grid;
  }

  .task-actions {
    opacity: 1;
  }
}

@media (max-width: 760px) {
  .topbar {
    padding: 10px 14px 8px;
  }

  .topbar-title h1 {
    font-size: 17px;
  }

  .topbar-title p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar-actions .btn-ghost {
    display: none;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
  }

  .hero-title {
    font-size: 19px;
  }

  .hero-number {
    font-size: 28px;
  }

  .hero-ring {
    display: none;
  }

  .course-grid,
  .review-grid,
  .stat-grid,
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

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

  .inbox-actions {
    width: 100%;
  }

  .inbox-actions .btn {
    flex: 1;
  }

  .detail-head {
    flex-direction: column;
  }

  .sheet {
    width: 100%;
    max-width: 100%;
  }

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

  .auth-brand {
    padding: 30px 24px;
    min-height: 220px;
  }

  .auth-brand h1 {
    font-size: 22px;
  }

  .auth-points {
    display: none;
  }

  .auth-panel {
    padding: 30px 22px 46px;
  }
}

/* ---------- 动效 ---------- */

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-in {
  from {
    transform: translateX(24px);
    opacity: 0.6;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* 打印时的简化样式，导出成 PDF 时不带侧边栏 */
@media print {
  .sidebar,
  .topbar-actions,
  .tabbar,
  .fab {
    display: none;
  }

  .stage {
    margin-left: 0;
  }

  body {
    background: #fff;
  }
}
