* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f6fa;
  color: #2c3e50;
  font-size: 14px;
}
.hidden { display: none !important; }

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4f6ef7 0%, #6c4ff7 100%);
}
.login-card {
  background: #fff;
  padding: 40px 36px;
  border-radius: 12px;
  width: 360px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.login-card h1 { font-size: 22px; text-align: center; }
.login-card .sub { text-align: center; color: #8a94a6; margin: 8px 0 24px; }
.login-card input {
  width: 100%;
  margin-bottom: 14px;
}

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px;
  background: #1e2a3a;
  color: #cfd8e3;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.logo { padding: 22px 20px; font-size: 16px; font-weight: 600; color: #fff; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar nav { flex: 1; padding-top: 12px; }
.nav-item {
  display: block;
  padding: 12px 20px;
  cursor: pointer;
  color: #cfd8e3;
  text-decoration: none;
  transition: background 0.15s;
}
.nav-item:hover { background: rgba(255,255,255,0.06); }
.nav-item.active { background: #4f6ef7; color: #fff; }
.sidebar-footer { padding: 16px 20px; font-size: 12px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-footer a { color: #8fb0ff; cursor: pointer; }
#current-user { margin-bottom: 8px; color: #fff; }

.content { flex: 1; padding: 28px 32px; overflow: auto; }
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.page-head h2 { font-size: 20px; }
.row { display: flex; gap: 8px; }

/* ---------- 表格 ---------- */
.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.table th, .table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #eef1f6;
  word-break: break-all;
}
.table th { background: #f8f9fc; font-weight: 600; color: #5a6b82; white-space: nowrap; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #f9fbff; }

.empty { text-align: center; color: #8a94a6; padding: 40px 0; }

/* ---------- 按钮 / 输入框 ---------- */
.btn {
  padding: 8px 16px;
  border: 1px solid #d8dee8;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #2c3e50;
  transition: all 0.15s;
}
.btn:hover { border-color: #4f6ef7; color: #4f6ef7; }
.btn.primary { background: #4f6ef7; border-color: #4f6ef7; color: #fff; }
.btn.primary:hover { background: #3d5cf0; }
.btn.danger { color: #e74c3c; border-color: #f2c7c2; }
.btn.danger:hover { background: #fdf0ee; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

input:not([type="checkbox"]), select {
  padding: 9px 12px;
  border: 1px solid #d8dee8;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}
input:focus { border-color: #4f6ef7; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 50, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal {
  background: #fff;
  border-radius: 12px;
  padding: 26px 28px;
  width: 440px;
  max-height: 86vh;
  overflow: auto;
}
.modal h3 { margin-bottom: 18px; font-size: 17px; }
.modal label { display: block; margin: 12px 0 6px; color: #5a6b82; font-size: 13px; }
.modal input:not([type="checkbox"]) { width: 100%; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.perm-row { display: flex; gap: 16px; margin-top: 4px; }
.check { display: flex !important; align-items: center; gap: 5px; margin: 0 !important; cursor: pointer; color: #2c3e50 !important; }

/* ---------- 使用文档页 ---------- */
.docs { max-width: 960px; line-height: 1.75; color: #2c3e50; }
.docs-intro { background: #f0f7ff; border: 1px solid #d5e6fb; border-radius: 10px; padding: 12px 16px; color: #34506e; }
.docs-toc { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 8px; padding: 10px 14px; background: #fafbfc; border: 1px solid #e2e8f0; border-radius: 10px; }
.docs-toc-title { color: #8595a8; font-size: 13px; margin-right: 4px; }
.docs-toc a { color: #2f7bd6; cursor: pointer; font-size: 14px; text-decoration: none; }
.docs-toc a:hover { text-decoration: underline; }
.docs-h { margin: 30px 0 10px; padding-bottom: 8px; border-bottom: 2px solid #eef1f5; font-size: 20px; color: #1f2d3d; scroll-margin-top: 12px; }
.docs-h4 { margin: 20px 0 8px; font-size: 15px; color: #2f4763; }
.docs p { margin: 8px 0; }
.docs-ul, .docs-ol { margin: 8px 0 8px 4px; padding-left: 22px; }
.docs-ul li, .docs-ol li { margin: 6px 0; }
.docs-note { background: #fffdf5; border: 1px solid #f2e6bd; border-radius: 8px; padding: 10px 14px; color: #6b5b1f; font-size: 13.5px; }
.docs code { background: #f2f4f7; border: 1px solid #e2e8f0; border-radius: 4px; padding: 1px 6px; font-size: 12.5px; color: #b5335a; }
.docs-table { margin: 10px 0 4px; }
.docs-table th { background: #f7f9fb; white-space: nowrap; }
.docs-table td { vertical-align: top; }
.docs-table td.ok { color: #1e9e55; font-weight: 600; }
.docs-table td.bad { color: #d64545; font-weight: 600; }

/* ---------- Webhook 频道订阅块（多频道 + A/B 单列方向开关） ---------- */
.wh-sub { border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 14px; margin-top: 10px; background: #fafbfc; }
.wh-sub-head { display: flex; align-items: center; gap: 10px; }
.wh-sub-head select { flex: 1; }
.wh-sub-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; }
.wh-sub-presets .btn { padding: 3px 9px; font-size: 12px; }
.wh-state-head { display: grid; grid-template-columns: 1fr 64px 64px; gap: 4px 8px; align-items: center; padding: 0 2px 4px; color: #8595a8; font-size: 12px; border-bottom: 1px dashed #e2e8f0; }
.wh-state-head span:nth-child(2), .wh-state-head span:nth-child(3) { text-align: center; }
.wh-state-grid { display: grid; grid-template-columns: 1fr 64px 64px; gap: 4px 8px; align-items: center; max-height: 240px; overflow: auto; padding: 6px 2px 2px; }
.wh-state-grid .wh-state-name { font-size: 13px; color: #2c3e50; }
.wh-state-grid .wh-state-name small { color: #8595a8; }
.wh-state-grid input[type="checkbox"] { margin: 0 auto; display: block; }

.error { color: #e74c3c; margin-top: 10px; min-height: 18px; font-size: 13px; }

/* ---------- 删除二次确认弹窗 ---------- */
.modal-mask { animation: mask-in 0.18s ease; backdrop-filter: blur(3px); }
@keyframes mask-in { from { opacity: 0; } to { opacity: 1; } }

.confirm-modal {
  width: 420px;
  text-align: center;
  padding: 34px 32px 28px;
  animation: pop-in 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
}
@keyframes pop-in {
  from { opacity: 0; transform: scale(0.88) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.confirm-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #ff7a6b 0%, #e74c3c 100%);
  box-shadow: 0 8px 24px rgba(231, 76, 60, 0.35);
}

.confirm-title { font-size: 19px; margin-bottom: 10px; color: #1e2a3a; }
.confirm-msg { color: #5a6b82; font-size: 13.5px; line-height: 1.7; white-space: pre-line; }

.confirm-target {
  margin: 16px auto 4px;
  display: inline-block;
  max-width: 100%;
  padding: 7px 18px;
  border-radius: 8px;
  background: #fdf0ee;
  border: 1px dashed #f0b4ac;
  color: #c0392b;
  font-weight: 600;
  font-size: 14px;
  word-break: break-all;
  user-select: all;
}

.confirm-label { color: #8a94a6; font-size: 12.5px; margin: 14px 0 8px; }

#confirm-input {
  width: 100%;
  text-align: center;
  font-size: 15px;
  padding: 11px 12px;
  border: 1.5px solid #d8dee8;
  border-radius: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#confirm-input:focus { border-color: #e74c3c; box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.12); }
#confirm-input.matched { border-color: #16a05d; box-shadow: 0 0 0 3px rgba(22, 160, 93, 0.12); }

.confirm-actions { display: flex; gap: 12px; margin-top: 22px; }
.confirm-btn { flex: 1; padding: 11px 0; font-size: 14px; border-radius: 8px; }

.btn.danger-solid {
  background: linear-gradient(135deg, #ff7a6b 0%, #e74c3c 100%);
  border: none;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(231, 76, 60, 0.3);
  transition: all 0.15s;
}
.btn.danger-solid:hover:not(:disabled) { filter: brightness(1.06); color: #fff; }
.btn.danger-solid:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

/* ---------- 消息提示弹窗 ---------- */
.notice-modal {
  width: 380px;
  text-align: center;
  padding: 32px 30px 26px;
  animation: pop-in 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.notice-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.notice-icon.success { background: linear-gradient(135deg, #3ddc85 0%, #16a05d 100%); box-shadow: 0 8px 24px rgba(22, 160, 93, 0.35); }
.notice-icon.error   { background: linear-gradient(135deg, #ff7a6b 0%, #e74c3c 100%); box-shadow: 0 8px 24px rgba(231, 76, 60, 0.35); }
.notice-icon.info    { background: linear-gradient(135deg, #7a95ff 0%, #4f6ef7 100%); box-shadow: 0 8px 24px rgba(79, 110, 247, 0.35); }

.notice-msg { color: #3d4c60; font-size: 14.5px; line-height: 1.8; white-space: pre-line; word-break: break-word; }

.notice-ok {
  margin-top: 22px;
  min-width: 140px;
  padding: 11px 30px;
  font-size: 14px;
  border-radius: 8px;
}
.notice-ok.success-btn { background: linear-gradient(135deg, #3ddc85 0%, #16a05d 100%); box-shadow: 0 4px 14px rgba(22, 160, 93, 0.3); }
.notice-ok.info-btn    { background: linear-gradient(135deg, #7a95ff 0%, #4f6ef7 100%); box-shadow: 0 4px 14px rgba(79, 110, 247, 0.3); }
.hint { color: #8a94a6; font-weight: normal; }

/* ---------- 状态徽标 ---------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  white-space: nowrap;
}
.badge.green { background: #e6f7ee; color: #16a05d; }
.badge.orange { background: #fff4e5; color: #e58e0a; }
.badge.red { background: #fdeceb; color: #e74c3c; }
.badge.blue { background: #eaf0ff; color: #4f6ef7; }
.badge.gray { background: #f0f2f6; color: #7c8797; }

.pager { display: flex; align-items: center; gap: 14px; justify-content: flex-end; margin-top: 16px; }

/* ---------- App 管理筛选栏 ---------- */
.filter-bar { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-item { display: flex; flex-direction: column; gap: 6px; }
.filter-label { font-size: 13px; color: #5a6b82; }
.filter-sub { font-size: 11px; color: #a0aab8; }

/* 快捷时间范围胶囊按钮（高度与输入框对齐） */
.preset-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip {
  padding: 9px 16px;
  font-size: 14px;
  line-height: 1.2;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  background: #f5f7fb;
  color: #5a6b82;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.chip:hover { border-color: #4f6ef7; color: #4f6ef7; }
.chip.active { background: #4f6ef7; border-color: #4f6ef7; color: #fff; }
.filter-dropdown { position: relative; }
.filter-toggle { min-width: 140px; text-align: left; display: flex; align-items: center; justify-content: space-between; }
.filter-toggle::after { content: "▾"; margin-left: 8px; color: #8a94a6; }
.filter-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 20;
  min-width: 200px;
  max-height: 300px;
  overflow: auto;
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(20, 30, 50, 0.14);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.filter-check { padding: 6px 8px; border-radius: 6px; font-size: 13px; }
.filter-check:hover { background: #f5f6fa; }
.filter-empty { color: #8a94a6; font-size: 13px; padding: 10px; text-align: center; }

/* App 管理批量操作栏（选中后浮现的上下文工具条） */
.bulk-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 10px 14px; background: #eef2ff; border: 1px solid #d5ddff; border-radius: 8px; }
.bulk-bar .hint { color: #4f6ef7; font-weight: 600; }
#appmgmt-clear-sel { margin-left: auto; }

/* 批量操作分组下拉菜单 */
.action-dropdown { position: relative; }
.action-toggle::after { content: "▾"; margin-left: 6px; opacity: 0.85; }
.action-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 30;
  min-width: 168px;
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(20, 30, 50, 0.16);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.action-item {
  text-align: left;
  padding: 8px 10px;
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #2c3e50;
}
.action-item:hover { background: #f5f6fa; }
.action-item.danger { color: #e74c3c; }
.action-item.danger:hover { background: #fdf0ee; }
/* 刷新入库下拉：右对齐避免溢出页面右缘，稍宽以容纳描述 */
.refresh-menu { left: auto; right: 0; min-width: 228px; }
.menu-group-label {
  padding: 6px 10px 2px;
  font-size: 11px;
  color: #9aa4b2;
  font-weight: 600;
}
/* 按状态刷新：可勾选的状态清单（内嵌于刷新下拉菜单） */
.refresh-state-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 6px;
  padding: 2px 2px 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid #eef0f4;
}
/* 状态过多时的空/错误提示占满整行 */
.refresh-state-list .filter-empty { grid-column: 1 / -1; }
.refresh-state-go { color: #4f6ef7; font-weight: 600; }
.refresh-state-go:hover { background: #eef2ff; }

/* 日志「用户 / 来源」列：非常规用户（系统/定时/未登录）来源标识 */
.log-source { color: #8a94a6; font-size: 13px; white-space: nowrap; }

a.link { color: #4f6ef7; text-decoration: none; }
a.link:hover { text-decoration: underline; }

/* ---------- 全局配置 ---------- */
.settings-body {
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
/* 瀑布流（Masonry）布局：用多列 + break-inside 避免卡片被拆分，
   使不同高度的配置卡片按列自适应紧凑排布，无固定行对齐的空白。 */
.settings-modules {
  column-count: 2;
  column-gap: 20px;
}
@media (max-width: 900px) {
  .settings-modules { column-count: 1; }
}
.settings-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  padding: 22px 24px;
  min-width: 0;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin-bottom: 20px;
}
.settings-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.settings-title { font-size: 15px; font-weight: 600; color: #1e2a3a; }
.settings-desc { color: #8a94a6; font-size: 13px; line-height: 1.7; margin-top: 6px; }
.settings-detail { margin-top: 18px; padding-top: 18px; border-top: 1px solid #eef1f6; transition: opacity 0.15s; }
.settings-detail label { display: block; margin: 12px 0 6px; color: #5a6b82; font-size: 13px; }
.settings-detail label:first-child { margin-top: 0; }
.settings-detail.disabled { opacity: 0.45; pointer-events: none; }
.settings-actions { display: flex; justify-content: flex-end; }

/* 开关 */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: #d8dee8; border-radius: 26px; transition: background 0.2s;
}
.switch-slider::before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.switch input:checked + .switch-slider { background: #4f6ef7; }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

/* 轻量 Toast 提示（非阻塞，右下角堆叠，自动消失） */
#toast-container {
  position: fixed; right: 24px; bottom: 24px; z-index: 9999;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  pointer-events: none;
}
.toast {
  max-width: 360px; padding: 12px 16px; border-radius: 10px;
  color: #fff; font-size: 14px; line-height: 1.5; background: #334155;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18); pointer-events: auto; cursor: pointer;
  opacity: 0; transform: translateY(12px); transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: #16a34a; }
.toast.error { background: #dc2626; }
.toast.info { background: #4f6ef7; }

/* ---------- 统一数据报表 ---------- */
.page-head-actions { display: flex; gap: 8px; align-items: center; }
/* 报表筛选栏内的操作按钮：靠右、与输入框底部对齐、保持水平一行 */
.reports-filter-actions { display: flex; gap: 8px; align-items: center; }

/* 三步式分区：① 筛选 App → ② 选择 App → ③ 统计区间 */
.reports-step { margin-bottom: 16px; }
.reports-step .filter-bar { margin-bottom: 0; }
.reports-panel-head h3 { display: flex; align-items: center; gap: 8px; }
.step-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: #4f6ef7; color: #fff; font-size: 12px; font-weight: 700;
}

/* 「按 App」模式：账号搜索框 + App 多选列表 */
.reports-account-search { margin-bottom: 6px; }
.reports-app-picker-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.reports-app-selectall { font-size: 13px; color: #5a6b82; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.reports-app-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px;
}
.reports-app-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px;
  background: #f8fafc; cursor: pointer; font-size: 13px;
}
.reports-app-item:hover { border-color: #4f6ef7; }
.reports-app-item input { margin-top: 2px; }
.reports-app-item .rai-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.reports-app-item .rai-name { font-weight: 600; color: #1f2937; word-break: break-word; }
.reports-app-item .rai-sub { color: #8a94a6; font-size: 12px; word-break: break-word; }
.reports-app-item .rai-state {
  align-self: flex-start; font-size: 11px; padding: 1px 6px; border-radius: 4px;
  background: #eef2ff; color: #4338ca; margin-top: 2px;
}
.reports-note { margin: -8px 0 16px; line-height: 1.6; }
.reports-note code {
  background: #eef2ff; color: #4338ca; padding: 1px 6px; border-radius: 4px; font-size: 12px;
}
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}
.kpi-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #eef1f6;
}
.kpi-card.accent { border-color: #c7d2fe; background: linear-gradient(180deg, #f8faff 0%, #fff 100%); }
.kpi-card.warn { border-color: #fde68a; background: linear-gradient(180deg, #fffbeb 0%, #fff 100%); }
.kpi-card.muted { opacity: 0.92; }
.kpi-label { font-size: 13px; color: #5a6b82; font-weight: 600; }
.kpi-sub {
  display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 500;
  color: #4f6ef7; background: #eef2ff; padding: 1px 6px; border-radius: 999px;
}
.kpi-card.warn .kpi-sub { color: #b45309; background: #fef3c7; }
.kpi-value { font-size: 28px; font-weight: 700; color: #1e2a3a; margin: 8px 0 4px; letter-spacing: -0.02em; }
.kpi-hint { font-size: 12px; color: #8a94a6; }
.reports-panels {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  margin-top: 8px;
}
.reports-panel {
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #eef1f6;
}
.reports-panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 8px; gap: 12px;
}
.reports-panel-head h3 { font-size: 15px; margin: 0; }
.table th.num, .table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.device-bars { margin: 8px 4px 12px; display: flex; flex-direction: column; gap: 8px; }
.device-bar-row { display: grid; grid-template-columns: 88px 1fr 64px; gap: 10px; align-items: center; }
.device-bar-label { font-size: 13px; color: #5a6b82; }
.device-bar-track { height: 8px; background: #eef1f6; border-radius: 999px; overflow: hidden; }
.device-bar-fill { height: 100%; background: #4f6ef7; border-radius: 999px; }
.device-bar-val { font-size: 12px; color: #5a6b82; text-align: right; font-variant-numeric: tabular-nums; }
.trend-chart {
  display: flex; align-items: flex-end; gap: 4px; height: 120px;
  padding: 8px 4px 0; margin-bottom: 12px; overflow-x: auto;
}
.trend-col {
  flex: 1 0 18px; min-width: 18px; max-width: 36px; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px;
}
.trend-bar {
  width: 70%; background: linear-gradient(180deg, #6b85f8, #4f6ef7);
  border-radius: 4px 4px 2px 2px; min-height: 2px;
}
.trend-label { font-size: 10px; color: #8a94a6; transform: rotate(-45deg); transform-origin: top left; height: 14px; white-space: nowrap; }
@media (max-width: 1100px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .reports-panels { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .kpi-row { grid-template-columns: 1fr; }
}
