/*
============================================================
SVS ERP — F15.22.10
COMMAND CENTER CONSOLIDATED FINAL

One final Command Center layer.
Replaces active F15.22.2 + F15.22.4-.9 CSS links.
Stable F15.22.4 JS adapter remains untouched.
============================================================
*/

html body:not(.dark) #page-command-center{
  --cc-text:#12324d;
  --cc-muted:#6f8598;
  --cc-line:#d9e5eb;
  --cc-teal:#16b8aa;
  --cc-blue:#3b95ee;
  --cc-green:#18a66f;
  --cc-amber:#e89b18;
  --cc-red:#e65360;
  --cc-shadow:0 8px 24px rgba(15,34,53,.05);
  max-width:1600px!important;
  margin:0 auto!important;
}

/* ------------------------------------------------------------
   Header / live clock / tabs
   ------------------------------------------------------------ */

html body:not(.dark) #page-command-center .command-center-shell{
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

html body:not(.dark) #page-command-center .command-center-header{
  position:relative!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  min-height:66px!important;
  padding:13px 17px!important;
  margin-bottom:10px!important;
  border:1px solid var(--cc-line)!important;
  border-radius:18px!important;
  background:
    radial-gradient(circle at 100% 0%,rgba(22,184,170,.11),transparent 35%),
    linear-gradient(135deg,#fff,#f6fbfb)!important;
  box-shadow:var(--cc-shadow)!important;
}

html body:not(.dark) #page-command-center .command-center-header::before{
  content:""!important;
  position:absolute!important;
  left:0!important;
  top:0!important;
  bottom:0!important;
  width:4px!important;
  background:linear-gradient(180deg,#19bcae,#4faaff)!important;
}

html body:not(.dark) #page-command-center .command-center-brand{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
}

html body:not(.dark) #page-command-center .command-center-logo{
  width:42px!important;
  height:42px!important;
  flex:0 0 42px!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid #cce9e5!important;
  border-radius:12px!important;
  background:linear-gradient(135deg,#e8faf7,#f2f9ff)!important;
  color:#0d776e!important;
  font-weight:900!important;
}

html body:not(.dark) #page-command-center .command-center-brand h2{
  margin:2px 0 0!important;
  color:#10314c!important;
  font-size:18px!important;
  line-height:1.1!important;
  font-weight:900!important;
  letter-spacing:-.025em!important;
}

html body:not(.dark) #page-command-center .command-center-brand span{
  color:#7c91a4!important;
  font-size:7px!important;
  font-weight:850!important;
  letter-spacing:.08em!important;
}

html body:not(.dark) #page-command-center .command-center-header-actions{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
}

html body:not(.dark) #page-command-center .command-center-header-actions .button{
  min-height:38px!important;
  padding:8px 13px!important;
  border-radius:10px!important;
}

html body:not(.dark) #page-command-center .command-clock-row{
  min-height:50px!important;
  margin:0 0 9px!important;
  padding:8px 13px!important;
  border:1px solid var(--cc-line)!important;
  border-radius:13px!important;
  background:#fff!important;
}

html body:not(.dark) #page-command-center .command-clock-row strong{
  color:#12344f!important;
  font-size:19px!important;
  font-weight:900!important;
}

html body:not(.dark) #page-command-center .command-live-indicator{
  padding:5px 9px!important;
  border:1px solid #c8ebdf!important;
  border-radius:999px!important;
  background:#eefbf6!important;
  color:#118764!important;
  font-size:7px!important;
  font-weight:900!important;
}

html body:not(.dark) #page-command-center .command-view-tabs{
  display:inline-flex!important;
  gap:4px!important;
  margin:0 0 10px!important;
  padding:4px!important;
  border:1px solid var(--cc-line)!important;
  border-radius:11px!important;
  background:#f5f8fa!important;
}

