/* Final viewport fixes for dashboard counters and tall administration modals. */

/* Keep every modal, including its actions, inside the usable viewport. */
body .ant-modal{
  top:24px!important;
  margin:0 auto!important;
  padding-bottom:24px!important;
}
body .ant-modal .ant-modal-content{
  display:flex!important;
  max-height:calc(100vh - 48px)!important;
  max-height:calc(100dvh - 48px)!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
body .ant-modal .ant-modal-header,
body .ant-modal .ant-modal-footer{
  flex:0 0 auto!important;
}
body .ant-modal .ant-modal-body{
  flex:1 1 auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}

/* The agent tabs remain readable while the long permission list scrolls. */
body .ant-modal .modal-tabs[data-v-2f4fe8d0]{
  position:sticky!important;
  top:-22px!important;
  z-index:3!important;
  margin:-6px 0 20px!important;
  padding-top:6px!important;
  background:#fff!important;
}
body .ant-modal .modal-tab[data-v-2f4fe8d0]{
  position:relative!important;
  z-index:1!important;
  color:#6b7a90!important;
  opacity:1!important;
  visibility:visible!important;
}
body .ant-modal .modal-tab.active[data-v-2f4fe8d0]{
  color:#2563eb!important;
}

/* Long dashboard values must never run underneath the fixed-size icon. */
body .stat-card[data-v-ae17fcd8]{
  container-type:inline-size;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 46px!important;
  grid-template-rows:1fr!important;
  column-gap:12px!important;
  align-items:center!important;
}
body .stat-body[data-v-ae17fcd8]{
  grid-column:1!important;
  grid-row:1!important;
  min-width:0!important;
}
body .stat-icon[data-v-ae17fcd8]{
  grid-column:2!important;
  grid-row:1!important;
  margin-left:0!important;
}
body .stat-num[data-v-ae17fcd8]{
  max-width:100%!important;
  overflow:hidden!important;
  color:#050b16!important;
  font-size:clamp(24px,13cqi,32px)!important;
  line-height:1.08!important;
  letter-spacing:0!important;
  text-overflow:clip!important;
  white-space:nowrap!important;
}

@media (max-width:1500px) and (min-width:769px){
  body .stat-grid[data-v-ae17fcd8]{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
}
@media (max-width:768px){
  body .ant-modal{
    top:10px!important;
    max-width:calc(100vw - 20px)!important;
    padding-bottom:10px!important;
  }
  body .ant-modal .ant-modal-content{
    max-height:calc(100vh - 20px)!important;
    max-height:calc(100dvh - 20px)!important;
  }
  body .ant-modal .modal-tabs[data-v-2f4fe8d0]{
    top:-18px!important;
    margin:0 0 16px!important;
    padding-top:0!important;
  }
  body .stat-card[data-v-ae17fcd8]{
    grid-template-columns:minmax(0,1fr) 36px!important;
    column-gap:8px!important;
  }
  body .stat-num[data-v-ae17fcd8]{font-size:clamp(19px,13cqi,28px)!important;}
}
