.apwb,.apwb *{box-sizing:border-box}.apwb{display:grid;grid-template-columns:245px minmax(0,1fr);min-height:660px;background:#f6f8fc;color:#122744;border:1px solid #dce4ed;border-radius:14px;overflow:hidden;font-family:inherit}.apwb-side{background:#0a2344;color:white;padding:24px 15px;display:flex;flex-direction:column;gap:22px}.apwb-brand{font-size:22px;font-weight:800;letter-spacing:.4px;color:#f0bd48}.apwb-brand small,.apwb-user small{display:block;font-size:10px;letter-spacing:1.2px;color:#b9cbe0;margin-top:5px}.apwb-user{padding:14px;background:#16365b;border:1px solid #36516f;border-radius:10px;font-weight:700}.apwb-side nav{display:grid;gap:6px}.apwb-side nav a,.apwb-logout{display:block;padding:12px;border-radius:9px;color:#f4f7fc!important;text-decoration:none!important;font-weight:600;font-size:13px}.apwb-side nav a:hover,.apwb-side nav a.active{background:#e7b748;color:#122744!important}.apwb-logout{margin-top:auto;border:1px solid #55708d;text-align:center}.apwb-main{min-width:0;padding:28px}.apwb-main header{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:24px}.apwb-main header span{font-size:11px;letter-spacing:1px;color:#657992}.apwb-main h1{font-size:27px;line-height:1.2;margin:5px 0;color:#122744}.apwb-role{background:#fff;padding:9px;border-radius:7px;border:1px solid #d9e0e8}.apwb-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.apwb-stats a,.apwb-panel,.apwb-notice{background:#fff;border:1px solid #dce3ed;border-radius:12px;padding:20px;box-shadow:0 6px 22px #10284a0a}.apwb-stats a{text-decoration:none!important;color:#122744!important;display:flex;flex-direction:column;gap:8px}.apwb-stats strong{font-size:28px}.apwb-stats span,.apwb-head span{color:#657992;font-size:12px}.apwb-notice{margin-top:20px;line-height:1.65}.apwb-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.apwb-panel h2{font-size:20px;color:#122744;margin:0 0 15px}.apwb-table-wrap{max-width:100%;overflow-x:auto}.apwb table{width:100%;min-width:730px;border-collapse:collapse;font-size:12px}.apwb th,.apwb td{padding:12px 9px;border-bottom:1px solid #e6ebf1;text-align:left;vertical-align:middle}.apwb th{background:#edf2f7;color:#233f60}.apwb select{max-width:135px;font-size:12px;padding:6px}.apwb button{background:#edc15a!important;color:#172e4b!important;border:0!important;border-radius:6px;padding:7px 10px;margin:4px;cursor:pointer;font-weight:700}.apwb-success{padding:12px;background:#ecf9f0;border:1px solid #a7d5b5}.apwb-auth{max-width:480px;margin:35px auto;padding:25px;border:1px solid #dce3ed;border-radius:12px}.apwb-auth input{max-width:100%}@media(max-width:760px){.apwb{grid-template-columns:minmax(0,1fr)}.apwb-side{gap:10px;padding:14px}.apwb-side nav{display:flex;overflow-x:auto;gap:5px}.apwb-side nav a{white-space:nowrap}.apwb-logout{margin:0}.apwb-main{padding:15px}.apwb-main header{align-items:flex-start}.apwb-role{display:none}.apwb-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}

.apwb-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.apwb-details>div{padding:12px;background:#f6f8fc;border-radius:8px;overflow-wrap:anywhere}.apwb-details strong,.apwb-details span{display:block}.apwb-details strong{font-size:12px;color:#61738b;margin-bottom:5px}.apwb-details span{white-space:normal}.apwb-panel+.apwb-panel{margin-top:16px}.apwb-note{border-left:3px solid #e2b74f;padding:10px 14px;margin:12px 0;background:#f9fafc}.apwb-note p{margin:8px 0 0}.apwb-muted{color:#667991}.apwb textarea{display:block;width:100%;margin:8px 0 12px;padding:12px;border:1px solid #ccd7e3;border-radius:7px}@media(max-width:760px){.apwb-details{grid-template-columns:1fr}}
/* v0.8.0: Full-bleed workspace without altering the site's global header/footer. */
.apwb{width:100vw!important;max-width:none!important;margin-left:calc(50% - 50vw)!important;margin-right:calc(50% - 50vw)!important;grid-template-columns:260px minmax(0,1fr)!important;border:0!important;border-radius:0!important;min-height:calc(100vh - 120px);overflow:visible!important}
.apwb-side{padding:27px 18px!important;gap:24px;min-height:100%;background:#0b2346}
.apwb-brand{display:flex;flex-direction:column;align-items:flex-start;gap:7px;padding:0 8px 4px}
.apwb-brand img{display:block;width:175px;max-width:100%;height:auto;object-fit:contain}
.apwb-brand small{margin:0;color:#d7b354;font-size:10px;letter-spacing:1.45px}
.apwb-side nav{gap:5px}.apwb-side nav a{padding:13px 14px!important;border-radius:9px}
.apwb-main{padding:34px clamp(20px,3vw,56px)!important;min-width:0;width:100%}
.apwb-main header{padding-bottom:19px;border-bottom:1px solid #e2e9f2;margin-bottom:24px}
.apwb-main h1{font-size:clamp(25px,2.3vw,36px)}
.apwb-welcome{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:26px 30px;margin-bottom:22px;border-radius:14px;background:linear-gradient(110deg,#0d2b53,#16457b);color:white}
.apwb-welcome span:first-child{font-size:10px;letter-spacing:1.7px;color:#f0c45d;font-weight:800}
.apwb-welcome h2{font-size:clamp(20px,2vw,29px);margin:8px 0;color:white!important}
.apwb-welcome p{color:#dce8f6;margin:0;line-height:1.6}.apwb-welcome-icon{font-size:50px;color:#f0c45d}
.apwb-stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}.apwb-stats a{min-height:125px;justify-content:center;border-top:3px solid #e6b545}
.apwb-stats strong{font-size:clamp(25px,2.4vw,38px)}
.apwb-quick-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(280px,1fr);gap:18px;margin-top:20px;align-items:start}
.apwb-quick-grid .apwb-panel{margin:0;min-width:0}
.apwb-quick-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:20px}
.apwb-quick-links a,.apwb-manage-link{display:block;text-decoration:none!important;background:#f6f8fc;border:1px solid #dbe4ef;border-radius:9px;padding:13px;color:#0b2b50!important;font-weight:700}
.apwb-quick-links a:hover,.apwb-manage-link:hover{background:#fff1cb;border-color:#e3b342}
.apwb-team-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}
.apwb-team-summary>div{padding:21px;background:white;border:1px solid #dce3ed;border-top:3px solid #e4b449;border-radius:11px}
.apwb-team-summary strong{display:block;font-size:23px;color:#0c284c}.apwb-team-summary span{display:block;font-size:12px;color:#647890;margin-top:7px}
.apwb-team-footer{margin-top:18px}
.apwb-panel ol{padding-left:20px;line-height:1.9}.apwb-panel p{line-height:1.7}
@media(max-width:1050px){.apwb-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.apwb-quick-grid{grid-template-columns:1fr}}
@media(max-width:760px){.apwb{grid-template-columns:1fr!important}.apwb-side{min-height:auto;padding:16px!important;gap:13px}.apwb-brand img{width:145px}.apwb-side nav{display:flex;overflow-x:auto}.apwb-main{padding:20px 14px!important}.apwb-team-summary{grid-template-columns:1fr}.apwb-quick-links{grid-template-columns:1fr}.apwb-welcome{padding:20px}.apwb-welcome-icon{display:none}}


/* v0.8.2 — Seam coverage. No negative-margin/padding guesses.
   The two background extensions are independent of the variable portal height.
   Elementor's outer spacing may be outside .apwb, so the backgrounds extend
   behind the global header and the footer wave without editing either. */
body:has(.apwb) .apwb{
  --apwb-side-width:260px;
  position:relative!important;
  z-index:0;
  isolation:isolate;
  margin-top:0!important;
  margin-bottom:0!important;
  padding:0!important;
  min-height:calc(100dvh - 150px)!important;
  height:auto!important;
  align-items:stretch!important;
  background:linear-gradient(to right,#0b2346 0 var(--apwb-side-width),#f6f8fc var(--apwb-side-width) 100%)!important;
}
/* Paint the external Elementor gaps, not just the inner portal rectangle. */
body:has(.apwb) .apwb::before,
body:has(.apwb) .apwb::after{
  content:""!important;
  display:block!important;
  position:absolute!important;
  top:-120px!important;
  bottom:-120px!important;
  pointer-events:none!important;
  z-index:-1!important;
}
body:has(.apwb) .apwb::before{
  left:0!important;
  width:var(--apwb-side-width)!important;
  background:#0b2346!important;
}
body:has(.apwb) .apwb::after{
  left:var(--apwb-side-width)!important;
  right:0!important;
  background:#f6f8fc!important;
}
body:has(.apwb) .apwb-side{
  background:#0b2346!important;
  align-self:stretch!important;
  height:auto!important;
  min-height:0!important;
}
body:has(.apwb) .apwb-main{
  background:#f6f8fc!important;
  align-self:stretch!important;
  min-height:0!important;
}
/* Keep the real site header and footer in front of the extended background. */
body:has(.apwb) :is(header.site-header,#masthead,.elementor-location-header,footer.site-footer,#colophon,.elementor-location-footer){
  position:relative;
  z-index:2;
}
@media(max-width:760px){
 body:has(.apwb) .apwb{
   --apwb-side-width:0px;
   grid-template-columns:minmax(0,1fr)!important;
   background:#f6f8fc!important;
 }
 body:has(.apwb) .apwb::before{display:none!important}
 body:has(.apwb) .apwb::after{left:0!important}
}

/* Phase 8: inline additions only; existing customer portal shell remains unchanged. */
.apwb-customer-sync{clear:both;max-width:100%;margin:24px 0 0;padding:20px;border:1px solid #e3e9f3;border-radius:14px;background:#fff;color:#10284a;box-sizing:border-box}
.apwb-customer-sync *{box-sizing:border-box}
.apwb-customer-sync h3{color:#10284a;margin:0 0 14px}
.apwb-customer-sync section{border:1px solid #e3e9f3;border-radius:10px;padding:16px;margin:12px 0}
.apwb-customer-sync button{background:#dba52d;color:#0b2346;border:0;border-radius:7px;padding:10px 14px;cursor:pointer}
.apwb-customer-sync textarea{display:block;width:100%;min-height:90px;margin:10px 0;border:1px solid #cbd5e1;border-radius:7px;padding:10px}
.apwb-customer-sync form{margin:12px 0}
