/* ==========================================================================
   三年教育 · 门店学习系统  UI 主题 v103（视觉精修层）
   目标：在 v102 基础上做「阴影柔和化 + 卡片立体层次 + 标签醒目度 + 登录页质感」，
        不改任何功能、不改 DOM 结构、不改语义状态色。
   加载顺序：styles.css → operations.css → theme-v102.css → theme-v103.css（本文件最后）
   回滚方式：删掉 index.html 里的 <link rel="stylesheet" href="/theme-v103.css"> 即可。

   原则：
   - 只覆盖「视觉变量」与「无状态修饰的基础样式」，不碰 .badge.success/.danger 等语义色。
   - 沿用 body[class][class] 前缀压过 operations.css 的特异性；登录页 body 无 class，单独写。
   ========================================================================== */

/* ---------- 1. 阴影令牌：柔和化 + 多层层次 ----------
   v102 的 --card-shadow 是 0 1px 2px（近乎无），卡片「贴」在背景上缺乏立体感；
   这里统一成「近距离 1px 描边阴影 + 远距离大半径弥散」，让卡片自然浮起。
   （变量覆盖后，所有引用 var(--card-shadow) 的组件自动生效） */
:root {
  --shadow: 0 1px 3px rgba(12, 42, 38, 0.05), 0 16px 40px -16px rgba(12, 42, 38, 0.22);
  --card-shadow: 0 1px 2px rgba(12, 42, 38, 0.04), 0 4px 14px -6px rgba(12, 42, 38, 0.09);
  --card-shadow-hover: 0 2px 4px rgba(12, 42, 38, 0.05), 0 14px 30px -10px rgba(12, 42, 38, 0.18);
}

/* ---------- 2. 卡片 hover 立体感统一 ----------
   可点击卡片（功能入口、库节点、行）在 hover 时轻微上浮 + 阴影加深，
   与 v102 已有的 transform 配合，形成一致的「可点」反馈。 */
body[class][class] .operations-entry-card,
body[class][class] button.library-node,
body[class][class] .assign-row,
body[class][class] .worklist-row {
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
body[class][class] .operations-entry-card:hover,
body[class][class] button.library-node:hover,
body[class][class] .assign-row:hover,
body[class][class] .worklist-row:hover {
  box-shadow: var(--card-shadow-hover);
}

/* ---------- 3. 徽章 / 状态标签醒目度 ----------
   只调基础盒模型与字形，不覆盖 .badge 的语义色（success/warning/danger 等保留）。 */
body[class][class] .badge {
  padding: 4px 12px;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
  border-radius: var(--r-pill);
}

/* ---------- 4. 指标卡（metric）层次 ----------
   左侧色条更细更柔和，数字层与标签层拉开对比，让「驾驶舱」数字更醒目。 */
body[class][class] .metric {
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.18s ease;
}
body[class][class] .metric::after {
  width: 3px;
  opacity: 0.9;
}
body[class][class] .metric strong {
  letter-spacing: -0.02em;
}

/* ---------- 4.5 教师工作台指标卡（teacher-metric）精致化 ----------
   styles.css 里 teacher-metric 仍是旧值（6px 小圆角 + 轻阴影），与演示版的
   大圆角 + 柔和阴影不一致，这里统一到 v103 的视觉令牌，并保留 attention/critical
   语义色（这两类的 border-color / background 不动）。 */
body[class][class] .teacher-metric {
  border-radius: var(--r-lg);
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
body[class][class] .teacher-metric span {
  font-size: 12px;
  color: #64726d;
}
body[class][class] .teacher-metric strong {
  font-size: 26px;
  letter-spacing: -0.02em;
}
body[class][class] .teacher-metric small {
  font-size: 11px;
  color: #7c8a85;
}
/* 第一屏的指标卡网格：与上方标题、下方入口卡拉开呼吸感 */
body[class][class] #teacher-metrics {
  margin-bottom: 20px;
}

/* ---------- 5. 顶栏：更利落的底部界线 ---------- */
body[class][class] .topbar {
  box-shadow: 0 1px 0 rgba(12, 42, 38, 0.04);
}

/* ---------- 6. 登录页质感（body 无 class，单独写） ---------- */
.login-brand {
  background:
    radial-gradient(circle at 85% 12%, rgba(20, 160, 133, 0.28), transparent 52%),
    linear-gradient(155deg, #0c2a26 0%, #0a4238 52%, #0d6b57 100%);
}
.login-panel {
  box-shadow: 0 1px 3px rgba(12, 42, 38, 0.05), 0 24px 56px -20px rgba(12, 42, 38, 0.22);
}

/* ---------- 7. 移动端：阴影在窄屏收细，避免大面积黑影 ---------- */
@media (max-width: 900px) {
  :root {
    --card-shadow: 0 1px 2px rgba(12, 42, 38, 0.04), 0 3px 10px -4px rgba(12, 42, 38, 0.10);
    --card-shadow-hover: 0 2px 4px rgba(12, 42, 38, 0.05), 0 8px 18px -8px rgba(12, 42, 38, 0.18);
  }
}

/* ---------- 8. 减少动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  body[class][class] .operations-entry-card,
  body[class][class] button.library-node,
  body[class][class] .assign-row,
  body[class][class] .worklist-row {
    transition: none;
  }
}
