/* -*- coding: utf-8 -*-
 * 可视化健身助手 - 全局样式（移动优先，360-430px 适配）
 */

:root {
  --primary: #0e9488;
  --primary-dark: #0a7a70;
  --primary-soft: #e6f5f3;
  --danger: #d64545;
  --danger-soft: #fdecec;
  --warning: #c87d12;
  --warning-soft: #fdf3e3;
  --success: #2e8f47;
  --success-soft: #e8f5ec;
  --ink: #1f2a37;
  --ink-2: #566270;
  --ink-3: #8a94a2;
  --line: #e4e8ee;
  --bg: #f3f5f8;
  --card: #ffffff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 10px rgba(31, 42, 55, 0.06);
  --nav-h: 60px;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial,
    sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 15px;
}

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

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

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}

.card h2 {
  font-size: 16px;
  margin-bottom: 12px;
}

.card h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

.muted {
  color: var(--ink-3);
  font-size: 13px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 15px;
  background: #eef1f5;
  color: var(--ink);
  transition: background 0.15s, opacity 0.15s;
  min-height: 42px;
}

.btn:active {
  opacity: 0.8;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-block {
  width: 100%;
}

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

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-2);
}

.btn-sm {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 13px;
}

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.7;
}

.badge-primary {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.badge-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge-success {
  background: var(--success-soft);
  color: var(--success);
}

.badge-gray {
  background: #eef1f5;
  color: var(--ink-2);
}

.badge-error {
  background: #fdecec;
  color: #c0392b;
}

/* 训练意图标签：冲重量 / 常规 / 热身激活 / 技术练习 */
.intent-badge {
  margin-left: 6px;
  vertical-align: middle;
}

/* 教练提示与点评卡片 */
.coach-tip {
  margin: 10px 0;
  padding: 10px 12px;
  border-left: 3px solid var(--primary);
  background: var(--primary-soft);
  border-radius: 8px;
}

.coach-tip-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.coach-tip-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-2);
  white-space: pre-wrap;
}

/* 组感受点评与训练结束点评：用不同底色区分常规提示 */
.coach-feedback,
.coach-review {
  background: var(--warning-soft);
  border-left-color: var(--warning);
}

.coach-feedback .coach-tip-title,
.coach-review .coach-tip-title {
  color: var(--warning);
}

.coach-review-box {
  margin-top: 12px;
}

/* 本周总览：本周目标与每日训练目标 */
.week-goal {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--primary);
  background: var(--primary-soft);
  border-radius: 8px;
}

.week-goal-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.week-goal-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-1);
  white-space: pre-wrap;
}

.week-plan-list {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.week-plan-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
}

.week-plan-day {
  flex: 0 0 auto;
  min-width: 72px;
  color: var(--ink-1);
  font-weight: 500;
}

.week-plan-focus {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-plan-intensity {
  flex: 0 0 auto;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.week-intensity-low {
  background: #eef1f5;
  color: var(--ink-2);
}

.week-intensity-mid {
  background: var(--warning-soft);
  color: var(--warning);
}

.week-intensity-high {
  background: #fdecec;
  color: #c0392b;
}

/* 管理员：提示词检查 */
.prompt-detail {
  margin-top: 12px;
}

/* 用途筛选按钮组 */
.prompt-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.prompt-pre {
  margin: 8px 0 0;
  padding: 12px;
  max-height: 420px;
  overflow: auto;
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 提示词详情：概要信息与按角色分块的可读内容 */
.prompt-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 8px 0 12px;
  color: var(--ink-2);
  font-size: 13px;
}

.prompt-msg {
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.prompt-msg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #f7f9fb;
  border-bottom: 1px solid var(--line);
}

.prompt-role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  background: #e8f1fd;
  color: #1f6fd0;
}

.prompt-msg.prompt-role-user .prompt-role-badge {
  background: #e9f7ef;
  color: #1e8449;
}

.prompt-msg.prompt-role-assistant .prompt-role-badge {
  background: #fdf3e7;
  color: #b9770e;
}

.prompt-msg-body {
  padding: 10px;
  max-height: 360px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 5px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  min-height: 42px;
}

.field textarea {
  min-height: 68px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 148, 136, 0.12);
}

.field .hint {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 4px;
}

.field-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 6px;
  min-height: 18px;
}

.form-row {
  display: flex;
  gap: 10px;
}

.form-row .field {
  flex: 1;
  min-width: 0;
}

.alert {
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  margin-bottom: 12px;
}

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

.alert-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.alert-success {
  background: var(--success-soft);
  color: var(--success);
}

