:root {
  --bg: #f3f5fb;
  --bg-grad: radial-gradient(1200px 600px at 80% -10%, #e7edff 0%, transparent 55%),
             radial-gradient(900px 500px at -10% 110%, #eafaf3 0%, transparent 50%),
             #f3f5fb;
  --card: #ffffff;
  --border: #e7ebf3;
  --border-strong: #d4dbe8;
  --text: #1f2937;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-soft: #eef4ff;
  --primary-grad: linear-gradient(135deg, #3b82f6, #2563eb);
  --green: #16a34a;
  --green-soft: #ecfdf3;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-xs: 4px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .05);
  --shadow-lg: 0 12px 36px rgba(16, 24, 40, .14);
  --muted: var(--text-muted);       /* 修复：19处失效引用 */
  --ink: var(--text);             /* 修复：3处失效引用 */
  --text-strong: #111827;         /* 修复：2处失效引用，比正文更深 */
  --bg-soft: var(--bg);           /* 修复：5处失效引用 */
  --danger: var(--red);           /* 修复：1处失效引用 */
  --th-bg: #f7f9fc;               /* 表头底色（主题可覆盖） */
  --gray-900: #0f172a;  --gray-800: #334155;  --gray-700: #475569;
  --gray-600: #64748b;  --gray-500: #94a3b8;  --gray-400: #cbd5e1;
  --gray-200: #e2e8f0;  --gray-100: #f1f5f9;  --gray-50: #f8fafc;
  /* ---- 20261004SIDEBASE：输入框填充（主题可覆盖；此前只有 fallback，主题永远改不动）---- */
  --input-fill: #f2f4f8;
  --input-fill-hover: #eceff5;
  --fs-xs: 11px; --fs-sm: 12px; --fs-base: 13px; --fs-md: 14px;
  --fs-lg: 16px; --fs-xl: 20px; --fs-2xl: 24px; --fs-3xl: 32px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px;
  --c-f1: #2563eb;
  --c-f2: #f59e0b;
  --c-f3: #10b981;
  --c-f4: #3b82f6;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  font-size: var(--fs-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 整体布局：侧边栏 + 主区 ---------- */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 208px; flex-shrink: 0;
  display: flex; flex-direction: column;
  background: var(--card);
  color: #1f2937; position: sticky; top: 0; height: 100vh;
  border-right: 1px solid var(--gray-100);
  box-shadow: 2px 0 14px rgba(16, 24, 40, .05);
  z-index: 60; transition: width .25s ease;
}
.sidebar.collapsed { width: 60px; }
.sidebar-brand { cursor: pointer; }
/* 汉堡按钮默认隐藏，仅移动端显示 */
.hamburger-btn { display: none; }
.mobile-overlay { display: none; }
.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .side-item span:not(.side-icon),
.sidebar.collapsed .nav-group-label,
.sidebar.collapsed .sidebar-foot .user-chip,
.sidebar.collapsed .sidebar-foot .btn-ghost span,
.sidebar.collapsed .side-ver { display: none; }
.sidebar.collapsed .sidebar-brand { justify-content: center; padding: var(--space-3) var(--space-2); }
.sidebar.collapsed .side-logo { width: 36px; }
.sidebar.collapsed .side-item { justify-content: center; padding: var(--space-3); position: relative; }
.sidebar.collapsed .side-item:hover::after {
  content: attr(data-tooltip); position: absolute; left: 100%; top: 50%;
  transform: translateY(-50%); margin-left: 10px; background: #1f2937; color: #fff;
  padding: var(--space-1) var(--space-3); border-radius: var(--radius-sm); font-size: var(--fs-sm); white-space: nowrap;
  z-index: 100; pointer-events: none; font-weight: 600;
}
.sidebar.collapsed .sidebar-nav { padding: var(--space-2) var(--space-2); }
.sidebar.collapsed .sidebar-foot { padding: var(--space-3) var(--space-2); }
.sidebar.collapsed .sidebar-foot .btn-ghost { width: 100%; padding: var(--space-2); justify-content: center; display: flex; align-items: center; gap: 0; }
.sidebar.collapsed .sidebar-foot .btn-ghost svg { width: 16px; height: 16px; }
.sidebar-brand {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  padding: var(--space-5) var(--space-4) var(--space-3); text-align: center;
  border-bottom: 1px solid var(--gray-100);
}
.side-logo { width: 158px; height: auto; display: block; }
.sidebar-brand-text .brand-title { font-size: var(--fs-base); font-weight: 700; letter-spacing: 1.5px; color: #111827; }
.sidebar-brand-text .brand-sub { font-size: 10px; line-height: 13px; font-weight: 700; letter-spacing: 2.6px; color: var(--primary); }

.sidebar-nav {
  display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3) var(--space-3) var(--space-1); flex: 1;
  min-height: 0; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin; scrollbar-color: var(--gray-400) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--gray-400); border-radius: var(--radius-xs); }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: #c2c9d4; }
.side-item {
  display: none; align-items: center; gap: var(--space-3);
  border: none; background: transparent; color: #4b5563;
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); font-size: var(--fs-md); font-weight: 600;
  cursor: pointer; text-align: left; transition: all .15s ease; flex-shrink: 0;
}
.side-item.visible { display: flex; }
.side-item[hidden] { display: none !important; }
.side-item:hover { background: var(--gray-100); color: #111827; }
.side-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: inset 3px 0 0 var(--primary);
}
.side-item .side-icon { font-size: var(--fs-lg); width: 22px; text-align: center; }

.sidebar-foot {
  padding: var(--space-3); border-top: 1px solid var(--gray-100);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);
}
.sidebar-foot .side-user { flex: 1; min-width: 0; }
.sidebar-foot .user-chip {
  width: 100%; justify-content: center; text-align: center;
  background: var(--gray-100); border-color: var(--gray-200);
  color: #374151; font-size: var(--fs-sm); padding: var(--space-2) var(--space-2); border-radius: var(--radius-md);
}
.ub-name { font-weight: 600; font-size: var(--fs-sm); color: #374151; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ub-sub { font-size: var(--fs-xs); color: #6b7280; margin-top: 4px; line-height: 1.45; }
.sidebar-foot .btn-ghost { color: #6b7280; border-color: var(--gray-400); flex: none; white-space: nowrap; font-size: var(--fs-sm); padding: var(--space-2) var(--space-2); }
.sidebar-foot .btn-ghost:hover { background: var(--gray-100); color: #111827; border-color: #c9cfda; }
.side-ver { font-size: var(--fs-xs); color: #a5adba; text-align: center; letter-spacing: .02em; user-select: none; width: 100%; }

.main-area { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------- 主区顶栏 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 26px; background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-size: var(--fs-lg); font-weight: 700; color: var(--text); display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; white-space: nowrap; }
.topbar-title::before { content: ""; width: 4px; height: 16px; border-radius: var(--radius-xs); background: var(--primary-grad); }
.topbar-right { display: flex; align-items: center; gap: var(--space-3); }
/* 顶栏筛选 chip · M3 统一卡片式（全局 + 模块专用一套视觉） */
.filter-chip {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: var(--card);
  border-radius: 10px; padding: 3px 10px 3px 3px;
  box-shadow: 0 1px 3px rgba(15,23,42,.05);
  font-size: var(--fs-base); color: var(--text-muted);
  white-space: nowrap;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.filter-chip:hover { border-color: #c7d2fe; box-shadow: 0 2px 8px rgba(37,99,235,.1); }
.filter-chip:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.filter-chip .filter-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 7px; background: var(--primary-soft);
  color: var(--primary); flex-shrink: 0;
}
.filter-chip .filter-icon svg { width: 15px; height: 15px; }
.filter-chip > span:not(.filter-icon):not(.notify-dot) {
  font-size: var(--fs-sm); font-weight: 600; color: var(--gray-700); white-space: nowrap;
}
.filter-chip select, .filter-chip input {
  border: none; background: transparent; font-size: var(--fs-sm); font-weight: 600;
  color: var(--text); padding: 3px 2px; cursor: pointer; outline: none;
  max-width: 210px; transition: color .15s;
}
.filter-chip select:hover, .filter-chip input:hover { color: var(--primary); }
.filter-chip select:focus, .filter-chip input:focus { color: var(--primary); }
.filter-chip input[type="month"], .filter-chip input[type="date"] { min-width: 108px; }
/* 顶部日期范围 chip（起始 ~ 截止） */
.filter-chip.date-range-chip { display: inline-flex; align-items: center; gap: 6px; }
.filter-chip.date-range-chip .range-sep { color: #9ca3af; font-weight: 600; font-size: 12px; padding: 0 2px; }

main { padding: 22px 26px 60px; max-width: 1440px; width: 100%; margin: 0 auto; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn .22s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow); padding: var(--space-5); margin-bottom: 20px;
  transition: box-shadow .18s ease;
}
.card:hover { box-shadow: 0 4px 14px rgba(16, 24, 40, .07); }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-head h3 { margin: 0; font-size: var(--fs-md); font-weight: 700; display: flex; align-items: center; gap: var(--space-2); }
.card-head h3::before {
  content: ""; width: 4px; height: 15px; border-radius: var(--radius-xs); background: var(--primary-grad);
}

/* ---------- 表单 ---------- */
.entry-grid { display: grid; grid-template-columns: 1fr 340px; gap: var(--space-5); align-items: start; }
fieldset {
  border: 1px solid var(--border); border-radius: var(--radius-md); margin: 0 0 14px; padding: var(--space-3) var(--space-4);
  background: var(--gray-50);
}
legend { font-size: var(--fs-sm); font-weight: 700; color: var(--primary); padding: 0 8px; background: var(--gray-50); border-radius: var(--radius-xs); }
.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.field { display: block; font-size: var(--fs-sm); color: var(--text-muted); font-weight: 600; }
.field > span { display: inline; }
.field > i { display: inline; margin-left: 2px; color: var(--red); font-style: normal; }
/* 表单网格内字段：标签+星号同行，控件第二行 */
.form-grid .field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  align-items: flex-start;
}
.form-grid .field > span { display: inline; min-width: 0; }
.form-grid .field > i { display: inline; margin-left: 2px; color: var(--red); font-style: normal; }
.form-grid .field > input,
.form-grid .field > select,
.form-grid .field > textarea { width: 100%; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field i { color: var(--red); font-style: normal; margin-left: 2px; }
.field input, .field select, .field textarea {
  border: 1px solid transparent; border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); font-size: var(--fs-md);
  color: var(--text); background: var(--input-fill, #f2f4f8); font-weight: 400; transition: border-color .15s, background .15s, box-shadow .15s;
  margin-top: 5px; display: block;
}
.field input:hover, .field select:hover, .field textarea:hover { background: var(--input-fill-hover, #eceff5); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
.field textarea { resize: vertical; font-family: inherit; }

/* 指标预览 */
.metrics-preview { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); margin: 6px 0 16px; }
.metric-box { background: var(--primary-soft); border-radius: var(--radius-md); padding: var(--space-3) var(--space-3); text-align: center; border: 1px solid #dbe7ff; }
.metric-box .m-label { font-size: 11px; color: var(--text-muted); }
.metric-box .m-value { font-size: var(--fs-xl); font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.metric-box.good { background: var(--green-soft); border-color: #bbf7d0; }
.metric-box.good .m-value { color: var(--green); }
.metric-box.warn { background: var(--amber-soft); border-color: #fde68a; }
.metric-box.warn .m-value { color: var(--amber); }
.metric-box.bad { background: var(--red-soft); border-color: #fecaca; }
.metric-box.bad .m-value { color: var(--red); }

.form-actions { display: flex; justify-content: flex-end; gap: var(--space-3); margin-top: 4px; }
.form-tip { margin-top: 10px; font-size: var(--fs-sm); color: var(--green); text-align: right; min-height: 18px; font-weight: 500; }

/* 按钮 */
.btn {
  border: none; border-radius: var(--radius-sm); padding: var(--space-2) var(--space-4); font-size: var(--fs-md); font-weight: 600;
  cursor: pointer; transition: all .15s ease; position: relative;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary-grad); color: #fff; box-shadow: 0 3px 10px rgba(37,99,235,.28); }
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 4px 14px rgba(37,99,235,.36); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border-strong); }
.btn-ghost:hover { background: var(--bg); color: var(--text); border-color: var(--border-strong); }
.btn-outline { background: var(--card); color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary-soft); }
/* ===== 班组排程工具栏 M3 精致化 ===== */
#tab-plan .plan-filter .btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; padding: 8px 14px; }
#tab-plan .plan-filter .btn svg { width: 14px; height: 14px; flex: none; }
#tab-plan .plan-filter .btn-outline { transition: transform .15s, box-shadow .15s, background .15s, border-color .15s; }
#tab-plan .plan-filter .btn-outline:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(37,99,235,.12); border-color: #c7d8fe; }
#tab-plan .plan-filter .btn-sm { border-radius: 9px; padding: 4px 9px; }
#tab-plan .plan-filter input[type=month] { min-width: 116px; }
/* 20260929CTQB：工具栏自适应一排（方案A·容器查询）——按工具栏自身可用宽连续收缩，
   侧栏开合 / 页面聚焦 / 分屏拖动自动正确，永不折行。
   实测标定：全文字约需 1250+；档位：≤1300 收紧 / ≤1150 次要按钮转图标（查询·新增排程留字）
        / ≤880 全图标+字段文字收 / 超窄横向滚动兜底（≤768 视口另有内联 !important 兜底块，已 :not(.plan-filter) 排除） */
/* 20260929OYCL：overflow-x:auto 使 overflow-y 被动变 auto，Chrome 对 flex 滚动容器
   scrollHeight 多算 3px（37>34）→ 悬停滚轮被劫持上下窜。overflow-y:clip 垂直封死
   （连编程滚动都禁止），老内核退 hidden。横向超窄兜底保留。 */
#tab-plan .plan-filter { container-type: inline-size; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
@supports (overflow-y: clip) {
  #tab-plan .plan-filter { overflow-y: clip; }
}
#tab-plan .plan-filter::-webkit-scrollbar { display: none; height: 0; }
#tab-plan .plan-filter .btn { flex: none; white-space: nowrap; }
@container (max-width: 1300px) {
  #tab-plan .plan-filter .btn { padding-left: 9px; padding-right: 9px; gap: 5px; }
}
@container (max-width: 1150px) {
  #tab-plan .plan-filter .btn .bt { display: none; }
  #tab-plan .plan-filter .btn { gap: 0; }
  #tab-plan .plan-filter .btn#pp_query .bt,
  #tab-plan .plan-filter .btn#pp_add .bt { display: inline; }
  #tab-plan .plan-filter .btn#pp_query,
  #tab-plan .plan-filter .btn#pp_add { gap: 6px; }
  /* 图标档降噪：次要工具按钮转 ghost（去描边），查询/新增排程保留边框层次 */
  #tab-plan .plan-filter .btn:not(#pp_query):not(#pp_add) { border-color: transparent; background: transparent; }
  #tab-plan .plan-filter .btn:not(#pp_query):not(#pp_add):hover { background: #eff4ff; transform: none; box-shadow: none; }
}
@container (max-width: 880px) {
  #tab-plan .plan-filter .btn .bt,
  #tab-plan .plan-filter .btn#pp_query .bt,
  #tab-plan .plan-filter .btn#pp_add .bt { display: none; }
  #tab-plan .plan-filter .field > span { display: none; }
  #tab-plan .plan-filter input[type=month] { width: 96px !important; min-width: 96px; }
}
@supports not (container-type: inline-size) {
  /* 老内核兜底：退回视口断点（可用宽≈视口-144） */
  @media (max-width: 1740px) { #tab-plan .plan-filter .btn { padding-left: 9px; padding-right: 9px; } }
  @media (max-width: 1590px) { #tab-plan .plan-filter .btn .bt { display: none; } #tab-plan .plan-filter .btn { gap: 0; } }
  @media (max-width: 1320px) { #tab-plan .plan-filter .field > span { display: none; } }
}

/* 20260929HARM：月份步进器一体化——[‹ 2026-09 ›] 单一圆角边框容器，替代三个独立圆角散件 */
#tab-plan .plan-filter .pp-month-stepper { display: inline-flex; align-items: center; height: 34px; border: 1px solid #d8dee9; border-radius: var(--radius-sm); background: var(--card); overflow: hidden; flex: none; }
#tab-plan .plan-filter .pp-month-stepper input[type=month] { border: none; border-radius: 0; background: transparent; height: 100%; width: 108px; min-width: 108px; padding: 0 2px; text-align: center; }
#tab-plan .plan-filter .pp-month-stepper .pp-mnav { width: 26px; height: 100%; display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; color: #64748b; cursor: pointer; flex: none; padding: 0; }
#tab-plan .plan-filter .pp-month-stepper .pp-mnav:hover { background: #eff4ff; color: #2563eb; }
#tab-plan .plan-filter .pp-month-stepper .pp-mnav svg { width: 13px; height: 13px; flex: none; }

.btn-sm { padding: var(--space-1) var(--space-3); font-size: var(--fs-sm); border-radius: var(--radius-sm); }

/* 开关 */
.switch { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-sm); color: var(--text-muted); cursor: pointer; user-select: none; }
.switch input { accent-color: var(--primary); width: 15px; height: 15px; }

/* ---------- 今日卡片 ---------- */
.today-card { position: sticky; top: 90px; }
.badge {
  background: var(--primary-soft); color: var(--primary); font-size: var(--fs-sm); font-weight: 700;
  padding: var(--space-1) var(--space-3); border-radius: var(--radius-full);
}
.today-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); margin-bottom: 12px; }
.today-list { max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-2); }
.today-item { border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-2) var(--space-3); font-size: var(--fs-sm); background: var(--gray-50); }
.today-item .t-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.today-item .t-title { font-weight: 700; }
.today-item .t-del { color: var(--text-muted); cursor: pointer; border: none; background: none; font-size: var(--fs-md); border-radius: var(--radius-sm); padding: var(--space-1) var(--space-1); }
.today-item .t-del:hover { color: var(--red); background: var(--red-soft); }
.today-item .t-meta { color: var(--text-muted); font-size: 11px; display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* ---------- 查询 ---------- */
.filter-bar { display: flex; align-items: flex-end; gap: var(--space-3); flex-wrap: wrap; }
.filter-bar .field { min-width: 120px; }
/* 报表查询 · 一体工具条（方案B） */
.filter-bar.flat-toolbar { align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); background: var(--card); border: 1px solid #e6e9f2; border-radius: var(--radius-md); box-shadow: 0 3px 14px rgba(16,24,40,.06); }
/* 20261009TBFIT 单行自适应：永不折行；关键词输入弹性让位；窄屏间距收紧；<1230px 次要按钮只留图标（title 兜底）；极窄横向滑动兜底 */
.filter-bar.flat-toolbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.filter-bar.flat-toolbar::-webkit-scrollbar { display: none; }
.filter-bar.flat-toolbar > * { flex: none; }
.filter-bar.flat-toolbar .chip.kw { flex: 1 1 auto; min-width: 110px; max-width: 236px; }
.filter-bar.flat-toolbar .chip.kw input { width: 100%; max-width: none; }
.filter-bar.flat-toolbar .chip.kw i { white-space: nowrap; }
.filter-bar.flat-toolbar #btnExport { margin-left: auto; }
@media (max-width: 1470px) { .filter-bar.flat-toolbar { gap: 7px; padding-left: 9px; padding-right: 9px; } .filter-bar.flat-toolbar .chip { padding: 0 7px; } .filter-bar.flat-toolbar .chip.kw { max-width: 200px; } }
@media (max-width: 1290px) { .filter-bar.flat-toolbar { gap: 6px; } .filter-bar.flat-toolbar .chip { padding: 0 5px; } .filter-bar.flat-toolbar .tb-div { display: none; } .filter-bar.flat-toolbar .chip.kw { flex: 0 0 auto; width: 120px; } .filter-bar.flat-toolbar .chip.kw i { display: none; } .filter-bar.flat-toolbar #btnExport .txt, .filter-bar.flat-toolbar #btnImport .txt, .filter-bar.flat-toolbar #btnBackup .txt { display: none; } .filter-bar.flat-toolbar #btnExport, .filter-bar.flat-toolbar #btnImport, .filter-bar.flat-toolbar #btnBackup { padding: 0 9px; } }

.filter-bar.flat-toolbar .chip { display: inline-flex; align-items: center; gap: var(--space-2); height: 30px; padding: 0 10px; border-radius: var(--radius-sm); background: var(--gray-100); border: 1px solid var(--gray-100); font-size: var(--fs-sm); color: #374151; }
.filter-bar.flat-toolbar .chip i { font-style: normal; color: #6b7280; font-weight: 600; }
.filter-bar.flat-toolbar .chip select, .filter-bar.flat-toolbar .chip input { height: 100%; min-width: 0; border: none; background: transparent; font-size: var(--fs-sm); color: #1f2937; outline: none; padding: 0 2px; }
.filter-bar.flat-toolbar .chip select { max-width: 110px; }
.filter-bar.flat-toolbar .chip input { max-width: 170px; }
.filter-bar.flat-toolbar .chip.qk { cursor: pointer; }
.filter-bar.flat-toolbar .chip.qk:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.filter-bar.flat-toolbar .chip.qk.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; box-shadow: 0 2px 6px rgba(37,99,235,.28); }
.filter-bar.flat-toolbar .tb-div { width: 1px; height: 24px; background: var(--gray-200); }
.filter-bar.flat-toolbar .btn-pri { height: 32px; padding: 0 16px; border: none; border-radius: var(--radius-sm); background: var(--primary-grad); color: #fff; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: var(--space-1); box-shadow: 0 2px 8px rgba(37,99,235,.22); }
.filter-bar.flat-toolbar .btn-pri:hover { filter: brightness(1.05); }
.filter-bar.flat-toolbar .btn-i { display: inline-flex; align-items: center; gap: var(--space-1); height: 30px; padding: 0 10px; border: none; background: transparent; color: #6b7280; font-size: var(--fs-sm); cursor: pointer; border-radius: var(--radius-sm); }
.filter-bar.flat-toolbar .btn-i:hover { background: var(--gray-100); color: #374151; }
.filter-bar.flat-toolbar .btn-i svg { width: 13px; height: 13px; }

.table-wrap { overflow-x: auto; border-radius: var(--radius-md); }
/* C1（20261003ORDERS）工单列表：容器限高，让横向滚动条常驻视口，不再沉到页面底部。
   仅作用于 #tab-orders，避免波及日报/看板等其他复用 .table-wrap 的页面。 */
#tab-orders .table-wrap { max-height: calc(100vh - 260px); min-height: 320px; overflow-y: auto; }
/* A2（20261003ORDERS）工单列表：款号升为视觉主位，订单号降为副行小字 */
#tab-orders .of-style { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; font-size: 13px; line-height: 1.35; }
#tab-orders .of-style-sub { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 400; font-size: 11px; line-height: 1.3; color: var(--gray-500); }
/* 报表查询聚合行（月/季/年）浅紫底 */
.gran-row td { background: #faf5ff !important; }
.gran-row:hover td { background: #f5ecff !important; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-base); }
thead th {
  text-align: left; padding: var(--space-3) var(--space-3); background: var(--th-bg); color: var(--text-muted); font-weight: 700; font-size: var(--fs-sm);
  border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
tbody td { padding: var(--space-3) var(--space-3); border-bottom: 1px solid var(--gray-100); white-space: nowrap; }
tbody tr { transition: background .12s; }
tbody tr:nth-child(even) { background: var(--gray-50); }
tbody tr:hover { background: var(--primary-soft); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: var(--space-1) var(--space-2); border-radius: var(--radius-full); font-size: 11px; font-weight: 700; }
.pill.good { background: var(--green-soft); color: var(--green); }
.pill.warn { background: var(--amber-soft); color: var(--amber); }
.pill.bad { background: var(--red-soft); color: var(--red); }
.pill.neutral { background: var(--gray-100); color: var(--text-muted); }
.factory-tag {
  display: inline-block; padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); font-size: 11px; font-weight: 700; color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.empty-state { text-align: center; color: var(--text-muted); padding: 40px 0; display: none; }

/* ---------- 看板 ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--space-3); margin-bottom: 20px; }
#costKpiGrid { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: var(--space-3); margin-bottom: 14px; }
#costKpiGrid .kpi { padding: var(--space-3) var(--space-3); }
#costKpiGrid .kpi .k-value { font-size: var(--fs-xl); margin: 3px 0 1px; }
#costKpiGrid .kpi .k-sub { font-size: var(--fs-xs); }
/* 看板内宽表：超过容器时横向滚动而非压缩错位 */
.layout-item .table-wrap table { min-width: 900px; }
#rankTable table { min-width: 760px; }
/* 日报明细宽表：15列，防止窄视口压缩错位 */
#reportTable { min-width: 1200px; }
#reportTable td, #reportTable th { white-space: nowrap; }
/* 20261003ALIGN 表头对齐统一规则
   根因：thead th 全局 text-align:left 硬编码，但各表 td 有各自的对齐方式
   （.num 右对齐、内联 center 等），导致表头文字与数据内容视觉错位。
   实测全站 10 张表里 5 张受影响、33 列错位，最大 89px（orders 操作列）。

   设计：表头对齐方式与该列数据对齐方式「绑定」，用 class 显式声明而非全局猜测。
     - th.num  → 右对齐（数据是 .num 数字）
     - th.ctr  → 居中（数据是徽章/短文本）
     - 无 class → 保持 left（文本列，如工厂名/款号，本就该左对齐）

   这是「补齐」不是「重做」：app-analytics.js 早已在用 <th class="num"> 配 <td class="num">，
   但原先规则限定为 #reportTable th.num / #factoryTable th.num，其他表写 class 也不生效。
   现提升为全局规则，以后任何表标注 class 即自动生效。 */
thead th.num { text-align: right; }
thead th.ctr { text-align: center; }
/* 勾选框列内容天然居中 */
thead th.col-check, thead th:first-child > input[type="checkbox"] { text-align: center; }

/* 数据格侧对称定义（补齐）
   实测踩坑：.num 早有全局规则（line 386），但 .ctr 之前**只有 thead th.ctr**，
   数据格 <td class="ctr"> 无任何规则 → 回落到浏览器默认 text-align:start（左），
   于是 orders 的徽章/状态/操作列表头居中、数据仍左对齐（dev 实测 5 列错位）。
   这里把 .ctr 提升为全局，与 .num 对称；全站仅本次新增的 15 处 ctr 在用，无冲突。 */
.ctr { text-align: center; }
td.col-check, .col-check { text-align: center; }

/* 列宽自适应（W2：min/max 夹逼）
   实测 slack 浪费：orders 操作列 252px/文字 24px（浪费 90.5%）、
   list 工厂列 358px/文字 25px（93%）、restdays 工厂列 338px/文字 24px（92.9%）。
   下界防挤压、上界防撑爆，让列宽跟随内容而非固定值。 */
#tab-orders .table-wrap td.op-cell,
#tab-orders .table-wrap th.op-cell { min-width: 176px; max-width: 200px; }

/* 看板布局自定义（管理员可拖拽排序） */
.dash-layout { display: flex; flex-direction: column; gap: var(--space-5); }
.dash-layout > .layout-item > .dash-top,
.dash-layout > .layout-item > .dash-grid { margin-bottom: 0; }
.layout-item { position: relative; border-radius: var(--radius-md); transition: opacity .15s, transform .15s, box-shadow .15s; }
.layout-item.editing { border: 2px dashed #c7d2fe; padding: var(--space-4); background: var(--gray-50); box-shadow: 0 4px 14px rgba(37,99,235,.06); }
.layout-item.editing .card { box-shadow: none; }
.layout-item.editing::after {
  content: "⠿"; position: absolute; top: 8px; right: 12px;
  font-size: var(--fs-xl); line-height: 1; color: #93c5fd; cursor: grab; user-select: none;
}
.layout-item.drag-over { outline: 2px dashed var(--primary); outline-offset: 3px; }
.layout-toolbar {
  display: flex; align-items: center; gap: var(--space-3);
  background: var(--card); border: 1px solid var(--gray-200); border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-3); box-shadow: var(--shadow);
}
.layout-tip { font-size: var(--fs-sm); color: #6b7280; margin-right: auto; }

/* 看板顶部：预警 + KPI 左右分栏 */
.dash-top { display: flex; flex-direction: column; gap: var(--space-5); margin-bottom: 20px; }
.dash-top .alert-card { margin-bottom: 0; width: 100%; }
.dash-top .kpi-grid { display: block; gap: var(--space-3); margin-bottom: 0; align-content: start; }
.kpi {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow); padding: var(--space-4) var(--space-5); transition: transform .15s, box-shadow .15s;
}
.kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16,24,40,.08); }
.kpi .k-label { font-size: var(--fs-sm); color: var(--text-muted); font-weight: 600; }
.kpi .k-value { font-size: var(--fs-2xl); font-weight: 800; margin: 5px 0 2px; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.kpi .k-sub { font-size: 11px; color: var(--text-muted); }
.kpi.accent { background: var(--primary-grad); color: #fff; border: none; box-shadow: 0 8px 22px rgba(37,99,235,.32); }
.kpi.accent:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(37,99,235,.4); }
.kpi.accent .k-label, .kpi.accent .k-sub { color: rgba(255,255,255,.85); }

/* KPI分组卡片布局 */
.kpi-groups { display: flex; gap: var(--space-3); width: 100%; }
.kpi-group {
  flex: 1 1 0; min-width: 0; background: linear-gradient(180deg, var(--gray-50) 0%, #fff 100%);
  border-radius: var(--radius-md); padding: var(--space-3); border: 1px solid var(--gray-200);
  position: relative; overflow: hidden;
}
.kpi-group::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.kpi-group.production::before { background: linear-gradient(90deg, var(--primary), #60a5fa); }
.kpi-group.efficiency::before { background: linear-gradient(90deg, #16a34a, #4ade80); }
.kpi-group.quality::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.kpi-group-header {
  display: flex; align-items: center; gap: var(--space-2); margin-bottom: 8px;
  padding-bottom: 6px; border-bottom: 1px dashed var(--gray-200);
}
.kpi-group-icon {
  width: 24px; height: 24px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.kpi-group.production .kpi-group-icon { background: var(--primary-soft); }
.kpi-group.efficiency .kpi-group-icon { background: #dcfce7; }
.kpi-group.quality .kpi-group-icon { background: #fef3c7; }
.kpi-group-icon svg { width: 14px; height: 14px; }
.kpi-group.production .kpi-group-icon svg { color: var(--primary); }
.kpi-group.efficiency .kpi-group-icon svg { color: #16a34a; }
.kpi-group.quality .kpi-group-icon svg { color: #f59e0b; }
.kpi-group-title { font-size: var(--fs-sm); font-weight: 600; color: var(--gray-700); white-space: nowrap; }
.kpi-group-items { display: flex; gap: var(--space-2); width: 100%; }
.kpi-group-item {
  flex: 1 1 0; min-width: 0; background: var(--card); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-1);
  text-align: center; border: 1px solid var(--gray-100); transition: all 0.2s; overflow: hidden;
}
.kpi-group-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); transform: translateY(-1px); }
.kpi-group-item.highlight {
  background: linear-gradient(135deg, #2563eb, #1d4ed8); border: none;
}
.kpi-group-item.highlight .k-label { color: rgba(255,255,255,0.8); }
.kpi-group-item.highlight .k-value { color: #fff; }
.kpi-group-item.highlight .k-sub { color: rgba(255,255,255,0.7); }
.kpi-group-item .k-label { font-size: var(--fs-xs); color: var(--gray-600); margin-bottom: 3px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-group-item .k-value { font-size: var(--fs-md); font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: visible; word-break: break-all; }
.kpi-group-item .k-sub { font-size: var(--fs-xs); color: var(--gray-500); margin-top: 2px; display: flex; align-items: center; gap: var(--space-1); justify-content: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); margin-bottom: 20px; align-items: stretch; }
.dash-grid .card { display: flex; flex-direction: column; }
.dash-grid .card .card-body, .dash-grid .card .chart-box { flex: 1; }
.chart-box { height: 280px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
#rankChart { display: block; align-items: initial; justify-content: initial; }
.chart-box svg { width: 100%; height: auto; min-width: 640px; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(23,37,84,.32); display: flex; align-items: center; justify-content: center;
  z-index: 10001; padding: var(--space-5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.modal-mask[hidden] { display: none !important; }
.modal {
  background: rgba(255,255,255,.72); border-radius: var(--radius-lg); width: 720px; max-width: 100%; max-height: 90vh; overflow: hidden;
  border: 1px solid rgba(255,255,255,.65); box-shadow: 0 24px 60px rgba(15,23,42,.22), inset 0 1px 0 rgba(255,255,255,.75);
  backdrop-filter: blur(26px) saturate(170%); -webkit-backdrop-filter: blur(26px) saturate(170%);
  animation: modalIn .2s ease; display: flex; flex-direction: column;
}
/* 普通弹窗：头部固定，内容区滚动 */
.modal .modal-head {
  display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid rgba(226,232,240,.6); flex-shrink: 0;
  background: linear-gradient(135deg, rgba(248,250,252,.6), rgba(238,242,255,.4));
  border-radius: 18px 18px 0 0;
}
.modal .modal-head h3 { font-size: var(--fs-lg); font-weight: 700; color: var(--text); margin: 0; }
.modal .modal-head .btn-ghost { width: 32px; height: 32px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); border: 1px solid rgba(226,232,240,.8); background: rgba(255,255,255,.6); }
.modal .modal-head .btn-ghost:hover { background: rgba(254,242,242,.8); color: #dc2626; border-color: #fecaca; }
.modal .modal-body { padding: var(--space-5) var(--space-5); overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.modal .modal-body::-webkit-scrollbar { width: 6px; }
.modal .modal-body::-webkit-scrollbar-track { background: transparent; }
.modal .modal-body::-webkit-scrollbar-thumb { background: rgba(100,116,139,.3); border-radius: var(--radius-xs); }
.modal .modal-body::-webkit-scrollbar-thumb:hover { background: rgba(100,116,139,.5); }
.modal .modal-foot {
  display: flex; justify-content: flex-end; gap: var(--space-3); padding: var(--space-3) var(--space-5);
  border-top: 1px solid rgba(226,232,240,.6); flex-shrink: 0;
  background: linear-gradient(135deg, rgba(248,250,252,.4), rgba(238,242,255,.3));
  border-radius: 0 0 18px 18px;
}
/* 下钻详情大弹窗：玻璃拟态 + 头部渐变圆角 + 全列展示 */
.modal-drill { width: 98vw; max-width: 1920px; display: flex; flex-direction: column; overflow: hidden; height: 94vh; }
.modal-drill .modal-head {
  background: linear-gradient(135deg, rgba(248,250,252,.82) 0%, rgba(238,242,255,.7) 100%);
  border-radius: 18px 18px 0 0; border-bottom: 1px solid rgba(224,231,255,.75); position: sticky; top: 0; z-index: 2;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.modal-drill .modal-head h3 { font-size: var(--fs-lg); color: #1e3a8a; display: flex; align-items: center; gap: var(--space-2); }
.modal-drill .modal-head h3::before { content: ''; width: 4px; height: 18px; border-radius: var(--radius-xs); background: var(--primary); display: inline-block; }
.modal-drill .modal-body { padding: var(--space-3) var(--space-4); display: flex; flex-direction: column; overflow: hidden; flex: 1 1 auto; min-height: 0; }
.modal-drill table { font-size: var(--fs-base); white-space: nowrap; }
.modal-drill table th, .modal-drill table td { padding: var(--space-2) var(--space-3); }
.modal-drill table th { background: rgba(241,245,249,.72); position: sticky; top: 0; z-index: 1; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.modal-drill table tbody tr:nth-child(even) { background: rgba(248,250,252,.45); }
.modal-drill table tbody tr:hover { background: rgba(224,231,255,.4); }
.modal-drill .table-wrap { border: 1px solid rgba(226,232,240,.8); border-radius: var(--radius-md); background: rgba(255,255,255,.5); flex: 1 1 auto !important; min-height: 0; max-height: none !important; overflow-y: auto !important; }
/* 玻璃风滚动条：细圆角半透明，悬停加深，不占布局宽度 */
/* 玻璃风滚动栏：内容不满时自动隐藏，可滚动时才显示短圆角 thumb */
.modal-drill .table-wrap { scrollbar-width: thin; scrollbar-color: rgba(100,116,139,.4) transparent; }
.modal-drill .table-wrap::-webkit-scrollbar { width: 8px; height: 8px; }
.modal-drill .table-wrap::-webkit-scrollbar-track { background: transparent; }
.modal-drill .table-wrap::-webkit-scrollbar-thumb { background: rgba(100,116,139,.4); border-radius: var(--radius-xs); }
.modal-drill .table-wrap::-webkit-scrollbar-thumb:hover { background: rgba(59,130,246,.7); }
.modal-drill .table-wrap::-webkit-scrollbar-corner { background: transparent; }
/* 弹窗整体滚动栏保持一致 */
.modal-drill { scrollbar-width: thin; scrollbar-color: rgba(100,116,139,.4) transparent; }
.modal-drill::-webkit-scrollbar { width: 8px; }
.modal-drill::-webkit-scrollbar-thumb { background: rgba(100,116,139,.4); border-radius: var(--radius-xs); }
.modal-drill::-webkit-scrollbar-thumb:hover { background: rgba(59,130,246,.7); }
.modal-drill .badge { font-size: var(--fs-base); padding: var(--space-1) var(--space-3); background: rgba(224,231,255,.6); }
.modal-drill .muted { font-size: var(--fs-base) !important; }
/* 日报详情大弹窗：宽屏 + 头部固定 + 分组信息滚动展示 */
.modal-detail { width: 92vw; max-width: 1420px; display: flex; flex-direction: column; overflow: hidden; height: 88vh; }
.modal-detail .modal-head {
  background: linear-gradient(135deg, rgba(248,250,252,.85) 0%, rgba(238,242,255,.72) 100%);
  border-radius: 18px 18px 0 0; border-bottom: 1px solid rgba(224,231,255,.75); flex: none;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.modal-detail .modal-head h3 { font-size: var(--fs-lg); color: #1e3a8a; display: flex; align-items: center; gap: var(--space-2); }
.modal-detail .modal-head h3::before { content: ''; width: 4px; height: 18px; border-radius: var(--radius-xs); background: var(--primary); display: inline-block; }
.modal-detail .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: var(--space-5) var(--space-6); }
.modal-detail .modal-body::-webkit-scrollbar { width: 8px; }
.modal-detail .modal-body::-webkit-scrollbar-thumb { background: rgba(100,116,139,.4); border-radius: var(--radius-xs); }
.modal-detail .modal-body::-webkit-scrollbar-thumb:hover { background: rgba(59,130,246,.7); }
/* 分组标题：渐变竖条 + 标题 */
.edit-subtitle {
  display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-base); font-weight: 700; color: #1e3a8a;
  margin: 18px 0 10px; letter-spacing: .3px;
}
.edit-subtitle::before { content: ''; width: 4px; height: 14px; border-radius: var(--radius-xs); background: var(--primary); flex: none; }
.edit-subtitle:first-child { margin-top: 2px; }
/* 详情字段网格：宽屏 6 列卡片 */
.modal-detail .drill-detail-grid { grid-template-columns: repeat(6, 1fr); gap: var(--space-3); }
.modal-detail .drill-detail-grid > div {
  background: rgba(255,255,255,.55); border: 1px solid rgba(226,232,240,.8); border-radius: var(--radius-md); padding: var(--space-2) var(--space-3);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 1px 3px rgba(15,23,42,.04);
}
.modal-detail .drill-detail-grid label { font-size: 11px; color: var(--gray-500); margin-bottom: 3px; }
.modal-detail .drill-detail-grid span { font-size: var(--fs-md); font-weight: 600; color: var(--text); }
@media (max-width: 1100px) {
  .modal-detail .drill-detail-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .modal-detail .drill-detail-grid { grid-template-columns: repeat(2, 1fr); }
}
/* 明细统计栏（上边栏） */
.drill-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: var(--space-3); margin-bottom: 10px; }
.drill-stats .ds {
  background: rgba(255,255,255,.55); border: 1px solid rgba(226,232,240,.8); border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3); display: flex; flex-direction: column; gap: var(--space-1); min-width: 0;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 1px 3px rgba(15,23,42,.04);
}
.drill-stats .ds-l { font-size: 11px; color: var(--gray-600); white-space: nowrap; }
.drill-stats .ds-v { font-size: var(--fs-lg); font-weight: 700; color: var(--gray-900); line-height: 1.1; white-space: nowrap; }
.drill-stats .ds.red .ds-v { color: #dc2626; }
.drill-stats .ds.amber .ds-v { color: #d97706; }
.drill-stats .ds.green .ds-v { color: #059669; }
.drill-stats .ds.accent .ds-v { color: #2563eb; }
.drill-meta { font-size: var(--fs-sm); color: var(--gray-500); margin-bottom: 8px; }
@keyframes modalIn { from { opacity: 0; transform: scale(.97) translateY(8px); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5); border-bottom: 1px solid rgba(226,232,240,.7); }
.modal-head h3 { margin: 0; font-size: var(--fs-lg); }
.modal-head .btn-ghost { width: 34px; height: 34px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-md); flex: none; background: rgba(255,255,255,.5); }
.modal-head .btn-ghost:hover { background: rgba(37,99,235,.1); color: #2563eb; }
.modal-head .btn-ghost .ico { width: 16px; height: 16px; }
.modal-body { padding: var(--space-5); }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-top: 1px solid rgba(226,232,240,.7); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #111827; color: #fff; padding: var(--space-3) var(--space-6); border-radius: var(--radius-md); font-size: var(--fs-base);
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 20002; box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--red); }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .entry-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
}

/* ---------- 排名 ---------- */
.rank-controls { display: flex; gap: var(--space-2); }
.rank-controls select { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: var(--space-1) var(--space-2); font-size: var(--fs-sm); background: var(--card); color: var(--text); }
.rank-indiv { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-1); border-bottom: 1px solid var(--border); }
.rank-indiv:last-child { border-bottom: none; }
.rank-top-row td { background: #fffbeb; }
.rank-no {
  width: 27px; height: 27px; border-radius: 50%; background: var(--primary-soft); color: var(--primary);
  font-weight: 800; font-size: var(--fs-sm); display: flex; align-items: center; justify-content: center; flex: none;
}
.rank-no.top { background: var(--primary-grad); color: #fff; box-shadow: 0 3px 8px rgba(37,99,235,.3); }
.rank-name { flex: 1; font-weight: 600; min-width: 80px; }
.rank-bar-wrap { flex: 2; height: 11px; background: var(--gray-100); border-radius: var(--radius-sm); overflow: hidden; min-width: 60px; }
.rank-bar { height: 100%; background: linear-gradient(90deg, #60a5fa, #2563eb); border-radius: var(--radius-sm); transition: width .4s ease; }
.rank-val { width: 84px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-rate { width: 64px; text-align: right; font-size: var(--fs-sm); color: var(--text-muted); }

/* ---------- 导入 ---------- */
.import-tip { font-size: var(--fs-sm); color: var(--text-muted); margin: 0 0 14px; line-height: 1.6; }
.import-row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-bottom: 14px; }
.import-file-info { font-size: var(--fs-sm); color: var(--text-muted); }
.import-preview { max-height: 280px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-md); }
.import-stat { font-size: var(--fs-base); margin: 8px 0; }
.import-stat .ok { color: var(--green); font-weight: 700; }
.import-stat .fail { color: var(--red); font-weight: 700; }
.import-err { font-size: 11px; color: var(--red); margin: 2px 0; }

/* ---------- 备份 / 恢复 ---------- */
.backup-list { display: flex; flex-direction: column; gap: var(--space-2); margin-top: 6px; max-height: 320px; overflow-y: auto; }
.backup-item {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--gray-50);
  transition: background .12s;
}
.backup-item:hover { background: #f4f8ff; }
.backup-meta { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.backup-name { font-size: var(--fs-base); font-weight: 600; word-break: break-all; }
.backup-name em {
  font-style: normal; font-size: var(--fs-xs); color: var(--green); background: var(--green-soft);
  border-radius: var(--radius-xs); padding: var(--space-1) var(--space-2); margin-left: 6px; vertical-align: 1px;
}
.backup-sub { font-size: 11px; color: var(--text-muted); }
.backup-actions { display: flex; gap: var(--space-2); flex: none; align-items: center; }
.backup-download-wrap { position: relative; }
.backup-download-menu {
  display: none; position: absolute; right: 0; top: 100%; margin-top: 4px;
  background: var(--card); border: 1px solid var(--gray-200); border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: var(--space-2); min-width: 200px; z-index: 100;
}
.backup-download-menu.show { display: block; }
.backup-download-option {
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-sm); cursor: pointer; transition: background .12s;
}
.backup-download-option:hover { background: #f0f7ff; }
.backup-download-option .ico { width: 18px; height: 18px; color: #2563eb; flex: none; }
.backup-download-option span { font-size: var(--fs-base); font-weight: 600; color: var(--text); flex: 1; }
.backup-download-option em { font-style: normal; font-size: var(--fs-xs); color: var(--gray-500); }

/* ---------- 恢复确认弹窗 ---------- */
.restore-modal { max-width: 460px; }
.restore-head { border-bottom: 2px solid #fee2e2; }
.restore-head h3 { color: #b91c1c; }
.restore-warning-box {
  display: flex; gap: var(--space-3); align-items: flex-start;
  background: linear-gradient(135deg, #fef2f2, #fff7ed);
  border: 1px solid #fecaca; border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4); margin-bottom: 16px;
}
.restore-warning-icon { font-size: var(--fs-xl); line-height: 1; flex: none; }
.restore-warning-content { flex: 1; min-width: 0; }
.restore-warning-title { font-size: var(--fs-md); font-weight: 700; color: #b91c1c; margin-bottom: 4px; }
.restore-warning-desc { font-size: var(--fs-sm); color: #7f1d1d; line-height: 1.6; }
.restore-file-info {
  background: var(--gray-50); border: 1px dashed var(--gray-400); border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-3); margin-bottom: 16px;
}
.restore-file-label { font-size: 11px; color: var(--gray-600); margin-bottom: 4px; }
.restore-file-name { font-size: var(--fs-base); font-weight: 600; color: var(--text); word-break: break-all; }
.restore-form-group { margin-bottom: 14px; }
.restore-form-label {
  display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--gray-800);
  margin-bottom: 6px;
}
.restore-form-label .required { color: #dc2626; }
.restore-input {
  width: 100%; padding: var(--space-3) var(--space-3); font-size: var(--fs-base);
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: var(--input-fill, #f2f4f8); color: var(--text);
  transition: border-color .15s, background .15s, box-shadow .15s;
  box-sizing: border-box;
}
.restore-input:focus {
  outline: none; border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.restore-form-hint { font-size: 11px; color: var(--gray-500); margin-top: 5px; }
.restore-form-hint code {
  background: var(--gray-100); padding: var(--space-1) var(--space-1); border-radius: var(--radius-xs);
  font-size: 11px; color: var(--gray-700); font-weight: 600;
}
.restore-error {
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
  font-size: var(--fs-sm); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.btn-danger {
  background: var(--red);
  color: #fff; border: none;
  padding: var(--space-2) var(--space-5); border-radius: var(--radius-sm);
  font-size: var(--fs-base); font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: var(--space-2);
  transition: transform .1s, box-shadow .15s, opacity .15s;
}
.btn-danger:hover { box-shadow: 0 4px 12px rgba(239,68,68,.35); transform: translateY(-1px); }
.btn-danger:active { transform: translateY(0); }
.btn-danger:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- 周期环比 ---------- */
.compare-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); padding: 4px 0; }
.compare-block {
  border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-4) var(--space-4);
  background: linear-gradient(180deg, var(--gray-50), #f4f8ff);
  transition: transform .15s, box-shadow .15s;
}
.compare-block:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(16,24,40,.07); }
.compare-block { border-top: 3px solid var(--border); border-radius: var(--radius-md); }
.compare-block.cmp-up { border-top-color: var(--green); }
.compare-block.cmp-down { border-top-color: var(--red); }
.compare-block.cmp-flat { border-top-color: var(--gray-400); }
.cmp-title { font-weight: 700; font-size: var(--fs-md); color: var(--text); display: flex; align-items: baseline; gap: var(--space-2); margin-bottom: 10px; }
.cmp-sub { font-weight: 400; font-size: 11px; color: var(--text-muted); }
.cmp-row { display: flex; align-items: center; gap: var(--space-2); padding: 4px 0; }
.cmp-label { width: 48px; color: var(--text-muted); font-size: var(--fs-sm); }
.cmp-val { font-size: var(--fs-xl); font-weight: 700; color: var(--text); min-width: 72px; font-variant-numeric: tabular-nums; }
.cmp-val.met { color: var(--green); }
.cmp-delta { font-size: var(--fs-sm); font-weight: 700; }
.cmp-delta.up { color: var(--red); }
.cmp-delta.down { color: #059669; }
.cmp-delta.flat { color: var(--text-muted); }
.cmp-meta { margin-top: 8px; font-size: 11px; color: var(--text-muted); border-top: 1px dashed var(--border); padding-top: 8px; }
.cmp-spark { height: 56px; margin-top: 8px; padding-top: 4px; border-top: 1px dashed var(--border); }
.diag-box { background: var(--card); border-radius: var(--radius-md); box-shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 4px 16px rgba(15, 23, 42, .06); overflow: hidden; margin-bottom: 14px; }
.diag-top { background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #3b82f6 100%); color: #fff; padding: var(--space-3) var(--space-4); display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
.diag-tt { font-size: var(--fs-md); font-weight: 800; letter-spacing: .3px; display: flex; align-items: center; gap: var(--space-2); }
.diag-tt .dot { width: 8px; height: 8px; border-radius: 50%; background: #93c5fd; box-shadow: 0 0 0 4px rgba(147, 197, 253, .25); }
.diag-sb { font-size: 11px; opacity: .95; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); border-radius: var(--radius-full); padding: var(--space-1) var(--space-3); font-weight: 600; white-space: nowrap; }
.diag-body { padding: var(--space-3) var(--space-4) var(--space-3); }
.diag-verdict { display: flex; flex-direction: column; gap: var(--space-1); margin-bottom: 12px; }
.diag-v1 { font-size: var(--fs-lg); font-weight: 800; color: var(--gray-900); }
.diag-v1 b { color: var(--gray-900); }
.diag-v1 .up { color: var(--red); }
.diag-v1 .dn { color: #059669; }
.diag-v1 .vs { color: var(--gray-500); font-weight: 500; font-size: var(--fs-base); margin-left: 4px; }
.diag-v2 { font-size: var(--fs-sm); color: var(--gray-600); }
.diag-v2 b { color: #1d4ed8; }
.diag-v2 b.up-c { color: var(--red); }
.diag-v2 b.dn-c { color: #059669; }
.diag-rows { display: flex; flex-direction: column; gap: var(--space-2); }
.diag-row { display: flex; align-items: center; gap: var(--space-3); background: var(--gray-50); border: 1px solid var(--gray-100); border-radius: var(--radius-md); padding: var(--space-2) var(--space-3); }
.diag-rank { display: inline-flex; align-items: center; justify-content: center; min-width: 62px; font-size: 11px; font-weight: 800; border-radius: var(--radius-sm); padding: var(--space-1) var(--space-2); flex-shrink: 0; }
.diag-rank.up { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; }
.diag-rank.dn { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.diag-rank.bad { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; }
.diag-delta.bad { color: var(--red); }
.diag-rank.alt { background: #eff6ff; color: #2563eb; border: 1px solid #dbeafe; }
.diag-val { flex: 1; font-size: var(--fs-sm); color: var(--gray-800); display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); align-items: center; }
.diag-delta { font-size: var(--fs-base); font-weight: 800; flex-shrink: 0; }
.diag-delta.up { color: var(--red); }
.diag-delta.dn { color: #059669; }
.diag-delta.gray { color: var(--gray-500); }
.diag-link { color: #1d4ed8; font-weight: 700; text-decoration: none; background: #eff6ff; border: 1px dashed #bfdbfe; border-radius: var(--radius-sm); padding: var(--space-1) var(--space-2); font-size: var(--fs-sm); }
.diag-link:hover { background: #dbeafe; }

/* 工厂表「距目标」单元格内的目标标注 */
.gap-tgt { display: block; font-size: var(--fs-xs); color: var(--text-muted); margin-top: 1px; }

/* ---------- 导出 PDF（打印）样式 ---------- */
@media print {
  @page { margin: 12mm; }
  html, body { background: var(--card) !important; font-size: var(--fs-sm); }
  .topbar, .tabs, #tab-entry, #tab-list, .modal-mask, .toast, #btnExportPdf, .filter-bar { display: none !important; }
  main { display: block !important; padding: 0 !important; max-width: none !important; }
  .tab-panel { display: none !important; }
  #tab-dashboard { display: block !important; }
  .kpi-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .dash-grid { grid-template-columns: 1fr 1fr !important; }
  .compare-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .card {
    box-shadow: none !important; border: 1px solid var(--border-strong) !important;
    break-inside: avoid; page-break-inside: avoid; margin-bottom: 10px !important;
  }
  .card:hover { box-shadow: none !important; }
  .card-head h3 { font-size: var(--fs-base); }
  .chart-box svg { max-width: 100% !important; }
  .rank-bar-wrap { background: var(--gray-100) !important; }
}

/* KPI 达标/未达标副标题 */
.k-sub.sub-good { color: var(--green); font-weight: 600; }
.k-sub.sub-bad { color: var(--red); font-weight: 600; }

/* ---------- 异常预警 ---------- */
.alert-factory-health { margin-bottom: 12px; }

/* ---------- 选中工厂 A 紧凑大卡（极简单行） ---------- */
.alert-big { border-radius: var(--radius-md); background: var(--card); border:1px solid var(--border); box-shadow:0 4px 16px rgba(15,23,42,.06); overflow:hidden; }
.ab-top { display:flex; align-items:center; gap: var(--space-3); padding: var(--space-2) var(--space-3); background:linear-gradient(90deg,var(--gray-50),#fff); border-bottom:1px solid var(--gray-100); }
.ab-loc { font-size: var(--fs-base); font-weight:800; color:var(--text); }
.ab-ref { font-size:11px; color:var(--gray-500); }
.ab-spacer { flex:1; }
.ab-legend { display:flex; gap: var(--space-3); font-size: var(--fs-xs); color:var(--gray-600); }
.ab-legend i { display:inline-block; width:7px; height:7px; border-radius: var(--radius-xs); margin-right:3px; vertical-align:-1px; }
.ab-body { display:flex; align-items:center; gap: var(--space-4); padding: var(--space-3) var(--space-4); }
.ab-ring { width:68px; height:68px; border-radius:50%; position:relative; flex:none; background:conic-gradient(from -90deg, #d97706 0% 60%, var(--gray-100) 60% 100%); box-shadow: inset 0 0 0 1px rgba(217,119,6,.12); }
.ab-ring.severe { background:conic-gradient(from -90deg, #dc2626 0% 60%, var(--gray-100) 60% 100%); }
.ab-ring.good { background:conic-gradient(from -90deg, #059669 0% 60%, var(--gray-100) 60% 100%); }
.ab-ring::after { content:''; position:absolute; inset:7px; border-radius:50%; background: var(--card); }
.ab-ring-in { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; z-index:1; }
.ab-ring-in b { font-size: var(--fs-xl); font-weight:900; color:var(--text); line-height:1; }
.ab-ring-in i { font-style:normal; font-size: var(--fs-xs); color:var(--gray-500); letter-spacing:2px; margin-top:2px; }
.ab-mid { flex:1; min-width:0; }
.ab-name { font-size: var(--fs-md); font-weight:800; display:flex; align-items:center; gap: var(--space-2); }
.ab-status { display:inline-flex; align-items:center; gap: var(--space-1); font-size: var(--fs-xs); font-weight:700; padding: var(--space-1) var(--space-2); border-radius: var(--radius-full); }
.ab-status.severe { color:#dc2626; background:#fef2f2; border:1px solid #fecaca; }
.ab-status.watch { color:#d97706; background:#fffbeb; border:1px solid #fde68a; }
.ab-status.good { color:#059669; background:#f0fdf4; border:1px solid #bbf7d0; }
.ab-status .dot { width:5px; height:5px; border-radius:50%; }
.ab-metrics { display:grid; grid-template-columns:repeat(4,1fr); gap: var(--space-2); margin-top:7px; }
.ab-metric { text-align:center; padding: var(--space-1) var(--space-1); border-radius: var(--radius-sm); background:var(--gray-50); border:1px solid var(--gray-100); }
.ab-metric b { font-size: var(--fs-base); font-weight:800; display:block; }
.ab-metric b.up { color:#dc2626; } .ab-metric b.down { color:#059669; } .ab-metric b.flat { color:var(--text); }
.ab-metric span { font-size: var(--fs-xs); color:var(--gray-500); }
.ab-mini { display:inline-block; font-size: var(--fs-xs); font-weight:700; padding:0 4px; border-radius: var(--radius-full); margin-left:2px; vertical-align:1px; background:#fffbeb; color:#d97706; }
.ab-trend { width:212px; border-left:1px solid var(--gray-100); padding-left:14px; flex:none; }
.ab-trend-title { font-size: var(--fs-xs); font-weight:800; color:var(--gray-800); }
.ab-trend-sub { font-size: var(--fs-xs); color:var(--gray-500); font-weight:400; margin-left:4px; }
.ab-bars { display:flex; align-items:flex-end; gap: var(--space-1); height:40px; margin-top:3px; }
.ab-bar { flex:1; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; height:100%; }
.ab-bar .ab-col { width:100%; border-radius:2px 2px 0 0; background:linear-gradient(180deg,#93c5fd,#bfdbfe); }
.ab-bar.cur .ab-col { background:linear-gradient(180deg,#2563eb,#60a5fa); }
.ab-bar .ab-col-none { background:var(--gray-100); }
.ab-bar .ab-val { font-size: var(--fs-xs); font-weight:700; color:var(--gray-600); margin-bottom:1px; }
.ab-bar.cur .ab-val { color:#2563eb; }
.ab-months { display:flex; gap: var(--space-1); margin-top:2px; }
.ab-months i { flex:1; font-style:normal; font-size: var(--fs-xs); color:var(--gray-500); text-align:center; }
.ab-months i.cur { color:#2563eb; font-weight:800; }
.ab-fold-btn { display:flex; align-items:center; gap: var(--space-3); width:100%; padding: var(--space-2) var(--space-3); background:var(--gray-50); border:0; border-top:1px solid var(--gray-100); cursor:pointer; font:inherit; text-align:left; }
.ab-fold-btn:hover { background:var(--gray-100); }
.ab-label { font-size: var(--fs-sm); font-weight:800; color:var(--gray-800); }
.ab-badges { display:flex; gap: var(--space-2); flex:1; }
.ab-fb { font-size: var(--fs-xs); font-weight:800; padding: var(--space-1) var(--space-2); border-radius: var(--radius-full); }
.ab-fb.severe { background:#fef2f2; color:#dc2626; }
.ab-fb.watch { background:#fffbeb; color:#d97706; }
.ab-fb.info { background:#eff6ff; color:#2563eb; }
.ab-arrow { font-size:11px; color:var(--gray-500); transition:transform .18s; }
.ab-fold-body { display:none; border-top:1px solid var(--gray-100); padding: var(--space-3) var(--space-3); }
.ab-fold-body.open { display:block; }
.ab-minitabs { display:flex; gap: var(--space-2); margin-bottom:8px; flex-wrap:wrap; }
.ab-mtab { font-size:11px; font-weight:700; padding: var(--space-1) var(--space-3); border-radius: var(--radius-full); border:1px solid var(--gray-200); background: var(--card); color:var(--gray-600); cursor:pointer; }
.ab-mtab.on { background:#2563eb; border-color:#2563eb; color:#fff; }
.ab-items { display:flex; flex-direction:column; gap: var(--space-2); }
.ab-item { display:flex; gap: var(--space-2); align-items:flex-start; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); border:1px solid var(--gray-200); border-left-width:4px; background:var(--gray-50); }
.ab-item.high { border-left-color:#dc2626; }
.ab-item.mid { border-left-color:#d97706; }
.ab-item.low { border-left-color:#3b82f6; }
.ab-ico { flex:none; width:22px; height:22px; border-radius: var(--radius-sm); display:flex; align-items:center; justify-content:center; }
.ab-tx { flex:1; min-width:0; }
.ab-t1 { font-size: var(--fs-sm); font-weight:700; color:var(--text); }
.ab-t2 { font-size: var(--fs-xs); color:var(--gray-600); margin-top:2px; line-height:1.5; }
.ab-t3 { font-size: var(--fs-xs); color:#2563eb; margin-top:3px; background:#eff6ff; border-radius: var(--radius-sm); padding: var(--space-1) var(--space-2); line-height:1.5; }
.ab-lv { flex:none; font-size: var(--fs-xs); font-weight:800; padding: var(--space-1) var(--space-2); border-radius: var(--radius-full); }
.ab-none { font-size: var(--fs-sm); color:var(--green); font-weight:600; padding: var(--space-2) var(--space-3); background:#f0fdf4; border-radius: var(--radius-sm); }
@media (max-width:960px) {
  .ab-body { flex-wrap:wrap; }
  .ab-trend { width:100%; border-left:0; padding-left:0; border-top:1px solid var(--gray-100); padding-top:10px; }
  .ab-metrics { grid-template-columns:repeat(2,1fr); }
}

.health-row { display:flex; flex-wrap:nowrap; gap: var(--space-2); }
.health-chip {
  flex: 1; min-width: 0;
  padding: var(--space-2) var(--space-1); border-radius: var(--radius-md); background: var(--card); border:1px solid var(--gray-200);
  cursor:pointer; transition:all .15s; text-align:center;
}
.health-chip:hover { transform:translateY(-1px); box-shadow:0 4px 12px rgba(0,0,0,.08); border-color:#93c5fd; }
.health-chip.active { border-color:#93c5fd; background:linear-gradient(135deg,#f0f7ff,#fff); box-shadow:0 2px 8px rgba(37,99,235,.12); }
.health-ring {
  width:30px; height:30px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  position:relative; margin:0 auto 4px;
}
.health-ring::after { content:''; position:absolute; inset:2px; border-radius:50%; background: var(--card); }
.health-ring span { position:relative; z-index:1; font-size: var(--fs-xs); font-weight:800; color:var(--gray-800); }
.health-ring.danger { background:conic-gradient(#dc2626 0% var(--score,42%), var(--gray-200) var(--score,42%) 100%); }
.health-ring.warning { background:conic-gradient(#d97706 0% var(--score,68%), var(--gray-200) var(--score,68%) 100%); }
.health-ring.good { background:conic-gradient(#059669 0% var(--score,91%), var(--gray-200) var(--score,91%) 100%); }
.health-info { min-width:0; }
.health-name { font-size: var(--fs-xs); font-weight:600; color:var(--gray-800); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.health-status { font-size: var(--fs-xs); margin-top:1px; display:flex; align-items:center; justify-content:center; gap: var(--space-1); }
.health-status.danger { color:#dc2626; }
.health-status.warning { color:#d97706; }
.health-status.good { color:#059669; }
.health-status .dot { width:4px; height:4px; border-radius:50%; flex-shrink:0; }
.health-status.danger .dot { background:#dc2626; }
.health-status.warning .dot { background:#d97706; }
.health-status.good .dot { background:#059669; }
.health-badge {
  display:inline-block; margin-top:2px; padding: var(--space-1) var(--space-1); border-radius: var(--radius-sm); font-size: var(--fs-xs); font-weight:700;
}
.health-badge.danger { background:#fef2f2; color:#dc2626; }
.health-badge.warning { background:#fffbeb; color:#d97706; }
.health-badge.info { background:#eff6ff; color:#2563eb; }
.health-badge.good { background:#f0fdf4; color:#059669; }
.alert-summary { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin-bottom: 12px; }
.alert-chip {
  font-size: var(--fs-sm); font-weight: 700; padding: var(--space-1) var(--space-3); border-radius: var(--radius-full); border: 1px solid;
}
.alert-total { font-size: var(--fs-sm); color: var(--text-muted); }
.alert-none {
  font-size: var(--fs-base); color: var(--green); font-weight: 600;
  padding: var(--space-3) var(--space-3); background: #f0fdf4; border-radius: var(--radius-md); border: 1px solid #bbf7d0;
}
.alert-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: var(--space-3); }
.alert-item { padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); transition: transform .12s, box-shadow .12s; background: var(--card); border: 1px solid var(--border); border-left-width: 4px; box-shadow: 0 2px 8px rgba(16,24,40,.05); }
.alert-item:hover { transform: translateX(2px); box-shadow: 0 6px 16px rgba(16,24,40,.09); }
.alert-item-head { display: flex; align-items: center; gap: var(--space-2); margin-bottom: 5px; flex-wrap: wrap; }
.alert-badge {
  font-size: var(--fs-xs); font-weight: 700; color: #fff; padding: var(--space-1) var(--space-2); border-radius: var(--radius-xs); flex: none;
}
.alert-type { font-size: var(--fs-sm); font-weight: 700; color: var(--text); }
.alert-loc { font-size: 11px; color: var(--text-muted); }
.alert-title { font-size: var(--fs-md); font-weight: 700; margin-bottom: 3px; }
.alert-detail { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.6; }
.alert-suggest {
  font-size: var(--fs-sm); color: var(--text); margin-top: 6px; padding-top: 6px;
  border-top: 1px dashed rgba(15, 23, 42, .12); line-height: 1.6;
}

@media (max-width: 820px) {
  .compare-grid { grid-template-columns: 1fr; }
}
/* 手机端优化：可横向滚动的宽表格、加大触控区域、顶栏更紧凑 */
@media (max-width: 640px) {
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 720px; }
  .btn { min-height: 38px; padding: var(--space-2) var(--space-3); }
  .topbar-right { width: 100%; flex-wrap: wrap; gap: var(--space-2); }
  .filter-chip { flex: 1 1 auto; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .modal { max-width: 100% !important; margin: 0 10px; }
  .entry-grid, .dash-grid { grid-template-columns: 1fr; }
  .alert-list { grid-template-columns: 1fr; }
  input, select, textarea { font-size: var(--fs-lg); } /* 防 iOS 自动缩放 */
}

/* ============ 登录界面 ============ */
.login-mask {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 45%, #06b6d4 100%);
}
.login-card {
  width: 380px; max-width: 92vw; padding: 36px 34px 22px;
  background: var(--card); border-radius: var(--radius-lg); box-shadow: 0 24px 70px rgba(2, 6, 23, .35);
}
.login-brand { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); margin-bottom: 26px; text-align: center; }
.login-logo { width: 150px; height: auto; display: block; }
.login-brand .brand-title { font-size: var(--fs-xl); font-weight: 700; color: var(--ink); }
.login-brand .brand-sub { font-size: var(--fs-sm); color: var(--muted); }
.login-form { display: flex; flex-direction: column; gap: var(--space-3); }
.login-form .field { margin-bottom: 0; }
.login-err { min-height: 18px; font-size: var(--fs-sm); color: var(--danger); }
.login-foot { margin-top: 18px; text-align: center; font-size: 11px; color: var(--muted); }

/* ============ 顶栏用户区 ============ */
.topbar-user { display: flex; align-items: center; gap: var(--space-2); }
.user-chip {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-full);
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3);
  color: #fff; font-size: var(--fs-sm); font-weight: 600; white-space: nowrap;
}

/* ============ 系统管理 ============ */
.dict-type-card { border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); margin-bottom: 12px; background: var(--card); }
.dict-type-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dict-type-title { font-weight: 700; font-size: var(--fs-md); color: var(--ink); }
.dict-type-title code { background: var(--bg-soft); padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); font-size: var(--fs-sm); color: var(--primary); }
.dict-items { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.dict-item-chip {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-1) var(--space-3); border-radius: var(--radius-full); border: 1px solid var(--border-strong);
  background: var(--bg-soft); font-size: var(--fs-sm); color: var(--ink);
}
.dict-item-chip code { font-size: 11px; color: var(--muted); }
.dict-add-row { display: flex; gap: var(--space-2); margin-top: 10px; }
.org-node { border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-3) var(--space-3); margin-bottom: 10px; background: var(--card); }
.org-factory { display: flex; align-items: center; gap: var(--space-3); font-size: var(--fs-base); }
.org-factory code { background: var(--bg-soft); padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); color: var(--muted); }
.org-ws { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: 10px; padding-left: 4px; }
.ws-block { display: flex; flex-direction: column; }
.team-list { font-size: var(--fs-sm); }
.team-list .team-items { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.admin-user-table { width: 100%; border-collapse: collapse; font-size: var(--fs-base); }
.admin-user-table th, .admin-user-table td { padding: var(--space-3) var(--space-3); border-bottom: 1px solid var(--border); text-align: left; }
.admin-user-table th { background: var(--th-bg); color: var(--muted); font-weight: 600; }
.btn-xs { padding: var(--space-1) var(--space-2); font-size: 11px; border-radius: var(--radius-sm); }
.muted { color: var(--muted); }

/* ============ 系统管理：卡片式 / Tab 式 ============ */
.admin-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.admin-title { font-size: var(--fs-xl); font-weight: 800; color: var(--text); }
.view-switch { display: flex; gap: var(--space-1); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-1); box-shadow: var(--shadow); }
.view-btn { border: none; background: transparent; padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); font-size: var(--fs-base); font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all .15s; }
.view-btn:hover { color: var(--text); }
.view-btn.active { background: var(--primary-grad); color: #fff; box-shadow: 0 3px 10px rgba(37,99,235,.28); }

.admin-input { padding: var(--space-2); border: 1px solid transparent; border-radius: var(--radius-sm); font-size: var(--fs-base); background: var(--input-fill, #f2f4f8); color: var(--text); }
.admin-input:hover { background: var(--input-fill-hover, #eceff5); }
.admin-input:focus { outline: none; background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

.admin-module { display: none; }
.admin-module.active { display: block; animation: fadeIn .2s ease; }
.admin-module .card-head h3 { font-size: var(--fs-md); }
.admin-module .badge { font-size: 11px; }

/* 图标卡片式子导航 - 方案D：左侧色条+圆形图标 */
.admin-icon-nav { display: flex; gap: var(--space-3); margin-bottom: 20px; flex-wrap: wrap; }
/* 图标卡片导航 - 分组（方案C：生产经营 / 资产管理 / 系统管理） */
.admin-icon-group { flex: 1 1 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-3); margin-bottom: 6px; }
.admin-icon-group .gtitle { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); font-weight: 600; color: var(--gray-500, #646a73); margin: 4px 0 0; letter-spacing: .4px; }
.admin-icon-group .gtitle::after { content: ''; flex: 1; height: 1px; background: var(--gray-200, #e4e7ec); }
.admin-icon-group .admin-icon-card { flex: 1; min-width: 0; }
@media (max-width: 1024px) {
  .admin-icon-group { grid-template-columns: 1fr; }
}

.admin-icon-card {
  position: relative; background: var(--card); border: 1px solid var(--gray-200); border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-5); cursor: pointer;
  transition: all .25s cubic-bezier(.4,0,.2,1); overflow: hidden;
  display: flex; align-items: center; gap: var(--space-3); flex: 1; min-width: 160px;
}
.admin-icon-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  transform: scaleY(0); transition: transform .25s; border-radius: 0 2px 2px 0;
}
.admin-icon-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,99,235,.15);
  border-color: #bfdbfe;
}
.admin-icon-card:hover::before { transform: scaleY(1); }
.admin-icon-card.active {
  background: linear-gradient(135deg, #f0f7ff, #eff6ff);
  border-color: #93c5fd;
  box-shadow: 0 4px 16px rgba(37,99,235,.12);
}
.admin-icon-card.active::before { transform: scaleY(1); }
.admin-icon-card .icon-wrap {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #2563eb;
  transition: all .25s; flex-shrink: 0;
}
.admin-icon-card:hover .icon-wrap {
  background: var(--primary-grad); color: #fff;
  transform: scale(1.08);
}
.admin-icon-card.active .icon-wrap {
  background: var(--primary-grad); color: #fff;
}
.admin-icon-card .icon-wrap svg { width: 20px; height: 20px; }
.admin-icon-card .text { flex: 1; min-width: 0; }
.admin-icon-card .label { font-size: var(--fs-base); font-weight: 700; color: var(--text); }
.admin-icon-card.active .label { color: #1e40af; }
.admin-icon-card .desc { font-size: var(--fs-xs); color: var(--gray-500); margin-top: 2px; }
.admin-icon-card .deco { display: none; }

@media (max-width: 1024px) {
  .admin-icon-nav { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------- 角色-菜单权限矩阵 ---------------- */
.role-matrix-wrap { overflow-x: auto; }
.role-matrix { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 720px; background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--radius-md); overflow: hidden; }
.role-matrix th { background: var(--th-bg); color: var(--muted); font-weight: 600; font-size: var(--fs-sm); padding: var(--space-3) var(--space-2); text-align: center; border-bottom: 1px solid var(--border-strong); }
.role-matrix th .mx-g { color: #9aa5b1; font-size: var(--fs-xs); font-weight: 500; letter-spacing: .3px; }
.role-matrix th .mx-name { margin-top: 2px; }
.role-matrix td { padding: var(--space-2); text-align: center; border-bottom: 1px solid var(--gray-100); }
.role-matrix tbody tr:last-child td { border-bottom: none; }
.role-matrix tbody tr:hover { background: var(--gray-50); }
.role-matrix .role-mx-role { text-align: left; font-weight: 600; font-size: var(--fs-base); color: var(--text); white-space: nowrap; }
.role-matrix .role-mx-role code { font-size: var(--fs-xs); color: var(--muted); font-weight: 400; }
.role-matrix .role-mx-role-th { text-align: left; }
.role-mx-chk, .mx-chk { position: relative; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.mx-chk input { position: absolute; opacity: 0; width: 0; height: 0; }
.mx-chk span { display: inline-flex; width: 18px; height: 18px; border: 1.5px solid #c3ccda; border-radius: var(--radius-xs); transition: all .15s ease; position: relative; }
.mx-chk input:checked + span { background: var(--primary); border-color: var(--primary); }
.mx-chk input:checked + span::after { content: ''; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.mx-chk.mx-disabled { cursor: not-allowed; opacity: .45; }
.mx-chk.mx-disabled span { background: var(--gray-100); border-color: #d8dee8; }

/* ============ 权限矩阵（操作级） ============ */
.perm-matrix { min-width: 1080px; }
.rm-toolbar { display: flex; justify-content: space-between; align-items: center; padding: var(--space-3) var(--space-1); gap: var(--space-3); flex-wrap: wrap; }
.rm-tip { color: var(--muted); font-size: var(--fs-sm); }
.perm-cell {
  display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-3);
  border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--card);
  cursor: pointer; transition: all .15s ease; font-size: var(--fs-sm); color: var(--text);
}
.perm-cell:hover { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 1px 4px rgba(37,99,235,.15); }
.perm-cell .pc-view { font-weight: 700; font-size: var(--fs-base); color: #16a34a; }
.perm-cell .pc-view.pc-off { color: #c3ccda; }
.perm-cell .pc-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px;
  border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--primary);
  font-size: 11px; font-weight: 600; padding: 0 5px;
}
.pc-lock { font-size: var(--fs-md); opacity: .7; }
.rm-role-name { font-size: var(--fs-base); }
/* 权限矩阵二级子项行 */
.role-matrix tr.rm-subrow td { background: var(--gray-50); border-top: 1px dashed #e6ebf2; padding: var(--space-1) var(--space-2); }
.role-matrix tr.rm-subrow:hover { background: #f8fafd; }
.role-matrix tr.rm-subrow td.rm-sub-label { color: var(--muted); font-size: 11px; font-weight: 600; text-align: left; white-space: nowrap; }
.role-matrix .rm-sub-cell { }
.rm-sub-item { display: inline-flex; align-items: center; gap: var(--space-1); margin: 1px 3px; }
.rm-sub-name { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; }
.rm-sub-item .perm-cell { padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); }
.rm-sub-item .perm-cell .pc-count { min-width: 15px; height: 15px; font-size: var(--fs-xs); }
.rm-scope {
  display: block; margin-top: 6px; padding: var(--space-1) var(--space-2); font-size: 11px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--gray-100); color: var(--text); width: 100%;
}
.rm-scope:disabled { opacity: .5; }
.perm-editor .pe-tip { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 14px; }
.pe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.pe-item {
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-3);
  border: 1.5px solid var(--border-strong); border-radius: var(--radius-md); cursor: pointer; transition: all .15s;
}
.pe-item:hover { border-color: var(--primary); }
.pe-item.pe-view { background: var(--primary-soft); }
.pe-item input { width: 16px; height: 16px; accent-color: var(--primary); }
.pe-item .pe-op { font-weight: 600; font-size: var(--fs-base); min-width: 32px; }
.pe-item .pe-desc { color: var(--muted); font-size: 11px; }
/* 20261006UNLOCK：「解锁已确认」是重权限（改一条时段 = 同事务改日报产量），
   用琥珀色底与左侧色条与常规 6 项区分，勾选前管理员能一眼看出自己在动什么。 */
.pe-item.pe-unlock { background: #fff8e6; border-color: #f0c36d; grid-column: 1 / -1; }
.pe-item.pe-unlock .pe-op { color: #8a5a00; }
.pe-item.pe-unlock input { accent-color: #c77700; }
.permux-op.op-extra { border-style: dashed; }
.permux-op.op-extra.on { background: #c77700; border-color: #c77700; color: #fff; }


/* ============ 卡片折叠 ============ */
.admin-card-head { cursor: pointer; user-select: none; margin-bottom: 0; padding-bottom: 14px; }
.admin-head-right { display: flex; align-items: center; gap: var(--space-2); }
.fold-btn {
  border: 1px solid var(--border-strong); background: var(--card); color: var(--text-muted);
  width: 26px; height: 26px; border-radius: var(--radius-sm); font-size: var(--fs-sm); cursor: pointer; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; transition: transform .2s, all .15s;
}
.fold-btn:hover { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.admin-module.folded .fold-btn { transform: rotate(-90deg); }
.admin-module.folded .admin-card-body { display: none; }
.admin-module.folded { max-height: none !important; }

/* 侧边栏分组标签 */
.nav-group-label {
  display: none;
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  color: #9aa3b2; text-transform: uppercase;
  padding: var(--space-3) var(--space-3) var(--space-1); user-select: none; flex-shrink: 0;
}
.nav-group-label.visible { display: block; }
.nav-group-label[hidden] { display: none !important; }

/* 侧边栏分组分隔（系统设置置于日报操作下方） */
.nav-sep { margin-top: 10px; border-top: 1px solid #eef1f5; padding-top: 10px; }

/* ============ SVG 图标通用样式 ============ */
.ico { width: 16px; height: 16px; flex-shrink: 0; display: inline-block; vertical-align: -2px; }
.brand-logo svg { width: 24px; height: 24px; }
.side-item .side-icon { display: inline-flex; align-items: center; justify-content: center; }
.side-item .side-icon svg { width: 17px; height: 17px; }
.btn .ico:not(:last-child) { margin-right: 6px; }
.admin-tab-nav .btn .ico { margin-right: 6px; }
.card-head h3 .ico { margin-right: 6px; }

/* ==================== 海外工厂增强模块 ==================== */
.seg { display: inline-flex; gap: var(--space-2); }
.op-cell { white-space: nowrap; position: sticky; right: 0; z-index: 3; background-color: #fff; box-shadow: -1px 0 0 rgba(0,0,0,.05); }
.op-cell .btn { margin-right: 4px; padding: var(--space-1) var(--space-2); font-size: var(--fs-sm); }
/* 末个按钮不留右边距，按钮组贴齐单元格右缘（20261003ORDERS 整齐度） */
.op-cell .btn:last-child { margin-right: 0; }
/* 宽表横向滚动时，操作列固定右侧始终可见（背景跟随行底色，避免透视错乱） */
tbody tr:nth-child(even) .op-cell { background-color: var(--gray-50); }
tbody tr:hover .op-cell { background-color: var(--primary-soft); }
tbody tr[style*="background"] .op-cell { background-color: inherit; }
/* C1b（20261003ORDERS）表头「操作」列：thead th 本身已 position:sticky;top:0，
   若再叠加 .op-cell 的 right:0，在 border-collapse:collapse 下表头会被算到表格自然位置
   （实测 x=1602）而数据格钉在右缘（x=1383），错位 219px。
   纵向吸顶由 thead th 自身承担，横向固定对表头无意义，故让表头回到普通定位。 */
thead th.op-cell { position: static; z-index: auto; left: auto; right: auto; }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-soft); }
.field-full { grid-column: 1 / -1; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); margin-bottom: 14px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); box-shadow: var(--shadow); }
.stat-card .stat-num { font-size: var(--fs-2xl); font-weight: 700; color: var(--primary); }
.stat-card .stat-label { font-size: var(--fs-base); color: var(--text-muted); margin-top: 4px; }
.stat-card.highlight { background: var(--primary-grad); border: none; }
.stat-card.highlight .stat-num, .stat-card.highlight .stat-label { color: #fff; }
@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============ 看板下钻详情 ============ */
.drill-row:hover, .drill-row-factory:hover, #rankTable tbody tr:hover, .rank-indiv:hover { background: #f0f4ff !important; }
.rank-indiv { transition: background .15s; border-radius: var(--radius-sm); }
.drill-alert:hover { box-shadow: 0 1px 6px rgba(0,0,0,.10); }
/* 日报明细行点击查看详情 */
tr.row-clickable { cursor: pointer; }
tr.row-clickable:hover td { background: #f0f4ff; }
.drill-detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.drill-detail-grid > div { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); }
.drill-detail-grid label { display: block; font-size: 11px; color: var(--gray-500); margin-bottom: 2px; }
.drill-detail-grid span { font-size: var(--fs-base); font-weight: 600; color: var(--text); }

/* ============ 月度汇总统计（报表查询页内嵌） ============ */
.stat-card { position: relative; overflow: hidden; }
.stat-ico { width: 36px; height: 36px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.stat-ico svg { width: 18px; height: 18px; }
.stat-card.highlight .stat-ico { background: rgba(255,255,255,.22); color: #fff; }
#monthlySummary .filter-bar { border-bottom: 1px dashed var(--border); }

/* ============ 报表查询分页 ============ */
.list-pager { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); padding: 12px 4px 0; }
.list-pager .pager-info { font-size: var(--fs-sm); color: var(--text-muted); margin-right: 4px; }

/* ══════════ 登录页 · 背景动画（方案 A 极光流体 · 加强版 20261004LOGINBOOST）══════════
 * 做法：**只有 3 个大尺寸径向渐变光斑**（蓝/青/靛）各自独立漂移缩放，
 *       产生"光在流动"的观感。当前生效元素 = .login-anim-blob b1/b2/b3，别的都不要。
 *
 * ⚠ 网格层与星点层已于 20261004 全部移除，**当前只有 3 个光斑**。
 *   下方凡提到「网格 / 星点 / 平移 / 网格 alpha」的内容均为**历史对比记录**，
 *   描述的是当时参与实测的旧实现。移除理由、量化数据、以及「若日后要恢复需补齐哪4 处」
 *   见本段末尾的「已移除的装饰层档案」注释块（唯一权威处，勿在其他地方重复）。
 *
 * ⚠ 20261004 加强记录（上一版 20261004LOGINANIM 上线后用户反馈「背景没看到动画」）：
 *   诊断结论 = 动画**确实在跑**（getAnimations 返回 4 个、currentTime 正常递增），
 *   但**肉眼不可见**。像素量化：1 秒帧间平均 RGB 差仅 2~3，肉眼阈值是 8~10。
 *   三个根因：① 位移 60px 走 17s ≈ 3.5px/秒，人眼跟踪不到；
 *             ② opacity .5 且渐变 70% 处即衰减到全 0，实际显色面积极小；
 *             ③ 网格线 rgba(79,124,240,.055) alpha 太低。
 *
 *   ⚠⚠ 测量方法教训（本次最大收获，务必先读）：
 *   **不要在预览页/小舞台上量动画可见度** —— 小舞台 + 同样 vw 尺寸的 blob 会让
 *   位移占比被严重放大，测出「4.3x 明显可见」；真实 1440x900 登录页只有 2.2x。
 *   同理**不要用全画面平均差** —— 白卡 + 插画占中央大半且完全不动，会把均值稀释到
 *   3 点几，看起来像没生效。正确判据 = **只量纯背景区**（左侧柱/顶部带）+ 多帧取峰值。
 *   9 帧 ≈10.5s 窗口（覆盖一个完整周期）比 5 帧稳，单帧采样有偶然性。
 *
 *   最终参数（真实 1440x900 实测，左柱纯背景区峰值 RGB 差）：
 *     旧线上版 3.62(静) → 中间加强版 8.57(2.4x) → 本版 12.24(3.4x)
 *   手段：周期 17/21/25 → 5/6.5/8s、位移 60 → 180px、opacity .5 → .85、
 *        渐变加 40% 显色点、**blur 48 → 34px**（关键：blur 越大边界越糊，
 *        位移时扫过的像素越少）、网格 alpha .055 → .16、平移 40s → 8s。
 *   ⚠ 曾评估「加呼吸光斑」「加流光丝带」两个方向，实测分别只有 1.0x / 1.7x
 *     （呼吸是整体亮度变化、被白卡插画稀释；丝带只占屏高 16%）——**提速+收 blur
 *     才是唯一有效手段**，两个都不划算。
 *
 * 三条必须遵守的约束（改动时勿踩）：
 *  ① z-index 必须是 0，且 .login-anim 必须排在 .login-l-wrap（z-index:1）之前 ——
 *     否则会盖住白卡和插画。品牌行是 z-index:10，不受影响。
 *  ② pointer-events:none —— 这层是纯装饰，绝不能吃掉用户名/密码框的点击。
 *  ③ 三个 blob 的尺寸按 vw/vh 给而非 px —— 登录页是 100vh 全屏，固定 px 在
 *     1080p 和 2K 上光斑相对屏幕的大小完全不同，vw/vh 才能等比。
 *
 * 性能：3 层 filter:blur(34px) 是本方案唯一的 GPU 开销点（老 Win 核显可能掉帧）。
 *       下方 @media (prefers-reduced-motion: reduce) 已做无障碍降级（全部关掉）。
 *       如需再省，可把 .login-anim-blob 的 blur 从 34px 降到 24px，视觉几乎无差。
 */
.login-anim {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.login-anim-blob {
  position: absolute; border-radius: 50%;
  /* blur 从 48→34px：光斑越小 blur 占比越大，边界越糊，位移时"扫过"的像素越少。
     收到 34px 后实测再涨~1.4x（这是预览页测不出来的，只有真实 1440x900 才暴露）。 */
  filter: blur(34px); opacity: .85;
}
.login-anim-blob.b1 {
  width: 34vw; height: 34vw; left: 0; top: 2%;
  background: radial-gradient(circle, #5b9bf2 0%, rgba(91,155,242,.45) 40%, rgba(127,178,248,0) 70%);
  animation: loginA-drift1 5s ease-in-out infinite;
}
.login-anim-blob.b2 {
  width: 30vw; height: 30vw; right: 0; top: 14%;
  background: radial-gradient(circle, #6ccfe6 0%, rgba(108,207,230,.42) 40%, rgba(138,217,232,0) 70%);
  animation: loginA-drift2 6.5s ease-in-out infinite;
}
.login-anim-blob.b3 {
  width: 36vw; height: 36vw; left: 26%; bottom: -14%;
  background: radial-gradient(circle, #8fa0ef 0%, rgba(143,160,239,.42) 40%, rgba(165,180,245,0) 70%);
  animation: loginA-drift3 8s ease-in-out infinite;
}
@keyframes loginA-drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(180px, 120px) scale(1.2); }
  66%      { transform: translate(-96px, 72px) scale(.88); }
}
@keyframes loginA-drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-140px, 100px) scale(1.24); }
}
@keyframes loginA-drift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40%      { transform: translate(132px, -108px) scale(1.22); }
  75%      { transform: translate(-72px, -58px) scale(.9); }
}
/* ── 已移除的装饰层档案（20261004-07）─────────────────────────────────
 * 当前登录页背景动画 = **只有 3 个光斑**（.login-anim-blob b1/b2/b3），
 * 无网格、无星点。这两层均在实测后应需求移除：
 *
 * ① 网格层 .login-anim-grid + @keyframes loginA-pan（46px 网格 background-position
 *    平移）—— 网格线抢戏、显脏，移除后背景明显更干净。
 *
 * ② 星点层 .login-anim-star s1~s12 + @keyframes loginS-tw（12 颗白星闪烁）——
 *    **实测证明它不提升动感**，这是个反直觉但已量化的结论：
 *    12 颗 × 10px 仅占屏 0.08%，全黑→全白平均差也只有 0.25。测了 4 个变体
 *    （6 蓝星 / 12 蓝星 / 12 白星 / 20 白星），纯背景区峰值 RGB 差全是 16~18、
 *    差异 <5% —— 画面位移 100% 来自 3 个光斑，星点只贡献"观感更星云"。
 *    另附一条踩坑记录：**星点必须用纯白，用蓝色会被同色光斑吃掉**（初版
 *    #6ea6f5 在截图里几乎不可见），改纯白 + 双层 box-shadow 发光后才清晰。
 *
 * 若日后要恢复任一层，需同时补齐 4 处，漏第 4 处即为无障碍漏洞：
 *   ① index.html 的 <div class="login-anim-xxx"> 节点
 *   ② style.css 的 .login-anim-xxx { ... } 规则
 *   ③ 对应的 @keyframes
 *   ④ @media (prefers-reduced-motion) 里的该选择器 ← 最容易漏
 */
/* 无障碍：系统开启"减少动态效果"时全部关掉，退回静态渐变（即原样式） */
@media (prefers-reduced-motion: reduce) {
  .login-anim-blob { animation: none !important; }
}

/* ══════════ 登录页（新林集团风格） ══════════ */
/* ══════════ 登录页 · 方案 L（MES 血统：左等距插画 + 右白卡）20260929LOGIN3 ══════════ */
.login-mask { background: var(--card); }
.login-page.login-clean {
  width: 100%; min-height: 100vh;
  /* 静态渐变保留为底色：① 动画层是叠加的，blob 之间的空隙靠它兜底不露白；
     ② prefers-reduced-motion 关掉动画后退回的就是这个观感，与上线前一致。 */
  background: linear-gradient(160deg, #eef3fb 0%, #f3f7fd 55%, #eaf1fa 100%);
  display: flex; flex-direction: column; position: relative; overflow: hidden;
}
/* 左上品牌行（logo 图片内容重心偏左，需 translateX 补偿） */
.login-l-brand {
  position: absolute; top: 20px; left: 36px; z-index: 10;
  display: flex; align-items: center; gap: 14px;
}
.login-l-brand .login-brand-logo { width: 80px; height: auto; transform: translateX(3px); }
.login-l-brand b { font-size: 17px; color: #334155; letter-spacing: 1.5px; font-weight: 600; }
/* 主体：左插画 + 右白卡 */
.login-l-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 34px; padding: 60px 48px 48px; position: relative; z-index: 1;
}
.login-l-art { flex: 1.15; max-width: 560px; min-width: 0; }
/* transform: translateY(-64px) = 插画垂直居中修正（20261003LOGINPOS1 · 方案 1 精准对齐）
 * 问题：SVG viewBox="0 0 560 460" 按画布定义，但实际内容只占 y=116~435，
 *       顶部约 25% 是空白。容器 .login-l-wrap 用 align-items:center 把这个
 *       「含顶部空白的画布」整体居中，导致内容重心被空白拽到下方 ——
 *       实测主体（菱形平台 + T 恤）中心 Y=521，白卡中心 Y=457，偏低 64px，
 *       视觉上插画「沉」在页面下方，与白卡不成中轴线。
 * 修法：把这段顶部空白从视口里平移掉，使主体中心与白卡中心精确齐平。
 * 实测：translateY(-64px) 后对齐差 0px，内容无溢出裁切。
 * 手法说明：viewBox 是 SVG 属性不是 CSS 属性，在 CSS 里写 viewBox 无效
 *       （getAttribute('viewBox') 仍返回原值），故用 transform 做像素级位移。
 * 影响面：纯视觉、单条声明；<1080px 时 .login-l-art 整体 display:none 自动失效。
 */
.login-l-art svg { width: 100%; height: auto; display: block; transform: translateY(-64px); }
.login-l-card {
  width: 400px; max-width: 94vw; flex-shrink: 0;
  background: #ffffff; border-radius: 14px; padding: 38px 40px 22px;
  box-shadow: 0 12px 40px rgba(30, 64, 132, .10);
  position: relative;
}
.login-l-lang {
  position: absolute; top: 20px; right: 22px;
  display: flex; align-items: center; gap: 6px;
  font-size: var(--fs-base); color: var(--gray-500);
}
.login-l-lang .lang-label { font-size: 12px; color: #94a3b8; }
.login-l-lang select {
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 3px 4px; font-size: 12px; background: transparent; color: #64748b;
  outline: none; cursor: pointer; max-width: 118px;
}
.login-l-lang select:hover, .login-l-lang select:focus { border-color: #dbe4ef; background: #f8fafc; }
.login-l-title {
  font-size: 24px; font-weight: 700; color: #1e293b; letter-spacing: 1px;
  margin: 0 0 24px;
}
.login-field { margin-bottom: 16px; position: relative; }
.login-field-ico { position: relative; }
.login-field-ico > svg:first-child {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; stroke: #c3cbdb; fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; pointer-events: none;
}
.login-field-ico .login-input { padding-left: 38px; padding-right: 40px; }
.login-input {
  width: 100%; box-sizing: border-box; padding: 11px 14px;
  border: 1px solid #e8edf5; border-radius: 8px; font-size: var(--fs-md);
  color: var(--text); background: #fbfcfe; transition: all .15s; outline: none;
}
.login-input::placeholder { color: #b6c2d4; }
.login-input:focus { border-color: #4f7cf0; background: #ffffff; box-shadow: 0 0 0 3px rgba(79,124,240,.13); }
/* 密码可见性眼睛（MES 细节） */
.login-eye {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; stroke: #c3cbdb; fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; cursor: pointer; transition: stroke .15s;
}
.login-eye:hover { stroke: #94a3b8; }
.login-eye.on { stroke: #4f7cf0; }
/* 登录验证码行（20261011CAPA）：单行 图+输入框+刷新图标；高度 40px、圆角 8px 与 .login-input 完全一致 */
.login-cap-row { display: flex; gap: 6px; align-items: center; }
.login-cap-img {
  /* 20261011CAPVB：132 → 144px，配合 captcha.js 画布加宽到 168×46，字大小不变、间距更舒展 */
  flex: 0 0 144px; width: 144px; height: 40px; box-sizing: border-box;
  border: 1px solid #e8edf5; border-radius: 8px; background: #fbfcfe;
  overflow: hidden; cursor: pointer; transition: border-color .15s;
  display: flex; align-items: center; justify-content: center;
  color: #94a3b8; font-size: 12px;
}
.login-cap-img:hover { border-color: #cdd8ea; }
.login-cap-img svg { width: 100%; height: 100%; display: block; }
.login-cap-row .login-input { flex: 1 1 auto; min-width: 0; height: 40px; }
.login-cap-ref {
  flex: 0 0 40px; width: 40px; height: 40px; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #e8edf5; border-radius: 8px; background: #fbfcfe;
  cursor: pointer; transition: all .15s;
}
.login-cap-ref:hover { border-color: #4f7cf0; background: #ffffff; }
.login-cap-ref svg {
  width: 16px; height: 16px; stroke: #8d9bb0; fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; transition: stroke .15s;
}
.login-cap-ref:hover svg { stroke: #4f7cf0; }
.login-error { color: #dc2626; font-size: var(--fs-base); margin-bottom: 14px; padding: var(--space-2) var(--space-3); background: #fef2f2; border-radius: var(--radius-sm); }
.login-error:empty { display: none; }
.login-submit {
  width: 100%; padding: 12px 0; border: none; border-radius: 8px;
  background: #4f7cf0;
  color: #fff; font-size: var(--fs-md); font-weight: 600; cursor: pointer;
  transition: all .2s; letter-spacing: 6px; box-shadow: 0 4px 12px rgba(79,124,240,.28);
}
.login-submit:hover { background: #3f6ce4; box-shadow: 0 6px 16px rgba(79,124,240,.34); }
.login-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.login-footer-links { text-align: center; margin-top: 14px; font-size: var(--fs-base); color: var(--gray-500); }
.login-footer-links span { cursor: pointer; }
.login-footer-links span:hover { color: #4f7cf0; }
.login-l-ver { text-align: center; margin-top: 14px; font-size: 11px; color: #b3bdcc; letter-spacing: 1px; }
/* 左下角内部系统提示 */
.login-l-foot { position: absolute; bottom: 16px; left: 34px; z-index: 10; }
.login-l-foot span { font-size: 12px; color: #a5b3c7; }

@media (max-width: 1080px) {
  .login-l-art { display: none; }
  .login-l-wrap { padding: 56px 20px 44px; }
  .login-l-card { padding: 34px 28px 20px; }
  .login-l-brand { left: 20px; }
  .login-l-foot { left: 20px; }
}

/* ============================================================
   分辨率自适应（响应式增强）
   - 表单网格/看板/KPI/统计卡片随屏幕宽度平滑变化
   ============================================================ */
/* 超宽屏（>1600）：放大内容区 */
@media (min-width: 1600px) {
  main { max-width: 1680px; }
  /* 班组排程页铺满：4K/宽屏下排程矩阵横向铺满、单元格弹性放大、纵向按视口撑高 */
  body:has(#tab-plan.active) main { max-width: none; width: 100%; padding-left: 30px; padding-right: 30px; }
  body:has(#tab-plan.active) .plan-matrix-wrap { max-height: calc(100vh - 330px); min-height: calc(100vh - 330px); }
  /* 4K 下日期列固定紧凑宽度（不随屏幕拉宽）、表格整体居中 */
  body:has(#tab-plan.active) .plan-matrix { width: max-content; min-width: 0; margin: 0 auto; }
  body:has(#tab-plan.active) .plan-matrix th:not(.corner) { width: calc(80px * var(--plan-scale, 1)); min-width: calc(80px * var(--plan-scale, 1)); max-width: calc(80px * var(--plan-scale, 1)); }
  body:has(#tab-plan.active) .plan-cell { min-width: calc(80px * var(--plan-scale, 1)); width: calc(80px * var(--plan-scale, 1)); max-width: calc(80px * var(--plan-scale, 1)); }
}

/* 常见笔记本 1366×768 及以下：表单 3 列，内容更紧凑 */
@media (max-width: 1366px) {
  .form-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 中宽屏：预警+KPI 纵向堆叠、表单 2 列 */
@media (max-width: 1200px) {
  .dash-top { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 平板/窄窗：收窄边距、KPI/统计 2 列、侧边栏自动折叠 */
@media (max-width: 900px) {
  .sidebar { width: 60px; }
  .sidebar .sidebar-brand-text,
  .sidebar .side-item span:not(.side-icon),
  .sidebar .nav-group-label,
  .sidebar .sidebar-foot .user-chip,
  .sidebar .sidebar-foot .btn-ghost span { display: none; }
  .sidebar .sidebar-brand { justify-content: center; padding: var(--space-3) var(--space-2); }
  .sidebar .side-logo { width: 36px; }
  .sidebar .side-item { justify-content: center; padding: var(--space-3); position: relative; }
  .sidebar .side-item:hover::after {
    content: attr(data-tooltip); position: absolute; left: 100%; top: 50%;
    transform: translateY(-50%); margin-left: 10px; background: #1f2937; color: #fff;
    padding: var(--space-1) var(--space-3); border-radius: var(--radius-sm); font-size: var(--fs-sm); white-space: nowrap;
    z-index: 100; pointer-events: none; font-weight: 600;
  }
  .sidebar .sidebar-nav { padding: var(--space-2) var(--space-2); }
  .sidebar .sidebar-foot { padding: var(--space-3) var(--space-2); }
  .sidebar .sidebar-foot .btn-ghost { width: 100%; padding: var(--space-2); justify-content: center; display: flex; align-items: center; gap: 0; }
  .sidebar .sidebar-foot .btn-ghost svg { width: 16px; height: 16px; }
  main { padding: 16px 14px 48px; }
  .topbar { padding: var(--space-3) var(--space-3); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-top .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  /* KPI分组卡片：平板2列 */
  .kpi-groups { flex-wrap: wrap; }
  .kpi-group { flex: 1 1 calc(50% - 8px); min-width: 280px; }
}

/* 手机：侧边栏隐藏+汉堡菜单、KPI单列、表单单列 */
@media (max-width: 640px) {
  body { font-size: var(--fs-base); }
  .sidebar {
    position: fixed !important; left: -220px !important; top: 0; height: 100vh; width: 208px !important;
    transition: left .25s ease; z-index: 200;
  }
  .sidebar.mobile-open { left: 0 !important; }
  .sidebar .sidebar-brand-text,
  .sidebar .side-item span:not(.side-icon),
  .sidebar .nav-group-label,
  .sidebar .sidebar-foot .user-chip,
  .sidebar .sidebar-foot .btn-ghost span { display: inline !important; }
  .sidebar .side-ver { display: block !important; }
  .sidebar .sidebar-brand { justify-content: flex-start !important; padding: var(--space-5) var(--space-4) var(--space-3) !important; }
  .sidebar .side-logo { width: 158px !important; }
  .sidebar .side-item { justify-content: flex-start !important; padding: var(--space-3) var(--space-3) !important; }
  .sidebar .side-item:hover::after { display: none !important; }
  .sidebar .sidebar-nav { padding: var(--space-2) var(--space-3) !important; }
  .sidebar .sidebar-foot { padding: var(--space-3) var(--space-3) !important; }
  .sidebar .sidebar-foot .btn-ghost { width: auto !important; padding: var(--space-2) var(--space-3) !important; justify-content: flex-start !important; gap: var(--space-2) !important; }
  /* 移动端遮罩 */
  .mobile-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4);
    z-index: 150;
  }
  .mobile-overlay.show { display: block; }
  /* 汉堡按钮 */
  .hamburger-btn {
    display: flex !important; align-items: center; justify-content: center;
    width: 36px; height: 36px; border: none; background: transparent;
    cursor: pointer; border-radius: var(--radius-sm); color: var(--text);
  }
  .hamburger-btn:hover { background: var(--primary-soft); }
  main { padding: 14px 12px 40px; margin-left: 0 !important; }
  .topbar { padding: var(--space-3) var(--space-3); gap: var(--space-2); flex-wrap: wrap; }
  .topbar .topbar-title { font-size: var(--fs-lg); }
  .topbar .factory-select, .topbar .date-range { flex: 1 1 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .dash-top .kpi-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .filter-bar .field { min-width: 0; flex: 1 1 45%; }
  .rank-controls { flex-wrap: wrap; }
  .drill-detail-grid { grid-template-columns: repeat(2, 1fr); }
  /* KPI分组卡片：手机单列，组内指标横向 */
  .kpi-groups { flex-direction: column; }
  .kpi-group { flex: 1 1 100%; min-width: 0; }
  .kpi-group-items { flex-direction: row; }
  .kpi-group-item { flex: 1; padding: var(--space-2) var(--space-2); }
  .kpi-group-item .k-value { font-size: var(--fs-md); }
  .kpi-group-item .k-label { font-size: var(--fs-xs); }
  /* 异常预警健康卡片：手机端2列 */
  .health-row { grid-template-columns: repeat(2, 1fr); gap: var(--space-2); }
  .health-chip { padding: var(--space-2) var(--space-1); }
  /* 表格横向滚动 */
  .table-wrap, .rpt-table-wrap, .data-table-wrap {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  .table-wrap table, .rpt-table-wrap table, .data-table-wrap table {
    min-width: 600px;
  }
  /* 卡片间距压缩 */
  .card { padding: var(--space-3); }
  .card-title { font-size: var(--fs-md); }
  /* 按钮组自适应 */
  .btn-group { flex-wrap: wrap; }
  .btn { padding: var(--space-2) var(--space-3); font-size: var(--fs-base); }
  /* 生产日报款号明细 */
  .style-item, .style-card { padding: var(--space-3); }
  .style-item .form-grid { grid-template-columns: 1fr 1fr; gap: var(--space-2); }
  .style-item .form-grid .field.full { grid-column: 1 / -1; }
  /* 报表查询筛选栏 */
  .filter-bar { flex-wrap: wrap; gap: var(--space-2); }
  .filter-bar .field { flex: 1 1 45%; }
  .filter-bar .btn { flex: 1 1 100%; }
  /* 报表查询一体工具条（方案B）窄屏适配 */
  .filter-bar.flat-toolbar { padding: var(--space-2) var(--space-3); gap: var(--space-2); }
  .filter-bar.flat-toolbar .chip { flex: 1 1 auto; }
  .filter-bar.flat-toolbar .chip input { max-width: 130px; }
  .filter-bar.flat-toolbar .tb-div { display: none; }
  .filter-bar.flat-toolbar .btn-i { flex: 0 0 auto; }
  /* 基础资料模块卡片 */
  .admin-icon-nav { gap: var(--space-2); }
  .admin-icon-card { min-width: calc(50% - 4px); padding: var(--space-3) var(--space-3); }
  .admin-icon-card .desc { display: none; }
  /* 班组排程控制栏 */
  .plan-controls, .schedule-controls { flex-wrap: wrap; gap: var(--space-2); }
  .plan-controls .field, .schedule-controls .field { flex: 1 1 45%; }
  .plan-controls .btn, .schedule-controls .btn { flex: 1 1 100%; }
  /* 汇总看板图表 */
  .dash-grid { grid-template-columns: 1fr; }
  .chart-box { height: 220px; }
  /* 周期环比卡片 */
  .compare-grid { grid-template-columns: 1fr; }
  /* 盈亏概算 */
  .profit-grid, .cost-grid { grid-template-columns: 1fr; }
}

/* ================= 部门出勤（XINDA 版式第一块） ================= */
.dept-fold { border: 1px dashed var(--border, #dbe3ef); background: #fafcff; }
.dept-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-3); padding: 4px 0;
}
.dept-item { background: var(--card); border: 1px solid var(--border, #dbe3ef); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); }
.dept-item label { display: flex; flex-direction: column; gap: var(--space-1); font-size: var(--fs-sm); font-weight: 600; color: var(--gray-800); }
.dept-item .dept-en { font-size: var(--fs-xs); font-weight: 400; color: var(--gray-500); }
.dept-item input { margin-top: 6px; width: 100%; box-sizing: border-box; }
.dept-foot { display: flex; align-items: center; gap: var(--space-3); margin-top: 10px; }
.dept-tip { font-size: 11px; color: var(--gray-500); }

/* ================= 按款号汇总（XINDA 版式第三块） ================= */
.style-totals {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-3); margin-bottom: 12px;
}
.st-item { background: linear-gradient(135deg, #eff6ff, var(--gray-50)); border: 1px solid #dbeafe; border-radius: var(--radius-md); padding: var(--space-3) var(--space-3); text-align: center; }
.st-item span { display: block; font-size: 11px; color: var(--gray-600); margin-bottom: 4px; }
.st-item b { font-size: var(--fs-lg); color: #1e40af; }

/* ===== 来料加工 · 产值卡片 ===== */
.value-card { border-top: 3px solid #10b981 !important; }
.value-card .card-head h3 { color: #065f46; }
.value-card .kpi { background: linear-gradient(160deg, #ecfdf5, #ffffff); border: 1px solid #d1fae5; }
.value-card .k-label { color: #059669; }
.value-card .k-value { color: #065f46; }
.value-card .k-sub { color: #6b7280; }

.cost-fold legend { color: #0f766e; font-weight: 600; }
.value-tip { margin-top: 8px; font-size: var(--fs-sm); color: #0f766e; background: #ecfdf5; border: 1px dashed #6ee7b7; border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); display: inline-block; }

/* ===== 基础资料/权限 编辑弹窗 ===== */
.modal-sm { max-width: 720px; }
#adminModalBody .field { display: flex; flex-direction: column; gap: var(--space-1); margin-bottom: 12px; }
#adminModalBody .field > label { font-size: var(--fs-sm); color: var(--gray-600); }
#adminModalBody .field input, #adminModalBody .field select { padding: var(--space-2) var(--space-3); border: 1px solid transparent; border-radius: var(--radius-sm); font-size: var(--fs-base); margin-top: 0; background: var(--input-fill, #f2f4f8); }
#adminModalBody .field input:focus, #adminModalBody .field select:focus { border-color: var(--primary); outline: none; }
.dict-type-title code, .org-factory code { font-size: 11px; }

/* ============ 报表视图（集团 / 工厂 两套报表） ============ */
.rpt-scope-card { padding: 0; overflow: hidden; }
.rpt-scope-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); background: linear-gradient(180deg,var(--gray-50),#fff); }
.rpt-scope-tabs { display: flex; gap: var(--space-2); }
.rpt-tab { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-5); border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--card); color: var(--text-muted); font-size: var(--fs-base); font-weight: 600; cursor: pointer; transition: all .18s; }
.rpt-tab .ico { width: 15px; height: 15px; }
.rpt-tab:hover { border-color: var(--primary); color: var(--primary); }
.rpt-tab.active { background: var(--primary-grad); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,.22); }
.rpt-scope-filters { display: flex; align-items: center; gap: var(--space-3); }
.rpt-scope-filters .field { display: flex; flex-direction: row; align-items: center; gap: var(--space-2); margin: 0; }
.rpt-scope-filters .field select { margin-top: 0; }
.rpt-scope-filters .field span { font-size: var(--fs-sm); color: var(--text-muted); }
.rpt-scope-filters select { padding: var(--space-2) var(--space-3); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-size: var(--fs-base); background: var(--card); color: var(--text); min-width: 150px; }
.rpt-view { padding: var(--space-4); }
.rpt-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-3); margin-bottom: 16px; }
.rpt-cal-note { font-size: var(--fs-sm); color: var(--gray-600); background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); margin-bottom: 12px; display: flex; align-items: center; gap: var(--space-2); }
#rptFactoryKpis { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-3); }
.rpt-kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-3) var(--space-3); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: var(--space-1); position: relative; overflow: hidden; }
.rpt-kpi::after { content: ''; position: absolute; right: -18px; top: -18px; width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle, rgba(99,102,241,.06), transparent 70%); }
.rpt-kpi-ico { width: 38px; height: 38px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.rpt-kpi-ico .ico { width: 20px; height: 20px; }
.rpt-kpi-num { font-size: var(--fs-2xl); font-weight: 700; color: var(--text-strong); line-height: 1.1; }
.rpt-kpi-label { font-size: var(--fs-sm); color: var(--text-muted); }
.rpt-kpi-sub { font-size: var(--fs-sm); color: #9aa3b2; }
/* 总产量 KPI：关键词匹配的款号图/品名图标（右侧中间） */
.rpt-kpi-total { padding-right: 88px; min-height: 98px; justify-content: center; }
.rpt-kpi-img { position: absolute; right: 35px; top: 50%; transform: translateY(-50%); width: 62px; height: 62px; object-fit: contain; border-radius: var(--radius-md); background: rgba(99,102,241,.08); border: 1px solid rgba(99,102,241,.18); padding: var(--space-1); }
/* 款式图片管理 */
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--space-3); }
.style-card { display: flex; align-items: center; gap: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-3) var(--space-3); background: var(--card); box-shadow: var(--shadow); }
.style-thumb { width: 64px; height: 64px; border-radius: var(--radius-md); overflow: hidden; background: rgba(99,102,241,.07); display: flex; align-items: center; justify-content: center; flex-shrink: 0; border: 1px solid rgba(99,102,241,.14); }
.style-thumb img { width: 100%; height: 100%; object-fit: contain; padding: var(--space-1); }
.style-ico-svg { width: 100%; height: 100%; object-fit: contain; }
.style-meta { flex: 1; min-width: 0; }
.style-no { font-size: var(--fs-md); font-weight: 700; color: var(--text-strong); word-break: break-all; }
.style-prod { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.style-ops { display: flex; flex-direction: column; gap: var(--space-2); flex-shrink: 0; }
.rpt-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: var(--space-3); margin-bottom: 16px; }
.rpt-charts .card { padding: var(--space-3) var(--space-3) var(--space-3); display: flex; flex-direction: column; }
.rpt-charts .card-head { margin-bottom: 6px; }
.rpt-charts .chart-box { height: auto; min-height: 240px; width: 100%; flex: 1 1 auto; overflow: hidden; }
.rpt-charts #rptChartGroupProfit { flex: 0 0 auto; }
/* ↓ 原第 1652 行是一个孤立的右括号（6b20afc 提交把下面 4 条规则误替换成它，
   实际规则已用 CSS 变量重写并保留在下一行起），已于 2026-10-04 删除。
   删除前实测：CSSOM 1413 条规则序列完全相同、7 个关键元素 computed 全等、EXC=0。 */
.rpt-tables { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.rpt-tables .card { padding: var(--space-3) var(--space-3); }
.rpt-tables .card-head h3 { font-size: var(--fs-md); }
#rptGroupView .rpt-tables { grid-template-columns: 1fr; }
@media (max-width: 1100px) { .rpt-tables { grid-template-columns: 1fr; } }

/* 组织：管理中心节点 */
.org-center-node { border-left: 3px solid #0d9488; background: linear-gradient(180deg,#f4fbfa,#fff); }
.org-center { display: flex; align-items: center; gap: var(--space-3); font-size: var(--fs-md); font-weight: 700; padding: 2px 0 10px; }
.org-center .factory-tag { background: #0d9488 !important; }
.org-center code { background: rgba(13,148,136,.1); color: #0d9488; padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); font-size: 11px; }
.org-center-node > .org-node { border: none; background: transparent; padding: 8px 0 8px 18px; margin-bottom: 0; }

/* 顶部工厂/日期筛选改由 JS 按模块控制显隐（双行顶栏方案，2026-09-26）：
   原此处 display:none!important 与 4155 行 display:flex!important 互相冲突，
   导致 JS inline style 全部失效、模块页（财务/成本）出现重复工厂筛选。
   默认显示走 .filter-chip{display:flex}，隐藏由各模块 inline style 控制。 */

/* 盈亏概算卡片 */
.profit-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: var(--space-3); margin-bottom: 14px; }
.profit-kpis .kpi-card { padding: var(--space-3) var(--space-3); }
.kpi-sub { font-size: 11px; color: #9ca3af; margin-top: 4px; }
#profitTable td.num, #profitTable th { white-space: nowrap; }

/* 异常预警 Tab 模式 */
.alert-tabs { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: 12px; }
.alert-tab {
  font-size: var(--fs-sm); font-weight: 600; padding: var(--space-1) var(--space-3); border-radius: var(--radius-full);
  border: 1px solid var(--border); background: var(--card); color: var(--text-muted);
  cursor: pointer; transition: all .15s;
}
.alert-tab:hover { border-color: #93c5fd; color: #2563eb; }
.alert-tab.active { background: #2563eb; color: #fff; border-color: transparent; box-shadow: 0 2px 6px rgba(37,99,235,.3); }

/* 异常预警 Tab 模式：每条一行紧凑列表 */
.alert-list.tab-mode { display: flex; flex-direction: column; gap: var(--space-2); }
.alert-list.tab-mode .alert-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border-left-width: 4px; white-space: nowrap; }
.alert-list.tab-mode .alert-type { flex: none; min-width: 56px; }
.alert-list.tab-mode .alert-loc { flex: none; }
.alert-list.tab-mode .alert-title { margin: 0; flex: 1 1 auto; font-size: var(--fs-base); overflow: hidden; text-overflow: ellipsis; }
.alert-list.tab-mode .alert-detail { flex: none; max-width: 42%; font-size: var(--fs-sm); color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }
.alert-list.tab-mode .alert-suggest, .alert-list.tab-mode .alert-item-head { display: none; }
.alert-arrow { flex: none; color: var(--gray-400); font-size: var(--fs-lg); font-weight: 700; }
.alert-list.tab-mode .alert-item:hover .alert-arrow { color: #2563eb; transform: translateX(2px); }
.alert-arrow { transition: transform .12s; }

/* 预警模式切换：SVG 图标按钮 */
.seg-icon-btn { display: inline-flex !important; align-items: center; gap: var(--space-1); padding: var(--space-1) var(--space-3); font-size: var(--fs-sm); font-weight: 600; }
.seg-icon-btn svg { flex: none; }
.seg-icon-btn.btn-primary svg { color: #fff; }
.seg-icon-btn.btn-outline svg { color: var(--gray-600); }
.seg-icon-btn.btn-outline:hover svg { color: #2563eb; }

/* 工厂产量汇总：数字列表头右对齐，与数据对齐 */
#factoryTable thead th.num { text-align: right; }

/* 看板顶部工厂/导出并入 topbar：窄屏紧凑单行 */
@media (max-width: 900px) {
  #btnExportPdf span { display: none; }
  #btnExportPdf .ico { width: 15px; height: 15px; }
  #dFactoryTopWrap select { max-width: 120px; }
}

/* 看板顶部日期范围：窄屏紧凑（收窄输入） */
@media (max-width: 900px) {
  #d_from, #d_to { max-width: 118px; }
}

/* 录入表单提示 */
.form-hint { font-size: var(--fs-sm); color: var(--text-muted); background: #f0f6ff; border: 1px dashed #b9d4f5; border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); margin: 4px 0 0; grid-column: 1 / -1; line-height: 1.5; }

/* 录入页工厂锁定 + 集团模式禁止录入 */
#f_factory:disabled, #f_factory[disabled] { opacity: 1; color: var(--text); background: #eef3fb; cursor: not-allowed; }
#entryLockTip.form-hint { background: #fff7e6; border-color: #ffd591; color: #ad6800; font-weight: 500; }
.no-factory { opacity: .55; pointer-events: none; }
.no-factory #entryLockTip { opacity: 1; }

/* 订单信息 / 产量工时：5 项一排 */
.form-grid.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .form-grid.grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .form-grid.grid-5 { grid-template-columns: repeat(2, 1fr); } }

/* ===== 款号明细（主子表录入）===== */
.style-rows { display:flex; flex-direction:column; gap: var(--space-3); }
.style-row {
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4) var(--space-3);
  position: relative;
}
.style-row-head {
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 1px dashed var(--gray-400);
}
.style-row-label {
  font-weight: 700; font-size: var(--fs-md); color: var(--primary);
  background: var(--primary-soft); padding: var(--space-1) var(--space-3); border-radius: var(--radius-lg);
}
.style-summary {
  display:flex; gap: var(--space-3); flex-wrap:wrap; margin-top:12px; padding-top:12px;
  border-top: 2px solid var(--gray-200);
}
.style-summary .badge {
  background: var(--card); border: 1px solid var(--gray-200); padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg); font-size: var(--fs-base); color: var(--gray-700);
}
.style-summary .badge b { color: var(--primary); font-size: var(--fs-md); margin: 0 3px; }

/* ===== 录入页分区卡片式（方案A） ===== */
.entry-section {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--gray-100);
}
.entry-section-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--card);
  border-bottom: 1px solid var(--gray-100);
}
.entry-section-head h3 {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text);
  margin: 0;
}
.entry-section-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.entry-section-icon .ico { width: 16px; height: 16px; }
.entry-section-icon.blue { background: #dbeafe; color: #2563eb; }
.entry-section-icon.purple { background: #dbeafe; color: #2563eb; }
.entry-section-icon.green { background: #dcfce7; color: #16a34a; }
.entry-section-hint {
  font-size: 11px;
  color: var(--gray-500);
  margin-left: auto;
}
.entry-section-body {
  padding: var(--space-3) var(--space-4);
}

/* 款号行卡片 */
.style-row-card {
  background: var(--card);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
  transition: box-shadow .2s, border-color .2s;
}
.style-row-card:hover {
  box-shadow: 0 2px 8px rgba(37,99,235,.08);
  border-color: #c7d2fe;
}
.style-row-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  background: linear-gradient(90deg, var(--gray-50), #fff);
  border-bottom: 1px solid var(--gray-100);
}
.style-row-label {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.style-row-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.style-row-del {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--fs-sm);
  transition: all .2s;
}
.style-row-del:hover {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;
}
.style-row-del .ico { width: 14px; height: 14px; }
.style-row-card-body {
  padding: var(--space-3) var(--space-3);
}

/* 新增款号按钮 */
.btn-add-style {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-3);
  border: 2px dashed var(--gray-400);
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  color: var(--gray-600);
  font-size: var(--fs-base);
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  margin-top: 4px;
}
.btn-add-style:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #eff6ff;
}
.btn-add-style .ico { width: 16px; height: 16px; }

/* 汇总彩色badge */
.style-summary {
  display: flex;
  gap: var(--space-2);
  margin-top: 12px;
  flex-wrap: wrap;
}
.sum-badge {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg);
  font-size: var(--fs-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.sum-badge b { font-weight: 700; font-size: var(--fs-md); }
.sum-badge.blue { background: #dbeafe; color: #1e40af; }
.sum-badge.red { background: #fee2e2; color: #991b1b; }
.sum-badge.green { background: #dcfce7; color: #166534; }
.sum-badge.purple { background: #dbeafe; color: #5b21b6; }
.sum-badge.amber { background: #fef3c7; color: #92400e; }

/* ===== 报表查询优化 ===== */
#rptFacWorkshopTable, #rptFacStyleTable, #rptFacFactoryTable { min-width: 900px; }
#rptFacFactoryTable { min-width: 1100px; }
#rptGroupTable { min-width: 960px; }
/* 20261003ALIGN：该表原有 th{text-align:center} 特异性(1,0,1) 高于全局 thead th.num(0,0,2,1)，
   故在此补一条同域规则让数字列表头跟随数据右对齐，避免 9 列全部头中数右的错位（实测 OFF 26~46px）。 */
#rptGroupTable th.num { text-align: right; }
/* 20261003ALIGN 列宽自适应（W2 min/max 夹逼）：实测工厂列 358px 而「工厂」二字仅 25px，
   slack 333px / 浪费 93%，且表头贴左、数据左对齐视觉上大片空白。改为夹逼到内容合理区间。 */
#rptGroupTable td:first-child, #rptGroupTable th:first-child { min-width: 150px; max-width: 220px; }
/* 注：原 #rptGroupTable th{text-align:center} 已移除 —— 该表 9 个数据列全部是 .num（右对齐），
   统一 center 才是错位源；现由全局 thead th.num 接管，实测 10 列 th/td 全一致（工厂列 th 无 class → left，配 td 文本左对齐）。 */
.rpt-tables .card { overflow: hidden; }
.rpt-tables table { width: 100%; border-collapse: collapse; font-size: var(--fs-base); }
.rpt-tables table th { background: var(--th-bg); color: var(--gray-700); font-weight: 600; padding: var(--space-3) var(--space-3); text-align: left; border-bottom: 2px solid var(--gray-200); white-space: nowrap; }
.rpt-tables table td { padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--gray-100); color: var(--gray-800); }
.rpt-tables table tbody tr:hover { background: #f0f7ff; }
.rpt-tables table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.rpt-tables table td strong { color: var(--text); }
.rpt-tables .table-wrap { scrollbar-width: thin; scrollbar-color: var(--gray-400) transparent; }
.rpt-tables .table-wrap::-webkit-scrollbar { height: 6px; }
.rpt-tables .table-wrap::-webkit-scrollbar-thumb { background: var(--gray-400); border-radius: var(--radius-xs); }
.rpt-tables .table-wrap::-webkit-scrollbar-thumb:hover { background: var(--gray-500); }
/* 多工厂模式下表单列布局 */
.rpt-tables.multi-factory { grid-template-columns: 1fr; }

/* 款号/车间单元格内工厂名小字 */
.rpt-fac-sub { font-size: 11px; color: var(--gray-500); margin-top: 2px; font-weight: normal; }
.rpt-tables table td strong + .rpt-fac-sub { line-height: 1.3; }

/* 班组排行排名徽章 */
.rank-badge { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; font-size: var(--fs-sm); font-weight: 700; color: #fff; }
.rank-1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.rank-2 { background: linear-gradient(135deg, var(--gray-400), var(--gray-500)); }
.rank-3 { background: linear-gradient(135deg, #fb923c, #d97706); }
.rank-badge:not(.rank-1):not(.rank-2):not(.rank-3) { background: var(--gray-200); color: var(--gray-600); }
#rptTeamTable { min-width: 900px; }

/* 报表表格单列布局 */
.rpt-tables-single { grid-template-columns: 1fr; }

/* ===== 报表表格统一美化 ===== */
.rpt-tables table { table-layout: auto; }
.rpt-tables table th.num, .rpt-tables table td.num { text-align: right; }
.rpt-tables table th:first-child, .rpt-tables table td:first-child { text-align: left; }
.rpt-tables table th { font-size: var(--fs-sm); letter-spacing: 0.3px; padding: var(--space-3) var(--space-3); }
.rpt-tables table td { padding: var(--space-3) var(--space-3); font-size: var(--fs-base); line-height: 1.5; }
.rpt-tables table tbody tr { transition: background 0.15s; }
.rpt-tables table tbody tr:nth-child(even) { background: var(--gray-50); }
.rpt-tables table tbody tr:hover { background: #eff6ff !important; }
.rpt-tables .card { border: 1px solid var(--gray-200); border-radius: var(--radius-md); box-shadow: 0 1px 3px rgba(0,0,0,0.04); margin-bottom: 0; }
.rpt-tables .card-head { padding: var(--space-3) var(--space-5) var(--space-3); border-bottom: 1px solid var(--gray-100); margin-bottom: 0; }
.rpt-tables .card-head h3 { font-size: var(--fs-md); font-weight: 600; color: var(--text); }
.rpt-tables .badge { background: #eff6ff; color: #3b82f6; font-size: var(--fs-sm); padding: var(--space-1) var(--space-3); border-radius: var(--radius-lg); font-weight: 600; }
.rpt-tables .table-wrap { padding: 0; }
.rpt-tables .empty-state { padding: var(--space-6); color: var(--gray-500); font-size: var(--fs-base); }

/* 订单类型6列布局 */
.form-grid.grid-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1200px) { .form-grid.grid-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .form-grid.grid-6 { grid-template-columns: repeat(2, 1fr); } }

/* 订单类型标签 */
.order-type-tag { display: inline-block; padding: var(--space-1) var(--space-2); border-radius: var(--radius-xs); font-size: var(--fs-sm); font-weight: 600; }
.order-type-常规单 { background: #eff6ff; color: #2563eb; }
.order-type-试产 { background: #fef3c7; color: #d97706; }
.order-type-首单 { background: #fce7f3; color: #db2777; }
.order-type-返单 { background: #dcfce7; color: #16a34a; }

/* ===== 款号行 - 方案C卡片分区 ===== */
.style-row-card-body { padding: var(--space-3) var(--space-4); }
/* 20261006LAYOUTB：非等宽双栏。
   订单信息（6 字段）+ 加工费&产值（3 字段）语义上都属于「单据头」，合进左栏纵向堆叠；
   生产数据（7-8 字段 + SKU 面板）内容最多，独占右侧宽栏。
   ★ 只用 grid-template-areas 重排，**不改 HTML 顺序**，故 data-f 绑定与 DOM 结构零风险。
   ★ 相比三栏等宽（原 `1fr 1fr 1fr`）：单字段从约 160px 提到 220px+，且「分色码产量」
     标题栏拿到约 380px 不再被压成竖排。 */
.sub-cards {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  grid-template-areas:
    "order prod"
    "cost  prod";
  align-content: start;
  gap: var(--space-2);
}
.sub-card.order { grid-area: order; }
.sub-card.prod  { grid-area: prod; }
.sub-card.cost  { grid-area: cost; }
.sub-card.order .form-grid { grid-template-columns: repeat(2, 1fr); }
.sub-card.prod  .form-grid { grid-template-columns: repeat(3, 1fr); }
.sub-card.cost  .form-grid { grid-template-columns: repeat(2, 1fr); }
.sub-card { background: var(--card); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: var(--space-2) var(--space-3); }
/* SKU 标题栏：允许换行，窗口再窄也不会把「分色码产量」压成竖排 */
.sku-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; background: linear-gradient(135deg,#f0f9ff,#eff6ff); border-bottom: 1px solid #e2e8f0; font-size: 11px; font-weight: 700; color: #0369a1; }
.sku-head .sku-title { white-space: nowrap; }
.sku-sum { margin-left: auto; color: #0c4a6e; font-weight: 800; white-space: nowrap; }
.sku-head .sku-btn { font-size: 10px; color: #64748b; background: #fff; border: 1px solid #cbd5e1; border-radius: 5px; cursor: pointer; padding: 2px 8px; white-space: nowrap; }
/* 逐级降列：右栏先降到 2 列 → 整体退回纵向单列（方案A 形态）→ 全 1 列 */
@media (max-width: 1400px) { .sub-card.prod .form-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1180px) {
  .sub-cards { grid-template-columns: 1fr; grid-template-areas: "order" "prod" "cost"; }
}
@media (max-width: 720px) {
  .sub-card.order .form-grid,
  .sub-card.prod .form-grid,
  .sub-card.cost .form-grid { grid-template-columns: 1fr; }
  .sku-sum { margin-left: 0; }
}
.sub-card-title { font-size: var(--fs-base); font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: var(--space-2); padding-bottom: 8px; border-bottom: 1px solid var(--gray-100); }
.sub-card.order .sub-card-title { color: var(--primary); }
.sub-card.prod .sub-card-title { color: #0891b2; }
.sub-card.cost .sub-card-title { color: #d97706; }
.sub-card .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.sub-card .field span { font-size: 11px; color: var(--gray-600); font-weight: 500; }
.sub-card .field input, .sub-card .field select { padding: var(--space-2) var(--space-2); font-size: var(--fs-sm); border: 1px solid transparent; border-radius: var(--radius-sm); background: var(--input-fill, #f2f4f8); }
.sub-card .field input:focus, .sub-card .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.value-preview { margin-top: 10px; padding: var(--space-2) var(--space-3); background: linear-gradient(135deg, #fef3c7, #fde68a); border-radius: var(--radius-sm); font-size: var(--fs-sm); color: #92400e; display: flex; justify-content: space-between; align-items: center; font-weight: 500; }
.value-preview strong { color: #b45309; font-size: var(--fs-md); }
@media (max-width: 1100px) { .sub-cards { gap: var(--space-2); } }

/* ===== 基础信息 - 方案A两列卡片 ===== */
.base-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.base-info-card { border-radius: var(--radius-md); padding: var(--space-4); border: 1px solid; }
.base-info-card:nth-child(1) { background: linear-gradient(135deg, #eff6ff, #dbeafe); border-color: #bfdbfe; }
.base-info-card:nth-child(2) { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border-color: #bbf7d0; }
.base-info-card-title { font-size: var(--fs-base); font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: var(--space-2); padding-bottom: 8px; border-bottom: 1px solid; }
.base-info-card:nth-child(1) .base-info-card-title { color: #1d4ed8; border-bottom-color: #bfdbfe; }
.base-info-card:nth-child(2) .base-info-card-title { color: #16a34a; border-bottom-color: #bbf7d0; }
.base-info-card .grid-2 { grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.base-info-card .grid-4 { grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.base-info-card .field span { font-size: 11px; color: var(--gray-700); font-weight: 600; }
.base-info-card .field input, .base-info-card .field select, .base-info-card .field textarea { padding: var(--space-2) var(--space-3); font-size: var(--fs-base); border: 1px solid transparent; border-radius: var(--radius-sm); background: var(--input-fill, #f2f4f8); }
.base-info-card .field input:focus, .base-info-card .field select:focus, .base-info-card .field textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
@media (max-width: 700px) { .base-info-grid { grid-template-columns: 1fr; } }

/* 基础信息输入框自适应 */
.base-info-card select { width: auto; min-width: 80px; }
.base-info-card input[readonly] { width: auto; min-width: 80px; }

/* 小卡片标题图标统一 */
.base-info-card-title .ico, .sub-card-title .ico { width: 16px; height: 16px; }

/* ========== 预警详情弹窗（Jira风格） ========== */
.alert-modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; backdrop-filter: blur(4px);
  animation: alertOverlayIn .25s ease;
}
.alert-modal-overlay[hidden] { display: none; }
@keyframes alertOverlayIn { from { opacity: 0; } to { opacity: 1; } }

.alert-modal-card {
  width: 90%; max-width: 440px; background: var(--card); border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,.2), 0 4px 12px rgba(0,0,0,.08);
  overflow: hidden; position: relative;
  animation: alertCardIn .35s cubic-bezier(.2,.8,.2,1);
  border: 1px solid rgba(222,53,11,.08);
  max-height: 88vh; display: flex; flex-direction: column;
}
@keyframes alertCardIn { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

.alert-modal-topbar {
  height: 6px; background: linear-gradient(90deg,#de350b 0%,#ff6b35 50%,#f59e0b 100%);
  position: relative; overflow: hidden; flex-shrink: 0;
}
.alert-modal-topbar::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,.45),transparent);
  animation: alertShimmer 2.2s infinite;
}
@keyframes alertShimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

.alert-modal-close {
  position: absolute; top: 14px; right: 14px; width: 28px; height: 28px;
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  color: #8993a4; cursor: pointer; transition: all .15s; z-index: 5;
}
.alert-modal-close:hover { background: rgba(0,0,0,.06); color: #42526e; }

.alert-modal-header {
  padding: var(--space-4) var(--space-5) var(--space-3); display: flex; align-items: flex-start; gap: var(--space-3);
  background: linear-gradient(135deg,#fff5f5 0%,#fff 100%); flex-shrink: 0;
}
.alert-modal-icon {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  background: linear-gradient(135deg,#ff6b35,#de350b);
  display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(222,53,11,.3); position: relative;
}
.alert-modal-icon::after {
  content: ''; position: absolute; inset: -3px; border-radius: var(--radius);
  border: 2px solid rgba(222,53,11,.2); animation: alertRingPulse 2s infinite;
}
@keyframes alertRingPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(1.08); } }

.alert-modal-header-info { flex: 1; min-width: 0; }
.alert-modal-key-row { display: flex; align-items: center; gap: var(--space-2); margin-bottom: 5px; flex-wrap: wrap; }
.alert-modal-key {
  font-size: 11px; font-weight: 700; color: #de350b; background: #ffebe6;
  padding: var(--space-1) var(--space-3); border-radius: var(--radius-sm); letter-spacing: .5px;
}
.alert-modal-priority {
  font-size: var(--fs-xs); padding: var(--space-1) var(--space-3); border-radius: var(--radius-sm);
  background: linear-gradient(135deg,#de350b,#ff6b35); color: #fff;
  font-weight: 700; display: flex; align-items: center; gap: var(--space-1);
  box-shadow: 0 2px 8px rgba(222,53,11,.25);
}
.alert-modal-priority-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--card);
  animation: alertBlink 1.5s infinite;
}
@keyframes alertBlink { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.alert-modal-title { font-size: var(--fs-md); font-weight: 700; color: #172b4d; line-height: 1.4; }
.alert-modal-time {
  font-size: 11px; color: #8993a4; margin-top: 4px;
  display: flex; align-items: center; gap: var(--space-1);
}

.alert-modal-factory {
  margin: 0 20px 12px; padding: var(--space-3) var(--space-3); border-radius: var(--radius-md);
  background: linear-gradient(135deg,#f0f7ff,var(--gray-50)); border: 1px solid #e0e9f5;
  display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0;
}
.alert-modal-factory-icon {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg,#3b82f6,#2563eb);
  display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;
}
.alert-modal-factory-info { flex: 1; min-width: 0; }
.alert-modal-factory-name { font-size: var(--fs-base); font-weight: 700; color: var(--text); }
.alert-modal-factory-sub { font-size: var(--fs-xs); color: var(--gray-600); margin-top: 1px; }
.alert-modal-factory-badge {
  font-size: var(--fs-xs); padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm);
  background: #dbeafe; color: #2563eb; font-weight: 700; flex-shrink: 0;
}

.alert-modal-metrics {
  padding: 0 20px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3);
  flex-shrink: 0;
}
.alert-modal-metric {
  padding: var(--space-3); border-radius: var(--radius-md); background: var(--gray-50); border: 1px solid var(--gray-100);
  position: relative; overflow: hidden; transition: all .2s;
}
.alert-modal-metric:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.alert-modal-metric.danger { background: linear-gradient(135deg,#fff5f5,#fff); border-color: #fed7d7; }
.alert-modal-metric-label {
  font-size: var(--fs-xs); color: #8993a4; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px;
  display: flex; align-items: center; gap: var(--space-1);
}
.alert-modal-metric-value { font-size: var(--fs-xl); font-weight: 800; color: #172b4d; line-height: 1; }
.alert-modal-metric.danger .alert-modal-metric-value { color: #de350b; }
.alert-modal-metric-target { font-size: var(--fs-xs); color: #8993a4; margin-top: 4px; }
.alert-modal-metric-bar {
  height: 4px; border-radius: var(--radius-xs); background: var(--gray-100); margin-top: 8px; overflow: hidden;
}
.alert-modal-metric-bar-fill {
  height: 100%; border-radius: var(--radius-xs); background: linear-gradient(90deg,#de350b,#ff6b35);
  transition: width .6s ease;
}

.alert-modal-alerts { padding: 0 20px 14px; flex: 1; overflow-y: auto; min-height: 0; }
.alert-modal-alerts-title {
  font-size: 11px; font-weight: 700; color: #8993a4; text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 8px; display: flex; align-items: center; gap: var(--space-2);
}
.alert-modal-alert-item {
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-md); background: var(--card); border: 1px solid var(--gray-100);
  margin-bottom: 6px; transition: all .15s;
}
.alert-modal-alert-item:hover { border-color: #de350b; background: #fff5f5; }
.alert-modal-alert-item.danger { border-left: 3px solid #de350b; }
.alert-modal-alert-item.warning { border-left: 3px solid #ffab00; }
.alert-modal-alert-item.info { border-left: 3px solid #2563eb; }
.alert-modal-alert-type {
  width: 52px; flex-shrink: 0; font-size: var(--fs-xs); font-weight: 700; color: #6b778c;
  text-align: center; padding: 3px 0; background: var(--gray-100); border-radius: var(--radius-xs);
}
.alert-modal-alert-item.danger .alert-modal-alert-type { background: #ffebe6; color: #de350b; }
.alert-modal-alert-item.warning .alert-modal-alert-type { background: #fff8e6; color: #ffab00; }
.alert-modal-alert-item.info .alert-modal-alert-type { background: #dbeafe; color: #2563eb; }
.alert-modal-alert-text { flex: 1; font-size: var(--fs-sm); color: #42526e; line-height: 1.4; min-width: 0; }
.alert-modal-alert-val { font-size: var(--fs-md); font-weight: 800; flex-shrink: 0; }
.alert-modal-alert-item.danger .alert-modal-alert-val { color: #de350b; }
.alert-modal-alert-item.warning .alert-modal-alert-val { color: #ffab00; }
.alert-modal-alert-item.info .alert-modal-alert-val { color: #2563eb; }

.alert-modal-footer {
  padding: var(--space-3) var(--space-5); background: var(--gray-50); border-top: 1px solid var(--gray-100);
  display: flex; gap: var(--space-3); flex-shrink: 0;
}
.alert-modal-btn {
  flex: 1; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); font-size: var(--fs-base);
  font-weight: 700; cursor: pointer; border: none; transition: all .15s;
  display: flex; align-items: center; justify-content: center; gap: var(--space-2);
}
.alert-modal-btn.primary {
  background: linear-gradient(135deg,#de350b,#ff6b35); color: #fff;
  box-shadow: 0 4px 12px rgba(222,53,11,.3);
}
.alert-modal-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(222,53,11,.4); }
.alert-modal-btn.ghost { background: var(--card); color: #6b778c; border: 1px solid #dfe1e6; }
.alert-modal-btn.ghost:hover { background: var(--gray-100); color: #42526e; }

/* 无预警状态 */
.alert-modal-card.no-alert .alert-modal-topbar { background: linear-gradient(90deg,#059669,#10b981,#34d399); }
.alert-modal-card.no-alert .alert-modal-icon { background: linear-gradient(135deg,#10b981,#059669); box-shadow: 0 4px 12px rgba(5,150,105,.3); }
.alert-modal-card.no-alert .alert-modal-icon::after { border-color: rgba(5,150,105,.2); }
.alert-modal-card.no-alert .alert-modal-key { color: #059669; background: #d1fae5; }
.alert-modal-card.no-alert .alert-modal-priority { background: linear-gradient(135deg,#059669,#10b981); box-shadow: 0 2px 8px rgba(5,150,105,.25); }
.alert-modal-card.no-alert .alert-modal-btn.primary { background: linear-gradient(135deg,#059669,#10b981); box-shadow: 0 4px 12px rgba(5,150,105,.3); }

/* ==================== 生产计划 ==================== */
.sub-tab-bar { display: flex; gap: 4px; margin-bottom: 16px; padding: 5px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; width: fit-content; box-shadow: 0 1px 4px rgba(15,23,42,.05); flex-wrap: wrap; }
.sub-tab { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border: none; background: transparent; border-radius: 10px; font-size: var(--fs-md); font-weight: 500; color: #6b7280; cursor: pointer; transition: background .15s, color .15s; }
.sub-tab:hover { background: #f1f5f9; color: #374151; }
.sub-tab.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; box-shadow: none; }
.sub-tab svg { width: 15px; height: 15px; flex: none; }

.plan-filter { flex-wrap: wrap; align-items: flex-end; }
.plan-filter .field { min-width: 140px; }
/* ===== 排程工具条：等高一排自动换行（方案B） ===== */
.plan-filter { align-items: center; gap: var(--space-2); }
.plan-filter .field { display: inline-flex; align-items: center; gap: var(--space-2); height: 34px; flex: none; }
.plan-filter .field > span { flex: none; white-space: nowrap; }
.plan-filter .field select,
.plan-filter .field input[type="month"] { height: 100%; border: 1px solid #d8dee9; border-radius: var(--radius-sm); padding: 0 9px; font-size: var(--fs-sm); background: var(--card); color: var(--gray-800); outline: none; }
.plan-filter .field > div { height: 100%; }
/* 20260929ALIGN：全局 .field 控件 margin-top:5px 是上下布局设计（label 上控件下），
   工具栏横排 field 会被推下 5px 溢出 2.5px（select y=92.5 vs 按钮 y=90）——归零精确对齐 */
.plan-filter .field > select,
.plan-filter .field > input,
.plan-filter .field .pp-month-stepper input { margin-top: 0; }
.plan-filter .btn { height: 34px; padding: 0 13px; font-size: var(--fs-sm); display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1); border-radius: var(--radius-sm); flex: none; }
.plan-filter .btn-sm { height: 34px; padding: 0 9px; }

.plan-matrix-wrap { overflow: auto; max-height: 420px; min-height: 280px; max-width: 100%; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); }
.plan-matrix-scroll { width: 100%; overflow: visible; }  /* 20261009STICKY：滚动统一交 .plan-matrix-wrap，双层滚动容器导致 th/td 粘性失效，恢复吸附 */
.plan-matrix { border-collapse: collapse; width: max-content; min-width: 100%; font-size: calc(11px * var(--plan-scale, 1)); table-layout: auto; --fs-xs: calc(11px * var(--plan-scale, 1)); }
/* 保证 sticky 列在滚动容器内生效 */
.plan-matrix-scroll { position: relative; }
.plan-matrix th, .plan-matrix td { border: 1px solid var(--gray-200); padding: var(--space-1) var(--space-2); text-align: center; white-space: nowrap; }
.plan-matrix thead th { background: var(--gray-50); font-weight: 600; color: #374151; position: sticky; top: 0; z-index: 2; font-size: 1em; }
.plan-matrix thead th.weekend { background: #fef2f2; color: #dc2626; }
.plan-matrix .corner { background: var(--gray-100); min-width: 55px; position: sticky; z-index: 3; }
.plan-matrix thead .corner:first-child { left: 0; }
.plan-matrix thead .corner:nth-child(2) { left: 50px; }
.plan-matrix .team-label { background: var(--gray-50); font-weight: 600; color: #1f2937; min-width: 50px; position: sticky; left: 0; z-index: 1; font-size: 1em; white-space: normal; }
.plan-matrix .team-name { max-width: 86px; }  /* 20261009STICKY：班组列 163→104px */  /* 20261009STICKY：班组列 163→104px（放开换行，日期列多让 60px） */
.plan-matrix .row-label { background: var(--gray-50); color: #6b7280; font-weight: 500; min-width: 45px; position: sticky; left: 50px; z-index: 1; font-size: 1em; }
.plan-matrix .team-row .team-label { border-top: 2px solid var(--gray-400); }
.plan-matrix .team-sep { border-bottom: 2px solid var(--gray-200); }
.plan-matrix .total-row .team-label { background: #eff6ff; color: #1d4ed8; border-top: 2px solid #93c5fd; }
.plan-matrix .total-row .row-label { background: #eff6ff; color: #1d4ed8; }
.plan-matrix .total-cell { background: #f0f9ff; font-weight: 700; color: #0369a1; }

.plan-cell { min-width: calc(75px * var(--plan-scale, 1)); width: auto; transition: background .15s; }
.plan-cell:hover { background: #dbeafe !important; }
.plan-cell.empty-cell { background: var(--gray-50); }
.plan-cell.has-data { background: #f0fdf4; }
.plan-cell.num-cell { font-variant-numeric: tabular-nums; }
.plan-cell .style-name { font-size: 1em; font-weight: 600; color: #2563eb; overflow: hidden; text-overflow: ellipsis; max-width: calc(80px * var(--plan-scale, 1)); }
.plan-cell .style-badge { display: inline-block; padding: var(--space-1) var(--space-2); border-radius: var(--radius-md); font-size: var(--fs-xs); font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90%; }
.plan-cell .countdown { font-size: var(--fs-xs); margin-top: 2px; font-weight: 500; }
.plan-cell .countdown.urgent { color: #dc2626; font-weight: 700; }
.plan-cell .countdown.warn { color: #d97706; }
.plan-cell .countdown.normal { color: #6b7280; }
.plan-cell.reach { color: #059669; font-weight: 600; }
.plan-cell.warn { color: #d97706; font-weight: 600; }
.plan-cell.danger { color: #dc2626; font-weight: 600; }
.plan-cell.actual-over { color: #d97706; font-weight: 700; background: #fffbeb !important; }
.plan-cell.actual-low { color: #dc2626; font-weight: 700; background: #fef2f2 !important; }
.plan-cell.actual-zero { color: #dc2626; background: #fef2f2 !important; }
.plan-cell.no-report { background: var(--gray-50) !important; }
.plan-cell.diff-pos { color: #059669; font-size: 1em; }
.plan-cell.diff-neg { color: #dc2626; font-size: 1em; }

/* 交期预警 */
.plan-cell.deadline-urgent { background: #fef2f2 !important; border-color: #fca5a5; }
.plan-cell.deadline-urgent .style-badge { box-shadow: 0 0 0 2px #fca5a5; }
.plan-cell.deadline-warn { background: #fffbeb !important; border-color: #fcd34d; }
.plan-cell.deadline-warn .style-badge { box-shadow: 0 0 0 2px #fcd34d; }
.plan-cell.deadline-overdue { background: #fef2f2 !important; border-color: #f87171; animation: deadline-pulse 2s infinite; }
.plan-cell.deadline-overdue .style-badge { box-shadow: 0 0 0 2px #f87171; }
@keyframes deadline-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
/* 订单进度条 */
.order-progress-wrap { width: 100%; height: 3px; background: var(--gray-200); border-radius: var(--radius-xs); overflow: hidden; margin: 2px 0; }
.order-progress-bar { height: 100%; background: linear-gradient(90deg, #3b82f6, #2563eb); border-radius: var(--radius-xs); transition: width .3s; }

/* 未排程款号提醒 */
.unplanned-item { display: inline-block; padding: var(--space-1) var(--space-3); background: #fef3c7; color: #92400e; border-radius: var(--radius-md); font-size: 11px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.unplanned-item:hover { background: #fde68a; }

.plan-cell.product-cell { font-size: var(--fs-xs); color: var(--gray-600); padding: var(--space-1) var(--space-1); }
.plan-cell .product-name { display: inline-block; max-width: calc(60px * var(--plan-scale, 1)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 排程矩阵增强 */
.plan-matrix .team-toggle { cursor: pointer; user-select: none; font-size: 1em; }
.plan-matrix .team-toggle:hover { background: #e0e7ff !important; }
.plan-matrix .detail-row { background: var(--gray-50); }
.plan-matrix .detail-cell { font-size: 1em; color: #6b7280; }
.plan-matrix .detail-label { background: #f5f5f5; color: #9ca3af; font-size: 1em; font-weight: 500; }
/* 日报修正计划 */
.plan-matrix .plan-daily { background: #ecfdf5; color: #059669; font-weight: 600; }
.plan-matrix .plan-daily:hover { background: #d1fae5; }
/* 累计误差进度条 */
.cum-bar-wrap { width: 100%; height: 4px; background: var(--gray-200); border-radius: var(--radius-xs); overflow: hidden; margin-bottom: 2px; }
.cum-bar { height: 100%; border-radius: var(--radius-xs); transition: width .3s; }
.cum-bar.bar-good { background: #10b981; }
.cum-bar.bar-warn { background: #f59e0b; }
.cum-bar.bar-bad { background: #dc2626; }
.cum-val { font-size: var(--fs-xs); font-weight: 600; }
/* 达成率进度条 */
.rate-bar-wrap { width: 100%; height: 4px; background: var(--gray-200); border-radius: var(--radius-xs); overflow: hidden; margin-bottom: 2px; }
.rate-bar { height: 100%; border-radius: var(--radius-xs); transition: width .3s; }
.rate-bar.bar-good { background: #10b981; }
.rate-bar.bar-warn { background: #f59e0b; }
.rate-bar.bar-bad { background: #dc2626; }
.rate-val { font-size: var(--fs-xs); font-weight: 700; }
/* 实际产量无数据 */
.plan-cell .dash { color: var(--gray-400); }

/* 同组多款样式 */
.multi-style-cell { cursor: pointer; position: relative; }
.multi-style-cell:hover { background: #eff6ff !important; }
.multi-badge { display: inline-block; background: var(--card); color: #2563eb; font-size: var(--fs-xs); padding: 0 5px; border-radius: var(--radius-sm); margin-left: 3px; font-weight: 700; }
.multi-popup-quick { display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: rgba(255,255,255,.72); backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%); border: 1px solid rgba(255,255,255,.7); border-radius: var(--radius-md); box-shadow: 0 14px 36px rgba(15,23,42,.16), inset 0 1px 0 rgba(255,255,255,.75); padding: 0; z-index: 100; min-width: 260px; margin-bottom: 6px; overflow: hidden; }
.multi-style-cell:hover .multi-popup-quick { display: block; }
.multi-popup-header { background: rgba(248,250,252,.6); padding: var(--space-2) var(--space-3); display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,.6); font-size: var(--fs-sm); font-weight: 600; color: var(--gray-800); }
.multi-popup-count { background: #2563eb; color: #fff; font-size: var(--fs-xs); padding: var(--space-1) var(--space-2); border-radius: var(--radius-md); }
.multi-popup-body { padding: var(--space-2); }
.multi-popup-item { display: flex; justify-content: space-between; align-items: center; padding: var(--space-2) var(--space-2); border-radius: var(--radius-xs); margin-bottom: 3px; border-left: 3px solid; font-size: var(--fs-sm); background: rgba(248,250,252,.6); }
.multi-popup-item:last-child { margin-bottom: 0; }
.mpi-left { display: flex; align-items: center; gap: var(--space-2); }
.mpi-style { font-weight: 600; font-size: var(--fs-sm); }
.mpi-product { color: var(--gray-500); font-size: 11px; }
.mpi-right { color: var(--gray-700); font-size: var(--fs-sm); }
.mpi-right b { color: var(--gray-900); }
.multi-popup-footer { padding: var(--space-2) var(--space-3); background: rgba(248,250,252,.6); border-top: 1px solid rgba(255,255,255,.6); font-size: 11px; color: var(--gray-600); display: flex; justify-content: space-between; }
.mpi-hint { color: #2563eb; font-weight: 500; }

/* 多款编辑面板 */
.multi-editor-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.multi-editor-panel { background: var(--card); border-radius: var(--radius-md); width: 90%; max-width: 800px; max-height: 85vh; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.multi-editor-header { background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; padding: var(--space-3) var(--space-5); display: flex; justify-content: space-between; align-items: center; }
.multi-editor-title { font-size: var(--fs-lg); font-weight: 600; display: flex; align-items: center; gap: var(--space-3); }
.multi-editor-close { background: rgba(255,255,255,0.2); border: none; color: #fff; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: var(--fs-lg); display: flex; align-items: center; justify-content: center; }
.multi-editor-close:hover { background: rgba(255,255,255,0.3); }
.multi-editor-body { padding: var(--space-4) var(--space-5); max-height: 55vh; overflow-y: auto; }
.multi-editor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-3); }
.multi-style-cell { cursor: pointer; }
.multi-style-badges { display: flex; flex-wrap: wrap; gap: var(--space-1); justify-content: center; align-items: center; }
.multi-style-tag { font-size: var(--fs-xs) !important; padding: 1px 5px !important; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.multi-style-tag.more { background: #6b7280 !important; }
.multi-editor-card { background: var(--gray-50); border-radius: var(--radius-sm); padding: var(--space-3); border: 1px solid var(--gray-200); border-left: 4px solid; }
.mec-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.mec-style { font-weight: 700; font-size: var(--fs-md); color: #1e40af; }
.mec-product { font-size: var(--fs-sm); color: var(--gray-600); margin-top: 2px; }
.mec-actions { display: flex; gap: var(--space-1); }
.mec-btn { background: none; border: 1px solid var(--gray-200); border-radius: var(--radius-xs); padding: var(--space-1) var(--space-2); font-size: 11px; color: var(--gray-600); cursor: pointer; }
.mec-btn:hover { background: var(--card); }
.mec-btn.del:hover { color: #dc2626; border-color: #dc2626; }
.mec-stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); font-size: var(--fs-sm); }
.mec-stat { background: var(--card); padding: var(--space-2) var(--space-2); border-radius: var(--radius-xs); }
.mec-stat .label { color: var(--gray-500); font-size: var(--fs-xs); }
.mec-stat .value { font-weight: 600; color: var(--gray-900); font-size: var(--fs-base); }
.mec-stat .value input { width: 100%; border: 1px solid transparent; border-radius: var(--radius-xs); padding: var(--space-1) var(--space-1); font-size: var(--fs-sm); background: var(--input-fill, #f2f4f8); }
.mec-progress { margin-top: 8px; }
.mec-progress-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--gray-600); margin-bottom: 3px; }
.mec-progress-bar { height: 6px; background: var(--gray-200); border-radius: var(--radius-xs); overflow: hidden; }
.mec-progress-fill { height: 100%; border-radius: var(--radius-xs); }
.mec-add-card { background: var(--card); border: 2px dashed var(--gray-400); border-radius: var(--radius-sm); padding: var(--space-3); display: flex; align-items: center; justify-content: center; color: var(--gray-500); cursor: pointer; transition: all 0.15s; min-height: 120px; }
.mec-add-card:hover { border-color: #2563eb; color: #2563eb; background: #f0f7ff; }
.multi-editor-footer { padding: var(--space-3) var(--space-5); background: var(--gray-50); border-top: 1px solid var(--gray-200); display: flex; justify-content: space-between; align-items: center; }
.multi-editor-total { font-size: var(--fs-base); color: var(--gray-800); }
.multi-editor-total span { color: #2563eb; font-weight: 600; margin-left: 4px; }
.multi-editor-actions { display: flex; gap: var(--space-2); }
.mec-btn-cancel { background: var(--card); border: 1px solid var(--gray-200); color: var(--gray-600); padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); cursor: pointer; font-size: var(--fs-base); }
.mec-btn-save { background: #2563eb; border: 1px solid #2563eb; color: #fff; padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); cursor: pointer; font-size: var(--fs-base); font-weight: 500; }
.mec-btn-save:hover { background: #1d4ed8; }

/* 产能日历 */
.capacity-wrap { overflow-x: auto; }
.capacity-table { border-collapse: collapse; width: 100%; font-size: var(--fs-sm); min-width: 800px; }
.capacity-table th, .capacity-table td { border: 1px solid var(--gray-200); padding: var(--space-2) var(--space-2); text-align: center; }
.capacity-table thead th { background: var(--gray-50); font-weight: 700; color: #374151; position: sticky; top: 0; }
.capacity-table th.cap-weekend { background: #fef2f2; color: #dc2626; }
.capacity-table .cap-factory { text-align: left; min-width: 120px; background: var(--gray-50); font-weight: 600; }
.capacity-table .cap-cell { min-width: 70px; padding: var(--space-2) var(--space-1); }
.capacity-table .cap-summary { min-width: 100px; font-weight: 600; }
.cap-bar { width: 100%; height: 8px; background: var(--gray-200); border-radius: var(--radius-xs); overflow: hidden; margin-bottom: 4px; }
.cap-bar-fill { height: 100%; border-radius: var(--radius-xs); transition: width .3s; }
.cap-num { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cap-legend { display: flex; gap: var(--space-4); margin-top: 12px; flex-wrap: wrap; }
.cap-legend-item { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-sm); color: #6b7280; }
.cap-legend-dot { width: 12px; height: 12px; border-radius: var(--radius-xs); }

/* 物料管理 */
.input-sm { height: 28px; padding: 0 var(--space-3); font-size: var(--fs-sm); border: 1px solid transparent; border-radius: var(--radius-sm); background: var(--input-fill, #f2f4f8); color: var(--text); transition: border-color .15s, background .15s; }
.input-sm:focus { border-color: var(--primary); background: #fff; outline: none; }  /* 20261009GLOBSTYLE：对齐全站灰底填充输入风格 */
.btn-sm { padding: var(--space-1) var(--space-3); font-size: var(--fs-base); }
.card-actions { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }

/* 款号工序 */
.process-group { margin-bottom: 20px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); overflow: hidden; }
.process-group-head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-3); background: var(--gray-50); border-bottom: 1px solid var(--gray-200); font-size: var(--fs-md); flex-wrap: wrap; }
.process-group-head .badge { font-size: 11px; }

/* ===== 排程表增强样式 ===== */
/* 今日列高亮 */
.plan-matrix .today-col { background: #eff6ff !important; }
.plan-matrix th.today-col { background: #dbeafe !important; color: #1d4ed8; font-weight: 700; }
.today-dot { width: 6px; height: 6px; background: #2563eb; border-radius: 50%; margin: 2px auto 0; }

/* 全球假期标注（优化6） */
.plan-matrix .holiday-cn { background: #fef3c7 !important; color: #92400e; }
.plan-matrix th.holiday-cn { background: #fde68a !important; color: #78350f; }
.plan-matrix .holiday-mm { background: #fce7f3 !important; color: #9d174d; }
.plan-matrix th.holiday-mm { background: #fbcfe8 !important; color: #831843; }
.plan-matrix .holiday-intl { background: #e0e7ff !important; color: #3730a3; }
.plan-matrix th.holiday-intl { background: #c7d2fe !important; color: #312e81; }
.plan-matrix .holiday-vn { background: #ecfdf5 !important; color: #166534; }
.plan-matrix th.holiday-vn { background: #d1fae5 !important; color: #065f46; }
.plan-matrix .holiday-kh { background: #fff7ed !important; color: #9a3412; }
.plan-matrix th.holiday-kh { background: #fed7aa !important; color: #7c2d12; }
.plan-matrix th .holiday-name { color: #dc2626; font-weight: 600; }
.plan-matrix .workday-makeup { background: #fff7ed !important; color: #c2410c; }
.plan-matrix th.workday-makeup { background: #fed7aa !important; color: #9a3412; border: 2px solid #fb923c !important; }
.plan-matrix td.workday-makeup { border: 1px dashed #fb923c !important; }

/* 日期表头内容样式 */
.plan-matrix th .date-main { font-size: var(--fs-sm); font-weight: 600; line-height: 1.2; }
.plan-matrix th .date-sub { font-size: var(--fs-xs); color: #9ca3af; margin-top: 2px; line-height: 1.2; }
.plan-matrix th .holiday-icon { font-size: 11px; margin-bottom: 1px; }
.plan-matrix th .holiday-name { font-size: var(--fs-xs); font-weight: 600; margin-top: 2px; line-height: 1.2; }
.plan-matrix th .holiday-progress { font-size: var(--fs-xs); color: #b45309; margin-top: 1px; line-height: 1.2; }
.plan-matrix th.holiday-mm .holiday-progress { color: #be185d; }
.plan-matrix th.holiday-intl .holiday-progress { color: #4338ca; }
.plan-matrix th .lunar-term { font-size: var(--fs-xs); color: #2563eb; font-weight: 600; margin-top: 2px; line-height: 1.2; }
.plan-matrix th .tag { display: inline-block; font-size: var(--fs-xs); padding: var(--space-1) var(--space-1); border-radius: var(--radius-xs); font-weight: 600; }
.plan-matrix th .tag-makeup { background: #fb923c; color: #fff; }

/* 款号图例 */
.plan-legend { display: none; flex-wrap: wrap; gap: var(--space-2); padding: var(--space-2) var(--space-3); background: var(--gray-50); border-bottom: 1px solid var(--gray-200); align-items: center; }
.legend-title { font-size: var(--fs-sm); color: #6b7280; font-weight: 600; }
.legend-item { display: inline-flex; align-items: center; gap: var(--space-1); padding: var(--space-1) var(--space-3); background: var(--card); border: 1px solid var(--gray-200); border-radius: var(--radius-md); font-size: 11px; color: #374151; transition: all .15s; }
.legend-item:hover { border-color: #2563eb; background: #eff6ff; }
.legend-item.active { border-color: #2563eb; background: #dbeafe; font-weight: 600; }
.legend-dot { width: 10px; height: 10px; border-radius: var(--radius-xs); }

/* 班组月度汇总行 */
.plan-matrix .team-summary-row { background: #f0f9ff; }
.plan-matrix .team-summary-label { background: #e0f2fe !important; padding: 0 !important; }
.team-summary-content { display: flex; flex-wrap: wrap; gap: var(--space-3); padding: var(--space-2) var(--space-3); font-size: 11px; color: #0369a1; align-items: center; }
.team-summary-content span { white-space: nowrap; }
.team-summary-content b { color: #0c4a6e; font-weight: 700; }
.team-summary-content .diff-pos b { color: #059669; }
.team-summary-content .diff-neg b { color: #dc2626; }
.plan-matrix .team-summary-cell { background: #f0f9ff; }

/* 右键菜单 */
.plan-context-menu { position: fixed; z-index: 10000; background: var(--card); border: 1px solid var(--gray-200); border-radius: var(--radius-sm); box-shadow: 0 10px 25px rgba(0,0,0,.15); padding: 4px 0; min-width: 160px; }
.plan-context-menu .ctx-item { padding: var(--space-2) var(--space-4); font-size: var(--fs-base); color: #374151; cursor: pointer; transition: background .1s; }
.plan-context-menu .ctx-item:hover { background: #eff6ff; color: #2563eb; }
.plan-context-menu .ctx-danger { color: #dc2626; }
.plan-context-menu .ctx-danger:hover { background: #fef2f2; color: #dc2626; }

/* 智能排程建议 */
.ai-suggest-modal { max-width: 720px; width: 90%; }
.ai-suggest-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: 16px;
}
.ai-summary-item {
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  text-align: center;
}
.ai-summary-label {
  display: block;
  font-size: var(--fs-sm);
  color: #6b7280;
  margin-bottom: 4px;
}
.ai-summary-value {
  display: block;
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--text);
}
.ai-summary-value.danger { color: #dc2626; }
/* 待补录清单 */
.pend-list { display: flex; flex-direction: column; gap: var(--space-2); max-height: 52vh; overflow: auto; }
.pend-row {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  background: var(--card); border: 1px solid var(--gray-100);
  transition: border-color .15s, box-shadow .15s;
}
.pend-row:hover { border-color: #ddd6fe; box-shadow: 0 2px 8px rgba(139,92,246,.10); }
.pend-date { flex: none; font-size: var(--fs-sm); font-weight: 700; color: var(--gray-900); background: #f3e8ff; padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); }
.pend-styles { flex: 1; min-width: 0; font-size: var(--fs-sm); color: var(--gray-800); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pend-team { flex: none; font-size: var(--fs-sm); color: #1e40af; font-weight: 600; }
.pend-qty { flex: none; font-size: var(--fs-sm); color: var(--gray-500); }
.pend-go { flex: none; padding: var(--space-1) var(--space-3); border: none; border-radius: var(--radius-sm); background: var(--primary-grad); color: #fff; font-size: var(--fs-sm); font-weight: 700; cursor: pointer; }
.pend-go:hover { filter: brightness(1.06); }
.pend-go:disabled { opacity: .55; cursor: default; }
.pend-tip { margin-top: 10px; font-size: 11px; color: var(--gray-500); line-height: 1.7; }
.reb-row .pend-styles { min-width: 110px; font-weight: 700; color: #1e40af; }
.ai-suggest-list { margin-bottom: 16px; }
.ai-suggest-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  border-left: 4px solid;
}
.ai-suggest-item.ai-suggest-warning { background: #fffbeb; border-color: #f59e0b; }
.ai-suggest-item.ai-suggest-info { background: #eff6ff; border-color: #3b82f6; }
.ai-suggest-item.ai-suggest-danger { background: #fef2f2; border-color: #dc2626; }
.ai-suggest-item.ai-suggest-rebalance { background: #f5f3ff; border-color: #3b82f6; }
.ai-suggest-item.ai-suggest-success { background: #f0fdf4; border-color: #16a34a; }
.ai-suggest-icon { font-size: var(--fs-2xl); }
.ai-suggest-content { flex: 1; }
.ai-suggest-title { font-weight: 600; font-size: var(--fs-md); margin-bottom: 2px; }
.ai-suggest-desc { font-size: var(--fs-sm); color: #6b7280; }
.ai-suggest-detail h4 { margin: 0 0 8px 0; font-size: var(--fs-md); }
.ai-load-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.ai-load-table th, .ai-load-table td {
  padding: var(--space-2) var(--space-2);
  border: 1px solid var(--gray-200);
  text-align: center;
}
.ai-load-table th { background: var(--gray-50); font-weight: 600; }
.ai-load-table .good { color: #16a34a; font-weight: 600; }
.ai-load-table .warn { color: #d97706; font-weight: 600; }
.ai-load-table .bad { color: #dc2626; font-weight: 600; }

/* 周末列 */
.plan-matrix th.weekend {
  background: var(--gray-100);
}
.plan-matrix td.weekend {
  background: var(--gray-50);
}

/* 休息日列（系统设置配置，自动排程跳过） */
.plan-matrix th.rest-day {
  background: #fecaca !important;
  color: #7f1d1d;
}
.plan-matrix td.rest-day {
  background: #fef2f2 !important;
}
.plan-matrix th.rest-day .date-main,
.plan-matrix th.rest-day .date-sub {
  color: #b91c1c;
}
.plan-matrix th.rest-day::after {
  content: '休';
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: var(--fs-xs);
  background: #dc2626;
  color: #fff;
  border-radius: var(--radius-xs);
  padding: 0 3px;
  line-height: 14px;
}

/* 休息日设置页 */
.rest-settings-body .rest-card .form-label { margin-bottom: 8px; }
.rest-settings-body .empty-state { padding: var(--space-4); text-align: center; color: var(--gray-500); font-size: var(--fs-base); }

/* 班组月度汇总小字体 */
.team-name {
  font-weight: 600;
  font-size: var(--fs-sm);
  margin-bottom: 2px;
}
/* 合并组「主从模式」：主组胶囊 / 副组并入标记 / 副组行弱化 */
.merge-cap {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: #fff;
  background: var(--primary-grad);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
  margin-left: 5px;
  vertical-align: 2px;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
  letter-spacing: 0.2px;
}
.merge-sub-flag {
  display: inline-block;
  font-size: var(--fs-xs);
  color: #8a94a6;
  background: #f1f3f7;
  border-radius: var(--radius-xs);
  padding: var(--space-1) var(--space-2);
  margin-left: 5px;
  vertical-align: 2px;
  font-weight: 500;
}
.team-row-sub td {
  background: var(--gray-50);
  color: #9aa1b0;
}
.team-row-sub .team-label {
  background: #f4f6f9;
}
.team-row-sub .team-name {
  color: #9aa1b0;
  font-weight: 500;
}
.plan-cell.sub-zero {
  color: #c3c9d4 !important;
  font-weight: 400;
}
.team-summary-mini {
  font-size: 9.5px;
  color: #6b7280;
  line-height: 1.4;
  max-width: 84px;  /* 20261009STICKY：班组列 208→104px（徽章缩角标+汇总小字两列+padding 收紧） */
}
.team-summary-mini span {
  display: block;
}
.team-summary-mini .rate-good { color: #059669; }
.team-summary-mini .rate-warn { color: #d97706; }
.team-summary-mini .rate-bad { color: #dc2626; }

/* 交期风险预警 */
.deadline-risk {
  background: #fef3c7 !important;
  animation: risk-pulse 2s infinite;
}
@keyframes risk-pulse {
  0%, 100% { background: #fef3c7; }
  50% { background: #fde68a; }
}
.countdown.urgent {
  background: #dc2626;
  color: white;
}
.countdown.warn {
  background: #f59e0b;
  color: white;
}
.countdown.normal {
  background: var(--gray-200);
  color: #6b7280;
}

/* sticky横向滚动条 */
.plan-hscroll-sticky {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  overflow-x: auto;
  overflow-y: hidden;
  height: 14px;
  background: var(--gray-100);
  border-top: 1px solid var(--gray-200);
  display: none;
}
.plan-hscroll-sticky.visible {
  display: block;
}
.plan-hscroll-inner {
  height: 1px;
}
.plan-hscroll-sticky::-webkit-scrollbar {
  height: 10px;
}
.plan-hscroll-sticky::-webkit-scrollbar-track {
  background: var(--gray-100);
}
.plan-hscroll-sticky::-webkit-scrollbar-thumb {
  background: var(--gray-500);
  border-radius: var(--radius-xs);
}
.plan-hscroll-sticky::-webkit-scrollbar-thumb:hover {
  background: var(--gray-600);
}

/* 部门出勤统计看板 */
.dept-collapsed {
  max-height: 0 !important;
  padding: 0 12px !important;
  overflow: hidden;
  opacity: 0;
  margin-bottom: 0 !important;
}
.dept-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.dept-stats-table th {
  background: var(--gray-100);
  padding: var(--space-3) var(--space-2);
  text-align: left;
  font-weight: 600;
  color: var(--gray-700);
  border-bottom: 1px solid #e7ebf3;
  font-size: 11px;
}
.dept-stats-table td {
  padding: var(--space-2);
  border-bottom: 1px solid var(--gray-100);
}
.dept-stats-table tr:last-child td {
  border-bottom: none;
}
.dept-stats-table tr:hover {
  background: var(--gray-50);
}

/* ========== 系统初始化 ========== */
.init-warning-box {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.init-warning-icon { font-size: var(--fs-2xl); }
.init-warning-text strong { color: #92400e; display: block; margin-bottom: 4px; }
.init-warning-text p { color: #78350f; margin: 0; font-size: var(--fs-base); }
.init-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.init-info-item {
  padding: var(--space-3);
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  text-align: center;
}
.init-info-label { font-size: var(--fs-sm); color: var(--gray-600); margin-bottom: 4px; }
.init-info-value { font-size: var(--fs-lg); font-weight: 600; color: var(--text); }
.btn-danger {
  background: #dc2626;
  color: #fff;
  border: none;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--fs-md);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.btn-danger:hover { background: #b91c1c; }
.btn-danger:disabled { background: #fca5a5; cursor: not-allowed; }
.btn-lg { padding: 12px 28px; font-size: var(--fs-md); }

/* 初始化向导弹窗 */
.init-wizard-modal { max-width: 680px; width: 90%; }
.init-step-indicator {
  display: flex;
  gap: var(--space-2);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
}
.init-step-indicator span {
  flex: 1;
  text-align: center;
  padding: var(--space-2);
  font-size: var(--fs-base);
  color: var(--gray-500);
  background: var(--gray-100);
  border-radius: var(--radius-sm);
}
.init-step-indicator span.active {
  background: #2563eb;
  color: #fff;
  font-weight: 600;
}
.init-step-indicator span.done {
  background: #10b981;
  color: #fff;
}
.init-presets {
  display: flex;
  gap: var(--space-2);
  margin-bottom: 16px;
}
.init-items-list { max-height: 320px; overflow-y: auto; margin-bottom: 12px; }
.init-category { margin-bottom: 12px; }
.init-category-title {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
  padding: var(--space-2) var(--space-3);
  background: var(--gray-100);
  border-radius: var(--radius-xs);
}
.init-item-check {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-3);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.init-item-check:hover { border-color: #93c5fd; background: #f0f7ff; }
.init-item-check.checked { border-color: #2563eb; background: #eff6ff; }
.init-item-check input { margin-top: 4px; }
.init-item-info { flex: 1; }
.init-item-name { font-weight: 500; color: var(--text); font-size: var(--fs-md); }
.init-item-count {
  font-size: var(--fs-sm);
  color: var(--gray-600);
  background: var(--gray-200);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  margin-left: 8px;
}
.init-item-desc { font-size: var(--fs-sm); color: var(--gray-600); margin-top: 2px; }
.init-item-impact { font-size: 11px; color: var(--gray-500); margin-top: 2px; }
.init-selected-info {
  text-align: center;
  padding: var(--space-3);
  background: #f0f7ff;
  border-radius: var(--radius-sm);
  font-size: var(--fs-base);
  color: #1e40af;
}
.init-confirm-section { margin-bottom: 16px; }
.init-confirm-title {
  font-size: var(--fs-md);
  font-weight: 600;
  margin-bottom: 8px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
}
.init-confirm-title.success { background: #dcfce7; color: #166534; }
.init-confirm-title.info { background: #dbeafe; color: #1e40af; }
.init-confirm-title.warning { background: #fef3c7; color: #92400e; }
.init-confirm-title.protected { background: #f3e8ff; color: #6b21a8; }
.init-confirm-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}
.init-confirm-item {
  display: flex;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  background: var(--gray-50);
  border-radius: var(--radius-xs);
  font-size: var(--fs-base);
}
.init-confirm-list.kept .init-confirm-item { background: #f0fdf4; }
.init-confirm-name { color: var(--gray-800); }
.init-confirm-count { color: var(--gray-600); font-weight: 500; }
.init-impact-list {
  margin: 0;
  padding-left: 20px;
  font-size: var(--fs-base);
  color: var(--gray-700);
}
.init-impact-list li { margin-bottom: 4px; }
.init-protected-list {
  padding: var(--space-3) var(--space-3);
  background: #faf5ff;
  border-radius: var(--radius-sm);
  font-size: var(--fs-base);
  color: #6b21a8;
}
.init-final-warning {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}
.init-warning-icon-large { font-size: var(--fs-3xl); }
.init-warning-text-large strong { color: #991b1b; display: block; margin-bottom: 4px; font-size: var(--fs-md); }
.init-warning-text-large p { color: #7f1d1d; margin: 0; font-size: var(--fs-base); }
.init-form-group { margin-bottom: 16px; }
.init-form-group label {
  display: block;
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--gray-800);
  margin-bottom: 6px;
}
.init-form-group .admin-input { width: 100%; }
.init-error {
  padding: var(--space-3) var(--space-3);
  background: #fef2f2;
  color: #dc2626;
  border-radius: var(--radius-sm);
  font-size: var(--fs-base);
  margin-top: 12px;
}
.init-result { text-align: center; padding: 20px 0; }
.init-result-icon { font-size: 48px; margin-bottom: 12px; }
.init-result-title { font-size: var(--fs-xl); font-weight: 700; color: #166534; margin-bottom: 8px; }
.init-result-sub { font-size: var(--fs-md); color: var(--gray-600); margin-bottom: 20px; }
.init-result-list {
  text-align: left;
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 16px;
  padding: 0 20px;
}
.init-result-item {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-xs);
  margin-bottom: 4px;
  font-size: var(--fs-base);
}
.init-result-item.success { background: #f0fdf4; color: #166534; }
.init-result-item.error { background: #fef2f2; color: #991b1b; }
.init-result-backup {
  font-size: var(--fs-sm);
  color: var(--gray-500);
  padding: var(--space-2);
  background: var(--gray-50);
  border-radius: var(--radius-xs);
  font-family: monospace;
}

/* 工序Tab切换 */
.process-tabs {
  display: flex;
  gap: var(--space-2);
  margin: 16px 0;
  padding: var(--space-2);
  background: var(--gray-100);
  border-radius: var(--radius-md);
}
.process-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--gray-600);
  transition: all 0.2s;
  user-select: none;
}
.process-tab:hover {
  background: var(--gray-200);
  color: var(--gray-800);
}
.process-tab.active {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.process-tab .ico {
  width: 18px;
  height: 18px;
}

/* WIP在制品卡片 */
.wip-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--gray-50);
  border-radius: var(--radius-md);
  margin-top: 12px;
}
.wip-step {
  flex: 1;
  text-align: center;
  padding: var(--space-3) var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--gray-200);
}
.wip-step .wip-icon {
  font-size: var(--fs-xl);
  margin-bottom: 4px;
}
.wip-step .wip-name {
  font-size: var(--fs-sm);
  color: var(--gray-600);
  margin-bottom: 4px;
}
.wip-step .wip-qty {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: #1e40af;
}
.wip-step .wip-unit {
  font-size: 11px;
  color: var(--gray-500);
}
.wip-step.wip-alert {
  background: #fef2f2;
  border-color: #fecaca;
}
.wip-step.wip-alert .wip-qty {
  color: #dc2626;
}
.wip-arrow {
  font-size: var(--fs-xl);
  color: var(--gray-500);
  flex-shrink: 0;
}

/* WIP工序流转页面 */
.alert-tag {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 600;
}
.alert-tag.severe {
  background: #fef2f2;
  color: #dc2626;
}
.alert-tag.high {
  background: #fffbeb;
  color: #d97706;
}
.alert-tag.normal {
  background: #f0fdf4;
  color: #16a34a;
}
#wipKpiGrid .kpi-card {
  transition: transform 0.2s, box-shadow 0.2s;
}
#wipKpiGrid .kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
#wipStyleTable tbody tr:hover {
  background: #f0f7ff;
}

/* 修复WIP页面文字竖排问题 */
#wipSuggestions > div {
  white-space: normal;
  word-break: break-word;
}
#wipEfficiency > div {
  white-space: normal;
}
#wipEfficiencyTip {
  white-space: normal;
  word-break: break-word;
}

/* 修复WIP智能建议文字竖排 */
#tab-wip #wipSuggestions > div {
  white-space: normal !important;
  word-break: break-word !important;
  writing-mode: horizontal-tb !important;
}
#tab-wip #wipSuggestions > div span {
  white-space: normal !important;
  word-break: break-word !important;
}

/* ============ 休息日设置中心（三Tab） ============ */
.rest-tabs { display:flex; gap: var(--space-2); border-bottom:2px solid var(--gray-200); margin-bottom:16px; }
.rest-tab { padding: var(--space-2) var(--space-5); font-size: var(--fs-base); font-weight:600; color:var(--gray-600); cursor:pointer; border:none; background:none; border-bottom:2px solid transparent; margin-bottom:-2px; }
.rest-tab.on { color:#2563eb; border-bottom-color:#2563eb; }
.rest-matrix { width:100%; border-collapse:collapse; font-size: var(--fs-base); }
.rest-matrix th, .rest-matrix td { border:1px solid var(--gray-200); padding: var(--space-2) var(--space-3); text-align:center; }
.rest-matrix thead th { background:var(--gray-50); font-weight:600; color:var(--gray-700); }
.rest-matrix td.fac { text-align:left; font-weight:600; white-space:nowrap; }
/* 20261003ALIGN：工厂列数据是 td.fac 左对齐，表头原为 center → 实测 OFF 50px。
   表头跟随数据改左对齐。其余 9 列头/数据均居中，保持不变（实测 OFF=0）。 */
.rest-matrix thead th.fac-h { text-align: left; }
.rest-matrix td.fac, .rest-matrix thead th.fac-h { min-width: 150px; max-width: 220px; }
.rest-dot { display:inline-block; width:20px; height:20px; border-radius: var(--radius-sm); border:2px solid var(--gray-400); cursor:pointer; vertical-align:middle; transition:.15s; background: var(--card); }
.rest-dot.on { background:#dc2626; border-color:#dc2626; box-shadow:0 0 0 3px rgba(220,38,38,.12); }
.rest-badge { font-size:11px; padding: var(--space-1) var(--space-2); border-radius: var(--radius-md); font-weight:600; white-space:nowrap; }
.rest-badge.badge-base { background:var(--gray-100); color:var(--gray-600); }
.rest-badge.badge-own { background:#fef3c7; color:#b45309; }
.rest-badge.badge-follow { background:#e0f2fe; color:#0369a1; }
.cal-toolbar { display:flex; align-items:center; gap: var(--space-3); margin-bottom:12px; flex-wrap:wrap; }
.cal-nav { display:flex; align-items:center; gap: var(--space-2); }
.cal-month { font-size: var(--fs-md); font-weight:700; min-width:110px; text-align:center; }
.rest-tmpl { display:flex; gap: var(--space-2); align-items:center; flex-wrap:wrap; font-size: var(--fs-sm); color:var(--gray-600); }
.cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap: var(--space-1); max-width:560px; }
.cal-head { font-weight:700; color:var(--gray-600); font-size: var(--fs-sm); text-align:center; padding:6px 0; }
.cal-empty { }
.cal-cell { aspect-ratio:1; border:1px solid var(--gray-200); border-radius: var(--radius-sm); display:flex; flex-direction:column; align-items:center; justify-content:center; font-size: var(--fs-base); color:var(--gray-800); cursor:pointer; position:relative; transition:.12s; }
.cal-cell:hover { border-color:#2563eb; }
.cal-cell.week { background:repeating-linear-gradient(45deg,#fef2f2,#fef2f2 5px,#fee2e2 5px,#fee2e2 10px); border-color:#fecaca; }
.cal-cell.special { background:#dc2626; color:#fff; font-weight:700; border-color:#dc2626; }
.cal-cell.today { outline:2px solid #2563eb; outline-offset:1px; }
.cal-tag { font-size: var(--fs-xs); line-height:1; margin-top:1px; opacity:.9; }
.cal-legend { display:flex; gap: var(--space-4); margin-top:10px; font-size:11px; color:var(--gray-600); flex-wrap:wrap; align-items:center; }
.cal-legend span { display:flex; align-items:center; gap: var(--space-1); }
.cal-legend i { display:inline-block; width:14px; height:14px; border-radius: var(--radius-xs); }
.lg-spec { background:#dc2626; }
.lg-week { background:repeating-linear-gradient(45deg,#fef2f2,#fee2e2 6px); }
.lg-today { outline:2px solid #2563eb; }
.spec-item { display:flex; align-items:center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border:1px solid var(--gray-200); border-radius: var(--radius-sm); margin-bottom:6px; font-size: var(--fs-sm); }
.spec-item b { min-width:88px; }
.spec-item span { flex:1; color:var(--gray-600); }
.fac-cal { border-collapse:collapse; font-size:11px; }
.fac-cal th, .fac-cal td { border:1px solid var(--gray-200); padding: var(--space-1) var(--space-1); text-align:center; min-width:26px; }
.fac-cal thead th { background:var(--gray-50); color:var(--gray-600); font-weight:600; }
.fac-cal thead th.sun { color:#dc2626; }
.fac-cal td.fac { text-align:left; font-weight:600; white-space:nowrap; padding: var(--space-2) var(--space-3); min-width:120px; }
.fac-cal td.r { background:#dc2626; color:#fff; font-weight:700; }
.fac-cal td.rw { background:repeating-linear-gradient(45deg,#fef2f2,#fef2f2 4px,#fee2e2 4px,#fee2e2 8px); color:#b91c1c; }
.fac-cal td.today { outline:2px solid #2563eb; }
.alloff-note { margin-top:12px; padding: var(--space-3) var(--space-3); border-radius: var(--radius-md); background:#fef2f2; border:1px solid #fecaca; font-size: var(--fs-sm); color:#b91c1c; }
.alloff-note b { font-size: var(--fs-base); }
.alloff-chips { display:flex; gap: var(--space-2); flex-wrap:wrap; margin-top:6px; }
.alloff-chips span { padding: var(--space-1) var(--space-3); border-radius: var(--radius); background:#dc2626; color:#fff; font-weight:700; font-size:11px; }

/* ========== 假日设置 B1 美化 ========== */
.rest-stats { display:grid; grid-template-columns:repeat(3,1fr); gap: var(--space-3); margin-bottom:14px; }
.rest-stats.cols4 { grid-template-columns:repeat(4,1fr); }
.rest-stat { border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); color:#fff; display:flex; align-items:center; gap: var(--space-3); position:relative; overflow:hidden; }
.rest-stat::after { content:''; position:absolute; right:-20px; top:-20px; width:80px; height:80px; border-radius:50%; background:rgba(255,255,255,.12); }
.rest-stat .num { font-size: var(--fs-2xl); font-weight:800; line-height:1.1; }
.rest-stat .lbl { font-size: var(--fs-sm); opacity:.92; margin-top:2px; }
.rest-stat .scope2 { font-size: var(--fs-xs); opacity:.72; margin-top:1px; }
.rest-stat svg { width:30px; height:30px; flex-shrink:0; }
.rest-stat.s1 { background:linear-gradient(135deg,#2563eb,#3b82f6); }
.rest-stat.s2 { background:linear-gradient(135deg,#dc2626,#dc2626); }
.rest-stat.s3 { background:linear-gradient(135deg,#2563eb,#3b82f6); }
.rest-stat.s4 { background:linear-gradient(135deg,#fb923c,#d97706); }
.rest-stat.s5 { background:linear-gradient(135deg,#059669,#047857); }
.rest-stat.s6 { background:linear-gradient(135deg,#d97706,#b45309); }
.rest-stat.s7 { background:linear-gradient(135deg,#0ea5e9,#0284c7); }
.rest-stat.clickable { cursor:pointer; }
/* 统计卡控制条 + 负载 + 图表（M2+M5 融合） */
.rest-stats-ctl { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap: var(--space-2); background:var(--gray-50); border:1px solid var(--gray-200); border-radius: var(--radius-md); padding: var(--space-2) var(--space-3); margin-bottom:12px; }
.rest-stats-ctl .mnav { display:flex; align-items:center; gap: var(--space-2); background: var(--card); border:1px solid var(--gray-400); border-radius: var(--radius-full); padding: var(--space-1) var(--space-2); }
.rest-stats-ctl .mnav button { width:26px; height:26px; border:none; background:var(--gray-100); border-radius:50%; cursor:pointer; font-size: var(--fs-md); color:#374151; line-height:1; }
.rest-stats-ctl .mnav .m { font-size: var(--fs-base); font-weight:700; min-width:100px; text-align:center; }
.rest-cmp { font-size: var(--fs-sm); font-weight:700; border-radius: var(--radius-full); padding: var(--space-1) var(--space-3); }
.rest-cmp.up { color:#dc2626; background:#fef2f2; border:1px solid #fecaca; }
.rest-cmp.down { color:#059669; background:#ecfdf5; border:1px solid #a7f3d0; }
.rest-view-pill { display:flex; background:#eef2ff; border-radius: var(--radius-full); padding: var(--space-1); }
.rest-view-pill button { border:none; background:transparent; padding: var(--space-1) var(--space-3); border-radius: var(--radius-full); font-size: var(--fs-sm); cursor:pointer; color:#6366f1; font-weight:500; }
.rest-view-pill button.on { background:#6366f1; color:#fff; }
.rest-view-pill button:disabled { opacity:.55; cursor:not-allowed; }
.rest-load-box { background:var(--gray-50); border:1px solid var(--gray-200); border-radius: var(--radius-md); padding: var(--space-3) var(--space-3); margin-bottom:12px; }
.rest-load-row { display:flex; align-items:baseline; justify-content:space-between; font-size: var(--fs-sm); color:#374151; margin-bottom:6px; flex-wrap:wrap; gap: var(--space-2); }
.rest-load-row b { font-size: var(--fs-md); }
.rest-load-bar { height:9px; background:var(--gray-200); border-radius: var(--radius-full); overflow:hidden; }
.rest-load-bar i { display:block; height:100%; border-radius: var(--radius-full); transition:width .3s; }
.rest-bars { display:flex; gap: var(--space-2); margin-top:10px; }
.rest-bar-item { flex:1; text-align:center; }
.rest-bar-item .bt { font-size:11px; color:#6b7280; margin-bottom:3px; }
.rest-bar-item .bw { height:66px; display:flex; align-items:flex-end; justify-content:center; background:var(--gray-100); border-radius: var(--radius-sm); overflow:hidden; }
.rest-bar-item .bw i { width:38%; border-radius:6px 6px 0 0; background:linear-gradient(180deg,#38bdf8,#0284c7); }
.rest-bar-item .bw i.warn { background:linear-gradient(180deg,#f87171,#dc2626); }
.rest-bar-item .bw i.good { background:linear-gradient(180deg,#34d399,#059669); }
.rest-bar-item .bv { font-size: var(--fs-sm); font-weight:700; color:#374151; margin-top:4px; }
.rest-detail { background:var(--gray-50); border:1px solid var(--gray-200); border-radius: var(--radius-md); padding: var(--space-3) var(--space-3); font-size: var(--fs-sm); color:#374151; line-height:1.9; margin-bottom:12px; display:none; }
.rest-detail .rdt { display:inline-block; background: var(--card); border:1px solid var(--gray-200); border-radius: var(--radius-sm); padding: var(--space-1) var(--space-2); margin:0 4px 4px 0; font-size: var(--fs-sm); }
.rest-detail .rdt.rest { color:#b91c1c; border-color:#fecaca; background:#fef2f2; }
.rest-detail .rdt.mk { color:#c2410c; border-color:#fed7aa; background:#fff7ed; }
.rest-tabs { display:flex; gap: var(--space-1); background:var(--gray-100); padding: var(--space-1); border-radius: var(--radius-md); width:100%; margin-bottom:12px; flex-wrap:nowrap; }
.rest-tab { flex:1; border:0; background:transparent; padding: var(--space-2) var(--space-2); border-radius: var(--radius-sm); font-size: var(--fs-base); color:var(--gray-700); cursor:pointer; display:flex; align-items:center; justify-content:center; gap: var(--space-2); transition:.15s; font-weight:500; white-space:nowrap; }
.rest-tab:hover { color:#2563eb; }
.rest-tab.on { background: var(--card); color:#2563eb; font-weight:600; box-shadow:0 1px 4px rgba(15,23,42,.10); }
.rest-tab svg { width:14px; height:14px; }
.rest-legend { display:flex; gap: var(--space-3); font-size: var(--fs-sm); color:var(--gray-600); margin-bottom:10px; flex-wrap:wrap; align-items:center; }
.rest-legend .lg { display:flex; align-items:center; gap: var(--space-1); }
.rest-legend .lg i { display:inline-block; width:12px; height:12px; border-radius: var(--radius-xs); }
.rest-legend .lg i.lg-on { background:#dc2626; box-shadow:0 1px 3px rgba(239,68,68,.4); }
.rest-legend .lg i.lg-inh { background:repeating-linear-gradient(45deg,#fff,#fff 3px,#fef2f2 3px,#fef2f2 6px); border:1px solid #fca5a5; }
.rest-legend .lg i.lg-off { background: var(--card); border:1px solid var(--gray-400); }
.rest-pane > div > div[style*="overflow"] { border:1px solid var(--gray-200); border-radius: var(--radius-md); box-shadow:0 2px 8px rgba(15,23,42,.05); background: var(--card); }
.rest-matrix thead th { background:linear-gradient(135deg,#1e293b,var(--gray-800)); color:#fff; border:0; }
.rest-matrix th, .rest-matrix td { border:1px solid var(--gray-100); }
.rest-matrix tbody tr:hover { background:var(--gray-50); }
.rest-matrix tbody tr:last-child td { border-bottom:0; }
.rest-dot { border-radius: var(--radius-sm); }
.rest-dot.on { background:linear-gradient(135deg,#dc2626,#f87171); border-color:#dc2626; box-shadow:0 2px 6px rgba(239,68,68,.35); }
.rest-dot.inh { background:repeating-linear-gradient(45deg,#fff,#fff 3px,#fef2f2 3px,#fef2f2 6px); border:1.5px dashed #fca5a5; }
.rest-badge.badge-base { background:#dbeafe; color:#1d4ed8; }
.rest-badge.badge-own { background:#fee2e2; color:#b91c1c; }
.rest-badge.badge-follow { background:var(--gray-100); color:var(--gray-700); }
.rest-tip { margin-top:12px; background:#eff6ff; border-left:3px solid #3b82f6; border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); font-size: var(--fs-sm); color:#1e40af; display:flex; gap: var(--space-2); align-items:flex-start; }
#rest_cal, #rest_overview { background: var(--card); border:1px solid var(--gray-200); border-radius: var(--radius-md); padding: var(--space-3); box-shadow:0 2px 8px rgba(15,23,42,.05); }
.cal-toolbar { border-bottom:1px solid var(--gray-100); padding-bottom:12px; }
.cal-grid { max-width:none; }
.cal-cell { border-radius: var(--radius-md); }
.cal-cell.special { background:linear-gradient(135deg,#dc2626,#dc2626); }
.cal-cell.today { outline:2px solid #3b82f6; outline-offset:1px; }
.rest-stat,.rest-tab { -webkit-tap-highlight-color:transparent; }
@media (max-width:480px) {
  .rest-stats, .rest-stats.cols4 { grid-template-columns:1fr; gap: var(--space-2); }
  .rest-stat { padding: var(--space-3) var(--space-3); }
  .rest-stat .num { font-size: var(--fs-xl); }
  .rest-tabs { width:100%; }
  .rest-tab { flex:1; justify-content:center; padding: var(--space-2) var(--space-2); font-size: var(--fs-sm); }
  #rest_cal, #rest_overview { padding: var(--space-3); }
}

/* 日历工具栏行内对齐修复 */
#rest_cal .cal-toolbar .field { display:flex; align-items:center; gap: var(--space-2); white-space:nowrap; }
#rest_cal .cal-toolbar .field select { width:auto; min-width:0; flex:1; }
@media (max-width:480px) {
  #rest_cal .cal-toolbar .field { width:100%; }
  #rest_cal .cal-toolbar .rest-tmpl { width:100%; }
}

/* ===== 方案C：空班组折叠 + 产能负载着色 ===== */
.plan-matrix .team-empty-row td { background: var(--gray-50) !important; color: #9ca3af; font-size: 11px; }
.plan-matrix .team-empty-row:hover td { background: var(--gray-100) !important; }
.plan-matrix .team-empty-row .team-toggle { color: #9ca3af; }
.plan-matrix .team-empty-row .row-label { color: #b0b7c3; font-style: italic; }
.plan-matrix .cap-low { background: #eff6ff !important; }
.plan-matrix .cap-ok { background: #ecfdf5 !important; }
.plan-matrix .cap-full { background: #fffbeb !important; }
.plan-matrix .cap-over { background: #fef2f2 !important; }
.plan-matrix .cap-over:hover { background: #fee2e2 !important; }

/* ===== 订单交期看板（方案E） ===== */
.deadline-bar{display:flex;gap: var(--space-3);overflow-x:auto;padding: var(--space-3) var(--space-3);background:var(--gray-50);border:1px solid var(--gray-200);border-radius: var(--radius-md);margin-bottom:12px;scrollbar-width:thin}
.deadline-bar .dl-head{min-width:130px;display:flex;align-items:center;font-size: var(--fs-base);font-weight:700;color:var(--gray-700);gap: var(--space-2);position:sticky;left:0;background:var(--gray-50);z-index:2;padding-right:8px}
.dl-card{min-width:196px;flex-shrink:0;background: var(--card);border:1px solid var(--gray-200);border-radius: var(--radius-md);padding: var(--space-2) var(--space-3);cursor:pointer;transition:box-shadow .15s;position:relative;border-left:3px solid #10b981}
.dl-card:hover{box-shadow:0 2px 8px rgba(0,0,0,.1)}
.dl-card.st-urgent{border-left-color:#f59e0b;background:#fffbeb}
.dl-card.st-urgent .dl-days{color:#d97706}
.dl-card.st-overdue{border-left-color:#dc2626;background:#fef2f2;animation:dl-pulse 1.6s infinite}
.dl-card.st-overdue .dl-days{color:#dc2626}
.dl-card.st-warn{border-left-color:#f59e0b}
.dl-card.st-warn .dl-days{color:#d97706}
.dl-card.st-normal{border-left-color:#10b981}
.dl-card.st-normal .dl-days{color:#16a34a}
@keyframes dl-pulse{0%,100%{box-shadow:0 0 0 0 rgba(220,38,38,.25)}50%{box-shadow:0 0 0 5px rgba(220,38,38,0)}}
.dl-top{display:flex;justify-content:space-between;align-items:center;gap: var(--space-2)}
.dl-no{font-size:11px;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dl-badge{font-size: var(--fs-xs);font-weight:700;padding: var(--space-1) var(--space-2);border-radius: var(--radius-full);white-space:nowrap}
.dl-badge.bg-late{background:#fee2e2;color:#b91c1c}
.dl-badge.bg-urg{background:#ffedd5;color:#c2410c}
.dl-badge.bg-warn{background:#fef9c3;color:#a16207}
.dl-badge.bg-ok{background:#dcfce7;color:#166534}
.dl-style{font-size: var(--fs-xs);color:var(--gray-600);margin:3px 0 2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dl-mid{display:flex;justify-content:space-between;align-items:baseline;margin:2px 0}
.dl-days{font-size: var(--fs-lg);font-weight:800}
.dl-days small{font-size: var(--fs-xs);font-weight:600;color:var(--gray-500)}
.dl-prog{margin-top:2px}
.dl-prog .bar{height:5px;background:var(--gray-200);border-radius: var(--radius-xs);overflow:hidden}
.dl-prog .bar i{display:block;height:100%;border-radius: var(--radius-xs);transition:width .3s}
.dl-prog .cap{display:flex;justify-content:space-between;font-size: var(--fs-xs);color:var(--gray-500);margin-top:2px}
.dl-prog .cap b{color:var(--gray-600)}
/* 批量模式（方案F） */
.plan-cell.batch-cell { cursor: pointer; position: relative; }
.plan-cell.batch-cell:hover { outline: 1px solid #3b82f6; outline-offset: -1px; }
.plan-cell.batch-selected { background: #dbeafe !important; outline: 2px solid #3b82f6; outline-offset: -1px; }
.batch-mark { position: absolute; left: 2px; top: 1px; font-size: var(--fs-xs); color: #2563eb; font-weight: 700; pointer-events: none; }
#pp_batch.active { background: #2563eb !important; color: #fff !important; border-color: #2563eb !important; }

/* ===== 款号跨车间进度卡（三车间协同） ===== */
.sp-wrap { font-size: var(--fs-base); }
.sp-title { font-size: var(--fs-md); font-weight: 700; margin-bottom: 8px; }
.sp-sum { font-size: var(--fs-sm); color: var(--gray-700); margin-bottom: 12px; }
.sp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--space-3); }
.sp-card { background: var(--card); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: var(--space-3) var(--space-3); }
.sp-card.sp-bot { border: 2px solid #f87171; background: #fef2f2; }
.sp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sp-ws { font-weight: 700; font-size: var(--fs-base); }
.sp-bad { font-size: 11px; font-weight: 600; padding: var(--space-1) var(--space-2); border-radius: var(--radius-lg); }
.sp-ok { background: #ecfdf5; color: #047857; }
.sp-warn { background: #fffbeb; color: #b45309; }
.sp-red { background: #fef2f2; color: #b91c1c; }
.sp-row { display: flex; justify-content: space-between; font-size: var(--fs-sm); padding: 3px 0; color: var(--gray-700); }
.sp-row b { color: var(--gray-900); }
.sp-foot { font-size: var(--fs-sm); color: var(--gray-500); margin-top: 10px; }
.sp-goto { margin-top: 8px; }
.sp-badge { cursor: pointer; }
.sp-badge:hover { filter: brightness(1.15); box-shadow: 0 0 0 2px rgba(59,130,246,.5); }
.badge-line { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.15; gap: var(--space-1); }
.badge-line .badge-sub { font-size: var(--fs-xs); font-weight: 400; opacity: .88; white-space: nowrap; }
/* 款号悬浮信息卡（自定义 hover · 浅色透明版） */
.plan-tip { position: fixed; z-index: 9999; background: rgba(255,255,255,.92); color: #1e293b; border-radius: var(--radius-md); padding: var(--space-3) var(--space-3); font-size: var(--fs-sm); box-shadow: 0 10px 30px rgba(15,23,42,.16), 0 0 0 1px rgba(148,163,184,.22); pointer-events: none; white-space: nowrap; max-width: 360px; line-height: 1.75; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-family: -apple-system,'PingFang SC','Microsoft YaHei',sans-serif; }
.plan-tip .tip-title { font-weight: 700; color: var(--gray-900); font-size: var(--fs-base); margin-bottom: 3px; display: flex; align-items: center; gap: var(--space-2); letter-spacing: .2px; }
.plan-tip .tip-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 3px rgba(139,92,246,.14); flex: none; }
.plan-tip .tip-st { margin-left: auto; font-size: var(--fs-xs); font-weight: 700; padding: 0 8px; border-radius: var(--radius-full); line-height: 1.6; }
.plan-tip .tip-st.ok { background: rgba(34,197,94,.16); color: #16a34a; }
.plan-tip .tip-st.warn { background: rgba(245,158,11,.16); color: #d97706; }
.plan-tip .tip-st.bad { background: rgba(239,68,68,.14); color: #dc2626; }
.plan-tip .tip-row { display: flex; gap: var(--space-2); align-items: baseline; }
.plan-tip .tip-k { color: var(--gray-600); min-width: 74px; flex: none; font-size: 11px; }
.plan-tip .tip-v { color: var(--gray-900); font-weight: 600; }
.plan-tip .tip-bar { height: 5px; background: rgba(148,163,184,.22); border-radius: var(--radius-xs); margin-top: 7px; overflow: hidden; }
.plan-tip .tip-bar i { display: block; height: 100%; border-radius: var(--radius-xs); }
.plan-tip .tip-bar-row { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--gray-600); margin-top: 3px; }
.plan-tip .tip-foot { margin-top: 4px; padding-top: 6px; border-top: 1px dashed rgba(148,163,184,.35); color: var(--gray-600); font-size: 11px; display: flex; align-items: center; gap: var(--space-1); }
.plan-tip .tip-sec-t { margin-top: 7px; padding-top: 6px; border-top: 1px dashed rgba(148,163,184,.35); color: #2563eb; font-weight: 700; font-size: 11px; letter-spacing: .3px; }
.plan-tip .tip-foot::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #3b82f6; flex: none; }
/* hover 卡：近7天趋势 mini 图 */
.tip-trend { margin-top: 7px; }
.spark-row { display: flex; gap: var(--space-1); align-items: flex-end; }
.sp-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: var(--space-1); }
.sp-bars { display: flex; gap: var(--space-1); align-items: flex-end; height: 34px; }
.sp-bar { width: 10px; background: #3b82f6; border-radius: 2px 2px 0 0; opacity: .92; }
.sp-bar2 { width: 10px; background: rgba(148,163,184,.45); border-radius: 2px 2px 0 0; }
.sp-lb { font-size: var(--fs-xs); color: var(--gray-500); }
.sp-lg { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--gray-500); margin-top: 3px; }
.sp-lg i { width: 8px; height: 3px; border-radius: 1px; display: inline-block; margin-right: 3px; vertical-align: 1px; }
/* ===== 款号详情抽屉 ===== */
.sd-mask { position: fixed; inset: 0; background: rgba(15,23,42,.22); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 200; }
.sd-mask.on { opacity: 1; pointer-events: auto; }
.sd-drawer { position: fixed; top: 0; right: -530px; width: 500px; max-width: 94vw; height: 100%; background: rgba(248,250,252,.62); backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%); border-left: 1px solid rgba(255,255,255,.6); box-shadow: -10px 0 40px rgba(15,23,42,.16), inset 0 1px 0 rgba(255,255,255,.6); transition: right .24s cubic-bezier(.4,0,.2,1); z-index: 201; display: flex; flex-direction: column; }
.sd-drawer.on { right: 0; }
.sd-head { padding: var(--space-3) var(--space-5); background: rgba(255,255,255,.55); border-bottom: 1px solid rgba(255,255,255,.6); display: flex; align-items: center; gap: var(--space-3); flex: none; }
.sd-close { margin-left: auto; border: none; background: rgba(255,255,255,.65); width: 30px; height: 30px; border-radius: var(--radius-sm); cursor: pointer; color: var(--gray-700); font-size: var(--fs-md); line-height: 1; }
.sd-close:hover { background: rgba(255,255,255,.95); }
.sd-body { padding: var(--space-4) var(--space-5); overflow: auto; flex: 1; font-size: var(--fs-base); line-height: 1.8; }
.sd-sec { background: rgba(255,255,255,.58); border: 1px solid rgba(255,255,255,.65); border-radius: var(--radius-md); padding: var(--space-3) var(--space-3); margin-bottom: 12px; }
.sd-sec-t { font-size: var(--fs-sm); font-weight: 700; color: var(--gray-900); margin-bottom: 8px; display: flex; align-items: center; gap: var(--space-2); }
.sd-sec-t::before { content: ''; width: 4px; height: 12px; border-radius: var(--radius-xs); background: #3b82f6; flex: none; }
.sd-kv { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed rgba(241,245,249,.9); font-size: var(--fs-sm); gap: var(--space-3); }
.sd-kv:last-child { border-bottom: none; }
.sd-kv .k { color: var(--gray-600); flex: none; }
.sd-kv .v { font-weight: 600; color: var(--gray-900); text-align: right; }
.sd-acts { padding: var(--space-3) var(--space-5); background: rgba(255,255,255,.55); border-top: 1px solid rgba(255,255,255,.6); display: flex; gap: var(--space-3); flex: none; }
.sd-acts button { flex: 1; border: none; border-radius: var(--radius-sm); padding: var(--space-3); font-size: var(--fs-sm); cursor: pointer; font-weight: 600; }
.sd-acts .p { background: #3b82f6; color: #fff; }
.sd-acts .p:hover { background: #2563eb; }
.sd-acts .s { background: rgba(241,245,249,.7); color: var(--gray-700); }
.sd-acts .s:hover { background: rgba(226,232,240,.9); }
.sd-loading { padding: 30px; text-align: center; color: var(--gray-500); font-size: var(--fs-base); }
/* 拖拽排程 */
.plan-cell.drag-over { box-shadow: inset 0 0 0 2px #3b82f6 !important; background: #f5f3ff !important; }
.plan-cell.drag-src { opacity: .45; }
.style-badge.sp-badge[draggable="true"] { cursor: grab; }
.style-badge.sp-badge[draggable="true"]:active { cursor: grabbing; }
/* ===== 排程工具条（筛选 + 异常提示） ===== */
.plan-toolbar { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); align-items: center; padding: var(--space-3) var(--space-3); margin-bottom: 10px; background: var(--card); border: 1px solid var(--gray-200); border-radius: var(--radius-md); }
.plan-filter-row { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.plan-style-filter { width: 180px; height: 30px; padding: 0 10px; font-size: var(--fs-sm); border: 1px solid var(--gray-400); border-radius: var(--radius-sm); outline: none; background: var(--gray-50); color: var(--gray-900); }
.plan-style-filter:focus { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(139,92,246,.12); }
.plan-opt-btn { height: 30px; padding: 0 12px; font-size: var(--fs-sm); color: var(--gray-700); background: var(--card); border: 1px solid var(--gray-400); border-radius: var(--radius-sm); cursor: pointer; }
.plan-opt-btn:hover { border-color: #3b82f6; color: #3b82f6; }
.plan-opt-btn.on { background: #3b82f6; border-color: #3b82f6; color: #fff; }
.plan-team-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); width: 100%; }
.plan-team-chips .chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; font-size: 11px; color: var(--gray-600); background: var(--gray-100); border: 1px solid var(--gray-200); border-radius: var(--radius-full); cursor: pointer; user-select: none; }
.plan-team-chips .chip:hover { border-color: #3b82f6; color: #3b82f6; }
.plan-team-chips .chip.on { background: #dbeafe; border-color: #3b82f6; color: #1e40af; font-weight: 600; }
.plan-issue-bar { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); width: 100%; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); background: #fffbeb; border: 1px solid #fcd34d; font-size: var(--fs-sm); cursor: pointer; }
.plan-issue-bar.none { display: none; }
.plan-issue-bar .issue-flag { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: 700; color: #92400e; }
.plan-issue-bar .issue-flag-dot { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.18); }
.plan-issue-bar .issue-cats { display: inline-flex; gap: var(--space-2); flex-wrap: wrap; }
.plan-issue-bar .issue-cat { padding: var(--space-1) var(--space-2); border-radius: var(--radius-full); font-size: 11px; }
.plan-issue-bar .issue-cat.ic-red { background: #fee2e2; color: #dc2626; }
.plan-issue-bar .issue-cat.ic-orange { background: #ffedd5; color: #d97706; }
.plan-issue-bar .issue-cat.ic-amber { background: #fef3c7; color: #d97706; }
.plan-issue-bar .issue-cat.ic-gray { background: var(--gray-100); color: var(--gray-600); }
.plan-issue-bar .issue-toggle { margin-left: auto; color: #92400e; font-weight: 600; }
.plan-issue-bar .issue-arrow { transition: transform .15s; display: inline-block; }
.plan-issue-bar.open .issue-arrow { transform: rotate(180deg); }
.plan-issue-bar .issue-panel { display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; max-height: 280px; overflow-y: auto; background: rgba(255,255,255,.66); backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%); border: 1px solid rgba(255,255,255,.7); border-radius: var(--radius-md); box-shadow: 0 18px 44px rgba(15,23,42,.16), inset 0 1px 0 rgba(255,255,255,.75); }
.plan-issue-bar.open .issue-panel { display: block; }
.plan-issue-bar .issue-item { display: flex; align-items: flex-start; gap: var(--space-2); padding: var(--space-2) var(--space-3); font-size: var(--fs-sm); color: var(--gray-800); border-bottom: 1px solid var(--gray-100); cursor: pointer; }
.plan-issue-bar .issue-item:last-child { border-bottom: none; }
.plan-issue-bar .issue-item:hover { background: var(--gray-50); }
.plan-issue-bar .issue-item.none { cursor: default; color: var(--gray-500); }
.plan-issue-bar .issue-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; }
.plan-issue-bar .issue-dot.sub-data { background: #d97706; }
.plan-issue-bar .issue-dot.no-price { background: #d97706; }
.plan-issue-bar .issue-dot.cap-over { background: #dc2626; }
.plan-issue-bar .issue-dot.no-report { background: var(--gray-600); }
/* ===== 全屏生产日报补录 ===== */
.fullscreen-entry { position: fixed; inset: 0; z-index: 500; background: rgba(248,250,252,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); display: flex; flex-direction: column; }
.fs-entry-topbar { flex: none; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-5); background: rgba(255,255,255,.85); border-bottom: 1px solid rgba(226,232,240,.9); }
.fs-close-btn { width: 34px; height: 34px; border-radius: var(--radius-md); border: 1px solid var(--gray-200); background: var(--card); color: var(--gray-700); font-size: var(--fs-lg); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(15,23,42,.06); flex: none; }
.fs-close-btn:hover { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.fs-entry-title { font-size: var(--fs-md); font-weight: 800; color: var(--gray-900); }
.fs-entry-badge { font-size: var(--fs-xs); font-weight: 700; padding: var(--space-1) var(--space-2); border-radius: var(--radius-full); background: #f3e8ff; color: #2563eb; }
.fs-entry-chips { margin-left: auto; display: flex; gap: var(--space-2); flex-wrap: wrap; }
.fs-chip { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-sm); padding: var(--space-1) var(--space-3); border-radius: var(--radius-full); background: var(--gray-50); border: 1px solid var(--gray-200); color: var(--gray-800); }
.fs-chip b { color: #1e40af; }
.fs-chip .k { color: var(--gray-500); font-size: var(--fs-xs); }
.fs-entry-body { flex: 1; overflow: auto; padding: var(--space-5); }
.fs-entry-body .tab-panel { display: block !important; }
.fs-entry-body .entry-grid { max-width: 960px; margin: 0 auto; }
@media (max-width: 640px) {
  .fs-entry-topbar { padding: var(--space-3) var(--space-3); gap: var(--space-2); flex-wrap: wrap; }
  .fs-entry-chips { margin-left: 0; width: 100%; order: 4; }
  .fs-entry-body { padding: var(--space-3); }
}
/* ===== 全屏生产日报补录 END ===== */
.plan-stats { display: flex; gap: var(--space-2); width: 100%; margin-top: 2px; flex-wrap: wrap; align-items: center; }
.plan-stats .pill { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--radius-full); background: var(--card); border: 1px solid var(--gray-100); font-size: 11px; color: var(--gray-500); cursor: default; transition: border-color .15s, box-shadow .15s, transform .15s; }
.plan-stats .pill:hover { border-color: #ddd6fe; box-shadow: 0 3px 10px rgba(139,92,246,.12); transform: translateY(-1px); }
.plan-stats .pill b { font-size: var(--fs-md); font-weight: 800; color: var(--gray-900); letter-spacing: -.3px; }
.plan-stats .pill.purple { background: #faf9ff; border-color: #e9e2fb; }
.plan-stats .pill.purple b { color: #2563eb; }
.plan-stats .pill .dot { width: 6px; height: 6px; border-radius: 50%; background: #93c5fd; flex: none; }
.plan-stats .pill.ok .dot { background: #86efac; }
.plan-stats .pill.warn { background: #fef2f2; border-color: rgba(220,38,38,.28); }
.plan-stats .pill.warn b { color: #dc2626; }
.plan-stats .pill.warn .dot { background: #fca5a5; }
.plan-stats .pill .ic { width: 15px; height: 15px; color: #3b82f6; flex: none; }
/* ===== 异常格内角标（左上色点） ===== */
.style-badge.sp-badge { position: relative; }
.plan-cell .issue-dot-mini { position: absolute; top: 1px; left: 1px; width: 5px; height: 5px; border-radius: 50%; border: 1px solid #fff; z-index: 3; }
.issue-dot-mini.cap { background: #dc2626; }
.issue-dot-mini.sub { background: #d97706; }
.issue-dot-mini.price { background: #d97706; }
.issue-dot-mini.norep { background: var(--gray-600); }
/* ===== 款号格右键菜单 ===== */
.plan-ctx-menu { position: fixed; z-index: 1000; min-width: 150px; background: rgba(30,32,40,.52); backdrop-filter: blur(24px) saturate(130%); -webkit-backdrop-filter: blur(24px) saturate(130%); border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius-md); box-shadow: 0 18px 48px rgba(15,23,42,.32), inset 0 1px 0 rgba(255,255,255,.12); padding: var(--space-1); font-size: var(--fs-sm); color: #fff; }
.plan-ctx-menu .pcm-item { padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); color: rgba(255,255,255,.92); cursor: pointer; }
.plan-ctx-menu .pcm-item:hover { background: rgba(139,92,246,.32); color: #fff; }
.plan-ctx-menu .pcm-item.danger { color: #fca5a5; }
.plan-ctx-menu .pcm-item.danger:hover { background: rgba(220,38,38,.3); color: #fecaca; }
/* 款号达成率状态点（当日实做/计划，绿≥100 橙90-99 红<90）：格内右上角，不碰徽章底色 */
.rate-tag { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; z-index: 2; pointer-events: none; box-shadow: 0 0 0 2px rgba(255,255,255,.8); }
.rate-tag.ok { background: #22c55e; }
.rate-tag.warn { background: #f59e0b; }
.rate-tag.bad { background: #dc2626; }
/* 多款格：同规则格内右上 */
.rate-tag.multi-rate { top: 6px; right: 6px; }
.style-badge.sp-badge { position: relative; }
.plan-cell.style-cell { position: relative; }
.cap-miss { display: inline-block; background: #fef3c7; color: #b45309; font-size: 9px; font-weight: 700; width: 16px; height: 16px; line-height: 16px; text-align: center; border-radius: 50%; margin-left: 3px; cursor: pointer; vertical-align: middle; }  /* 20261009STICKY：未配产能缩为 ⚠ 圆形角标，悬浮看说明 */
.cap-miss:hover { background: #f59e0b; color: #fff; }
.multi-popup-item:hover { background: var(--gray-50); }

/* ===== 集团生产驾驶舱 ===== */
.dv-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: var(--space-3); }
.dv-title h3 { margin: 0; font-size: var(--fs-xl); }
.dv-date { color: var(--gray-600); font-size: var(--fs-sm); margin-left: 8px; }
.dv-seg { display: inline-flex; background: var(--gray-100); border-radius: var(--radius-sm); padding: var(--space-1); }
.dv-tab { border: 0; background: transparent; padding: var(--space-2) var(--space-5); border-radius: var(--radius-sm); font-size: var(--fs-base); color: var(--gray-700); cursor: pointer; font-weight: 500; }
.dv-tab.on { background: var(--card); color: #2563eb; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.dv-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-3); margin-bottom: 16px; }
.dv-stat { background: var(--card); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); text-align: center; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.dv-lb { font-size: var(--fs-sm); color: var(--gray-600); }
.dv-vl { font-size: var(--fs-2xl); font-weight: 700; margin: 4px 0 2px; }
.dv-sub { font-size: 11px; color: var(--gray-500); }
.dv-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius-md); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.dv-table th { background: var(--th-bg); font-size: var(--fs-sm); color: var(--gray-700); padding: var(--space-3) var(--space-3); border-bottom: 1px solid var(--gray-200); white-space: nowrap; }
.dv-table td { padding: var(--space-3) var(--space-3); border-bottom: 1px solid var(--gray-100); font-size: var(--fs-base); text-align: center; white-space: nowrap; }
.dv-frow { cursor: pointer; transition: background .15s; }
.dv-frow:hover { background: #f0f7ff; }
.dv-fname { text-align: left !important; }
.dv-fcode { display: block; font-size: var(--fs-xs); color: var(--gray-500); font-weight: 400; }
.dv-rt { font-weight: 700; }
.dv-rt.ok { color: #047857; }
.dv-rt.warn { color: #b45309; }
.dv-rt.hl { color: #dc2626; }
.dv-bar { height: 6px; border-radius: var(--radius-xs); background: var(--gray-200); overflow: hidden; margin: 3px auto 0; width: 72px; }
.dv-bar i { display: block; height: 100%; border-radius: var(--radius-xs); }
.dv-spark { display: flex; align-items: flex-end; gap: var(--space-1); height: 26px; justify-content: center; }
.dv-spark i { width: 7px; background: #3b82f6; border-radius: var(--radius-xs); min-height: 2px; }
.dv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--space-3); }
.dv-fcard { background: var(--card); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); cursor: pointer; transition: box-shadow .15s, transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.dv-fcard:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); transform: translateY(-1px); }
.dv-fcard h4 { margin: 0 0 8px; font-size: var(--fs-md); display: flex; align-items: center; gap: var(--space-2); }
.dv-fcard h4 .dv-fcode { display: inline; }
.dv-crow { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-sm); color: var(--gray-700); padding: 2.5px 0; }
.dv-crow b { color: var(--text); font-weight: 600; }
.dv-crow .dv-spark { height: 20px; }
.dv-pill { display: inline-block; padding: var(--space-1) var(--space-2); border-radius: var(--radius-lg); font-size: var(--fs-xs); font-weight: 600; }
.dv-pill.ok { background: #ecfdf5; color: #047857; }
.dv-pill.warn { background: #fffbeb; color: #b45309; }
.dv-pill.bad { background: #fef2f2; color: #b91c1c; }
.dv-tip { font-size: var(--fs-sm); color: var(--gray-500); margin-top: 10px; }
.dv-empty { background: var(--card); border: 1px dashed var(--gray-400); border-radius: var(--radius-md); padding: 40px; text-align: center; color: var(--gray-500); font-size: var(--fs-base); }
.dv-loading { text-align: center; padding: 60px; color: var(--gray-500); }
.dv-drill-head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: 12px; flex-wrap: wrap; }
.dv-back { border: 1px solid var(--gray-400); background: var(--card); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); font-size: var(--fs-sm); cursor: pointer; color: var(--gray-700); }
.dv-back:hover { background: var(--gray-50); }
.dv-drill-title { font-size: var(--fs-md); font-weight: 600; }
.dv-drill-date { color: var(--gray-500); font-size: var(--fs-sm); }
/* ===== 驾驶舱增强 ===== */
.dv-up { color: #059669; font-weight: 700; }
.dv-dn { color: #dc2626; font-weight: 700; }
.dv-click { cursor: pointer; text-decoration: underline dotted; }
.dv-click:hover { color: #1d4ed8; }
.dv-month { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: var(--radius-md); padding: var(--space-3) var(--space-3); font-size: var(--fs-sm); color: #166534; margin-bottom: 16px; }
.dv-inc { font-style: normal; font-size: 11px; color: #d97706; background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius-xs); padding: var(--space-1) var(--space-2); margin-left: 4px; white-space: nowrap; }
.dv-wsrow { cursor: pointer; }
.dv-wsrow:hover { background: #f0f7ff; }
.dv-wsblock { margin-bottom: 14px; }
.dv-wsblock-title { font-size: var(--fs-base); font-weight: 700; color: var(--gray-800); padding: var(--space-2) var(--space-1); display: flex; align-items: center; gap: var(--space-2); }
.dv-wsblock-title::before { content: ''; width: 4px; height: 14px; background: #3b82f6; border-radius: var(--radius-xs); display: inline-block; }
.dv-capmiss { display: inline-block; background: #fef3c7; color: #b45309; font-size: var(--fs-xs); font-weight: 600; padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); cursor: pointer; }
.dv-capmiss:hover { background: #f59e0b; color: #fff; }
.dv-ordrow { cursor: pointer; }
.dv-ordrow:hover { background: #f0f7ff; }

/* ========== 预警消息中心 ========== */
.notify-wrap { position: relative; display: inline-flex; align-items: center; }
.notify-bell { position: relative; cursor: pointer; background: var(--card); border: 1px solid var(--border); padding: 3px 12px 3px 3px; display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); border-radius: 10px; box-shadow: 0 1px 3px rgba(15,23,42,.05); transition: 0.15s; font-size: var(--fs-base); }
.notify-bell:hover { border-color: #c7d2fe; background: var(--card); box-shadow: 0 2px 8px rgba(37,99,235,.1); color: var(--text); }
.notify-bell:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.notify-dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; background: #dc2626; border-radius: 50%; border: 2px solid #fff; animation: notify-pulse 1.4s ease-out infinite; }
.notify-dot::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; background: #dc2626; opacity: 0; animation: notify-pulse-core 1.4s ease-out infinite; }
@keyframes notify-pulse { 0% { box-shadow: 0 0 0 0 rgba(220,38,38,.45); } 70% { box-shadow: 0 0 0 9px rgba(220,38,38,0); } 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); } }
@keyframes notify-pulse-core { 0% { opacity: .55; transform: scale(1); } 70% { opacity: 0; transform: scale(2.1); } 100% { opacity: 0; transform: scale(2.1); } }
@media (prefers-reduced-motion: reduce) { .notify-dot, .notify-dot::after { animation: none; } }
.notify-panel { position: absolute; top: calc(100% + 8px); right: 0; width: 380px; max-width: 92vw; background: var(--card); border: 1px solid var(--gray-200); border-radius: var(--radius-md); box-shadow: 0 12px 32px rgba(15,23,42,.14); z-index: 1200; overflow: hidden; }
.notify-panel-head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-3); border-bottom: 1px solid var(--gray-100); font-size: var(--fs-md); }
.notify-unread { font-size: 11px; color: #dc2626; font-weight: 600; }
.notify-readall { margin-left: auto; font-size: var(--fs-sm); color: #3370ff; background: none; border: none; cursor: pointer; padding: var(--space-1) var(--space-1); }
.notify-readall:hover { text-decoration: underline; }
.notify-list { max-height: 46vh; overflow-y: auto; }
.notify-item { display: flex; gap: var(--space-3); padding: var(--space-3) var(--space-3); border-bottom: 1px solid var(--gray-50); cursor: pointer; transition: background .12s; }
.notify-item:hover { background: var(--gray-50); }
.notify-item.unread { background: #f0f7ff; }
.notify-item.unread:hover { background: #e6f0ff; }
.notify-ico { display: flex; align-items: center; flex-shrink: 0; }
.notify-ico svg { width: 20px; height: 20px; }
.notify-item-body { flex: 1; min-width: 0; }
.notify-item-title { font-size: var(--fs-base); font-weight: 600; color: var(--text); display: flex; align-items: center; gap: var(--space-2); }
.notify-pill { font-size: var(--fs-xs); font-weight: 600; padding: var(--space-1) var(--space-2); border-radius: var(--radius-lg); flex-shrink: 0; white-space: nowrap; line-height: 1.6; }
.notify-badge { color: #dc2626; font-size: var(--fs-xs); }
.notify-item-content { font-size: var(--fs-sm); color: var(--gray-700); margin-top: 2px; line-height: 1.55; word-break: break-word; }
.notify-item-time { font-size: 11px; color: var(--gray-500); margin-top: 3px; }
.notify-empty { padding: 28px 14px; text-align: center; font-size: var(--fs-sm); color: var(--gray-500); }

/* ========== 生产总览增强：目标进度 / 热力图 / 平衡建议 ========== */
.dv-mbar { height: 8px; border-radius: var(--radius-xs); background: var(--gray-200); margin: 5px 0 3px; overflow: hidden; }
.dv-mbar i { display: block; height: 100%; border-radius: var(--radius-xs); }
.dv-heat { margin-top: 16px; }
.dv-heat-head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: 10px; }
.dv-heat-cols { display: grid; grid-template-columns: 90px repeat(31, minmax(0,1fr)); gap: var(--space-1); margin-bottom: 4px; }
.dv-heat-col { font-size: var(--fs-xs); color: var(--gray-500); text-align: center; }
.dv-heat-row { display: grid; grid-template-columns: 90px repeat(31, minmax(0,1fr)); gap: var(--space-1); margin-bottom: 4px; align-items: center; }
.dv-heat-fac { font-size: 11px; color: var(--gray-700); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 6px; }
.dv-heat-cell { height: 18px; border-radius: var(--radius-xs); min-width: 0; }
.dv-heat-cell.future { background: var(--gray-50); border: 1px dashed var(--gray-200); }
.dv-balance { margin-top: 16px; }
.dv-bal-row { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-1); border-bottom: 1px dashed var(--gray-100); font-size: var(--fs-sm); flex-wrap: wrap; }
.dv-bal-row:last-child { border-bottom: none; }
.dv-bal-spare { color: var(--gray-700); font-weight: 600; }
.dv-bal-btn { margin-left: auto; background: #2563eb; color: #fff; border: 0; border-radius: var(--radius-sm); padding: var(--space-1) var(--space-3); font-size: var(--fs-sm); cursor: pointer; font-weight: 600; }
.dv-bal-btn:hover { background: #1d4ed8; }
@media (max-width: 900px) {
  .dv-heat-cols { grid-template-columns: 70px repeat(31, minmax(0,1fr)); }
  .dv-heat-row { grid-template-columns: 70px repeat(31, minmax(0,1fr)); }
}
.dv-export-btn { margin-left: auto; background: var(--card); color: #2563eb; border: 1px solid #bfdbfe; border-radius: var(--radius-sm); padding: var(--space-2) var(--space-4); font-size: var(--fs-sm); cursor: pointer; font-weight: 600; }
.dv-export-btn:hover { background: #eff6ff; }
.dv-rs { margin-top: 16px; }
.dv-rs-row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-1); border-bottom: 1px dashed var(--gray-100); font-size: var(--fs-sm); flex-wrap: wrap; }
.dv-rs-row:last-child { border-bottom: none; }
.dv-rs-style { min-width: 180px; display: flex; flex-direction: column; }
.dv-rs-fac { font-size: var(--fs-xs); color: var(--gray-500); }
.dv-rs-dead { color: var(--gray-700); font-weight: 500; }
.dv-rs-gap { color: #b91c1c; font-weight: 600; }
/* ========== 排程矩阵：达成率热力着色（A） ========== */
.plan-cell.style-cell.rate-low { background: #fee2e2 !important; }
.plan-cell.style-cell.rate-low:hover { background: #fecaca !important; }
.plan-cell.style-cell.rate-ok { background: #ecfdf5 !important; }
.plan-cell.style-cell.rate-ok:hover { background: #d1fae5 !important; }
.plan-cell.style-cell.rate-high { background: #eff6ff !important; }
.plan-cell.style-cell.rate-high:hover { background: #dbeafe !important; }
.rate-legend { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--fs-sm); color: var(--gray-600); margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--gray-200); }
.rate-legend .rl-dot { width: 12px; height: 12px; border-radius: var(--radius-xs); }
.rate-legend .rl-low { background: #fee2e2; border: 1px solid #fca5a5; }
.rate-legend .rl-ok { background: #ecfdf5; border: 1px solid #6ee7b7; }
.rate-legend .rl-high { background: #eff6ff; border: 1px solid #93c5fd; }

/* ========== 工厂级用户权限：隐藏集团报表入口（body 标记兜底，防止 JS 时序覆盖） ========== */
body.factory-scoped .rpt-tab[data-rptscope="group"],
body.factory-scoped #rptGroupView {
  display: none !important;
}

/* ---------- 排程页面聚焦（20260929PLANZOOM）：隐侧栏+顶栏，排程页占满全窗口 ---------- */
body.plan-focus .app-layout { display: block; }
body.plan-focus .sidebar { display: none; }
body.plan-focus .topbar { display: none !important; }
body.plan-focus .main-area { min-height: 100vh; }
body.plan-focus .plan-matrix { width: 100% !important; }
body.plan-focus .plan-matrix-scroll { max-height: calc(100vh - 150px); }
body.plan-focus .plan-matrix-wrap { max-height: calc(100vh - 150px); min-height: calc(100vh - 150px); }
@media (max-width: 640px) {
  body.plan-focus #tab-plan { padding: 8px; }
}

/* ============ 汇总看板 · 新布局（方案一增强版，v20260910LAYOUT） ============ */
/* 20261011KPID（方案D 极简白卡）：去左色条/渐变/图标徽章，标题旁小圆点为唯一色彩；
   数值 tabular-nums、涨跌素色、迷你趋势淡灰。旧 .dash-k.rev 深蓝卡一并下线。 */
.dash-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap: var(--space-3);margin-bottom:14px}
/* 20261011ATTA：卡片改纵向 flex —— 5 张卡的对比段行数不同（0/1/2 行，实测趋势线 y 错落 50px），
   .kd-area 用 margin-top:auto 沉底后，5 条趋势线永远落在同一条基线上。 */
.dash-k{background: var(--card);border:1px solid var(--gray-100);border-radius: var(--radius-md);padding: var(--space-4) var(--space-5);position:relative;overflow:hidden;min-width:0;transition:border-color .15s,box-shadow .15s;display:flex;flex-direction:column}
.dash-k:hover{border-color:#c9d4e5;box-shadow:0 4px 14px rgba(15,23,42,.06)}
.dash-k .kd-hd{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:13px}
.dash-k .kd-tt{font-size:11.5px;color:var(--gray-500);font-weight:600;letter-spacing:.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dash-k .kd-dot{width:7px;height:7px;border-radius:50%;flex:none}
.dash-k .kd-v{font-size:clamp(17px, 1.55vw, 22px);font-weight:700;color:#0f172a;font-variant-numeric:tabular-nums;letter-spacing:-.3px;line-height:1.1}
.dash-k .kd-v small{font-size:11px;color:#94a3b8;font-weight:600;margin-left:3px}
.dash-k .kd-v.d-up{color:#15803d}
.dash-k .kd-v.d-wa{color:#b45309}
.dash-k .kd-v.d-dn{color:#b91c1c}
.dash-k .kd-d{font-size:11.5px;color:#94a3b8;margin-top:7px;display:flex;align-items:center;gap:7px;flex-wrap:wrap;min-height:16px}
/* 20261011KPIB（方案B）：出勤率卡副行两行堆叠 + 缩字 —— 单行 210px 超出卡内容区 169px 被裁 */
.dash-k .kd-d.stack{display:block;font-size:10.5px;line-height:1.55;min-height:0}
.dash-k .kd-d.stack > span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dash-k .kd-d b{font-weight:700}
.dash-k .kd-d b.ach{color:#15803d}
.dash-k .kd-d b.warn{color:#b45309}
.dash-k .kd-d b.pos{color:#15803d}
.dash-k .kd-d .d-cmp{white-space:nowrap}
/* 20261011SPARKA：不再左右通栏（原 -20px 负 margin 让曲线顶到卡片边缘）；
   内缩交给 SVG 内部 INSET=14 完成，卡片内保持与 .kd-v/.kd-d 同一条左基线。 */
.dash-k .kd-area{margin-top:auto;padding-top:12px;overflow:hidden}
.dash-k .kd-area svg{display:block;width:100%;height:44px}
.dash-k .kd-s{font-size:10.5px;color:#94a3b8;margin-top:7px}
/* 20261011KPID2：窄卡换行治理 —— 数值+单位不换行、对比段内不断行（段间可换）、周期徽章入流不压标题 */
.dash-k .kd-v{white-space:nowrap}
.dash-k .kd-v small{display:inline}
.dash-k .kd-d>*{white-space:nowrap}
.dash-k .range-chip-b{position:static;margin-left:6px}
/* 周期产值卡（金额专属：浅蓝渐变 + $ 背景水印） */
.dash-k.rev{background:linear-gradient(135deg,#eff6ff 0%,var(--gray-50) 55%,#ffffff 100%)}
.dash-k.rev::after{content:"";}
.dash-k.rev .d-k-t,.dash-k.rev .d-k-v,.dash-k.rev .d-k-s{position:relative;z-index:1}
.dash-k.rev .d-k-v{color:#1d4ed8}
.dash-k.rev .d-k-s b{color:#1d4ed8}
.dash-k.rev .d-k-s{justify-content:space-between}
/* 周期范围徽章 - dashboard KPI 副文前置 */
/* 周期范围徽章 - 方案 B：主值右上角绝对定位 */
.range-chip-b { position: absolute; top: 8px; right: 10px; font-size: 10px; font-family: ui-monospace, "SF Mono", monospace; background: #dbeafe; color: #2563eb; padding: 2px 7px; border-radius: 4px; font-weight: 600; letter-spacing: 0.3px; }
.dark .range-chip-b { background: #1e3a8a; color: #60a5fa; }
/* dash-k 需要 position:relative 让 absolute 徽章生效 */
.dash-k { position: relative; }

.d-k-t{font-size: clamp(11px,1.1vw,var(--fs-sm));color:var(--gray-600);margin-bottom:6px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.d-k-v{font-size: clamp(16px,2.1vw,var(--fs-xl));font-weight:800;letter-spacing:-.5px;color:var(--gray-900);line-height:1.15}
.d-k-v small{font-size: var(--fs-sm);font-weight:600;color:var(--gray-500);margin-left:2px;letter-spacing:0}
.d-k-v.d-up{color:var(--green,#16a34a)}
.d-k-v.d-wa{color:var(--amber,#d97706)}
.d-k-v.d-dn{color:var(--red,#dc2626)}
.d-k-s{font-size:11px;color:var(--gray-500);margin-top:6px;display:flex;align-items:center;gap: var(--space-1);flex-wrap:wrap;min-height:14px}
.d-k-s .d-up{color:var(--green,#16a34a)}
.d-k-s .d-dn{color:var(--red,#dc2626)}

.dash-mid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);gap: var(--space-3);margin-bottom:14px}
.dash-mid svg{display:block;width:100%;height:auto} /* 图表随容器宽度自适应（分辨率/窗口变化自动铺满） */
.dm-right{display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap: var(--space-3)} /* auto-fit：单卡实例铺满整行（修高分辨率右侧空白），双卡仍两列，集团实例不受影响 20261009 */
.dm-left,.dm-r1,.dm-r2{background: var(--card);border:1px solid var(--gray-100);border-radius: var(--radius-md);padding: var(--space-3) var(--space-4)}
.dm-left,.dm-right{min-width:0}
.d-card-h{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.d-card-h h3{font-size: var(--fs-md);font-weight:700;color:var(--gray-900);margin:0}
.d-card-x{font-size:11px;color:var(--gray-500);background:var(--gray-100);padding: var(--space-1) var(--space-2);border-radius: var(--radius-full);white-space:nowrap}
.d-chart{min-height:202px}
.d-chart-sm{min-height:150px}
.d-empty{display:flex;align-items:center;justify-content:center;height:100%;min-height:110px;color:var(--gray-500);font-size: var(--fs-sm)}

.d-bhead{display:grid;grid-template-columns:84px 1fr 62px 62px;gap: var(--space-2);align-items:center;padding:0 4px 6px;font-size: var(--fs-xs);color:var(--gray-500)}
.d-brow{display:grid;grid-template-columns:84px 1fr 62px 62px;gap: var(--space-2);align-items:center;padding: var(--space-1);border-radius: var(--radius-sm);transition:background .15s}
.d-brow:hover{background:var(--gray-50)}
.d-bnm{font-size: var(--fs-sm);color:var(--gray-800);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.d-btr{background:var(--gray-100);border-radius: var(--radius-full);height:12px;overflow:hidden}
.d-btr i{display:block;height:100%;border-radius: var(--radius-full)}
.d-bvl{font-size:11px;color:var(--gray-800);text-align:right;font-variant-numeric:tabular-nums}
.d-bvl.dim{color:var(--gray-500)}

.d-alerts{display:grid;gap: var(--space-3);grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));}
.d-al{display:flex;align-items:center;gap: var(--space-3);background: var(--card);border:1px solid var(--gray-100);border-radius: var(--radius-md);padding: var(--space-3) var(--space-3);cursor:pointer;position:relative;overflow:hidden;transition:transform .15s,box-shadow .15s}
.d-al::before{content:'';position:absolute;left:0;top:0;bottom:0;width:4px}
.d-al:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(15,23,42,.08)}
.d-al.d::before{background:#dc2626}
.d-al.w::before{background:#d97706}
.d-ring{width:48px;height:48px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;position:relative}
.d-ring svg{position:absolute;inset:0;transform:rotate(-90deg)}
.d-ring .bgc{fill:none;stroke:var(--gray-100);stroke-width:5}
.d-ring .fgc{fill:none;stroke-width:5;stroke-linecap:round}
.d-ring.d .fgc{stroke:#dc2626}
.d-ring.w .fgc{stroke:#d97706}
.d-ring.d{animation:ringBreatheRed 2.2s ease-in-out infinite}
.d-ring.w{animation:ringBreatheAmber 2.2s ease-in-out infinite}
.d-al:hover .d-ring{animation-play-state:paused}
@keyframes ringBreatheRed{0%,100%{box-shadow:0 0 0 0 rgba(220,38,38,.38)}50%{box-shadow:0 0 0 9px rgba(220,38,38,0)}}
@keyframes ringBreatheAmber{0%,100%{box-shadow:0 0 0 0 rgba(217,119,6,.36)}50%{box-shadow:0 0 0 9px rgba(217,119,6,0)}}
.d-ring .num{font-size: var(--fs-base);font-weight:800;font-variant-numeric:tabular-nums}
.d-ring .lab{font-size: var(--fs-xs);color:var(--gray-500);text-align:center;margin-top:-2px}
.d-al .mid{flex:1;min-width:0}
.d-nm{font-size: var(--fs-base);font-weight:800;display:flex;align-items:center;gap: var(--space-2);white-space:nowrap}
.d-nm .d-nm-t{overflow:hidden;text-overflow:ellipsis;min-width:0}
.d-chp{font-size: var(--fs-xs);font-weight:800;padding: var(--space-1) var(--space-2);border-radius: var(--radius-full);flex:none;white-space:nowrap}
.d-chp.r{background:#fee2e2;color:#dc2626}
.d-chp.y{background:#fef3c7;color:#d97706}
.d-fac{font-size: var(--fs-xs);color:var(--gray-500);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.d-sev{font-size: var(--fs-sm);font-weight:700;color:var(--gray-800);margin-top:5px;white-space:nowrap}
.d-sev b{font-size: var(--fs-md);color:#dc2626;font-variant-numeric:tabular-nums}
.d-al.w .d-sev b{color:#d97706}
.d-link{font-size: var(--fs-xs);color:#2563eb;font-weight:700;margin-top:3px;white-space:nowrap}
@media(max-width:1500px){.dm-right{grid-template-columns:1fr}}

.dash-tabs{background: var(--card);border:1px solid var(--gray-100);border-radius: var(--radius-md);overflow:hidden}
.dash-tabbar{display:flex;gap: var(--space-1);padding:10px 14px 0;border-bottom:1px solid var(--gray-100)}
.dash-tab{border:none;background:none;padding: var(--space-2) var(--space-4);font-size: var(--fs-base);font-weight:600;color:var(--gray-600);cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px;transition:color .15s,border-color .15s}
.dash-tab:hover{color:var(--gray-900)}
.dash-tab.on{color:#2F6B4F;border-bottom-color:#2F6B4F}
.dash-tabpane{display:none;padding: var(--space-3) var(--space-4)}
.dash-tabpane.on{display:block}
.dash-rank-controls{justify-content:flex-end;margin-bottom:12px}
#dt-alert .alert-card{border:none;box-shadow:none;padding:0}
#dt-alert .alert-card .card-head{display:none}

@media(min-width:1280px) and (max-width:1400px){.dash-mid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1279px){.dash-mid{grid-template-columns:1fr}}
@media(max-width:760px){.dash-kpis{grid-template-columns:repeat(5,minmax(0,1fr))}.dm-right{grid-template-columns:1fr}}

/* 趋势分段切换 */
.d-seg{display:flex;gap: var(--space-1);background:var(--gray-100);border-radius: var(--radius-sm);padding: var(--space-1)}
.d-seg button{border:none;background:none;padding: var(--space-1) var(--space-3);border-radius: var(--radius-sm);font-size:11px;font-weight:600;color:var(--mut,var(--gray-600));cursor:pointer;transition:background .15s,color .15s}
.d-seg button:hover{color:var(--gray-900)}
.d-seg button.on{background: var(--card);color:#2F6B4F;box-shadow:0 1px 3px rgba(0,0,0,.1)}
@media(max-width:760px){.d-card-h{flex-wrap:wrap;gap: var(--space-2)}}

/* 产值趋势统计行 + 图例 */
.d-trend-stat{display:flex;gap:10px;align-items:center;flex-wrap:wrap;row-gap:3px;font-size:12px;color:var(--gray-600);padding:2px 2px 6px} /* wrap：窄卡下图例整体换行，不再挤压左侧文字 20261009STATWRAP */
.d-trend-stat b{color:var(--gray-900);font-size:13px;font-variant-numeric:tabular-nums}
.d-trend-stat > span{white-space:nowrap;flex-shrink:0} /* shrink:0：span 永不压缩，杜绝文字溢出框体重叠 */
.d-trend-stat .lg{margin-left:auto;display:flex;gap: var(--space-3);align-items:center;color:var(--gray-500);font-size: var(--fs-xs)}
.d-trend-stat .lg i{display:inline-block;width:9px;height:9px;border-radius: var(--radius-xs);margin-right:4px;vertical-align:-1px}
@media(max-width:760px){.d-trend-stat{gap: var(--space-3)}.d-trend-stat .lg{margin-left:0}}
@media(min-width:1280px) and (max-width:1400px){.d-trend-stat{gap:8px;font-size:11px}.d-trend-stat b{font-size:12px}.d-trend-stat .lg{font-size:10px;gap:6px}}

/* KPI 迷你柱 */
.d-mini-lbl{font-size: var(--fs-xs);color:var(--mut2,var(--gray-500));margin-top:8px}
.d-mini{display:flex;align-items:flex-end;gap: var(--space-1);height:30px;margin-top:4px}
.d-mini i{flex:1;border-radius:2px 2px 0 0;min-height:4px;opacity:.9}

/* ================= 工厂报表 · 卡片模式 ================= */
.rpt-cardbar { display:flex; align-items:center; justify-content:space-between; gap: var(--space-3); margin:4px 0 14px; flex-wrap:wrap; }
.rpt-entity-tabs { display:inline-flex; gap: var(--space-1); background:var(--card); border:1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-1); flex-wrap:wrap; }
.retab { border:none; background:none; padding: var(--space-2) var(--space-4); font-size: var(--fs-base); border-radius: var(--radius-sm); color:var(--text-muted); cursor:pointer; font-weight:600; font-family:inherit; }
.retab:hover { color:var(--primary); }
.retab.active { background:var(--primary-grad); color:#fff; box-shadow:0 3px 9px rgba(37,99,235,.25); }
.retab .cnt { font-size: var(--fs-xs); opacity:.75; margin-left:3px; font-weight:500; }
.rpt-view-toggle { display:inline-flex; gap: var(--space-1); background:var(--card); border:1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-1); }
.vtg { border:none; background:none; padding: var(--space-2) var(--space-3); font-size: var(--fs-sm); border-radius: var(--radius-sm); color:var(--text-muted); cursor:pointer; font-weight:600; font-family:inherit; }
.vtg.active { background:var(--primary-soft); color:var(--primary); }
.rpt-card-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(232px,1fr)); gap: var(--space-3); margin-bottom:14px; }
.rcard { background:var(--card); border:1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-4); cursor:pointer; transition:.16s; position:relative; overflow:hidden; }
.rcard:hover { border-color:var(--primary); box-shadow:0 10px 24px rgba(37,99,235,.13); transform:translateY(-2px); }
.rc-top { display:flex; align-items:center; gap: var(--space-2); }
.rname { font-size: var(--fs-md); font-weight:800; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rarrow { color:#c3cddc; font-size: var(--fs-xl); font-weight:700; line-height:1; transition:.15s; }
.rcard:hover .rarrow { color:var(--primary); transform:translateX(2px); }
.rrank { display:inline-flex; width:22px; height:22px; border-radius: var(--radius-sm); align-items:center; justify-content:center; font-size:11px; font-weight:800; background:var(--gray-100); color:var(--gray-600); flex:none; }
.rrank-1 { background:#fef3c7; color:#b45309; } .rrank-2 { background:var(--gray-100); color:var(--gray-700); } .rrank-3 { background:#ffedd5; color:#c2410c; }
.rtag { font-size: var(--fs-sm); color:var(--text-muted); margin:4px 0 10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rbignum { font-size: var(--fs-2xl); font-weight:800; font-variant-numeric:tabular-nums; line-height:1.1; }
.rbignum small { font-size:11px; color:var(--text-muted); font-weight:500; margin-left:2px; }
.rrev { font-size: var(--fs-base); color:#059669; font-weight:700; margin-top:2px; font-variant-numeric:tabular-nums; }
.rprog { margin-top:12px; }
.rprog-lab { display:flex; justify-content:space-between; font-size:11px; color:var(--text-muted); margin-bottom:5px; }
.rprog-lab b { font-variant-numeric:tabular-nums; }
.rtrack { height:7px; background:var(--gray-100); border-radius: var(--radius-xs); overflow:hidden; }
.rtrack i { display:block; height:100%; border-radius: var(--radius-xs); transition:width .3s; }
.rfoot { display:flex; justify-content:space-between; align-items:center; gap: var(--space-2); margin-top:11px; font-size: var(--fs-sm); }
.ryld { color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ryld b { color:var(--text); }
.rspill { font-size: var(--fs-xs); padding: var(--space-1) var(--space-2); border-radius: var(--radius-lg); font-weight:700; white-space:nowrap; flex:none; }
.rspill.st-g { background:#dcfce7; color:#16a34a; } .rspill.st-w { background:#fef9c3; color:#a16207; } .rspill.st-b { background:#fee2e2; color:#b91c1c; } .rspill.st-o { background:var(--gray-100); color:var(--gray-600); }
.rpt-card-empty { grid-column:1/-1; background:var(--card); border:1px dashed var(--border-strong); border-radius: var(--radius-md); padding:34px; text-align:center; color:var(--text-muted); font-size: var(--fs-base); }
/* 详情全屏层 */
.rpt-detail-overlay { position:fixed; inset:0; z-index:1200; background:var(--bg); overflow-y:auto; }
.rpt-detail { max-width:1020px; margin:0 auto; }
.rpt-detail-top { position:sticky; top:0; z-index:5; display:flex; align-items:center; gap: var(--space-3); background:var(--card); border-bottom:1px solid var(--border); padding: var(--space-3) var(--space-5); }
.rpt-detail-back { border:1px solid var(--border-strong); background:var(--card); width:38px; height:38px; border-radius: var(--radius-md); cursor:pointer; font-size: var(--fs-xl); color:var(--gray-700); line-height:1; flex:none; font-family:inherit; }
.rpt-detail-back:hover { border-color:var(--primary); color:var(--primary); }
.rpt-detail-tt { min-width:0; }
.rpt-detail-tt h3 { font-size: var(--fs-lg); font-weight:800; }
.rpt-detail-meta { font-size: var(--fs-sm); color:var(--text-muted); margin-top:2px; }
.rpt-detail-status { margin-left:auto; }
.rpt-detail-body { padding:18px 20px 50px; }
.rdkpis { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap: var(--space-3); margin-bottom:16px; }
.rdkpi { background:var(--card); border:1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-3) var(--space-3); }
.rdkpi .rlab { font-size:11px; color:var(--text-muted); }
.rdkpi .rval { font-size: var(--fs-xl); font-weight:800; margin-top:3px; font-variant-numeric:tabular-nums; }
.rdpanel { background:var(--card); border:1px solid var(--border); border-radius: var(--radius-md); margin-bottom:14px; overflow:hidden; }
.rdpanel-h { padding: var(--space-3) var(--space-4); font-size: var(--fs-base); font-weight:700; border-bottom:1px solid var(--border); }
.rdpanel-b { padding: var(--space-2) var(--space-4) var(--space-3); }
.rdgrid { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:0 24px; }
.rdit { font-size: var(--fs-base); padding:8px 0; border-bottom:1px dashed var(--border); }
.rdit span { color:var(--text-muted); margin-right:10px; }
@media (max-width:640px) { .rpt-card-grid { grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap: var(--space-3); } .rbignum { font-size: var(--fs-xl); } }

/* ================= 工厂报表卡片模式 · 1280/窄屏自适应加固 ================= */
.rpt-card-grid { grid-template-columns: repeat(auto-fill, minmax(min(232px,100%), 1fr)); }
.rcard { min-width: 0; }
.rcard .rname, .rcard .rtag, .rcard .ryld { min-width: 0; }
.rpt-tables .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
@media (max-width:1080px) {
  .rpt-card-grid { grid-template-columns: repeat(auto-fill, minmax(min(200px,100%), 1fr)); gap: var(--space-3); }
}
@media (max-width:760px) {
  .rpt-cardbar { flex-direction: column; align-items: stretch; gap: var(--space-2); }
  .rpt-entity-tabs { width: 100%; }
  .rpt-view-toggle { align-self: flex-end; }
  .rpt-detail-top { flex-wrap: wrap; gap: var(--space-3); padding: var(--space-3) var(--space-3); }
}
@media (max-width:560px) {
  .rpt-card-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-2); }
  .rbignum { font-size: var(--fs-xl); }
  .rdkpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width:380px) {
  .rpt-card-grid { grid-template-columns: 1fr; }
}

/* ================= 全局顶栏工具条 · 窄屏自动换行修复 ================= */
.topbar { flex-wrap: wrap; gap: var(--space-3) var(--space-3); }
.topbar-right { flex: 1 1 auto; min-width: 0; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2) var(--space-3); }
.topbar .filter-chip { min-width: 0; }
.topbar .filter-chip select, .topbar .filter-chip input { min-width: 0; max-width: 180px; }
.topbar .notify-wrap { min-width: 0; }
@media (max-width:1366px) {
  .topbar { padding: var(--space-3) var(--space-5); }
  .topbar-right { gap: var(--space-2) var(--space-3); }
  .topbar .filter-chip { gap: var(--space-2); font-size: var(--fs-sm); }
  .topbar .filter-chip .filter-icon { width: 24px; height: 24px; }
  .topbar .filter-chip select, .topbar .filter-chip input { padding: var(--space-2) var(--space-2); font-size: var(--fs-sm); max-width: 150px; }
}
@media (max-width:760px) {
  .topbar { padding: var(--space-3) var(--space-3); }
  .topbar-right { justify-content: flex-start; }
  .topbar .filter-chip select, .topbar .filter-chip input { max-width: 120px; }
}

/* 顶栏手机端紧凑：隐藏文字标签只留图标+控件 */
@media (max-width:760px) {
  .topbar-right { gap: var(--space-2) var(--space-2); }
  .topbar .filter-chip { gap: var(--space-1); }
  .topbar .filter-chip > span:not(.filter-icon):not(.notify-dot) { display: none; }
  .topbar .filter-chip select, .topbar .filter-chip input { max-width: 118px; }
}

/* ================= 顶栏“消息/语言”等项等高居中对齐修复 ================= */
.topbar-right > * { align-self: center; }
.notify-bell { height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: var(--space-2); }
.notify-bell svg { width: 16px; height: 16px; flex: none; }
.notify-wrap { display: inline-flex; align-items: center; align-self: center; }
@media (max-width:1366px) {
  .notify-bell { height: 32px; padding: 0 10px; }
}
@media (max-width:760px) {
  .notify-bell { height: 30px; padding: 0 8px; gap: var(--space-1); }
}

/* 顶栏紧凑压缩职责已移交 style-topbar-v2.css 的 data-tblv 分级让位（20260930TOPBARC），
   原 @media 1500/1366 静态压缩段（隐藏字段名/工作台收图标）已删除，避免抢跑分级机制。 */

/* ===== 班组排程 · 多款式格：锁列宽 + 格内自动换行 + 长款号截断（方案A）===== */
/* 日期列固定 80px，不被多款徽章/长款号内容撑开（汇总列除外） */
.plan-matrix th:not(.corner) { width: 80px; min-width: 80px; max-width: 80px; }
.plan-matrix td.plan-cell:not(.total-cell) { width: 80px; min-width: 80px; max-width: 80px; }
/* 款号格允许内容换行（数字格仍保持不换行） */
.plan-matrix td.style-cell { white-space: normal; }
/* 多款徽章容器占满格宽；标签弹性收缩、自动换行、超长省略号截断 */
.plan-cell .multi-style-badges { width: 100%; }
.plan-cell .multi-style-badges .multi-style-tag {
  flex: 1 1 auto; min-width: 0; max-width: 100%;
  font-size: var(--fs-xs); padding: var(--space-1) var(--space-1); line-height: 1.35;
}

/* ===== KPI 总产量卡：窄分辨率自适应，水印与数字永不重叠 ===== */
.rpt-kpi { container-type: inline-size; }
.rpt-kpi-num { min-width: 0; }
/* 文字置于水印之上（水印在文字下面） */
.rpt-kpi-ico, .rpt-kpi-num, .rpt-kpi-label, .rpt-kpi-sub { position: relative; z-index: 1; }
/* 右侧预留、水印尺寸、大数字字号都随卡片自身宽度（cqw）收缩 */
.rpt-kpi-total { padding-right: clamp(16px, 38cqw, 88px); }
.rpt-kpi-img {
  width: clamp(30px, 26cqw, 62px); height: clamp(30px, 26cqw, 62px);
  right: clamp(8px, 7cqw, 35px); z-index: 0;
}
.rpt-kpi-num { font-size: clamp(16px, 12cqw, 24px); }
/* 卡片过窄：隐藏装饰水印，数字占满整卡 */
@container (max-width: 150px) {
  .rpt-kpi-img { display: none; }
  .rpt-kpi-total { padding-right: 14px; }
}
/* 不支持容器查询的旧浏览器：视口兜底 */
@supports not (container-type: inline-size) {
  @media (max-width: 1366px) {
    .rpt-kpi-img { width: 40px; height: 40px; right: 10px; }
    .rpt-kpi-total { padding-right: 60px; }
    .rpt-kpi-num { font-size: var(--fs-xl); }
  }
  @media (max-width: 1100px) {
    .rpt-kpi-img { display: none; }
    .rpt-kpi-total { padding-right: 14px; }
  }
}

/* ===== 修正：卡片自身不能被 @container 选中，预留空间改由子元素右外边距承担 ===== */
/* 总产卡 padding 收回，改让文本子元素右缩给水印让位（子元素可用容器查询/cqw） */
.rpt-kpi-total { padding-right: 14px; }
.rpt-kpi-total .rpt-kpi-ico,
.rpt-kpi-total .rpt-kpi-num,
.rpt-kpi-total .rpt-kpi-label,
.rpt-kpi-total .rpt-kpi-sub { margin-right: clamp(0px, 30cqw, 76px); }
/* 卡片过窄：隐藏装饰水印，文本右距归零、占满整卡 */
@container (max-width: 150px) {
  .rpt-kpi-img { display: none !important; }
  .rpt-kpi-total .rpt-kpi-ico,
  .rpt-kpi-total .rpt-kpi-num,
  .rpt-kpi-total .rpt-kpi-label,
  .rpt-kpi-total .rpt-kpi-sub { margin-right: 0 !important; }
}

/* ===== 报表卡片限量（A+D）：分页器 + 日报按周分页折叠 ===== */
.rpt-pager { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap: var(--space-2); margin:2px 0 20px; }
.rp-btn { min-width:34px; height:34px; padding:0 12px; border:1px solid var(--border); background:var(--card); border-radius: var(--radius-sm); font-size: var(--fs-base); font-weight:600; color:var(--text-muted); cursor:pointer; font-family:inherit; transition:border-color .15s,color .15s,box-shadow .15s; }
.rp-btn:hover:not(:disabled) { border-color:var(--primary); color:var(--primary); }
.rp-btn.cur { background:var(--primary-grad); color:#fff; border-color:transparent; box-shadow:0 3px 9px rgba(37,99,235,.25); }
.rp-btn:disabled { opacity:.4; cursor:not-allowed; }
.rp-ellip { color:var(--text-muted); padding:0 2px; }
.rp-info { color:var(--text-muted); font-size: var(--fs-sm); margin:0 8px; font-weight:500; }
#rptCardGrid.rpt-grid-weeks { display:block; }
.rpt-week { border:1px solid var(--border); border-radius: var(--radius-md); overflow:hidden; margin-bottom:14px; background:var(--card); }
.rpt-week-head { display:flex; align-items:center; gap: var(--space-3); padding: var(--space-3) var(--space-4); background:linear-gradient(180deg,#fafbff,#f5f8fd); cursor:pointer; user-select:none; flex-wrap:wrap; }
.rpt-week-head:hover { background:linear-gradient(180deg,#f3f7ff,#eef3fc); }
.rwt-caret { color:var(--text-muted); font-size: var(--fs-sm); transition:transform .2s; display:inline-block; }
.rpt-week.is-collapsed .rwt-caret { transform:rotate(-90deg); }
.rwt-title { font-size: var(--fs-md); font-weight:700; color:var(--text); }
.rwt-range { font-size: var(--fs-sm); color:var(--text-muted); }
.rwt-stat { margin-left:auto; font-size: var(--fs-sm); color:var(--text-muted); }
.rwt-stat b { color:var(--text); font-weight:700; }
.rpt-week-body { padding: var(--space-3); }
.rpt-week-grid { margin-bottom:0; }
.rpt-week.is-collapsed .rpt-week-body { display:none; }

/* ---------- C3 工单卡片视图 ---------- */
.order-view-toggle{display:inline-flex;gap:3px;background:var(--gray-100);padding:3px;border-radius:var(--radius-sm);margin-left:10px}
.order-view-toggle button{border:none;background:transparent;padding:5px 12px;border-radius:6px;font-size:var(--fs-sm);font-weight:600;color:var(--muted);cursor:pointer;display:inline-flex;align-items:center;gap:5px;transition:all .15s}
.order-view-toggle button.active{background:var(--card);color:var(--primary);box-shadow:0 1px 3px rgba(0,0,0,.08)}
.order-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:var(--space-3);padding:0 var(--space-4) var(--space-4)}
.order-card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius-md);padding:var(--space-4);display:flex;flex-direction:column;gap:10px;transition:box-shadow .15s,transform .15s;position:relative}
.order-card:hover{box-shadow:0 4px 14px rgba(15,23,42,.08);transform:translateY(-1px)}
.order-card.risk-high{border-left:4px solid var(--red)}
.order-card.risk-mid{border-left:4px solid var(--amber)}
.order-card .oc-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.order-card .oc-no{font-weight:800;font-size:var(--fs-base);display:flex;align-items:center;gap:8px;min-width:0}
.order-card .oc-no .order-no-txt{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.order-card .oc-style{font-size:var(--fs-xs);color:var(--muted);margin-top:2px;display:flex;gap:8px;flex-wrap:wrap}
.order-card .oc-prog{display:flex;gap:6px;align-items:center}
.order-card .oc-prog .lbl{font-size:10px;color:var(--muted);width:26px;flex:none}
.order-card .oc-bar{flex:1;height:10px;background:var(--gray-100);border-radius:var(--radius-full);overflow:hidden;display:flex}
.order-card .oc-bar i{display:block;height:100%}
.order-card .oc-bar .sch{background:var(--primary-soft,#93c5fd)}
.order-card .oc-bar .prd{background:var(--primary)}
.order-card .oc-meta{display:flex;justify-content:space-between;align-items:center;font-size:var(--fs-xs);color:var(--muted);gap:8px;flex-wrap:wrap}
.order-card .oc-ops{display:flex;gap:6px;flex-wrap:wrap;border-top:1px solid var(--gray-100);padding-top:10px}
.order-card .oc-ops .op-btn{font-size:11px;font-weight:600;padding:4px 11px;border-radius:var(--radius-sm);border:1px solid var(--border-strong);background:var(--card);color:var(--text);cursor:pointer;transition:all .12s;display:inline-flex;align-items:center;gap:4px}
.order-card .oc-ops .op-btn:hover{border-color:var(--primary);color:var(--primary);background:var(--primary-soft)}
.order-card .oc-ops .op-btn.pri{background:var(--primary);border-color:var(--primary);color:#fff}
.order-card .oc-ops .op-btn.pri:hover{background:#1d4ed8;color:#fff}
.order-card .oc-ops .op-btn.danger{color:var(--red);border-color:#fecaca}
.order-card .oc-ops .op-btn.danger:hover{background:var(--red);color:#fff;border-color:var(--red)}
.order-card .oc-kit{margin-left:auto}

/* ===== 统一筛选控件（M3 蓝白协调）===== */
.sel, .inp {
  height: 34px; border: 1px solid var(--border-strong,#d4dbe8); border-radius: 10px;
  padding: 0 12px; font-size: 13px; color: var(--text,#1f2937); background: var(--card,#fff);
  outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
  font-family: inherit;
}
.sel:hover, .inp:hover { border-color: #b9c4d6; }
.sel:focus, .inp:focus { border-color: var(--primary,#2563eb); box-shadow: 0 0 0 3px rgba(37,99,235,.10); }
.sel { cursor: pointer; padding-right: 30px; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.inp::placeholder { color: #9aa3b2; }
/* 覆盖 .field 上下文对筛选控件的旧样式，统一 M3 圆角与高度 */
.field select.sel, .field input.inp, .filter-bar .sel, .filter-bar .inp {
  border-radius: 10px; height: 34px; padding: 0 12px;
}
.field select.sel { padding-right: 30px; }
/* 兜底：确保筛选下拉/输入框统一 M3 圆角（防历史规则覆盖） */
.sel, .inp { border-radius: 10px !important; }

/* ===== 资产中心筛选操作栏协调 ===== */
#tab-asset .filter-bar { align-items: center; gap: 10px; }
#tab-asset .filter-bar .sel { width: 132px; min-width: 132px; max-width: 132px; }
#tab-asset .filter-bar .inp { min-width: 220px; }
#tab-asset .filter-bar .seg { gap: 0; }
#tab-asset .filter-bar .seg .btn { height: 34px; padding: 0 16px; font-size: 13px; border-radius: 0; border: 1px solid #d4dbe8; box-shadow: none; }
#tab-asset .filter-bar .seg .btn + .btn { border-left: 0; }
#tab-asset .filter-bar .seg .btn:first-child { border-radius: 10px 0 0 10px; }
#tab-asset .filter-bar .seg .btn:last-child { border-radius: 0 10px 10px 0; }
#tab-asset .filter-bar .seg .btn.btn-outline { background: #fff; color: #5b6579; }
#tab-asset .filter-bar .seg .btn.btn-outline:hover { background: #f0f5ff; color: #2563eb; }
#tab-asset .filter-bar .seg .btn.btn-primary { background: linear-gradient(135deg,#3b82f6,#2563eb); border-color: #2563eb; color: #fff; }
#tab-asset .filter-bar > .btn { height: 34px; border-radius: 10px; padding: 0 16px; font-size: 13px; }
#tab-asset .filter-bar > .btn.btn-primary { box-shadow: 0 2px 6px rgba(37,99,235,.22); }
#tab-asset .filter-bar > .btn:not(.btn-primary):not(.btn-danger) { background: #fff; border: 1px solid #d4dbe8; color: #5b6579; }
#tab-asset .filter-bar > .btn:not(.btn-primary):not(.btn-danger):hover { border-color: #2563eb; color: #2563eb; background: #f0f5ff; }
/* 设备管理页筛选栏按钮同高协调 */

/* ===== 设备管理页筛选操作栏协调（与资产中心一致）===== */

/* ===== 资产编辑弹窗分组表单 ===== */
.fg { margin-bottom: 16px; }
.fg:last-child { margin-bottom: 0; }
.fg-t { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #6b7280; font-weight: 600; margin: 0 0 10px; letter-spacing: .4px; }
.fg-t::before { content: ""; width: 3px; height: 12px; border-radius: 2px; background: linear-gradient(180deg,#3b82f6,#2563eb); }
.fg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 16px; }
.fld { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: #6b7280; font-weight: 500; }
.fld i { color: #dc2626; font-style: normal; font-weight: 600; }
.fld .inp, .fld .sel { width: 100%; height: 36px; box-sizing: border-box; }
.fld textarea.inp { height: auto; resize: vertical; font-family: inherit; }
.fld-wide { grid-column: 1/-1; }
.fld .inp[type="number"] { text-align: right; }

/* ===== 借用筛选胶囊 chips（M3 pill） ===== */
.borrow-chips { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:10px 0 6px; }
.borrow-chips > .lbl { font-size:12px; color:#64748b; font-weight:600; margin-right:2px; }
.bchip { appearance:none; display:inline-flex; align-items:center; gap:6px;
  border:1px solid #e2e8f0; background:#fff; color:#475569;
  font-size:12.5px; font-weight:500; padding:6px 14px; border-radius:999px; cursor:pointer;
  transition:all .15s ease; line-height:1; }
.bchip:hover { border-color:var(--tc,#2563eb); color:var(--tc,#2563eb);
  background:color-mix(in srgb, var(--tc,#2563eb) 7%, #fff); }
.bchip.on { background:var(--tc,#2563eb); border-color:var(--tc,#2563eb); color:#fff; font-weight:600;
  box-shadow:0 2px 8px color-mix(in srgb, var(--tc,#2563eb) 30%, transparent); }
.bchip.warn { --tc:#ea580c; }
.bchip.ext  { --tc:#d97706; }
.bchip.int  { --tc:#0891b2; }
.bchip .dot { width:7px; height:7px; border-radius:50%; background:var(--tc,#94a3b8); flex:none; transition:background .15s ease; }
.bchip.on .dot { background:#fff; }
/* 流水类型语义色（机配件最近流水筛选） */
.bchip.t-in        { --tc:#16a34a; }
.bchip.t-out       { --tc:#dc2626; }
.bchip.t-in_return { --tc:#2563eb; }
.bchip.t-adjust    { --tc:#d97706; }
/* 小尺寸胶囊（流水筛选条） */
.bchip.sm { padding:4px 12px; font-size:11.5px; }

/* 借用看板 KPI 色条跟随 --kpi */
.ast-kpi{--kpi:#2563eb;}
.ast-kpi::before{background:var(--kpi)!important;}
.ast-kpi small{display:block;margin-top:3px;font-weight:400;}

/* 侧边栏底部美化 - 只改这里 */
.sidebar-foot {
  padding: 12px 16px !important;
  border-top: 1px solid #f3f4f6 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}
.sidebar-foot .side-user {
  width: 100% !important;
  flex: none !important;
}
.sidebar-foot .user-chip {
  width: 100% !important;
  justify-content: center !important;
  text-align: center !important;
  background: #f9fafb !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 10px !important;
  padding: 8px !important;
}
.sidebar-foot .btn-ghost {
  width: 100% !important;
  justify-content: center !important;
  align-items: center !important;
  height: 34px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
}
.side-ver {
  font-size: 11px !important;
  color: #9ca3af !important;
  text-align: center !important;
  margin-top: 4px !important;
}

/* 修复健康分卡片错位 */
.ab-ring {
  width: 60px !important;
  height: 60px !important;
}
.ab-ring-in b {
  font-size: 20px !important;
}
.ab-ring-in i {
  font-size: 10px !important;
  letter-spacing: 1px !important;
}

/* 修复健康分卡片错位 */
.ab-body {
  flex-wrap: nowrap !important;
  gap: 12px !important;
  padding: 12px 16px !important;
}
.ab-ring {
  width: 56px !important;
  height: 56px !important;
  flex-shrink: 0 !important;
}
.ab-ring::after {
  inset: 6px !important;
}
.ab-ring-in b {
  font-size: 18px !important;
}
.ab-ring-in i {
  font-size: 9px !important;
  letter-spacing: 0.5px !important;
  margin-top: 1px !important;
}
.ab-mid {
  min-width: 0 !important;
  flex: 1 !important;
}
.ab-name {
  font-size: 14px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* 修复健康分环形图文字显示不全 */
.ab-ring {
  width: 64px !important;
  height: 64px !important;
}
.ab-ring::after {
  inset: 6px !important;
}
.ab-ring-in b {
  font-size: 20px !important;
  font-weight: 800 !important;
}
.ab-ring-in i {
  font-size: 10px !important;
  letter-spacing: 0 !important;
  margin-top: 2px !important;
}

/* 修复健康分环形图文字显示不全 */
.ab-ring {
  width: 68px !important;
  height: 68px !important;
}
.ab-ring::after {
  inset: 6px !important;
}
.ab-ring-in b {
  font-size: 22px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}
.ab-ring-in i {
  font-size: 10px !important;
  letter-spacing: 0 !important;
  margin-top: 3px !important;
  line-height: 1 !important;
}

/* 修复健康分环形图 */
.ab-ring {
  width: 60px !important;
  height: 60px !important;
}
.ab-ring::after {
  inset: 5px !important;
}
.ab-ring-in {
  align-items: center !important;
  justify-content: center !important;
}
.ab-ring-in b {
  font-size: 22px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

/* 侧边栏底部美化 - 优化 */
.sidebar-foot {
  padding: 12px 12px !important;
  gap: 8px !important;
}
.sidebar-foot .user-chip {
  padding: 10px 8px !important;
  font-size: 13px !important;
}
.sidebar-foot .btn-ghost {
  height: 36px !important;
  font-size: 13px !important;
}
.side-ver {
  margin-top: 6px !important;
  font-size: 10px !important;
}

/* 侧边栏底部美化 - 方案B适中 */
.sidebar-foot {
  padding: 14px 14px !important;
  gap: 12px !important;
}
.sidebar-foot .user-chip {
  padding: 11px 8px !important;
  font-size: 13px !important;
}
.sidebar-foot .btn-ghost {
  height: 36px !important;
  font-size: 13px !important;
}
.side-ver {
  margin-top: 10px !important;
  font-size: 11px !important;
}

/* 侧边栏底部美化 - 用户信息透明 */
.sidebar-foot .user-chip {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
/* （2026-09-26 移除）#topFactoryWrap/#topDateWrap 的 display:flex!important —— 与上方旧隐藏规则冲突，
   使 JS 模块化显隐失效（财务页出现双工厂筛选）。显隐统一交给 JS inline style。 */

.chart-fade-in {
  animation: fadeInUp 0.6s ease-out;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.dash-k.rev .d-k-v::before {
  content: '$';
  margin-right: 2px;
}

/* ══════ 统一输入控件 · 浅灰填充式（20260927 输入框美化B方案） ══════
   零特异性 :where 兜底：只接管无样式的裸输入框（JS 动态表单等），
   不覆盖任何已有类规则（filter-chip 透明、login-input 定制版均不受影响） */
:root { --input-fill: #f2f4f8; --input-fill-hover: #eceff5; }
:where(input:is([type="text"], [type="number"], [type="date"], [type="datetime-local"], [type="search"], [type="password"], [type="email"], [type="tel"], [type="url"], :not([type])), select, textarea) {
  background: var(--input-fill); border: 1px solid transparent; border-radius: 8px;
  padding: 6px 10px; color: var(--text); outline: none; box-shadow: none;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
:where(input:is([type="text"], [type="number"], [type="date"], [type="datetime-local"], [type="search"], [type="password"], [type="email"], [type="tel"], [type="url"], :not([type])):hover, select:hover, textarea:hover) {
  background: var(--input-fill-hover);
}
:where(input:is([type="text"], [type="number"], [type="date"], [type="datetime-local"], [type="search"], [type="password"], [type="email"], [type="tel"], [type="url"], :not([type])):focus, select:focus, textarea:focus) {
  background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}

/* ===== 行内文字链接（.lk / .lk.danger，20260927FORM2） ===== */
.lk { color:#2563eb; text-decoration:none; cursor:pointer; font-size:inherit; }
.lk:hover { text-decoration:underline; color:#1d4ed8; }
.lk.danger { color:#dc2626; }
.lk.danger:hover { color:#b91c1c; }

/* ===== 配件工作台录入抽屉（20260928AB：表单收纳右侧滑出） ===== */
.pdr-mask { position: fixed; inset: 0; background: rgba(15,23,42,.32); z-index: 10000; display: none; }
.pdr-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 500px; max-width: 94vw;
  background: #fff; z-index: 10000; box-shadow: -12px 0 32px rgba(15,23,42,.16);
  transform: translateX(105%); transition: transform .22s ease; display: flex; flex-direction: column;
}
.pdr-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px; flex-shrink: 0;
  border-bottom: 1px solid var(--border, #e5e9f2); font-weight: 700; font-size: 13.5px; color: var(--gray-800, #1e293b);
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
}
.pdr-head .pdr-tag { font-size: 10.5px; border-radius: 999px; padding: 2px 9px; background: #eff6ff; color: #1d4ed8; font-weight: 600; white-space: nowrap; }
.pdr-head .pdr-x { margin-left: auto; cursor: pointer; color: #94a3b8; border: 1px solid var(--border, #e5e9f2); border-radius: 7px; padding: 2px 9px; font-size: 12px; }
.pdr-head .pdr-x:hover { color: #dc2626; border-color: #fecaca; }
.pdr-body { padding: 14px 16px 20px; overflow: auto; flex: 1; }

/* ===== 可搜索配件选择器（20260928PO：防抖服务端搜索，几千档案规模替代全量 select） ===== */
.pcmb { position: relative; }
.pcmb .pcmb-in { width: 100%; padding-right: 26px; }
.pcmb .pcmb-clr { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); border: 0; background: none; cursor: pointer; padding: 2px; display: inline-flex; line-height: 0; }
.pcmb .pcmb-dd { position: absolute; top: 100%; left: 0; right: 0; z-index: 60; background: var(--card, #fff); border: 1px solid var(--border, #dbe3ef); border-radius: 10px; box-shadow: 0 12px 30px rgba(15,23,42,.16); max-height: 268px; overflow: auto; margin-top: 3px; }
.pcmb .pcmb-it { display: flex; align-items: center; gap: 6px; padding: 7px 10px; cursor: pointer; font-size: 12.5px; border-bottom: 1px solid #f1f5f9; flex-wrap: wrap; }
.pcmb .pcmb-it:last-child { border-bottom: 0; }
.pcmb .pcmb-it:hover, .pcmb .pcmb-it.act { background: #eff6ff; }
.pcmb .pcmb-it .pcmb-nm { font-weight: 600; color: #1e293b; }
.pcmb .pcmb-it .pcmb-bd { font-size: 10px; background: #f3e8ff; color: #7c3aed; border-radius: 99px; padding: 1px 7px; }
.pcmb .pcmb-it .pcmb-ct { font-size: 10px; background: #f1f5f9; color: #64748b; border-radius: 99px; padding: 1px 7px; }
.pcmb .pcmb-it .pcmb-st { margin-left: auto; font-size: 10.5px; color: #16a34a; white-space: nowrap; }
.pcmb .pcmb-it .pcmb-st.z { color: #dc2626; }
.pcmb .pcmb-empty { padding: 12px 10px; text-align: center; font-size: 12px; color: #98a1b3; }

/* 采购入库单明细行（20260928PO：卡片化 + 表头行） */
.po-line-head { display: grid; grid-template-columns: 1fr 84px 108px 96px 26px; gap: 6px; font-size: 11px; color: #94a3b8; padding: 0 2px 4px; }
.po-line { display: grid; grid-template-columns: 1fr 84px 108px 96px 26px; gap: 6px; align-items: center; font-size: 12.5px; background: var(--card, #fff); border: 1px solid var(--border, #e5e9f2); border-radius: 10px; padding: 7px 8px; margin-bottom: 6px; }
.po-line:hover { border-color: #c7d2fe; }
.po-line [data-po-amt] { text-align: right; font-weight: 600; color: #334155; font-variant-numeric: tabular-nums; }
.po-line .lk.danger { display: inline-flex; justify-content: center; align-items: center; }

/* ===== 录入抽屉字体层次分级（20261002POF：标签退后/控件归位/金额突出；作用域仅 .pdr-drawer，不外溢） ===== */
.pdr-drawer .pdr-head { font-size: 13px; }
.pdr-drawer label { font-size: 11px; color: #8993a4; font-weight: 500; }
.pdr-drawer input, .pdr-drawer select, .pdr-drawer textarea {
  font-size: 12.5px; padding: 4px 8px; border: 1px solid #dfe4ee; border-radius: 6px;
  background: var(--card, #fff); color: var(--text, #1e293b);
}
.pdr-drawer input:focus, .pdr-drawer select:focus, .pdr-drawer textarea:focus {
  outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
}
.pdr-drawer .btn { font-size: 12.5px; padding: 5px 14px; }
.pdr-drawer .po-line { font-size: 12px; padding: 5px 7px; }
.pdr-drawer .po-line-head { font-size: 10.5px; }
.pdr-drawer .po-line input { font-size: 12px; }
.pdr-drawer .po-line [data-po-amt] { font-size: 13px; color: #1d4ed8; }
.pdr-drawer .tbl { font-size: 12px; }
#pf_item_info { font-size: 12px; }

/* ===== iKuai 风格组件层（20260928IK：白卡/渐变KPI/分段器/快捷入口；全部 rgba+var 取色，暗色主题自适配） ===== */
.ik-card { background: var(--card, #fff); border: 1px solid var(--border, #eef2f7); border-radius: 14px; box-shadow: 0 1px 4px rgba(15,23,42,.05); }
.ik-card-hd { display: flex; align-items: center; gap: 8px; padding: 12px 14px 0; flex-wrap: wrap; }
.ik-card-hd .tt { font-size: 13.5px; font-weight: 800; color: var(--gray-800, #1e293b); display: flex; align-items: center; gap: 7px; }
.ik-bar { width: 4px; height: 14px; border-radius: 3px; background: linear-gradient(180deg, #3b82f6, #8b5cf6); flex: none; }
.ik-kpi { display: flex; align-items: center; gap: 11px; padding: 10px 16px; flex: 1; min-width: 148px; }
/* 20261010KPIT1F：配件 KPI 独立一行等分铺满（不折行；极窄折行兜底） */
.kpirow { display: flex; gap: 10px; flex-wrap: nowrap; align-items: stretch; }
.kpirow .ik-kpi { flex: 1 1 0; min-width: 0; padding: 10px 12px; }
.kpirow .ik-num { white-space: nowrap; }
.kpirow .ik-lb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 20261010WBROW：工作台卡并入 KPI 行（7 卡等分），去版本号/范围进 title/规则角标化 */
/* 20261010LBLFIT：短标签 + 图标圈微缩 + 两行兜底——窄卡下标签不再截断 */
.kpirow .ik-ring { width: 27px; height: 27px; flex: none; }
.kpirow .ik-ring svg { width: 15px; height: 15px; }
.kpirow .ik-lb { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
/* 20261010WBPOLISH：工作台卡与 KPI 卡完全同构（图标圈+数字+标签），白底统一；规则角标绝对定位右上 */
.kpirow .wb-card { position: relative; }
.kpirow .wb-card .ik-num { color: var(--gray-800,#1e293b); }
.wb-rule { position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; border: 1px solid #fde68a; background: #fef9c3; color: #854d0e; font-size: 10px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1; }
.wb-rule:hover { background: #fef08a; transform: scale(1.12); }
@media (max-width: 1150px) { .kpirow { gap: 7px; } .kpirow .ik-kpi { padding: 10px 8px; } .kpirow .ik-lb { font-size: 10px; } }
@media (max-width: 1000px) { .kpirow { flex-wrap: wrap; } .kpirow .ik-kpi, .kpirow .wb-card { flex: 1 1 40%; } }
.ik-kpi .ik-num { font-size: 19px; font-weight: 800; color: rgb(var(--tint, 59,130,246)); line-height: 1.15; }
.ik-kpi .ik-lb { font-size: 11px; color: var(--gray-500, #64748b); margin-top: 1px; }
.ik-ring { width: 38px; height: 38px; border-radius: 50%; background: rgba(var(--tint, 59,130,246), .13); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ik-pill { display: inline-block; font-size: 10px; background: rgba(59,130,246,.1); color: rgb(59,130,246); border-radius: 99px; padding: 2px 9px; font-weight: 600; margin-left: 7px; vertical-align: 2px; }
.ik-seg { display: inline-flex; background: rgba(100,116,139,.1); border-radius: 9px; padding: 3px; gap: 2px; }
.ik-seg button { border: none; background: transparent; color: var(--gray-500, #64748b); font-size: 11.5px; padding: 3px 11px; border-radius: 7px; cursor: pointer; font-weight: 600; }
.ik-seg button.on { background: var(--card, #fff); color: #1d4ed8; box-shadow: 0 1px 4px rgba(15,23,42,.14); }
.ik-qgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 8px 10px 10px; }
.ik-qk { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 9px 2px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; background: transparent; text-decoration: none; }
.ik-qk:hover { background: rgba(59,130,246,.06); border-color: rgba(59,130,246,.18); }
.ik-qk .qt { font-size: 11px; color: var(--gray-600, #475569); font-weight: 600; }

/* ===== 导航宫格当前态/分组角标（20260928C1：页签行删除，右栏宫格承担全部导航） ===== */
.ik-qk { position: relative; }
.ik-qk .gbadge { position: absolute; top: 4px; left: 7px; font-size: 8.5px; border-radius: 6px; padding: 0 5px; color: #fff; font-weight: 700; background: rgb(var(--gcRGB, 59,130,246)); line-height: 1.5; }
.ik-qk.on { border-color: rgb(var(--gcRGB, 59,130,246)); background: rgba(var(--gcRGB, 59,130,246), .08); box-shadow: 0 2px 8px rgba(var(--gcRGB, 59,130,246), .18); }
.ik-qk.on .qt { color: rgb(var(--gcRGB, 59,130,246)); }

/* ===== 班组排程头部两层收纳（20260929HEAD2）：KPI 单行指标 + 预警聚合下拉 + 班组多选下拉 + 预警条折叠 ===== */
#tab-plan .plan-kpi-row:empty { display: none; margin: 0; padding: 0; }
#tab-plan .pp-kpi-it { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; }
#tab-plan .pp-kpi-it .ppk { font-size: 11.5px; color: #64748b; }
#tab-plan .pp-kpi-it .ppv { font-size: 15px; font-weight: 700; color: #0f172a; line-height: 1.2; }
#tab-plan .pp-kpi-it.click:hover .ppv { text-decoration: underline; text-underline-offset: 3px; }
#tab-plan .pp-dd-wrap { position: relative; }
#tab-plan .pp-dd-panel { position: absolute; top: calc(100% + 4px); right: 0; z-index: 10020; display: none; flex-direction: column; gap: 4px; background: var(--card, #fff); border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 10px 30px rgba(15,23,42,.14); padding: 8px; min-width: 158px; }
#tab-plan .pp-dd-panel .btn { display: flex; align-items: center; width: 100%; white-space: nowrap; }
#tab-plan .pp-team-panel { width: 248px; left: 0; right: auto; }
#tab-plan .pp-team-search { width: 100%; height: 30px; border: 1px solid #e2e8f0; border-radius: 8px; padding: 0 10px; font-size: 12.5px; outline: none; }
#tab-plan .pp-team-search:focus { border-color: #93c5fd; }
#tab-plan .pp-team-list { max-height: 262px; overflow: auto; display: flex; flex-direction: column; gap: 1px; margin-top: 4px; }
#tab-plan .pp-team-it { display: flex; align-items: center; gap: 7px; padding: 5px 9px; border-radius: 7px; font-size: 12.5px; color: #334155; cursor: pointer; user-select: none; }
#tab-plan .pp-team-it:hover { background: #f1f5f9; }
#tab-plan .pp-team-it.on { background: #eff6ff; color: #1d4ed8; font-weight: 600; }
#tab-plan .pp-team-it .pp-tick { display: inline-block; width: 13px; font-size: 11px; text-align: center; }

/* ======================================================================
   资产导入三步式向导（20261003IMPORTD · 方案 D）
   ----------------------------------------------------------------------
   整改前导入是「一个 textarea + 一行结果文本」，用户看不到将写多少、错在哪。
   现在拆成 选择文件 → 预览核对 → 确认执行 三步，每步都有明确的下一步动作与禁用条件。
   所有类名统一 ai- 前缀，避免与既有 .st/.wf/.tag 等撞车。
   ====================================================================== */
.ai-steps{display:flex;gap:8px;margin-bottom:14px}
.ai-step{flex:1;display:flex;gap:9px;align-items:center;padding:9px 11px;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc;min-width:0}
.ai-step-n{width:24px;height:24px;border-radius:50%;background:#e2e8f0;color:#64748b;font-size:12.5px;font-weight:700;display:flex;align-items:center;justify-content:center;flex:0 0 24px}
.ai-step.active{border-color:#93c5fd;background:#eff6ff}
.ai-step.active .ai-step-n{background:#2563eb;color:#fff}
.ai-step.done{border-color:#bbf7d0;background:#f0fdf4}
.ai-step.done .ai-step-n{background:#16a34a;color:#fff}
.ai-step-t{font-size:13px;font-weight:600;color:#1e293b;white-space:nowrap}
.ai-step-d{font-size:11.5px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ai-pane{min-height:320px}
.ai-row{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:8px}
.ai-lbl{display:flex;flex-direction:column;gap:4px;font-size:12.5px;color:#475569;min-width:220px}
.ai-lbl .sel{width:100%}
.ai-row2{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:12px 0}
.ai-fname{font-size:12.5px;color:#0f766e;background:#f0fdfa;border:1px solid #99f6e4;border-radius:7px;padding:5px 10px}
.ai-or{display:flex;align-items:center;gap:10px;margin:12px 0 8px;color:#94a3b8;font-size:11.5px}
.ai-or::before,.ai-or::after{content:'';flex:1;height:1px;background:#e2e8f0}
.ai-ta{width:100%;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;line-height:1.6}
.ai-hint{font-size:12px;color:#64748b;line-height:1.6}
.ai-warn{background:#fffbeb;border:1px solid #fde68a;color:#92400e;border-radius:8px;padding:8px 11px;font-size:12px;margin-bottom:9px;line-height:1.6}
.ai-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(118px,1fr));gap:9px;margin-bottom:11px}
.ai-kpi{border:1px solid;border-radius:9px;padding:9px 11px;text-align:center}
.ai-kpi-v{font-size:22px;font-weight:700;line-height:1.15}
.ai-kpi-l{font-size:11.5px;color:#475569;margin-top:2px}
.ai-kpi-s{font-size:10.5px;color:#94a3b8;margin-top:1px}
.ai-tbl-wrap{max-height:330px;overflow:auto;border:1px solid #e2e8f0;border-radius:9px;margin-bottom:11px}
.ai-tbl{width:100%;border-collapse:collapse;font-size:12.5px}
.ai-tbl thead th{position:sticky;top:0;background:#f1f5f9;color:#334155;font-weight:600;text-align:left;padding:7px 9px;border-bottom:1px solid #e2e8f0;white-space:nowrap;z-index:1}
.ai-tbl tbody td{padding:6px 9px;border-bottom:1px solid #f1f5f9;vertical-align:top}
.ai-tbl tbody tr:nth-child(even){background:#fcfdfe}
.ai-tbl tbody tr:hover{background:#f8fafc}
.ai-tag{display:inline-block;padding:1px 7px;border-radius:5px;font-size:11px;font-weight:600;white-space:nowrap}
.ai-sub{font-size:12.5px;font-weight:600;color:#334155;margin:12px 0 6px}
.ai-chk{display:flex;gap:8px;align-items:flex-start;background:#fff7ed;border:1px solid #fed7aa;border-radius:8px;padding:9px 11px;font-size:12.5px;color:#9a3412;margin-bottom:11px;line-height:1.6;cursor:pointer}
.ai-done{border:1px solid;border-radius:10px;padding:13px 15px;margin-bottom:12px}
.ai-done-tx{min-width:0;flex:1}
/* 批次号 inline code 不换行会导致长批次号撑破窄屏 */
.ai-done-s code{white-space:nowrap}
.ai-done-ico{width:46px;height:46px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex:0 0 46px}
.ai-done-t{font-size:17px;font-weight:700}
.ai-done-s{font-size:12.5px;color:#475569;margin-top:4px}
.ai-done-s code{background:rgba(15,23,42,.06);padding:1px 6px;border-radius:4px;font-size:11.5px}
.ai-foot{display:flex;gap:10px;align-items:center;justify-content:space-between;margin-top:13px;padding-top:12px;border-top:1px solid #e2e8f0}
.ai-foot .btn-primary:disabled{opacity:.55;cursor:not-allowed}
.ai-foot .btn svg,.ai-row2 .btn svg{vertical-align:-2px;margin-right:3px}

/* ---- 20261003IMPORTD2 美化：SVG 图标 / 字段对照表 / 汇总条 ---- */
.ai-ico{flex:0 0 auto}
/* 步骤条：图标化序号 + 弹性标题（原来序号是纯数字/字符 ✓，视觉弱） */
.ai-step-n{width:26px;height:26px;flex:0 0 26px}
/* 未到达步骤的图标：原来灰底(#e2e8f0)配灰图标，几乎不可见 —— 换成描边底 + 可见的图标色 */
.ai-step:not(.active):not(.done) .ai-step-n{background:#fff;border:1.5px solid #cbd5e1;color:#64748b}
.ai-step-tx{min-width:0}
/* ① 第 1 步加了字段对照表后内容变高（实测内容区 748px > 可视 690px），modal max-height:88vh
   会把底部「解析并预览」按钮挤出可视区（生产截图实测按钮被裁一半）。
   ⚠ 踩过的两个坑，别退回：
     (a) 规则不能只绑 .ai-pane —— modalOpen2 建的容器是 #ai_pane（className 为空），
         .ai-pane 是每步 innerHTML 里的子元素，绑错层整条规则不生效（生产实测 maxH=none）。
     (b) sticky 也救不了 —— footer 在滚动内容末尾，要滚到才吸底。
   正解：CSS Grid 三行（步骤条固定 / 内容滚 / 底栏固定），底栏恒可见。*/
#ai_pane{height:100%}
.ai-grid{display:grid;grid-template-rows:auto minmax(0,1fr) auto;height:100%;max-height:calc(88vh - 150px)}
.ai-bar{grid-row:1;padding-bottom:2px}
.ai-scroll{grid-row:2;overflow-y:auto;overflow-x:hidden;padding-right:4px;min-height:0}
.ai-footbar{grid-row:3;background:#fff;border-top:1px solid #e2e8f0;padding:11px 0 0;margin-top:0}
.ai-footbar .ai-foot{margin-top:0;padding-top:0;border-top:none;justify-content:flex-end;gap:10px}
.ai-footbar .ai-hint{margin-right:auto}
/* 各步函数仍在 body 里带 .ai-pane，做最小高度兜底即可，不再承担滚动 */
.ai-pane{min-height:0}
/* 滚动条不刺眼 */
.ai-scroll::-webkit-scrollbar{width:9px}
.ai-scroll::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:5px}
.ai-scroll::-webkit-scrollbar-track{background:#f1f5f9}
/* KPI：左上角图标，数值左侧对齐更稳 */
.ai-kpi{position:relative;padding-left:11px}
.ai-kpi-ico{position:absolute;top:8px;right:9px;opacity:.72}
/* 明细汇总条 */
.ai-sum{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin:-4px 0 11px;padding:7px 10px;
  background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px}
.ai-sum-l{font-size:12px;color:#475569;font-weight:600;margin-right:2px}
.ai-fchip{font-size:11.5px;padding:1px 8px;border-radius:20px;white-space:nowrap}
.ai-fchip b{font-weight:700}
/* 列映射进度条 */
.ai-colhit{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.ai-colbar{display:inline-block;width:110px;height:5px;border-radius:3px;background:#e2e8f0;overflow:hidden;vertical-align:middle}
.ai-colbar i{display:block;height:100%;background:#2563eb;border-radius:3px}
/* 第 1 步：字段对照表 + 导入须知（填补原 392px 内容高度下方的留白） */
.ai-guide{border-top:1px dashed #e2e8f0;margin-top:14px;padding-top:4px}
.ai-fgs{display:grid;grid-template-columns:repeat(auto-fit,minmax(268px,1fr));gap:8px;margin-bottom:4px}
.ai-fg{border:1px solid #e2e8f0;border-radius:9px;background:#fcfdfe;padding:7px 9px;min-width:0}
.ai-fg-h{font-size:12px;font-weight:700;color:#1e293b;display:flex;gap:6px;align-items:baseline;flex-wrap:wrap}
.ai-fg-tip{font-size:11px;font-weight:400;color:#94a3b8}
.ai-fg-b{display:flex;gap:5px;flex-wrap:wrap;margin-top:5px}
.ai-fc{display:inline-flex;align-items:center;gap:2px;font-size:11px;color:#475569;
  background:#f1f5f9;border:1px solid #e8edf3;border-radius:6px;padding:1px 6px;white-space:nowrap}
.ai-fc.req{background:#fef2f2;border-color:#fecaca;color:#b91c1c;font-weight:600}
.ai-req{font-style:normal;font-weight:700}
.ai-lock{font-style:normal;display:inline-flex;color:#b45309;vertical-align:-1px}
.ai-pts{display:grid;grid-template-columns:repeat(auto-fit,minmax(238px,1fr));gap:8px}
.ai-pt{display:flex;gap:8px;align-items:flex-start;border:1px solid #e2e8f0;border-radius:9px;
  background:#fff;padding:8px 10px;min-width:0}
.ai-pt-ico{color:#2563eb;flex:0 0 auto;margin-top:1px}
.ai-pt-t{font-size:12px;font-weight:600;color:#1e293b;line-height:1.35}
.ai-pt-d{font-size:11px;color:#64748b;line-height:1.55;margin-top:2px}
/* 标签/须知里的图标与文字对齐 */
.ai-warn svg,.ai-chk svg,.ai-sub svg,.ai-hint svg{vertical-align:-2px}
.ai-chk svg{color:#d97706}
/* 完成横幅改为「图标 + 文字」两栏 */
.ai-done{display:flex;gap:13px;align-items:center}
@media (max-width:760px){
  .ai-steps{flex-direction:column}
  .ai-step-d{display:none}
  .ai-tbl-wrap{max-height:240px}
  .ai-fgs,.ai-pts{grid-template-columns:1fr}
  .ai-done-ico{width:38px;height:38px;flex:0 0 38px}
  #ai_pane,.ai-pane{max-height:calc(88vh - 210px)}
  .ai-grid{max-height:calc(88vh - 190px)}
}

/* ===== 20261010PSUBC 方案C：配件管理升级为标准 sub-tab 功能页签 + 总览页 ===== */
.parts-nav { padding: 5px 6px; }
.parts-nav .sub-tab { font-size: 13px; padding: 7px 14px; }
.parts-nav .sub-tab.active { font-weight: 600; }
.pnav-tabs { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; min-width: 0; }
.pnav-acts { display: flex; gap: 6px; flex: none; margin-left: auto; }
.pnav-drawer { display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; border: 1px dashed #93c5fd; background: #f8fbff; color: #2563eb; border-radius: 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; white-space: nowrap; }
.pnav-drawer:hover { background: #eff6ff; border-color: #60a5fa; }
.pnav-drawer + .pnav-drawer { margin-left: 0; }
@media (max-width: 1440px) { .parts-nav .sub-tab { padding: 7px 9px; font-size: 12.5px; } }
@media (max-width: 1320px) { .parts-nav .sub-tab { padding: 6px 7px; font-size: 12px; } .parts-nav .sub-tab svg { width: 14px; height: 14px; } .pnav-drawer { padding: 6px 8px; font-size: 11.5px; } }
/* 20261010ICON：总览待办行图标圈与 KPI 卡 .ik-ring 完全同构（淡色圆底 + 线性 SVG） */
.ov-todo { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid #eef2f7; border-radius: 11px; background: #fff; cursor: pointer; text-decoration: none; color: #374151; font-size: 13px; transition: border-color .15s, background .15s; }
.ov-todo:hover { border-color: rgb(var(--tc-rgb, 37,99,235)); background: #f8fafc; }
.ov-todo .ov-i { width: 28px; height: 28px; flex: none; border-radius: 50%; background: rgba(var(--tc-rgb, 37,99,235), .13); color: rgb(var(--tc-rgb, 37,99,235)); display: flex; align-items: center; justify-content: center; }
.ov-todo .ov-i svg { width: 15px; height: 15px; }
.ov-todo .ov-tx { flex: 1; min-width: 0; }
.ov-todo .ov-tx b { color: rgb(var(--tc-rgb, 37,99,235)); font-size: 15px; }
.ov-todo .ov-go { color: rgb(var(--tc-rgb, 37,99,235)); opacity: .45; flex: none; display: flex; }
.ov-todo:hover .ov-go { opacity: 1; }

/* 20261010BAR1：JS 溢出自适应的图标态（app-report.js 控制加/去 icon-only 类） */
.filter-bar.flat-toolbar .btn-i.icon-only .txt { display: none; }
.filter-bar.flat-toolbar .btn-i.icon-only { padding: 0 8px; }
