@import url("/static/css/ui-kit.css");

/* ============================================================
   AQ助手V2 - 通用视觉升级层（common.css）
   在 style.css 之后加载，页面私有 <style> 仍可覆盖本文件。
   纯增量：删除本文件与对应 <link> 即可整体回滚视觉升级。
   ============================================================ */

/* ---------- 设计基调：柔和渐变背景 + 精致卡片 ---------- */
:root {
  --bg: #f4f6fb;
  --bg-gradient: radial-gradient(1200px 500px at 80% -10%, #e8f0fe 0%, transparent 60%),
                 radial-gradient(900px 400px at -10% 20%, #eef7f0 0%, transparent 55%),
                 #f4f6fb;
  --card-bg: #ffffff;
  --text: #243044;
  --text-secondary: #5b6b80;
  --text-muted: #93a1b3;
  --border: #e4e9f2;
  --border-light: #edf1f7;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(36, 48, 68, .05), 0 1px 6px rgba(36, 48, 68, .05);
  --shadow: 0 2px 8px rgba(36, 48, 68, .07), 0 4px 16px rgba(36, 48, 68, .06);
  --shadow-lg: 0 8px 30px rgba(36, 48, 68, .16);
}

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg-gradient);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: rgba(79, 142, 247, .18); }

/* 键盘可达性焦点 */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid rgba(79, 142, 247, .55);
  outline-offset: 1px;
}

/* ---------- 页面容器（index/records/daily 等使用 .page） ---------- */
.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 16px 24px;
}

