/* ============================================================
   班级提醒时间表 —— 样式
   纯 CSS，无外部字体/图标依赖

   ★ 动效觉得刺眼或太安静，改这一小段就够了：
     · 卡片入场时长与幅度 → 搜 "@keyframes card-in" / ".card-anim"
     · 卡片淡化程度       → 搜 ".card--done { opacity"
     · 打勾动画           → 搜 "@keyframes check-pop"
     · 红点呼吸           → 搜 ".dot" / "@keyframes dot-pulse"
     · 悬浮按钮弹入       → 搜 "@keyframes fab-pop"
     · 卡片依次入场的节奏 → site/app.js 里的 WAVE_STEP / FLIP_MS
   ★ 系统开启"减少动态效果"时，下面会自动几乎不动。
   ============================================================ */

* { box-sizing: border-box; }

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

body {
  background: #f4f5f7;
  color: #1f2329;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
               "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px calc(32px + env(safe-area-inset-bottom));
}

.wrap--narrow { max-width: 480px; }

/* ---------------- 顶部标题 ---------------- */

.head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.head-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #8b6cf0, #5b8def);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(91, 141, 239, .28);
}

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

.head h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: .3px;
}

.meta {
  margin: 3px 0 0;
  font-size: 13px;
  color: #8a9099;
}

/* ---------------- 右上角菜单按钮 ---------------- */

.menu-btn {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(31, 35, 41, .08);
  cursor: pointer;
  color: #646a73;
  font-size: 20px;
  line-height: 1;
}

.menu-btn:active { background: #f0f2f5; }

.menu-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #f5222d;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-weight: 600;
}

/* ---------------- 登录状态条 ---------------- */

.auth-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(31, 35, 41, .06);
  font-size: 13px;
}

.auth-text { color: #646a73; min-width: 0; flex: 1 1 160px; }
.auth-actions { display: inline-flex; gap: 8px; flex: 0 0 auto; }

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  /* 按键反馈：只做颜色和极小的位移/缩放，安静但有回应 */
  transition: background-color .2s ease, color .2s ease, border-color .2s ease,
              box-shadow .2s ease, transform .2s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: translateY(1px); }
