/* Retter-Portal v1.3.14 – department spacing, qualification matrix and account deletion confirmation. */

/* Keep a visible, consistent gap between the create form and existing units. */
html body .department-units-card .unit-create-form + .unit-chip-grid-after-create{
  margin-top:18px!important;
}

/* Qualification matrix: give each qualification enough real width and never let
   sticky columns cover the first letters of the following heading. */
html body .v138-matrix{
  table-layout:fixed!important;
}
html body .v138-matrix th:not(.v138-matrix-person),
html body .v138-matrix td:not(.v138-matrix-person){
  width:252px!important;
  min-width:252px!important;
  max-width:252px!important;
}
html body .v138-matrix .v138-matrix-person{
  width:220px!important;
  min-width:220px!important;
  max-width:220px!important;
  box-shadow:8px 0 18px rgba(2,8,23,.16)!important;
}
html body .v138-matrix thead th{
  height:122px!important;
  padding:16px 15px!important;
  overflow:hidden!important;
  vertical-align:middle!important;
}
html body .v138-matrix .v1310-matrix-name{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  margin:0 auto!important;
  color:var(--text)!important;
  font-size:.78rem!important;
  font-weight:950!important;
  line-height:1.24!important;
  letter-spacing:.045em!important;
  text-align:center!important;
  text-transform:uppercase!important;
  text-wrap:balance!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  hyphens:none!important;
}
html body .v138-matrix .v1310-matrix-category{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  margin:8px auto 0!important;
  color:var(--muted)!important;
  font-size:.68rem!important;
  font-weight:850!important;
  line-height:1.28!important;
  letter-spacing:.035em!important;
  text-align:center!important;
  text-transform:uppercase!important;
  text-wrap:balance!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  hyphens:none!important;
}
html body .v138-matrix-person strong,
html body .v138-matrix-person small{
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
  hyphens:none!important;
}

/* Account danger zone: all blocks share the same full width and alignment. */
html body .account-delete-card{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:16px!important;
}
html body .account-delete-header,
html body .account-delete-warning,
html body .account-delete-action-zone,
html body .account-delete-notice{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  box-sizing:border-box!important;
}
html body .account-delete-warning{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:6px!important;
  padding:17px 18px!important;
  border:1px solid rgba(244,63,94,.24)!important;
  border-radius:17px!important;
  background:linear-gradient(145deg,rgba(159,18,57,.14),rgba(76,5,25,.08))!important;
}
html body .account-delete-warning strong{
  color:#fb7185!important;
}
html body .account-delete-action-zone{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:18px!important;
  padding:18px!important;
  border:1px solid rgba(244,63,94,.28)!important;
  border-radius:18px!important;
  background:linear-gradient(145deg,rgba(159,18,57,.18),rgba(76,5,25,.10))!important;
}
html body .account-delete-action-zone>div strong,
html body .account-delete-action-zone>div span{
  display:block!important;
}
html body .account-delete-action-zone>div strong{
  color:#fb7185!important;
  font-size:1rem!important;
}
html body .account-delete-action-zone>div span{
  margin-top:5px!important;
  color:var(--muted)!important;
  font-size:.82rem!important;
  line-height:1.48!important;
}

