.portal-body {
    --navy: #093967;
    --navy-700: #0B4A82;
    --navy-800: #062544;
    --accent: #0066AE;
    --accent-soft: #E5F3FC;
    --accent-ring: rgba(0, 102, 174, .24);
    --info: #0066AE;
    --info-bg: #E5F3FC;
    --portal-navy: #093967;
    --portal-navy-deep: #062544;
    --portal-blue: #0066AE;
    --portal-blue-mid: #1A7FC0;
    --portal-sky: #28B4E8;
    --portal-sheen: linear-gradient(180deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, 0) 42%);
    --portal-card-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .9),
        0 8px 22px rgba(9, 57, 103, .08),
        0 1px 2px rgba(9, 57, 103, .05);
    margin: 0;
    min-height: 100dvh;
    background:
        radial-gradient(900px 280px at 50% -60px, rgba(0, 102, 174, .16), transparent 62%),
        linear-gradient(180deg, #E8F2FA 0%, #F3F6F9 32%, #EEF3F8 100%);
    color: var(--text);
    font-family: var(--font);
    overflow-x: hidden;
}

.portal-shell {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

.portal-top {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 6px 14px;
    color: #fff;
    background:
        var(--portal-sheen),
        linear-gradient(180deg, #1A7FC0 0%, var(--portal-blue) 58%, #005A9C 100%);
    box-shadow: 0 10px 24px rgba(0, 102, 174, .28);
}

.portal-top::after {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent);
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.portal-brand .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(180deg, #2FA6FC 0%, var(--portal-blue) 100%);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    flex: 0 0 auto;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 4px 10px rgba(0, 102, 174, .35);
}

.portal-brand strong,
.portal-brand small {
    display: block;
    line-height: 1.15;
}

.portal-brand strong { font-size: 13px; font-weight: 700; letter-spacing: 0; }
.portal-brand small {
    opacity: .78;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0;
}

.portal-top-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

.portal-icon-btn {
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: inherit;
    border-radius: 10px;
    display: grid;
    place-items: center;
}

.portal-icon-btn:hover { background: rgba(255, 255, 255, .1); }

.portal-main {
    flex: 1 1 auto;
    width: min(720px, 100%);
    margin: 0 auto;
    padding: 12px 12px 92px;
    box-sizing: border-box;
}

.portal-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.portal-head > div { min-width: 0; }
.portal-head .eyebrow {
    margin: 0 0 2px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
}

.portal-page-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--portal-navy);
    letter-spacing: -.02em;
}

.portal-lede {
    margin: 2px 0 0;
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 18px;
}

.portal-head-actions { flex: 0 0 auto; }
.portal-head-actions .btn { min-height: 38px; padding-inline: 12px; }

.portal-section {
    margin-bottom: 10px;
}

.portal-kpis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin: 0;
}