.btn:disabled { transform: none; }
.btn:focus-visible { outline: 2px solid #3370ff; outline-offset: 2px; }

.btn--primary { background: #3370ff; color: #fff; }
.btn--primary:active { background: #2a5fd8; }
.btn--primary:disabled { background: #a8c0ff; cursor: default; }

.btn--ghost { background: #f0f2f5; color: #1f2329; }
.btn--ghost:active { background: #e3e6ea; }
.btn--ghost:disabled { color: #a3a8b0; cursor: default; }

.btn--danger { background: #fff1f0; color: #cf1322; border-color: #ffccc7; }
.btn--danger:active { background: #ffe0dd; }

.btn--mini { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn--block { width: 100%; padding: 11px 14px; font-size: 16px; }

.icon-btn {
  border: none;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  color: #8a9099;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background-color .2s ease, color .2s ease;
  -webkit-tap-highlight-color: transparent;
}

.icon-btn:active { background: #f0f2f5; }

/* ---------------- 提示 / 错误 ---------------- */

.error, .notice {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  word-break: break-word;
}

.error {
  background: #fff1f0;
  border: 1px solid #ffccc7;
  color: #cf1322;
  white-space: pre-line;
}

.notice--ok {
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  color: #389e0d;
}

.notice--warn {
  background: #fffbe6;
  border: 1px solid #ffe58f;
  color: #ad6800;
}

/* 弹层内的小提示，不占整个页面 */
.error--inline {
  margin: 0 0 14px;
  padding: 10px 12px;
  font-size: 13px;
}

/* ---------------- 工具条 ---------------- */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 13px;
  color: #646a73;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.toggle input { width: 16px; height: 16px; accent-color: #5b8def; }

/* ---------------- 分组 ---------------- */

.sections { display: block; }

.group { margin-bottom: 22px; }

.group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 2px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #646a73;
  letter-spacing: .5px;
}

.group-count { font-weight: 400; color: #a3a8b0; }

/* ---------------- 卡片 ---------------- */

.card {
  position: relative;
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px 14px 20px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(31, 35, 41, .06);
  overflow: hidden;
  /* 勾选后淡化颜色的过渡 */
  transition: opacity .38s ease, background-color .3s ease, box-shadow .2s ease, transform .2s ease;
}

/* 卡片的入场：轻轻淡入 + 极小幅上浮（很收敛，不刺眼） */
@keyframes card-in {
  from { opacity: 0; transform: translate3d(0, 6px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

.card-anim {
  animation: card-in .8s cubic-bezier(.33, 0, .2, 1) both;
}

/* 刚被勾选的那一条：只有极轻微的变化，主要靠淡出和划线表达 */
@keyframes card-settle {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.006); }
  100% { transform: scale(1); }
}

.card--just-done { animation: card-settle .55s ease-out; }

/* 勾选后整体淡化 */
.card--done { opacity: .58; }
.card--done:hover { opacity: .82; }

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: #d9dde3;
}

.card--overdue::before { background: #f5222d; }
.card--today::before   { background: #fa8c16; }
.card--soon::before    { background: #faad14; }
.card--later::before   { background: #52c41a; }
.card--nodate::before  { background: #bfbfbf; }
.card--done::before    { background: #c9ced6; }

.card--done { background: #f7f8fa; }

/* 标题加删除线：动态划过去，而不是"啪"地出现 */
.card-title {
  position: relative;
  transition: color .35s ease;
}

.card-title::after {
  content: "";
  position: absolute;
  left: 0;
  top: 55%;
  height: 1.5px;
  width: 0;
  background: currentColor;
  opacity: .75;
  transition: width .34s ease;
}

.card--done .card-title { color: #9aa0a8; }

.card--done .card-title::after {
  width: 100%;
  /* 勾选后稍等一下再划线，配合淡出，更有"落定"的感觉 */
  transition: width .34s ease .1s;
}

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

.card-title {
  flex: 1 1 auto;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}

.pill {
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.card-rows {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.row-label { font-size: 12px; color: #9aa0a8; margin-bottom: 2px; }
.row-value { font-size: 15px; color: #1f2329; word-break: break-word; }
.card--done .row-value { color: #9aa0a8; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}

.pill--overdue, .badge--overdue { background: #fff1f0; color: #cf1322; }
.pill--today,   .badge--today   { background: #fff7e6; color: #d46b08; }
.pill--soon,    .badge--soon    { background: #fffbe6; color: #ad6800; }
.pill--later,   .badge--later   { background: #f6ffed; color: #389e0d; }
.pill--nodate,  .badge--nodate  { background: #f0f2f5; color: #8c8c8c; }
.pill--done,    .badge--done    { background: #f0f2f5; color: #8c8c8c; }

/* 卡片右下角的编辑操作 */
.card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #e5e6eb;
}

.check {
  display: block;
  width: 18px;
  height: 18px;
  margin-top: 6px;
  color: #c9ced6;
}

.check--on { color: #52c41a; }
.card svg { display: block; }

/* 每个人自己的「我已完成」勾选：访客也能点，只对自己可见 */
.done-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .24s ease, transform .22s ease;
}

.done-btn .check {
  width: 24px;
  height: 24px;
  margin: 0;
  transition: color .3s ease, transform .24s ease;
}

/* 按下只是轻微内收，不"弹" */
.done-btn:active { transform: scale(.96); background: #f4f5f7; }
.done-btn:disabled { opacity: .55; }

/* 勾上时：颜色渐变过去，只带一点点缩放 */
@keyframes check-pop {
  0%   { transform: scale(.9); }
  100% { transform: scale(1); }
}

.done-btn--on .check {
  color: #52c41a;
  animation: check-pop .3s ease-out;
}

.done-btn--on { background: #f6ffed; }

/* 待办/已完成 分组的小标题 */
.group-hint {
  font-weight: 400;
  font-size: 12px;
  color: #b0b5bd;
  margin-left: 4px;
}

/* ---------------- 栏目切换：班级提醒 / 我的 ---------------- */

.col-switch {
  display: flex;
  gap: 6px;
  padding: 4px;
  margin-bottom: 12px;
  background: #eceef1;
  border-radius: 12px;
}

.col-tab {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 6px;
  border: none;
  border-radius: 9px;
  background: transparent;
  font-size: 14px;
  font-family: inherit;
  color: #646a73;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .22s ease, color .22s ease, box-shadow .22s ease;
  -webkit-tap-highlight-color: transparent;
}

.col-tab:active { transform: translateY(1px); }

.col-tab--on {
  background: #fff;
  color: #1f2329;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(31, 35, 41, .08);
}

.col-tab-count {
  min-width: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e8eaed;
  color: #646a73;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.col-tab--on .col-tab-count { background: #eef3ff; color: #1d3fbf; }

/* ---------------- 事项类型：四种颜色 ---------------- */

:root {
  --type-homework: #3370ff;   /* 作业：蓝 */
  --type-exam: #f5222d;       /* 考试：红 */
  --type-activity: #722ed1;   /* 活动：紫 */
  --type-other: #8c8c8c;      /* 其他：灰 */
}

/* 卡片右上角的小三角，一眼看出类型 */
.card-type--homework::after,
.card-type--exam::after,
.card-type--activity::after,
.card-type--other::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 26px 26px 0;
  border-color: transparent var(--type-other) transparent transparent;
  opacity: .85;
  pointer-events: none;
}

.card-type--homework::after { border-color: transparent var(--type-homework) transparent transparent; }
.card-type--exam::after     { border-color: transparent var(--type-exam) transparent transparent; }
.card-type--activity::after { border-color: transparent var(--type-activity) transparent transparent; }

/* 类型色块（卡片标题右边） */
.card-top-right {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.type-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .25s ease, color .25s ease;
}

.type-chip--homework { background: #eef3ff; color: #1d3fbf; }
.type-chip--exam     { background: #fff1f0; color: #cf1322; }
.type-chip--activity { background: #f9f0ff; color: #531dab; }
.type-chip--other    { background: #f0f2f5; color: #595959; }

/* 类型筛选条 */
.type-filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  margin-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.type-filter::-webkit-scrollbar { display: none; }

.type-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 1px solid #e5e6eb;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-family: inherit;
  color: #4e5969;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease,
              transform .2s ease;
  -webkit-tap-highlight-color: transparent;
}

.type-tab:active { transform: translateY(1px); }

.type-tab-count {
  font-size: 11px;
  color: #a3a8b0;
  background: #f2f3f5;
  border-radius: 999px;
  padding: 0 6px;
  min-width: 18px;
  text-align: center;
}

.type-tab--on {
  background: #1f2329;
  border-color: #1f2329;
  color: #fff;
  font-weight: 600;
}

.type-tab--on .type-tab-count { background: rgba(255,255,255,.22); color: #fff; }

.type-tab--homework.type-tab--on { background: var(--type-homework); border-color: var(--type-homework); }
.type-tab--exam.type-tab--on     { background: var(--type-exam); border-color: var(--type-exam); }
.type-tab--activity.type-tab--on { background: var(--type-activity); border-color: var(--type-activity); }
.type-tab--other.type-tab--on    { background: var(--type-other); border-color: var(--type-other); }

/* 编辑器里的类型按钮 */
.type-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #dee0e3;
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
  font-family: inherit;
  color: #1f2329;
  cursor: pointer;
  text-align: left;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease,
              transform .2s ease;
  -webkit-tap-highlight-color: transparent;
}

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

.type-btn-name { font-weight: 600; }
.type-btn-hint { font-size: 12px; color: #a3a8b0; }

.type-btn--homework { background: #eef3ff; border-color: #adc6ff; color: #1d3fbf; }
.type-btn--exam     { background: #fff1f0; border-color: #ffccc7; color: #cf1322; }
.type-btn--activity { background: #f9f0ff; border-color: #d3adf7; color: #531dab; }
.type-btn--other    { background: #f7f8fa; border-color: #dee0e3; color: #4e5969; }

/* 菜单项里的小红点 */
.menu-item-label { flex: 1 1 auto; }

.dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f5222d;
  box-shadow: 0 0 0 0 rgba(245, 34, 45, .35);
  animation: dot-pulse 3.2s ease-out infinite;
}

@keyframes dot-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(245, 34, 45, .28); }
  60%  { box-shadow: 0 0 0 5px rgba(245, 34, 45, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 34, 45, 0); }
}

.empty {
  padding: 48px 20px;
  text-align: center;
  color: #9aa0a8;
  font-size: 15px;
}

.foot {
  margin-top: 26px;
  text-align: center;
  font-size: 12px;
  color: #b0b5bd;
}

.version {
  display: inline-block;
  margin-top: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #f2f3f5;
  color: #9aa0a8;
  font-size: 11px;
  letter-spacing: .3px;
}

.muted { color: #8a9099; font-size: 13px; }
.center { text-align: center; }
.spacer { flex: 1 1 auto; }

/* ---------------- 悬浮添加按钮 ---------------- */

.fab {
  position: fixed;
  right: max(18px, calc(50vw - 360px + 18px));
  bottom: calc(24px + env(safe-area-inset-bottom));
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 28px;
  background: #3370ff;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(51, 112, 255, .38);
  cursor: pointer;
  z-index: 40;
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

/* 右下角「+」出现时轻轻淡入，不旋转 */
@keyframes fab-pop {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}

.fab:not([hidden]) { animation: fab-pop .34s ease-out both; }
.fab:active { background: #2a5fd8; transform: translateY(1px); }

/* ---------------- 弹层 / 抽屉 ---------------- */

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
  padding: 0;
}

/* 真正的遮罩：铺满整个屏幕，点哪里都能关（之前透明区域点不动就是缺这一层） */
.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 18, 22, .45);
}

.overlay[hidden] { display: none; }

/* 弹层打开时锁住背景滚动 */
body.has-overlay { overflow: hidden; }

.sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .18);
  animation: sheet-up .26s ease-out;
}

@keyframes sheet-up {
  from { transform: translateY(10px); opacity: .85; }
  to   { transform: translateY(0);    opacity: 1; }
}

.sheet-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  background: #fff;
  border-bottom: 1px solid #f0f2f5;
}

.sheet-head h2 { margin: 0; font-size: 17px; }

.sheet-body { padding: 16px; }

.sub-title {
  margin: 18px 0 8px;
  font-size: 14px;
  color: #646a73;
}

.sub-title:first-child { margin-top: 0; }

/* ---------------- 表单 ---------------- */

.field { display: block; margin-bottom: 14px; }

.field-label {
  display: block;
  font-size: 13px;
  color: #646a73;
  margin-bottom: 5px;
}

.field-hint { display: block; font-size: 12px; color: #b0b5bd; margin-top: 4px; }

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="datetime-local"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dee0e3;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: #1f2329;
  background: #fff;
}

.field input:focus {
  outline: none;
  border-color: #3370ff;
  box-shadow: 0 0 0 3px rgba(51, 112, 255, .12);
}

.field--row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.field--row input { width: 18px; height: 18px; accent-color: #3370ff; }

.sheet-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

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

.login-body { background: #f4f5f7; }

.back-link {
  display: inline-block;
  margin-bottom: 14px;
  color: #646a73;
  font-size: 14px;
  text-decoration: none;
}

.back-link:active { color: #3370ff; }

.tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: #eceef1;
  border-radius: 12px;
  margin-bottom: 16px;
}

.tab {
  flex: 1 1 0;
  padding: 9px 0;
  border: none;
  border-radius: 9px;
  background: transparent;
  font-size: 15px;
  font-family: inherit;
  color: #646a73;
  cursor: pointer;
}

.tab--on { background: #fff; color: #1f2329; font-weight: 600; box-shadow: 0 1px 3px rgba(31,35,41,.08); }

.card-form {
  background: #fff;
  border-radius: 14px;
  padding: 18px 16px;
  box-shadow: 0 1px 3px rgba(31, 35, 41, .06);
}

/* ---------------- 管理员面板 ---------------- */

.sheet--tall { max-height: 92vh; }

.admin-list { display: block; }

.admin-card {
  border: 1px solid #f0f2f5;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: #fcfcfd;
}

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

.admin-card p { margin: 4px 0; }

.admin-msg {
  background: #f6f8ff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 14px;
  color: #2b4acb;
}

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

.tag {
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #f0f2f5;
  color: #646a73;
}

.tag--approved { background: #f6ffed; color: #389e0d; }
.tag--pending  { background: #fffbe6; color: #ad6800; }
.tag--rejected { background: #fff1f0; color: #cf1322; }
.tag--blocked  { background: #f0f2f5; color: #8c8c8c; }

.menu-list { display: flex; flex-direction: column; gap: 8px; }

.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #f0f2f5;
  border-radius: 12px;
  background: #fff;
  font-size: 16px;
  font-family: inherit;
  text-align: left;
  text-decoration: none;
  color: #1f2329;
  cursor: pointer;
}

.menu-item:active { background: #f7f8fa; }
.menu-item:disabled { color: #b0b5bd; cursor: default; }

/* ---------------- 小屏微调 ---------------- */

@media (max-width: 380px) {
  .card-rows { grid-template-columns: 1fr; }
  .card-title { font-size: 17px; }
  .fab { right: 14px; }
}

/* ---------------- 深色模式 ---------------- */

@media (prefers-color-scheme: dark) {
  body, .login-body { background: #16181d; color: #e6e8eb; }

  .card { background: #1f2229; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
  .card--done { background: #1a1c21; opacity: .55; }
  .card--done:hover { opacity: .8; }
  .card-actions { border-top-color: #2c3038; }
  .row-value { color: #e6e8eb; }
  .row-label, .group-head, .toolbar, .meta { color: #9aa0a8; }
  .group-count, .foot, .muted { color: #6f757e; }
  .empty { color: #6f757e; }
  .card--done .card-title { color: #6f757e; }

  .menu-btn, .auth-bar, .card-form { background: #1f2229; color: #e6e8eb; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
  .menu-btn:active { background: #2a2d33; }
  .auth-text { color: #9aa0a8; }

  .btn--ghost { background: #2a2d33; color: #e6e8eb; }
  .btn--ghost:active { background: #343841; }
  .btn--danger { background: #3a1416; border-color: #5c1f22; color: #ff7875; }

  .sheet, .sheet-head { background: #1f2229; color: #e6e8eb; }
  .sheet-head { border-bottom-color: #2c3038; }

  .field input[type="text"], .field input[type="email"],
  .field input[type="password"], .field input[type="datetime-local"] {
    background: #16181d;
    color: #e6e8eb;
    border-color: #343841;
  }

  .tabs { background: #22252b; }
  .tab--on { background: #2f333b; color: #fff; }
  .back-link { color: #9aa0a8; }

  .admin-card { background: #22252b; border-color: #2c3038; }
  .admin-msg { background: #1d2540; color: #9db4ff; }
  .menu-item { background: #22252b; border-color: #2c3038; color: #e6e8eb; }
  .menu-item:active { background: #2a2d33; }
  .icon-btn:active { background: #2a2d33; }

  .error { background: #3a1416; border-color: #5c1f22; color: #ff7875; }
  .notice--ok { background: #16301a; border-color: #274d2c; color: #95de64; }
  .notice--warn { background: #3a3410; border-color: #57491a; color: #ffd666; }

  .pill--overdue, .badge--overdue { background: #3a1416; color: #ff7875; }
  .pill--today,   .badge--today   { background: #3a2410; color: #ffa940; }
  .pill--soon,    .badge--soon    { background: #3a3410; color: #ffd666; }
  .pill--later,   .badge--later   { background: #16301a; color: #95de64; }
  .pill--nodate,  .badge--nodate  { background: #2a2d33; color: #8c8c8c; }
  .pill--done,    .badge--done    { background: #2a2d33; color: #8c8c8c; }

  .done-btn--on { background: #16301a; }
  .done-btn:active { background: #2a2d33; }

  /* 栏目切换的深色适配 */
  .col-switch { background: #22252b; }
  .col-tab { color: #9aa0a8; }
  .col-tab--on { background: #2f333b; color: #fff; box-shadow: none; }
  .col-tab-count { background: #2f333b; color: #9aa0a8; }
  .col-tab--on .col-tab-count { background: #16224a; color: #8fb0ff; }

  /* 类型色块 / 筛选条 / 类型按钮 的深色适配 */
  .type-chip--homework { background: #16224a; color: #8fb0ff; }
  .type-chip--exam     { background: #3a1416; color: #ff7875; }
  .type-chip--activity { background: #2a1a44; color: #b37feb; }
  .type-chip--other    { background: #2a2d33; color: #a6adb8; }

  .type-tab { background: #22252b; border-color: #343841; color: #c9ced6; }
  .type-tab-count { background: #2f333b; color: #9aa0a8; }
  .type-tab--on { background: #e6e8eb; border-color: #e6e8eb; color: #16181d; }
  .type-tab--on .type-tab-count { background: rgba(0,0,0,.12); color: #16181d; }
  .type-tab--homework.type-tab--on { background: #2b5cff; border-color: #2b5cff; color: #fff; }
  .type-tab--exam.type-tab--on     { background: #f5222d; border-color: #f5222d; color: #fff; }
  .type-tab--activity.type-tab--on { background: #722ed1; border-color: #722ed1; color: #fff; }
  .type-tab--other.type-tab--on    { background: #6b7280; border-color: #6b7280; color: #fff; }

  .type-btn--homework { background: #16224a; border-color: #2b3f7a; color: #8fb0ff; }
  .type-btn--exam     { background: #3a1416; border-color: #5c1f22; color: #ff7875; }
  .type-btn--activity { background: #2a1a44; border-color: #4a2b7a; color: #b37feb; }
  .type-btn--other    { background: #22252b; border-color: #343841; color: #c9ced6; }
  .type-btn { color: inherit; }
}

/* ---------------- 尊重"减少动态效果"的系统设置 ---------------- */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