/* Custom deletion confirmation instead of the browser confirm popup. */
html body .account-delete-modal[hidden]{display:none!important}
html body .account-delete-modal{
  position:fixed!important;
  z-index:10000!important;
  inset:0!important;
  display:grid!important;
  place-items:center!important;
  padding:20px!important;
}
html body .account-delete-modal__backdrop{
  position:absolute!important;
  inset:0!important;
  background:rgba(2,6,23,.76)!important;
  -webkit-backdrop-filter:blur(10px)!important;
  backdrop-filter:blur(10px)!important;
}
html body .account-delete-modal__dialog{
  position:relative!important;
  z-index:1!important;
  width:min(590px,100%)!important;
  max-height:calc(100vh - 40px)!important;
  overflow:auto!important;
  padding:28px!important;
  border:1px solid rgba(244,63,94,.34)!important;
  border-radius:26px!important;
  background:
    radial-gradient(circle at 0 0,rgba(225,29,72,.18),transparent 24rem),
    linear-gradient(145deg,rgba(15,23,42,.98),rgba(9,17,30,.98))!important;
  box-shadow:0 34px 90px rgba(0,0,0,.52),inset 0 1px 0 rgba(255,255,255,.07)!important;
  color:var(--text)!important;
}
html body .account-delete-modal__close{
  position:absolute!important;
  top:15px!important;
  right:15px!important;
  display:grid!important;
  place-items:center!important;
  width:38px!important;
  height:38px!important;
  padding:0!important;
  border:1px solid rgba(255,255,255,.10)!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.055)!important;
  color:var(--text)!important;
  font-size:1.45rem!important;
  cursor:pointer!important;
}
html body .account-delete-modal__icon{
  display:grid!important;
  place-items:center!important;
  width:54px!important;
  height:54px!important;
  margin-bottom:16px!important;
  border-radius:17px!important;
  background:linear-gradient(145deg,#f43f5e,#be123c)!important;
  color:#fff!important;
  font-size:1.6rem!important;
  font-weight:950!important;
  box-shadow:0 16px 38px rgba(225,29,72,.30),inset 0 1px 0 rgba(255,255,255,.24)!important;
}
html body .account-delete-modal__dialog h2{
  margin:0 46px 10px 0!important;
  color:#fb7185!important;
  font-size:clamp(1.6rem,4vw,2.15rem)!important;
  letter-spacing:-.035em!important;
}
html body .account-delete-modal__dialog>p:not(.eyebrow){
  margin:0 0 20px!important;
  color:var(--muted)!important;
  line-height:1.58!important;
}
html body .account-delete-modal__dialog form{
  display:grid!important;
  gap:14px!important;
}
html body .account-delete-modal__dialog label{
  display:grid!important;
  gap:8px!important;
  min-width:0!important;
}
html body .account-delete-modal__dialog input{
  width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
html body .account-delete-modal__actions{
  display:flex!important;
  justify-content:flex-end!important;
  gap:10px!important;
  margin-top:6px!important;
}
html body .account-delete-modal__submit:disabled{
  opacity:.42!important;
  cursor:not-allowed!important;
  transform:none!important;
  box-shadow:none!important;
}
html body.account-delete-modal-open{
  overflow:hidden!important;
}
body[data-theme="light"] .account-delete-modal__dialog{
  background:
    radial-gradient(circle at 0 0,rgba(244,63,94,.14),transparent 24rem),
    linear-gradient(145deg,rgba(255,255,255,.99),rgba(255,241,242,.98))!important;
  color:#111827!important;
}
body[data-theme="light"] .account-delete-modal__backdrop{
  background:rgba(15,23,42,.52)!important;
}

@media(max-width:760px){
  html body .department-units-card .unit-create-form + .unit-chip-grid-after-create{
    margin-top:14px!important;
  }
  html body .v138-matrix th:not(.v138-matrix-person),
  html body .v138-matrix td:not(.v138-matrix-person){
    width:230px!important;
    min-width:230px!important;
    max-width:230px!important;
  }
  html body .v138-matrix .v138-matrix-person{
    width:180px!important;
    min-width:180px!important;
    max-width:180px!important;
  }
  html body .account-delete-action-zone{
    grid-template-columns:minmax(0,1fr)!important;
    gap:14px!important;
  }
  html body .account-delete-action{width:100%!important}
  html body .account-delete-modal{padding:10px!important}
  html body .account-delete-modal__dialog{
    width:100%!important;
    max-height:calc(100vh - 20px)!important;
    padding:22px 18px 18px!important;
    border-radius:22px!important;
  }
  html body .account-delete-modal__actions{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
  }
  html body .account-delete-modal__actions .btn{width:100%!important}
}
