/*
 * IMPERIUM Build446 R1 — Update Center UI Hardening
 * Presentation only. Worker V5, LKG and update state machine are untouched.
 */

/* Root status panel: eliminate inherited oval/circular geometry. */
body:not(.no-auth) .updater-status-panel[data-updater-status]{
  box-sizing:border-box!important;
  display:block!important;
  position:relative!important;
  inset:auto!important;
  left:auto!important;
  right:auto!important;
  top:auto!important;
  bottom:auto!important;
  transform:none!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  aspect-ratio:auto!important;
  margin:18px 0!important;
  padding:20px!important;
  border-radius:24px!important;
  overflow:hidden!important;
  clip-path:none!important;
  contain:none!important;
  border:1px solid rgba(87,190,219,.22)!important;
  background:linear-gradient(155deg,rgba(6,31,48,.98),rgba(3,20,32,.99))!important;
  box-shadow:0 12px 34px rgba(0,0,0,.18)!important;
}
body:not(.no-auth) .updater-status-panel[data-updater-status]::before,
body:not(.no-auth) .updater-status-panel[data-updater-status]::after{
  content:none!important;
  display:none!important;
}

/* All children remain inside the panel. */
body:not(.no-auth) .updater-status-panel[data-updater-status]>*{
  box-sizing:border-box!important;
  width:auto!important;
  min-width:0!important;
  max-width:100%!important;
  transform:none!important;
}
body:not(.no-auth) .updater-status-panel[data-updater-status] .panel-heading{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:start!important;
  gap:14px!important;
  width:100%!important;
  margin:0 0 14px!important;
  padding:0!important;
  border:0!important;
}
body:not(.no-auth) .updater-status-panel[data-updater-status] .panel-heading>div{
  min-width:0!important;
}
body:not(.no-auth) .updater-status-panel[data-updater-status] .panel-heading h2,
body:not(.no-auth) .updater-status-panel[data-updater-status] .panel-heading p{
  max-width:100%!important;
  overflow-wrap:break-word!important;
  word-break:normal!important;
}
body:not(.no-auth) .updater-status-panel[data-updater-status] .updater-refresh{
  position:static!important;
  transform:none!important;
  width:auto!important;
  min-width:0!important;
  min-height:44px!important;
  max-width:100%!important;
  margin:0!important;
  padding:9px 14px!important;
  border-radius:13px!important;
  white-space:nowrap!important;
}

/* Worker state card. */
body:not(.no-auth) .updater-status-panel .status-hero{
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:44px minmax(0,1fr)!important;
  align-items:center!important;
  gap:14px!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:auto!important;
  min-height:112px!important;
  margin:0!important;
  padding:16px!important;
  border-radius:18px!important;
  overflow:hidden!important;
  clip-path:none!important;
  transform:none!important;
}
body:not(.no-auth) .updater-status-panel .status-hero::before,
body:not(.no-auth) .updater-status-panel .status-hero::after{
  content:none!important;
  display:none!important;
}
body:not(.no-auth) .updater-status-panel .status-hero-icon{
  display:grid!important;
  place-items:center!important;
  width:40px!important;
  min-width:40px!important;
  max-width:40px!important;
  height:40px!important;
  min-height:40px!important;
  max-height:40px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:50%!important;
  background:transparent!important;
  font-size:30px!important;
  line-height:1!important;
}
body:not(.no-auth) .updater-status-panel .status-hero>div{
  min-width:0!important;
}
body:not(.no-auth) .updater-status-panel .status-hero small,
body:not(.no-auth) .updater-status-panel .status-hero strong,
body:not(.no-auth) .updater-status-panel .status-hero p{
  position:static!important;
  display:block!important;
  width:auto!important;
  min-width:0!important;
  max-width:100%!important;
  height:auto!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  transform:none!important;
  text-align:left!important;
  overflow-wrap:break-word!important;
}
body:not(.no-auth) .updater-status-panel .status-hero strong{
  margin:3px 0 5px!important;
  font-size:clamp(1.7rem,5vw,2.35rem)!important;
  line-height:1.05!important;
}
body:not(.no-auth) .updater-status-panel .status-hero p{
  color:#a6bac7!important;
  line-height:1.45!important;
}

