/* ============================================================
   恒丰全屋定制管理系统 · 自适应布局层（V554 · 2026-10-07）
   老宋点名：根据显示器屏幕尺寸自动适配布局与元素尺寸，做真正的响应式设计，
   确保不同分辨率/设备下均正确显示、合理排布、保持可用性。
   设计原则：
     1) 以 1440–1919px 桌面为「基准区间」，该区间零改动（和你现在看到的一模一样）；
     2) 区间外按宽度缩放：小屏收紧、大屏放大；
     3) 大屏（≥1920，含常见 1080p 大显示器 / 2K）整体放大一档 —— 解决「大屏内容显小」；
     4) 弹窗标题栏（.modal-header）单独收窄（老宋点名"变窄一些"）—— 上下内边距 16-20px -> 10px；
     5) 仅改本叠加层 CSS，不触碰 120KB 主样式 / 功能 / 配色 / 数据；可逆。
   ============================================================ */

/* —— ① 桌面端通用：宽表格横向滚动 + 弹窗标题栏收窄（老宋点名"变窄一些"） —— */
@media (min-width:768px){
  /* 原桌面 .table-scroll 为 overflow-x:hidden，多列表格在窄屏会被横向裁掉列。
     改为 auto：内容超出时才出现横向滚动条，正常宽度下无滚动条、外观不变。 */
  .table-scroll{ overflow-x:auto !important; }
  /* 弹窗标题栏（会计管理/各种弹窗顶部蓝条）变窄：上下内边距 16-20px -> 10px
     左右内边距、圆角、渐变底色、标题字号、关闭按钮全部不变 */
  .modal-header{ padding-top:10px !important; padding-bottom:10px !important; }
}

/* —— ② 小屏 / 中屏 ≤1439px（小笔记本、平板横屏）：收紧内边距与间距，防止过挤 —— */
@media (max-width:1439px){
  .main-content{ padding:24px 26px !important; }
  .section-card{ padding:18px 18px !important; margin-bottom:14px !important; }
  .section-card .card-header{ margin-bottom:12px !important; padding-bottom:10px !important; }
  .stats-grid{ gap:12px !important; margin-bottom:20px !important; }
  .quick-actions{ gap:8px !important; margin-bottom:20px !important; }
  .page-title{ font-size:20px !important; }
  .data-table{ font-size:13px !important; }
  .data-table td,.data-table th{ padding:8px 10px !important; }
}

/* —— ③ 大屏 ≥1920px（常见 1080p 大显示器 / 2K）：整体放大一档，避免内容显小、四周空 —— */
@media (min-width:1920px) and (max-width:2559px){
  html{ font-size:17px !important; }
  body{ font-size:17px !important; }
  .sidebar{ width:288px !important; }
  .main-content{ margin-left:288px !important; padding:36px 44px !important; }
  .section-card{ padding:24px 26px !important; margin-bottom:20px !important; }
  .section-card .card-header{ margin-bottom:16px !important; padding-bottom:14px !important; }
  .stats-grid{ gap:18px !important; margin-bottom:28px !important; }
  .quick-actions{ gap:12px !important; margin-bottom:28px !important; }
  .page-title{ font-size:26px !important; }
  .stat-card .stat-value{ font-size:34px !important; }
  .data-table{ font-size:15px !important; }
  .data-table td,.data-table th{ padding:12px 14px !important; }
  .btn{ font-size:15px !important; padding:10px 18px !important; }
}

/* —— ④ 超大屏 ≥2560px（4K）：再放大一档并限宽居中，防无限拉伸 —— */
@media (min-width:2560px){
  html{ font-size:18px !important; }
  body{ font-size:18px !important; }
  .sidebar{ width:300px !important; }
  .main-content{ margin-left:300px !important; padding-left:max(60px,(100% - 1900px)/2) !important; padding-right:max(60px,(100% - 1900px)/2) !important; }
  .page-header,.section-card,.stats-grid{ max-width:1900px; margin-left:auto; margin-right:auto; }
  .section-card{ padding:26px 30px !important; margin-bottom:22px !important; }
  .section-card .card-header{ margin-bottom:18px !important; padding-bottom:16px !important; }
  .stats-grid{ gap:20px !important; margin-bottom:30px !important; }
  .quick-actions{ gap:14px !important; margin-bottom:30px !important; }
  .page-title{ font-size:28px !important; }
  .stat-card .stat-value{ font-size:38px !important; }
  .data-table{ font-size:16px !important; }
  .data-table td,.data-table th{ padding:14px 16px !important; }
  .btn{ font-size:16px !important; padding:11px 20px !important; }
}