.portal-kpi {
    background: linear-gradient(180deg, #F8FBFC 0%, #fff 48%);
    padding: 10px 12px;
    min-width: 0;
    box-shadow: none;
    border: 0;
    border-radius: 0;
}

.portal-kpi span {
    display: block;
    font-size: 12px;
    letter-spacing: 0;
    text-transform: none;
    color: #6B7280;
    margin-bottom: 2px;
    font-weight: 400;
}

.portal-kpi strong {
    display: block;
    font-size: 16px;
    line-height: 20px;
    font-weight: 700;
    color: var(--portal-navy);
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}

.portal-kpi.is-warn { background: linear-gradient(180deg, #FFF8EE 0%, #FFF6E8 100%); }
.portal-kpi.is-ok { background: linear-gradient(180deg, #F3FAF6 0%, #E8F7EF 100%); }

.portal-card {
    background:
        var(--portal-sheen),
        linear-gradient(180deg, #FFFFFF 0%, #FBFCFD 100%);
    border: 1px solid rgba(208, 215, 226, .85);
    border-radius: 12px;
    padding: 12px 13px;
    box-shadow: var(--portal-card-shadow);
    margin-bottom: 10px;
    min-width: 0;
}

.portal-card > h2,
.portal-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding-bottom: 0;
    border-bottom: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
    text-transform: none;
    color: var(--portal-navy);
}

.portal-card > h2::before,
.portal-section-title::before {
    display: none;
}

.portal-meta {
    display: grid;
    gap: 8px 12px;
    margin: 0;
}

.portal-meta.two { grid-template-columns: 1fr 1fr; }

.portal-meta > div {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.portal-meta dt {
    font-size: 12px;
    color: #6B7280;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.portal-meta dd {
    margin: 0;
    font-size: 14px;
    line-height: 18px;
    font-weight: 700;
    color: var(--portal-navy);
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}

.portal-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 0 0 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.portal-row:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }

.portal-row p { margin: 2px 0 0; color: var(--text-muted); font-size: 12px; }
.portal-row strong { color: var(--portal-navy); font-size: 13.5px; }

.portal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.portal-actions .btn,
.portal-card .btn {
    min-height: 38px;
}

.portal-body .btn-primary {
    background: linear-gradient(180deg, #1A7FC0 0%, var(--portal-blue) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 6px 14px rgba(0, 102, 174, .28);
}

.portal-body .btn-ghost {
    background: linear-gradient(180deg, #fff 0%, #F7F9FB 100%);
    border-color: var(--border-strong);
}

.portal-alert {
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 13px;
    line-height: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65);
}

.portal-alert.ok {
    background: linear-gradient(180deg, #F3FAF6, var(--success-bg));
    color: var(--success);
    border: 1px solid #C6EBD6;
}

.portal-alert.warn {
    background: linear-gradient(180deg, #FFFBF3, var(--warning-bg));
    color: var(--warning);
    border: 1px solid #F3D7A8;
}

.portal-progress {
    height: 6px;
    border-radius: 99px;
    background: var(--border);
    overflow: hidden;
    margin: 8px 0 0;
    box-shadow: inset 0 1px 2px rgba(9, 57, 103, .08);
}

.portal-progress > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--portal-sky), var(--portal-blue));
    box-shadow: 0 0 8px rgba(0, 102, 174, .28);
}

.portal-journey-card {
    background: rgba(255, 255, 255, .58);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, .72);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .8),
        0 10px 28px rgba(9, 57, 103, .06);
}

.portal-journey {
    display: grid;
    gap: 0;
    margin: 2px 0 0;
    padding: 0;
    list-style: none;
}

.portal-journey li {
    display: grid;
    grid-template-columns: 16px 1fr;
    gap: 12px;
    position: relative;
    padding: 0 0 16px;
    min-height: 36px;
    font-size: 14px;
    color: var(--text-muted);
}

.portal-journey li:last-child { padding-bottom: 0; }

.portal-journey li::before {
    content: "";
    width: 10px;
    height: 10px;
    margin-top: 4px;
    border-radius: 99px;
    background: rgba(148, 163, 184, .45);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .55);
    z-index: 1;
}

.portal-journey li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 16px;
    bottom: 0;
    width: 2px;
    border-radius: 99px;
    background: rgba(0, 102, 174, .12);
}

.portal-journey li.is-done { color: var(--portal-navy); opacity: .9; }
.portal-journey li.is-done::before,
.portal-journey li.is-current::before {
    background: linear-gradient(180deg, var(--portal-sky), var(--portal-blue));
    box-shadow: 0 0 0 3px rgba(0, 102, 174, .12);
}
.portal-journey li.is-done:not(:last-child)::after,
.portal-journey li.is-current:not(:last-child)::after {
    background: linear-gradient(180deg, var(--portal-blue), rgba(0, 102, 174, .12));
}
.portal-journey li.is-current {
    font-weight: 700;
    color: var(--portal-navy);
    opacity: 1;
}
.portal-journey li.is-current::before {
    box-shadow: 0 0 0 4px rgba(40, 180, 232, .22);
}
.portal-journey li.is-pending {
    opacity: .4;
}
.portal-journey li.is-reject::before { background: var(--danger); box-shadow: 0 0 0 3px rgba(180, 35, 24, .12); }
.portal-journey li.is-reject { color: var(--danger); font-weight: 700; opacity: 1; }

.portal-journey-copy {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding-top: 1px;
}

.portal-journey-copy strong {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.portal-journey li.is-current .portal-journey-copy strong {
    font-weight: 700;
}

.portal-journey-copy time {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 400;
    color: #6B7280;
    white-space: nowrap;
}

.portal-journey li.is-current .portal-journey-copy time {
    color: var(--portal-blue);
    font-weight: 600;
}

.portal-bottom {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background:
        var(--portal-sheen),
        linear-gradient(180deg, #FFFFFF 0%, #F7F9FC 100%);
    border-top: 1px solid rgba(208, 215, 226, .9);
    box-shadow: 0 -8px 20px rgba(9, 57, 103, .08);
    padding: 4px 4px calc(6px + env(safe-area-inset-bottom));
}

.portal-bottom a,
.portal-bottom button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    min-height: 48px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
}

.portal-bottom a.is-active,
.portal-bottom button.is-active { color: var(--accent); }

.portal-drawer {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(11, 18, 32, .48);
    display: none;
}

.portal-drawer.is-open { display: block; }

.portal-drawer-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        var(--portal-sheen),
        #fff;
    border-radius: 16px 16px 0 0;
    padding: 10px 14px calc(16px + env(safe-area-inset-bottom));
    max-height: 80dvh;
    overflow: auto;
    box-shadow: 0 -12px 32px rgba(9, 57, 103, .18);
}

.portal-drawer-panel a,
.portal-drawer-panel button {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
    text-align: left;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.portal-side { display: none; }

.portal-welcome {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    min-width: 0;
    padding: 10px 12px;
    background:
        var(--portal-sheen),
        linear-gradient(135deg, #0B4A82 0%, var(--portal-blue) 52%, #1AA3D6 100%);
    color: #fff;
    border-radius: 12px;
    box-shadow: var(--portal-card-shadow), 0 10px 24px rgba(0, 102, 174, .28);
}

.portal-welcome .eyebrow { color: rgba(255, 255, 255, .72); margin: 0 0 1px; font-size: 13px; font-weight: 500; letter-spacing: 0; }
.portal-welcome .portal-page-title { color: #fff; font-size: 20px; line-height: 24px; font-weight: 700; }
.portal-welcome .portal-lede { color: rgba(255, 255, 255, .78); }

.portal-welcome-photo {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
}

.portal-welcome-photo .portal-photo {
    display: block;
    width: 56px;
    height: 56px;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 0 0 4px rgba(47, 166, 252, .45);
}

.portal-welcome-body { min-width: 0; }

.portal-finance {
    padding: 16px 16px 14px;
    border-radius: 16px;
}

.portal-finance-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
}

.portal-kicker {
    display: none;
}

.portal-finance-head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
    color: var(--portal-navy);
}

.portal-finance-head a {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}

.portal-hero {
    padding: 14px 16px 12px;
    margin: 0 0 10px;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 46%),
        linear-gradient(180deg, #E8F4FC 0%, #F7FBFE 100%);
    border: 1px solid rgba(0, 102, 174, .14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.portal-hero-label,
.portal-hero-hint {
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    color: #6B7280;
}

.portal-hero-value {
    margin: 2px 0 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.03em;
    color: var(--portal-navy);
    white-space: nowrap;
    font-variant-numeric: tabular-nums lining-nums;
}

.portal-rp {
    display: inline-block;
    margin-right: 4px;
    font-size: .55em;
    font-weight: 600;
    letter-spacing: 0;
    vertical-align: .12em;
    color: #6B7280;
}

.portal-nextdue {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 0;
    margin: 0 0 12px;
    border-radius: 12px;
    background: linear-gradient(180deg, #F8FAFC 0%, #F4F6F9 100%);
    border: 1px solid rgba(208, 215, 226, .7);
    overflow: hidden;
}

.portal-nextdue > div {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 6px;
    padding: 14px 16px;
    min-width: 0;
}

.portal-nextdue > div + div {
    border-left: 1px solid rgba(208, 215, 226, .7);
}

.portal-nextdue-label {
    display: block;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.3;
    color: #6B7280;
}

.portal-nextdue-value {
    display: block;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--portal-navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

.portal-nextdue-value .portal-rp {
    display: inline;
    margin-right: 3px;
    font-size: 12px;
    font-weight: 600;
    line-height: inherit;
    vertical-align: 0;
    color: #6B7280;
}

.portal-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.portal-pills li {
    margin: 0;
    padding: 6px 10px;
    border-radius: 99px;
    background: #F3F6F9;
    border: 1px solid rgba(208, 215, 226, .8);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

.portal-pills li.is-ok {
    background: #F0F8F3;
    border-color: #CDE8D7;
    color: #1F6B45;
}

.portal-pills li.is-warn {
    background: #FFF7EC;
    border-color: #F0D4A4;
    color: #8A5A12;
}

.portal-progress-block {
    margin: 0 0 12px;
}

.portal-progress-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.portal-progress-meta span {
    font-size: 12px;
    font-weight: 400;
    color: #6B7280;
}

.portal-progress-meta strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--portal-navy);
    font-variant-numeric: tabular-nums;
}

.portal-progress-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--text-muted);
}

.portal-ledger {
    margin: 0;
    padding: 0;
    list-style: none;
}

.portal-ledger li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(208, 215, 226, .55);
    font-size: 14px;
    line-height: 1.35;
}

.portal-ledger li:first-child { padding-top: 2px; }

.portal-ledger span {
    color: #6B7280;
    font-weight: 400;
}

.portal-ledger strong {
    color: var(--portal-navy);
    font-weight: 700;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.portal-ledger .is-foot {
    border-bottom: 0;
    padding-bottom: 2px;
    margin-top: 2px;
}

.portal-ledger .is-foot span,
.portal-ledger .is-foot strong {
    color: var(--portal-navy);
    font-weight: 600;
}

.portal-finance .portal-actions {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(208, 215, 226, .55);
}

.portal-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--accent-soft);
}

.portal-photo.fallback {
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--navy);
}

