/* 任务面板布局与组件；颜色变量见 theme/theme.css */
* { box-sizing: border-box; }

html, body { height: 100%; }
body {
  margin: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "HarmonyOS Sans SC", "PingFang SC", "MiSans", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
body:not(.is-loaded) .main { opacity: 0; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: default; opacity: .4; }
input, textarea, select { outline: none; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3, h4 { margin: 0; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.mobile-only { display: none !important; }
.link { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; text-align: left; }
.link:hover { color: var(--accent-strong); text-decoration-color: currentColor; }
.strike { text-decoration: line-through; color: var(--muted); }

/* ── 通用控件 ─────────────────────────────────────────────── */
.icon-btn {
  width: 34px; height: 34px;
  display: inline-grid; place-items: center;
  border-radius: 9px; color: var(--text-2);
  transition: background .15s, color .15s;
}
.icon-btn:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.icon-btn.small { width: 28px; height: 28px; }
.icon-btn.small svg { width: 16px; height: 16px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 9px;
  background: var(--surface-2); font-weight: 600; font-size: 13px;
  transition: background .15s;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover:not(:disabled) { background: var(--surface-3); }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-strong); }
.btn.ghost { background: transparent; border: 1px solid var(--border); }
.btn.ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn.danger { color: var(--danger); }
.btn.danger:hover:not(:disabled) { background: var(--danger-soft); }

.input {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2);
}
.input:focus { border-color: var(--accent); background: var(--surface); }

input[type="date"], select {
  padding: 3px 6px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--text-2);
}
input[type="date"]:hover, select:hover, input[type="date"]:focus, select:focus { border-color: var(--border); background: var(--surface); }
select { max-width: 220px; }

