/* 2026-10-28 已开通列表：桌面窄屏表格保底宽度，避免列被压扁 */
.keys-table .key-username {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 5px !important;
  width: 100% !important;
  min-width: 0 !important;
}
.keys-table .key-username-line {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 4px 6px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}
.keys-table .key-username-label { order: 1 !important; flex: 0 0 auto !important; white-space: nowrap !important; }
.keys-table .key-username-name {
  order: 2 !important;
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 2.5em !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  text-align: left !important;
  line-height: 1.45 !important;
}
.keys-table .key-role-chip { order: 3 !important; flex: 0 0 auto !important; white-space: nowrap !important; }
.keys-table .key-username-sub { display: none !important; }

@media (min-width: 1001px) {
  .keys-table .key-username-line { flex-wrap: nowrap !important; }
  .keys-table .key-username-name { flex: 1 1 auto !important; min-width: 0 !important; }
}
@media (min-width: 1001px) and (max-width: 1500px) {
  .keys-table-wrap { overflow-x: auto !important; }
  .keys-table {
    table-layout: fixed !important;
    min-width: 900px !important;
  }
  .keys-table th:nth-child(1), .keys-table td:nth-child(1) { width: 16% !important; }
  .keys-table th:nth-child(2), .keys-table td:nth-child(2) { width: 21% !important; }
  .keys-table th:nth-child(3), .keys-table td:nth-child(3) { width: 14% !important; }
  .keys-table th:nth-child(4), .keys-table td:nth-child(4) { width: 9% !important; }
  .keys-table th:nth-child(5), .keys-table td:nth-child(5) { width: 12% !important; }
  .keys-table th:nth-child(6), .keys-table td:nth-child(6) { width: 28% !important; }
  .keys-table .validity-expiry { white-space: nowrap !important; }
}

/* 1001-1150：列再窄就会单字竖排，表格保底宽度，允许横向滚动 */
@media (min-width: 1001px) and (max-width: 1150px) {
  .keys-table-wrap { overflow-x: auto !important; }
  .keys-table { min-width: 1150px !important; }
}
@media (min-width: 1151px) and (max-width: 1500px) {
  .keys-table { min-width: 900px !important; }
}
