:root{
  --mgaci-brand-primary:#b72928;
  --mgaci-brand-primary-strong:#891b1b;
  --mgaci-brand-secondary:#0f141b;
  --mgaci-surface:#ffffff;
  --mgaci-surface-alt:#f5f7fb;
  --mgaci-text:#18212f;
  --mgaci-muted:#5f6b7b;
  --mgaci-border:#d9e0ea;
  --mgaci-radius:18px;
  --mgaci-shadow:0 18px 50px rgba(15,23,42,.08);
  --mgaci-shadow-soft:0 10px 28px rgba(15,23,42,.05);
  --mgaci-content-width:1280px;
  --mgaci-transition:180ms ease;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--mgaci-text);
  background:linear-gradient(180deg,#f9fbfd 0%,#f3f6fa 100%);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto}
input,button,textarea,select{font:inherit}
.site{min-height:100vh}
.site-content{padding:0}
body.home .site-content{padding:0 !important}

.mgaci-container{
  width:min(100% - 32px,var(--mgaci-content-width));
  margin-inline:auto;
}

/* public header */
.mgaci-site-header{
  position:sticky;
  top:0;
  z-index:100;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(217,224,234,.85);
}
.mgaci-header-inner{
  min-height:78px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:24px;
}
.mgaci-branding{
  display:flex;
  align-items:center;
}
.mgaci-logo-link{
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  line-height:0;
}
.mgaci-primary-nav{
  justify-self:center;
}
.mgaci-menu,
.mgaci-menu ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  align-items:center;
  gap:18px;
}
.mgaci-menu li{
  margin:0;
  padding:0;
}
.mgaci-menu a{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:0 14px;
  border-radius:999px;
  color:var(--mgaci-muted);
  transition:all var(--mgaci-transition);
}
.mgaci-menu a:hover,
.mgaci-menu .current-menu-item>a,
.mgaci-menu .current_page_item>a{
  background:rgba(183,41,40,.08);
  color:var(--mgaci-brand-primary);
}
.mgaci-header-actions{
  display:flex;
  align-items:center;
  gap:12px;
  justify-self:end;
}

/* buttons */
.mgaci-button,
.mgaci-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:46px;
  padding:0 18px;
  border-radius:14px;
  border:1px solid transparent;
  background:linear-gradient(135deg,var(--mgaci-brand-primary),var(--mgaci-brand-primary-strong));
  color:#fff;
  font-weight:700;
  box-shadow:var(--mgaci-shadow-soft);
  cursor:pointer;
  transition:transform var(--mgaci-transition),box-shadow var(--mgaci-transition),background var(--mgaci-transition);
}
.mgaci-button:hover,
.mgaci-btn:hover{
  transform:translateY(-1px);
  box-shadow:var(--mgaci-shadow);
}
.mgaci-button-secondary,
.mgaci-btn-secondary{
  background:#fff;
  color:var(--mgaci-text);
  border-color:var(--mgaci-border);
  box-shadow:none;
}

/* public footer */
.mgaci-site-footer{
  padding:26px 0 40px;
  background:#fff;
  color:#516272;
  border-top:1px solid #e8edf3;
}
.mgaci-footer-inner{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
}
.mgaci-footer-title{
  margin:0 0 4px;
  font-weight:800;
  color:#15263c;
}
.mgaci-footer-copy{
  margin:0;
  color:#6f8194;
}
.mgaci-footer-menu{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  gap:16px;
  flex-wrap:wrap;
}
.mgaci-footer-menu a{
  color:#627487;
}

/* dashboard shell */
body.page{
  background:#f4f7fb;
}

.mgaci-app-shell{
  padding:22px;
}

.mgaci-app-grid{
  display:grid;
  grid-template-columns:280px minmax(0,1fr);
  gap:22px;
  align-items:start;
}

.mgaci-app-sidebar{
  position:sticky;
  top:22px;
}

