/* ============================================================
   东风延锋消防数字化管理系统 - 全局样式（v1.3 UI 升级）
   主色：消防红 #E53935（--color-primary）
   深色侧边栏：#1F2937 → #111827 渐变
   内容区背景：#F5F7FA，卡片白，正文 #1F2937 / 次要 #6B7280
   语义令牌：--color-* / --radius-* / --shadow-* / --font-* / --spacing-*
   旧变量名（--fire-red-* 等）保留映射，避免遗漏引用
   ============================================================ */

:root {
  /* ===== 品牌主色（消防红） ===== */
  --color-primary: #E53935;
  --color-primary-hover: #D32F2F;
  --color-primary-active: #B71C1C;
  --color-primary-soft: #FDECEC;
  --color-primary-border: rgba(229, 57, 53, .35);

  /* ===== 语义色 ===== */
  --color-success: #16A34A;
  --color-warning: #F59E0B;
  --color-danger: #DC2626;
  --color-info: #1565C0;

  /* ===== 中性色 ===== */
  --color-bg: #F5F7FA;
  --color-card: #FFFFFF;
  --color-text: #1F2937;
  --color-text-2: #6B7280;
  --color-text-3: #9CA3AF;
  --color-border: #E5E7EB;
  --color-border-2: #D1D5DB;

  /* ===== 侧边栏 ===== */
  --sidebar-w: 220px;
  --header-h: 56px;
  --sidebar-bg-top: #1F2937;
  --sidebar-bg-bottom: #111827;

  /* ===== 圆角 ===== */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* ===== 阴影（双层柔和） ===== */
  --shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 4px 12px rgba(0, 0, 0, .06);
  --shadow-hover: 0 8px 20px rgba(0, 0, 0, .10);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .18);
  --shadow-primary: 0 4px 14px rgba(229, 57, 53, .28);

  /* ===== 字体 ===== */
  --font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --font-size: 12px;
  --font-size-sm: 13px;
  --font-size-title: 16px;
  --font-size-page-title: 20px;
  --line-height: 1.55;

  /* ===== 间距 ===== */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 24px;

  /* ===== 旧变量名映射（兼容既有引用，勿删） ===== */
  --fire-red-50:  #FDECEC;
  --fire-red-100: #F8D7D7;
  --fire-red-300: #EF9A9A;
  --fire-red-500: #E53935;
  --fire-red-600: #D32F2F;
  --fire-red-700: #B71C1C;
  --fire-red-800: #9A1616;

  --warn-orange: #F59E0B;
  --warn-yellow: #FBC02D;
  --safe-green:  #16A34A;
  --info-blue:   #1565C0;

  --gray-50:  #F9FAFB;
  --gray-100: #F5F5F5;
  --gray-200: #EEEEEE;
  --gray-300: #E0E0E0;
  --gray-400: #BDBDBD;
  --gray-500: #9E9E9E;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Vue 挂载前隐藏未编译模板，挂载后自动移除 */
[v-cloak] { display: none !important; }

/* JS 加载失败兜底提示 */
#__js_fallback__ {
  display: none;
  position: fixed; inset: 0; z-index: 99999;
  background: #fff; color: #DC2626;
  align-items: center; justify-content: center;
  font-size: 14px; line-height: 2; text-align: center;
}