.page-title {
  font-size: 22px;
  letter-spacing: .2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (min-width: 769px) {
  .page { padding: 24px 28px 32px; }
  .page-title { font-size: 26px; }
}

/* ---------- 顶部导航：轻玻璃质感 ---------- */
.topnav {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.topnav .nav-links a { border-radius: 999px; }

.topnav .nav-links a.active { box-shadow: 0 2px 8px rgba(79, 142, 247, .35); }

/* ---------- 手机底部导航 ----------
   1.28.0 / T2-02：移动端规则统一收敛到文件末尾「移动端响应式体系」§B。 */

/* ---------- 按钮：圆角与过渡升级 ---------- */
.btn {
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 2px rgba(36, 48, 68, .06);
  transition: background .15s, box-shadow .15s, transform .05s, border-color .15s, color .15s;
}

.btn:hover:not(:disabled) { box-shadow: 0 2px 8px rgba(36, 48, 68, .12); }

.btn-primary { background: linear-gradient(135deg, #5c9bff 0%, var(--primary) 60%, var(--primary-dark) 100%); border: none; }
.btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, #6da5ff 0%, #4a86f2 60%, #3568cc 100%); }

.btn-light, .btn-secondary {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-light:hover:not(:disabled), .btn-secondary:hover:not(:disabled) {
  background: var(--primary-light);
  border-color: #c7dbfc;
  color: var(--primary);
}

/* personal.html 等使用 .btn.primary/.danger/.small 短类名 */
.btn.primary { background: var(--primary); color: #fff; border: none; }
.btn.primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn.danger { background: var(--danger); color: #fff; border: none; }
.btn.danger:hover:not(:disabled) { background: #c93e37; }
.btn.small { padding: 3px 10px; font-size: 12px; }

/* ---------- 卡片 ---------- */
.card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s;
}

.card:hover { box-shadow: var(--shadow); }

/* ---------- 表单控件 ---------- */
input, select, textarea {
  border-radius: var(--radius-sm);
  background: #fbfcfe;
}
input:hover, select:hover, textarea:hover { border-color: #cfd9e8; }
input:focus, select:focus, textarea:focus { background: #fff; }

/* ---------- 徽标与标签 ---------- */
.badge { font-weight: 500; }

.tag { border-radius: 6px; }

/* ---------- 模态框 ---------- */
.modal-mask { background: rgba(23, 32, 46, .5); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.modal-dialog { border-radius: var(--radius-lg); }
.modal-header { background: linear-gradient(180deg, #fbfcff 0%, #f6f8fc 100%); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }

/* ---------- Toast ---------- */
.toast { border-left: 3px solid var(--primary); }
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }

/* ============================================================
   工作台（personal.html）等页共享、此前缺失的基础类
   ============================================================ */
.hidden { display: none !important; }
.muted { color: var(--text-muted); }
.small { font-size: 12px; }
.overdue { color: var(--danger); font-weight: 600; }
.line-through, .done-line { text-decoration: line-through; color: var(--text-muted); }

.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.pane-head h2 { font-size: 19px; }

.pane-head select, .pane-head input[type="date"], .pane-head input:not([type]) { width: auto; }

.row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }

.card-list { display: flex; flex-direction: column; gap: 12px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 14px;
  margin: 8px 0;
}
.form-grid label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }

.tag-row { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.quad-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }

/* 待办/备忘条目 */
.todo-main { display: flex; gap: 10px; align-items: flex-start; }
.todo-main input[type="checkbox"] { margin-top: 4px; flex-shrink: 0; width: 16px; height: 16px; }
.todo-body { flex: 1; min-width: 0; }
.todo-item.done .todo-body, .memo-item.done .todo-body { opacity: .75; }
.subtask-box { margin-top: 6px; }

/* 灵感看板 */
.stage-board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.stage-col { flex: 0 0 270px; background: #f7f9fc; border: 1px solid var(--border-light); border-radius: var(--radius); padding: 10px; }
.stage-head { font-weight: 600; font-size: 13px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.idea-card { margin-bottom: 10px; }
.idea-title { font-weight: 600; font-size: 14px; }
.idea-card label.small { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.idea-card select { padding: 3px 6px; font-size: 12px; width: auto; }

/* 指标卡（周回顾） */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 14px; }
.metric-card { background: var(--card-bg); border: 1px solid var(--border-light); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 14px; text-align: center; font-size: 13px; color: var(--text-secondary); }
.metric-num { font-size: 26px; font-weight: 700; color: var(--text); }
.metric-num.ok { color: var(--success); }
.metric-num.warn { color: var(--warning); }
.metric-num.danger { color: var(--danger); }
.review-line { padding: 5px 0; border-bottom: 1px dashed var(--border-light); font-size: 13px; }
.review-line:last-child { border-bottom: none; }

/* 表格输入（决策日志复盘备注等） */
.table-input { width: 100%; min-width: 120px; }

/* 时间线条目 */
.timeline-item { position: relative; }

/* 折叠区块 */
.collapsible-header { border-radius: var(--radius-sm); }

/* ============================================================
   移动端兜底（375px 不横向滚动、按钮易点）
   1.28.0 / T2-02：规则统一收敛到「移动端响应式体系」§B/§C/§D。
   ============================================================ */

/* 尊重系统的减少动效设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============================================================
   移动端触控与刘海适配（PWA / 手机浏览器打磨）
   ============================================================ */

/* 横滑容器顺滑滚动（表格、看板） */
.table-wrap, .table-scroll, .table-responsive, .stage-board, .topnav .nav-links, .tabs,
div[style*="overflow-x"] { -webkit-overflow-scrolling: touch; }

/* 1.8.8 移动端表格响应式规范：容器只横滑，表格不撑破页面 */
.table-responsive {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
}
.table-responsive > table { min-width: max-content; width: 100%; }
.table-responsive th, .table-responsive td,
.table-wrap th, .table-wrap td,
.table-scroll th, .table-scroll td,
div[style*="overflow-x"] th, div[style*="overflow-x"] td {
  white-space: nowrap;
}
/* 移动端隐藏次要列 / iOS 聚焦不放大 / 触控目标 / 刘海安全区 / 超窄屏
   1.28.0 / T2-02：分别并入「移动端响应式体系」§B（≤768）、§C（≤480）、
   §D（≤320）、§E（pointer: coarse），此处不再保留散装断点。 */

/* ============================================================
   折叠屏断点体系：≤480 手机单屏 / 481-768 大手机 / 769-1024 折叠展开·小平板 / ≥1025 桌面
   ============================================================ */

/* 底部导航触屏限宽
   1.28.0 / T2-02：并入「移动端响应式体系」§B。 */

/* 折叠展开态（700-1024）：字号保持手机大小不放大，仅拉开纵向节奏 */
@media (min-width: 700px) and (max-width: 1024px) {
  .container { max-width: 960px; }
  .card { padding: 18px 20px; }
}

/* ============================================================
   表格转卡片（窄屏 <700px，折叠展开态恢复表格）
   原理：app.js autoLabelTables() 已把 thead 文本写入 td[data-label]，
   此处把表格拆成纵向卡片：每行 = 一张卡，单元格 = label:value 两行。
   ============================================================ */

/* ============================================================
   弹窗窄屏修复：内容超高时 body 收缩内部滚动，确定/取消键固定可见
   根因：.modal-body 是 flex:1 但 min-height 默认 auto，内容超过
   max-height 时 flex 子项不收缩，body 把 dialog 撑破，footer 被
   推出视口（手机端「确定」键看不到）。补 min-height:0 即可收缩。
   ============================================================ */
.modal-dialog { min-height: 0; }
.modal-header { flex-shrink: 0; }
.modal-body { min-height: 0; overscroll-behavior: contain; }
.modal-footer { flex-shrink: 0; }

/* 1.28.0 / T2-02：抽屉态最大高度与遮罩层级并入「移动端响应式体系」§B/§C。 */

/* ============================================================
   第11轮 UI 精致度升级（纯增量：删除本段即可整体回滚）
   原则：浅色渐变保可读性；动效仅在精确指针（桌面）启用；
   尊重 prefers-reduced-motion（上文已全局降级动效时长）。
   ============================================================ */

/* ---------- 2. 表格渐变表头（135° 蓝渐变 + 白字 + 底部高光边框） ----------
   页面私有样式里常见的浅色 th 用 !important 统一压过；窄屏表头本就隐藏不受影响 */
table thead th {
  background: linear-gradient(135deg, #4f8ef7 0%, #3a74d8 100%) !important;
  color: #fff !important;
  border-bottom: 2px solid rgba(255, 255, 255, .35) !important;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .18);
}

/* ---------- 3. 卡片 hover 微浮起（仅桌面精确指针；过渡曲线统一） ---------- */
@media (pointer: fine) {
  .task-card, .todo-line, .rec-card, .idea-card, .memo-item, .todo-item, .inbox-item {
    transition: transform .15s cubic-bezier(.2, .8, .2, 1),
                box-shadow .15s cubic-bezier(.2, .8, .2, 1),
                background .15s !important;
  }
  .task-card:hover, .todo-line:hover, .rec-card:hover,
  .idea-card:hover, .memo-item:hover, .todo-item:hover, .inbox-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(36, 48, 68, .12);
  }
}

/* ---------- 4. 按钮 active 按压感 ---------- */
.btn:active:not(:disabled) { transform: scale(.97); }

/* ---------- 5. 弹窗弹入动画（缩放 0.96→1 + 上移 8px，0.18s） ----------
   关闭动画（.closing）沿用 style.css，此处不动 */
.modal-mask:not(.closing) { animation: fadeIn .18s ease; }
.modal-mask:not(.closing) .modal-dialog { animation: modalPop .18s cubic-bezier(.2, .8, .2, 1); }
@keyframes modalPop {
  from { opacity: 0; transform: translateY(8px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 6. 顶栏渐变 logo 徽章（app.js renderNav 输出 .logo-badge/.logo-text） ---------- */
.topnav .logo { display: inline-flex; align-items: center; gap: 8px; }
.topnav .logo::before { content: none; } /* 替换 style.css 的旧 📋 前缀 */
.topnav .logo-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, #5c9bff 0%, #4f8ef7 55%, #2fbf71 135%);
  color: #fff; font-size: 14px; font-weight: 700; line-height: 1;
  box-shadow: 0 2px 6px rgba(79, 142, 247, .4);
}
/* 渐变文字：background-clip:text，不支持的浏览器降级纯色 */
.topnav .logo-text {
  background: linear-gradient(120deg, #4f8ef7 15%, #3a74d8 60%, #2fbf71 115%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .topnav .logo-text { background: none; color: var(--primary); }
}

/* ---------- 7. 空状态统一居中（灰字居中，配合各页 emoji/提示语） ---------- */
.empty, .empty-tip { text-align: center; }

/* ============================================================
   第十二批：呼吸感减压层（纯增量：删除本段即可整体回滚）
   目标：驾驶舱首页 / 每日待办 / 任务看板 / 共用详情弹窗 / 底部导航
   更透气——卡片内边距与块间距加大、标题与正文对比拉开、
   次要信息（时间/徽标）减淡、时间线加行距与分隔、操作区不拥挤。
   只动视觉：不改任何 data-* 属性与 JS 依赖的类名/结构。
   ============================================================ */

/* ---------- 1. 卡片列表/网格：块间距 12 → 16 ---------- */
.card-list { gap: 16px; }
.card-grid { gap: 16px; }

/* ---------- 2. 卡片内边距：桌面 22/24，折叠展开态 20/22（≤768 手机保持原紧凑度） ---------- */
@media (min-width: 1025px) {
  .card { padding: 22px 24px; }
}
@media (min-width: 700px) and (max-width: 1024px) {
  .card { padding: 20px 22px; }
}

/* ---------- 3. 标题/正文对比：区块标题加粗，卡片正文行距放松 ---------- */
.pane-head h2 { font-size: 20px; font-weight: 700; }
.section-title { font-weight: 700; letter-spacing: .01em; }
.card-title { font-weight: 700; }
@media (min-width: 700px) {
  .card { line-height: 1.6; }
}

/* ---------- 4. 次要信息减淡：徽标字号归一、时间类信息不加粗 ---------- */
/* 1.24.0：单标签不折行、不参与 flex 压缩（顶部 Chips 容器统一 flex-wrap + gap 8） */
.badge { font-size: 12px; font-weight: 500; letter-spacing: .02em; white-space: nowrap; flex: 0 0 auto; }
.timeline-item .muted, .tl-time { font-weight: 400; }

/* ---------- 4b. 💬 跟进徽标（第十五批任务1）：视觉次于一档的浅色系徽标 ----------
   主徽标 🧩 用 .badge（12px），跟进徽标用 11px + 浅灰绿底，点击可展开详情弹窗 */
:root {
  --fu-badge-fs: 11px;          /* 跟进徽标字号：比主徽标小一档 */
  --fu-badge-bg: #f2f6f2;       /* 浅灰绿底 */
  --fu-badge-color: #6b8f6b;    /* 浅灰绿字 */
  --fu-badge-radius: 8px;
}
.fu-badge {
  display: inline-flex;
  align-items: center;
  font-size: var(--fu-badge-fs);
  line-height: 1.5;
  padding: 0 6px;
  margin-left: 4px;
  border-radius: var(--fu-badge-radius);
  background: var(--fu-badge-bg);
  color: var(--fu-badge-color);
  cursor: pointer;
  vertical-align: middle;
  white-space: nowrap;
}
.fu-badge:hover { filter: brightness(0.95); }

/* ---------- 4c. 统一按钮规格（第十五批任务3：用户点名「不要一个按钮大一个按钮小」） ----------
   .btn-icon-40：40×40 圆角方块图标按钮（📷/🔗 等输入区入口），字号/圆角全部走变量 */
:root {
  --btn-icon-size: 40px;        /* 图标按钮统一边长 */
  --btn-icon-radius: 10px;      /* 统一圆角 */
  --btn-icon-bg: #f2f4f8;       /* 中性浅底 */
  --btn-icon-color: #55617a;    /* 中性图标色 */
  --btn-icon-font: 18px;        /* 图标字号 */
}
.btn-icon-40 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--btn-icon-size);
  height: var(--btn-icon-size);
  min-width: var(--btn-icon-size);
  border-radius: var(--btn-icon-radius);
  background: var(--btn-icon-bg);
  color: var(--btn-icon-color);
  font-size: var(--btn-icon-font);
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  padding: 0;
  flex: none;
  vertical-align: middle;
  user-select: none;
}
.btn-icon-40:hover { background: #e8ecf3; }
.btn-icon-40 input[type="file"] { display: none; }

/* ---------- 5. 时间线条目：行内边距 + 虚线分隔（最后一行不收口线） ---------- */
.timeline-item { padding: 10px 2px; border-bottom: 1px dashed var(--border-light, #eceff5); }
.timeline-item:last-child { border-bottom: none; }

/* ---------- 6. 操作区不拥挤：按钮间距拉开、触控高度 ≥40px ---------- */
.row-actions { gap: 10px; margin-top: 14px; }
.row-actions .btn { min-height: 40px; }
/* 1.24.4：底部操作栏两排网格（允许换行；单排/两排由 style.css 的 flex-basis 决定） */
.modal-footer { flex-wrap: wrap; row-gap: 8px; }

/* ---------- 8. 跟进时间线「编辑/删除」小按钮（第十二批任务1配套样式） ---------- */
.fu-item { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.fu-item .fu-note { flex: 1 1 100%; font-size: 13px; line-height: 1.5; word-break: break-word; }
.fu-item .fu-meta { flex: 1 1 auto; min-width: 0; font-size: 12px; }
/* 1.19.0：轻量文字按钮，去掉笨重边框，和正文留出呼吸感 */
.fu-actions { display: flex; gap: 4px; margin-left: auto; flex-shrink: 0; align-items: center; }
.fu-btn {
  min-height: 30px; padding: 2px 8px; margin-left: 6px;
  font-size: 12px; line-height: 1.6; cursor: pointer;
  color: var(--text-secondary, #667085);
  border: 0; background: transparent; border-radius: 6px;
  flex: 0 0 auto; white-space: nowrap;
}
.fu-btn:hover { background: #eef2f8; color: #334155; }
.fu-btn-danger { color: var(--danger, #e5534b); border: 0; background: transparent; }
.fu-btn-danger:hover { background: #fdf1f0; }
.fu-item .fu-meta { margin-top: 4px; }

/* 行内编辑表单 */
.fu-edit-form { display: flex; flex-direction: column; gap: 6px; flex: 1 1 100%; min-width: 0; }
.fu-edit-form textarea, .fu-edit-form input { width: 100%; box-sizing: border-box; }
.fu-edit-row { display: flex; gap: 6px; flex-wrap: wrap; }
.fu-edit-row .btn { min-height: 40px; }

/* 1.22.0：跟进统一组件 —— 历史列表 + 多行文本域 + 添加按钮（全站同一套） */
.fu-composer { margin-top: 8px; }
.fu-composer textarea {
  width: 100%; box-sizing: border-box; min-height: 88px; padding: 9px 10px;
  border: 1.5px solid #d9dce4; border-radius: 10px; font-size: 13px;
  line-height: 1.7; resize: vertical; background: #fff; color: #243044;
}
.fu-composer textarea:focus { outline: none; border-color: #7aa7f0; box-shadow: 0 0 0 3px rgba(79,142,247,.12); }
.fu-composer-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.fu-composer-acts .btn { white-space: nowrap; }

/* ICP 备案号页脚（法规要求：全站展示并链接工信部备案页） */
.icp-footer{padding:14px 0 18px;text-align:center;font-size:12px;color:#98a2b3;line-height:1.6}
.icp-footer a{color:#98a2b3;text-decoration:none}
.icp-footer a:hover{color:#667085;text-decoration:underline}

/* ICP 页脚吸底（2026-10-16）：短内容页（登录页等）页脚贴视口底部，不再悬在半空 */
body { min-height: 100dvh; display: flex; flex-direction: column; }
.icp-footer { margin-top: auto; }

/* ============================================================================
   1.27.0 / P1-11 前端分级 UI（普通 / 敏感 / 高敏）
   - 只在分级控件与 🔒 徽标上生效；normal 记录视觉与 P0 完全一致。
   - 全部控件 flex-wrap + 盒模型收敛，375px 宽度不溢出。
   ============================================================================ */
.aq-level-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 10px 0;
  padding: 8px 10px;
  border: 1px solid #e6e8ee;
  border-radius: 8px;
  background: #fafbfd;
  font-size: 13px;
  max-width: 100%;
  box-sizing: border-box;
}
.aq-level-row > label {
  width: auto;
  flex: 0 0 auto;
  color: #556;
  white-space: nowrap;
}
.aq-level-row > select {
  flex: 0 1 150px;
  min-width: 0;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid #d9dce4;
  border-radius: 6px;
  background: #fff;
  box-sizing: border-box;
}
.aq-level-row > select:disabled {
  background: #f1f3f7;
  color: #8a90a0;
}
.aq-level-hint {
  flex: 1 1 180px;
  min-width: 0;
  color: #8a90a0;
  font-size: 11.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.aq-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 1.4;
  padding: 1px 7px;
  border-radius: 999px;
  background: #fdecec;
  color: #b42318;
  border: 1px solid #f7c9c4;
  white-space: nowrap;
  vertical-align: middle;
}
.aq-level-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  width: 100%;
  min-width: 0;
  margin-top: 2px;
}
.aq-level-fields > label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: auto;
  flex: 0 1 auto;
  margin: 0;
  font-size: 12.5px;
  color: #445;
  white-space: nowrap;
}
.aq-level-fields input[type="checkbox"] {
  width: auto;
  height: auto;
  margin: 0;
  flex: 0 0 auto;
}
.aq-level-fields input[type="text"],
.aq-level-fields input[type="password"] {
  flex: 1 1 140px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid #d9dce4;
  border-radius: 6px;
  box-sizing: border-box;
}
.aq-enc-field {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.aq-enc-field > label {
  flex: 0 0 62px;
  color: #667;
  font-size: 12px;
  white-space: nowrap;
}
.aq-level-locked {
  background: #fff8f0;
  border-color: #f0d9c0;
}

/* ============================================================================
   1.28.0 / T2-02 移动端响应式体系（三档断点 · 唯一事实源）
   ----------------------------------------------------------------------------
   只允许三档断点，禁止再写 380/400/420/640/680/699/700/767 这类散装值：
     §B  ≤768px   移动端总档（手机 + 平板竖屏；≥769px 视为桌面）
     §C  ≤480px   手机竖屏（单列表单、全屏弹窗、44px 触控按钮）
     §D  ≤320px   超窄屏兜底（iPhone SE 1 代 / 小屏安卓）
   统一口径：
     - 按钮：≤768 主按钮 40px / 次按钮 34px；≤480 主按钮 44px（触控最小目标）；
       行内密集动作（.rp-acts/.fu-actions/.sp-chip/.subtask-*）保留 28-32px 紧凑尺寸；
     - 间距：页面左右 16→14→12，卡片内边距 16→14→12，块间距 16→12；
     - 字号：标题 22→20→18，区块标题 20→18→16，正文 13，次要 12，徽标 11；
       输入控件 ≤768 统一 16px（防 iOS 聚焦自动放大）；
     - 弹窗：≤768 底部抽屉（最大 88vh，遮罩 z-index 1200 盖住底栏），
       ≤480 全屏；底部按钮 ≤480 两列等宽、始终在视口内；
     - 表格：≤768 一律转纵向卡片（thead 隐藏 + td[data-label] 左标签右值），
       容器不再横向滚动；`table-responsive` 仍保留横滑能力给未转卡的表格；
     - 手机 UA 路径：华为等浏览器可能报告桌面级 CSS 宽度，app.js 会给 <html>
       加 .mobile-shell；§G 提供与 ≤768 等效的 UA 路径（宽视口也不得错乱）。
   回滚：删除本节 + 恢复 legacy/ 下页面快照即可回到 1.27.0 的散装移动端样式
   （旧 common.css 见 artifacts/p2/T2-02/legacy/common.css.bak）。
   ============================================================================ */

/* ---------- §A 设计令牌（桌面基线；三档在各自断点内覆写） ---------- */
:root {
  --m-page-pad-x: 16px;      /* 页面左右内边距 */
  --m-page-pad-y: 18px;      /* 页面顶部内边距 */
  --m-page-pad-b: 24px;      /* 页面底部内边距 */
  --m-card-pad: 16px;        /* 卡片内边距 */
  --m-block-gap: 16px;       /* 卡片/列表块间距 */
  --m-btn-h: 38px;           /* 主按钮最小高度 */
  --m-btn-sm-h: 32px;        /* 次按钮最小高度 */
  --m-btn-fs: 14px;          /* 主按钮字号 */
  --m-btn-sm-fs: 12px;       /* 次按钮/徽标字号 */
  --m-fs-title: 22px;        /* 页面标题 */
  --m-fs-h2: 20px;           /* 区块标题 */
  --m-fs-card-title: 16px;   /* 卡片标题 */
  --m-fs-body: 13px;         /* 正文 */
  --m-fs-meta: 12px;         /* 次要信息 */
  --m-fs-badge: 11px;        /* 徽标 */
  --m-input-fs: 14px;        /* 表单控件字号 */
  --m-modal-max-h: 85vh;     /* 弹窗最大高度 */
  --m-modal-radius: var(--radius-lg);
}

/* ============================================================================
   §B ≤768px：移动端总档
   ============================================================================ */
@media (max-width: 768px) {
  :root {
    --m-page-pad-x: 14px;
    --m-page-pad-y: 14px;
    --m-page-pad-b: 20px;
    --m-card-pad: 14px;
    --m-block-gap: 16px;
    --m-btn-h: 40px;
    --m-btn-sm-h: 34px;
    --m-btn-fs: 14px;
    --m-btn-sm-fs: 12px;
    --m-fs-title: 20px;
    --m-fs-h2: 18px;
    --m-fs-card-title: 15px;
    --m-input-fs: 16px;
    --m-modal-max-h: 88vh;
  }

  /* ---------- 1. 页面容器与纵向节奏 ---------- */
  .page {
    padding: var(--m-page-pad-y) var(--m-page-pad-x) var(--m-page-pad-b);
  }
  .container {
    max-width: 100%;
    padding: var(--m-page-pad-y) var(--m-page-pad-x) var(--m-page-pad-b);
  }
  .page-title { font-size: var(--m-fs-title); }
  .page-header h1 { font-size: var(--m-fs-title); }
  .pane-head { margin-bottom: 10px; gap: 8px; }
  .pane-head h2 { font-size: var(--m-fs-h2); font-weight: 700; }
  .section-title { font-size: var(--m-fs-h2); font-weight: 700; }
  .card-title { font-size: var(--m-fs-card-title); }
  .card { padding: var(--m-card-pad); margin-bottom: 12px; }
  .card-list, .card-grid { gap: var(--m-block-gap); }
  .row-actions { gap: 8px; margin-top: 10px; }

  /* ---------- 2. 按钮：统一尺寸（主 40 / 次 34 / 行内 36） ---------- */
  .btn {
    min-height: var(--m-btn-h);
    padding: 8px 14px;
    font-size: var(--m-btn-fs);
  }
  .btn-sm {
    min-height: var(--m-btn-sm-h);
    padding: 4px 10px;
    font-size: var(--m-btn-sm-fs);
  }
  .btn-link { min-height: var(--m-btn-sm-h); }
  .btn-icon-40 {
    width: var(--m-btn-h);
    height: var(--m-btn-h);
    min-width: var(--m-btn-h);
  }
  .row-actions .btn { min-height: 36px; }
  .modal-footer .btn, .action-bar .btn { height: auto; min-height: var(--m-btn-h); }
  .tabs .tab { padding: 9px 16px; }

  /* ---------- 3. 字号与表单控件（iOS 聚焦不放大） ----------
     行内写死 13/14px 的搜索框/粘贴框（历史遗留）也在移动端统一到 16px：
     用 !important 才能压过 style="font-size:13px"；桌面端不受影响。 */
  html body :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]) {
    font-size: var(--m-input-fs) !important;
  }
  .badge { font-size: var(--m-btn-sm-fs); }
  table { font-size: var(--m-fs-body); }

  /* ---------- 4. 表格：容器只横滑 + 窄屏转纵向卡片 ---------- */
  .table-wrap, .table-scroll, .table-responsive, .stage-board,
  .topnav .nav-links, .tabs, div[style*="overflow-x"] {
    -webkit-overflow-scrolling: touch;
  }
  .d-none.d-md-table-cell { display: none !important; }

  .table-wrap, .table-scroll, .users-table-wrap,
  div[style*="overflow-x"] { overflow-x: visible !important; }

  .table-wrap table.table,
  .table-scroll table.task-table,
  .users-table-wrap table.users-table,
  table.set-table,
  table.data-table,
  table.detail-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: separate !important;
    background: transparent !important;
  }
  .table-wrap table.table thead,
  .table-scroll table.task-table thead,
  .users-table-wrap table.users-table thead,
  table.set-table thead,
  table.data-table thead,
  table.detail-table thead { display: none !important; }
  .table-wrap table.table tbody,
  .table-scroll table.task-table tbody,
  .users-table-wrap table.users-table tbody,
  table.set-table tbody,
  table.data-table tbody,
  table.detail-table tbody { display: block !important; }

  .table-wrap table.table tbody tr,
  .table-scroll table.task-table tbody tr,
  .users-table-wrap table.users-table tbody tr,
  table.set-table tbody tr,
  table.data-table tbody tr,
  table.detail-table tbody tr {
    display: block !important;
    background: var(--card-bg) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-sm);
    margin-bottom: 10px !important;
    padding: 2px 0;
  }
  /* 卡片内单元格：label 左、value 右 */
  .table-wrap table.table tbody td,
  .table-scroll table.task-table tbody td,
  .users-table-wrap table.users-table tbody td,
  table.set-table tbody td,
  table.data-table tbody td,
  table.detail-table tbody td {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border: none !important;
    padding: 8px 14px !important;
    font-size: var(--m-fs-body);
    min-height: 38px;
    min-width: 0;
    word-break: break-word;
  }
  .table-wrap table.table tbody td + td,
  .table-scroll table.task-table tbody td + td,
  .users-table-wrap table.users-table tbody td + td,
  table.set-table tbody td + td,
  table.data-table tbody td + td,
  table.detail-table tbody td + td {
    border-top: 1px dashed var(--border-light) !important;
  }
  .table-wrap table.table tbody td::before,
  .table-scroll table.task-table tbody td::before,
  .users-table-wrap table.users-table tbody td::before,
  table.set-table tbody td::before,
  table.data-table tbody td::before,
  table.detail-table tbody td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: var(--m-fs-meta);
    flex-shrink: 0;
    min-width: 56px;
  }
  /* 单元格内控件不被压缩 */
  .table-wrap table.table tbody td > *,
  .table-scroll table.task-table tbody td > *,
  .users-table-wrap table.users-table tbody td > * { min-width: 0; max-width: 100%; }
  .table-scroll table.task-table tbody td select,
  .users-table-wrap table.users-table tbody td input,
  .users-table-wrap table.users-table tbody td select { width: auto; max-width: 65%; }
  .users-table-wrap table.users-table tbody td:last-child .btn { width: 100%; min-height: var(--m-btn-h); }
  /* 整行卡片可点击的模板列表：点击热区保持整卡 */
  table.set-table tbody tr.tpl-item { cursor: pointer; }

  /* ---------- 5. 通用表单网格：避免 auto-fit 在 768 挤成 4 列 ---------- */
  html body .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }

  /* ---------- 6. 弹窗：底部抽屉（footer 永远可见） ---------- */
  .modal-dialog { max-width: 100%; max-height: var(--m-modal-max-h); border-radius: var(--m-modal-radius) var(--m-modal-radius) 0 0; }
  .modal-mask { align-items: flex-end; padding: 0; z-index: 1200; }
  .modal-footer { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0)); }

  /* ---------- 7. 底部导航与安全区 ---------- */
  body {
    display: block;
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: calc(var(--nav-bottom-height) + env(safe-area-inset-bottom, 0) + 8px);
  }
  .icp-footer { margin-top: 0; }
  .bottomnav { flex: none; width: 100%; margin: 0; padding-top: 4px; }
  .bottomnav-row { max-width: 1040px; margin: 0 auto; }
  .bottomnav a { min-height: 44px; max-width: 130px; margin: 0 auto; width: 100%; }
  .bottomnav a.active { position: relative; }
  .bottomnav a.active::before {
    content: "";
    position: absolute;
    top: 0;
    width: 20px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--primary);
  }

  /* ---------- 8. 看板/横向卡片列宽 ---------- */
  .stage-col { flex-basis: 240px; }
}

/* ============================================================================
   §C ≤480px：手机竖屏
   ============================================================================ */
@media (max-width: 480px) {
  :root {
    --m-page-pad-x: 12px;
    --m-page-pad-y: 12px;
    --m-page-pad-b: 16px;
    --m-card-pad: 14px;
    --m-btn-h: 44px;
    --m-btn-sm-h: 38px;
    --m-fs-title: 19px;
    --m-fs-h2: 17px;
    --m-fs-card-title: 15px;
    --m-modal-max-h: 100vh;
  }

  .page, .container { padding-left: var(--m-page-pad-x); padding-right: var(--m-page-pad-x); }
  .page-title { font-size: var(--m-fs-title); }

  /* 按钮：触控最小目标 44px */
  .btn { min-height: var(--m-btn-h); }
  .btn-sm { min-height: var(--m-btn-sm-h); }
  .row-actions .btn { min-height: 40px; }

  /* 表单：两列一律降为单列（参考 .add-form / .bid-form / .intel-form） */
  html body .form-grid { grid-template-columns: 1fr; gap: 10px; }

  /* 弹窗：全屏（footer 固定在视口内） */
  .modal-mask .modal-dialog {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
  }
  .modal-mask .modal-body { max-height: calc(100vh - 112px); }
  .modal-mask .modal-body textarea { font-size: 16px; }   /* 防 iOS 聚焦自动放大 */
  /* 底部操作栏：两列网格、按钮等宽（取消/确定永远在视口内） */
  .modal-footer, .action-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
  }
  .modal-footer .btn, .action-bar .btn {
    flex: none;
    width: 100%;
    min-height: var(--m-btn-h);
    height: auto;
    padding: 0 8px;
    font-size: var(--m-btn-fs);
    white-space: normal;
  }

  /* 输入区按钮等分排布，不挤压输入框 */
  .quick-row, .quick-add-bar { flex-wrap: wrap; row-gap: 8px; }
  .quick-row .btn-icon-40, .quick-add-bar .btn-icon-40,
  .quick-row .btn, .quick-add-bar .btn,
  .quick-row .img-pick, .quick-add-bar .img-pick {
    flex: 1 1 calc(25% - 6px);
    justify-content: center;
  }
  .quick-row select { max-width: 46%; }

  /* 看板列宽 */
  .stage-col { flex-basis: 250px; }
}

/* ============================================================================
   §D ≤320px：超窄屏兜底
   ============================================================================ */
@media (max-width: 320px) {
  :root {
    --m-page-pad-x: 10px;
    --m-page-pad-y: 10px;
    --m-card-pad: 12px;
    --m-btn-fs: 13px;
    --m-fs-title: 18px;
    --m-fs-h2: 16px;
    --m-fs-card-title: 14px;
  }
  .card { padding: var(--m-card-pad); }
  .btn { padding: 8px 10px; font-size: var(--m-btn-fs); }
  .btn-sm { padding: 4px 8px; }
  .pane-head { gap: 6px; }
  .page-title { letter-spacing: 0; }
  .stage-col { flex-basis: 230px; }
}

/* ============================================================================
   §E 触屏设备：统一触控目标
   ============================================================================ */
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn-sm { min-height: 38px; }
  .day-filter button { min-height: 40px; }
  .tabs .tab { padding: 9px 16px; }
  .img-pick { padding: 8px 12px; }
  .sort-toggle { padding: 5px 10px; }
  html body :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]) {
    font-size: 16px;
  }
}

/* ============================================================================
   §F 手机 UA 路径：html.mobile-shell（宽视口也按移动端排版）
   与 §B 等效（见 style.css 同名段注释）；只镜像关键布局，不重复全部页面规则。
   只在宽视口生效：≤768 由 §B~§E 的媒体查询负责，避免 UA 路径覆盖三档断点。
   ============================================================================ */
@media (min-width: 769px) {
  html.mobile-shell body {
    display: block;
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: calc(var(--nav-bottom-height) + env(safe-area-inset-bottom, 0) + 8px);
  }
  html.mobile-shell .icp-footer { margin-top: 0; }
  html.mobile-shell .page { padding: 14px 14px 20px; }
  html.mobile-shell .container { max-width: 100%; padding: 14px 14px 20px; }
  html.mobile-shell .page-title { font-size: 20px; }
  html.mobile-shell .pane-head h2 { font-size: 18px; }
  html.mobile-shell .card { padding: 14px; margin-bottom: 12px; }
  html.mobile-shell .btn { min-height: 44px; }
  html.mobile-shell .btn-sm { min-height: 38px; }
  html.mobile-shell .btn-icon-40 { width: 44px; height: 44px; min-width: 44px; }
  html.mobile-shell :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]) {
    font-size: 16px;
  }
  html.mobile-shell .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.mobile-shell .bottomnav { flex: none; width: 100%; margin: 0; padding-top: 4px; }
  html.mobile-shell .bottomnav-row { max-width: 1040px; margin: 0 auto; }
  html.mobile-shell .bottomnav a { margin: 0; min-height: 44px; max-width: 130px; width: 100%; }
  html.mobile-shell .bottomnav a.active { position: relative; }
  html.mobile-shell .bottomnav a.active::before {
    content: "";
    position: absolute;
    top: 0;
    width: 20px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--primary);
  }
  html.mobile-shell .modal-mask { align-items: flex-end; padding: 0; z-index: 1200; }
  html.mobile-shell .modal-dialog { max-width: 100%; max-height: 88vh; border-radius: var(--m-modal-radius) var(--m-modal-radius) 0 0; }

  /* UA 路径的表格转卡（宽视口 UA 也必须一人一卡，不能出现横向滚动） */
  html.mobile-shell .table-wrap,
  html.mobile-shell .table-scroll,
  html.mobile-shell .users-table-wrap,
  html.mobile-shell div[style*="overflow-x"] { overflow-x: visible !important; }
  html.mobile-shell .table-wrap table.table,
  html.mobile-shell .table-scroll table.task-table,
  html.mobile-shell .users-table-wrap table.users-table,
  html.mobile-shell table.set-table,
  html.mobile-shell table.data-table,
  html.mobile-shell table.detail-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: separate !important;
    background: transparent !important;
  }
  html.mobile-shell .table-wrap table.table thead,
  html.mobile-shell .table-scroll table.task-table thead,
  html.mobile-shell .users-table-wrap table.users-table thead,
  html.mobile-shell table.set-table thead,
  html.mobile-shell table.data-table thead,
  html.mobile-shell table.detail-table thead { display: none !important; }
  html.mobile-shell .table-wrap table.table tbody,
  html.mobile-shell .table-scroll table.task-table tbody,
  html.mobile-shell .users-table-wrap table.users-table tbody,
  html.mobile-shell table.set-table tbody,
  html.mobile-shell table.data-table tbody,
  html.mobile-shell table.detail-table tbody { display: block !important; }
  html.mobile-shell .table-wrap table.table tbody tr,
  html.mobile-shell .table-scroll table.task-table tbody tr,
  html.mobile-shell .users-table-wrap table.users-table tbody tr,
  html.mobile-shell table.set-table tbody tr,
  html.mobile-shell table.data-table tbody tr,
  html.mobile-shell table.detail-table tbody tr {
    display: block !important;
    background: var(--card-bg) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-sm);
    margin-bottom: 10px !important;
    padding: 2px 0;
  }
  html.mobile-shell .table-wrap table.table tbody td,
  html.mobile-shell .table-scroll table.task-table tbody td,
  html.mobile-shell .users-table-wrap table.users-table tbody td,
  html.mobile-shell table.set-table tbody td,
  html.mobile-shell table.data-table tbody td,
  html.mobile-shell table.detail-table tbody td {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border: none !important;
    padding: 8px 14px !important;
    font-size: var(--m-fs-body);
    min-height: 38px;
    min-width: 0;
    word-break: break-word;
  }
  html.mobile-shell .table-wrap table.table tbody td + td,
  html.mobile-shell .table-scroll table.task-table tbody td + td,
  html.mobile-shell .users-table-wrap table.users-table tbody td + td,
  html.mobile-shell table.set-table tbody td + td,
  html.mobile-shell table.data-table tbody td + td,
  html.mobile-shell table.detail-table tbody td + td {
    border-top: 1px dashed var(--border-light) !important;
  }
  html.mobile-shell .table-wrap table.table tbody td::before,
  html.mobile-shell .table-scroll table.task-table tbody td::before,
  html.mobile-shell .users-table-wrap table.users-table tbody td::before,
  html.mobile-shell table.set-table tbody td::before,
  html.mobile-shell table.data-table tbody td::before,
  html.mobile-shell table.detail-table tbody td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: var(--m-fs-meta);
    flex-shrink: 0;
    min-width: 56px;
  }
  html.mobile-shell .table-wrap table.table tbody td > *,
  html.mobile-shell .table-scroll table.task-table tbody td > *,
  html.mobile-shell .users-table-wrap table.users-table tbody td > * { min-width: 0; max-width: 100%; }
  html.mobile-shell .table-scroll table.task-table tbody td select,
  html.mobile-shell .users-table-wrap table.users-table tbody td input,
  html.mobile-shell .users-table-wrap table.users-table tbody td select { width: auto; max-width: 65%; }
  html.mobile-shell .users-table-wrap table.users-table tbody td:last-child .btn { width: 100%; min-height: 44px; }
}

/* ============================================================================
   §G 页面级收敛（原散落在各页 <style> 内的 @media，已从页面删除）
   断点一律换算到三档；因页面 <style> 晚于 common.css 加载，统一用 html body
   前缀提升优先级，避免被页面基础规则覆盖。
   ============================================================================ */

/* bid-intel.html */
@media (max-width: 768px) {
  html body .bid-form { grid-template-columns: 1fr 1fr; }
  html body .bid-form .wide { grid-column: 1 / -1; }
  html body .result-grid { grid-template-columns: 86px 1fr; }
  html body .lead-head { display: block; }
  html body .lead-stage { display: inline-block; margin-top: 6px; }
  html body .intel-form { grid-template-columns: 1fr; gap: 12px; }
  html body .intel-body { padding: 6px 8px; }
}
@media (max-width: 480px) {
  html body .bid-form { grid-template-columns: 1fr; }
  html body .bid-form .wide { grid-column: auto; }
}

/* daily.html */
@media (max-width: 768px) {
  html body .todo-line { flex-wrap: wrap; align-items: flex-start; }
  html body .todo-line .t-title { flex: 1 1 calc(100% - 30px); }
  html body .todo-line .t-badges { flex: 1 1 100%; margin: 4px 0 2px 26px; }
}

/* help.html */
@media (max-width: 768px) {
  html body .help-steps { grid-template-columns: 1fr 1fr; }
  html body .help-grid { grid-template-columns: 1fr; }
  html body .help-sec { padding: 14px; }
}

/* index.html（驾驶舱） */
@media (max-width: 768px) {
  html body .dash-secondary { display: none; }
  html body .dash-grid.more-open .dash-secondary { display: block; }
}
@media (min-width: 769px) {
  html body .dash-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  html body .rela-workbench-grid { grid-template-columns: repeat(2, 1fr); }
  html body .rp-item { flex-wrap: wrap; }
  html body .rp-acts { flex: 1 1 100%; justify-content: flex-end; margin-top: 2px; }
}

/* leader-activity.html */
@media (max-width: 768px) {
  html body .feed-person { padding: 8px; }
  html body .feed-item { font-size: var(--m-fs-meta); }
}

/* login.html（背景光斑；减少动效由上方全局 prefers-reduced-motion 统一处理） */
@media (max-width: 768px) {
  html body .blob-3 { display: none; }
  html body .blob-1, html body .blob-2 { opacity: .3; }
}

/* more.html */
@media (min-width: 769px) {
  html body .more-grid { grid-template-columns: repeat(4, 1fr); }
}

/* org-tree.html */
@media (max-width: 768px) {
  html body .org-name { flex: 1 1 auto; min-width: 0; }
  html body .org-actions { flex: 1 1 100%; justify-content: flex-end; margin-top: 2px; }
}
@media (max-width: 480px) {
  html body .imp-card { padding: 8px 10px; }
  html body .imp-num { font-size: 18px; }
  html body .imp-row { padding: 8px 0; line-height: 1.75; }
  html body .imp-report { max-height: 66vh; }
}

/* performance.html */
@media (max-width: 480px) {
  html body .query-bar { gap: 8px; }
  html body .query-bar select { flex-basis: calc(50% - 4px); }
  html body .query-bar .btn { flex: 1 1 auto; }
  html body .mp-grid { grid-template-columns: repeat(3, 1fr); }
}

/* projects.html */
@media (min-width: 769px) {
  html body .proj-layout { grid-template-columns: 300px 1fr; }
}

/* radar-report.html */
@media (max-width: 480px) {
  html body .insight-card { padding: 10px; }
}

/* recycle.html */
@media (max-width: 768px) {
  html body .rc-item { flex-wrap: wrap; }
  html body .rc-item .rc-main { flex: 1 1 100%; }
  html body .rc-item .rc-acts { flex: 1 1 100%; justify-content: flex-end; }
}

/* rela-person.html */
@media (max-width: 480px) {
  html body .profile-title-wrap { align-items: flex-start; flex-direction: column; gap: 2px; }
  html body .profile-sub { width: 100%; font-size: var(--m-fs-badge); }
  html body .profile-card { padding: 11px; }
  html body .metric-grid { gap: 8px; }
  html body .metric-value { font-size: 20px; }
  html body .value-side .n { font-size: 21px; }
  html body .profile-edit-btn { min-height: 40px; padding: 0 11px; font-size: 13px; }
  html body .add-form { grid-template-columns: 1fr; }
}

/* rela-personnel.html */
@media (max-width: 480px) {
  html body .dc-label { flex-basis: 100%; padding-top: 0; }
  html body .draft-foot { justify-content: stretch; }
  html body .draft-foot .btn { flex: 1 1 120px; }
}

/* rela-portfolio.html */
@media (max-width: 480px) {
  html body .pf-grid { grid-template-columns: 1fr; }
}

/* rela-power.html */
@media (max-width: 768px) {
  html body .target-panes { display: block; }
  html body .target-left, html body .target-right { max-height: none; overflow: visible; }
  html body .target-left { flex: none; }
  html body .target-org-item b { white-space: normal; }
}

/* rela.html */
@media (max-width: 768px) {
  html body .module-entries, html body .rela-quick-acts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 4px 0 12px; }
  html body .rela-page-head { align-items: center; padding: 4px 0 12px; row-gap: 10px; }
  html body .rela-page-head .btn { width: auto; min-height: 44px; font-size: 14px; margin-left: auto; padding: 0 16px; }
  html body .module-entries .btn, html body .rela-quick-acts .btn { min-height: 44px; padding: 8px 10px; }
}
@media (max-width: 480px) {
  html body .rela-topbar { flex-wrap: wrap; }
  html body .rela-filter { grid-template-columns: repeat(2, 1fr); }
  html body .person-head { flex-direction: column; }
  html body .rela-tools-grid { gap: 7px; }
}
@media (max-width: 320px) {
  html body .rela-ai-btn, html body .rela-search-btn { width: 100%; height: 46px; }
  html body .rela-search { flex-basis: 100%; }
}

/* sentinel.html */
@media (max-width: 480px) {
  html body .sen-toolbar .btn { flex: 1; }
}

/* settings.html：员工表转卡已在 §B 的 .users-table 里统一，这里只留 UA 路径的页签网格 */
html.mobile-shell #tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
  padding: 4px 0 12px;
}
html.mobile-shell #tabs .tab {
  min-width: 0;
  width: 100%;
  padding: 9px 8px;
  text-align: center;
  white-space: normal;
}
html.mobile-shell #tabBody .card { min-width: 0; }
html.mobile-shell #tabBody .card-title { flex-wrap: wrap; gap: 8px; }
html.mobile-shell #tabBody div[style*="overflow-x"] { overflow: visible !important; }
html.mobile-shell #tabBody input,
html.mobile-shell #tabBody select,
html.mobile-shell #tabBody textarea { max-width: 100%; }
html.mobile-shell #tabBody table.set-table tbody td input,
html.mobile-shell #tabBody table.set-table tbody td select,
html.mobile-shell #tabBody table.set-table tbody td textarea { max-width: 65% !important; }
html.mobile-shell #backupInfo > div { flex-wrap: wrap; }
html.mobile-shell .quad-block { word-break: break-word; }

/* tasks.html */
@media (max-width: 768px) {
  html body .quad-grid { grid-template-columns: 1fr; }
}

/* aq-level（1.27.0 / P1-11 分级 UI）窄屏收敛 */
@media (max-width: 480px) {
  html body .aq-level-row > select { flex: 1 1 100%; }
  html body .aq-level-hint { flex: 1 1 100%; }
  html body .aq-enc-field > label { flex: 0 0 100%; }
}