.alert-info {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.empty {
  text-align: center;
  color: var(--ink-3);
  padding: 28px 12px;
  font-size: 14px;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: -3px;
}

.spinner-dark {
  border-color: rgba(14, 148, 136, 0.25);
  border-top-color: var(--primary);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- 轻提示 Toast ---------- */

.toast-host {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 18px);
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: max-content;
  max-width: 90vw;
}

.toast {
  background: rgba(31, 42, 55, 0.92);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  animation: toast-in 0.2s ease;
}

.toast.toast-error {
  background: var(--danger);
}

.toast.toast-success {
  background: var(--success);
}

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

/* ---------- 认证页 ---------- */

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(160deg, #0e9488 0%, #0a7a70 55%, #085e57 100%);
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 18px;
  padding: 26px 22px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.auth-logo {
  text-align: center;
  margin-bottom: 18px;
}

.auth-logo .mark {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 26px;
  font-weight: 700;
  line-height: 54px;
  margin: 0 auto 10px;
}

.auth-logo h1 {
  font-size: 20px;
}

.auth-tabs {
  display: flex;
  background: #eef1f5;
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 18px;
}

.auth-tabs button {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 8px 0;
  font-size: 15px;
  color: var(--ink-2);
}

.auth-tabs button.active {
  background: #fff;
  color: var(--primary-dark);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* ---------- 应用外壳 ---------- */

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}

.app-header .title {
  font-size: 17px;
  font-weight: 600;
}

.app-header .user-box {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-2);
}

.app-header .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  text-align: center;
  line-height: 30px;
  font-weight: 600;
}

.app-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 14px calc(var(--nav-h) + 24px);
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  height: var(--nav-h);
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--ink-3);
  font-size: 12px;
}

.bottom-nav a .nav-ico {
  font-size: 19px;
  line-height: 1;
}

.bottom-nav a.active {
  color: var(--primary);
  font-weight: 600;
}

/* 桌面端侧导航 */
.side-nav {
  display: none;
}

@media (min-width: 900px) {
  .app-header {
    display: none;
  }

  .bottom-nav {
    display: none;
  }

  body {
    display: flex;
    min-height: 100vh;
  }

  .side-nav {
    display: flex;
    flex-direction: column;
    width: 210px;
    background: #fff;
    border-right: 1px solid var(--line);
    padding: 22px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
  }

  .side-nav .brand {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
    padding: 0 10px 20px;
  }

  .side-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink-2);
    font-size: 15px;
    margin-bottom: 4px;
  }

  .side-nav a.active {
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 600;
  }

  .side-nav .spacer {
    flex: 1;
  }

  .side-nav .user-line {
    padding: 10px 12px;
    font-size: 13px;
    color: var(--ink-2);
    border-top: 1px solid var(--line);
  }

  .app-shell {
    flex: 1;
    min-width: 0;
  }

  .app-main {
    max-width: 860px;
    padding: 26px 30px 40px;
  }
}

/* ---------- 首页：模型选择 / 计划卡 / 对话 ---------- */

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

.model-bar select {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: #fff;
  min-height: 38px;
}

.plan-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.plan-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.plan-items li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px dashed var(--line);
}

.plan-items .idx {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 13px;
  text-align: center;
  line-height: 24px;
  font-weight: 600;
}

.plan-items .p-main {
  flex: 1;
  min-width: 0;
}

.plan-items .p-name {
  font-weight: 600;
}

.plan-items .p-meta {
  font-size: 13px;
  color: var(--ink-3);
}

.plan-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

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

.chat-box {
  display: flex;
  flex-direction: column;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* 让消息区成为独立滚动容器，高度封顶；超出部分内部滚动 */
  flex: 1;
  max-height: 42vh;
  overflow-y: auto;
  /* 给滚动内容与输入框留出一点呼吸空间 */
  padding-bottom: 6px;
  margin-bottom: 12px;
}

.bubble {
  max-width: 82%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 15px;
  white-space: pre-wrap;
  word-break: break-word;
}

.bubble.user {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.bubble.assistant {
  align-self: flex-start;
  background: #f0f2f5;
  color: var(--ink);
  border-bottom-left-radius: 4px;
}

.chat-input-row {
  display: flex;
  gap: 8px;
}

.chat-input-row textarea {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  resize: none;
  height: 46px;
  min-height: 46px;
}

.chat-input-row .btn {
  flex: none;
}

/* ---------- 训练执行页 ---------- */

.step-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.step-dot {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 64px;
  font-size: 12px;
  color: var(--ink-3);
}

.step-dot .dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--line);
  text-align: center;
  line-height: 30px;
  font-weight: 600;
  background: #fff;
}

