/* The native permission matrix uses separate tables with matching row order.
   Keep their widths within the account panel instead of wrapping whole columns. */
body.discuzx5#nv_home .tdats {
  display: grid;
  grid-template-columns: 200px minmax(240px, 1fr);
  align-items: start;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 16px 0;
  overflow: auto;
  overscroll-behavior-x: contain;
}
body.discuzx5#nv_home .tdats:has(> .tscr) {
  grid-template-columns: 200px minmax(240px, 1fr) minmax(240px, 1fr);
}
body.discuzx5#nv_home .tdats > .tdat,
body.discuzx5#nv_home .tdats .tscr,
body.discuzx5#nv_home .tdats .tscr > .tdat,
body.discuzx5#nv_home .tdats > .tb {
  float: none;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin: 0 !important;
}
body.discuzx5#nv_home .tdats > .tdat:first-child { grid-column: 1; grid-row: 1; }
body.discuzx5#nv_home .tdats > .tfx,
body.discuzx5#nv_home .tdats > .tfxf { grid-column: 2; grid-row: 1; }
body.discuzx5#nv_home .tdats > .tb {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  height: 46px;
  padding: 0;
  border: 0;
  overflow: hidden;
}
body.discuzx5#nv_home .tdats > .tscr {
  grid-column: 3;
  grid-row: 1;
  margin-top: 46px !important;
  overflow: visible;
}
body.discuzx5#nv_home .tdats .tdat { border: 0; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
body.discuzx5#nv_home .tdats .tdat th,
body.discuzx5#nv_home .tdats .tdat td {
  box-sizing: border-box;
  width: auto;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid #e5eaf0;
  border-bottom: 1px solid #e5eaf0;
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.discuzx5#nv_home .tdats .tdat td,
body.discuzx5#nv_home .tdats .tdat th { text-align: center; }
body.discuzx5#nv_home .tdats > .tdat:first-child td,
body.discuzx5#nv_home .tdats > .tdat:first-child th { text-align: left; color: #526c88; }
body.discuzx5#nv_home .tdats .tdat .c0 { height: 46px; padding: 0 12px; vertical-align: middle; }
body.discuzx5#nv_home .tdats .c0 h4,
body.discuzx5#nv_home .tdats > .tb li {
  box-sizing: border-box;
  height: 46px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #edf3f9;
  color: #315f91;
  font-size: 14px;
  font-weight: 600;
  line-height: 46px;
  text-align: center;
  white-space: nowrap;
}
body.discuzx5#nv_home .tdats .tdat .alt,
body.discuzx5#nv_home .tdats .tdat .alt > * { background: #f7f9fb; }
body.discuzx5#nv_home .tdats .tdat .h th { background: #edf3f9; color: #365978; font-weight: 600; }
body.discuzx5#nv_home .tdats .tdat .notice { margin: 0; padding: 0; font-size: 12px; line-height: 20px; }
@media (max-width: 600px) {
  body.discuzx5#nv_home .tdats { grid-template-columns: 160px minmax(220px, 1fr); }
  body.discuzx5#nv_home .tdats:has(> .tscr) { grid-template-columns: 160px minmax(220px, 1fr) minmax(220px, 1fr); }
}

body.discuzx5#nv_home .tdats .c0 h4 { height: 44px; line-height: 44px; }
body.discuzx5#nv_home .tdats .tdat .notice::before { display: inline; float: none; position: static; height: auto; line-height: 20px; }