.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--surface-2); }
.seg button { padding: 4px 11px; border-radius: 7px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.seg.small button { padding: 2px 8px; font-size: 12px; }
.seg.full { display: flex; }
.seg.full button { flex: 1; padding: 7px; }

.badge {
  display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 6px;
  font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.6;
  background: var(--surface-2); color: var(--text-2);
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.muted { color: var(--muted); }
.badge.tiny { font-size: 11px; padding: 0 5px; }
.badge.big { font-size: 15px; padding: 3px 10px; }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; vertical-align: 2px; }
.dot.warn { background: var(--warn); }

.chip { display: inline-block; padding: 1px 8px; margin: 2px 4px 2px 0; border-radius: 6px; background: var(--ok-soft); color: var(--ok); font-size: 12px; }

/* 优先级：文字 + 颜色，不只靠颜色区分 */
.pri {
  flex: none; min-width: 24px; padding: 1px 6px; border-radius: 6px;
  font-size: 12px; font-weight: 700; text-align: center; line-height: 1.6;
  border: 1px solid currentColor;
}
.pri.high { color: var(--pri-high); }
.pri.medium { color: var(--pri-medium); }
.pri.low { color: var(--pri-low); }
.pri.tiny { min-width: 0; padding: 0 4px; font-size: 11px; margin-right: 6px; }

.meter { display: block; position: relative; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.meter > span { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--chart-bar); transition: width .3s; }
.meter.big { height: 12px; border-radius: 6px; }

.check {
  flex: none; width: 20px; height: 20px; border-radius: 6px;
  display: grid; place-items: center;
  border: 1.8px solid var(--muted); color: transparent;
  transition: background .15s, border-color .15s, color .15s;
}
.check svg { width: 14px; height: 14px; stroke-width: 2.6; }
.check:hover { border-color: var(--ok); color: var(--ok); }
.check.on { background: var(--ok); border-color: var(--ok); color: #fff; }

.inline-input {
  flex: 1; min-width: 0; padding: 3px 6px; margin-left: -6px;
  border: 1px solid transparent; border-radius: 6px; background: transparent;
}
.inline-input:hover { border-color: var(--border); }
.inline-input:focus { border-color: var(--accent); background: var(--surface); }

.empty { display: grid; justify-items: center; gap: 6px; padding: 60px 20px; color: var(--muted); text-align: center; }
.empty svg { width: 40px; height: 40px; stroke-width: 1.4; }
.empty p { margin: 0; color: var(--text-2); }
.empty.small { padding: 24px 12px; }

.group-label { display: flex; align-items: center; gap: 4px; margin: 14px 4px 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.group-label svg { width: 14px; height: 14px; transform: rotate(-90deg); transition: transform .15s; }
.group-label svg.open { transform: none; }
.group-label.toggle:hover { color: var(--text-2); }

.drag-handle { flex: none; display: grid; place-items: center; width: 18px; color: var(--muted); cursor: grab; opacity: 0; transition: opacity .15s; }
.drag-handle svg { width: 15px; height: 15px; }
*:hover > .drag-handle { opacity: .7; }
.no-drag .drag-handle { visibility: hidden; }
.sort-ghost { opacity: .35; }
.sort-chosen { box-shadow: var(--shadow-lg); }

/* ── 顶栏 ─────────────────────────────────────────────────── */
.topbar {
  flex: none; display: flex; align-items: center; gap: 16px;
  height: 54px; padding: 0 16px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 700; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; }
.brand-mark svg { stroke-width: 2.6; }
.ws-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.ws-dot.on { background: var(--ok); }
.topnav { display: flex; gap: 2px; margin-left: 12px; }
.topnav button { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; color: var(--text-2); font-weight: 600; }
.topnav button svg { width: 17px; height: 17px; }
.topnav button:hover { background: var(--surface-2); }
.topnav button.active { background: var(--accent-soft); color: var(--accent-strong); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.today-toggle { display: none; }
.today-toggle .count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.main { flex: 1; min-height: 0; transition: opacity .2s; }

/* ── 面板：任务列表 | 详情 | 今日便签 ─────────────────────── */
.board { display: grid; grid-template-columns: 290px minmax(0, 1fr) 320px; height: 100%; }
.board[style*="none"] { display: none; }

.mission-col, .meeting-list-col {
  overflow-y: auto; padding: 14px 12px 24px;
  border-right: 1px solid var(--border); background: var(--surface);
}
.col-head { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 10px; }
.col-head h2 { font-size: 15px; }

.mission-list { display: grid; gap: 6px; }
.mission-card {
  display: flex; gap: 4px; padding: 10px 10px 10px 4px; border-radius: 11px;
  border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s;
}
.mission-group .mission-card { padding-left: 12px; margin-bottom: 4px; }
.mission-card:hover { background: var(--surface-2); }
.mission-card.selected { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.mission-card.dim h3 { color: var(--text-2); }
.mission-card-body { flex: 1; min-width: 0; display: grid; gap: 7px; }
.mission-card-top { display: flex; align-items: center; gap: 7px; }
.mission-card h3 { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mission-card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.kind-tag { flex: none; padding: 0 5px; border-radius: 5px; font-size: 11px; font-weight: 700; line-height: 1.7; }
.kind-tag.deadline { background: var(--danger-soft); color: var(--danger); }
.kind-tag.weekly { background: var(--c-blue); color: var(--dot-blue); }

.detail-col, .meeting-editor-col { overflow-y: auto; min-width: 0; }
.detail { max-width: 860px; margin: 0 auto; padding: 18px 28px 60px; }
.detail-head { display: flex; align-items: center; gap: 8px; }
.title-input {
  flex: 1; min-width: 0; padding: 4px 8px; margin-left: -8px;
  font-size: 22px; font-weight: 700; border: 1px solid transparent; border-radius: 9px; background: transparent;
}
.title-input:hover { border-color: var(--border); }
.title-input:focus { border-color: var(--accent); background: var(--surface); }

.meta-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.field-inline { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.field-inline svg { width: 15px; height: 15px; }

.desc-input, .subtask-more textarea, .week-card textarea {
  width: 100%; resize: none; overflow: hidden; padding: 8px 10px;
  border: 1px solid transparent; border-radius: 9px; background: var(--surface-2); line-height: 1.6;
}
.desc-input { color: var(--text-2); min-height: 42px; }
.desc-input:focus, .subtask-more textarea:focus, .week-card textarea:focus { border-color: var(--accent); background: var(--surface); }

.tabs { display: flex; gap: 4px; margin: 18px 0 12px; border-bottom: 1px solid var(--border); }
.tabs button { padding: 8px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--text-2); font-weight: 600; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs .num { font-weight: 500; color: var(--muted); font-size: 12px; }

.list-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }

.subtask-list { display: grid; gap: 2px; }
.subtask { border-radius: 10px; transition: background .15s; }
.subtask:hover, .subtask.expanded { background: var(--surface); }
.subtask.expanded { box-shadow: var(--shadow); }
.subtask-row { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 6px 4px 2px; }
.subtask-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.note-mark { color: var(--muted); display: grid; }
.note-mark svg { width: 15px; height: 15px; }
.today-btn {
  flex: none; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 600;
  color: var(--muted); border: 1px dashed var(--border);
}
.today-btn:hover { color: var(--warn); border-color: var(--warn); }
.today-btn.on { color: var(--sticky-text); background: var(--sticky-bg); border: 1px solid var(--sticky-line); }
.chev { transition: transform .15s; }
.chev.open { transform: rotate(180deg); }
.subtask-more { padding: 0 10px 10px 54px; }
.subtask-more-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.subtask.done .subtask-row { padding-left: 28px; }
.done-title { flex: 1; min-width: 0; color: var(--muted); text-decoration: line-through; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.add-subtask {
  display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 6px 8px 6px 30px;
  border: 1px dashed var(--border); border-radius: 10px; color: var(--muted);
}
.add-subtask:focus-within { border-style: solid; border-color: var(--accent); background: var(--surface); }
.add-subtask input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 4px 0; }

.done-block { margin-top: 10px; }

.progress-tab { display: grid; gap: 12px; }
.week-card { padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.week-card.current { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.week-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.week-hint { margin-top: 8px; }

.meeting-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; margin-top: 6px;
  border-radius: 11px; text-align: left; transition: background .15s;
}
.meeting-item:hover { background: var(--surface-2); }
.meeting-item.selected { background: var(--accent-soft); }
.meeting-date { flex: none; width: 44px; text-align: center; font-weight: 700; color: var(--accent-strong); font-variant-numeric: tabular-nums; }
.meeting-main { flex: 1; min-width: 0; display: grid; }
.meeting-main strong, .meeting-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--border); }
.timeline li { position: relative; display: grid; gap: 1px; padding: 6px 0 10px 12px; }
.timeline li::before {
  content: ""; position: absolute; left: -20px; top: 12px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--bg);
}
.timeline li.subtask_done::before, .timeline li.mission_status::before { background: var(--ok); }
.timeline li.subtask_priority::before, .timeline li.mission_deadline::before, .timeline li.subtask_due::before { background: var(--warn); }
.timeline li.meeting::before, .timeline li.meeting_extract::before, .timeline li.progress::before { background: var(--dot-blue); }

/* ── 今日便签 ─────────────────────────────────────────────── */
.today-col { overflow-y: auto; padding: 16px 16px 24px; border-left: 1px solid var(--border); }
.today-backdrop { display: none; }
.sticky {
  padding: 16px 14px 12px; border-radius: 4px 4px 16px 4px;
  background: var(--sticky-bg); color: var(--sticky-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 10px 26px rgba(120, 100, 20, .12);
}
.sticky-head { display: flex; align-items: flex-start; justify-content: space-between; }
.sticky-head h2 { font-size: 17px; }
.sticky-head small { opacity: .7; }
.sticky-count { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sticky-meter { height: 4px; margin: 10px 0 6px; border-radius: 2px; background: var(--sticky-line); overflow: hidden; }
.sticky-meter span { display: block; height: 100%; background: var(--ok); transition: width .3s; }
.sticky-all-done { margin: 8px 0 0; padding: 6px 10px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); font-weight: 600; text-align: center; }
.sticky-list { list-style: none; margin: 4px 0 0; padding: 0; }
.sticky-list li {
  display: flex; align-items: flex-start; gap: 8px; padding: 7px 0;
  border-bottom: 1px solid var(--sticky-line);
}
.sticky-list .check { margin-top: 4px; border-color: color-mix(in srgb, var(--sticky-text) 45%, transparent); }
.sticky-list .check.on { border-color: var(--ok); }
.sticky-text { flex: 1; min-width: 0; }
.sticky-list .inline-input { width: 100%; color: var(--sticky-text); }
.sticky-list .inline-input:hover { border-color: var(--sticky-line); }
.sticky-list .inline-input:focus { background: rgba(255, 255, 255, .5); }
.sticky-list li.done .inline-input { text-decoration: line-through; opacity: .55; }
.sticky-tags { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12px; }
.sticky-tags .link { color: inherit; opacity: .7; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sticky-list .remove { opacity: 0; color: inherit; }
.sticky-list li:hover .remove { opacity: .6; }
.sticky-list .remove:hover { background: var(--sticky-line); opacity: 1; }
.sticky-add { display: flex; align-items: center; gap: 8px; padding: 9px 0 4px; opacity: .8; }
.sticky-add input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--sticky-text); }
.sticky-add input::placeholder { color: inherit; opacity: .6; }
.sticky-tip { margin: 6px 0 0; font-size: 12px; opacity: .55; }

/* ── 会议记录 ─────────────────────────────────────────────── */
.meetings { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: 100%; }
.meetings[style*="none"] { display: none; }
.meeting-editor { display: flex; flex-direction: column; height: 100%; max-width: 900px; margin: 0 auto; padding: 18px 28px 20px; }
.meeting-body {
  flex: 1; min-height: 260px; width: 100%; resize: none; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); line-height: 1.75;
}
.meeting-body:focus { border-color: var(--accent); }
.meeting-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

/* ── 统计、汇报页 ─────────────────────────────────────────── */
.page { height: 100%; overflow-y: auto; padding: 20px 28px 60px; }
.page > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
.page-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h2 { font-size: 20px; }
.week-switch { display: inline-flex; align-items: center; gap: 4px; padding: 2px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-variant-numeric: tabular-nums; }
.week-switch span { min-width: 140px; text-align: center; }

.card { padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 14px; }
.card h3 { font-size: 14px; margin-bottom: 12px; }

.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.tile { display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.tile-label { font-size: 12px; color: var(--text-2); font-weight: 600; }
.tile strong { font-size: 30px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tile.alert strong { color: var(--danger); }
.tile.warn strong { color: var(--warn); }

/* 柱状图：单组数据，标题说明含义；悬停显示数值，当前周和最高值直接标数 */
.bar-chart {
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); align-items: end;
  height: 200px; padding-top: 24px; border-bottom: 1px solid var(--border);
}
.bar-col { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; outline: none; }
.bar { width: min(36px, 60%); border-radius: 4px 4px 0 0; background: var(--chart-bar); transition: filter .15s; }
.bar-col:hover .bar, .bar-col:focus .bar { filter: brightness(1.12); }
.bar-value { margin-bottom: 4px; font-size: 12px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.bar-label { position: absolute; top: 100%; margin-top: 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar-col.current .bar-label { color: var(--text); font-weight: 600; }
.bar-tip {
  position: absolute; bottom: calc(100% - 18px); left: 50%; transform: translateX(-50%); z-index: 2;
  padding: 4px 9px; border-radius: 7px; white-space: nowrap; pointer-events: none;
  background: var(--text); color: var(--bg); font-size: 12px; opacity: 0; transition: opacity .12s;
}
.bar-col:hover .bar-tip, .bar-col:focus .bar-tip { opacity: 1; }
.data-table { margin-top: 34px; font-size: 13px; color: var(--text-2); }
.data-table summary { cursor: pointer; color: var(--muted); }
.data-table table { margin-top: 8px; border-collapse: collapse; }
.data-table td, .data-table th { padding: 3px 18px 3px 0; text-align: left; font-variant-numeric: tabular-nums; }

.mission-table { display: grid; }
.mt-row {
  display: grid; grid-template-columns: minmax(120px, 1.4fr) minmax(80px, 1fr) 54px 64px minmax(0, 1.2fr);
  align-items: center; gap: 12px; padding: 9px 6px; border-radius: 8px; text-align: left;
}
.mt-row + .mt-row { border-top: 1px solid var(--border); }
.mt-row:hover { background: var(--surface-2); }
.mt-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-badges { display: flex; gap: 4px; flex-wrap: wrap; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.two-col .card { margin-bottom: 0; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.plain-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.report-card { margin-bottom: 0; }
.report-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.report-head h3 { margin: 0; font-size: 16px; }
.report-meter { display: flex; align-items: center; gap: 10px; }
.report-meter .meter { flex: 1; }
.report-meter .num { font-size: 13px; color: var(--text-2); }
.report-progress { margin: 12px 0 0; padding: 8px 12px; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; background: var(--surface-2); white-space: pre-wrap; }
.report-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-top: 12px; }
.report-cols h4 { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.report-cols ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.report-cols li { display: flex; align-items: baseline; }
.report-cols li.ok::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: 7px; }

/* 演示模式 */
.present { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; background: var(--bg); }
.present-top { display: flex; align-items: center; gap: 12px; padding: 14px 28px; color: var(--muted); font-weight: 600; }
.present-body { flex: 1; overflow-y: auto; width: min(1100px, 100%); margin: 0 auto; padding: 20px 40px; font-size: 18px; }
.present-body h1 { font-size: 36px; margin-right: 8px; }
.present-body .report-head { margin-bottom: 22px; }
.present-body .report-meter .num { font-size: 20px; font-weight: 700; color: var(--text); }
.report-progress.big { margin-top: 24px; padding: 14px 18px; font-size: 19px; }
.present-body .report-cols { margin-top: 28px; gap: 32px; }
.present-body .report-cols h4 { font-size: 17px; }
.present-body .report-cols ul { gap: 9px; }
.present-nav { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 14px; }

/* ── 弹窗、提示 ───────────────────────────────────────────── */
.modal-backdrop, .token-modal {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: var(--overlay);
}
.token-modal { display: none; z-index: 100; }
.modal { display: grid; gap: 12px; width: min(400px, 100%); padding: 20px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg); }
.modal h2 { font-size: 17px; }
.modal p { margin: 0; }
.modal-foot { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--text-2); }

.toasts {
  position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
  width: min(440px, calc(100% - 32px));
}
.toast {
  display: flex; align-items: center; gap: 12px; pointer-events: auto;
  padding: 9px 10px 9px 16px; border-radius: 12px; max-width: 100%;
  background: #2b2d31; color: #f3f3f4; box-shadow: var(--shadow-lg);
}
.toast.err { background: #b3383c; }
.toast-action { padding: 4px 10px; border-radius: 8px; color: #ffc65c; font-weight: 700; flex: none; }
.toast-action:hover { background: rgba(255, 255, 255, .1); }

.tabbar { display: none; }

/* ── 中等宽度：今日便签收进右侧抽屉 ───────────────────────── */
@media (max-width: 1279px) {
  .board { grid-template-columns: 270px minmax(0, 1fr); }
  .today-toggle { display: inline-flex; }
  .today-col {
    position: fixed; z-index: 50; top: 54px; right: 0; bottom: 0; width: min(360px, 92vw);
    background: var(--bg); box-shadow: var(--shadow-lg);
    transform: translateX(105%); visibility: hidden; transition: transform .22s ease, visibility .22s;
  }
  .today-col.open { transform: none; visibility: visible; }
  .today-backdrop { display: block; position: fixed; inset: 54px 0 0; z-index: 49; background: var(--overlay); }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ── 手机：单栏 + 底部导航 ─────────────────────────────────── */
@media (max-width: 899px) {
  .mobile-only { display: inline-grid !important; }
  .topnav, .today-toggle { display: none !important; }
  .topbar { height: 50px; }
  .main { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }

  .board, .meetings { display: block; }
  .board > *, .meetings > * { display: none; }
  .board.pane-list .mission-col,
  .board.pane-detail .detail-col,
  .meetings:not(.has-draft) .meeting-list-col,
  .meetings.has-draft .meeting-editor-col { display: block; height: 100%; border: 0; }
  .board.pane-today .today-col {
    display: block; position: static; transform: none; visibility: visible; width: auto; height: 100%;
    box-shadow: none; border: 0; background: transparent;
  }
  .today-backdrop { display: none !important; }

  .detail, .meeting-editor { padding: 12px 16px 40px; }
  .title-input { font-size: 19px; }
  .drag-handle { opacity: .5; }
  .subtask-row { flex-wrap: wrap; row-gap: 2px; }
  .subtask-row .inline-input { flex-basis: calc(100% - 60px); }
  .subtask-tools { flex-basis: 100%; padding-left: 52px; }
  .subtask-more { padding-left: 12px; }
  .sticky-list .remove { opacity: .5; }

  .page { padding: 14px 16px 40px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: 1fr; }
  .mt-row { grid-template-columns: minmax(0, 1fr) 70px 44px; }
  .mt-row > :nth-child(4), .mt-row .mt-badges { display: none; }
  .report-grid { grid-template-columns: 1fr; }
  .week-switch span { min-width: 120px; }
  .present-body { padding: 10px 18px; font-size: 16px; }
  .present-body h1 { font-size: 24px; }

  .tabbar {
    position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    display: grid; grid-template-columns: repeat(5, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface); border-top: 1px solid var(--border);
  }
  .tabbar button { display: grid; justify-items: center; gap: 2px; padding: 7px 0 6px; font-size: 11px; color: var(--muted); }
  .tabbar button svg { width: 21px; height: 21px; }
  .tabbar button.active { color: var(--accent-strong); font-weight: 600; }
  .toasts { bottom: calc(72px + env(safe-area-inset-bottom)); }
}

@media (hover: none) {
  .drag-handle { opacity: .5; }
}

/* ── 右上角菜单、确认框、使用说明 ─────────────────────────── */
.menu-wrap { position: relative; }
.menu {
  position: absolute; z-index: 70; top: calc(100% + 6px); right: 0;
  display: grid; width: 240px; padding: 6px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.menu > button {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  text-align: left; font-size: 14px;
}
.menu > button svg { width: 17px; height: 17px; color: var(--text-2); }
.menu > button:hover:not(:disabled) { background: var(--surface-2); }
.menu > button.danger, .menu > button.danger svg { color: var(--danger); }
.menu-foot {
  display: grid; gap: 2px; margin-top: 4px; padding: 8px 10px 4px;
  border-top: 1px solid var(--border); font-size: 12px; color: var(--muted);
}
.menu-path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn.danger-solid, .btn.danger-solid:hover:not(:disabled) { background: var(--danger); color: #fff; }
.btn.danger-solid:hover:not(:disabled) { filter: brightness(1.08); }

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

.modal.help { width: min(620px, 100%); max-height: 86vh; padding: 0; gap: 0; overflow: hidden; display: flex; flex-direction: column; }
.help-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px 20px; }
.help-body { overflow-y: auto; padding: 0 20px 20px; }
.help-body h3 { margin: 14px 0 6px; font-size: 14px; }
.help-body ul { margin: 0; padding-left: 18px; display: grid; gap: 5px; color: var(--text-2); }
