/* Views beyond Portfolio, in the hero style. Loads after theme-hero-bs.css. */
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 16px; }
.pagehead h1 { margin: 0; font-family: var(--c-font-display); font-size: 32px; line-height: 1.2; font-weight: 500; letter-spacing: -.02em; color: #1B1D24; }
.pagehead p { margin: 6px 0 0; font-size: 15px; color: #8B8E99; }
.pagehead__actions { display: flex; gap: 8px; }
.controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.controls__spacer { flex: 1 1 auto; }
.field { height: 40px; padding: 0 14px 0 16px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px rgba(27,29,36,.08); gap: 10px; min-width: 260px; transition: box-shadow .15s ease; }
.field:hover { box-shadow: inset 0 0 0 1px rgba(27,29,36,.16); }
.field:focus-within { box-shadow: inset 0 0 0 1px rgba(27,29,36,.18), 0 0 0 3px rgba(33,49,93,.14); }
.field input { font-size: 15px; color: #1B1D24; letter-spacing: 0; }
.field input::placeholder { color: #8B8E99; }
.field .ic { color: #8B8E99; width: 16px; height: 16px; }
.field--date { min-width: 0; padding-left: 14px; }
.field--date .field__label { font-size: 14px; color: #8B8E99; }
.field--date input { width: 92px; font-variant-numeric: tabular-nums; }
.field--wide { min-width: 0; width: 100%; max-width: 420px; }
.select { font-size: 15px; }
.dropdown--wide .select { min-width: 260px; justify-content: space-between; }
.dropdown--wide .dropdown-menu { min-width: 260px; }
.btn-primary { background: #21315D; color: #fff; height: 40px; border-radius: 12px; font-size: 15px; font-weight: 500; padding: 0 18px; box-shadow: none; }
.btn-primary:hover { background: #182548; color: #fff; }
.btn-primary:active { background: #131D3A; }
.btn-primary:focus-visible { box-shadow: 0 0 0 3px rgba(33,49,93,.22); }
.btn-secondary { font-size: 15px; padding: 0 16px; }
.btn-sm, .btn-secondary.btn-sm, .btn-primary.btn-sm { height: 32px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn-secondary.btn-sm { color: #5A5D68; }
.btn-secondary.btn-sm:hover { color: #1B1D24; }
.btn-block { width: 100%; justify-content: center; }
.tag { height: 24px; padding: 0 10px; border-radius: 6px; font-size: 12.5px; font-weight: 500; background: #F3F3F5; color: #5A5D68; box-shadow: none; }
.tag.is-success { background: #E8F6EE; color: #1F9D55; }
.tag.is-danger { background: #FDECEC; color: #F33A3B; }
.tag.is-navy { background: #FDF5E9; color: #21315D; }
.table-card__head .btn-sm { flex: 0 0 auto; }
.table-card__head p { margin-top: 2px; }
.common__table__area .table tbody td { font-size: 14px; }
.common__table__area .table tbody td .name { font-weight: 500; color: #1B1D24; }
.common__table__area .table th.is-num, .common__table__area .table td.is-num { text-align: right; font-variant-numeric: tabular-nums; }
.common__table__area .table th:last-child, .common__table__area .table td:last-child { text-align: right; }
.row-actions { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px rgba(27,29,36,.08); color: #5A5D68; transition: box-shadow .15s ease, color .15s ease; }
.icon-btn:hover { box-shadow: inset 0 0 0 1px rgba(27,29,36,.16); color: #1B1D24; }
.icon-btn .ic { width: 15px; height: 15px; }
/* Forms */
.form { display: flex; flex-direction: column; gap: 14px; padding: 4px 22px 22px; }
.form--stack { padding: 0; gap: 12px; }
.form__row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; align-items: center; }
.form__row--top { align-items: start; }
.form__row--top .form__label { padding-top: 10px; }
.form__label { font-size: 14px; font-weight: 400; color: #8B8E99; }
.form__value { font-size: 15px; color: #1B1D24; }
.form__inline { display: flex; gap: 8px; flex-wrap: wrap; }
.form__actions { display: flex; gap: 8px; padding-top: 8px; grid-column: 2; }
.form .field--wide, .form .textarea, .form .dropdown { justify-self: start; }
.textarea { width: 100%; max-width: 620px; min-height: 160px; padding: 12px 16px; border: 0; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px rgba(27,29,36,.08); font: inherit; font-size: 15px; color: #1B1D24; resize: vertical; transition: box-shadow .15s ease; }
.textarea:hover { box-shadow: inset 0 0 0 1px rgba(27,29,36,.16); }
.textarea:focus { outline: 0; box-shadow: inset 0 0 0 1px rgba(27,29,36,.18), 0 0 0 3px rgba(33,49,93,.14); }
.textarea::placeholder { color: #8B8E99; }
.switch--form { display: inline-flex; align-items: center; height: 24px; padding: 0; background: transparent; box-shadow: none; }
.link { color: #21315D; font-weight: 500; font-size: 14px; text-decoration: none; }
.link:hover { text-decoration: underline; color: #21315D; }
/* Empty state */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 44px 22px 48px; }
.empty .ic--lg { width: 28px; height: 28px; color: #B6B8C2; margin-bottom: 6px; }
.empty__title { font-size: 15px; font-weight: 500; color: #1B1D24; }
.empty__sub { font-size: 14px; color: #8B8E99; max-width: 360px; }
/* Messages */
.msg-list { display: flex; flex-direction: column; padding-bottom: 8px; }
.msg { display: flex; gap: 14px; padding: 14px 22px; text-decoration: none; color: inherit; border-top: 1px solid rgba(27,29,36,.05); transition: background .12s ease; }
.msg:hover { background: #FEFAF3; color: inherit; }
.msg__avatar { width: 38px; height: 38px; border-radius: 50%; background: #FDF5E9; color: #21315D; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex: 0 0 auto; }
.msg__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.msg__top { display: flex; justify-content: space-between; gap: 12px; }
.msg__name { font-size: 15px; font-weight: 500; color: #1B1D24; }
.msg.is-unread .msg__name::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #F33A3B; margin-left: 8px; vertical-align: middle; }
.msg__date { font-size: 13px; color: #8B8E99; font-variant-numeric: tabular-nums; }
.msg__preview { font-size: 14px; color: #5A5D68; }
/* Login */
.login-page { min-height: 100vh; margin: 0; background: #fff; }
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 32px; }
.login__logo { height: 36px; }
.login__logo img { height: 30px; } .login__logo img.logo__mark { height: 36px; }
.login__card { width: 100%; max-width: 440px; background: #fff; border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 16px; box-shadow: inset 0 0 0 1px rgba(27,29,36,.08), 0 20px 50px rgba(27,29,36,.06); }
.login__title { margin: 0; font-family: var(--c-font-display); font-size: 28px; font-weight: 500; letter-spacing: -.02em; color: #1B1D24; }
.login__sub { margin: -8px 0 4px; font-size: 15px; color: #8B8E99; }
.login__card .seg { align-self: flex-start; }
.login__card .field { max-width: none; width: 100%; }
.login__forgot { align-self: flex-end; margin-top: -4px; }
.login__lang { display: flex; gap: 14px; font-size: 14px; color: #8B8E99; }
.login__lang a { color: #8B8E99; } .login__lang a.is-active { color: #1B1D24; font-weight: 500; }
@media (max-width: 767px) { .form__row { grid-template-columns: 1fr; gap: 6px; } .form__actions { grid-column: 1; } .pagehead { flex-direction: column; align-items: flex-start; } .field { min-width: 0; flex: 1 1 auto; } }
.btn-primary, .btn-primary:hover, .btn-primary:focus, .common__table__area .table tbody td a.btn-primary { color: #fff !important; }
.form__row { grid-template-columns: 150px minmax(0, 1fr); }
.form__actions { padding-left: 162px; }
.form--stack .form__actions { padding-left: 0; }
.form .seg { justify-self: start; }
.form .form__inline .field--date { min-width: 0; }
.login__card .field, .login__card .btn { height: 44px; flex: 0 0 auto; }
.login__card .form--stack { gap: 10px; }
.login__lang a { text-decoration: none; }
.common__table__area .table thead th:last-child, .common__table__area .table thead th.is-num, .common__table__area .table thead th.sorting.is-num { text-align: right !important; }

/* ---- Brand beige from the CVI for active fills; lighter cream for hover ---- */
:root { --beige: #FBEBD3; --beige-2: #FDF5E9; }
.seg .btn-check:checked + .btn, .seg .btn-check:checked + .btn:hover, .dropdown-menu .dropdown-item.active, .dropdown-menu .dropdown-item:active, .switcher__badge, .msg__avatar, .tag.is-navy, .event--cream { background: var(--beige) !important; color: #21315D; }
.seg .btn:hover, .dropdown-menu .dropdown-item:hover, .dropdown-menu .dropdown-item:focus-visible, .common__table__area .table tbody tr:hover td, .msg:hover, .dropdown-item--switch:hover, .switcher:hover, .switcher[aria-expanded="true"], .select:active, .btn-secondary:active, .mail a:active { background: var(--beige-2); }
.profile-menu .dropdown-item.active { background: transparent !important; }
.profile-menu .dropdown-item.active:hover { background: var(--beige-2) !important; }
.avatar { box-shadow: 0 0 0 4px var(--beige-2); }
.user__dropdown .dropdown-toggle:hover .avatar, .user__dropdown .dropdown-toggle[aria-expanded="true"] .avatar { box-shadow: 0 0 0 4px var(--beige); }

/* Switches: readable off state */
.switch--sm .switch__track, .switch--form .switch__track { background: #D9DBE3; box-shadow: none; }
.switch input:checked + .switch__track { background: #21315D; }
.switch--sm .switch__thumb, .switch--form .switch__thumb { background: #fff; box-shadow: 0 1px 2px rgba(27,29,36,.25); }
.switch input:focus-visible + .switch__track { box-shadow: 0 0 0 3px rgba(33,49,93,.16); }

/* Menus above chart markers */
.header__area.header--bar { z-index: 30; }
.dropdown-menu { z-index: 1050; }

/* Pressed and focused buttons keep our colours (no Bootstrap blue or grey) */
.btn, .btn:focus, .btn:active, .btn.active, .btn:focus-visible { border: 0; outline: 0; }
.btn-primary:active, .btn-primary:focus, .btn-primary.active, .btn-primary:first-child:active, a.btn-primary:active { background: #131D3A !important; color: #fff !important; box-shadow: none !important; }
.btn-primary:focus-visible { box-shadow: 0 0 0 3px rgba(33,49,93,.22) !important; }
.btn-secondary:active, .btn-secondary:focus, .btn-secondary.active, .btn-secondary:first-child:active, a.btn-secondary:active { background: var(--beige-2) !important; color: #1B1D24 !important; box-shadow: inset 0 0 0 1px rgba(27,29,36,.18) !important; }
.btn-secondary:focus-visible { box-shadow: inset 0 0 0 1px rgba(27,29,36,.18), 0 0 0 3px rgba(33,49,93,.14) !important; }
.btn-check:active + .btn, .btn-check:checked + .btn, .btn-check:focus + .btn { box-shadow: none; }
.icon-btn:active { background: var(--beige-2); }

/* Period pill with its date range */
.select--range { gap: 10px; }
.select__meta { font-size: 13px; font-weight: 400; color: #8B8E99; padding-left: 10px; border-left: 1px solid rgba(27,29,36,.10); line-height: 1; }

/* User info: profile grid, preferences, contact entries */
.kv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 20px; padding: 4px 22px 18px; }
.kv { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kv__label { font-size: 13px; color: #8B8E99; }
.kv__value { font-size: 15px; font-weight: 500; color: #1B1D24; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form--flush { border-top: 1px solid rgba(27,29,36,.06); padding-top: 18px; }
.prefs { display: flex; flex-direction: column; padding: 0 22px 12px; }
.pref { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid rgba(27,29,36,.06); }
.pref:first-child { border-top: 0; padding-top: 4px; }
.pref__title { font-size: 15px; font-weight: 500; color: #1B1D24; }
.pref__sub { font-size: 13px; color: #8B8E99; }
.pref .select { height: 36px; font-size: 14px; }
.entries { display: flex; flex-direction: column; padding: 0 22px 16px; }
.entry { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(27,29,36,.06); }
.entry:first-child { border-top: 0; padding-top: 4px; }
.entry__body { flex: 1; min-width: 0; }
.entry__title { font-size: 15px; font-weight: 500; color: #1B1D24; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry__sub { font-size: 13px; color: #8B8E99; }
.entry .row-actions { opacity: .7; }
.entry:hover .row-actions { opacity: 1; }

/* Mobile: tighter horizontal padding, calmer header and chart bar */
@media (max-width: 767px) {
  .shell { padding: 8px 16px 48px; gap: 16px; }
  .header__area.header--bar .container-fluid { display: flex; justify-content: space-between; padding: 0 12px; height: 60px; }
  .header__area.header--bar .logo__main { gap: 10px; }
  .logo__main img { height: 22px; } .logo img.logo__mark { height: 28px; }
  .menu-open { width: 36px; height: 36px; }
  .header__right { gap: 6px; }
  .mail a, .user__dropdown .dropdown-toggle { width: 36px; height: 36px; }
  .avatar { width: 36px; height: 36px; font-size: 12px; }
  .table-card, .chart-card { padding-left: 14px; padding-right: 14px; border-radius: 14px; }
  .table-card__head, .alloc, .form, .kv-grid, .prefs, .entries, .score { padding-left: 14px; padding-right: 14px; }
  .common__table__area .table thead th:first-child, .common__table__area .table tbody td:first-child { padding-left: 14px !important; }
  .common__table__area .table thead th:last-child, .common__table__area .table tbody td:last-child { padding-right: 14px !important; }
  .chart-card { padding: 12px 10px 4px; }
  .chart-card__bar { gap: 8px; }
  .chart-card .legend-inline { display: none; }
  .chart-card .btn-secondary span, .chart-card #exportBtn { padding: 0; width: 40px; justify-content: center; font-size: 0; }
  .chart-card #exportBtn .ic { width: 18px; height: 18px; margin: 0; }
  .select__meta { display: none; }
  .chart { height: 240px; }
  .hero__value { font-size: 40px; } .hero__value .unit { font-size: 40px; } .hero__cents { font-size: 22px; }
  .hero__metrics { margin-top: 8px; }
  .hero__metrics .col-6 { padding-right: 8px; }
  .kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pagehead h1 { font-size: 26px; }
  .field { min-width: 0; width: 100%; }
  .controls__spacer { display: none; }
}
.form .btn-sm { justify-self: start; }
@media (max-width: 767px) { .form__row { grid-template-columns: 1fr; gap: 6px; } .form__actions { padding-left: 0; } .form .field--wide { max-width: none; } .kv-grid { padding-bottom: 14px; } }
/* Tighter display type */
.pagehead h1, .login__title { letter-spacing: -.035em; }
.hero__value, .hero__value .unit { letter-spacing: -.035em; }
.table-card__head h2, .score__title, .pref__title { letter-spacing: -.02em; }

/* ---- Mobile menu ---- */
.menu-open { background: var(--beige); }
.menu-open .bi { color: #21315D; }
.menu-open:active { background: #F6DFBD; }
.offcanvas-area { width: min(320px, 86vw); padding: 0; display: flex; flex-direction: column; box-shadow: 0 0 0 1px rgba(27,29,36,.06), 24px 0 60px rgba(27,29,36,.12); }
.offcanvas__top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 14px 20px; }
.offcanvas__brand { display: inline-flex; align-items: center; gap: 9px; }
.offcanvas__brand img { height: 22px; } .offcanvas__brand img:first-child { height: 28px; }
.menu-close { background: var(--beige-2); width: 36px; height: 36px; }
.menu-close .bi { color: #21315D; }
.offcanvas-menu { padding: 8px 12px !important; flex: 1; }
.offcanvas-menu .main-menu ul { gap: 2px; }
.offcanvas-menu .main-menu ul li a { height: 48px; padding: 0 14px; border-radius: 12px; font-family: var(--c-font-display); font-size: 20px; font-weight: 500; letter-spacing: -.02em; color: #5A5D68; gap: 14px; }
.offcanvas-menu .main-menu ul li a .ic { width: 20px; height: 20px; color: #8B8E99; }
.offcanvas-menu .main-menu ul li a:hover { background: var(--beige-2); color: #1B1D24; }
.offcanvas-menu .main-menu ul li a.active { background: var(--beige); color: #21315D; font-weight: 500; }
.offcanvas-menu .main-menu ul li a.active .ic { color: #21315D; }
.offcanvas__foot { padding: 16px 20px 24px; border-top: 1px solid rgba(27,29,36,.06); display: flex; flex-direction: column; gap: 14px; }
.offcanvas__account { display: flex; align-items: center; gap: 12px; }
.offcanvas__account .avatar { box-shadow: none; }
.offcanvas__name { font-size: 15px; font-weight: 500; color: #1B1D24; }
.offcanvas__sub { font-size: 13px; color: #8B8E99; }
.offcanvas__links { display: flex; flex-direction: column; gap: 2px; }
.offcanvas__links a { display: flex; align-items: center; height: 40px; padding: 0 12px; margin: 0 -12px; border-radius: 10px; font-size: 15px; color: #5A5D68; }
.offcanvas__links a:hover { background: var(--beige-2); color: #1B1D24; }
.offcanvas__links a.is-danger { color: #F33A3B; }

/* Tabs wrapper keeps the page rhythm */
[data-tabs] { display: flex; flex-direction: column; gap: 20px; }
.login[data-tabs] { gap: 28px; }
.login__card[data-tabs], .login .login__card { gap: 16px; }

/* Date fields unified with the pills */
.field--date { min-width: 0; width: auto; height: 40px; padding: 0 12px 0 14px; gap: 8px; }
.field--date .field__label { font-size: 15px; color: #8B8E99; font-weight: 400; }
.field--date input { width: 96px; font-size: 15px; font-weight: 500; color: #1B1D24; }
.field--date .ic { width: 16px; height: 16px; color: #8B8E99; }
.range-custom { display: inline-flex; align-items: center; gap: 8px; }
.chart-card .range-custom .btn { height: 40px; }
@media (max-width: 767px) { .field--date { flex: 1 1 auto; } .field--date input { width: 84px; } .range-custom { flex-wrap: wrap; } }
.offcanvas__top { display: flex !important; flex-wrap: nowrap; }
.offcanvas__brand { display: inline-flex !important; width: auto !important; flex: 0 0 auto; }
.offcanvas-area .menu-close { margin: 0 !important; flex: 0 0 auto; }
.offcanvas-menu .main-menu ul li a::before, .offcanvas-menu .main-menu ul li a::after { display: none !important; content: none !important; }
.offcanvas__links a, .offcanvas__links a:hover { text-decoration: none; }
.range-custom[hidden] { display: none !important; }
.offcanvas-area.active { transform: translateX(0) !important; }
.offcanvas__top { position: relative; flex-direction: row !important; align-items: center; min-height: 60px; padding-right: 64px; }
.offcanvas-area .menu-close { position: absolute; top: 12px; right: 14px; }
.offcanvas-area .menu-close { left: auto !important; right: 14px !important; top: 12px !important; transform: none !important; }
/* One control scale: 40px tall, 14px text, hairline pills */
.select, .btn, .btn-secondary, .btn-primary, .field, .field input, .field--date input, .field--date .field__label, .seg .btn, .switcher, .select__meta, .pagehead__actions .btn { font-size: 14px; }
.seg.btn-group > .btn, .seg.btn-group > .btn:not(:first-child), .seg.btn-group > .btn:not(:last-child) { font-size: 14px; padding: 0 12px; }
.field--date { flex: 0 0 auto !important; width: auto !important; min-width: 0 !important; padding: 0 12px 0 14px; gap: 8px; }
.field--date input { width: 84px; }
.field:not(.field--date):not(.field--wide) { min-width: 240px; }
.select__meta { font-size: 13px; }
.btn-sm, .btn-secondary.btn-sm, .btn-primary.btn-sm { font-size: 13px; }
.tag { font-size: 12px; }
@media (max-width: 767px) { .field--date { flex: 1 1 auto !important; } }
/* Mark Pro display type: tighter tracking across the portal */
.pagehead h1, .login__title { letter-spacing: -.05em; }
.hero__value, .hero__value .unit { letter-spacing: -.05em; }
.table-card__head h2, .score__title, .pref__title, .offcanvas-menu .main-menu ul li a, .stat--plain .stat__value, .stat--plain .stat__value .unit, .kv__value, .entry__title { letter-spacing: -.03em; }
/* User info: one card, stacked sections */
.settings { padding: 0; }
.settings .section { padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 14px; }
.settings .section + .section { border-top: 1px solid rgba(27,29,36,.06); }
.settings .section__head h2 { margin: 0; font-family: var(--c-font-display); font-weight: 500; font-size: 20px; letter-spacing: -.03em; line-height: 1.4; }
.settings .section__head p { margin: 2px 0 0; font-size: 13px; color: #8B8E99; }
.settings .kv-grid--flush, .settings .prefs--flush, .settings .entries--flush { padding-left: 0; padding-right: 0; }
.settings .kv-grid--flush { padding-bottom: 6px; }
.settings .form--inset { padding-left: 0; padding-right: 0; padding-bottom: 0; }
.settings .section__foot { padding-top: 4px; }
.settings .prefs--flush { padding-bottom: 0; }
.settings .entries--flush { padding-bottom: 0; }
.pref--toggle { cursor: pointer; margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-radius: 10px; transition: background .12s ease; }
.pref--toggle:hover { background: var(--beige-2); }
.pref--toggle + .pref, .pref + .pref--toggle { border-top: 1px solid rgba(27,29,36,.06); }
.pref--toggle .switch { pointer-events: none; }
@media (max-width: 767px) { .settings .section { padding: 18px 14px 16px; } }
/* Custom range: its own row under the toolbar */
.chart-card__bar > .range-custom { flex: 1 1 100%; order: 10; display: flex; align-items: center; gap: 8px; padding: 12px 0 4px; margin-top: 4px; border-top: 1px solid rgba(27,29,36,.06); }
.range-custom__hint { font-size: 13px; color: #8B8E99; margin-left: 6px; }
.btn-secondary:focus:not(:focus-visible) { background: #fff !important; box-shadow: inset 0 0 0 1px rgba(27,29,36,.08) !important; }
.btn-primary:focus:not(:focus-visible) { background: #21315D !important; }
@media (max-width: 767px) { .chart-card__bar > .range-custom { flex-wrap: wrap; } .range-custom__hint { display: none; } }
