/* V123 Modules-first + centered Workday alignment fix */

/* Keep the old modules section normal. Only align the Audit Workday panel when active. */
body.audit-workday-active.safe-compact-ui .workspace,
body.safe-compact-ui .workspace{
  max-width:1540px!important;
  margin-left:auto!important;
  margin-right:auto!important;
}

/* Main module/workday card should use the full content width, not a small left column */
body.audit-workday-active.safe-compact-ui #modulesSection,
body.audit-workday-active.safe-compact-ui #moduleList,
body.audit-workday-active.safe-compact-ui .audit-workday-section,
body.audit-workday-active.safe-compact-ui .workday-section,
body.audit-workday-active.safe-compact-ui [data-workday-root]{
  width:100%!important;
  max-width:100%!important;
  margin-left:auto!important;
  margin-right:auto!important;
  min-width:0!important;
}

/* Section card centered + full available width */
body.audit-workday-active.safe-compact-ui #modulesSection .section-card{
  width:100%!important;
  max-width:100%!important;
  margin:0 auto!important;
  padding:14px!important;
  border-radius:20px!important;
}

/* V120/V113 workday shell was stuck in a narrow left card in the merged V100 build. */
.workday-v108-academy,
.workday-v108-academy.workday-shell,
.workday-shell.workday-v108-academy{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0 auto!important;
  display:grid!important;
  gap:10px!important;
}

/* Header should stretch across the section and remain compact. */
.workday-v108-academy .academy-header{
  width:100%!important;
  max-width:100%!important;
  margin:0 auto!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(360px,38%)!important;
  gap:10px!important;
  padding:11px 12px!important;
  border-radius:18px!important;
}

.workday-v108-academy .academy-header h3{
  font-size:clamp(22px,2vw,32px)!important;
  line-height:1.04!important;
  margin:0 0 5px!important;
  letter-spacing:-.045em!important;
}

.workday-v108-academy .academy-header > div:first-child > span{
  max-width:100%!important;
  font-size:12.5px!important;
  line-height:1.35!important;
}

/* Status cards should not force narrow card. */
.workday-v108-academy .academy-status-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:7px!important;
}

.workday-v108-academy .academy-status-grid article{
  min-height:46px!important;
  padding:8px 9px!important;
  border-radius:12px!important;
}

/* Rail and content full width */
.workday-v108-academy .academy-rail,
.workday-v108-academy .academy-body,
.workday-v108-academy .academy-stage{
  width:100%!important;
  max-width:100%!important;
  margin-left:auto!important;
  margin-right:auto!important;
}

.workday-v108-academy .academy-rail{
  grid-template-columns:repeat(7,minmax(0,1fr))!important;
  padding:6px!important;
  gap:6px!important;
}

.workday-v108-academy .academy-body{
  grid-template-columns:minmax(0,1fr)!important;
  align-items:start!important;
}

/* Developer side card should not create a left/narrow two-column layout. */
.workday-v108-academy .academy-side,
.workday-v108-academy .academy-side.v118-side-clean{
  width:100%!important;
  max-width:100%!important;
  display:block!important;
  position:relative!important;
  top:auto!important;
}

.workday-v108-academy .academy-side.v118-side-clean .dev-tools{
  width:100%!important;
  max-width:100%!important;
  display:grid!important;
  grid-template-columns:minmax(260px,1fr) auto auto!important;
  align-items:center!important;
  gap:8px!important;
  padding:9px!important;
  border-radius:14px!important;
}

.workday-v108-academy .academy-side.v118-side-clean .dev-tools span{
  grid-column:auto!important;
  white-space:nowrap!important;
}

.workday-v108-academy .academy-side.v118-side-clean .developer-employee-select{
  grid-column:auto!important;
  min-height:38px!important;
}

/* Language card small centered */
.v118-language-simple{
  min-height:230px!important;
  display:grid!important;
  place-items:center!important;
}

.v118-language-card{
  width:min(100%,520px)!important;
  margin:0 auto!important;
  text-align:center!important;
  padding:16px!important;
  border-radius:18px!important;
}

.v118-language-buttons{
  max-width:390px!important;
  margin:0 auto!important;
}

/* Make Time Buy distinct but not huge */
.workday-v108-academy [data-buy-time]{
  background:linear-gradient(135deg,rgba(252,211,77,.22),rgba(245,158,11,.12))!important;
  border-color:rgba(252,211,77,.42)!important;
  color:#fff4bf!important;
}

/* V122 bottom helper should not cover the Workday content */
#v122DevBar{
  left:auto!important;
  right:16px!important;
  bottom:12px!important;
  max-width:calc(100vw - 32px)!important;
}

/* Mobile */
@media(max-width:1180px){
  .workday-v108-academy .academy-header{
    grid-template-columns:1fr!important;
  }
  .workday-v108-academy .academy-rail{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
  .workday-v108-academy .academy-side.v118-side-clean .dev-tools{
    grid-template-columns:1fr 1fr!important;
  }
  .workday-v108-academy .academy-side.v118-side-clean .dev-tools span,
  .workday-v108-academy .academy-side.v118-side-clean .developer-employee-select{
    grid-column:1/-1!important;
  }
}

@media(max-width:760px){
  body.audit-workday-active.safe-compact-ui #modulesSection .section-card{
    padding:9px!important;
  }
  .workday-v108-academy .academy-rail{
    grid-template-columns:1fr!important;
  }
  .workday-v108-academy .academy-status-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .v118-language-card{
    width:100%!important;
  }
  .v118-language-buttons{
    grid-template-columns:1fr!important;
  }
  #v122DevBar{
    left:8px!important;
    right:8px!important;
    bottom:8px!important;
    overflow:auto!important;
  }
}