html body:not(.dark) #page-command-center .command-view-tab{
  min-height:31px!important;
  padding:6px 13px!important;
  border:0!important;
  border-radius:8px!important;
  background:transparent!important;
  color:#6d8194!important;
  font-size:8px!important;
  font-weight:850!important;
}

html body:not(.dark) #page-command-center .command-view-tab.active{
  background:#fff!important;
  color:#0f7e74!important;
  box-shadow:0 2px 7px rgba(15,34,53,.07)!important;
}

/* ------------------------------------------------------------
   Shift funnels
   ------------------------------------------------------------ */

html body:not(.dark) #page-command-center .command-shift-board{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:12px!important;
  margin:0 0 12px!important;
}

html body:not(.dark) #page-command-center .command-shift-lane{
  padding:13px!important;
  border:1px solid var(--cc-line)!important;
  border-top:3px solid var(--cc-teal)!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:var(--cc-shadow)!important;
}

html body:not(.dark) #page-command-center .command-shift-lane.cfpb-lane{
  border-top-color:var(--cc-blue)!important;
}

html body:not(.dark) #page-command-center .command-shift-lane>header{
  padding-bottom:8px!important;
  margin-bottom:8px!important;
  border-bottom:1px solid #edf2f5!important;
}

html body:not(.dark) #page-command-center .command-shift-lane h3{
  margin:0!important;
  color:#12304a!important;
  font-size:15px!important;
  font-weight:900!important;
}

html body:not(.dark) #page-command-center .command-shift-stats{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:6px!important;
  border:0!important;
  background:transparent!important;
}

html body:not(.dark) #page-command-center .cfpb-lane .command-shift-stats{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}

html body:not(.dark) #page-command-center .command-shift-stats>div{
  min-height:68px!important;
  padding:8px 9px!important;
  border:1px solid #dce7ed!important;
  border-radius:11px!important;
  background:#f8fbfd!important;
}

html body:not(.dark) #page-command-center .command-shift-stats>div.done{
  background:#eefaf6!important;
  border-color:#cbe9dc!important;
}

html body:not(.dark) #page-command-center .command-shift-stats>div.open{
  background:#fff8eb!important;
  border-color:#ead7ac!important;
}

html body:not(.dark) #page-command-center .command-shift-stats>div.issue{
  background:#fff1f3!important;
  border-color:#eccdd2!important;
}

html body:not(.dark) #page-command-center .command-shift-stats strong{
  color:#12304a!important;
  font-size:18px!important;
  font-weight:900!important;
}

/* ------------------------------------------------------------
   Stable adapter — middle row
   ------------------------------------------------------------ */

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-overview-grid{
  display:grid!important;
  grid-template-columns:1.18fr 1fr 1fr!important;
  gap:12px!important;
  margin:0 0 12px!important;
  align-items:stretch!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-card{
  min-width:0!important;
  padding:12px!important;
  border:1px solid var(--cc-line)!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:var(--cc-shadow)!important;
}

@media(min-width:1281px){
  html body:not(.dark) #page-command-center.ccx-layout-live .ccx-overview-grid{
    grid-template-rows:224px!important;
    height:224px!important;
    min-height:224px!important;
  }

  html body:not(.dark) #page-command-center.ccx-layout-live .ccx-overview-grid>.ccx-card{
    height:224px!important;
    min-height:224px!important;
    max-height:224px!important;
    overflow:hidden!important;
  }
}

