/* V117: Audit Workday in normal app shell, not fullscreen.
   Fixes the issue where Audit Workday hid Dashboard/Support nav and opened as a full-screen console. */

body.audit-workday-active.safe-compact-ui,
body.audit-workday-active.safe-compact-ui *{
  box-sizing:border-box!important;
}

body.audit-workday-active.safe-compact-ui{
  overflow-x:hidden!important;
}

/* Restore app chrome. Previous Workday CSS hid these. */
body.audit-workday-active.safe-compact-ui .sidebar{
  display:flex!important;
  position:sticky!important;
  top:0!important;
  z-index:45!important;
  height:auto!important;
  max-height:none!important;
  width:100%!important;
  min-width:0!important;
  flex-direction:row!important;
  align-items:center!important;
  gap:11px!important;
  padding:10px 12px!important;
  border-right:0!important;
  border-bottom:1px solid rgba(255,255,255,.10)!important;
  border-radius:0!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  background:rgba(5,8,17,.90)!important;
}

body.audit-workday-active.safe-compact-ui .portal-brand div{
  display:none!important;
}

body.audit-workday-active.safe-compact-ui .nav-list{
  display:flex!important;
  gap:8px!important;
  min-width:max-content!important;
}

body.audit-workday-active.safe-compact-ui .nav-item{
  width:auto!important;
  min-height:40px!important;
  padding:9px 13px!important;
  border-radius:14px!important;
  white-space:nowrap!important;
}

body.audit-workday-active.safe-compact-ui .logout-btn{
  width:auto!important;
  margin-left:auto!important;
}

body.audit-workday-active.safe-compact-ui .topbar{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  border-radius:20px!important;
  padding:13px 15px!important;
  min-height:66px!important;
}

/* Keep the large dashboard hero hidden inside Audit Workday to avoid huge scroll,
   but keep the app header/nav visible. */
body.audit-workday-active.safe-compact-ui .hero,
body.audit-workday-active.safe-compact-ui .stats-grid,
body.audit-workday-active.safe-compact-ui #dashboardSection{
  display:none!important;
}

/* Cancel full-screen Workday overrides. */
body.audit-workday-active.safe-compact-ui .app-shell{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-height:100dvh!important;
  overflow-x:hidden!important;
}

body.audit-workday-active.safe-compact-ui .workspace{
  width:100%!important;
  max-width:1480px!important;
  min-width:0!important;
  margin:0 auto!important;
  padding:14px 14px 54px!important;
  display:grid!important;
  gap:14px!important;
  overflow-x:hidden!important;
}

body.audit-workday-active.safe-compact-ui #modulesSection{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  display:block!important;
  padding:0!important;
  margin:0!important;
  overflow:visible!important;
}

body.audit-workday-active.safe-compact-ui #modulesSection .section-card{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  padding:15px!important;
  margin:0!important;
  border:1px solid rgba(255,255,255,.10)!important;
  background:linear-gradient(180deg,rgba(16,22,36,.76),rgba(7,12,23,.76))!important;
  border-radius:22px!important;
  box-shadow:0 18px 46px rgba(0,0,0,.24)!important;
  overflow:hidden!important;
}

body.audit-workday-active.safe-compact-ui #modulesSection .section-card > .section-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  margin-bottom:12px!important;
}

body.audit-workday-active.safe-compact-ui #moduleList,
body.audit-workday-active.safe-compact-ui #moduleList.module-grid{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  padding:0!important;
  margin:0!important;
  display:block!important;
  overflow:hidden!important;
}

/* Workday itself should sit inside the card, not own the viewport. */
.workday-v108-academy{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  min-height:auto!important;
  padding:0!important;
  margin:0!important;
  display:grid!important;
  gap:10px!important;
  overflow:hidden!important;
}

.workday-v108-academy .academy-header{
  grid-template-columns:minmax(0,1fr)!important;
  padding:12px!important;
  border-radius:18px!important;
}

.workday-v108-academy .academy-header h3{
  font-size:clamp(24px,2.4vw,34px)!important;
}

.workday-v108-academy .academy-status-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}

.workday-v108-academy .academy-rail{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  border-radius:18px!important;
}

.workday-v108-academy .academy-body{
  grid-template-columns:minmax(0,1fr) minmax(240px,280px)!important;
  gap:10px!important;
}

.workday-v108-academy .academy-side{
  position:relative!important;
  top:auto!important;
}

.workday-v108-academy .academy-stage{
  padding:8px!important;
  border-radius:18px!important;
}

.workday-v108-academy .language-hero h3,
.workday-v108-academy .stage-start-card h3,
.workday-v108-academy .manager-report-card h3{
  font-size:clamp(26px,3vw,38px)!important;
}

/* Mobile/tablet safety */
@media(max-width:1180px){
  body.audit-workday-active.safe-compact-ui .workspace{
    padding:12px 12px 72px!important;
  }
  .workday-v108-academy .academy-body{
    grid-template-columns:1fr!important;
  }
  .workday-v108-academy .academy-side{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media(max-width:760px){
  body.audit-workday-active.safe-compact-ui .sidebar{
    padding:8px 9px!important;
    gap:8px!important;
  }
  body.audit-workday-active.safe-compact-ui .topbar{
    flex-direction:column!important;
    align-items:stretch!important;
    padding:11px!important;
    border-radius:18px!important;
  }
  body.audit-workday-active.safe-compact-ui #modulesSection .section-card{
    padding:10px!important;
    border-radius:18px!important;
  }
  body.audit-workday-active.safe-compact-ui #modulesSection .section-card > .section-head{
    flex-direction:column!important;
    align-items:flex-start!important;
  }
  .workday-v108-academy .academy-status-grid,
  .workday-v108-academy .academy-rail,
  .workday-v108-academy .academy-side,
  .workday-v108-academy .language-choice-grid,
  .workday-v108-academy .stage-rules-grid,
  .workday-v108-academy .learning-card-grid,
  .workday-v108-academy .flow-order-strip,
  .workday-v108-academy .flow-step-pool,
  .workday-v108-academy .choice-card-grid,
  .workday-v108-academy .hunt-card-grid{
    grid-template-columns:1fr!important;
  }
  .workday-v108-academy .academy-header{
    padding:10px!important;
  }
}
