:root{
  --sp-primary:#5B4BFF;
  --sp-orange:#FF8A00;
  --sp-sidebar:#071226;
  --sp-bg:#F7F8FC;
  --sp-card:#FFFFFF;
  --sp-text:#111827;
  --sp-muted:#64748b;
  --sp-line:#e5e7eb;
  --sp-radius:22px;
  --sp-shadow:0 18px 45px rgba(15,23,42,.10);
}
body:has(.sp-portal-ecosystem){background:var(--sp-bg)!important;}
.sp-portal-ecosystem{font-family:Inter,Arial,sans-serif;background:var(--sp-bg);color:var(--sp-text);min-height:100vh;display:grid;grid-template-columns:280px minmax(0,1fr);width:100%;overflow-x:hidden;}
.sp-portal-sidebar{background:linear-gradient(180deg,#071226 0%,#0b1730 100%);color:#fff;min-height:100vh;padding:24px 20px;position:sticky;top:0;align-self:start;box-shadow:14px 0 35px rgba(15,23,42,.18);z-index:4;}
.sp-portal-role-pill{display:inline-flex;align-items:center;justify-content:center;padding:11px 20px;border-radius:999px;background:linear-gradient(135deg,var(--sp-primary),#7c3aed);font-weight:900;text-transform:uppercase;font-size:13px;letter-spacing:.04em;margin-bottom:26px;}
.sp-portal-sidebar-logo{margin:6px 0 28px;}.sp-portal-sidebar-logo .sp-hele-portal-logo-fallback{display:flex;gap:12px;align-items:center;color:#fff}.sp-portal-sidebar-logo .sp-hele-portal-logo-fallback span{background:linear-gradient(135deg,#fff,var(--sp-orange));color:#071226;width:52px;height:52px;border-radius:16px;display:grid;place-items:center;font-weight:900}.sp-portal-sidebar-logo .sp-hele-portal-logo-fallback strong{font-size:26px;line-height:1.05}.sp-portal-sidebar-logo img{max-width:180px;height:auto;display:block}
.sp-portal-nav{display:grid;gap:8px}.sp-portal-nav a{display:flex;align-items:center;gap:12px;color:#e5edff!important;text-decoration:none!important;padding:13px 14px;border-radius:13px;font-weight:750;transition:.18s ease}.sp-portal-nav a span{width:24px;text-align:center}.sp-portal-nav a:hover,.sp-portal-nav a.is-active{background:linear-gradient(135deg,var(--sp-primary),#4f46e5);color:#fff!important;transform:translateX(3px);}
.sp-portal-main{min-width:0}.sp-portal-topbar{height:76px;background:#fff;border-bottom:1px solid var(--sp-line);display:flex;align-items:center;gap:18px;padding:0 28px;position:sticky;top:0;z-index:3}.sp-portal-menu-toggle{width:44px;height:44px;border:0;background:#fff;border-radius:12px;font-size:22px;cursor:pointer}.sp-portal-search{margin-left:auto;position:relative;width:min(340px,36vw)}.sp-portal-search input{width:100%;border:1px solid #dbe3ef;border-radius:14px;padding:13px 44px 13px 16px;background:#fff;font-size:15px}.sp-portal-search span{position:absolute;right:14px;top:50%;transform:translateY(-50%)}.sp-portal-top-actions{display:flex;align-items:center;gap:12px}.sp-portal-top-actions>a{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#f1f5f9;text-decoration:none}.sp-portal-profile-menu{display:flex;align-items:center;gap:10px;border:0;background:#fff;font-weight:800;cursor:pointer}.sp-portal-profile-menu img{width:42px;height:42px;border-radius:50%;object-fit:cover;border:2px solid #fff;box-shadow:0 0 0 1px #dbe3ef}
.sp-portal-content{max-width:1500px;margin:0 auto;padding:28px 28px 60px}.sp-portal-welcome-strip{background:linear-gradient(135deg,#151a4d,var(--sp-primary));border-radius:24px;color:#fff;padding:28px 34px;margin-bottom:22px;box-shadow:var(--sp-shadow);position:relative;overflow:hidden}.sp-portal-welcome-strip:after{content:"";position:absolute;right:-80px;top:-90px;width:260px;height:260px;border-radius:50%;background:rgba(255,138,0,.25)}.sp-portal-welcome-strip span{text-transform:uppercase;font-size:12px;font-weight:900;letter-spacing:.08em;color:#ffd28a}.sp-portal-welcome-strip h1{margin:6px 0;font-size:clamp(30px,4vw,56px);line-height:1;color:#fff!important}.sp-portal-welcome-strip p{margin:0;color:#eef2ff;font-size:18px}
.sp-portal-profile-header{margin-bottom:16px}.sp-portal-profile-header .sp-hele-fb-profile-card{background:#fff;border-radius:24px;overflow:hidden;box-shadow:var(--sp-shadow);border:1px solid rgba(15,23,42,.07)}.sp-portal-profile-header .sp-hele-fb-cover{min-height:260px;background:radial-gradient(circle at 25% 35%,rgba(91,75,255,.36),transparent 28%),linear-gradient(120deg,#18205f,#5B4BFF 55%,#FF8A00);background-size:cover;background-position:center;position:relative}.sp-portal-profile-header .sp-hele-fb-cover-overlay{display:none}.sp-portal-profile-header .sp-hele-fb-logo{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:#fff}.sp-portal-profile-header .sp-hele-portal-logo-fallback{display:flex;gap:20px;align-items:center;color:#fff}.sp-portal-profile-header .sp-hele-portal-logo-fallback span{width:94px;height:94px;border-radius:24px;background:#fff;color:var(--sp-primary);display:grid;place-items:center;font-size:32px;font-weight:900}.sp-portal-profile-header .sp-hele-portal-logo-fallback strong{font-size:48px;line-height:1}.sp-portal-profile-header .sp-hele-portal-logo-img{max-height:120px;width:auto}.sp-portal-profile-header .sp-hele-fb-cover-actions{position:absolute;right:24px;top:24px;display:flex;gap:10px}.sp-portal-profile-header .sp-hele-fb-mini-btn{background:rgba(17,24,39,.65);color:#fff;border-radius:12px;padding:11px 15px;font-weight:800;cursor:pointer;backdrop-filter:blur(8px)}
.sp-portal-profile-header .sp-hele-fb-profile-body{display:grid;grid-template-columns:190px minmax(0,1fr) auto;gap:24px;align-items:end;padding:0 30px 30px;position:relative}.sp-portal-profile-header .sp-hele-fb-avatar{width:180px;height:180px;border-radius:50%;margin-top:-82px;background:#fff;border:7px solid #fff;box-shadow:0 18px 35px rgba(15,23,42,.18);position:relative;overflow:visible;cursor:pointer}.sp-portal-profile-header .sp-hele-fb-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}.sp-portal-profile-header .sp-hele-fb-avatar span{position:absolute;right:8px;bottom:12px;background:#fff;border-radius:50%;width:42px;height:42px;display:grid;place-items:center;box-shadow:0 8px 20px rgba(15,23,42,.18)}.sp-portal-profile-header .sp-hele-fb-info h3{font-size:30px;margin:0;color:var(--sp-text)!important}.sp-portal-profile-header .sp-hele-fb-role{display:inline-block;color:var(--sp-primary);font-weight:900;margin:6px 0}.sp-portal-profile-header .sp-hele-fb-info textarea{width:100%;border:0;background:transparent;resize:vertical;color:#334155;min-height:54px;font-size:16px;padding:0}.sp-portal-profile-header .sp-hele-fb-actions{display:flex;gap:12px;flex-wrap:wrap;justify-content:flex-end}.sp-portal-profile-header .sp-hele-fb-btn{border-radius:13px;padding:13px 17px;font-weight:900;border:1px solid #dbe3ef;cursor:pointer;text-decoration:none}.sp-portal-profile-header .sp-hele-fb-btn-primary{background:linear-gradient(135deg,var(--sp-primary),#6d5dfc);border:0;color:#fff}.sp-portal-profile-header .sp-hele-fb-btn-light{background:#fff;color:#1f2937}.sp-hele-fb-file{display:none!important}
.sp-portal-tabs{display:flex;gap:6px;background:#fff;border-radius:18px;padding:8px;margin:14px 0 22px;box-shadow:0 10px 28px rgba(15,23,42,.06);overflow:auto}.sp-portal-tabs a{color:#475569!important;text-decoration:none!important;padding:14px 20px;border-radius:13px;font-weight:850;white-space:nowrap}.sp-portal-tabs a.is-active,.sp-portal-tabs a:hover{background:#eef2ff;color:var(--sp-primary)!important}
.sp-portal-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.sp-portal-card-grid{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.sp-portal-card,.sp-portal-widget,.sp-portal-continue-card{background:var(--sp-card);border-radius:var(--sp-radius);box-shadow:0 10px 26px rgba(15,23,42,.06);border:1px solid rgba(15,23,42,.07);padding:22px;color:var(--sp-text)!important;text-decoration:none!important}.sp-portal-card{display:flex;gap:16px;align-items:center;transition:.18s ease}.sp-portal-card:hover{transform:translateY(-3px);box-shadow:var(--sp-shadow)}.sp-portal-card-icon{width:54px;height:54px;border-radius:17px;background:#eef2ff;display:grid;place-items:center;font-size:25px}.sp-portal-card strong{font-size:30px;display:block}.sp-portal-card h3{margin:0 0 4px;font-size:18px;color:var(--sp-text)!important}.sp-portal-card p{margin:0;color:var(--sp-muted)}.sp-portal-continue-card{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:22px;background:linear-gradient(135deg,#fff,#f8fbff)}.sp-portal-continue-card span{text-transform:uppercase;color:var(--sp-orange);font-weight:900;font-size:12px;letter-spacing:.06em}.sp-portal-continue-card h2{margin:6px 0;font-size:30px;color:var(--sp-text)!important}.sp-portal-continue-card p{margin:0;color:#475569}.sp-portal-primary{background:linear-gradient(135deg,var(--sp-primary),#6d5dfc);color:#fff!important;border-radius:999px;padding:14px 22px;text-decoration:none!important;font-weight:900;white-space:nowrap}.sp-portal-widget h3{margin:0;color:var(--sp-text)!important}.sp-portal-widget-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:14px}.sp-portal-widget-head a,.sp-portal-widget-head span{color:var(--sp-primary);font-weight:850;text-decoration:none}.sp-portal-progress{height:12px;background:#edf2f7;border-radius:999px;overflow:hidden}.sp-portal-progress i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,var(--sp-primary),var(--sp-orange))}.sp-portal-widget p{color:#475569}.sp-portal-lessons-widget ul,.sp-portal-assignments-widget ul{list-style:none;padding:0;margin:0;display:grid;gap:10px}.sp-portal-lessons-widget li,.sp-portal-assignments-widget li{display:flex;align-items:center;gap:12px;padding:12px;border-radius:14px;background:#f8fafc}.sp-portal-lessons-widget li a{margin-left:auto;background:var(--sp-primary);color:#fff!important;border-radius:10px;padding:8px 12px;text-decoration:none;font-weight:850}.sp-portal-mini-stats{display:grid;grid-template-columns:1fr 1fr;gap:12px}.sp-portal-mini-stats span{background:#f8fafc;border-radius:16px;padding:16px}.sp-portal-mini-stats strong{font-size:28px;display:block}.sp-portal-wide{grid-column:1/-1}.sp-portal-action-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.sp-portal-action-row .sp-hele-action-card{background:#f8fafc;border-color:#e5e7eb}.sp-portal-action-row .sp-hele-action-main{color:var(--sp-text)!important}.sp-portal-action-row .sp-hele-action-main strong{color:var(--sp-text)!important}.sp-portal-action-row .sp-hele-action-main small{color:#475569!important}.sp-hele-profile-notice{background:#ecfdf5;border:1px solid #bbf7d0;color:#047857;border-radius:14px;padding:12px 16px;margin-bottom:16px}.sp-hele-profile-error{background:#fef2f2;border-color:#fecaca;color:#b91c1c}
.sp-portal-teacher .sp-portal-welcome-strip{background:linear-gradient(135deg,#0f766e,#5B4BFF)}.sp-portal-parent .sp-portal-welcome-strip{background:linear-gradient(135deg,#6d28d9,#ec4899)}.sp-portal-teacher .sp-portal-card-icon{background:#ecfdf5}.sp-portal-parent .sp-portal-card-icon{background:#fff7ed}
@media(max-width:1100px){.sp-portal-ecosystem{grid-template-columns:1fr}.sp-portal-sidebar{position:relative;min-height:auto}.sp-portal-nav{grid-template-columns:repeat(2,minmax(0,1fr))}.sp-portal-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sp-portal-profile-header .sp-hele-fb-profile-body{grid-template-columns:140px 1fr}.sp-portal-profile-header .sp-hele-fb-actions{grid-column:1/-1;justify-content:flex-start}.sp-portal-action-row{grid-template-columns:1fr}}
@media(max-width:720px){.sp-portal-content{padding:18px}.sp-portal-topbar{padding:0 14px}.sp-portal-search{display:none}.sp-portal-profile-menu span{display:none}.sp-portal-card-grid,.sp-portal-grid{grid-template-columns:1fr}.sp-portal-continue-card{display:block}.sp-portal-continue-card .sp-portal-primary{display:inline-flex;margin-top:16px}.sp-portal-profile-header .sp-hele-fb-cover{min-height:180px}.sp-portal-profile-header .sp-hele-fb-profile-body{display:block;padding:0 20px 24px}.sp-portal-profile-header .sp-hele-fb-avatar{width:132px;height:132px;margin-top:-64px}.sp-portal-profile-header .sp-hele-fb-info h3{font-size:24px}.sp-portal-profile-header .sp-hele-fb-actions{margin-top:14px}.sp-portal-sidebar{padding:18px}.sp-portal-nav{grid-template-columns:1fr}.sp-portal-profile-header .sp-hele-portal-logo-fallback strong{font-size:30px}.sp-portal-profile-header .sp-hele-portal-logo-fallback span{width:64px;height:64px}}

/* v3.2.6 Portal layout corrections: logo, profile header, tabs, topbar actions */
.sp-portal-sidebar{
  width:280px;
  box-sizing:border-box;
}
.sp-portal-sidebar-logo,
.sp-portal-sidebar-logo *{
  box-sizing:border-box;
}
.sp-portal-sidebar-logo .sp-hele-portal-logo-fallback{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:12px!important;
  width:100%!important;
  min-width:0!important;
  white-space:nowrap!important;
  overflow:visible!important;
}
.sp-portal-sidebar-logo .sp-hele-portal-logo-fallback span{
  flex:0 0 54px!important;
  width:54px!important;
  height:54px!important;
  min-width:54px!important;
}
.sp-portal-sidebar-logo .sp-hele-portal-logo-fallback strong{
  display:block!important;
  flex:1 1 auto!important;
  min-width:0!important;
  max-width:170px!important;
  white-space:normal!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  hyphens:none!important;
  font-size:25px!important;
  line-height:1.08!important;
  letter-spacing:0!important;
  text-align:left!important;
  color:#fff!important;
}
.sp-portal-sidebar-logo img{
  max-width:190px!important;
  width:auto!important;
  height:auto!important;
}

.sp-portal-profile-header .sp-hele-fb-profile-body{
  grid-template-columns:180px minmax(320px,1fr)!important;
  grid-template-areas:
    "avatar info"
    "avatar actions";
  align-items:start!important;
  gap:22px 26px!important;
  padding:0 34px 32px!important;
}
.sp-portal-profile-header .sp-hele-fb-avatar{
  grid-area:avatar!important;
  justify-self:start!important;
  z-index:2!important;
}
.sp-portal-profile-header .sp-hele-fb-info{
  grid-area:info!important;
  min-width:0!important;
  padding-top:28px!important;
}
.sp-portal-profile-header .sp-hele-fb-actions{
  grid-area:actions!important;
  justify-content:flex-start!important;
  align-items:center!important;
  min-width:0!important;
}
.sp-portal-profile-header .sp-hele-fb-info h3{
  white-space:normal!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  hyphens:none!important;
  line-height:1.12!important;
  max-width:100%!important;
}
.sp-portal-profile-header .sp-hele-fb-role{
  white-space:nowrap!important;
}
.sp-portal-profile-header .sp-hele-fb-info textarea{
  width:min(100%,760px)!important;
  max-width:760px!important;
  overflow:hidden!important;
  line-height:1.45!important;
}
.sp-portal-profile-header .sp-hele-fb-cover{
  min-height:250px!important;
}
.sp-portal-profile-header .sp-hele-fb-cover-actions{
  z-index:3!important;
}
.sp-portal-profile-header .sp-hele-fb-logo{
  max-width:70%!important;
}

.sp-portal-tabs{
  width:100%!important;
  box-sizing:border-box!important;
  align-items:center!important;
}
.sp-portal-content > .sp-portal-tabs ~ .sp-portal-tabs,
.sp-portal-ecosystem .sp-portal-tabs + .sp-portal-tabs{
  display:none!important;
}

.sp-portal-topbar{
  box-sizing:border-box!important;
}
.sp-portal-top-actions{
  flex-wrap:nowrap!important;
}
.sp-portal-top-actions .sp-portal-icon-btn,
.sp-portal-top-actions>a:not(.sp-portal-login-btn){
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  border-radius:50%!important;
  display:grid!important;
  place-items:center!important;
  background:#f1f5f9!important;
  color:#111827!important;
  text-decoration:none!important;
  border:1px solid #e5e7eb!important;
  box-shadow:none!important;
}
.sp-portal-profile-menu{
  background:#fff!important;
  color:#111827!important;
  border:1px solid #e5e7eb!important;
  border-radius:16px!important;
  padding:8px 12px!important;
  box-shadow:0 8px 22px rgba(15,23,42,.08)!important;
  min-height:48px!important;
  max-width:230px!important;
}
.sp-portal-profile-menu span{
  color:#111827!important;
  max-width:120px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.sp-portal-profile-menu b{
  color:#334155!important;
  font-weight:900!important;
}
.sp-portal-login-btn{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:42px!important;
  padding:0 15px!important;
  border-radius:999px!important;
  text-decoration:none!important;
  font-weight:900!important;
  font-size:13px!important;
  border:1px solid #dbe3ef!important;
  background:#fff!important;
  color:#111827!important;
  white-space:nowrap!important;
}
.sp-portal-logout-link{
  background:#fff7ed!important;
  border-color:#fed7aa!important;
  color:#9a3412!important;
}
.sp-portal-dashboard-link{
  background:#eef2ff!important;
  border-color:#c7d2fe!important;
  color:#4338ca!important;
}

@media(max-width:1100px){
  .sp-portal-sidebar{width:100%;}
  .sp-portal-sidebar-logo .sp-hele-portal-logo-fallback strong{max-width:none!important;}
  .sp-portal-profile-header .sp-hele-fb-profile-body{
    grid-template-columns:150px minmax(0,1fr)!important;
    grid-template-areas:"avatar info" "actions actions"!important;
  }
  .sp-portal-profile-header .sp-hele-fb-actions{justify-content:flex-start!important;}
}
@media(max-width:760px){
  .sp-portal-profile-header .sp-hele-fb-profile-body{
    display:block!important;
    padding:0 20px 24px!important;
  }
  .sp-portal-profile-header .sp-hele-fb-info{padding-top:14px!important;}
  .sp-portal-profile-header .sp-hele-fb-actions{margin-top:14px!important;display:flex!important;}
  .sp-portal-profile-header .sp-hele-fb-info textarea{max-width:100%!important;}
  .sp-portal-top-actions .sp-portal-dashboard-link{display:none!important;}
  .sp-portal-login-btn{padding:0 12px!important;}
}
@media(max-width:540px){
  .sp-portal-top-actions .sp-portal-logout-link,
  .sp-portal-top-actions .sp-portal-profile-menu span{display:none!important;}
  .sp-portal-profile-menu{padding:6px!important;}
}

/* v3.2.7 Studies Planner logo adaptation */
.sp-portal-sidebar-logo{
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  margin:10px 0 30px!important;
  padding:0!important;
}
.sp-portal-sidebar-logo .sp-hele-portal-logo-img,
.sp-portal-sidebar-logo .sp-hele-portal-logo-default{
  display:block!important;
  width:min(190px, 100%)!important;
  max-width:190px!important;
  height:auto!important;
  object-fit:contain!important;
  padding:10px!important;
  background:#f8fafc!important;
  border-radius:22px!important;
  box-shadow:0 18px 38px rgba(0,0,0,.24)!important;
}
.sp-portal-profile-header .sp-hele-fb-logo .sp-hele-portal-logo-img,
.sp-portal-profile-header .sp-hele-fb-logo .sp-hele-portal-logo-default{
  display:block!important;
  width:min(300px, 55vw)!important;
  max-width:300px!important;
  height:auto!important;
  object-fit:contain!important;
  padding:12px 16px!important;
  background:rgba(255,255,255,.92)!important;
  border-radius:24px!important;
  box-shadow:0 18px 45px rgba(15,23,42,.20)!important;
}
.sp-portal-sidebar-logo .sp-hele-portal-logo-fallback strong{
  white-space:normal!important;
  word-break:normal!important;
}
@media(max-width:760px){
  .sp-portal-sidebar-logo .sp-hele-portal-logo-img,
  .sp-portal-sidebar-logo .sp-hele-portal-logo-default{max-width:150px!important;width:150px!important;}
  .sp-portal-profile-header .sp-hele-fb-logo .sp-hele-portal-logo-img,
  .sp-portal-profile-header .sp-hele-fb-logo .sp-hele-portal-logo-default{max-width:220px!important;width:min(220px,70vw)!important;}
}

/* v3.2.9 Portal Ecosystem Design System refactor (UI layer only) */
body:has(.sp-portal-ecosystem){
  margin:0!important;
  background:#F7F8FC!important;
}
.sp-portal-ecosystem{
  --sp-primary:#5B4BFF;
  --sp-orange:#FF8A00;
  --sp-sidebar:#071226;
  --sp-bg:#F7F8FC;
  --sp-card:#FFFFFF;
  --sp-text:#111827;
  --sp-muted:#6B7280;
  --sp-line:#E5E7EB;
  background:var(--sp-bg)!important;
  color:var(--sp-text)!important;
  grid-template-columns:300px minmax(0,1fr)!important;
  min-height:100vh!important;
}
.sp-portal-sidebar{
  width:300px!important;
  max-width:300px!important;
  background:#071226!important;
  padding:28px 22px!important;
  overflow:hidden!important;
}
.sp-portal-role-pill{
  width:auto!important;
  max-width:220px!important;
  margin:0 auto 24px!important;
  display:flex!important;
  min-height:46px!important;
}
.sp-portal-sidebar-logo{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:12px!important;
  margin:8px 0 30px!important;
  text-align:center!important;
}
.sp-portal-sidebar-logo .sp-hele-portal-logo-img,
.sp-portal-sidebar-logo .sp-hele-portal-logo-default{
  width:92px!important;
  max-width:92px!important;
  height:92px!important;
  object-fit:cover!important;
  border-radius:24px!important;
  padding:0!important;
  background:#fff!important;
  box-shadow:0 16px 34px rgba(0,0,0,.28)!important;
}
.sp-portal-sidebar-logo .sp-hele-portal-logo-fallback{
  flex-direction:column!important;
  gap:10px!important;
  text-align:center!important;
}
.sp-portal-sidebar-logo:after{
  content:'Studies Planner';
  color:#fff;
  font-size:26px;
  font-weight:900;
  line-height:1.05;
  max-width:220px;
  display:block;
  text-align:center;
}
.sp-portal-sidebar-logo .sp-hele-portal-logo-fallback strong{display:none!important;}
.sp-portal-nav a{
  min-height:46px!important;
  font-size:15px!important;
  white-space:normal!important;
}
.sp-portal-main{
  background:#F7F8FC!important;
  min-width:0!important;
}
.sp-portal-topbar{
  height:76px!important;
  background:#fff!important;
  padding:0 clamp(18px,2.4vw,34px)!important;
  box-shadow:0 1px 0 rgba(17,24,39,.08)!important;
}
.sp-portal-search{
  margin-left:auto!important;
  margin-right:6px!important;
  width:min(430px,38vw)!important;
}
.sp-portal-search input{
  height:48px!important;
  border-radius:16px!important;
  background:#fff!important;
}
.sp-portal-top-actions{gap:12px!important;}
.sp-portal-icon-btn{
  width:46px!important;
  height:46px!important;
  background:#EEF2FF!important;
  color:#5B4BFF!important;
  border:0!important;
}
.sp-portal-profile-menu{
  background:#fff!important;
  color:#111827!important;
  border:1px solid #E5E7EB!important;
  box-shadow:0 10px 26px rgba(15,23,42,.10)!important;
}
.sp-portal-login-btn{
  background:#fff!important;
  color:#111827!important;
}
.sp-portal-content{
  width:min(100%,1560px)!important;
  max-width:1560px!important;
  padding:32px clamp(18px,3vw,42px) 70px!important;
  box-sizing:border-box!important;
}
.sp-portal-welcome-strip{
  min-height:180px!important;
  padding:34px 42px!important;
  background:linear-gradient(135deg,#0f766e 0%, #3B5BDB 58%, #5B4BFF 100%)!important;
  border-radius:28px!important;
  margin-bottom:26px!important;
}
.sp-portal-welcome-strip h1,
.sp-portal-welcome-strip p{color:#fff!important;}
.sp-portal-profile-header .sp-hele-fb-profile-card{
  border-radius:28px!important;
  overflow:hidden!important;
  background:#fff!important;
  box-shadow:0 18px 50px rgba(15,23,42,.10)!important;
  margin-bottom:18px!important;
}
.sp-portal-profile-header .sp-hele-fb-cover{
  min-height:280px!important;
  background:linear-gradient(125deg,#111B5B 0%,#5B4BFF 55%,#FF8A00 100%)!important;
  background-size:cover!important;
  background-position:center!important;
}
.sp-portal-profile-header .sp-hele-fb-logo{
  left:50%!important;
  top:44%!important;
  transform:translate(-50%,-50%)!important;
  width:min(520px,64vw)!important;
  display:flex!important;
  justify-content:center!important;
}
.sp-portal-profile-header .sp-hele-fb-logo .sp-hele-portal-logo-img,
.sp-portal-profile-header .sp-hele-fb-logo .sp-hele-portal-logo-default{
  width:min(360px,55vw)!important;
  max-width:360px!important;
  height:auto!important;
  max-height:155px!important;
  object-fit:contain!important;
  border-radius:24px!important;
  background:rgba(255,255,255,.94)!important;
}
.sp-portal-profile-header .sp-hele-fb-cover-actions{
  right:24px!important;
  top:24px!important;
}
.sp-portal-profile-header .sp-hele-fb-profile-body{
  display:grid!important;
  grid-template-columns:210px minmax(0,1fr) minmax(280px,auto)!important;
  gap:24px!important;
  align-items:center!important;
  padding:0 34px 34px!important;
}
.sp-portal-profile-header .sp-hele-fb-avatar{
  width:190px!important;
  height:190px!important;
  margin-top:-78px!important;
  border:8px solid #fff!important;
  z-index:2!important;
}
.sp-portal-profile-header .sp-hele-fb-info{
  padding-top:18px!important;
  min-width:0!important;
  max-width:760px!important;
}
.sp-portal-profile-header .sp-hele-fb-info h3{
  font-size:clamp(26px,2.6vw,34px)!important;
  line-height:1.12!important;
  white-space:normal!important;
  word-break:normal!important;
  margin:0!important;
}
.sp-portal-profile-header .sp-hele-fb-role{
  display:inline-flex!important;
  border-radius:999px!important;
  padding:6px 12px!important;
  background:#EEF2FF!important;
  color:#5B4BFF!important;
  font-size:14px!important;
  line-height:1!important;
}
.sp-portal-profile-header .sp-hele-fb-info textarea{
  min-height:58px!important;
  max-height:96px!important;
  width:100%!important;
  max-width:760px!important;
  border:0!important;
  padding:6px 0 0!important;
  color:#374151!important;
  background:transparent!important;
  font-size:15px!important;
}
.sp-portal-profile-header .sp-hele-fb-actions{
  display:flex!important;
  justify-content:flex-end!important;
  align-items:center!important;
  gap:12px!important;
  flex-wrap:wrap!important;
}
.sp-portal-profile-header .sp-hele-fb-btn{
  min-height:46px!important;
  border-radius:14px!important;
  padding:12px 18px!important;
  white-space:nowrap!important;
}
.sp-portal-tabs{
  display:flex!important;
  gap:8px!important;
  background:#fff!important;
  border-radius:22px!important;
  padding:10px!important;
  margin:18px 0 24px!important;
  overflow-x:auto!important;
  box-shadow:0 10px 30px rgba(15,23,42,.07)!important;
}
.sp-portal-tabs a{
  flex:0 0 auto!important;
  padding:14px 20px!important;
  color:#374151!important;
}
.sp-portal-tabs a.is-active,.sp-portal-tabs a:hover{
  color:#5B4BFF!important;
  background:#EEF2FF!important;
}
.sp-portal-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:22px!important;
}
.sp-portal-card-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:18px!important;
}
.sp-portal-card,.sp-portal-widget,.sp-portal-continue-card{
  border-radius:24px!important;
  background:#fff!important;
  box-shadow:0 14px 36px rgba(15,23,42,.07)!important;
  color:#111827!important;
}
.sp-portal-card:hover,.sp-portal-widget:hover{
  transform:translateY(-2px);
  box-shadow:0 22px 55px rgba(15,23,42,.10)!important;
}
.sp-portal-clean-list{list-style:none!important;padding:0!important;margin:0!important;display:grid!important;gap:10px!important;}
.sp-portal-clean-list li{display:flex!important;gap:12px!important;align-items:flex-start!important;background:#F8FAFC!important;border-radius:16px!important;padding:12px!important;color:#374151!important;}
.sp-portal-payment-state{display:flex;gap:14px;align-items:center;background:#FFF7ED;border-radius:18px;padding:16px;color:#9A3412;}
.sp-portal-payment-state strong{font-size:34px;line-height:1;}
.sp-portal-feedback-widget{border-left:5px solid #5B4BFF!important;}
.sp-portal-attention-widget{border-left:5px solid #FF8A00!important;}
.sp-portal-payments-widget{border-left:5px solid #FF8A00!important;}
.sp-portal-schedule-widget{border-left:5px solid #5B4BFF!important;}
@media(max-width:1240px){
  .sp-portal-ecosystem{grid-template-columns:260px minmax(0,1fr)!important;}
  .sp-portal-sidebar{width:260px!important;max-width:260px!important;}
  .sp-portal-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .sp-portal-profile-header .sp-hele-fb-profile-body{grid-template-columns:170px minmax(0,1fr)!important;}
  .sp-portal-profile-header .sp-hele-fb-actions{grid-column:2!important;justify-content:flex-start!important;}
  .sp-portal-profile-header .sp-hele-fb-avatar{width:155px!important;height:155px!important;}
}
@media(max-width:980px){
  .sp-portal-ecosystem{grid-template-columns:1fr!important;}
  .sp-portal-sidebar{position:relative!important;width:100%!important;max-width:none!important;min-height:auto!important;}
  .sp-portal-nav{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .sp-portal-sidebar-logo .sp-hele-portal-logo-img,.sp-portal-sidebar-logo .sp-hele-portal-logo-default{width:78px!important;height:78px!important;}
  .sp-portal-sidebar-logo:after{font-size:22px!important;}
  .sp-portal-search{width:min(360px,44vw)!important;}
}
@media(max-width:760px){
  .sp-portal-content{padding:18px 14px 46px!important;}
  .sp-portal-topbar{height:auto!important;min-height:70px!important;flex-wrap:wrap!important;padding:12px 14px!important;}
  .sp-portal-search{order:3;width:100%!important;display:block!important;margin:0!important;}
  .sp-portal-grid,.sp-portal-card-grid{grid-template-columns:1fr!important;}
  .sp-portal-profile-header .sp-hele-fb-cover{min-height:190px!important;}
  .sp-portal-profile-header .sp-hele-fb-profile-body{display:block!important;padding:0 22px 26px!important;}
  .sp-portal-profile-header .sp-hele-fb-avatar{width:132px!important;height:132px!important;margin-top:-58px!important;}
  .sp-portal-profile-header .sp-hele-fb-info{padding-top:12px!important;}
  .sp-portal-profile-header .sp-hele-fb-actions{justify-content:flex-start!important;margin-top:14px!important;}
  .sp-portal-profile-header .sp-hele-fb-logo .sp-hele-portal-logo-img,.sp-portal-profile-header .sp-hele-fb-logo .sp-hele-portal-logo-default{width:min(260px,70vw)!important;}
}

/* v3.2.10 Portal topbar: functional search + messenger, cleaner profile actions */
.sp-portal-topbar{overflow:visible!important;}
.sp-portal-search{z-index:30!important;}
.sp-portal-search-btn{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:38px;height:38px;border:0;border-radius:12px;background:transparent;cursor:pointer;font-size:18px;display:grid;place-items:center;}
.sp-portal-search span{display:none!important;}
.sp-portal-search-results{position:absolute;top:calc(100% + 10px);left:0;right:0;background:#fff;border:1px solid #e5e7eb;border-radius:18px;box-shadow:0 20px 50px rgba(15,23,42,.18);padding:8px;max-height:420px;overflow:auto;z-index:80;}
.sp-portal-search-item{width:100%;display:flex;align-items:center;gap:12px;padding:12px;border:0;background:#fff;border-radius:14px;text-decoration:none!important;color:#111827!important;text-align:left;cursor:pointer;}
.sp-portal-search-item:hover{background:#f3f4ff;}
.sp-portal-search-item img,.sp-portal-search-item>span{width:42px;height:42px;border-radius:50%;object-fit:cover;background:#eef2ff;display:grid;place-items:center;flex:0 0 42px;}
.sp-portal-search-item strong{display:block;color:#111827!important;font-size:14px;line-height:1.2;}
.sp-portal-search-item small{display:block;color:#64748b;font-size:12px;margin-top:2px;}
.sp-portal-search-empty{padding:14px;color:#64748b;font-weight:700;}
.sp-portal-top-actions .sp-portal-dashboard-link,
.sp-portal-top-actions .sp-portal-logout-link{font-size:0!important;}
.sp-portal-top-actions .sp-portal-dashboard-link::before{content:'⌂';font-size:19px;line-height:1;}
.sp-portal-top-actions .sp-portal-logout-link::before{content:'⎋';font-size:19px;line-height:1;}
.sp-portal-profile-menu{gap:6px!important;min-width:72px!important;justify-content:center!important;}
.sp-portal-profile-menu span{display:none!important;}
.sp-portal-profile-menu img{width:44px!important;height:44px!important;}

.sp-portal-messenger[hidden]{display:none!important;}
.sp-portal-messenger{position:fixed;inset:0;background:rgba(7,18,38,.38);z-index:99999;display:flex;justify-content:flex-end;}
.sp-portal-messenger-panel{width:min(920px,94vw);height:calc(100vh - 32px);margin:16px;background:#fff;border-radius:24px;box-shadow:0 24px 70px rgba(15,23,42,.32);display:flex;flex-direction:column;overflow:hidden;}
.sp-portal-messenger-head{height:66px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;border-bottom:1px solid #e5e7eb;background:#fff;}
.sp-portal-messenger-head strong{font-size:20px;color:#111827!important;}
.sp-portal-messenger-close{width:40px;height:40px;border:0;border-radius:12px;background:#f1f5f9;font-size:24px;cursor:pointer;}
.sp-portal-messenger-body{display:grid;grid-template-columns:310px minmax(0,1fr);min-height:0;flex:1;}
.sp-portal-messenger-users{border-right:1px solid #e5e7eb;padding:14px;display:flex;flex-direction:column;gap:12px;min-width:0;}
.sp-portal-messenger-user-search{border:1px solid #dbe3ef;border-radius:14px;padding:12px 14px;width:100%;font-size:14px;}
.sp-portal-messenger-user-list{overflow:auto;display:grid;gap:8px;}
.sp-portal-msg-user{display:flex;align-items:center;gap:10px;border:0;background:#fff;border-radius:14px;padding:10px;cursor:pointer;text-align:left;color:#111827;}
.sp-portal-msg-user:hover,.sp-portal-msg-user.is-active{background:#eef2ff;}
.sp-portal-msg-user img,.sp-portal-msg-user>span{width:40px;height:40px;border-radius:50%;object-fit:cover;background:#f1f5f9;display:grid;place-items:center;flex:0 0 40px;}
.sp-portal-msg-user strong{display:block;color:#111827;font-size:14px;}
.sp-portal-msg-user small{display:block;color:#64748b;font-size:12px;}
.sp-portal-messenger-chat{display:flex;flex-direction:column;min-width:0;min-height:0;background:#f8fafc;}
.sp-portal-chat-empty,.sp-portal-chat-empty-inline{margin:auto;color:#64748b;font-weight:800;text-align:center;padding:20px;}
.sp-portal-chat-messages{flex:1;min-height:0;overflow:auto;padding:18px;display:flex;flex-direction:column;gap:10px;}
.sp-portal-chat-message{max-width:74%;padding:11px 13px;border-radius:16px;background:#fff;border:1px solid #e5e7eb;box-shadow:0 8px 18px rgba(15,23,42,.05);}
.sp-portal-chat-message.from-me{align-self:flex-end;background:linear-gradient(135deg,#5B4BFF,#6d5dfc);color:#fff;border:0;}
.sp-portal-chat-message.from-them{align-self:flex-start;}
.sp-portal-chat-message p{margin:0;white-space:pre-wrap;}
.sp-portal-chat-message small{display:block;opacity:.72;margin-top:5px;font-size:11px;}
.sp-portal-chat-form{display:none;gap:10px;padding:14px;border-top:1px solid #e5e7eb;background:#fff;align-items:flex-end;}
.sp-portal-chat-form textarea{flex:1;resize:none;border:1px solid #dbe3ef;border-radius:14px;padding:12px;font-size:14px;min-height:46px;max-height:120px;}
.sp-portal-chat-form button{border:0;border-radius:14px;background:#5B4BFF;color:#fff;font-weight:900;padding:13px 18px;cursor:pointer;}
@media(max-width:760px){
  .sp-portal-messenger-panel{width:100vw;height:100vh;margin:0;border-radius:0;}
  .sp-portal-messenger-body{grid-template-columns:1fr;}
  .sp-portal-messenger-users{max-height:42vh;border-right:0;border-bottom:1px solid #e5e7eb;}
  .sp-portal-search{width:min(100%,48vw)!important;}
}


/* ==========================================================
   v3.3.0 Portal UI Refactor - final normalized design layer
   Purpose: consolidate portal UI, remove logo from cover, make
   sidebar branding crisp, and stabilize profile header layout.
   Data-safe: CSS-only overrides; no database or stored meta changes.
   ========================================================== */
:root{
  --sp-primary:#5B4BFF;
  --sp-secondary:#FF8A00;
  --sp-sidebar:#071226;
  --sp-bg:#F7F8FC;
  --sp-card:#FFFFFF;
  --sp-text:#111827;
  --sp-muted:#6B7280;
  --sp-line:#E5E7EB;
  --sp-shadow-soft:0 18px 45px rgba(15,23,42,.10);
}

/* Stable shell sizing */
.sp-portal-shell{
  background:var(--sp-bg)!important;
  color:var(--sp-text)!important;
  min-height:100vh!important;
  width:100%!important;
  overflow-x:hidden!important;
}
.sp-portal-main{
  min-width:0!important;
  max-width:100%!important;
  overflow-x:hidden!important;
}
.sp-portal-content{
  width:min(100%,1440px)!important;
  max-width:1440px!important;
  margin:0 auto!important;
  padding:28px clamp(18px,3vw,42px)!important;
  box-sizing:border-box!important;
}

/* Sidebar branding: one clear, centered logo. No duplicated / broken text. */
.sp-portal-sidebar{
  background:var(--sp-sidebar)!important;
  color:#fff!important;
  overflow-x:hidden!important;
}
.sp-portal-sidebar *{box-sizing:border-box!important;}
.sp-portal-role-badge{
  width:100%!important;
  max-width:240px!important;
  margin:28px auto 26px!important;
  text-align:center!important;
  white-space:nowrap!important;
  letter-spacing:.02em!important;
}
.sp-portal-sidebar-logo{
  width:100%!important;
  margin:0 auto 34px!important;
  padding:0 22px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  gap:12px!important;
  overflow:visible!important;
}
.sp-portal-sidebar-logo img,
.sp-portal-sidebar-logo .sp-hele-portal-logo-img,
.sp-portal-sidebar-logo .sp-hele-portal-logo-default{
  display:block!important;
  width:clamp(150px,72%,190px)!important;
  max-width:190px!important;
  height:auto!important;
  max-height:none!important;
  object-fit:contain!important;
  image-rendering:auto!important;
  border-radius:22px!important;
  box-shadow:0 16px 36px rgba(0,0,0,.22)!important;
  background:#fff!important;
}
.sp-portal-sidebar-logo .sp-hele-portal-logo-fallback{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:12px!important;
  color:#fff!important;
  width:100%!important;
  max-width:220px!important;
  text-align:center!important;
}
.sp-portal-sidebar-logo .sp-hele-portal-logo-fallback span{
  width:82px!important;
  height:82px!important;
  border-radius:24px!important;
  background:linear-gradient(135deg,#fff,var(--sp-secondary))!important;
  color:#071226!important;
  display:grid!important;
  place-items:center!important;
  font-size:28px!important;
  font-weight:900!important;
}
.sp-portal-sidebar-logo .sp-hele-portal-logo-fallback strong,
.sp-portal-sidebar-logo:after{
  content:'Studies Planner'!important;
  display:block!important;
  color:#fff!important;
  font-size:26px!important;
  line-height:1.08!important;
  font-weight:900!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  max-width:220px!important;
  text-align:center!important;
  letter-spacing:.01em!important;
}
.sp-portal-sidebar-logo .sp-hele-portal-logo-fallback strong{display:none!important;}

/* Sidebar menu polish */
.sp-portal-sidebar nav,
.sp-portal-sidebar .sp-portal-nav{
  width:100%!important;
}
.sp-portal-sidebar a{
  color:rgba(255,255,255,.88)!important;
  text-decoration:none!important;
  white-space:normal!important;
}
.sp-portal-sidebar a:hover,
.sp-portal-sidebar a.active{
  color:#fff!important;
  background:rgba(91,75,255,.25)!important;
}

/* Topbar: light, clean, and not visually heavy */
.sp-portal-topbar{
  background:#fff!important;
  border-bottom:1px solid var(--sp-line)!important;
  box-shadow:0 8px 22px rgba(15,23,42,.04)!important;
  min-height:76px!important;
  overflow:visible!important;
}
.sp-portal-profile-menu{
  min-width:auto!important;
  padding:8px 12px!important;
  border-radius:18px!important;
  background:#fff!important;
  color:var(--sp-text)!important;
  box-shadow:0 6px 18px rgba(15,23,42,.08)!important;
  border:1px solid var(--sp-line)!important;
}
.sp-portal-profile-menu strong,
.sp-portal-profile-menu span{
  color:var(--sp-text)!important;
  white-space:nowrap!important;
}
.sp-portal-top-actions>a,
.sp-portal-top-actions button{
  background:#F1F5F9!important;
  color:#334155!important;
  border:1px solid #E2E8F0!important;
}
.sp-portal-top-actions>a:hover,
.sp-portal-top-actions button:hover{
  transform:translateY(-1px)!important;
  box-shadow:0 8px 20px rgba(15,23,42,.10)!important;
}

/* Facebook-style profile header, without Studies Planner logo inside cover */
.sp-portal-profile-header{
  width:100%!important;
  margin:0 0 24px!important;
}
.sp-portal-profile-header .sp-hele-fb-profile-card{
  background:#fff!important;
  border:1px solid rgba(17,24,39,.08)!important;
  border-radius:26px!important;
  overflow:hidden!important;
  box-shadow:var(--sp-shadow-soft)!important;
}
.sp-portal-profile-header .sp-hele-fb-cover{
  position:relative!important;
  min-height:250px!important;
  background:linear-gradient(115deg,#111A55,#5B4BFF 58%,#FF8A00)!important;
  background-size:cover!important;
  background-position:center!important;
}
.sp-portal-profile-header .sp-hele-fb-logo,
.sp-portal-profile-header .sp-hele-fb-logo *,
.sp-portal-profile-header .sp-hele-fb-cover .sp-hele-portal-logo-img,
.sp-portal-profile-header .sp-hele-fb-cover .sp-hele-portal-logo-default,
.sp-portal-profile-header .sp-hele-fb-cover .sp-hele-portal-logo-fallback{
  display:none!important;
  visibility:hidden!important;
}
.sp-portal-profile-header .sp-hele-fb-cover-actions{
  position:absolute!important;
  top:22px!important;
  right:22px!important;
  display:flex!important;
  flex-wrap:wrap!important;
  gap:10px!important;
  z-index:2!important;
}
.sp-portal-profile-header .sp-hele-fb-mini-btn{
  background:rgba(7,18,38,.72)!important;
  color:#fff!important;
  border:1px solid rgba(255,255,255,.18)!important;
  border-radius:14px!important;
  padding:10px 14px!important;
  font-weight:800!important;
  cursor:pointer!important;
  backdrop-filter:blur(10px)!important;
}
.sp-portal-profile-header .sp-hele-fb-profile-body{
  display:grid!important;
  grid-template-columns:190px minmax(0,1fr) auto!important;
  align-items:end!important;
  gap:26px!important;
  padding:0 32px 32px!important;
  background:#fff!important;
}
.sp-portal-profile-header .sp-hele-fb-avatar{
  width:178px!important;
  height:178px!important;
  margin-top:-78px!important;
  border-radius:50%!important;
  border:7px solid #fff!important;
  background:#F3F4F6!important;
  box-shadow:0 18px 40px rgba(15,23,42,.20)!important;
  overflow:visible!important;
  z-index:3!important;
}
.sp-portal-profile-header .sp-hele-fb-avatar img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  border-radius:50%!important;
}
.sp-portal-profile-header .sp-hele-fb-camera{
  right:10px!important;
  bottom:10px!important;
  z-index:4!important;
}
.sp-portal-profile-header .sp-hele-fb-info{
  min-width:0!important;
  padding-top:24px!important;
  align-self:center!important;
}
.sp-portal-profile-header .sp-hele-fb-info h3{
  margin:0 0 6px!important;
  color:var(--sp-text)!important;
  font-size:clamp(26px,3vw,40px)!important;
  line-height:1.05!important;
  font-weight:900!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  white-space:normal!important;
}
.sp-portal-profile-header .sp-hele-fb-role{
  display:inline-flex!important;
  align-items:center!important;
  width:max-content!important;
  max-width:100%!important;
  color:var(--sp-primary)!important;
  background:#EEF2FF!important;
  border:1px solid #C7D2FE!important;
  border-radius:999px!important;
  padding:6px 12px!important;
  font-weight:900!important;
  margin:4px 0 10px!important;
}
.sp-portal-profile-header .sp-hele-fb-info textarea{
  width:min(100%,620px)!important;
  min-height:64px!important;
  resize:vertical!important;
  border:1px solid transparent!important;
  background:#fff!important;
  color:#374151!important;
  padding:8px 0!important;
  line-height:1.55!important;
  font-size:15px!important;
}
.sp-portal-profile-header .sp-hele-fb-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:12px!important;
  justify-content:flex-end!important;
  align-items:center!important;
  align-self:center!important;
  min-width:260px!important;
}
.sp-portal-profile-header .sp-hele-fb-btn{
  min-height:44px!important;
  border-radius:14px!important;
  padding:11px 16px!important;
  font-weight:900!important;
  text-decoration:none!important;
  cursor:pointer!important;
  border:1px solid #CBD5E1!important;
  background:#fff!important;
  color:#334155!important;
  box-shadow:0 4px 12px rgba(15,23,42,.05)!important;
}
.sp-portal-profile-header .sp-hele-fb-btn-primary{
  background:linear-gradient(135deg,var(--sp-primary),#7C3AED)!important;
  color:#fff!important;
  border-color:transparent!important;
}

/* Tabs: one clean row only */
.sp-portal-tabs{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:10px!important;
  padding:12px!important;
  background:#fff!important;
  border:1px solid rgba(17,24,39,.06)!important;
  border-radius:22px!important;
  box-shadow:0 10px 30px rgba(15,23,42,.06)!important;
  margin:0 0 24px!important;
}
.sp-portal-tabs + .sp-portal-tabs{display:none!important;}
.sp-portal-tab{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  min-height:48px!important;
  padding:12px 18px!important;
  border-radius:16px!important;
  color:#334155!important;
  background:transparent!important;
  font-weight:900!important;
  text-decoration:none!important;
}
.sp-portal-tab.active,
.sp-portal-tab:hover{
  background:#EEF2FF!important;
  color:var(--sp-primary)!important;
}

/* Cards and widgets consistency */
.sp-portal-card,
.sp-portal-widget,
.sp-portal-dashboard-card,
.sp-portal-action-card{
  background:#fff!important;
  color:var(--sp-text)!important;
  border:1px solid rgba(17,24,39,.07)!important;
  border-radius:24px!important;
  box-shadow:0 14px 36px rgba(15,23,42,.07)!important;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease!important;
}
.sp-portal-card:hover,
.sp-portal-widget:hover,
.sp-portal-action-card:hover{
  transform:translateY(-2px)!important;
  box-shadow:0 20px 46px rgba(15,23,42,.11)!important;
}
.sp-portal-card h1,.sp-portal-card h2,.sp-portal-card h3,.sp-portal-card h4,
.sp-portal-widget h1,.sp-portal-widget h2,.sp-portal-widget h3,.sp-portal-widget h4,
.sp-portal-action-card h1,.sp-portal-action-card h2,.sp-portal-action-card h3,.sp-portal-action-card h4{
  color:var(--sp-text)!important;
}
.sp-portal-card p,.sp-portal-card span,
.sp-portal-widget p,.sp-portal-widget span,
.sp-portal-action-card p,.sp-portal-action-card span{
  color:#4B5563!important;
}

/* Responsive */
@media (max-width:1180px){
  .sp-portal-profile-header .sp-hele-fb-profile-body{
    grid-template-columns:170px minmax(0,1fr)!important;
  }
  .sp-portal-profile-header .sp-hele-fb-actions{
    grid-column:2!important;
    justify-content:flex-start!important;
    min-width:0!important;
  }
  .sp-portal-search{width:min(360px,42vw)!important;}
}
@media (max-width:900px){
  .sp-portal-shell{display:block!important;}
  .sp-portal-sidebar{position:relative!important;width:100%!important;min-height:auto!important;padding:18px!important;}
  .sp-portal-sidebar-logo img,.sp-portal-sidebar-logo .sp-hele-portal-logo-img,.sp-portal-sidebar-logo .sp-hele-portal-logo-default{width:150px!important;max-width:150px!important;}
  .sp-portal-sidebar-logo:after{font-size:22px!important;}
  .sp-portal-topbar{position:relative!important;flex-wrap:wrap!important;height:auto!important;padding:14px 18px!important;}
  .sp-portal-search{order:3;width:100%!important;max-width:none!important;margin:8px 0 0!important;}
  .sp-portal-profile-header .sp-hele-fb-cover{min-height:190px!important;}
  .sp-portal-profile-header .sp-hele-fb-profile-body{display:block!important;padding:0 22px 26px!important;}
  .sp-portal-profile-header .sp-hele-fb-avatar{width:132px!important;height:132px!important;margin-top:-58px!important;}
  .sp-portal-profile-header .sp-hele-fb-info{padding-top:14px!important;}
  .sp-portal-profile-header .sp-hele-fb-actions{justify-content:flex-start!important;margin-top:14px!important;min-width:0!important;}
  .sp-portal-profile-header .sp-hele-fb-info textarea{width:100%!important;}
}
@media (max-width:560px){
  .sp-portal-content{padding:18px 12px!important;}
  .sp-portal-profile-header .sp-hele-fb-cover-actions{left:14px!important;right:14px!important;top:14px!important;justify-content:flex-end!important;}
  .sp-portal-profile-header .sp-hele-fb-mini-btn{font-size:12px!important;padding:8px 10px!important;}
  .sp-portal-profile-header .sp-hele-fb-actions{display:grid!important;grid-template-columns:1fr!important;width:100%!important;}
  .sp-portal-profile-header .sp-hele-fb-btn{width:100%!important;text-align:center!important;justify-content:center!important;}
  .sp-portal-tabs{display:grid!important;grid-template-columns:1fr 1fr!important;}
}

/* ==========================================================
   v3.3.1 Portal Topbar + Messenger UI Fix
   - clear icons
   - remove non-functional profile dropdown
   - messenger as clean slide panel with overlay, X and _
   ========================================================== */
.sp-portal-topbar{
  overflow:visible!important;
  position:sticky!important;
  top:0!important;
  z-index:120!important;
}
.sp-portal-top-actions{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  flex:0 0 auto!important;
}
.sp-portal-icon-btn{
  width:52px!important;
  height:52px!important;
  min-width:52px!important;
  border-radius:999px!important;
  border:1px solid #dbe3ef!important;
  background:#f8fafc!important;
  color:#111827!important;
  display:inline-grid!important;
  place-items:center!important;
  text-decoration:none!important;
  box-shadow:0 8px 18px rgba(15,23,42,.06)!important;
  cursor:pointer!important;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease!important;
  font-size:0!important;
  line-height:1!important;
}
.sp-portal-icon-btn:hover{
  transform:translateY(-2px)!important;
  background:#ffffff!important;
  box-shadow:0 16px 34px rgba(15,23,42,.12)!important;
}
.sp-portal-icon-btn .sp-portal-icon,
.sp-portal-icon-btn::before{
  font-size:22px!important;
  font-weight:900!important;
  line-height:1!important;
  display:block!important;
  color:#111827!important;
}
.sp-portal-top-actions .sp-portal-dashboard-link::before,
.sp-portal-top-actions .sp-portal-logout-link::before{content:none!important;}
.sp-portal-dashboard-link .sp-portal-icon{font-size:21px!important;}
.sp-portal-logout-link .sp-portal-icon{font-size:24px!important;color:#FF8A00!important;}
.sp-portal-messenger-toggle .sp-portal-icon{color:#5B4BFF!important;}
.sp-portal-notifications-toggle .sp-portal-icon{color:#FF8A00!important;}
.sp-portal-profile-menu{display:none!important;}
.sp-portal-search-btn{
  color:#111827!important;
  background:#fff!important;
  border:1px solid #e5e7eb!important;
  box-shadow:0 8px 16px rgba(15,23,42,.08)!important;
}
body.sp-portal-messenger-open{overflow:hidden!important;}
.sp-portal-messenger[hidden]{display:none!important;}
.sp-portal-messenger{
  position:fixed!important;
  inset:0!important;
  z-index:2147483000!important;
  display:block!important;
  background:transparent!important;
}
.sp-portal-messenger-overlay{
  position:absolute!important;
  inset:0!important;
  background:rgba(7,18,38,.48)!important;
  backdrop-filter:blur(3px)!important;
}
.sp-portal-messenger-panel{
  position:absolute!important;
  top:24px!important;
  right:24px!important;
  bottom:24px!important;
  width:min(920px,calc(100vw - 48px))!important;
  max-width:920px!important;
  height:auto!important;
  margin:0!important;
  background:#fff!important;
  border-radius:28px!important;
  box-shadow:0 30px 90px rgba(7,18,38,.34)!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  border:1px solid rgba(255,255,255,.45)!important;
}
.sp-portal-messenger-head{
  height:76px!important;
  min-height:76px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:16px!important;
  padding:0 22px!important;
  background:linear-gradient(135deg,#071226 0%,#19254a 58%,#5B4BFF 100%)!important;
  border-bottom:0!important;
  color:#fff!important;
}
.sp-portal-messenger-head strong{
  display:block!important;
  font-size:22px!important;
  color:#fff!important;
  line-height:1.1!important;
}
.sp-portal-messenger-head small{
  display:block!important;
  color:rgba(255,255,255,.78)!important;
  font-weight:700!important;
  margin-top:3px!important;
}
.sp-portal-messenger-controls{display:flex!important;align-items:center!important;gap:10px!important;}
.sp-portal-messenger-close,
.sp-portal-messenger-minimize{
  width:42px!important;
  height:42px!important;
  border:1px solid rgba(255,255,255,.28)!important;
  border-radius:14px!important;
  background:rgba(255,255,255,.12)!important;
  color:#fff!important;
  font-size:24px!important;
  font-weight:900!important;
  line-height:1!important;
  cursor:pointer!important;
  display:grid!important;
  place-items:center!important;
}
.sp-portal-messenger-minimize{font-size:22px!important;padding-bottom:9px!important;}
.sp-portal-messenger-close:hover,
.sp-portal-messenger-minimize:hover{background:rgba(255,255,255,.22)!important;}
.sp-portal-messenger-body{
  display:grid!important;
  grid-template-columns:320px minmax(0,1fr)!important;
  flex:1!important;
  min-height:0!important;
  background:#fff!important;
}
.sp-portal-messenger-users{background:#f8fafc!important;border-right:1px solid #e5e7eb!important;}
.sp-portal-messenger.is-minimized .sp-portal-messenger-panel{
  top:auto!important;
  left:auto!important;
  right:28px!important;
  bottom:28px!important;
  width:330px!important;
  height:76px!important;
  border-radius:22px!important;
}
.sp-portal-messenger.is-minimized .sp-portal-messenger-body{display:none!important;}
.sp-portal-messenger.is-minimized .sp-portal-messenger-overlay{display:none!important;}
@media(max-width:900px){
  .sp-portal-messenger-panel{top:0!important;right:0!important;bottom:0!important;width:100vw!important;max-width:none!important;border-radius:0!important;}
  .sp-portal-messenger-body{grid-template-columns:1fr!important;}
  .sp-portal-messenger-users{max-height:42vh!important;border-right:0!important;border-bottom:1px solid #e5e7eb!important;}
  .sp-portal-messenger.is-minimized .sp-portal-messenger-panel{right:14px!important;bottom:14px!important;width:min(330px,calc(100vw - 28px))!important;border-radius:20px!important;}
}
@media(max-width:760px){
  .sp-portal-top-actions{gap:8px!important;}
  .sp-portal-icon-btn{width:46px!important;height:46px!important;min-width:46px!important;}
  .sp-portal-icon-btn .sp-portal-icon{font-size:20px!important;}
}

/* v3.3.2 Messenger Window Header hardening */
.sp-portal-messenger{
  z-index:2147483500!important;
}
.sp-portal-messenger-panel{
  top:88px!important;
  right:32px!important;
  bottom:32px!important;
  width:min(980px,calc(100vw - 64px))!important;
  max-height:calc(100vh - 120px)!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  background:#fff!important;
  border-radius:24px!important;
}
.sp-portal-messenger-head{
  position:sticky!important;
  top:0!important;
  z-index:5!important;
  min-height:78px!important;
  height:78px!important;
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:16px!important;
  padding:0 20px!important;
  flex:0 0 78px!important;
  background:linear-gradient(135deg,#071226 0%,#19254a 60%,#5B4BFF 100%)!important;
  color:#fff!important;
  border-bottom:1px solid rgba(255,255,255,.14)!important;
}
.sp-portal-messenger-title{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  min-width:0!important;
}
.sp-portal-messenger-online{
  width:12px!important;
  height:12px!important;
  border-radius:999px!important;
  background:#22c55e!important;
  box-shadow:0 0 0 5px rgba(34,197,94,.18)!important;
  flex:0 0 12px!important;
}
.sp-portal-messenger-title strong,
.sp-portal-messenger-head strong{
  display:block!important;
  color:#fff!important;
  font-size:22px!important;
  line-height:1.05!important;
  font-weight:900!important;
}
.sp-portal-messenger-title small,
.sp-portal-messenger-head small{
  display:block!important;
  color:rgba(255,255,255,.78)!important;
  font-size:12px!important;
  font-weight:700!important;
  margin-top:4px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  max-width:52vw!important;
}
.sp-portal-messenger-controls{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  flex:0 0 auto!important;
}
.sp-portal-messenger-controls button,
.sp-portal-messenger-new,
.sp-portal-messenger-refresh,
.sp-portal-messenger-minimize,
.sp-portal-messenger-close{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  border-radius:13px!important;
  border:1px solid rgba(255,255,255,.28)!important;
  background:rgba(255,255,255,.14)!important;
  color:#fff!important;
  display:grid!important;
  place-items:center!important;
  cursor:pointer!important;
  font-size:20px!important;
  font-weight:900!important;
  line-height:1!important;
  padding:0!important;
  appearance:none!important;
}
.sp-portal-messenger-minimize{padding-bottom:8px!important;font-size:22px!important;}
.sp-portal-messenger-close{font-size:28px!important;}
.sp-portal-messenger-controls button:hover{
  background:rgba(255,255,255,.26)!important;
  transform:translateY(-1px)!important;
}
.sp-portal-messenger-body{
  flex:1 1 auto!important;
  min-height:0!important;
  display:grid!important;
  grid-template-columns:330px minmax(0,1fr)!important;
}
.sp-portal-messenger.is-minimized{
  background:transparent!important;
  pointer-events:none!important;
}
.sp-portal-messenger.is-minimized .sp-portal-messenger-panel{
  pointer-events:auto!important;
  position:fixed!important;
  top:auto!important;
  left:auto!important;
  right:28px!important;
  bottom:28px!important;
  width:350px!important;
  height:78px!important;
  max-height:78px!important;
  border-radius:22px!important;
  box-shadow:0 18px 44px rgba(7,18,38,.32)!important;
}
.sp-portal-messenger.is-minimized .sp-portal-messenger-body{display:none!important;}
.sp-portal-messenger.is-minimized .sp-portal-messenger-overlay{display:none!important;}
.sp-portal-messenger.is-minimized .sp-portal-messenger-head{border-radius:22px!important;}
@media(max-width:900px){
  .sp-portal-messenger-panel{
    top:0!important;
    right:0!important;
    bottom:0!important;
    width:100vw!important;
    max-width:none!important;
    max-height:100vh!important;
    border-radius:0!important;
  }
  .sp-portal-messenger-body{grid-template-columns:1fr!important;}
  .sp-portal-messenger-title small{max-width:48vw!important;}
}

/* v3.3.3 Messenger Compact Mobile-Friendly Window - definitive override */
.sp-portal-messenger[hidden]{display:none!important;}
.sp-portal-messenger{
  position:fixed!important;
  inset:0!important;
  z-index:2147483600!important;
  display:block!important;
  background:transparent!important;
}
.sp-portal-messenger-overlay{
  position:absolute!important;
  inset:0!important;
  background:rgba(7,18,38,.48)!important;
  backdrop-filter:blur(3px)!important;
}
.sp-portal-messenger-panel{
  position:fixed!important;
  top:112px!important;
  right:28px!important;
  bottom:auto!important;
  width:min(760px,calc(100vw - 56px))!important;
  height:min(680px,calc(100vh - 140px))!important;
  max-width:760px!important;
  max-height:calc(100vh - 140px)!important;
  margin:0!important;
  background:#fff!important;
  border-radius:24px!important;
  box-shadow:0 28px 80px rgba(7,18,38,.34)!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  border:1px solid rgba(15,23,42,.08)!important;
}
.sp-portal-messenger-head{
  order:0!important;
  position:relative!important;
  top:auto!important;
  z-index:50!important;
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  min-height:70px!important;
  height:70px!important;
  flex:0 0 70px!important;
  padding:0 18px!important;
  background:linear-gradient(135deg,#071226 0%,#172554 58%,#5B4BFF 100%)!important;
  border-bottom:0!important;
  color:#fff!important;
}
.sp-portal-messenger-title{
  display:flex!important;
  align-items:center!important;
  gap:11px!important;
  min-width:0!important;
}
.sp-portal-messenger-title strong,
.sp-portal-messenger-head strong{
  display:block!important;
  color:#fff!important;
  font-size:20px!important;
  line-height:1.1!important;
  font-weight:900!important;
}
.sp-portal-messenger-title small,
.sp-portal-messenger-head small{
  display:block!important;
  color:rgba(255,255,255,.78)!important;
  font-size:12px!important;
  line-height:1.2!important;
  max-width:360px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.sp-portal-messenger-online{
  width:11px!important;
  height:11px!important;
  flex:0 0 11px!important;
  border-radius:999px!important;
  background:#22c55e!important;
  box-shadow:0 0 0 5px rgba(34,197,94,.16)!important;
}
.sp-portal-messenger-controls{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:7px!important;
  flex:0 0 auto!important;
}
.sp-portal-messenger-controls button,
.sp-portal-messenger-new,
.sp-portal-messenger-refresh,
.sp-portal-messenger-minimize,
.sp-portal-messenger-close{
  display:grid!important;
  place-items:center!important;
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  margin:0!important;
  padding:0!important;
  border-radius:12px!important;
  border:1px solid rgba(255,255,255,.28)!important;
  background:rgba(255,255,255,.14)!important;
  color:#fff!important;
  font-size:18px!important;
  font-weight:900!important;
  line-height:1!important;
  cursor:pointer!important;
  appearance:none!important;
}
.sp-portal-messenger-minimize{font-size:21px!important;padding-bottom:8px!important;}
.sp-portal-messenger-close{font-size:26px!important;}
.sp-portal-messenger-controls button:hover{background:rgba(255,255,255,.26)!important;transform:translateY(-1px)!important;}
.sp-portal-messenger-body{
  order:1!important;
  flex:1 1 auto!important;
  min-height:0!important;
  display:grid!important;
  grid-template-columns:290px minmax(0,1fr)!important;
  background:#fff!important;
}
.sp-portal-messenger-users{
  min-height:0!important;
  overflow:hidden!important;
  border-right:1px solid #e5e7eb!important;
  background:#f8fafc!important;
}
.sp-portal-messenger-user-list{min-height:0!important;overflow:auto!important;}
.sp-portal-messenger-chat{min-height:0!important;overflow:hidden!important;}
.sp-portal-chat-form{display:flex!important;gap:10px!important;padding:12px!important;border-top:1px solid #e5e7eb!important;background:#fff!important;}
.sp-portal-chat-form textarea{flex:1!important;min-height:44px!important;max-height:120px!important;border:1px solid #dbe3ef!important;border-radius:14px!important;padding:10px 12px!important;resize:vertical!important;}
.sp-portal-chat-form button{border:0!important;border-radius:14px!important;background:#5B4BFF!important;color:#fff!important;font-weight:800!important;padding:0 16px!important;}
.sp-portal-messenger.is-minimized{background:transparent!important;pointer-events:none!important;}
.sp-portal-messenger.is-minimized .sp-portal-messenger-overlay{display:none!important;}
.sp-portal-messenger.is-minimized .sp-portal-messenger-panel{
  pointer-events:auto!important;
  top:auto!important;
  left:auto!important;
  right:22px!important;
  bottom:22px!important;
  width:min(330px,calc(100vw - 44px))!important;
  height:70px!important;
  max-height:70px!important;
  border-radius:22px!important;
}
.sp-portal-messenger.is-minimized .sp-portal-messenger-body{display:none!important;}
.sp-portal-messenger.is-minimized .sp-portal-messenger-head{border-radius:22px!important;}
@media(max-width:780px){
  .sp-portal-messenger-panel{
    top:76px!important;
    right:10px!important;
    left:10px!important;
    width:auto!important;
    height:calc(100vh - 96px)!important;
    max-height:calc(100vh - 96px)!important;
    border-radius:20px!important;
  }
  .sp-portal-messenger-head{height:64px!important;min-height:64px!important;flex-basis:64px!important;padding:0 12px!important;}
  .sp-portal-messenger-title small{display:none!important;}
  .sp-portal-messenger-title strong{font-size:18px!important;}
  .sp-portal-messenger-controls{gap:5px!important;}
  .sp-portal-messenger-controls button{width:34px!important;height:34px!important;min-width:34px!important;border-radius:11px!important;}
  .sp-portal-messenger-body{grid-template-columns:1fr!important;grid-template-rows:34vh minmax(0,1fr)!important;}
  .sp-portal-messenger-users{border-right:0!important;border-bottom:1px solid #e5e7eb!important;}
  .sp-portal-messenger.is-minimized .sp-portal-messenger-panel{right:12px!important;bottom:12px!important;left:auto!important;width:min(320px,calc(100vw - 24px))!important;height:64px!important;border-radius:20px!important;}
}

/* ==========================================================
   v3.3.4 Topbar Icon Visibility Fix
   Clear, high-contrast, clickable icons for messages, notifications,
   search, dashboard/logout and profile without changing data/logic.
   ========================================================== */
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-search-btn{
  width:52px!important;
  height:52px!important;
  min-width:52px!important;
  border-radius:16px!important;
  display:inline-grid!important;
  place-items:center!important;
  background:#ffffff!important;
  color:#111827!important;
  border:1px solid #cbd5e1!important;
  box-shadow:0 10px 24px rgba(15,23,42,.10)!important;
  font-size:0!important;
  cursor:pointer!important;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease!important;
}
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-search-btn::before{
  content:'🔎';
  display:block!important;
  font-size:24px!important;
  line-height:1!important;
  color:#111827!important;
  opacity:1!important;
}
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-search-btn:hover,
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-icon-btn:hover,
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-profile-link:hover{
  transform:translateY(-2px) scale(1.03)!important;
  box-shadow:0 18px 34px rgba(15,23,42,.16)!important;
  border-color:#5B4BFF!important;
}
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-icon-btn{
  width:56px!important;
  height:56px!important;
  min-width:56px!important;
  border-radius:999px!important;
  display:inline-grid!important;
  place-items:center!important;
  position:relative!important;
  background:#ffffff!important;
  border:1px solid #d6deec!important;
  box-shadow:0 10px 26px rgba(15,23,42,.09)!important;
  color:#111827!important;
  cursor:pointer!important;
  overflow:hidden!important;
  text-decoration:none!important;
  font-size:0!important;
  opacity:1!important;
}
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-icon-btn .sp-portal-icon{
  font-size:0!important;
  line-height:0!important;
  opacity:0!important;
  width:0!important;
  height:0!important;
  overflow:hidden!important;
}
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-icon-btn::before{
  display:block!important;
  font-size:27px!important;
  line-height:1!important;
  opacity:1!important;
  color:#111827!important;
  filter:none!important;
}
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-messenger-toggle::before{content:'💬'!important;}
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-notifications-toggle::before{content:'🔔'!important;}
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-dashboard-link::before{content:'🏠'!important;}
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-logout-link::before{content:'⎋'!important;color:#FF8A00!important;font-size:29px!important;}
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-icon-btn:focus-visible,
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-search-btn:focus-visible,
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-profile-link:focus-visible{
  outline:3px solid rgba(91,75,255,.35)!important;
  outline-offset:3px!important;
}
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-icon-btn:active,
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-search-btn:active,
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-profile-link:active{
  transform:scale(.96)!important;
}
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-profile-link{
  width:64px!important;
  height:64px!important;
  min-width:64px!important;
  border-radius:20px!important;
  border:1px solid #d6deec!important;
  background:#ffffff!important;
  display:inline-grid!important;
  place-items:center!important;
  box-shadow:0 10px 26px rgba(15,23,42,.09)!important;
  overflow:hidden!important;
  cursor:pointer!important;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease!important;
}
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-profile-link img{
  width:48px!important;
  height:48px!important;
  border-radius:999px!important;
  object-fit:cover!important;
  display:block!important;
  border:2px solid #eef2ff!important;
}
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-top-actions{
  gap:14px!important;
}
@media (max-width:760px){
  .sp-portal-ecosystem .sp-portal-topbar .sp-portal-icon-btn{width:48px!important;height:48px!important;min-width:48px!important;}
  .sp-portal-ecosystem .sp-portal-topbar .sp-portal-icon-btn::before{font-size:23px!important;}
  .sp-portal-ecosystem .sp-portal-topbar .sp-portal-search-btn{width:48px!important;height:48px!important;min-width:48px!important;}
  .sp-portal-ecosystem .sp-portal-topbar .sp-portal-profile-link{width:52px!important;height:52px!important;min-width:52px!important;border-radius:16px!important;}
  .sp-portal-ecosystem .sp-portal-topbar .sp-portal-profile-link img{width:40px!important;height:40px!important;}
}

/* v3.3.5 Subscription calendar reminder widget */
.sp-portal-ecosystem .sp-portal-payments-widget.sp-portal-subscription-widget{
  border:1px solid rgba(255,138,0,.22);
  background:linear-gradient(180deg,#fff 0%,#fffaf3 100%);
}
.sp-portal-ecosystem .sp-portal-subscription-reminder{
  display:flex;
  gap:16px;
  align-items:flex-start;
  padding:18px;
  border-radius:22px;
  background:#fff;
  border:1px solid #f3d5a2;
  box-shadow:0 16px 32px rgba(255,138,0,.10);
}
.sp-portal-ecosystem .sp-portal-subscription-icon{
  width:56px;
  min-width:56px;
  height:56px;
  display:grid;
  place-items:center;
  border-radius:18px;
  background:linear-gradient(135deg,#FF8A00,#ffc066);
  color:#fff;
  font-size:28px;
  box-shadow:0 12px 24px rgba(255,138,0,.24);
}
.sp-portal-ecosystem .sp-portal-subscription-copy strong{
  display:block;
  color:#111827;
  font-size:18px;
  margin-bottom:6px;
}
.sp-portal-ecosystem .sp-portal-subscription-copy p{
  margin:0 0 8px;
  color:#374151;
  line-height:1.55;
}
.sp-portal-ecosystem .sp-portal-subscription-copy small{
  color:#6b7280;
  font-weight:800;
}
.sp-portal-ecosystem .sp-portal-subscription-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:16px;
}
.sp-portal-ecosystem .sp-portal-primary,
.sp-portal-ecosystem .sp-portal-secondary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:12px 18px;
  border-radius:14px;
  font-weight:900;
  text-decoration:none;
  cursor:pointer;
}
.sp-portal-ecosystem .sp-portal-primary{
  background:linear-gradient(135deg,#5B4BFF,#7c3aed);
  color:#fff!important;
  border:0;
  box-shadow:0 14px 28px rgba(91,75,255,.24);
}
.sp-portal-ecosystem .sp-portal-secondary{
  background:#fff;
  color:#111827!important;
  border:1px solid #dbe3ef;
  box-shadow:0 10px 22px rgba(15,23,42,.07);
}
.sp-portal-ecosystem .sp-portal-secondary:hover,
.sp-portal-ecosystem .sp-portal-primary:hover{
  transform:translateY(-1px);
}
@media (max-width:760px){
  .sp-portal-ecosystem .sp-portal-subscription-reminder{flex-direction:column;}
  .sp-portal-ecosystem .sp-portal-subscription-actions a,
  .sp-portal-ecosystem .sp-portal-subscription-actions button{width:100%;}
}

/* v3.4.1 Topbar Icon Alignment Fix - unified reusable icon component */
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-top-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:14px!important;
}
.sp-portal-ecosystem .sp-topbar-icon,
.sp-portal-ecosystem .sp-portal-topbar .sp-topbar-icon,
.sp-portal-ecosystem .sp-portal-search .sp-topbar-icon{
  width:56px!important;
  height:56px!important;
  min-width:56px!important;
  min-height:56px!important;
  max-width:56px!important;
  max-height:56px!important;
  padding:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:50%!important;
  flex-shrink:0!important;
  box-sizing:border-box!important;
  border:1px solid #dbe3ef!important;
  background:#f8fafc!important;
  color:#111827!important;
  text-decoration:none!important;
  cursor:pointer!important;
  position:relative!important;
  overflow:hidden!important;
  box-shadow:0 8px 24px rgba(17,24,39,.08)!important;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease!important;
  line-height:1!important;
  vertical-align:middle!important;
  appearance:none!important;
  -webkit-appearance:none!important;
}
.sp-portal-ecosystem .sp-topbar-icon:hover{
  transform:translateY(-2px)!important;
  background:#ffffff!important;
  border-color:#5B4BFF!important;
  box-shadow:0 14px 34px rgba(91,75,255,.18)!important;
}
.sp-portal-ecosystem .sp-topbar-icon:active,
.sp-portal-ecosystem .sp-topbar-icon.is-active{
  transform:translateY(0) scale(.98)!important;
  background:#eef2ff!important;
  border-color:#5B4BFF!important;
  box-shadow:0 6px 18px rgba(91,75,255,.20)!important;
}
.sp-portal-ecosystem .sp-topbar-icon:focus-visible{
  outline:3px solid rgba(91,75,255,.28)!important;
  outline-offset:3px!important;
}
.sp-portal-ecosystem .sp-topbar-icon .sp-topbar-icon-glyph,
.sp-portal-ecosystem .sp-topbar-icon svg,
.sp-portal-ecosystem .sp-topbar-icon i{
  width:24px!important;
  height:24px!important;
  min-width:24px!important;
  min-height:24px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:24px!important;
  line-height:1!important;
  margin:0!important;
  padding:0!important;
  color:inherit!important;
  text-align:center!important;
}
.sp-portal-ecosystem .sp-topbar-icon--messages .sp-topbar-icon-glyph{color:#5B4BFF!important;}
.sp-portal-ecosystem .sp-topbar-icon--notifications .sp-topbar-icon-glyph{color:#FF8A00!important;}
.sp-portal-ecosystem .sp-topbar-icon--home .sp-topbar-icon-glyph{color:#5B4BFF!important;}
.sp-portal-ecosystem .sp-topbar-icon--logout .sp-topbar-icon-glyph{color:#FF8A00!important;}
.sp-portal-ecosystem .sp-topbar-icon--search .sp-topbar-icon-glyph{color:#5B4BFF!important;}
.sp-portal-ecosystem .sp-topbar-icon--profile{
  background:#fff!important;
  border-color:#dbe3ef!important;
}
.sp-portal-ecosystem .sp-topbar-icon--profile img{
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  min-height:44px!important;
  max-width:44px!important;
  max-height:44px!important;
  border-radius:50%!important;
  object-fit:cover!important;
  display:block!important;
  margin:0!important;
  padding:0!important;
  box-shadow:0 0 0 2px #fff, 0 0 0 3px #dbe3ef!important;
}
/* Remove old pseudo icons that could double-render / misalign */
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-icon-btn::before,
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-search-btn::before,
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-profile-link::before{
  content:none!important;
  display:none!important;
}
/* Normalize legacy classes in case existing markup is cached */
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-icon-btn,
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-search-btn,
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-profile-link{
  width:56px!important;
  height:56px!important;
  min-width:56px!important;
  min-height:56px!important;
  padding:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:50%!important;
  line-height:1!important;
}
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-icon,
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-icon-btn span,
.sp-portal-ecosystem .sp-portal-topbar .sp-portal-search-btn span{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:24px!important;
  height:24px!important;
  font-size:24px!important;
  line-height:1!important;
  margin:0!important;
}
.sp-portal-ecosystem .sp-portal-search{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
}
.sp-portal-ecosystem .sp-portal-search .sp-portal-search-input{
  height:56px!important;
}
@media(max-width:1024px){
  .sp-portal-ecosystem .sp-topbar-icon,
  .sp-portal-ecosystem .sp-portal-topbar .sp-portal-icon-btn,
  .sp-portal-ecosystem .sp-portal-topbar .sp-portal-search-btn,
  .sp-portal-ecosystem .sp-portal-topbar .sp-portal-profile-link{
    width:50px!important;height:50px!important;min-width:50px!important;min-height:50px!important;
  }
  .sp-portal-ecosystem .sp-topbar-icon .sp-topbar-icon-glyph,
  .sp-portal-ecosystem .sp-topbar-icon svg,
  .sp-portal-ecosystem .sp-topbar-icon i{
    width:22px!important;height:22px!important;font-size:22px!important;
  }
  .sp-portal-ecosystem .sp-topbar-icon--profile img{width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;}
}
@media(max-width:640px){
  .sp-portal-ecosystem .sp-portal-topbar .sp-portal-top-actions{gap:8px!important;}
  .sp-portal-ecosystem .sp-topbar-icon,
  .sp-portal-ecosystem .sp-portal-topbar .sp-portal-icon-btn,
  .sp-portal-ecosystem .sp-portal-topbar .sp-portal-search-btn,
  .sp-portal-ecosystem .sp-portal-topbar .sp-portal-profile-link{
    width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;
  }
  .sp-portal-ecosystem .sp-topbar-icon .sp-topbar-icon-glyph,
  .sp-portal-ecosystem .sp-topbar-icon svg,
  .sp-portal-ecosystem .sp-topbar-icon i{
    width:20px!important;height:20px!important;font-size:20px!important;
  }
  .sp-portal-ecosystem .sp-topbar-icon--profile img{width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;}
}


/* v3.4.3 Sidebar Toggle Fix - UI only */
.sp-portal-ecosystem .sp-portal-menu-toggle{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:56px!important;
    height:56px!important;
    min-width:56px!important;
    border:0!important;
    border-radius:16px!important;
    background:#1e3a8a!important;
    color:#ffffff!important;
    font-size:26px!important;
    line-height:1!important;
    cursor:pointer!important;
    box-shadow:0 10px 24px rgba(15,23,42,.16)!important;
    transition:transform .18s ease, box-shadow .18s ease, background .18s ease!important;
}
.sp-portal-ecosystem .sp-portal-menu-toggle:hover,
.sp-portal-ecosystem .sp-portal-menu-toggle.is-active{
    background:#5B4BFF!important;
    transform:translateY(-1px)!important;
    box-shadow:0 14px 30px rgba(91,75,255,.25)!important;
}
.sp-portal-ecosystem .sp-portal-menu-toggle[hidden]{display:none!important;}
.sp-portal-ecosystem .sp-portal-sidebar-backdrop{
    position:fixed!important;
    inset:0!important;
    background:rgba(7,18,38,.52)!important;
    backdrop-filter:blur(3px)!important;
    z-index:998!important;
    opacity:0!important;
    pointer-events:none!important;
    transition:opacity .2s ease!important;
}
.sp-portal-ecosystem.is-sidebar-open .sp-portal-sidebar-backdrop{
    opacity:1!important;
    pointer-events:auto!important;
}
@media (min-width:1101px){
    .sp-portal-ecosystem.sp-portal-sidebar-collapsed{
        grid-template-columns:0 minmax(0,1fr)!important;
    }
    .sp-portal-ecosystem.sp-portal-sidebar-collapsed .sp-portal-sidebar{
        width:0!important;
        min-width:0!important;
        max-width:0!important;
        padding-left:0!important;
        padding-right:0!important;
        border:0!important;
        overflow:hidden!important;
        opacity:0!important;
        pointer-events:none!important;
        transform:translateX(-16px)!important;
        transition:width .22s ease, max-width .22s ease, opacity .18s ease, transform .22s ease, padding .22s ease!important;
    }
    .sp-portal-ecosystem .sp-portal-sidebar{
        transition:width .22s ease, max-width .22s ease, opacity .18s ease, transform .22s ease, padding .22s ease!important;
    }
}
@media (max-width:1100px){
    .sp-portal-ecosystem .sp-portal-menu-toggle{
        width:50px!important;
        height:50px!important;
        min-width:50px!important;
        border-radius:14px!important;
        font-size:24px!important;
    }
    .sp-portal-ecosystem .sp-portal-sidebar{
        position:fixed!important;
        top:0!important;
        left:0!important;
        width:min(86vw,330px)!important;
        max-width:min(86vw,330px)!important;
        height:100vh!important;
        min-height:100vh!important;
        overflow-y:auto!important;
        z-index:999!important;
        transform:translateX(-105%)!important;
        opacity:1!important;
        transition:transform .25s ease!important;
        border-radius:0 28px 28px 0!important;
    }
    .sp-portal-ecosystem.is-sidebar-open .sp-portal-sidebar{
        transform:translateX(0)!important;
    }
    body.sp-portal-sidebar-lock{overflow:hidden!important;}
}
@media (max-width:720px){
    .sp-portal-ecosystem .sp-portal-menu-toggle{
        width:44px!important;
        height:44px!important;
        min-width:44px!important;
        font-size:22px!important;
        border-radius:13px!important;
    }
}