html, body {
  height: 100%;
  font-family: var(--font-family);
  font-size: var(--font-size);
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; outline: none; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 通用工具类 ---------------- */
.text-red { color: var(--fire-red-500) !important; }
.text-orange { color: var(--warn-orange) !important; }
.text-green { color: var(--safe-green) !important; }
.text-blue { color: var(--info-blue) !important; }
.text-gray { color: var(--gray-500) !important; }
.bold { font-weight: 600; }
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.flex-1 { flex: 1; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.hide { display: none !important; }

/* ---------------- 按钮体系（v1.9 UI 规范） ----------------
 * 类型：primary 主 / outline 次 / danger 危险 / text 文字 / ghost 中性
 * 尺寸：lg 44px / md 40px(默认) / sm 32px
 * 四态：normal / hover / press / disabled 齐全
 * 圆角：4px
 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 18px;
  border-radius: 4px; border: 1px solid transparent;
  font-size: 12px; font-weight: 500; line-height: 1;
  transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s, transform .1s;
  white-space: nowrap; user-select: none; cursor: pointer;
}
.btn:disabled { cursor: not-allowed; }

/* ===== 主按钮：消防红底白字，hover 加深 ===== */
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #C62828; }
.btn-primary:active:not(:disabled) { background: #991B1B; transform: translateY(1px); }
.btn-primary:disabled { background: #F5C6C6; color: #fff; }

/* ===== 次按钮：白底红边红字，hover 浅红（消防主题协调色） ===== */
.btn-outline { background: #fff; color: var(--color-primary); border-color: var(--color-primary-border); }
.btn-outline:hover:not(:disabled) { background: var(--fire-red-50); border-color: var(--color-primary); }
.btn-outline:active:not(:disabled) { background: #F8D7D7; border-color: var(--color-primary); transform: translateY(1px); }
.btn-outline:disabled { background: #fff; color: var(--color-text-3); border-color: var(--gray-300); }

/* ===== 危险按钮：红底，用于删除/高危确认 ===== */
.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #B91C1C; }
.btn-danger:active:not(:disabled) { background: #991B1B; transform: translateY(1px); }
.btn-danger:disabled { background: #F5C6C6; color: #fff; }
/* 兼容别名（旧代码引用） */
.btn-danger-solid { background: var(--color-danger); color: #fff; }
.btn-danger-solid:hover:not(:disabled) { background: #B91C1C; }
.btn-danger-solid:active:not(:disabled) { background: #991B1B; transform: translateY(1px); }
.btn-danger-solid:disabled { background: #F5C6C6; color: #fff; }

/* ===== 文字按钮：仅文字，无边框，消防红 ===== */
.btn-text { background: transparent; color: var(--color-primary); padding: 0 8px; }
.btn-text:hover:not(:disabled) { background: var(--fire-red-50); }
.btn-text:active:not(:disabled) { background: #F8D7D7; }
.btn-text:disabled { background: transparent; color: var(--color-text-3); }

/* ===== 中性按钮（取消/关闭等次级操作） ===== */
.btn-ghost { background: transparent; color: var(--color-text-2); border-color: var(--gray-300); }
.btn-ghost:hover:not(:disabled) { color: var(--color-primary); border-color: var(--color-primary); background: var(--fire-red-50); }
.btn-ghost:active:not(:disabled) { transform: translateY(1px); }
.btn-ghost:disabled { color: var(--color-text-3); border-color: var(--gray-200); background: transparent; }

/* ===== 成功色按钮（新增等正向操作，兼容保留） ===== */
.btn-green { background: var(--color-success); color: #fff; }
.btn-green:hover:not(:disabled) { background: #15803D; }
.btn-green:active:not(:disabled) { background: #166534; transform: translateY(1px); }
.btn-green:disabled { background: #BBF7D0; color: #fff; }

/* ===== 尺寸：lg 44 / md 40 / sm 32 ===== */
.btn-lg { height: 44px; padding: 0 24px; font-size: 13px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 11px; }

.text-danger { color: var(--color-danger) !important; }
.btn-red { background: var(--color-primary); color: #fff; }
.btn-red:hover:not(:disabled) { background: #C62828; }
.btn-red:active:not(:disabled) { background: #991B1B; transform: translateY(1px); }
.btn-red:disabled { background: #F5C6C6; color: #fff; }

/* 顶栏显式退出按钮（v1.3 R2） */
.logout-btn { color: var(--color-text-2); border-color: var(--gray-200); }
.logout-btn:hover:not(:disabled) { color: var(--color-danger); border-color: var(--color-danger); background: #FEF2F2; }

/* ---------------- 分段切换（按周/按月） ---------------- */
.seg { display: inline-flex; border: 1px solid var(--color-primary); border-radius: var(--radius-sm); overflow: hidden; }
.seg-btn {
  padding: 7px 20px; font-size: 12px; background: #fff; color: var(--color-primary);
  border: none; cursor: pointer; transition: all .2s;
}
.seg-btn + .seg-btn { border-left: 1px solid var(--color-primary); }
.seg-btn.active { background: var(--color-primary); color: #fff; }
.seg-btn:hover:not(.active) { background: var(--fire-red-50); }

/* ---------------- Tab（v1.3 R1 消防设施页） ---------------- */
.eq-tabs {
  display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 16px;
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.tab-btn {
  padding: 8px 24px; font-size: 12px; font-weight: 500;
  border: none; border-radius: 6px; background: transparent;
  color: var(--color-text-2); cursor: pointer; transition: all .2s;
}
.tab-btn:hover:not(.active) { color: var(--color-primary); background: var(--fire-red-50); }
.tab-btn.active {
  background: linear-gradient(180deg, #EF5350, var(--color-primary));
  color: #fff; box-shadow: 0 2px 8px rgba(229,57,53,.25);
}

/* ---------------- 卡片（v1.9 UI 规范：白底 / 圆角8px / 轻阴影 / padding24px） ---------------- */
.card {
  background: var(--color-card);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 16px;
  transition: box-shadow .25s, transform .25s;
}
.card:hover { box-shadow: var(--shadow-hover); }
.card-title {
  font-size: 16px; font-weight: 700; color: var(--color-text);
  display: flex; align-items: center; margin-bottom: 16px; letter-spacing: .3px;
}
.card-title::before {
  content: ''; width: 4px; height: 18px; background: linear-gradient(180deg, var(--color-primary), #B71C1C);
  border-radius: 2px; margin-right: 10px;
}

/* ---------------- 界面设置（v1.9 登录页/导航配置） ---------------- */
.ui-color-row { display: flex; align-items: center; gap: 10px; }
.ui-color { width: 42px; height: 36px; padding: 2px; border: 1px solid var(--gray-300); border-radius: 6px; background: #fff; cursor: pointer; }
.ui-color-hex { font-family: Consolas, monospace; font-size: 11px; color: var(--color-text-2); }
.ui-config-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--gray-200); flex-wrap: wrap; }
.ui-config-tip { font-size: 11px; color: var(--color-text-3); }

/* ---------------- 数据报表导出按钮（v1.9） ---------------- */
.report-bar { display: flex; gap: 14px; padding: 4px 0; flex-wrap: wrap; }
.report-btn {
  flex: 1; min-width: 200px; display: flex; align-items: center; gap: 14px;
  padding: 16px 22px; border-radius: 10px; border: none;
  color: #fff; font-size: 12px; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.12); transition: all .2s;
  text-align: left;
}
.report-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.report-btn:active:not(:disabled) { transform: translateY(0); }
.report-btn .rpt-icon { font-size: 30px; flex-shrink: 0; line-height: 1; }
.report-btn .rpt-text { text-align: left; }
.report-btn .rpt-title { font-size: 15px; font-weight: 800; letter-spacing: 2px; }
.report-btn .rpt-sub { font-size: 11px; opacity: .92; margin-top: 2px; }
.btn-rpt-week  { background: linear-gradient(135deg, #2563EB, #1E40AF); }
.btn-rpt-month { background: linear-gradient(135deg, #F59E0B, #D97706); }
.btn-rpt-year  { background: linear-gradient(135deg, #DC2626, #7F1D1D); }

/* ---------------- 操作日志（v1.8） ---------------- */
.log-tip { font-size: 11px; color: var(--color-text-3); font-weight: 400; margin-left: 12px; }
.log-count { font-size: 11px; color: var(--color-text-3); font-weight: 400; margin-left: 10px; }
.log-scroll { max-height: 360px; overflow-y: auto; }
.log-load-more {
  text-align: center; font-size: 11px; color: var(--color-text-3);
  padding: 8px 0 2px; min-height: 20px;
}

/* ---------------- 表单 ---------------- */
.form-item { margin-bottom: 16px; }
.form-item label {
  display: block; margin-bottom: 6px; font-size: 11px; color: var(--color-text-2); font-weight: 500;
}
.form-item label .req { color: var(--color-danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; padding: 8px 12px; border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm); font-size: 12px; transition: border-color .2s, box-shadow .2s;
  background: #fff; color: var(--color-text);
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(229,57,53,.12);
  background: #FFFBFB;
}
.textarea { resize: vertical; min-height: 80px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 20px; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.table th {
  background: linear-gradient(180deg, #F1F5F9, #E5E7EB); color: #37474F;
  font-weight: 700; text-align: left; padding: 13px 14px; white-space: nowrap;
  border-bottom: 2px solid var(--color-primary); letter-spacing: .3px;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; overflow-wrap: break-word; word-break: normal; }
.table tbody tr { transition: background-color .15s; }
.table tbody tr:nth-child(even) { background: #FAFAFA; }
.table tbody tr:hover { background: #FFEDED; }
.table .actions { display: flex; gap: 6px; }

/* ---------------- 标签 ---------------- */
.tag {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: var(--radius-pill);
  font-size: 11px; line-height: 1.6; white-space: nowrap;
}
.tag-red    { background: var(--fire-red-50); color: var(--fire-red-600); }
.tag-orange { background: #FFF3E0; color: var(--warn-orange); }
.tag-yellow { background: #FFF8E1; color: #F9A825; }
.tag-green  { background: #E8F5E9; color: var(--safe-green); }
.tag-blue   { background: #E3F2FD; color: var(--info-blue); }
.tag-gray   { background: var(--gray-200); color: var(--gray-600); }

/* ---------------- 布局骨架（v1.8 顶部导航） ---------------- */
.layout { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* 顶部导航栏（v1.9：消防红渐变 + 菜单自动换行两行显示，去除横向滑动；主题色可用 CSS 变量覆盖） */
.topbar {
  min-height: var(--header-h); height: auto; flex-shrink: 0; z-index: 20;
  background: linear-gradient(180deg, var(--ui-theme, #E53935) 0%, var(--ui-theme-2, #C62828) 100%);
  color: #fff; display: flex; align-items: stretch; flex-wrap: wrap; gap: 0;
  padding: 0; box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.topbar-logo {
  display: flex; align-items: center; gap: 10px; padding: 8px 16px;
  font-weight: 700; white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,.14); flex-shrink: 0;
}
.topbar-logo .logo-text { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; line-height: 1.35; }
/* 系统名：白色黑体字，单独一行（小一号） */
.topbar-logo .logo-main {
  font-size: 18px; font-weight: 900; white-space: nowrap; letter-spacing: 2px;
  font-family: "SimHei", "黑体", "Microsoft YaHei", sans-serif;
  color: #FFFFFF; text-shadow: 0 2px 6px rgba(0,0,0,.4);
}
/* 版本号：字号保持小号，紧随系统名 */
.topbar-logo .logo-ver { font-style: normal; font-size: 11px; font-weight: 400; color: rgba(255,255,255,.85); letter-spacing: .5px; margin-left: 8px; vertical-align: 4px; }
.topbar-logo .logo-icon {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 8px;
  background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2), 0 2px 8px rgba(183,28,28,.4);
}
.topbar-menu {
  order: 3; flex: 1 0 100%; min-width: 0;
  display: flex; flex-wrap: wrap; align-items: stretch; height: auto;
  border-top: 1px solid rgba(255,255,255,.12); padding: 6px 8px;
}
/* 每个导航按钮：微渐变色块（按钮感），一行放不下自动换行 */
.topbar-menu .menu-item {
  display: flex; align-items: center; gap: 7px; padding: 0 18px; height: 38px;
  cursor: pointer; transition: all .2s; font-size: var(--ui-nav-font, 14px); position: relative;
  color: rgba(255,255,255,.92); white-space: nowrap; flex: 1 1 0;
  justify-content: flex-start; text-align: left; margin: 2px 4px; border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.20) 0%, rgba(255,255,255,.06) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 1px 3px rgba(0,0,0,.18);
}
.topbar-menu .menu-item:hover { background: linear-gradient(180deg, rgba(255,255,255,.30) 0%, rgba(255,255,255,.12) 100%); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), 0 2px 6px rgba(0,0,0,.22); }
/* 当前页：金色渐变块高亮 */
.topbar-menu .menu-item.active {
  background: linear-gradient(180deg, #FFD700 0%, #FFA000 100%);
  color: #7f1d1d; font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 2px 8px rgba(0,0,0,.3);
}
.topbar-menu .menu-item .mi { width: 20px; text-align: center; font-size: 13px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.95); }
/* 线性 SVG 图标（v1.9 UI 规范：24px 主尺寸 / 2px 线条 / 继承 currentColor） */
.mi svg { width: 18px; height: 18px; display: block; }
.menu-item.active .mi { color: #7f1d1d; }
.logo-icon svg { width: 24px; height: 24px; color: #fff; }
.stat-icon svg { width: 26px; height: 26px; }
/* 统计卡片图标：告警对应功能色 */
.alarm-card .stat-icon.bg-red { color: var(--color-primary); }
.alarm-card .stat-icon.bg-orange { color: var(--warn-orange); }
.alarm-card .stat-icon.bg-blue { color: var(--info-blue); }
.alarm-card .stat-icon.bg-green { color: var(--safe-green); }
.rpt-icon svg { width: 30px; height: 30px; }
.report-btn .rpt-icon { color: #fff; }
.menu-badge {
  margin-left: 2px; background: #FFEB3B; color: #C62828; border-radius: 10px;
  padding: 0 7px; font-size: 11px; font-weight: 700; line-height: 18px;
}
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; flex-shrink: 0; padding: 8px 16px; }
/* 公司名称：靠右对齐、白色 */
.topbar-right .company-tag { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.95); letter-spacing: 1px; white-space: nowrap; text-shadow: 0 1px 3px rgba(0,0,0,.3); }
.topbar-right .uname { font-size: 12px; }

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.header {
  height: 50px; background: #fff; display: flex; align-items: center;
  padding: 0 24px; box-shadow: 0 1px 4px rgba(0,0,0,.06); z-index: 10; flex-shrink: 0;
  border-bottom: 1px solid #F0F3F7;
}
.header-title { font-size: 17px; font-weight: 700; color: var(--color-text); letter-spacing: .5px; }
.header-title .sub { font-size: 11px; color: var(--color-text-3); font-weight: 400; margin-left: 12px; }
.user-info { display: flex; align-items: center; gap: 8px; cursor: pointer; position: relative; color: #fff; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #EF5350, var(--color-primary)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.user-dropdown {
  position: absolute; right: 0; top: 42px; background: #fff; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); min-width: 140px; overflow: hidden; z-index: 100;
  border: 1px solid var(--gray-100);
}
.user-dropdown .dd-item { padding: 10px 16px; cursor: pointer; font-size: 12px; color: var(--color-text-2); }
.user-dropdown .dd-item:hover { background: var(--fire-red-50); color: var(--color-primary); }

.content { flex: 1; overflow-y: auto; padding: 20px 24px; }

/* 底部信息栏（系统名称 + 版本号） */
.app-footer {
  flex-shrink: 0; height: 36px; display: flex; align-items: center; gap: 12px;
  padding: 0 24px; background: #fff; border-top: 1px solid var(--gray-100);
  font-size: 11px; color: var(--color-text-3); z-index: 10;
}
.app-footer .ver { margin-left: auto; }

/* ---------------- 统计卡片 ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.stat-card {
  background: var(--color-card); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 16px;
  position: relative; overflow: hidden; transition: box-shadow .25s, transform .25s;
  min-width: 0;
}
.stat-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
/* v3.1.10: 防止 stat-icon 挤压右侧文字区——内容 div min-width:0 允许收缩 + flex:1 占满剩余空间 */
.stat-card > div:not(.stat-icon) { min-width: 0; flex: 1; }
.stat-card .stat-icon {
  width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center;
  justify-content: center; font-size: 22px; flex-shrink: 0;
}
/* v3.1.10: 数字/标签溢出容器防护——按词换行（数字串整体换行），不允许强制断字到每一字符 */
.stat-card .stat-num { font-size: 24px; font-weight: 700; line-height: 1.2; overflow-wrap: break-word; word-break: break-word; }
.stat-card .stat-label { font-size: 11px; color: var(--color-text-3); margin-top: 2px; overflow-wrap: break-word; }
.stat-card .stat-extra { font-size: 11px; color: var(--gray-400); margin-top: 4px; overflow-wrap: break-word; }
.bg-red { background: var(--fire-red-50); }
.bg-orange { background: #FFF3E0; }
.bg-green { background: #E8F5E9; }
.bg-blue { background: #E3F2FD; }
.bg-purple { background: #F3E5F5; }
/* 统计卡片可点击联动（v1.9） */
.alarm-card { cursor: pointer; }
/* v2.2.2：仪表盘数字卡片/状态卡片可点击下钻 */
.drillable { cursor: pointer; }
.drillable::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: transparent; transition: background .25s;
}
.drillable:hover::after { background: rgba(229,57,53,.35); }
.drillable:active::after { background: var(--color-primary); }
.alarm-card::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: transparent; transition: background .25s;
}
.alarm-card:hover::after { background: rgba(229,57,53,.35); }
.alarm-card.active {
  border: 1px solid var(--color-primary); box-shadow: 0 0 0 3px rgba(229,57,53,.15), var(--shadow-hover);
}
.alarm-card.active::after { background: var(--color-primary); }
/* v3.3.0：统计卡片选中态（巡检统计看板 / 点检统计 / 器材月度点检状态卡片联动统一视觉） */
.stat-card.active {
  border: 1px solid var(--color-primary);
  box-shadow: 0 0 0 3px rgba(229,57,53,.15), var(--shadow-hover);
}
.stat-card.active::after { background: var(--color-primary); }
/* v3.3.0：卡片联动明细区（浅底 + 左侧红色引导条，与卡片选中态呼应） */
.drill-panel {
  margin-top: 14px; padding: 12px 14px;
  background: var(--fire-red-50, #FFF5F5); border-left: 3px solid var(--color-primary);
  border-radius: 6px;
}
.drill-panel .table { background: #fff; }

.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-box {
  background: var(--color-card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 20px; transition: box-shadow .25s;
}
.chart-box:hover { box-shadow: var(--shadow-hover); }
.chart-box .chart-title { font-size: 13px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; }
.chart-box .chart-title::before {
  content: ''; width: 4px; height: 16px; background: var(--color-primary);
  border-radius: 2px; margin-right: 8px;
}
.chart-container { height: 280px; }

/* ---------------- 筛选栏 ---------------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  background: var(--color-card); padding: 14px 18px; border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 16px;
}
.filter-bar .input, .filter-bar .select { width: auto; min-width: 130px; }

/* ---------------- 分页 ---------------- */
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 16px; }
.page-btn {
  min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm); background: #fff; color: var(--color-text-2); font-size: 11px;
  transition: all .2s;
}
.page-btn:hover:not(:disabled) { border-color: var(--color-primary); color: var(--color-primary); }
.page-btn.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.page-info { font-size: 11px; color: var(--gray-600); }

/* ---------------- 弹窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(17,24,39,.5); z-index: 1000;
  display: flex; align-items: center; justify-content: center; animation: fadeIn .2s;
  backdrop-filter: blur(2px);
}
.modal {
  background: #fff; border-radius: var(--radius-lg); width: 560px; max-width: 92vw; max-height: 88vh;
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: slideUp .25s;
  overflow: hidden;
}
.modal-lg { width: 780px; }
.modal-header {
  padding: 16px 24px; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center;
  background: linear-gradient(180deg, #FEFEFE, #FAFAFA);
}
.modal-header .title { font-size: 14px; font-weight: 600; color: var(--color-text); }
.modal-header .close { margin-left: auto; cursor: pointer; font-size: 20px; color: var(--gray-500); line-height: 1; transition: color .2s; }
.modal-header .close:hover { color: var(--color-danger); }
.modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 14px 24px; border-top: 1px solid var(--gray-200); display: flex; justify-content: flex-end; gap: 10px; background: #FAFAFA; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---------------- 消息提示 ---------------- */
.toast-wrap { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  padding: 10px 24px; border-radius: var(--radius-pill); color: #fff; font-size: 12px;
  box-shadow: var(--shadow-lg); animation: slideUp .25s; display: flex; align-items: center; gap: 8px;
}
.toast-success { background: var(--color-success); }
.toast-error { background: var(--color-danger); }
.toast-info { background: var(--color-info); }
.toast-warn { background: var(--color-warning); }

/* ---------------- 空状态 ---------------- */
.empty { text-align: center; padding: 60px 0; color: var(--gray-400); }
.empty .icon { font-size: 46px; margin-bottom: 12px; }
.empty p { font-size: 12px; }

/* ---------------- 详情页 ---------------- */
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 24px; }
.detail-item { font-size: 12px; color: var(--color-text-2); }
.detail-item .k { color: var(--gray-500); margin-right: 8px; }

.timeline { padding-left: 20px; border-left: 2px solid var(--gray-200); }
.timeline-item { position: relative; padding: 0 0 18px 16px; }
.timeline-item::before {
  content: ''; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--color-primary); border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--fire-red-100);
}
.timeline-item .t-time { font-size: 11px; color: var(--gray-500); }
.timeline-item .t-content { font-size: 11px; margin-top: 4px; color: var(--color-text-2); }

/* ---------------- 登录页 ---------------- */
/* v1.8: html 与 body 均铺满深色，杜绝任何浅色缝隙（背景颜色未撑满问题） */
html.login-page, html.login-page body { height: 100%; background: #1F2937; }
.login-body {
  min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  background-color: #1F2937;                                    /* 纯色兜底 */
  background-image: linear-gradient(135deg, #111827 0%, #1F2937 45%, #2D3748 100%);
  background-repeat: no-repeat; background-size: cover;
  position: relative; overflow: hidden; padding: 24px; box-sizing: border-box;
}
.login-body::before {
  content: ''; position: absolute; width: min(60vw, 560px); height: min(60vw, 560px); border-radius: 50%;
  background: radial-gradient(circle, rgba(229,57,53,.22), transparent 70%);
  top: -150px; right: -100px;
}
.login-body::after {
  content: ''; position: absolute; width: min(48vw, 460px); height: min(48vw, 460px); border-radius: 50%;
  background: radial-gradient(circle, rgba(229,57,53,.14), transparent 70%);
  bottom: -120px; left: -80px;
}
.login-card {
  width: min(420px, 92vw); background: #fff; border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 56px) clamp(22px, 4vw, 52px);
  box-shadow: var(--shadow-lg); position: relative; z-index: 1;
}
.login-logo {
  display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 10px;
}
.login-logo .logo-badge {
  width: clamp(48px, 8vw, 72px); height: clamp(48px, 8vw, 72px); border-radius: 14px;
  background: linear-gradient(135deg, var(--ui-theme-2, #EF5350), var(--ui-theme, #E53935)); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(26px, 4.5vw, 38px); font-weight: 800;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
/* v1.9: 登录页两行标题 —— 公司名称（小字）+ 系统名称（大字），内容/字号可配置 */
.login-company {
  text-align: center; font-size: clamp(13px, 1.8vw, 16px); color: var(--color-text-2);
  letter-spacing: 2px; margin: 4px 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.login-title {
  text-align: center; font-size: clamp(20px, 3vw, 26px); font-weight: 800; color: var(--color-text);
  line-height: 1.4; letter-spacing: 1px; margin-bottom: clamp(22px, 4vw, 40px); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
/* 主题色应用到登录按钮 */
.login-card .btn-primary { background: linear-gradient(180deg, var(--ui-theme, #E53935), var(--ui-theme-2, #C62828)); }
.login-sub { text-align: center; font-size: clamp(13px, 1.8vw, 16px); color: var(--color-text-3); margin: clamp(6px, 1.5vw, 12px) 0 clamp(22px, 4vw, 40px); }
.login-tip {
  margin-top: clamp(14px, 2vw, 20px); background: #F9FAFB; border-radius: var(--radius-sm);
  padding: clamp(10px, 1.5vw, 14px) clamp(12px, 1.8vw, 16px);
  font-size: clamp(12px, 1.5vw, 14px); color: var(--color-text-2); line-height: 1.8;
}
/* 平板 / 桌面：放大卡片，撑满更多屏幕空间 */
@media (min-width: 768px) {
  .login-card { width: min(600px, 88vw); }
}
@media (min-width: 1200px) {
  .login-card { width: min(720px, 70vw); }
}
/* 登录表单元素随屏幕同步放大 */
.login-card .form-item label { font-size: clamp(13px, 1.6vw, 16px); }
.login-card .input { padding: clamp(10px, 1.4vw, 15px) 14px; font-size: clamp(14px, 1.8vw, 17px); }
.login-card #loginBtn { padding: clamp(11px, 1.6vw, 16px) 0; font-size: clamp(15px, 2vw, 18px); }

/* ---------------- 报警详情页 ---------------- */
.flow-steps { display: flex; align-items: center; margin: 16px 0; flex-wrap: wrap; gap: 4px; }
.flow-step {
  display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--gray-500);
}
.flow-step .dot {
  width: 24px; height: 24px; border-radius: 50%; background: var(--gray-200); color: var(--gray-600);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600;
}
.flow-step.active .dot { background: var(--color-primary); color: #fff; }
.flow-step.active { color: var(--color-primary); font-weight: 600; }
.flow-step.done .dot { background: var(--color-success); color: #fff; }
.flow-arrow { color: var(--gray-400); margin: 0 6px; }

/* ---------------- NFC 模拟面板 ---------------- */
.nfc-panel {
  border: 2px dashed var(--fire-red-300, #EF9A9A); border-radius: var(--radius);
  background: var(--fire-red-50); padding: 16px; text-align: center;
}
.nfc-panel .nfc-icon { font-size: 34px; }
.nfc-panel .nfc-title { font-weight: 600; color: var(--fire-red-700); margin: 6px 0 2px; }
.nfc-panel .nfc-sub { font-size: 11px; color: var(--gray-600); }

/* ---------------- 预案附件（v1.3 R4） ---------------- */.attach-upload {
  border: 2px dashed var(--gray-300); border-radius: var(--radius-sm);
  padding: 16px; text-align: center; background: #FAFAFA; transition: border-color .2s, background .2s;
}
.attach-upload:hover { border-color: var(--color-primary); background: var(--fire-red-50); }
.attach-upload input[type="file"] { font-size: 11px; color: var(--color-text-2); }
.attach-upload .attach-hint { font-size: 11px; color: var(--color-text-3); margin-top: 8px; }
.attach-list { display: flex; flex-direction: column; gap: 8px; }
.attach-item {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  padding: 8px 12px; background: #fff; transition: box-shadow .2s;
}
.attach-item:hover { box-shadow: var(--shadow); }
.attach-icon { font-size: 14px; flex-shrink: 0; }
.attach-name { font-size: 11px; color: var(--color-text); word-break: break-all; min-width: 0; flex: 1; }
.attach-meta { font-size: 11px; color: var(--color-text-3); white-space: nowrap; }
.attach-pending { background: #FFFBEB; border-color: #FDE68A; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .chart-grid { grid-template-columns: 1fr; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .sidebar { width: 60px; }
  .sidebar-logo span.txt, .menu-item span.txt, .sidebar-footer { display: none; }
  .sidebar-logo { justify-content: center; padding: 0; }
  .menu-item { justify-content: center; padding: 12px 0; }
  .stat-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   v1.4 新增样式（批量导入结果 / 导出对话框 / 点检区块）
   ============================================================ */

/* 导入结果弹窗：汇总卡片 */
.import-summary {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.import-summary .is-item {
  background: var(--gray-50, #F9FAFB); border: 1px solid var(--gray-200, #EEEEEE);
  border-radius: var(--radius-sm, 8px); padding: 16px 12px; text-align: center;
}
.import-summary .is-num { font-size: 24px; font-weight: 700; line-height: 1.2; }
.import-summary .is-label { font-size: 11px; color: var(--color-text-3, #9CA3AF); margin-top: 4px; }

/* 导入结果弹窗：错误明细表（限高滚动） */
.import-errors-table { max-height: 300px; overflow-y: auto; }

/* v3.4.2：多工作表导入提示条（各表读取行数 / 示例行跳过数） */
.import-sheets-tip {
  margin-top: 12px; padding: 8px 12px; border-radius: 6px;
  background: var(--color-bg-2, #F3F4F6); color: var(--color-text-2, #4B5563);
  font-size: 12px; line-height: 1.7;
}

/* 导出二维码对话框：纵向单选组 */
.radio-row { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.radio-row label {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid var(--gray-200, #EEEEEE); border-radius: var(--radius-sm, 8px);
  padding: 10px 14px; font-size: 12px; transition: all .2s;
}
.radio-row label:hover { border-color: var(--color-primary, #E53935); background: var(--fire-red-50, #FDECEC); }
.radio-row input[type="radio"] { accent-color: var(--color-primary, #E53935); width: 16px; height: 16px; }

/* dashboard 点检完成情况：部门维度表完成率色标沿用 .tag 类，无需新增 */
@media (max-width: 1200px) {
  .import-summary { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   v1.5 新增样式（设施删除 R1 / 打印二维码 R2）
   说明：打印页样式内联于服务端生成的 HTML（server/utils/qrcode-html.js），不落此文件
   ============================================================ */

/* 批量删除按钮：btn-red 已覆盖主色，补充间距 */
.filter-bar .btn-red { margin-left: 8px; }

/* checkbox 首列（设备表） */
.table th.check-col, .table td.check-col { width: 36px; text-align: center; }
.table input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--color-primary); cursor: pointer; }

/* 删除确认弹窗 */
.batch-del-count { font-size: 13px; margin-bottom: 12px; }
.batch-del-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.del-risk-tip {
  margin-top: 6px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: #FEF2F2; color: var(--color-danger); font-size: 11px; line-height: 1.7;
}

/* ============================================================
   v1.6 新增样式（R3 打印预览 / R4 巡检看板 / R7 自动状态红色加粗）
   ============================================================ */

/* R3: 打印预览弹窗（iframe srcdoc 先预览再打印） */
.print-preview-modal .modal { max-width: 860px; }
.print-preview-frame { width: 100%; height: 70vh; border: none; background: #fff; }

/* R4: 巡检统计看板 */
.chart-container { width: 100%; }

/* R7: 自动状态 已过期/已报废 红色加粗 */
.fac-overdue { font-weight: 700; }

/* ============================================================
   v1.7 新增样式（R2 状态汇总卡 / R3 对比图 / R4 方格）
   ============================================================ */

/* R2：状态汇总卡片（5 列；正常弱化，四类风险突出） */
.status-summary-grid { grid-template-columns: repeat(5, 1fr); }
.status-card { flex-direction: column; text-align: center; padding: 16px 10px; }
.status-card .status-num { font-size: 28px; font-weight: 700; line-height: 1.25; overflow-wrap: break-word; word-break: break-word; }
.status-card .status-name { font-size: 11px; color: var(--color-text-2); overflow-wrap: break-word; }
.status-card .status-extra { font-size: 11px; color: var(--gray-400); overflow-wrap: break-word; }
.status-card.st-warn    .status-num { color: var(--warn-orange); }
.status-card.st-replace .status-num { color: #F9A825; }
.status-card.st-expired .status-num { color: var(--color-danger); }
.status-card.st-scrap   .status-num { color: var(--gray-500); }
.status-card.st-normal  { opacity: .6; }
.card-note {
  margin-top: 12px; padding: 8px 12px; border-radius: var(--radius-sm);
  background: #F9FAFB; font-size: 11px; color: var(--color-text-3); line-height: 1.7;
}

/* R4：月度点检方格 */
/* v3.1.9: 列数多（编号+名称+部门+频次+12周+已点检≈17列），设最小宽度避免窄屏挤压溢出，
   配合 .table-wrap{overflow-x:auto} 横向滚动浏览 */
.mg-table { min-width: 900px; }
.mg-cell {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 6px; font-size: 13px; font-weight: 700;
}
.mg-cell.ok   { background: #E8F5E9; color: #16A34A; }
.mg-cell.miss { background: #FFEBEE; color: #C62828; }
/* v3.4.0 器材管控标准：√ 旁照片提示符号（点击仅加载简图，节省流量） */
.mg-photo {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; margin-left: 3px; cursor: pointer;
  vertical-align: middle; transition: transform .15s;
}
.mg-photo:hover { transform: scale(1.12); }
.mg-photo svg { width: 13px; height: 13px; }
.mg-photo.passed   { background: #E3F2FD; color: #1565C0; border: 1px solid #BBDEFB; }
.mg-photo.pending  { background: #FFF8E1; color: #F57F17; border: 1px solid #FFE082; }
.mg-photo.rejected { background: #FFEBEE; color: #C62828; border: 1px solid #F5C6C6; }
.mg-photo .pmark { position: absolute; top: -5px; right: -5px; min-width: 12px; height: 12px;
  border-radius: 6px; font-size: 9px; font-style: normal; line-height: 12px; padding: 0 2px; text-align: center; }
.mg-photo.pending  .pmark { background: #F9A825; color: #fff; }
.mg-photo.rejected .pmark { background: #C62828; color: #fff; }
/* 照片简图预览弹层 */
.pv-mask { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 10000;
  display: flex; align-items: center; justify-content: center; padding: 16px; }
.pv-box { background: #fff; border-radius: 14px; width: 460px; max-width: 100%;
  max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,.3); overflow: hidden; }
.pv-head { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid #eee; gap: 10px; flex-wrap: wrap; }
.pv-head .t { font-size: 14px; font-weight: 700; color: #222; }
.pv-head .s { font-size: 12px; color: #999; }
.pv-close { margin-left: auto; cursor: pointer; font-size: 22px; color: #999; line-height: 1; }
.pv-close:hover { color: #C62828; }
.pv-body { padding: 12px 16px; overflow: auto; }
.pv-img-wrap { background: #000; border-radius: 10px; min-height: 200px; display: flex;
  align-items: center; justify-content: center; overflow: hidden; position: relative; }
.pv-img { max-width: 100%; max-height: 52vh; display: block; }
.pv-img.skeleton { width: 100%; height: 240px; animation: pvblink 1.1s ease-in-out infinite; }
@keyframes pvblink { 0%,100%{opacity:.35} 50%{opacity:.75} }
.pv-meta { display: grid; grid-template-columns: 84px 1fr; gap: 4px 10px; font-size: 12px; margin-top: 10px; color: #555; }
.pv-meta .k { color: #999; }
.pv-flag { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.pv-flag.pending  { background: #FFF8E1; color: #F57F17; }
.pv-flag.passed   { background: #E3F2FD; color: #1565C0; }
.pv-flag.rejected { background: #FFEBEE; color: #C62828; }
.pv-foot { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid #eee; flex-wrap: wrap; align-items: center; }
.pv-foot .sp { font-size: 11px; color: #aaa; margin-right: auto; }
.pv-btn { border: none; padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; }
.pv-btn.primary { background: #B71C1C; color: #fff; }
.pv-btn.primary:disabled { background: #ccc; }
.pv-btn.ghost { background: #fff; color: #666; border: 1px solid #ddd; }
.pv-btn.ok { background: #E8F5E9; color: #2E7D32; border: 1px solid #A5D6A7; }
.pv-btn.bad { background: #FFEBEE; color: #C62828; border: 1px solid #F5C6C6; }
.pv-loading { display: inline-block; width: 14px; height: 14px; border: 2px solid #ddd;
  border-top-color: #B71C1C; border-radius: 50%; animation: pvspin .8s linear infinite; vertical-align: -2px; }
@keyframes pvspin { to { transform: rotate(360deg); } }
.mg-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--color-text-2); }
.mg-table td { text-align: center; }

@media (max-width: 1200px) { .status-summary-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .status-summary-grid { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
 * 全局字号 -1 号（v1.9 试看：所有字体缩小一号）
 * 精确覆盖关键组件，确保整体一致缩一号、可逆（删除本块即还原）
 * ============================================================ */
.btn { font-size: 13px; }
.btn-lg { font-size: 14px; }
.btn-sm { font-size: 12px; }
.table { font-size: 13px; }
.input, .select, .textarea { font-size: 13px; }
.form-item label { font-size: 13px; }
.card-title { font-size: 17px; }
.header-title { font-size: 18px; }
.header-title .sub { font-size: 12px; }
.topbar-logo .logo-main { font-size: 19px; }
.topbar-logo .logo-ver { font-size: 11px; }
.topbar-right .company-tag { font-size: 13px; }
.topbar-right .uname { font-size: 13px; }
.topbar-menu .menu-item { font-size: 13px; }
.tag { font-size: 11px; }
.stat-card .stat-num { font-size: 25px; }
.stat-card .stat-label { font-size: 12px; }
.detail-item { font-size: 13px; }
.report-btn .rpt-title { font-size: 16px; }
.report-btn .rpt-sub { font-size: 11px; }
.pagination .page-info, .pagination .page-btn { font-size: 12px; }
.log-tip, .log-count { font-size: 11px; }

/* ===== 取消标签彩色背景，保留字体颜色（v1.9 避免眼花） ===== */
.tag-red, .tag-orange, .tag-yellow, .tag-green, .tag-blue, .tag-gray {
  background: transparent;
}

/* v1.10.0 设施状态日期备注（状态列标签下方，仅 已过期/待维修/已报废 显示） */
.fac-status-note { margin-top: 4px; font-size: 12px; color: #757575; line-height: 1.4; }
.fac-status-note:empty { display: none; }

/* v1.10.0 汇总卡片 active 高亮（点击联动筛选态） */
.status-card.active { outline: 2px solid #C62828; box-shadow: 0 0 0 3px rgba(198,40,40,.12); border-color: #C62828; }
.status-card.active .status-num { color: #C62828; }

/* v1.10.0 设施页卡片容器（复用 stat-grid 即可，这里仅保证间距） */
.eq-status-cards { margin-bottom: 4px; }


/* ===== v2.0 瓶级点检增量：异常瓶角标 / 灭火瓶管理子区 / 瓶明细 ===== */
.bottle-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
  white-space: nowrap;
}
.bottle-badge.badge-ok  { background: #E8F5E9; color: #2E7D32; }
.bottle-badge.badge-bad { background: #FFEBEE; color: #C62828; }

/* v2.1: 逐瓶状态统一格式串色系（seg.cls，与后端 bottle-status.js formatBottleStatusLine 一一对应） */
.bs-line  { font-size: 12px; line-height: 1.7; color: #424242; margin: 4px 0 2px; word-break: break-all; }
.bs-sep   { color: #bdbdbd; margin: 0 1px; }
.bs-inspect { color: #FF9800; font-weight: 600; }  /* 待检修 橙 */
.bs-replace { color: #F44336; font-weight: 600; }  /* 待更换 红 */
.bs-expired { color: #B71C1C; font-weight: 700; }  /* 已过期 / 已报废 深红 */
.bs-normal  { color: #9e9e9e; font-weight: 400; }  /* 正常 灰 */

/* v2.2.1 瓶级状态改造 Phase C：逐瓶异常段在「设施状态」列内堆叠分行（整齐左对齐） */
.bs-stack { margin-top: 4px; }
.bs-stack .bs-seg { display: block; line-height: 1.7; }

/* v3.1.7: 设施状态栏逐瓶行（第X瓶 + 状态，多瓶逐瓶独立） */
.bs-stack .bs-seg .bs-no { color: #9e9e9e; margin-right: 4px; }
.bs-stack .bs-seg .bottle-tag-sm { padding: 1px 6px; font-size: 11px; line-height: 1.6; }

.bottle-mgr { margin-top: 16px; padding: 12px 14px; background: #FAFAFA; border: 1px dashed #E0E0E0; border-radius: 10px; }
.bottle-mgr-head { display: flex; align-items: center; gap: 10px; }
.bottle-mgr-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; }

.bottle-detail { margin-top: 20px; }

.bottle-table th { white-space: nowrap; }
.bottle-table td { vertical-align: middle; }
.bottle-table .row-del { opacity: .45; background: #FFF8F8; text-decoration: line-through; }

.input-sm { padding: 4px 8px !important; font-size: 12px !important; border-radius: 6px !important; }
.select-sm { padding: 4px 8px !important; font-size: 12px !important; border-radius: 6px !important; }

/* 详情弹窗瓶明细：剩余天数/状态 tag 紧凑展示 */
.bottle-table .tag { font-size: 11px; }

/* ==================== v3.1：消息铃铛 / 看板工具栏 / 环比 / SLA / 消息面板 ==================== */
.msg-bell { position: relative; cursor: pointer; padding: 6px 10px; border-radius: 8px; transition: background .2s; }
.msg-bell:hover { background: rgba(255,255,255,.15); }
.msg-bell .mi svg { width: 20px; height: 20px; color: #fff; }
.msg-badge { position: absolute; top: -4px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #FF5252; color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.msg-inline-badge { font-style: normal; margin-left: 8px; font-size: 12px; color: #fff; background: #FF5252; border-radius: 10px; padding: 1px 8px; vertical-align: middle; }
.msg-item { padding: 10px 8px; border-bottom: 1px dashed #EEE; cursor: pointer; border-radius: 8px; }
.msg-item:hover { background: #F5F5F5; }
.msg-item.unread { background: #FFF3E0; }
.msg-item-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.msg-item-title b { font-size: 13px; color: #37474F; }
.msg-item-time { font-size: 11px; color: #9E9E9E; white-space: nowrap; }
.msg-item-content { font-size: 12px; color: #757575; margin-top: 4px; line-height: 1.6; }

.dash-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: #fff; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.dash-month { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #555; }
.dash-month select { min-width: 110px; }
.dash-month-label { color: #B71C1C; font-weight: 700; }
.dash-actions { display: flex; gap: 8px; }
.btn-warn { background: #FFF3E0; color: #E65100; border: 1px solid #FFCC80; }
.btn-warn:hover { background: #FFE0B2; }

.cmp { font-style: normal; font-size: 11px; margin-left: 4px; }
.cmp-up { color: #D32F2F; }
.cmp-down { color: #2E7D32; }

.sla-badge { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 8px; background: #D32F2F; color: #fff; font-size: 10px; font-weight: 700; vertical-align: middle; }
.row-sla-overdue td { background: #FFF0F0 !important; }