/* Team Load uses the real retitled section label from F15.22.4 JS. */
html body:not(.dark) #page-command-center.ccx-layout-live .ccx-team-card #commandCfpbTeamLoadPanel{
  display:block!important;
  height:100%!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-team-card .command-section-label{
  display:block!important;
  margin:0 0 8px!important;
  padding:0!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-team-card .command-section-label strong{
  display:block!important;
  color:var(--cc-text)!important;
  font-size:13px!important;
  line-height:1.1!important;
  font-weight:900!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-team-card .command-section-label span{
  display:block!important;
  margin-top:2px!important;
  color:var(--cc-muted)!important;
  font-size:6.5px!important;
  line-height:1.2!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-team-card .command-cfpb-recommended{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  height:34px!important;
  min-height:34px!important;
  max-height:34px!important;
  margin:0 0 8px!important;
  padding:6px 9px!important;
  border:0!important;
  border-radius:9px!important;
  background:linear-gradient(90deg,#067c86,#07576d)!important;
  color:#fff!important;
  overflow:hidden!important;
  white-space:nowrap!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-team-card .command-cfpb-recommended *{
  color:#fff!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-team-card .command-cfpb-load-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  grid-template-rows:repeat(2,68px)!important;
  grid-auto-rows:68px!important;
  gap:7px!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-team-card .command-cfpb-load-card{
  display:block!important;
  height:68px!important;
  min-height:68px!important;
  max-height:68px!important;
  padding:8px 9px!important;
  border:1px solid #dfe8ed!important;
  border-radius:10px!important;
  background:#fbfdfe!important;
  color:#425e73!important;
  overflow:hidden!important;
  box-shadow:none!important;
  opacity:1!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-team-card .command-cfpb-load-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:4px!important;
  height:18px!important;
  min-height:18px!important;
  margin:0 0 8px!important;
  font-size:0!important;
}

/* Hide raw LIGHT / role fragments while restoring real child labels. */
html body:not(.dark) #page-command-center.ccx-layout-live .ccx-team-card .command-cfpb-load-head>span:not(.attendance-tag),
html body:not(.dark) #page-command-center.ccx-layout-live .ccx-team-card .command-role-badge{
  display:none!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-team-card .command-cfpb-load-head>strong{
  min-width:0!important;
  max-width:64%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  color:#38556c!important;
  font-size:8px!important;
  line-height:1!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-team-card .attendance-tag{
  display:inline-flex!important;
  max-width:78px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  padding:2px 5px!important;
  border-radius:999px!important;
  font-size:4.8px!important;
  line-height:1!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-team-card .command-cfpb-load-card>strong{
  display:inline-block!important;
  margin:0!important;
  color:#667e91!important;
  font-size:19px!important;
  line-height:1!important;
  font-weight:900!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-team-card .command-cfpb-load-card>strong::after{
  content:"  OPEN"!important;
  color:#8194a4!important;
  font-size:5px!important;
  font-weight:850!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-team-card .command-cfpb-mini,
html body:not(.dark) #page-command-center.ccx-layout-live .ccx-team-card .command-cfpb-load-card>small{
  display:none!important;
}

/* ------------------------------------------------------------
   Operations Pulse — one icon system only
   ------------------------------------------------------------ */

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-card-head{
  margin-bottom:8px!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-card-head h3{
  margin:0!important;
  color:var(--cc-text)!important;
  font-size:13px!important;
  font-weight:900!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-card-head p{
  margin:2px 0 0!important;
  color:var(--cc-muted)!important;
  font-size:6.5px!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-pulse-grid{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  grid-template-rows:1fr 1fr!important;
  height:170px!important;
  gap:8px!important;
  margin:0!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-pulse-grid>div,
html body:not(.dark) #page-command-center.ccx-layout-live .ccx-pulse-grid>article{
  position:relative!important;
  min-height:0!important;
  height:auto!important;
  padding:12px 44px 10px 12px!important;
  border:1px solid var(--cc-line)!important;
  border-radius:13px!important;
  background:#f8fbfd!important;
  overflow:hidden!important;
  box-shadow:none!important;
}

/* Explicitly neutralize any inherited pseudo icon system. */
html body:not(.dark) #page-command-center.ccx-layout-live .ccx-pulse-grid>div::before,
html body:not(.dark) #page-command-center.ccx-layout-live .ccx-pulse-grid>article::before{
  content:none!important;
  display:none!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-pulse-grid>div::after,
html body:not(.dark) #page-command-center.ccx-layout-live .ccx-pulse-grid>article::after{
  position:absolute!important;
  right:11px!important;
  top:11px!important;
  width:28px!important;
  height:28px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:9px!important;
  font-size:14px!important;
  font-weight:900!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-pulse-grid>div:nth-child(1){
  background:linear-gradient(135deg,#eafaf3,#f8fffb)!important;
  border-color:#c7e9d8!important;
  border-left:4px solid var(--cc-green)!important;
}
html body:not(.dark) #page-command-center.ccx-layout-live .ccx-pulse-grid>div:nth-child(1)::after{
  content:"●"!important;
  color:#0f9a63!important;
  background:#d8f3e6!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-pulse-grid>div:nth-child(2){
  background:linear-gradient(135deg,#edf6ff,#fafcff)!important;
  border-color:#cfe2f8!important;
  border-left:4px solid var(--cc-blue)!important;
}
html body:not(.dark) #page-command-center.ccx-layout-live .ccx-pulse-grid>div:nth-child(2)::after{
  content:"▣"!important;
  color:#277fcf!important;
  background:#dcecff!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-pulse-grid>div:nth-child(3){
  background:linear-gradient(135deg,#fff0f2,#fffafa)!important;
  border-color:#efcbd1!important;
  border-left:4px solid var(--cc-red)!important;
}
html body:not(.dark) #page-command-center.ccx-layout-live .ccx-pulse-grid>div:nth-child(3)::after{
  content:"!"!important;
  color:#d94350!important;
  background:#ffdde2!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-needs-attention{
  background:linear-gradient(135deg,#fff6e6,#fffdf9)!important;
  border-color:#ecd4a4!important;
  border-left:4px solid var(--cc-amber)!important;
}
html body:not(.dark) #page-command-center.ccx-layout-live .ccx-needs-attention::after{
  content:"◷"!important;
  color:#cf8300!important;
  background:#ffebbf!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-pulse-grid span{
  display:block!important;
  color:#647c90!important;
  font-size:6px!important;
  font-weight:900!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-pulse-grid strong{
  display:block!important;
  margin-top:5px!important;
  color:#12334e!important;
  font-size:24px!important;
  line-height:1!important;
  font-weight:900!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-pulse-grid small{
  display:block!important;
  margin-top:5px!important;
  color:#71879a!important;
  font-size:5.5px!important;
}

/* ------------------------------------------------------------
   Shift alerts
   ------------------------------------------------------------ */

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-alert-list{
  display:grid!important;
  grid-template-rows:repeat(4,1fr)!important;
  height:170px!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-alert-row{
  display:grid!important;
  grid-template-columns:23px 1fr auto!important;
  align-items:center!important;
  gap:7px!important;
  min-height:0!important;
  padding:5px 0!important;
  border-bottom:1px solid #edf2f5!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-alert-row:last-child{
  border-bottom:0!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-alert-icon{
  width:22px!important;
  height:22px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:50%!important;
  font-size:9px!important;
  font-weight:900!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-alert-copy strong{
  display:block!important;
  color:var(--cc-text)!important;
  font-size:7.8px!important;
  font-weight:850!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-alert-copy small{
  display:block!important;
  margin-top:1px!important;
  color:var(--cc-muted)!important;
  font-size:5.5px!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-alert-row>b{
  color:var(--cc-text)!important;
  font-size:14px!important;
  font-weight:900!important;
}

/* ------------------------------------------------------------
   Bottom row
   ------------------------------------------------------------ */

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-bottom-grid{
  display:grid!important;
  grid-template-columns:1fr 1fr .95fr!important;
  gap:12px!important;
  margin:0!important;
}

@media(min-width:1281px){
  html body:not(.dark) #page-command-center.ccx-layout-live .ccx-bottom-grid{
    height:244px!important;
    max-height:244px!important;
  }

  html body:not(.dark) #page-command-center.ccx-layout-live .ccx-bottom-card{
    height:244px!important;
    min-height:244px!important;
    max-height:244px!important;
    overflow:hidden!important;
  }
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-bottom-card{
  min-width:0!important;
  padding:11px!important;
  border:1px solid var(--cc-line)!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:var(--cc-shadow)!important;
}

/* Use the real existing rank headers; no pseudo duplicate titles. */
html body:not(.dark) #page-command-center.ccx-layout-live .ccx-rank-disputer::before,
html body:not(.dark) #page-command-center.ccx-layout-live .ccx-rank-cfpb::before{
  content:none!important;
  display:none!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-bottom-card .command-section-label,
html body:not(.dark) #page-command-center.ccx-layout-live .ccx-bottom-card>header{
  display:flex!important;
  margin-bottom:9px!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-bottom-card .command-rank-item{
  min-height:34px!important;
  height:34px!important;
  margin:0 0 6px!important;
  padding:5px 8px!important;
  border:1px solid #e1eaf0!important;
  border-radius:9px!important;
  background:#fbfdff!important;
  color:#38556c!important;
  box-shadow:none!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-activity .command-live-feed{
  max-height:190px!important;
  overflow:hidden!important;
  padding-right:0!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-activity .command-feed-item{
  min-height:34px!important;
  height:34px!important;
  margin:0 0 6px!important;
  padding:5px 8px!important;
  border:1px solid #e1eaf0!important;
  border-radius:9px!important;
  background:#fbfdff!important;
  color:#38556c!important;
  overflow:hidden!important;
  box-shadow:none!important;
}

html body:not(.dark) #page-command-center.ccx-layout-live .ccx-activity .command-feed-item:nth-child(n+6){
  display:none!important;
}

/* Hide old source shell and online list after adapter moves live nodes. */
html body:not(.dark) #page-command-center.ccx-layout-live #commandTodayView .ccx-source-shell,
html body:not(.dark) #page-command-center.ccx-layout-live #commandTodayView .ccx-online-suppressed{
  display:none!important;
}

/* ------------------------------------------------------------
   Exact diagnosis fix:
   command-system-footer is OUTSIDE #commandTodayView.
   Hide it at page scope.
   ------------------------------------------------------------ */

html body:not(.dark) #page-command-center.ccx-layout-live .command-system-footer{
  display:none!important;
}

/* ------------------------------------------------------------
   Pending / Monthly retain clean base styling
   ------------------------------------------------------------ */

html body:not(.dark) #page-command-center .command-pending-breakdown,
html body:not(.dark) #page-command-center .command-monthly-workers{
  border:1px solid var(--cc-line)!important;
  border-radius:13px!important;
  background:#fff!important;
}

html body:not(.dark) #page-command-center .command-pending-chip,
html body:not(.dark) #page-command-center .command-monthly-worker{
  border:1px solid #dfe8ed!important;
  border-radius:9px!important;
  background:#f8fbfd!important;
  color:#536d81!important;
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media(max-width:1280px){
  html body:not(.dark) #page-command-center .command-shift-board,
  html body:not(.dark) #page-command-center.ccx-layout-live .ccx-overview-grid,
  html body:not(.dark) #page-command-center.ccx-layout-live .ccx-bottom-grid{
    grid-template-columns:1fr!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
  }

  html body:not(.dark) #page-command-center.ccx-layout-live .ccx-overview-grid>.ccx-card,
  html body:not(.dark) #page-command-center.ccx-layout-live .ccx-bottom-card{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
  }
}

@media(max-width:760px){
  html body:not(.dark) #page-command-center.ccx-layout-live .ccx-team-card .command-cfpb-load-grid,
  html body:not(.dark) #page-command-center.ccx-layout-live .ccx-pulse-grid{
    grid-template-columns:1fr 1fr!important;
  }
}