/* Progress bar: always uses actual 0-100 width. */
body:not(.no-auth) .updater-status-panel .update-progress{
  position:relative!important;
  display:block!important;
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:10px!important;
  min-height:10px!important;
  max-height:10px!important;
  margin:14px 0!important;
  padding:0!important;
  border:0!important;
  border-radius:999px!important;
  overflow:hidden!important;
  background:rgba(255,255,255,.07)!important;
  transform:none!important;
}
body:not(.no-auth) .updater-status-panel .update-progress::before,
body:not(.no-auth) .updater-status-panel .update-progress::after{
  content:none!important;
  display:none!important;
}
body:not(.no-auth) .updater-status-panel .update-progress>span{
  position:static!important;
  display:block!important;
  box-sizing:border-box!important;
  height:100%!important;
  min-height:100%!important;
  max-height:100%!important;
  min-width:0!important;
  max-width:100%!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:inherit!important;
  background:linear-gradient(90deg,#54c9e3,#57ddbd)!important;
  transform:none!important;
  transition:width .25s ease!important;
}

/* Facts: strip inherited state circles/pseudo graphics. */
body:not(.no-auth) .updater-status-panel .status-facts{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
}
body:not(.no-auth) .updater-status-panel .status-facts>div{
  box-sizing:border-box!important;
  position:relative!important;
  display:grid!important;
  grid-template-columns:1fr!important;
  align-content:start!important;
  justify-content:stretch!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:auto!important;
  min-height:88px!important;
  max-height:none!important;
  margin:0!important;
  padding:14px!important;
  border:1px solid rgba(82,170,205,.19)!important;
  border-radius:15px!important;
  overflow:hidden!important;
  clip-path:none!important;
  background:rgba(4,25,40,.58)!important;
  transform:none!important;
  text-align:left!important;
}
body:not(.no-auth) .updater-status-panel .status-facts>div::before,
body:not(.no-auth) .updater-status-panel .status-facts>div::after,
body:not(.no-auth) .updater-status-panel .status-facts small::before,
body:not(.no-auth) .updater-status-panel .status-facts small::after,
body:not(.no-auth) .updater-status-panel .status-facts b::before,
body:not(.no-auth) .updater-status-panel .status-facts b::after{
  content:none!important;
  display:none!important;
}
body:not(.no-auth) .updater-status-panel .status-facts small,
body:not(.no-auth) .updater-status-panel .status-facts b{
  position:static!important;
  display:block!important;
  width:auto!important;
  min-width:0!important;
  max-width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  transform:none!important;
  text-align:left!important;
  overflow-wrap:anywhere!important;
}
body:not(.no-auth) .updater-status-panel .status-facts small{
  color:#8ea8b8!important;
  font-size:.78rem!important;
  line-height:1.25!important;
}
body:not(.no-auth) .updater-status-panel .status-facts b{
  margin-top:8px!important;
  color:#f0f8fc!important;
  font-size:1rem!important;
  line-height:1.3!important;
  font-weight:850!important;
}
body:not(.no-auth) .updater-status-panel .status-facts [data-status-phase],
body:not(.no-auth) .updater-status-panel .status-facts [data-status-backup],
body:not(.no-auth) .updater-status-panel .status-facts [data-status-progress]{
  display:block!important;
  place-items:initial!important;
}

/* Technical details. */
body:not(.no-auth) .updater-status-panel .technical-status{
  width:100%!important;
  margin:12px 0 0!important;
  padding:0!important;
  border:0!important;
}
body:not(.no-auth) .updater-status-panel .technical-status summary{
  min-height:44px!important;
  padding:10px 0!important;
  cursor:pointer!important;
}
body:not(.no-auth) .updater-status-panel .update-status-pre{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  overflow:auto!important;
  white-space:pre-wrap!important;
  overflow-wrap:anywhere!important;
}

/* SUCCESS terminal state: complete visual contract. */
body:not(.no-auth) .updater-status-panel[data-ui446-terminal="SUCCESS"] .status-hero{
  border-color:rgba(73,215,174,.32)!important;
  background:rgba(73,215,174,.07)!important;
}
body:not(.no-auth) .updater-status-panel[data-ui446-terminal="SUCCESS"] .update-progress>span{
  width:100%!important;
}

/* Failure is terminal too: progress represents completed workflow, not success. */
body:not(.no-auth) .updater-status-panel[data-ui446-terminal="FAILED"] .update-progress>span,
body:not(.no-auth) .updater-status-panel[data-ui446-terminal="ERROR"] .update-progress>span{
  width:100%!important;
  background:linear-gradient(90deg,#ef9a64,#ef6f84)!important;
}

@media(max-width:700px){
  body:not(.no-auth) .updater-status-panel[data-updater-status]{
    margin:14px 0!important;
    padding:16px!important;
    border-radius:20px!important;
  }
  body:not(.no-auth) .updater-status-panel[data-updater-status] .panel-heading{
    grid-template-columns:1fr!important;
    gap:10px!important;
  }
  body:not(.no-auth) .updater-status-panel[data-updater-status] .updater-refresh{
    justify-self:start!important;
    width:auto!important;
  }
  body:not(.no-auth) .updater-status-panel .status-facts{
    grid-template-columns:1fr!important;
  }
  body:not(.no-auth) .updater-status-panel .status-hero{
    grid-template-columns:38px minmax(0,1fr)!important;
    gap:11px!important;
    min-height:0!important;
    padding:14px!important;
    border-radius:16px!important;
  }
  body:not(.no-auth) .updater-status-panel .status-hero-icon{
    width:34px!important;
    min-width:34px!important;
    max-width:34px!important;
    height:34px!important;
    min-height:34px!important;
    max-height:34px!important;
    font-size:26px!important;
  }
  body:not(.no-auth) .updater-status-panel .status-hero strong{
    font-size:clamp(1.5rem,7vw,2rem)!important;
  }
  body:not(.no-auth) .updater-status-panel .status-facts>div{
    min-height:78px!important;
    padding:13px!important;
  }
}

@media(max-width:390px){
  body:not(.no-auth) .updater-status-panel[data-updater-status]{
    padding:13px!important;
  }
  body:not(.no-auth) .updater-status-panel .status-hero{
    grid-template-columns:1fr!important;
  }
  body:not(.no-auth) .updater-status-panel .status-hero-icon{
    display:none!important;
  }
}
