/* ===== 九尾狐后台响应式补丁 v3：电脑 / 笔记本 / 平板 ===== */
html, body { max-width: 100%; overflow-x: hidden; }
.ant-layout { min-width: 0 !important; }
.ant-layout-content { min-width: 0 !important; }
.ant-layout > div, .ant-layout > header, .ant-layout > main { min-width: 0 !important; }

@media (max-width: 1180px) {
  .ant-layout-sider { flex: 0 0 180px !important; max-width: 180px !important; min-width: 180px !important; width: 180px !important; }
  .ant-layout-sider .ant-menu-item { padding-left: 14px !important; padding-right: 10px !important; }
  .ant-layout-sider .ant-menu-title-content { font-size: 13px !important; }
  .ant-layout-content { padding: 14px !important; }
  .ant-layout-content div[style*="flex: 1 1 0px"] { flex: 1 1 150px !important; min-width: 150px !important; }
  .ant-layout-content div[style*="flex-wrap: wrap"] { gap: 10px !important; }
  .ant-layout-content div[style*="margin-bottom: 16px"] { margin-bottom: 10px !important; }
  .ant-layout > div:first-child { flex-wrap: wrap !important; }
}

@media (max-width: 900px) {
  .ant-layout-sider { flex: 0 0 152px !important; max-width: 152px !important; min-width: 152px !important; width: 152px !important; }
  .ant-layout-sider .ant-menu-item { padding-left: 10px !important; }
  .ant-layout-sider .ant-menu-title-content { font-size: 12px !important; }
  .ant-layout-content { padding: 10px !important; }
  .ant-layout-content div[style*="flex: 1 1 0px"] { flex: 1 1 132px !important; min-width: 132px !important; }
}

@media (max-width: 900px) {
  .ant-layout-content div[style*="grid-template-columns"] {
    grid-template-columns: repeat(auto-fill, minmax(286px, 1fr)) !important;
  }
}
/* 卡片内部不裁切，按钮行允许换行 */
.ant-layout-content div[style*="grid-template-columns"] > div { min-width: 0 !important; }

/* 设备面板列宽：全局自适应，保证整块可见 */
.ant-layout-content div[style*="grid-template-columns"] {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
  gap: 12px !important;
}

html.yk-tablet div[data-yk-topbar] > * { flex: 0 0 auto !important; white-space: nowrap !important; }

html.yk-tablet [data-yk-clock] { white-space: nowrap !important; min-width: 118px !important; }
@media (max-width: 960px) {
  html.yk-tablet div[data-yk-topbar] > *:nth-child(4) { display: none !important; }
  html.yk-tablet div[data-yk-topbar] { gap: 6px !important; }
}
