:root {
  --brand: #0a6e46;
  --brand-dark: #07583a;
  --brand-accent: #f07c00;
  --brand-soft: #eef7f2;
  --portal-text: #24312b;
  --portal-muted: #65716c;
  --portal-line: #dfe6e2;
}

body[data-brand="axa"] {
  --brand: #00008f;
  --brand-dark: #000072;
  --brand-accent: #e11b22;
  --brand-soft: #f0f2fa;
  --portal-text: #20274a;
  --portal-muted: #69708e;
  --portal-line: #dfe2ef;
}
body[data-brand="generali"] {
  --brand: #c21b17;
  --brand-dark: #9e1512;
  --brand-accent: #c21b17;
  --brand-soft: #fbf1f0;
  --portal-text: #342725;
  --portal-muted: #766764;
  --portal-line: #eadfdd;
}

* { box-sizing: border-box; }
body { margin: 0; background: #f4f6f5; color: var(--portal-text); font: 15px/1.55 Arial, Helvetica, sans-serif; }
button, select { font: inherit; }
.demo-switcher {
  position: fixed; z-index: 20; right: 18px; bottom: 18px;
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border: 1px solid #d3d8d5; border-radius: 8px; background: rgba(255,255,255,.96);
  box-shadow: 0 10px 35px rgba(25,36,31,.16);
}
.demo-switcher label { color: #606863; font-size: .73rem; font-weight: 700; text-transform: uppercase; }
.demo-switcher select { min-height: 36px; padding: 5px 30px 5px 9px; border: 1px solid #bac1bd; border-radius: 5px; background: #fff; }
.portal-shell { min-height: 100vh; }
.portal-header {
  position: sticky; z-index: 10; top: 0; height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 clamp(20px, 4vw, 56px); border-bottom: 1px solid var(--portal-line); background: #fff;
}
.portal-logo-wrap { display: flex; align-items: center; gap: 18px; }
.portal-logo { display: block; width: auto; height: 48px; max-width: 185px; object-fit: contain; object-position: left center; }
body[data-brand="axa"] .portal-logo { width: 52px; height: 52px; }
body[data-brand="generali"] .portal-logo { width: 190px; height: 40px; }
.portal-space-label { padding-left: 18px; border-left: 1px solid var(--portal-line); color: var(--portal-muted); font-weight: 700; }
.portal-header-actions { display: flex; align-items: center; gap: 14px; }
.icon-button { width: 42px; height: 42px; padding: 9px; border: 1px solid var(--portal-line); border-radius: 50%; background: #fff; }
.icon-button svg { width: 100%; fill: var(--brand); }
.profile-button { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border: 0; background: none; color: var(--portal-text); text-align: left; }
.profile-button strong, .profile-button small { display: block; }
.profile-button small { color: var(--portal-muted); }
.profile-avatar, .advisor-avatar { display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; }
.profile-avatar { width: 42px; height: 42px; }
.portal-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: calc(100vh - 82px); }
.portal-sidebar { padding: 34px 22px; border-right: 1px solid var(--portal-line); background: #fff; }
.portal-welcome { margin: 0 12px 26px; font-size: 1.12rem; font-weight: 700; }
.portal-nav { display: grid; gap: 5px; }
.portal-nav button {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 47px; padding: 10px 12px;
  border: 0; border-radius: 6px; background: transparent; color: var(--portal-muted); cursor: default; text-align: left;
}
.portal-nav button.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.nav-icon { display: grid; place-items: center; width: 23px; height: 23px; color: var(--brand); font-size: 1.05rem; font-weight: 700; }
.advisor-card { margin-top: 42px; padding: 18px; border: 1px solid var(--portal-line); border-radius: 9px; background: var(--brand-soft); text-align: center; }
.advisor-avatar { width: 48px; height: 48px; margin: -42px auto 10px; border: 3px solid #fff; }
.advisor-card small, .advisor-card strong { display: block; }
.advisor-card small { color: var(--portal-muted); }
.advisor-card button { margin-top: 12px; padding: 7px 13px; border: 1px solid var(--brand); border-radius: 4px; background: transparent; color: var(--brand); font-weight: 700; }
.portal-main { min-width: 0; padding: 30px clamp(20px, 4vw, 58px) 80px; }
.portal-breadcrumb { margin-bottom: 26px; color: var(--portal-muted); font-size: .78rem; }
.portal-breadcrumb span { margin: 0 8px; }
.portal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; margin-bottom: 26px; }
.portal-kicker { color: var(--brand); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.portal-heading h1 { margin: 5px 0 7px; font-size: clamp(1.8rem, 3vw, 2.55rem); line-height: 1.15; }
.portal-heading p { max-width: 680px; margin: 0; color: var(--portal-muted); }
.contract-chip { flex: 0 0 auto; padding: 11px 15px; border-left: 3px solid var(--brand-accent); background: #fff; box-shadow: 0 4px 18px rgba(30,40,35,.06); }
.contract-chip small, .contract-chip strong { display: block; }
.contract-chip small { color: var(--portal-muted); }
.portal-embed-card { overflow: hidden; border: 1px solid var(--portal-line); border-radius: 10px; background: #fff; box-shadow: 0 12px 38px rgba(25,35,30,.07); }
.portal-embed-frame { display: block; width: 100%; height: 1020px; padding: clamp(20px, 4vw, 42px); border: 0; background: #fff; }
.portal-embed-missing { padding: 50px; text-align: center; }
.portal-disclaimer { margin-top: 22px; padding-right: 190px; color: #7a817d; font-size: .72rem; }

@media (max-width: 900px) {
  .portal-layout { grid-template-columns: 1fr; }
  .portal-sidebar { padding: 14px 20px; border-right: 0; border-bottom: 1px solid var(--portal-line); }
  .portal-welcome, .advisor-card { display: none; }
  .portal-nav { display: flex; overflow-x: auto; }
  .portal-nav button { flex: 0 0 auto; width: auto; white-space: nowrap; }
  .portal-header { height: 72px; }
  .portal-space-label { display: none; }
}
@media (max-width: 650px) {
  .portal-header { padding-inline: 14px; }
  .portal-logo { max-width: 125px; height: 42px; }
  body[data-brand="generali"] .portal-logo { width: 140px; }
  .profile-button > span:not(.profile-avatar) { display: none; }
  .portal-heading { flex-direction: column; }
  .portal-embed-frame { padding: 18px; }
  .demo-switcher { right: 10px; bottom: 10px; }
  .portal-disclaimer { padding-right: 0; margin-bottom: 70px; }
}
