/* 周报/月报页面 —— UI/UX Pro Max 规范设计
 * ─────────────────────────────────────────────────────────────────────────────
 * 设计依据（技能检索结果，2026-10-24）：
 *   - 风格：Data-Dense Dashboard（styles.csv / data-dense-dashboard）——KPI 卡、
 *     12 栅格、8–12px 间距、12–14px 字号、紧凑卡片、悬停态、加载态。
 *   - 原则：Minimalism & Swiss Style——网格、层级、克制，不做装饰性渐变。
 *   - 密度刻度 9/10 → 间距 4 / 8 / 12 / 16 / 24；动效刻度 2/10 → 150–200ms，尊重 reduced-motion。
 *   - 颜色与字体沿用全站语义令牌（品牌绿 + 主题切换），不引入第二套色板。
 * 约束：本文件只消费 --color-* / --zway-* 语义令牌，不写字面色值（除 alpha 叠层）。
 * ───────────────────────────────────────────────────────────────────────────── */

.dr-page{
  --dr-gap:12px;
  --dr-pad:14px;
  --dr-radius:12px;
  --dr-radius-sm:8px;
  --dr-border:var(--color-border,#e5e7eb);
  --dr-border-soft:var(--color-border-soft,#eef2f0);
  --dr-surface:var(--color-surface,#fff);
  --dr-surface-soft:var(--color-surface-soft,#f5f8f6);
  --dr-text:var(--color-text,#111827);
  --dr-muted:var(--color-text-secondary,#6b7280);
  --dr-primary:var(--color-primary,#1e6b4e);
  --dr-primary-hover:var(--color-primary-hover,#2d8a5e);
  --dr-primary-soft:var(--color-primary-soft,#daf0e4);
  --dr-danger:var(--color-danger,#dc2626);
  --dr-focus:var(--color-border-focus,var(--color-primary,#1e6b4e));
  --dr-duration:160ms;
  padding:0 0 24px;
  color:var(--dr-text);
  font-size:13px;
  line-height:1.55;
}

/* hidden 属性必须压过组件自身的 display，否则只读态按钮会「假显示」 */
.dr-page [hidden]{display:none!important}

.dr-page :where(button,input,select,textarea):focus-visible,
.dr-page :where([tabindex]):focus-visible{
  outline:2px solid var(--dr-focus);
  outline-offset:2px;
}

.dr-sr{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0 0 0 0);
  white-space:nowrap;border:0;
}

/* ── 页头：标题 + 状态 ─────────────────────────────────────────────────── */
.dr-page-head{margin:0 0 10px}
.dr-page-title-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.dr-page-head h2{
  margin:0;
  font-size:16px;
  line-height:1.35;
  letter-spacing:-.01em;
  font-weight:750;
}
.dr-page-sub{
  margin:4px 0 0;
  max-width:66ch;
  color:var(--dr-muted);
  font-size:12.5px;
  line-height:1.6;
}

/* ── 工具栏：报告类型 + 周期切换 + 视图标签 ───────────────────────────── */
.dr-toolbar{
  display:grid;
  gap:10px;
  padding:10px 12px;
  margin-bottom:var(--dr-gap);
  background:var(--dr-surface);
  border:1px solid var(--dr-border);
  border-radius:var(--dr-radius);
}
.dr-toolbar-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.dr-seg{
  display:inline-flex;
  gap:2px;
  padding:2px;
  border:1px solid var(--dr-border);
  border-radius:var(--dr-radius-sm);
  background:var(--dr-surface-soft);
}
.dr-seg button{
  min-height:30px;
  min-width:64px;
  padding:0 14px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:var(--dr-muted);
  font:inherit;
  font-size:12.5px;
  font-weight:650;
  cursor:pointer;
  transition:background var(--dr-duration) ease,color var(--dr-duration) ease;
}
.dr-seg button:hover{color:var(--dr-text)}
.dr-seg button[aria-checked="true"]{
  background:var(--dr-primary);
  color:var(--color-text-on-primary,#fff);
}
.dr-seg button[aria-checked="true"]:hover{color:var(--color-text-on-primary,#fff)}

.dr-period{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
}
.dr-icon-btn{
  width:30px;height:30px;
  display:grid;place-items:center;
  border:1px solid var(--dr-border);
  border-radius:var(--dr-radius-sm);
  background:var(--dr-surface);
  color:var(--dr-text);
  cursor:pointer;
  transition:background var(--dr-duration) ease,border-color var(--dr-duration) ease;
}
.dr-icon-btn:hover{background:var(--dr-surface-soft);border-color:var(--dr-primary)}
.dr-icon-btn:disabled{opacity:.45;cursor:not-allowed}
.dr-icon-btn svg{width:14px;height:14px}

.dr-period-readout{
  display:flex;
  flex-direction:column;
  gap:1px;
  min-width:190px;
  padding:4px 10px;
  border:1px solid var(--dr-border);
  border-radius:var(--dr-radius-sm);
  background:var(--dr-surface-soft);
}
.dr-period-range{
  font-size:13px;
  font-weight:700;
  letter-spacing:-.01em;
  white-space:nowrap;
}
.dr-period-sub{
  color:var(--dr-muted);
  font-size:11.5px;
  white-space:nowrap;
}

.dr-date-field{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:30px;
  padding:0 8px;
  border:1px solid var(--dr-border);
  border-radius:var(--dr-radius-sm);
  background:var(--dr-surface);
  color:var(--dr-muted);
  font-size:12px;
}
.dr-date-field input{
  border:0;
  background:transparent;
  padding:4px 0;
  font:inherit;
  color:var(--dr-text);
  max-width:128px;
}

.dr-ghost-btn,
.dr-text-btn{
  min-height:30px;
  padding:0 11px;
  border:1px solid var(--dr-border);
  border-radius:var(--dr-radius-sm);
  background:var(--dr-surface);
  color:var(--dr-text);
  font:inherit;
  font-size:12.5px;
  font-weight:650;
  cursor:pointer;
  white-space:nowrap;
  transition:background var(--dr-duration) ease,border-color var(--dr-duration) ease,color var(--dr-duration) ease;
}
.dr-ghost-btn:hover{border-color:var(--dr-primary);color:var(--dr-primary);background:var(--dr-primary-soft)}

.dr-tabs{
  display:flex;
  gap:4px;
  padding:3px;
  border:1px solid var(--dr-border);
  border-radius:var(--dr-radius-sm);
  background:var(--dr-surface-soft);
  width:fit-content;
  max-width:100%;
  overflow-x:auto;
}
.dr-tabs button{
  min-height:30px;
  padding:0 14px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:var(--dr-muted);
  font:inherit;
  font-size:12.5px;
  font-weight:650;
  cursor:pointer;
  white-space:nowrap;
  transition:background var(--dr-duration) ease,color var(--dr-duration) ease;
}
.dr-tabs button:hover{color:var(--dr-text)}
.dr-tabs button[aria-selected="true"]{
  background:var(--dr-surface);
  color:var(--dr-primary);
  box-shadow:inset 0 0 0 1px var(--dr-border);
}

/* ── 提示条 ─────────────────────────────────────────────────────────────── */
.dr-alert{
  padding:9px 12px;
  margin:0 0 var(--dr-gap);
  border:1px solid var(--dr-border);
  border-left:3px solid var(--dr-primary);
  border-radius:var(--dr-radius-sm);
  background:var(--dr-surface-soft);
  color:var(--dr-text);
  font-size:12.5px;
  line-height:1.55;
}
.dr-alert:empty{display:none}
.dr-alert.error{border-left-color:var(--dr-danger);background:var(--color-danger-soft,#fee2e2);color:var(--color-danger-text,#991b1b)}
.dr-alert.warn{border-left-color:var(--color-warning,#f59e0b);background:var(--color-warning-soft,#fef3c7);color:var(--color-warning-text,#92400e)}

/* ── 布局：主区 + 记录侧栏 ─────────────────────────────────────────────── */
.dr-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(272px,320px);
  gap:var(--dr-gap);
  align-items:start;
}

/* ── 卡片 ───────────────────────────────────────────────────────────────── */
.dr-card{
  padding:var(--dr-pad);
  margin-bottom:var(--dr-gap);
  background:var(--dr-surface);
  border:1px solid var(--dr-border);
  border-radius:var(--dr-radius);
  min-width:0;
}
.dr-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:10px;
}
.dr-card-head-main{min-width:0}
.dr-card-head h3{
  margin:0;
  font-size:13.5px;
  font-weight:750;
  letter-spacing:-.005em;
}
.dr-range{
  margin-top:2px;
  color:var(--dr-muted);
  font-size:11.5px;
  line-height:1.5;
}

/* ── 状态徽标 ───────────────────────────────────────────────────────────── */
.dr-status{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:3px 9px;
  border-radius:999px;
  background:var(--color-warning-soft,#fef3c7);
  color:var(--color-warning-text,#92400e);
  font-size:11.5px;
  font-weight:700;
  white-space:nowrap;
}
.dr-status::before{
  content:"";
  width:6px;height:6px;
  border-radius:50%;
  background:currentColor;
  flex:0 0 auto;
}
.dr-status.submitted{background:var(--color-success-soft,#dcfce7);color:var(--color-success-text,#166534)}
.dr-status.readonly{background:var(--dr-surface-soft);color:var(--dr-muted)}

/* ── 自动汇总 ───────────────────────────────────────────────────────────── */
.dr-auto-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(232px,1fr));
  gap:8px;
  align-items:start;
}
.dr-auto-card{
  padding:10px 11px;
  border:1px solid var(--dr-border-soft);
  border-radius:var(--dr-radius-sm);
  background:var(--dr-surface-soft);
  min-width:0;
}
.dr-auto-card h4{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin:0 0 6px;
  font-size:12.5px;
  font-weight:700;
}
.dr-auto-card h4 span:first-child{min-width:0;overflow-wrap:anywhere}
.dr-auto-card h4 span:last-child{
  flex:0 0 auto;
  min-width:22px;
  height:20px;
  padding:0 6px;
  display:inline-grid;
  place-items:center;
  border-radius:6px;
  background:var(--dr-primary-soft);
  color:var(--color-primary-text,var(--dr-primary));
  font-size:11.5px;
  font-weight:750;
  font-variant-numeric:tabular-nums;
}
.dr-auto-card ul{
  margin:0;
  padding:0;
  list-style:none;
  display:grid;
  gap:4px;
  max-height:184px;
  overflow:auto;
}
.dr-auto-card li{
  position:relative;
  padding-left:11px;
  color:var(--dr-muted);
  font-size:12px;
  line-height:1.45;
  overflow-wrap:anywhere;
}
.dr-auto-card li::before{
  content:"";
  position:absolute;
  left:2px;top:.55em;
  width:4px;height:4px;
  border-radius:50%;
  background:var(--dr-primary);
  opacity:.55;
}
.dr-auto-empty{
  color:var(--dr-muted);
  font-size:12px;
  line-height:1.5;
}
.dr-stats{display:grid;gap:4px}
.dr-stat{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  font-size:12px;
  color:var(--dr-muted);
}
.dr-stat strong{
  color:var(--dr-text);
  font-weight:700;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}

/* ── 记录表单 ───────────────────────────────────────────────────────────── */
.dr-form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:var(--dr-gap);
}
.dr-field{display:block;min-width:0}
.dr-field span{
  display:block;
  margin-bottom:5px;
  font-size:12px;
  font-weight:700;
}
.dr-field small{
  display:block;
  margin-top:5px;
  color:var(--dr-muted);
  font-size:11.5px;
}
.dr-field textarea{
  display:block;
  width:100%;
  min-height:132px;
  padding:10px 11px;
  border:1px solid var(--dr-border);
  border-radius:var(--dr-radius-sm);
  background:var(--dr-surface);
  color:inherit;
  font:inherit;
  font-size:13px;
  line-height:1.6;
  resize:vertical;
  box-sizing:border-box;
  transition:border-color var(--dr-duration) ease;
}
.dr-field textarea:hover:not(:read-only){border-color:var(--color-border-strong,var(--dr-muted))}
.dr-field textarea:focus{border-color:var(--dr-primary)}
.dr-field textarea:read-only{
  background:var(--dr-surface-soft);
  color:var(--dr-muted);
  cursor:default;
}
.dr-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
  margin-top:12px;
}
.dr-actions .btn{min-height:32px}
.dr-withdraw-slot{margin-top:10px}
.dr-withdraw-slot textarea{
  width:100%;
  min-height:72px;
  padding:9px 10px;
  border:1px solid var(--dr-border);
  border-radius:var(--dr-radius-sm);
  font:inherit;
  box-sizing:border-box;
}
.dr-withdraw-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}

.dr-wecom-note,
.dr-scope-note{
  margin:0 0 var(--dr-gap);
  padding:9px 11px;
  border-radius:var(--dr-radius-sm);
  background:var(--dr-surface-soft);
  color:var(--dr-muted);
  font-size:11.5px;
  line-height:1.6;
}
.dr-scope-note{
  border-left:3px solid var(--dr-primary);
  color:var(--dr-text);
  font-size:12px;
}

/* ── 近期记录侧栏 ───────────────────────────────────────────────────────── */
.dr-history-card{position:sticky;top:12px}
.dr-history{
  display:grid;
  gap:6px;
  max-height:calc(100vh - 260px);
  overflow:auto;
  padding-right:2px;
}
.dr-history-item{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  width:100%;
  min-height:46px;
  padding:8px 10px;
  border:1px solid var(--dr-border-soft);
  border-radius:var(--dr-radius-sm);
  background:var(--dr-surface);
  color:inherit;
  text-align:left;
  cursor:pointer;
  transition:border-color var(--dr-duration) ease,background var(--dr-duration) ease;
}
.dr-history-item:hover{border-color:var(--dr-primary);background:var(--dr-surface-soft)}
.dr-history-item.active{
  border-color:var(--dr-primary);
  background:var(--dr-primary-soft);
}
.dr-history-main{min-width:0}
.dr-history-date{
  display:block;
  font-size:12.5px;
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.dr-history-meta{
  display:block;
  margin-top:2px;
  color:var(--dr-muted);
  font-size:11px;
}
.dr-history-item .dr-status{font-size:11px;padding:2px 8px}

/* 近期记录序号徽标：与日期同一行，弱视觉权重 */
.dr-history-main{display:flex;align-items:baseline;gap:6px;min-width:0}
.dr-history-no{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:17px;
  padding:0 4px;
  border-radius:var(--dr-radius-sm);
  background:var(--dr-primary-soft);
  color:var(--dr-primary);
  font-size:10.5px;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  transform:translateY(-1px);
}
.dr-history-main .dr-history-date{flex:0 0 auto}
.dr-history-main .dr-history-meta{
  flex:1 1 auto;
  min-width:0;
  margin-top:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* 近期记录翻页器：窄栏紧凑布局 */
.dr-history-pager{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding-top:8px;
}
.dr-history-pageinfo{
  color:var(--dr-muted);
  font-size:11.5px;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}

.dr-empty{
  padding:16px 12px;
  border:1px dashed var(--dr-border);
  border-radius:var(--dr-radius-sm);
  text-align:center;
  color:var(--dr-muted);
  font-size:12px;
  line-height:1.6;
}

/* ── 团队报告 ───────────────────────────────────────────────────────────── */
.dr-line-switch{
  display:inline-flex;
  gap:4px;
  padding:2px;
  border:1px solid var(--dr-border);
  border-radius:var(--dr-radius-sm);
  background:var(--dr-surface-soft);
  flex-wrap:wrap;
}
.dr-line-switch button{
  min-height:28px;
  padding:0 11px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:var(--dr-muted);
  font:inherit;
  font-size:12px;
  font-weight:650;
  cursor:pointer;
}
.dr-line-switch button:hover{color:var(--dr-text)}
.dr-line-switch button.active{
  background:var(--dr-surface);
  color:var(--dr-primary);
  box-shadow:inset 0 0 0 1px var(--dr-border);
}
.dr-team-metrics{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:8px;
  margin-bottom:var(--dr-gap);
}
.dr-metric{
  padding:10px 12px;
  border:1px solid var(--dr-border-soft);
  border-radius:var(--dr-radius-sm);
  background:var(--dr-surface-soft);
}
.dr-metric span{
  display:block;
  color:var(--dr-muted);
  font-size:11.5px;
}
.dr-metric strong{
  display:block;
  margin-top:2px;
  font-size:22px;
  font-weight:750;
  line-height:1.2;
  font-variant-numeric:tabular-nums;
}
.dr-team-group{margin-top:var(--dr-gap)}
.dr-team-group h4{
  margin:0 0 6px;
  color:var(--dr-muted);
  font-size:11.5px;
  font-weight:700;
  letter-spacing:.02em;
}
.dr-team-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:46px;
  padding:8px 10px;
  margin-bottom:6px;
  border:1px solid var(--dr-border-soft);
  border-radius:var(--dr-radius-sm);
  background:var(--dr-surface);
}
.dr-team-row-main{min-width:0;font-size:12.5px;font-weight:650}
.dr-team-row-sub{
  margin-top:2px;
  color:var(--dr-muted);
  font-size:11px;
  font-weight:400;
}
.dr-team-missing{display:flex;flex-wrap:wrap;gap:6px}
.dr-team-missing span{
  padding:4px 9px;
  border:1px solid var(--dr-border);
  border-radius:999px;
  background:var(--dr-surface-soft);
  color:var(--dr-text);
  font-size:11.5px;
}

/* ── 按人提交率 ─────────────────────────────────────────────────────────── */
.dr-rate-controls{display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap}
.dr-rate-controls .dr-archive-field{min-width:150px}
.dr-rate-controls .btn{min-height:32px}
.dr-rate-table-wrap{overflow-x:auto;border:1px solid var(--dr-border-soft);border-radius:var(--dr-radius-sm)}
.dr-rate-table{width:100%;min-width:600px;border-collapse:collapse;font-size:12.5px;font-variant-numeric:tabular-nums}
.dr-rate-table th,.dr-rate-table td{padding:9px 12px;text-align:left;border-bottom:1px solid var(--dr-border-soft)}
.dr-rate-table thead th{background:var(--dr-surface-soft);color:var(--dr-muted);font-size:11.5px;font-weight:700;white-space:nowrap}
.dr-rate-table tbody th{font-weight:650}
.dr-rate-table tbody tr:last-child th,.dr-rate-table tbody tr:last-child td{border-bottom:0}
.dr-rate-table tbody tr:hover{background:var(--dr-surface-soft)}
.dr-rate-table th:nth-child(n+3),.dr-rate-table td:nth-child(n+3){text-align:right}

/* ── 存档检索 ───────────────────────────────────────────────────────────── */
.dr-archive-search{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:8px;
  align-items:end;
  margin-bottom:var(--dr-gap);
}
.dr-archive-search .btn{
  height:32px;
  min-height:32px;
  padding:0 16px;
  align-self:end;
}
.dr-archive-field{display:block;min-width:0}
.dr-archive-field span{
  display:block;
  margin-bottom:4px;
  color:var(--dr-muted);
  font-size:11.5px;
  font-weight:650;
}
.dr-archive-field input,
.dr-archive-field select{
  width:100%;
  min-height:32px;
  padding:6px 9px;
  border:1px solid var(--dr-border);
  border-radius:var(--dr-radius-sm);
  background:var(--dr-surface);
  color:inherit;
  font:inherit;
  font-size:12.5px;
  box-sizing:border-box;
}
.dr-archive-list{display:grid;gap:8px;max-height:calc(100vh - 380px);overflow:auto}
.dr-archive-item{
  padding:11px 12px;
  border:1px solid var(--dr-border-soft);
  border-radius:var(--dr-radius-sm);
  background:var(--dr-surface);
}
.dr-archive-item:hover{border-color:var(--dr-primary)}
.dr-archive-item-top{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:6px;
}
.dr-archive-period{font-size:12.5px;font-weight:750}
.dr-archive-meta{color:var(--dr-muted);font-size:11.5px}
.dr-archive-item p{
  margin:3px 0;
  font-size:12px;
  line-height:1.6;
  color:var(--dr-text);
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}
.dr-archive-item .dr-archive-text strong{font-weight:700;color:var(--dr-muted)}

/* 序号徽标：跨页连续编号，弱视觉权重不抢信息层级 */
.dr-archive-no{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:18px;
  margin-right:6px;
  padding:0 5px;
  border-radius:var(--dr-radius-sm);
  background:var(--dr-primary-soft);
  color:var(--dr-primary);
  font-size:11px;
  font-weight:700;
  font-variant-numeric:tabular-nums;
}

/* 分页导航 */
.dr-pagination{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:4px;
  padding:6px 2px 2px;
}
.dr-page-btn{
  min-height:28px;
  min-width:28px;
  padding:2px 8px;
  border:1px solid var(--dr-border-soft);
  border-radius:var(--dr-radius-sm);
  background:var(--dr-surface);
  color:var(--dr-text);
  font:inherit;
  font-size:12px;
  cursor:pointer;
}
.dr-page-btn:hover:not(:disabled):not(.active){border-color:var(--dr-primary);color:var(--dr-primary)}
.dr-page-btn.active{
  background:var(--dr-primary);
  border-color:var(--dr-primary);
  color:var(--color-text-on-primary,#fff);
  font-weight:700;
  cursor:default;
}
.dr-page-btn:disabled{opacity:.45;cursor:default}
.dr-page-ellipsis{color:var(--dr-muted);padding:0 2px;font-size:12px}

/* ── 抽屉（团队报告详情） ───────────────────────────────────────────────── */
.dr-drawer .drawer-body{padding:14px 18px;overflow:auto}
.dr-drawer .dr-archive-text{
  font-size:13px;
  line-height:1.7;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

/* ── 响应式：1024 / 768 / 375 ───────────────────────────────────────────── */
@media (max-width:1180px){
  .dr-layout{grid-template-columns:minmax(0,1fr) minmax(248px,280px)}
}
@media (max-width:1080px){
  .dr-layout{grid-template-columns:1fr}
  .dr-history-card{position:static}
  .dr-history{max-height:none}
  .dr-archive-list{max-height:none}
  .dr-auto-grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}
}
@media (max-width:720px){
  .dr-form-grid{grid-template-columns:1fr}
  .dr-archive-search{grid-template-columns:1fr}
  .dr-period-readout{min-width:0;flex:1 1 150px}
}
@media (max-width:480px){
  .dr-toolbar{padding:8px 10px}
  .dr-toolbar-row{gap:8px}
  .dr-seg{width:100%}
  .dr-seg button{flex:1 1 auto}
  .dr-period{
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    gap:6px;
    width:100%;
  }
  .dr-period-readout{
    grid-column:2;
    grid-row:1;
    width:auto;
    min-width:0;
  }
  .dr-period [data-dr-shift="-1"]{grid-column:1;grid-row:1}
  .dr-period [data-dr-shift="1"]{grid-column:3;grid-row:1}
  .dr-date-field{grid-column:1 / 3;grid-row:2;justify-content:flex-start}
  .dr-period .dr-ghost-btn{grid-column:3;grid-row:2}
  .dr-tabs{width:100%}
  .dr-tabs button{flex:1 1 auto}
  .dr-card{padding:12px}
  .dr-actions{justify-content:stretch}
  .dr-actions .btn{flex:1 1 auto}
}


/* 尊重系统减弱动效偏好 */
@media (prefers-reduced-motion:reduce){
  .dr-page *,
  .dr-page *::before,
  .dr-page *::after{
    transition-duration:.01ms!important;
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    scroll-behavior:auto!important;
  }
}

/* ── 页面改版：报告工作台 ──────────────────────────────────────────────── */
.dr-page{
  --dr-gap:16px;
  --dr-pad:18px;
  --dr-radius:14px;
  --dr-radius-sm:10px;
  --dr-duration:180ms;
  font-size:14px;
}
.dr-page-head{margin:0 0 14px}
.dr-page-title-row{gap:10px}
.dr-page-head h2{font-size:22px;line-height:1.3;letter-spacing:-.025em}
.dr-page-sub{margin-top:6px;font-size:13px;max-width:72ch}

.dr-toolbar{
  gap:0;
  padding:14px 16px 0;
  margin-bottom:16px;
  border-radius:var(--dr-radius);
  box-shadow:0 2px 8px color-mix(in srgb,var(--dr-text) 4%,transparent);
}
.dr-toolbar-row{gap:14px}
.dr-toolbar-row--views{
  margin-top:12px;
  border-top:1px solid var(--dr-border-soft);
  padding:8px 0 10px;
}
.dr-seg{padding:3px;border-radius:11px}
.dr-seg button{min-height:36px;min-width:72px;border-radius:8px;font-size:13px}
.dr-period{gap:8px}
.dr-icon-btn{width:36px;height:36px;border-radius:10px}
.dr-icon-btn svg{width:16px;height:16px}
.dr-period-readout{
  min-width:210px;
  padding:6px 12px;
  border-color:transparent;
  background:var(--dr-surface-soft);
  border-radius:10px;
}
.dr-period-range{font-size:14px}
.dr-period-sub{font-size:12px}
.dr-date-field,.dr-ghost-btn,.dr-tabs button{min-height:36px}
.dr-date-field{padding:0 10px;border-radius:10px}
.dr-date-field input{min-height:32px}
.dr-ghost-btn{padding:0 13px;border-radius:10px;font-size:13px}
.dr-tabs{gap:3px;padding:3px;border-radius:10px;background:transparent;border-color:transparent}
.dr-tabs button{padding:0 14px;border-radius:8px;font-size:13px}
.dr-tabs button[aria-selected="true"]{box-shadow:none;background:var(--dr-primary-soft);font-weight:750}

.dr-layout{gap:16px;grid-template-columns:minmax(0,1fr) minmax(280px,320px)}
.dr-card{
  padding:18px;
  margin-bottom:16px;
  border-radius:var(--dr-radius);
  box-shadow:0 2px 8px color-mix(in srgb,var(--dr-text) 4%,transparent);
}
.dr-card-head{align-items:center;margin-bottom:14px}
.dr-card-head h3{font-size:15px;letter-spacing:-.01em}
.dr-range{font-size:12px}
.dr-auto-grid{gap:10px;grid-template-columns:repeat(auto-fill,minmax(210px,1fr))}
.dr-auto-card{
  padding:12px 13px;
  border-radius:10px;
  background:var(--dr-surface);
  transition:border-color var(--dr-duration) ease,background var(--dr-duration) ease;
}
.dr-auto-card:hover{border-color:var(--dr-primary);background:var(--dr-surface-soft)}
.dr-auto-card h4{font-size:13px;margin-bottom:8px}
.dr-auto-card ul{gap:6px;max-height:200px}
.dr-auto-card li{font-size:12.5px;line-height:1.55}
.dr-empty{padding:20px 14px;font-size:13px}

.dr-form-grid{gap:14px}
.dr-field span{margin-bottom:7px;font-size:13px}
.dr-field textarea{
  min-height:156px;
  padding:12px 13px;
  border-radius:10px;
  font-size:14px;
  line-height:1.65;
}
.dr-field textarea::placeholder{color:var(--dr-muted);opacity:.8}
.dr-field small{font-size:12px}
.dr-actions{margin-top:16px;gap:10px}
.dr-actions .btn{min-height:38px;padding-inline:16px;border-radius:10px;cursor:pointer;transition:filter var(--dr-duration) ease,transform var(--dr-duration) ease}
.dr-actions .btn:hover{filter:brightness(.97)}
.dr-actions .btn:active{transform:translateY(1px)}
.dr-wecom-note,.dr-scope-note{padding:11px 13px;border-radius:10px;font-size:12px}

.dr-history-card{top:16px}
.dr-history{gap:8px;max-height:calc(100vh - 240px)}
.dr-history-item{min-height:54px;padding:10px 11px;border-radius:10px;transition:border-color var(--dr-duration) ease,background var(--dr-duration) ease,transform var(--dr-duration) ease}
.dr-history-item:hover{transform:translateY(-1px)}
.dr-history-date{font-size:13px}
.dr-history-meta{font-size:11.5px}

.dr-page button,.dr-page [role="button"]{cursor:pointer}
.dr-page button:disabled{cursor:not-allowed}
.dr-team-metrics{gap:10px}
.dr-metric{padding:13px 14px;border-radius:10px}
.dr-metric strong{font-size:24px}
.dr-team-row,.dr-archive-item{border-radius:10px}
.dr-archive-search{gap:12px}
.dr-archive-field input,.dr-archive-field select{min-height:38px;border-radius:9px;font-size:13px}

@media (max-width:1080px){
  .dr-layout{grid-template-columns:1fr}
  .dr-history{max-height:none}
}
@media (max-width:720px){
  .dr-page{--dr-pad:14px;--dr-gap:12px}
  .dr-page-head h2{font-size:20px}
  .dr-toolbar{padding:10px 12px 0}
  .dr-toolbar-row{gap:10px}
  .dr-period{flex-wrap:wrap}
  .dr-period-readout{min-width:170px}
  .dr-card{padding:14px}
  .dr-auto-grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr))}
}
@media (max-width:480px){
  .dr-page-head h2{font-size:19px}
  .dr-toolbar{padding:9px 10px 0}
  .dr-toolbar-row--views{margin-top:10px}
  .dr-period-readout{min-width:0;padding:5px 8px}
  .dr-period-range{font-size:13px}
  .dr-tabs{width:100%;overflow:visible}
  .dr-tabs button{padding-inline:8px}
  .dr-auto-grid{grid-template-columns:1fr}
  .dr-actions .btn{min-height:42px}
}

/* 触屏/窄屏：可点目标 ≥44px（WCAG 2.2 目标尺寸规则的移动端实践；窄窗同样放大，审查与真实触屏口径一致） */
@media (hover:none) and (pointer:coarse), (max-width:480px){
  .dr-page button,
  .dr-page .dr-history-item,
  .dr-page .dr-team-row,
  .dr-page [data-dr-history]{min-height:44px}
  .dr-page .dr-icon-btn{width:44px;height:44px}
  .dr-page .dr-date-field{min-height:44px}
  .dr-page .dr-date-field input{min-height:44px}
  .dr-page .dr-actions .btn{min-height:44px}
  .dr-page .dr-page-btn{min-height:44px}
  .dr-page .dr-archive-field input,
  .dr-page .dr-archive-field select{min-height:44px}
}