.mgaci-app-sidebar-inner{
  background:#ffffff;
  border:1px solid #e8edf3;
  border-radius:28px;
  box-shadow:0 18px 42px rgba(15,23,42,.06);
  padding:22px;
}

.mgaci-app-logo{
  display:inline-flex;
  align-items:center;
  line-height:0;
  margin-bottom:22px;
}

.mgaci-app-logo img{
  display:block;
  height:50px;
  width:auto;
  max-width:220px;
  object-fit:contain;
}

.mgaci-app-role-block{
  margin-bottom:18px;
}

.mgaci-app-role-kicker,
.mgaci-app-topbar-kicker{
  display:inline-block;
  margin-bottom:8px;
  color:#6c7d90;
  text-transform:uppercase;
  letter-spacing:.16em;
  font-size:11px;
  font-weight:800;
}

.mgaci-app-role-block h2{
  margin:0 0 6px;
  color:#14253b;
  font-size:24px;
  line-height:1.1;
}

.mgaci-app-role-block p{
  margin:0;
  color:#748498;
  font-size:14px;
  line-height:1.7;
}

.mgaci-app-menu{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:8px;
}

.mgaci-app-link{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border-radius:16px;
  color:#526476;
  transition:all .18s ease;
}

.mgaci-app-link:hover{
  background:#f6f8fb;
  color:#14253b;
}

.mgaci-app-link.is-active{
  background:rgba(183,41,40,.08);
  color:#b72928;
}

.mgaci-app-link-icon{
  width:40px;
  height:40px;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#f4f7fb;
  color:currentColor;
  flex:0 0 40px;
}

.mgaci-app-link-icon svg{
  width:18px;
  height:18px;
  display:block;
}

.mgaci-app-main{
  display:grid;
  gap:20px;
  min-width:0;
}

.mgaci-app-topbar{
  background:#ffffff;
  border:1px solid #e8edf3;
  border-radius:28px;
  box-shadow:0 18px 42px rgba(15,23,42,.06);
  padding:24px 28px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
}

.mgaci-app-topbar h1{
  margin:0 0 8px;
  color:#14253b;
  font-size:42px;
  line-height:.98;
  letter-spacing:-.04em;
}

.mgaci-app-topbar p{
  margin:0;
  color:#718297;
  font-size:15px;
  line-height:1.8;
}

.mgaci-app-topbar-actions{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.mgaci-app-content-card{
  background:transparent;
  min-width:0;
}

.mgaci-dashboard-entry-content > :first-child{
  margin-top:0;
}
.mgaci-dashboard-entry-content > :last-child{
  margin-bottom:0;
}

/* plugin content polish */
.mgaci-dashboard-entry-content .mgaci-section{
  margin:0 0 20px;
}

.mgaci-dashboard-entry-content .mgaci-section:last-child{
  margin-bottom:0;
}

.mgaci-dashboard-entry-content .mgaci-kpi-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:20px;
}

.mgaci-dashboard-entry-content .mgaci-card{
  background:#ffffff;
  border:1px solid #e8edf3;
  border-radius:26px;
  box-shadow:0 18px 42px rgba(15,23,42,.06);
  padding:26px;
}

.mgaci-dashboard-entry-content .mgaci-label{
  display:inline-block;
  margin-bottom:14px;
  color:#718297;
  text-transform:uppercase;
  letter-spacing:.14em;
  font-size:11px;
  font-weight:800;
}

.mgaci-dashboard-entry-content .mgaci-big{
  display:block;
  color:#14253b;
  font-size:44px;
  line-height:1;
  letter-spacing:-.04em;
  font-weight:800;
}

.mgaci-dashboard-entry-content .mgaci-card h2{
  margin:0 0 10px;
  color:#14253b;
  font-size:28px;
  line-height:1.1;
}

.mgaci-dashboard-entry-content .mgaci-card p,
.mgaci-dashboard-entry-content .mgaci-card li{
  color:#67788c;
  line-height:1.8;
}