.portal-profile-head {
    display: flex;
    gap: 12px;
    align-items: center;
}

.portal-profile-head .portal-photo,
.portal-profile-head img.portal-photo {
    width: 64px;
    height: 64px;
}

.portal-profile-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 42%),
        linear-gradient(135deg, #0B4A82 0%, var(--portal-blue) 55%, #1AA3D6 130%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: 0 12px 28px rgba(0, 102, 174, .22);
}

.portal-profile-photo {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
}

.portal-profile-photo .portal-photo {
    display: block;
    width: 72px;
    height: 72px;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .92), 0 0 0 4px rgba(47, 166, 252, .4);
}

.portal-profile-id { min-width: 0; }

.portal-profile-hero .portal-page-title {
    color: #fff;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
}

.portal-profile-no {
    margin: 3px 0 8px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, .78);
    font-variant-numeric: tabular-nums;
}

.portal-profile-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.portal-profile-hero .badge {
    background: rgba(255, 255, 255, .16);
    color: #fff;
    border-color: rgba(255, 255, 255, .28);
}

.portal-text-action {
    position: relative;
    margin: 0;
    color: rgba(255, 255, 255, .92);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.portal-text-action .photo-replace-file {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    cursor: pointer;
}

.portal-sheet-card {
    padding: 14px 16px 12px;
    background: rgba(255, 255, 255, .72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.portal-sheet {
    margin: 0;
    padding: 0;
    list-style: none;
}

.portal-sheet li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(0, 102, 174, .08);
}

.portal-sheet li:last-child { border-bottom: 0; padding-bottom: 2px; }

.portal-sheet span {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 400;
    color: #6B7280;
}

.portal-sheet strong {
    min-width: 0;
    max-width: 68%;
    text-align: right;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--portal-navy);
    overflow-wrap: anywhere;
}

.portal-sheet .is-stack {
    display: grid;
    gap: 3px;
}

.portal-sheet .is-stack strong {
    max-width: none;
    text-align: left;
    font-weight: 500;
    font-size: 13px;
}

.portal-sheet-note {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.4;
    color: #6B7280;
}

.portal-empty .empty-state { padding: 16px 8px; }
.portal-empty .empty-state h3 { font-size: 15px; }
.portal-stack { display: grid; gap: 8px; }
.portal-stack > .portal-card { margin-bottom: 0; }

.portal-inst-card {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.portal-inst-card .portal-row p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-inst-card.is-paid {
    background: linear-gradient(180deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 40%), linear-gradient(180deg, #F3FAF6, #EAF6EF);
    border-color: rgba(167, 214, 188, .7);
}

.portal-inst-card.is-upcoming {
    background: linear-gradient(180deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 40%), linear-gradient(180deg, #F1F7FC, #E8F2FA);
    border-color: rgba(167, 201, 224, .7);
}

.portal-inst-card.is-due {
    background: linear-gradient(180deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 40%), linear-gradient(180deg, #FFF9F1, #FBF1E4);
    border-color: rgba(232, 204, 160, .7);
}

.portal-inst-card.is-partial {
    background: linear-gradient(180deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 40%), linear-gradient(180deg, #F6F3FB, #EEE8F7);
    border-color: rgba(196, 180, 222, .7);
}

.portal-inst-card.is-overdue {
    background: linear-gradient(180deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 40%), linear-gradient(180deg, #FDF5F4, #F8EBE9);
    border-color: rgba(232, 184, 178, .7);
}

.portal-inst-card.tint-1.is-paid { background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 40%), linear-gradient(180deg, #F0F8F4, #E4F3EB); }
.portal-inst-card.tint-2.is-paid { background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 40%), linear-gradient(180deg, #F4FBF7, #E8F5EE); }
.portal-inst-card.tint-3.is-paid { background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 40%), linear-gradient(180deg, #EEF7F2, #E2F1E8); }

.portal-inst-card.tint-1.is-upcoming { background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 40%), linear-gradient(180deg, #EEF6FC, #E3F0F8); }
.portal-inst-card.tint-2.is-upcoming { background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 40%), linear-gradient(180deg, #F3F9FD, #EAF4FB); }
.portal-inst-card.tint-3.is-upcoming { background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 40%), linear-gradient(180deg, #ECF5FB, #E0EEF7); }

.portal-inst-card.tint-1.is-due { background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 40%), linear-gradient(180deg, #FFF6EB, #F8EDDC); }
.portal-inst-card.tint-2.is-due { background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 40%), linear-gradient(180deg, #FFFBF4, #F6F0E4); }
.portal-inst-card.tint-3.is-due { background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 40%), linear-gradient(180deg, #FFF4E8, #F6E8D4); }

.portal-body .muted { font-size: 12px; line-height: 17px; }

.portal-stack + .portal-section-title { margin-top: 14px; }

.portal-welcome .badge {
    vertical-align: middle;
}

@media (min-width: 768px) {
    .portal-shell {
        display: grid;
        grid-template-columns: 210px 1fr;
        align-items: start;
    }
    .portal-top { grid-column: 1 / -1; }
    .portal-side {
        display: flex;
        flex-direction: column;
        gap: 2px;
        position: sticky;
        top: 52px;
        height: calc(100dvh - 52px);
        padding: 12px 10px;
        border-right: 1px solid var(--border);
        background:
            var(--portal-sheen),
            linear-gradient(180deg, #fff 0%, #F7F9FC 100%);
    }
    .portal-side a {
        display: flex;
        align-items: center;
        min-height: 40px;
        padding: 0 10px;
        border-radius: 9px;
        text-decoration: none;
        color: var(--text-secondary);
        font-weight: 600;
        font-size: 13px;
    }
    .portal-side a.is-active {
        background: linear-gradient(180deg, #E5F3FC, #D4EBF8);
        color: var(--accent);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
    }
    .portal-main {
        width: min(860px, 100%);
        padding: 16px 18px 28px;
        margin: 0;
    }
    .portal-bottom,
    .portal-menu-btn { display: none; }
    .portal-kpis { grid-template-columns: repeat(3, 1fr); }
    .portal-page-title { font-size: 22px; line-height: 1.25; }
    .portal-hero-value { font-size: 32px; }
    .portal-finance-head h2 { font-size: 16px; }
}

@media (min-width: 1024px) {
    .portal-kpis { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1440px) {
    .portal-main { width: min(960px, 100%); }
}

@media (max-width: 430px) {
    .portal-main { padding-inline: 10px; }
    .portal-kpis { grid-template-columns: 1fr 1fr; }
    .portal-hero-value { font-size: 26px; }
    .portal-nextdue-value { font-size: 15px; }
}

@media (max-width: 390px) {
    html, body.portal-body { overflow-x: hidden; }
    .portal-main { padding-inline: 8px; }
    .portal-hero-value { font-size: 24px; }
    .portal-kpis { gap: 8px; }
}

.auth-body.is-portal-auth {
    --navy: #093967;
    --navy-700: #0B4A82;
    --accent: #0066AE;
    --accent-soft: #E5F3FC;
    --accent-ring: rgba(0, 102, 174, .24);
    background: #EEF4FA;
}

.auth-body.is-portal-auth .auth-panel {
    background: #0066AE;
}

.auth-body.is-portal-auth .auth-video-scrim {
    background:
        linear-gradient(180deg, rgba(9, 57, 103, .62) 0%, rgba(0, 102, 174, .22) 48%, rgba(9, 57, 103, .72) 100%);
}

.auth-body.is-portal-auth .brand-mark {
    background: linear-gradient(180deg, #2FA6FC 0%, #0066AE 48%, #005A9C 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .5),
        inset 0 -6px 10px rgba(0, 0, 0, .18),
        0 4px 8px rgba(0, 102, 174, .28);
}

.auth-body.is-portal-auth .btn-primary {
    background: linear-gradient(180deg, #1A7FC0 0%, #0066AE 100%);
}

.auth-body.is-portal-auth .btn-primary:hover {
    background: #0B4A82;
}