.step-dot.done .dot {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.step-dot.current .dot {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.step-dot.current {
  color: var(--primary-dark);
  font-weight: 600;
}

.set-progress {
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 12px;
}

.countdown {
  margin-top: 14px;
  border-radius: var(--radius-sm);
  background: var(--warning-soft);
  color: var(--warning);
  padding: 14px;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
}

.countdown .cs {
  font-size: 30px;
  display: block;
  line-height: 1.2;
}

.set-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.set-list th,
.set-list td {
  padding: 8px 6px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.set-list th {
  color: var(--ink-3);
  font-weight: 400;
  border-top: none;
}

.big-submit {
  width: 100%;
  min-height: 56px;
  font-size: 18px;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

/* ---------- 档案页 ---------- */

.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px dashed var(--line);
  font-size: 14px;
}

.kv-row:first-child {
  border-top: none;
}

.kv-row .k {
  color: var(--ink-3);
  flex: none;
}

.kv-row .v {
  text-align: right;
  word-break: break-word;
}

/* 训练水平评估：优势/不足/建议列表 */
.assess-list {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.7;
}

.assess-list li {
  word-break: break-word;
}

.chip-host {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 5px 8px 5px 13px;
  font-size: 14px;
}

.chip button {
  border: none;
  background: rgba(10, 122, 112, 0.18);
  color: var(--primary-dark);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  line-height: 18px;
  padding: 0;
  font-size: 13px;
}

.inline-form {
  display: flex;
  gap: 8px;
}

.inline-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  min-height: 40px;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.history-table th,
.history-table td {
  padding: 7px 6px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.history-table th {
  color: var(--ink-3);
  font-weight: 400;
}

/* ---------- 日志页 ---------- */

.log-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: none;
  border: none;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  text-align: left;
}

.log-row:first-child {
  border-top: none;
}

.log-row .log-date {
  font-weight: 600;
  font-size: 15px;
  flex: none;
  width: 92px;
}

.log-row .log-info {
  flex: 1;
  min-width: 0;
}

.log-row .log-sub {
  font-size: 13px;
  color: var(--ink-3);
}

.log-row .arrow {
  color: var(--ink-3);
  flex: none;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 12px;
}

.detail-block {
  border-top: 2px solid var(--primary-soft);
  padding-top: 12px;
  margin-top: 4px;
}

.manual-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 12px;
  background: #fafbfc;
}

.manual-item .item-head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.manual-item .item-head input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  min-height: 38px;
}

.set-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.set-row .set-no {
  flex: none;
  width: 44px;
  font-size: 13px;
  color: var(--ink-3);
}

.set-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  min-height: 38px;
}

.set-row button {
  flex: none;
}

.section-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.section-tabs button {
  flex: 1;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 9px 0;
  font-size: 14px;
  color: var(--ink-2);
}

.section-tabs button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

/* ---------- 管理员模型配置 ---------- */

.model-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.model-table th,
.model-table td {
  padding: 8px 6px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.model-table th {
  color: var(--ink-3);
  font-weight: 400;
  white-space: nowrap;
}

.model-table .ops {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.table-scroll {
  overflow-x: auto;
}

/* ---------- 体测报告识别与参考范围 ---------- */

.scan-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.metric-host {
  margin: 10px 0;
}

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

.metric-item {
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
}

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

.metric-label {
  font-size: 13px;
  color: var(--ink-2);
}

.metric-value {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 600;
}

.metric-ref {
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-3);
}

.field-check .check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--ink);
}

/* ---------- 本周计划简报 ---------- */

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0;
}

.week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  min-width: 0;
}

.week-day:disabled {
  cursor: default;
  color: var(--ink-3);
}

.week-day-label {
  font-size: 12px;
}

.week-day-date {
  font-size: 11px;
  color: var(--ink-3);
}

.week-day-state {
  font-size: 12px;
  font-weight: 600;
}

.week-day-planned {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.week-day-progress {
  border-color: var(--warning);
  background: var(--warning-soft);
  color: var(--warning);
}

.week-day-completed {
  border-color: var(--success);
  background: var(--success-soft);
  color: var(--success);
}

.week-day-empty {
  background: #f8fafb;
}

.week-day-today {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.week-totals {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.week-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.week-stat-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
}

.week-stat-label {
  font-size: 11px;
  color: var(--ink-3);
  text-align: center;
}

@media (max-width: 420px) {
  .week-stat-value {
    font-size: 13px;
  }

  .week-stat-label {
    font-size: 10px;
  }
}

/* ---------- 页内对话框（跳过 / 无法完成） ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.45);
}

.modal-card {
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  overflow-y: auto;
  margin: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}
