/* ==========================================================================
   应急/三防责任区动态检查管理系统 - 全局样式（含移动端 H5 适配）
   ========================================================================== */
:root {
  --primary: #409eff;
  --success: #67c23a;
  --warning: #e6a23c;
  --danger: #f56c6c;
  --orange: #fd7e14;
  --text: #303133;
  --text-sub: #606266;
  --muted: #909399;
  --border: #ebeef5;
  --bg: #f5f7fa;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6;
}
a { color: var(--primary); cursor: pointer; text-decoration: none; }
a:hover { opacity: .8; }
code { background: #f4f4f5; padding: 1px 5px; border-radius: 3px; font-size: 12px; }
h1, h2, h3 { margin: 0 0 10px; }
h2 { font-size: 20px; }
h3 { font-size: 15px; }
textarea { width: 100%; border: 1px solid #dcdfe6; border-radius: 6px; padding: 8px; font-family: inherit; font-size: 14px; resize: vertical; }

/* ---------------- 按钮 / 表单 ---------------- */
.sf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: 34px; padding: 0 14px; border: 1px solid #dcdfe6; border-radius: 6px;
  background: #fff; color: var(--text-sub); font-size: 14px; cursor: pointer; white-space: nowrap;
}
.sf-btn:hover { color: var(--primary); border-color: #c6e2ff; }
.sf-btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.sf-btn-primary:hover { background: #66b1ff; color: #fff; }
.sf-btn-block { width: 100%; height: 42px; }
.sf-btn-sm { height: 28px; padding: 0 10px; font-size: 13px; }
.sf-btn[disabled] { opacity: .6; cursor: not-allowed; }
.sf-input, .sf-field input, .sf-field select {
  width: 100%; height: 36px; border: 1px solid #dcdfe6; border-radius: 6px; padding: 0 10px;
  font-size: 14px; background: #fff; color: var(--text);
}
.sf-field { margin-bottom: 12px; }
.sf-field label { display: block; font-size: 13px; color: var(--text-sub); margin-bottom: 5px; }
.sf-field input[type="color"] { padding: 2px; height: 36px; }
.sf-field input[type="file"] { border: 0; padding: 0; height: auto; }
.sf-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }

/* ---------------- 布局 ---------------- */
.sf-layout { display: flex; min-height: 100vh; }
.sf-side { width: 210px; flex: 0 0 210px; background: #1f2d3d; color: #bfcbd9; padding: 14px 0; }
.sf-logo { padding: 4px 16px 14px; font-size: 15px; font-weight: 600; color: #fff; border-bottom: 1px solid #2c3e50; }
.sf-logo small { display: block; font-weight: 400; font-size: 11px; color: #8fa3b8; }
.sf-menu-group { padding: 12px 16px 4px; font-size: 12px; color: #8492a6; }
.sf-menu a { display: block; padding: 9px 16px; color: #bfcbd9; font-size: 14px; }
.sf-menu a:hover { background: #263445; color: #fff; opacity: 1; }
.sf-menu a.active { background: var(--primary); color: #fff; }
.sf-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sf-top {
  height: 54px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 16px;
}
.sf-top .sf-user { color: var(--text-sub); font-size: 13px; display: flex; align-items: center; gap: 10px; }
.sf-content { padding: 16px; }
.sf-page-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.sf-page-hd .sf-muted { font-size: 13px; font-weight: 400; }
.sf-card { background: #fff; border-radius: 8px; padding: 16px; box-shadow: 0 1px 4px rgba(0, 0, 0, .04); margin-bottom: 16px; }
.sf-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sf-muted { color: var(--muted); font-size: 13px; }

/* ---------------- 统计卡片 ---------------- */
.sf-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.sf-stat { background: #fff; border-radius: 8px; padding: 14px; text-align: center; box-shadow: 0 1px 4px rgba(0, 0, 0, .04); }
.sf-stat-num { font-size: 24px; font-weight: 600; color: var(--primary); }
.sf-stat-label { font-size: 12px; color: var(--muted); margin-top: 4px; }
.sf-c-green { color: var(--success); } .sf-c-yellow { color: var(--warning); }
.sf-c-red { color: var(--danger); } .sf-c-orange { color: var(--orange); }

/* ---------------- 表格 ---------------- */
.sf-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sf-table th, .sf-table td { border-bottom: 1px solid var(--border); padding: 9px 8px; text-align: left; vertical-align: middle; }
.sf-table th { background: #fafafa; color: var(--text-sub); font-weight: 600; white-space: nowrap; }
.sf-table tbody tr:hover { background: #fafcff; }
.sf-actions { white-space: nowrap; }
.sf-actions a { margin-right: 10px; font-size: 13px; }
.sf-danger { color: var(--danger); }
.sf-empty { text-align: center; color: var(--muted); padding: 22px 0 !important; }
.sf-ellipsis { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-row-active { background: #ecf5ff !important; }
.sf-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }

/* ---------------- 标签 ---------------- */
.sf-tag {
  display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px;
  background: #f4f4f5; color: var(--text-sub); white-space: nowrap;
}
.sf-tag-ok { background: #f0f9eb; color: var(--success); }
.sf-tag-danger { background: #fef0f0; color: var(--danger); }
.sf-tag-warn { background: #fdf6ec; color: var(--warning); }
.sf-tag-info { background: #f4f4f5; color: var(--muted); }
.sf-tag-primary { background: #ecf5ff; color: var(--primary); }
.sf-tag b { margin-left: 6px; cursor: pointer; }

/* ---------------- 提示 / 图例 ---------------- */
.sf-alert { padding: 9px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 12px; }
.sf-alert-info { background: #ecf5ff; color: #3a7bd5; }
.sf-alert-warn { background: #fdf6ec; color: #b88230; }
.sf-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 12px; font-size: 13px; color: var(--text-sub); }
.sf-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.sf-legend-item i { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }

/* ---------------- 地图 ---------------- */
/* 地图高度随视口自适应：桌面最大约 780px，可用「放大地图」展开到约 84vh 以看全目标区域 */
.sf-map { width: 100%; height: clamp(460px, 62vh, 780px); border-radius: 8px; overflow: hidden; background: #eef2f7; margin-bottom: 16px; position: relative; }
.sf-map-full { height: clamp(620px, 84vh, 1400px); }

/* ---------------- 弹窗 ---------------- */
.sf-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); display: flex; align-items: flex-start; justify-content: center; padding: 40px 12px; overflow: auto; z-index: 2000; }
.sf-modal { background: #fff; border-radius: 8px; width: 100%; }
.sf-modal-hd { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); font-weight: 600; }
.sf-modal-bd { padding: 16px 18px; max-height: 68vh; overflow: auto; }
.sf-modal-ft { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.sf-x { cursor: pointer; color: var(--muted); font-size: 20px; line-height: 1; }

/* ---------------- 分页 ---------------- */
.sf-pager { display: flex; align-items: center; gap: 10px; padding: 12px 0 2px; font-size: 13px; color: var(--muted); }

/* ---------------- 选择器 ---------------- */
.sf-picker { max-height: 190px; overflow: auto; border: 1px solid var(--border); border-radius: 6px; padding: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px; }
.sf-pick-item { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 3px 4px; border-radius: 4px; }
.sf-pick-item:hover { background: #f5f7fa; }
.sf-picked { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ---------------- 登录 / 注册 ---------------- */
.sf-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: linear-gradient(135deg, #1f2d3d, #2b5876); }
.sf-auth-card { background: #fff; border-radius: 12px; padding: 30px 26px; width: 100%; max-width: 420px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.sf-auth-card h1 { font-size: 19px; text-align: center; }
.sf-auth-sub { text-align: center; color: var(--muted); font-size: 12px; margin: 0 0 20px; }
.sf-auth-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 12px; }

/* ---------------- 填报项 ---------------- */
.sf-item-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sf-radio { display: flex; gap: 20px; padding: 6px 0; }
.sf-radio label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.sf-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sf-photo { position: relative; display: inline-block; width: 84px; }
.sf-photo img { width: 84px; height: 84px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.sf-photo b { position: absolute; top: -6px; right: -6px; background: var(--danger); color: #fff; border-radius: 50%; width: 18px; height: 18px; text-align: center; line-height: 18px; cursor: pointer; font-size: 12px; }
.sf-photo em { display: block; font-size: 10px; color: var(--muted); font-style: normal; text-align: center; }
.sf-footer-bar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--border); padding: 12px; display: flex; gap: 10px; margin: 0 -16px -16px; }

/* ---------------- 提示条 ---------------- */
.sf-toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 3000;
  padding: 10px 18px; border-radius: 6px; background: #303133; color: #fff; font-size: 14px; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.sf-toast.sf-toast-success { background: var(--success); }
.sf-toast.sf-toast-error { background: var(--danger); }
.sf-toast.sf-toast-info { background: #303133; }

/* ---------------- Tabs ---------------- */
.sf-tabs { display: flex; gap: 16px; }
.sf-tabs a { color: var(--text-sub); padding-bottom: 4px; }
.sf-tabs a.active { color: var(--primary); border-bottom: 2px solid var(--primary); }

/* ---------------- 移动端适配 ---------------- */
@media (max-width: 820px) {
  .sf-layout { flex-direction: column; }
  .sf-side { width: 100%; flex: none; padding: 10px 0; }
  .sf-menu { display: flex; flex-wrap: wrap; }
  .sf-menu-group { width: 100%; padding: 6px 12px 0; }
  .sf-menu a { padding: 8px 12px; font-size: 13px; }
  .sf-grid-2 { grid-template-columns: 1fr; }
  .sf-content { padding: 10px; }
  .sf-map { height: clamp(380px, 60vh, 640px); }
  .sf-map-full { height: 86vh; }
  .sf-table { display: block; overflow-x: auto; white-space: nowrap; }
  .sf-ellipsis { max-width: 160px; }
  .sf-picker { grid-template-columns: 1fr; }
}

/* ==========================================================================
   地图控件与标注（天地图 DivIcon 名称标注 / 工具条）
   ========================================================================== */
.sf-map-sm { height: clamp(320px, 46vh, 560px); }
.sf-map-ctl { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-sub); }
.sf-map-ctl select { height: 28px; border: 1px solid #dcdfe6; border-radius: 6px; padding: 0 6px; font-size: 13px; }
/* 自动着色提示（颜色由所属部门决定，不可手选） */
.sf-color-auto { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px;
  border: 1px dashed #dcdfe6; border-radius: 6px; background: #fafafa; font-size: 13px; color: var(--text-sub); }
.sf-color-auto .sf-dot { width: 12px; height: 12px; margin-right: 0; }
.sf-map-label {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  background: rgba(255, 255, 255, .93); border: 1px solid;
  font-size: 12px; line-height: 18px; white-space: nowrap;
  pointer-events: none; box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

/* ==========================================================================
   数据大屏（PC / 移动端自适应）
   ========================================================================== */
.sf-screen {
  background: radial-gradient(1200px 600px at 50% -10%, #14304d 0%, #0b1a2b 60%, #08121e 100%);
  color: #e8f2ff; border-radius: 10px; padding: 14px; min-height: calc(100vh - 130px);
}
.sf-screen:fullscreen { padding: 18px; border-radius: 0; }
/* 免登录独立大屏：锁定整页高度，禁止整页滚动（内容溢出只在面板内部滚动） */
html.sf-screen-html, body.sf-screen-page { height: 100%; overflow: hidden; }
body.sf-screen-page { background: #08121e; }
body.sf-screen-page #app { height: 100%; }
.sf-screen-hd {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid rgba(64, 158, 255, .25);
}
.sf-screen-title {
  font-size: 20px; font-weight: 700; letter-spacing: 1px;
  background: linear-gradient(90deg, #7fd0ff, #40a9ff); -webkit-background-clip: text;
  background-clip: text; color: transparent;
}
.sf-screen-sub { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #9fb6cd; }
.sf-screen-dot { width: 5px; height: 5px; border-radius: 50%; background: #40a9ff; display: inline-block; }
.sf-screen-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sf-screen .sf-btn { background: rgba(64, 158, 255, .12); border-color: rgba(64, 158, 255, .45); color: #cfe6ff; }
.sf-screen .sf-btn:hover { background: rgba(64, 158, 255, .25); color: #fff; }
.sf-screen-kpi { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.sf-kpi {
  background: linear-gradient(180deg, rgba(64, 158, 255, .14), rgba(64, 158, 255, .04));
  border: 1px solid rgba(64, 158, 255, .22); border-radius: 8px; padding: 10px 12px;
}
.sf-kpi-num { font-size: 26px; font-weight: 700; line-height: 1.15; }
.sf-kpi-num small { font-size: 14px; margin-left: 2px; }
.sf-kpi-label { font-size: 12px; color: #9fb6cd; margin-top: 2px; }
.sf-screen-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sf-panel { background: rgba(255, 255, 255, .03); border: 1px solid rgba(64, 158, 255, .18); border-radius: 8px; padding: 12px; }
.sf-panel h3 { color: #cfe6ff; font-size: 14px; margin-bottom: 8px; }
.sf-panel-wide { grid-column: span 2; }
.sf-screen-table { max-height: 290px; overflow: auto; }
.sf-screen .sf-table, .sf-screen .sf-table th, .sf-screen .sf-table td { color: #e8f2ff; }
.sf-screen .sf-table th { background: rgba(64, 158, 255, .10); border-bottom: 1px solid rgba(64, 158, 255, .22); }
.sf-screen .sf-table td { border-bottom: 1px solid rgba(255, 255, 255, .07); }
.sf-screen .sf-table tbody tr:hover { background: rgba(64, 158, 255, .08); }
.sf-screen .sf-muted, .sf-screen .sf-empty { color: #8ea6bd; }
.sf-screen a { color: #7fd0ff; }
/* 选中/悬停对象的信息卡（名称 / 责任单位 / 面积或长度）——由 DOM 绘制，不依赖地图标注能力 */
.sf-map-tip {
  position: absolute; z-index: 700; display: none; pointer-events: none;
  min-width: 130px; max-width: 320px; padding: 6px 10px;
  background: rgba(8, 18, 30, .92); color: #eaf4ff;
  border: 1px solid rgba(64, 158, 255, .55); border-radius: 6px;
  font-size: 12px; line-height: 1.65; white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}
.sf-map-tip b { display: block; font-size: 13px; margin-bottom: 2px; color: #ffffff; }
.sf-map-tip .k { color: #8ea6bd; }

/* ==========================================================================
   大屏"一屏全展示"布局（整页不滚动；内容过多的面板内部滚动）
   用法：.sf-screen.sf-screen-fit > [头部] + .sf-fit-kpi? + .sf-fit-body + .sf-fit-bottom?
   行：头部(auto) / KPI(auto) / 主体(1fr) / 底部(0.34fr)
   ========================================================================== */
.sf-screen-fit {
  height: 100vh;
  height: 100dvh;
  min-height: 0; overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) minmax(0, 0.34fr);
  gap: 8px; padding: 8px 10px;
}
.sf-screen-fit.sf-screen-fit-admin { height: calc(100vh - 118px); height: calc(100dvh - 118px); }
.sf-screen-fit .sf-screen-hd { padding-bottom: 6px; margin-bottom: 0; }
.sf-screen-fit .sf-screen-title { font-size: 17px; }
/* KPI 横向条：自适应任意卡片数量，单行铺满、不换行 */
.sf-fit-kpi { display: flex; gap: 6px; min-width: 0; }
.sf-fit-kpi .sf-kpi { flex: 1 1 0; min-width: 0; padding: 5px 8px; }
.sf-fit-kpi .sf-kpi-num { font-size: 18px; white-space: nowrap; }
.sf-fit-kpi .sf-kpi-label { font-size: 11px; margin-top: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 主体：左（地图/图表区） + 右列 */
.sf-fit-body { min-height: 0; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 8px; }
.sf-fit-body.sf-fit-body-3 { grid-template-columns: 180px minmax(0, 1fr) 330px; }
.sf-fit-body.sf-fit-body-2 { grid-template-columns: minmax(0, 1fr) 340px; }
/* 底部：异常清单 + 图表 */
.sf-fit-bottom { min-height: 0; min-width: 0; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.sf-fit-col { display: grid; grid-auto-rows: minmax(0, 1fr); gap: 8px; min-height: 0; min-width: 0; overflow: hidden; }
.sf-fit-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 8px; min-height: 0; }
.sf-screen-fit .sf-panel { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; padding: 6px 10px 8px; }
.sf-screen-fit .sf-panel h3 { flex: 0 0 auto; font-size: 13px; margin-bottom: 4px; }
/* 面板标题行（左标题 + 右工具） */
.sf-panel-hd { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.sf-panel-hd h3 { margin-bottom: 0; }
.sf-panel-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sf-layer-chk { display: inline-flex; align-items: center; gap: 3px; cursor: pointer; color: #cfe6ff; user-select: none; }
.sf-layer-chk input { margin: 0; cursor: pointer; }
.sf-panel-body { flex: 1 1 auto; min-height: 0; min-width: 0; }
.sf-scroll { overflow: auto; }
.sf-map-wrap { display: flex; flex: 1 1 auto; min-height: 0; position: relative; }
/* 大屏内的地图填满容器（覆盖默认 clamp 高度） */
.sf-map-wrap .sf-map { height: 100%; margin-bottom: 0; flex: 1 1 auto; }

@media (max-width: 1500px) {
  .sf-fit-body { grid-template-columns: minmax(0, 1fr) minmax(0, 320px); }
  .sf-fit-body.sf-fit-body-3 { grid-template-columns: 165px minmax(0, 1fr) 300px; }
}
@media (max-width: 1100px) {
  /* 平板 / 移动端：解除"一屏锁定"，改为单列纵向滚动 */
  .sf-screen-fit { height: auto; overflow: visible; grid-template-rows: none; }
  .sf-fit-body, .sf-fit-body.sf-fit-body-2, .sf-fit-body.sf-fit-body-3 { grid-template-columns: 1fr; }
  .sf-fit-bottom { grid-template-columns: 1fr; }
  .sf-fit-col, .sf-fit-charts { overflow: visible; grid-auto-rows: auto; }
  .sf-fit-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, 220px); }
  .sf-fit-col .sf-panel { min-height: 230px; }
  .sf-panel-body { height: 230px; }
  .sf-map-wrap .sf-map { height: 60vh; }
}
.sf-row-danger { background: rgba(255, 107, 107, .14) !important; }

/* ---------------- 免登录独立大屏：中心地图 + 角落图例 ---------------- */
.sf-screen-body { display: grid; grid-template-columns: 210px minmax(0, 1fr) 320px; gap: 12px; margin-bottom: 12px; align-items: start; }
.sf-screen-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sf-panel-map { padding: 10px 12px 12px; }
.sf-map-wrap { position: relative; }
.sf-screen-map { margin-bottom: 0; }
.sf-map-wrap .sf-map { margin-bottom: 0; }
.sf-map-legend {
  position: absolute; right: 10px; bottom: 10px; z-index: 600;
  background: rgba(8, 18, 30, .84); border: 1px solid rgba(64, 158, 255, .38);
  border-radius: 8px; padding: 8px 10px; max-width: 48%; max-height: 46%; overflow: auto;
  backdrop-filter: blur(2px);
}
.sf-map-legend h4 { margin: 0 0 6px; font-size: 12px; color: #cfe6ff; font-weight: 600; }
.sf-map-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #dbe9f8; line-height: 1.8; white-space: nowrap; }
.sf-map-legend-item i { width: 12px; height: 12px; border-radius: 2px; display: inline-block; flex: none; border: 1px solid rgba(255, 255, 255, .25); }
.sf-map-legend-item .sf-muted { color: #8ea6bd; }
@media (max-width: 1400px) {
  .sf-screen-body { grid-template-columns: 180px minmax(0, 1fr) 280px; }
}
@media (max-width: 1200px) {
  .sf-screen-body { grid-template-columns: 1fr; }
  .sf-screen-col { flex-direction: row; flex-wrap: wrap; }
  .sf-screen-col > * { flex: 1 1 260px; }
  .sf-kpi { flex: 1 1 140px; }
}

@media (max-width: 1200px) {
  .sf-screen-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sf-screen-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .sf-screen { padding: 10px; min-height: auto; border-radius: 8px; }
  .sf-screen-title { font-size: 15px; }
  .sf-screen-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .sf-kpi { padding: 8px 10px; }
  .sf-kpi-num { font-size: 20px; }
  .sf-screen-grid { grid-template-columns: 1fr; }
  .sf-panel-wide { grid-column: auto; }
  .sf-screen-actions { width: 100%; }
  .sf-screen-table { max-height: 240px; }
}
