/* Apex Command Center v227
   One authoritative home layout. Module styling remains in styles.css. */

body.cc-on[data-view="hub"] #hubView {
  display:grid !important;
  width:var(--apx-viewfinder-width) !important;
  max-width:var(--apx-viewfinder-max) !important;
  margin:var(--apx-workspace-top) auto 52px !important;
  grid-template-columns:minmax(0,1fr) minmax(300px,340px);
  grid-template-areas:
    "install install"
    "head head"
    "pulse pulse"
    "work ann"
    "work links";
  gap:16px;
  align-items:start;
}

body.cc-on #hubView .install-banner { grid-area:install; margin:0; }
body.cc-on #hubView .hub-bar {
  grid-area:head;
  width:100%;
  max-width:none;
  min-height:148px;
  margin:0 !important;
  padding:28px 32px;
  align-items:center;
  overflow:hidden;
  position:relative;
  top:0 !important;
  border:1px solid rgba(71,159,225,.28);
  border-radius:16px;
  background:linear-gradient(115deg,#0c1b2d 0%,#112b43 60%,#0e4165 100%);
  box-shadow:0 18px 42px rgba(12,31,49,.16);
  color:#fff;
}
body.cc-on #hubView .hub-bar::after {
  content:"";
  position:absolute;
  width:300px;
  height:300px;
  right:-90px;
  top:-150px;
  border:1px solid rgba(88,188,255,.2);
  border-radius:50%;
  box-shadow:0 0 0 38px rgba(67,164,230,.05),0 0 0 76px rgba(67,164,230,.035);
  pointer-events:none;
}
.cc-hero-copy { position:relative; z-index:1; }
.cc-kicker {
  display:block;
  color:#4db8ff;
  font:700 9.5px/1.2 "Barlow Semi Condensed";
  letter-spacing:.17em;
  text-transform:uppercase;
}
body.cc-on #hubView .hub-bar .mb-title {
  margin-top:8px;
  color:#fff;
  font-size:clamp(26px,2vw,34px);
  line-height:1.08;
}
.cc-hero-copy p { margin:8px 0 0; color:#aebed0; font-size:13px; }
body.cc-on #hubView .hub-bar .mb-actions {
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  gap:9px;
  margin-left:auto;
}
.cc-primary-action,.cc-secondary-action {
  min-height:42px;
  border-radius:9px;
  color:#fff;
  font:600 12.5px "Barlow";
  cursor:pointer;
}
.cc-primary-action {
  padding:0 16px;
  border:1px solid rgba(94,190,255,.5);
  background:#1689da;
  box-shadow:0 8px 20px rgba(0,116,199,.24);
}
.cc-primary-action span { margin-left:14px; }
.cc-primary-action:hover { background:#2499e8; }
.cc-secondary-action {
  padding:0 15px;
  border:1px solid rgba(130,203,249,.48);
  background:rgba(22,63,94,.7);
  color:#eaf6ff;
}
.cc-secondary-action:hover { background:rgba(35,86,124,.86); border-color:rgba(151,216,255,.7); }

body.cc-on #hubView #hubPulse { grid-area:pulse; width:100%; margin:0; }
.hub-pulse-grid {
  display:grid;
  width:100%;
  max-width:none;
  margin:14px 0 0;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.hub-pulse-grid .hp-card {
  min-height:104px;
  margin:0;
  padding:16px 18px;
  border:1px solid #dbe5ee;
  border-radius:13px;
  box-shadow:0 8px 28px rgba(16,40,65,.05);
}
.hub-pulse-grid .hp-operations .hp-stat { flex:1 1 0; }
.hub-pulse-grid .hp-operations .hp-stat b { color:var(--apx-accent-strong); }

.hub-workspace {
  grid-area:work;
  min-width:0;
  padding:20px;
  border:1px solid var(--apx-border);
  border-radius:14px;
  background:#fff;
  box-shadow:var(--apx-shadow-raised);
}
.hub-work-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:16px; }
.hub-work-head h2 { margin:4px 0 3px; color:var(--apx-text); font:700 22px/1.12 "Barlow Semi Condensed"; }
.hub-work-head p { margin:0; color:var(--apx-text-secondary); font-size:12.5px; }
.hub-workspace .work-summary { margin-bottom:12px; }
.hub-workspace .work-summary>div { min-height:72px; padding:13px 15px; box-shadow:none; background:#f8fafc; }
.hub-workspace .work-toolbar { padding-top:2px; }
.hub-workspace .work-list { min-width:0; }

body.cc-on #hubView .ann-wrap {
  grid-area:ann;
  width:100%;
  margin:0;
  align-self:start;
  border:1px solid #dbe4ed;
  border-radius:11px;
  box-shadow:0 5px 20px rgba(20,40,70,.06);
}
body.cc-on #hubView .ql-wrap {
  grid-area:links;
  width:100%;
  margin:0;
  align-self:start;
  border-radius:11px;
  box-shadow:0 5px 20px rgba(20,40,70,.06);
}

@media (min-width:1500px) {
  .hub-workspace .work-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .hub-workspace .work-item { height:100%; }
  .hub-workspace :is(.work-empty,.work-state) { grid-column:1/-1; }
}
@media (max-width:1100px) {
  body.cc-on #hubView {
    grid-template-columns:1fr;
    grid-template-areas:"install" "head" "pulse" "work" "ann" "links";
  }
  .hub-pulse-grid { grid-template-columns:1fr; }
}
@media (max-width:720px) {
  body.cc-on #hubView { width:auto !important; max-width:none !important; margin:12px 11px 96px !important; gap:12px; }
  body.cc-on #hubView .hub-bar { min-height:190px; padding:22px 19px; align-items:flex-start; flex-direction:column; }
  body.cc-on #hubView .hub-bar .mb-title { font-size:23px; }
  body.cc-on #hubView .hub-bar .mb-actions { display:grid; grid-template-columns:1fr; width:100%; margin:15px 0 0; }
  body.cc-on #hubView .hub-bar .mb-actions button { width:100%; }
  .hub-workspace { padding:15px 13px; }
  .hub-work-head { align-items:flex-start; }
  .hub-work-head h2 { font-size:20px; }
}