.mgaci-dashboard-entry-content .mgaci-btn{
  min-height:42px;
  padding:0 16px;
  border-radius:12px;
}

.mgaci-dashboard-entry-content .mgaci-shell,
.mgaci-dashboard-entry-content .mgaci-builder-card{
  border-radius:24px;
}

.mgaci-entry-content > :first-child{
  margin-top:0;
}
.mgaci-entry-content > :last-child{
  margin-bottom:0;
}

.alignleft{float:left;margin-right:1.5rem}
.alignright{float:right;margin-left:1.5rem}
.aligncenter{display:block;margin-left:auto;margin-right:auto}
.wp-caption{max-width:100%}
.screen-reader-text{
  position:absolute !important;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

@media (max-width:980px){
  .mgaci-header-inner{
    grid-template-columns:1fr;
    justify-items:start;
    gap:14px;
    padding-top:12px;
    padding-bottom:12px;
  }

  .mgaci-primary-nav{
    justify-self:start;
    width:100%;
  }

  .mgaci-menu{
    flex-wrap:wrap;
    gap:10px;
  }

  .mgaci-header-actions{
    justify-self:start;
  }

  .mgaci-app-grid{
    grid-template-columns:1fr;
  }

  .mgaci-app-sidebar{
    position:static;
  }

  .mgaci-app-topbar{
    flex-direction:column;
    align-items:flex-start;
  }

  .mgaci-app-topbar h1{
    font-size:34px;
  }
}

@media (max-width:640px){
  .mgaci-footer-inner{
    flex-direction:column;
  }

  .mgaci-app-shell{
    padding:14px;
  }

  .mgaci-app-sidebar-inner,
  .mgaci-app-topbar{
    padding:18px;
    border-radius:22px;
  }

  .mgaci-app-logo img{
    height:42px;
    max-width:180px;
  }

  .mgaci-app-topbar h1{
    font-size:28px;
  }

  .mgaci-app-topbar-actions,
  .mgaci-app-topbar-actions .mgaci-button{
    width:100%;
  }

  .mgaci-dashboard-entry-content .mgaci-big{
    font-size:34px;
  }
}
.mgaci-app-sidebar-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.mgaci-app-close,.mgaci-app-toggle{appearance:none;border:0;background:#f4f7fb;color:#14253b;border-radius:14px;width:44px;height:44px;display:none;align-items:center;justify-content:center;cursor:pointer}
.mgaci-app-close{font-size:28px;line-height:1}
.mgaci-app-topbar-leading{display:flex;align-items:flex-start;gap:16px}
.mgaci-app-toggle span{display:block;width:18px;height:2px;background:currentColor;border-radius:999px;margin:3px auto}
.mgaci-app-link{font-weight:600}
.mgaci-app-link-icon{width:36px;height:36px;border-radius:12px;background:#f7f9fc;flex:0 0 36px}
.mgaci-app-link-icon svg{width:19px;height:19px}
.mgaci-app-link.is-active .mgaci-app-link-icon{background:rgba(183,41,40,.14)}
.mgaci-app-topbar h1{font-size:36px}
@media (max-width:980px){
  .mgaci-app-toggle,.mgaci-app-close{display:inline-flex}
  .mgaci-app-sidebar{position:fixed;inset:0 auto 0 0;width:min(86vw,340px);z-index:300;transform:translateX(-108%);transition:transform .2s ease;pointer-events:none}
  .mgaci-sidebar-open .mgaci-app-sidebar{transform:translateX(0);pointer-events:auto}
  .mgaci-app-sidebar:before{content:"";position:fixed;inset:0;background:rgba(15,23,42,.36);opacity:0;pointer-events:none;transition:opacity .2s ease}
  .mgaci-sidebar-open .mgaci-app-sidebar:before{opacity:1;pointer-events:auto}
  .mgaci-app-sidebar-inner{position:relative;height:100vh;overflow:auto;border-radius:0 28px 28px 0}
  .mgaci-app-main{padding-top:0}
}
@media (max-width:640px){
  .mgaci-app-topbar-leading{width:100%}
  .mgaci-app-topbar-actions{width:100%}
  .mgaci-app-topbar-actions .mgaci-button{flex:1 1 auto}
  .mgaci-app-topbar h1{font-size:28px}
}

.mgaci-app-logo-text{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:0 14px;border-radius:14px;background:#fff;color:#111827;font-weight:800;letter-spacing:.02em;box-shadow:0 8px 24px rgba(15,23,42,.08)}
.mgaci-app-logo img,.mgaci-app-logo .custom-logo{max-width:160px;height:auto;display:block}

.mgaci-app-sidebar-inner{background:linear-gradient(180deg,#ffffff 0%,#fbfcfe 100%);border-color:#eef2f7}
.mgaci-app-logo img,.mgaci-app-logo .custom-logo{max-width:190px}
.mgaci-app-role-block h2{font-size:28px;letter-spacing:-.03em}
.mgaci-app-link{padding:12px 13px;border-radius:18px;font-weight:700}
.mgaci-app-link-icon{background:#f6f8fb;border:1px solid #edf2f7}
.mgaci-app-topbar{background:linear-gradient(135deg,#fff 0%,#fffafa 55%,#f8fbff 100%);border-color:#f1d7d7;position:relative;overflow:hidden}
.mgaci-app-topbar:after{content:"";position:absolute;right:-60px;top:-50px;width:220px;height:220px;border-radius:50%;background:radial-gradient(circle,rgba(183,41,40,.13),rgba(183,41,40,0) 70%)}
.mgaci-app-topbar h1{max-width:12ch}
.mgaci-app-content-card{padding-bottom:18px}
@media (max-width:640px){
  .mgaci-app-topbar{padding:18px 16px}
  .mgaci-app-topbar-actions{gap:10px}
  .mgaci-app-link span:last-child{font-size:15px}
}


.mgaci-topbar-pill{display:inline-flex;align-items:center;gap:10px;min-height:44px;padding:0 14px;border-radius:999px;background:#fff;border:1px solid var(--mgaci-border);color:var(--mgaci-text);font-weight:700;box-shadow:var(--mgaci-shadow-soft)}
.mgaci-topbar-pill strong{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:24px;padding:0 6px;border-radius:999px;background:var(--mgaci-brand-primary);color:#fff;font-size:12px}
.mgaci-hero-panel{display:grid;grid-template-columns:1.6fr 1fr;gap:24px;align-items:center}
.mgaci-customer-workspace{display:grid;gap:18px}
.mgaci-customer-workspace-head{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:16px;border:1px solid #edf1f6;border-radius:20px;background:#fafcff}
.mgaci-chat-mini{display:grid;gap:10px;margin-top:10px}
.mgaci-chat-bubble{padding:12px 14px;border-radius:16px;background:#f5f7fb;border:1px solid #e6ebf2}
.mgaci-chat-bubble.is-self{background:#fff3f1;border-color:#f3c7c1}
.mgaci-chat-bubble strong{display:block;font-size:12px;letter-spacing:.04em;text-transform:uppercase;color:#64748b;margin-bottom:4px}
.mgaci-chat-bubble p{margin:0;color:#24364a}
.mgaci-customer-cell{display:flex;align-items:center;gap:12px}
.mgaci-customer-thumb{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:14px;overflow:hidden;background:#fff;border:1px solid #e5e7eb}
.mgaci-customer-thumb.is-fallback{background:linear-gradient(135deg,var(--mgaci-brand-primary),var(--mgaci-brand-primary-strong));color:#fff;font-weight:800}
@media (max-width: 1024px){
  .mgaci-hero-panel{grid-template-columns:1fr}
}
@media (max-width: 782px){
  .mgaci-app-topbar-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%}
  .mgaci-topbar-pill,.mgaci-button,.mgaci-button-secondary{width:100%}
  .mgaci-customer-workspace-head{flex-direction:column;align-items:flex-start}
}
