/* 响应式补丁 20261122 v7
   [1] 641-1279px 中屏：sidebar-wrapper 宽度塌陷(240px) + 侧边栏视觉层按 240px 压住主内容，
       主内容区仅剩 124px、卡片文字宽度为 0、按钮点不到。统一宽度并消除溢出。
   [2] <=1100px：顶栏一行放不下，时间条被裁并压住正文。顶栏高度自适应、时间独占一行、
       字号 12px 保持单行（不折字）。
   [3] <=640px 手机：纵向容器 flex-wrap 把内容折到第二列(屏幕外)，卡片只露一半。禁止折列。
   [4] <=1279px 表格：容器收回 100%（配合 xd-responsive.js），表格按内容展开在卡片内横向滚动，
       字号 12px、单元格不折行、操作列吸附右侧常驻可见，表格自身不设 overflow。 */

@media (min-width:641px) and (max-width:1279px){
  html, html body div[class*="sidebar-wrapper"]{--sidebar-width:172px !important;}
  html body div[class*="sidebar-wrapper"]{width:100% !important; flex:1 1 auto !important;}
  html body div[class*="sidebar-wrapper"] > div[class*="peer"]{width:172px !important; min-width:172px !important; flex:0 0 172px !important;}
  html body div[class*="sidebar-wrapper"] > div[class*="peer"] > div{width:172px !important; min-width:0 !important; max-width:172px !important;}
  html body div[class*="sidebar-wrapper"] *{max-width:100% !important;}
  html body main.ml-auto{flex:1 1 auto !important; width:auto !important; min-width:0 !important;}
}

@media (max-width:1100px){
  html body header[class*="h-16"]{height:auto !important; min-height:64px !important; row-gap:2px; padding-top:6px; padding-bottom:6px;}
  html body header div.flex-1.flex.justify-end{flex:1 1 100% !important; justify-content:flex-start !important; min-width:0 !important;}
  html body header div.flex-1.flex.justify-end *{font-size:12px !important; line-height:1.3 !important; white-space:nowrap !important;}
}

@media (max-width:640px){
  html body main div[class*="flex-col"]{flex-wrap:nowrap !important;}
}

@media (max-width:1279px){
  html body main div[class*="overflow-auto"],
  html body main div[class*="flex-col"][class*="flex-1"]{
    width:100% !important; max-width:100% !important; min-width:0 !important;
  }
  html body main table{
    table-layout:auto !important; min-width:max-content !important; width:auto !important;
    overflow:visible !important; font-size:12px !important;
  }
  html body main table th, html body main table td{padding:5px 7px !important; white-space:nowrap !important;}
  html body main table th:last-child, html body main table td:last-child{
    position:sticky !important; right:0 !important; z-index:3; background:var(--card,#fff);
    box-shadow:-8px 0 8px -8px rgba(0,0,0,.22);
  }
}

/* 触屏小按钮热区扩展（视觉不变，只放大可点范围） */
.xdr-hit{position:relative;}
.xdr-hit::after{content:'';position:absolute;inset:-7px;border-radius:8px;}
