/* ──────────────────────────────────────────────
   Portal CSS - billigsteabonnement.dk
   Modern, engaging design for member portal
   ────────────────────────────────────────────── */

/* ── Reset ── */
.portal-page {
    margin: 0;
    font-family: var(--font-sans, system-ui, -apple-system, sans-serif);
    color: #0f172a;
    background: #faf8f4;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.portal-page *, .portal-page *::before, .portal-page *::after {
    box-sizing: border-box;
}

.portal-page--auth {
    background: #0a1f1d;
}

/* Transparent header on auth pages */
.portal-page--auth .portal-header {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
}

.portal-page--auth .portal-header__logo,
.portal-page--auth .portal-header__logo span {
    color: #fff;
}

.portal-page--auth .portal-nav__link {
    color: rgba(255, 255, 255, 0.75);
}

.portal-page--auth .portal-nav__link:hover,
.portal-page--auth .portal-nav__link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* ──────────────────────────────────────────────
   HEADER - Clean, minimal, sticky
   ────────────────────────────────────────────── */
.portal-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    position: sticky;
    top: 0;
    z-index: 100;
}

.portal-header__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.portal-header__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #0f172a;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.01em;
    flex-shrink: 0;
}

.portal-header__logo img {
    border-radius: 6px;
}

.portal-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.portal-nav__link {
    padding: 9px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
    position: relative;
}

.portal-nav__link:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.portal-nav__link.active {
    color: #0f172a;
    background: #f1f5f9;
}

.portal-nav__link--logout {
    color: #64748b;
    margin-left: 8px;
    padding-left: 16px;
    border-left: 1px solid #e2e8f0;
}

.portal-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: #0f172a;
    padding: 8px;
}

/* ──────────────────────────────────────────────
   AVATAR CHIP (top-right, dropdown menu)
   ────────────────────────────────────────────── */
.portal-avatar-chip {
    position: relative;
}
.portal-avatar-chip__trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px 5px 5px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.portal-avatar-chip__trigger:hover,
.portal-avatar-chip[data-open="true"] .portal-avatar-chip__trigger {
    background: rgba(15, 118, 110, 0.04);
    border-color: rgba(226, 232, 240, 0.9);
}
.portal-avatar-chip__avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-family: Georgia, ui-serif, serif;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(15, 118, 110, 0.25);
}
.portal-avatar-chip__name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.portal-avatar-chip__caret {
    color: #94a3b8;
    transition: transform 0.15s ease;
    flex-shrink: 0;
}
.portal-avatar-chip[data-open="true"] .portal-avatar-chip__caret {
    transform: rotate(180deg);
}
.portal-avatar-chip__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 12px;
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.10), 0 2px 8px rgba(15, 23, 42, 0.04);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    z-index: 120;
}
.portal-avatar-chip[data-open="true"] .portal-avatar-chip__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.portal-avatar-chip__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.12s ease;
}
.portal-avatar-chip__item svg { color: #64748b; flex-shrink: 0; }
.portal-avatar-chip__item:hover {
    background: rgba(15, 118, 110, 0.06);
    color: #0f766e;
}
.portal-avatar-chip__item:hover svg { color: #0f766e; }
.portal-avatar-chip__item--danger:hover {
    background: rgba(239, 68, 68, 0.06);
    color: #dc2626;
}
.portal-avatar-chip__item--danger:hover svg { color: #dc2626; }
.portal-avatar-chip__sep {
    height: 1px;
    background: rgba(226, 232, 240, 0.8);
    margin: 4px 8px;
}

/* ──────────────────────────────────────────────
   TAB RAIL (inline in top bar, primary section nav)
   Left-aligned after logo, subtle underline for active.
   ────────────────────────────────────────────── */
.portal-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    height: 100%;
    margin-left: 8px;
}
.portal-tabs::-webkit-scrollbar { display: none; }
.portal-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 100%;
    padding: 0 14px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease;
    letter-spacing: -0.005em;
}
.portal-tab:hover { color: #0f172a; }
.portal-tab::after {
    content: '';
    position: absolute;
    left: 12px; right: 12px;
    bottom: -1px;
    height: 2px;
    background: #0f766e;
    opacity: 0;
    transform: scaleX(0.3);
    transform-origin: center;
    transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.portal-tab--active {
    color: #0f172a;
    font-weight: 600;
}
.portal-tab--active::after {
    opacity: 1;
    transform: scaleX(1);
}

/* Avatar chip pushed to far right */
.portal-avatar-chip { margin-left: auto; }

@media (max-width: 880px) {
    .portal-header__inner { gap: 12px; padding: 0 16px; }
    .portal-tabs { margin-left: 0; }
    .portal-tab { padding: 0 10px; font-size: 0.875rem; }
    .portal-avatar-chip__name { display: none; }
}

/* ──────────────────────────────────────────────
   FAVORITE SECTION + ITEM (shared between dashboard + favorites page)
   ────────────────────────────────────────────── */
.fav-section { margin-bottom: 32px; }
.fav-section__head {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 14px;
    padding-left: 2px;
}
.fav-section__title {
    font-family: Georgia, ui-serif, serif;
    font-size: 1.25rem; font-weight: 700; color: #0f172a;
    margin: 0; letter-spacing: -0.015em;
}
.fav-section__count {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 3px 9px;
    background: rgba(15, 118, 110, 0.08);
    color: #0f766e;
    border-radius: 999px;
    letter-spacing: 0.02em;
}
.fav-section__rule {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(15,118,110,0.25) 0%, rgba(15,118,110,0) 100%);
    margin-left: 4px;
}
.fav-section__foot {
    margin-top: 4px;
    padding-left: 2px;
    font-size: 0.8125rem;
}
.fav-section__foot a {
    color: #0f766e;
    text-decoration: none;
    font-weight: 600;
}
.fav-section__foot a:hover { text-decoration: underline; }

.fav-grid {
    display: flex;
    flex-direction: column;
    background: transparent;
}
.fav-item {
    display: grid;
    grid-template-columns: 64px 1fr minmax(160px, auto);
    gap: 18px;
    align-items: center;
    padding: 18px 4px;
    background: transparent;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
    transition: background .15s ease;
}
.fav-item:last-child { border-bottom: none; }
.fav-item:hover { background: rgba(15, 118, 110, 0.025); }
.fav-item__img {
    width: 64px; height: 64px;
    display: flex; align-items: center; justify-content: center;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    padding: 6px;
}
.fav-item__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.fav-item__img--logo {
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    border: 1px solid rgba(226, 232, 240, 0.6);
}
.fav-item__main { min-width: 0; }
.fav-item__title {
    font-weight: 700; font-size: 0.9375rem; color: #0f172a;
    line-height: 1.3; margin: 0 0 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fav-item__meta {
    font-size: 0.8125rem; color: #64748b;
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.fav-item__meta .dot { color: #cbd5e1; }
.fav-item__price-col {
    display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
    min-width: 140px;
}
.fav-item__price {
    font-weight: 800; font-size: 1.0625rem; color: #0f172a;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.fav-item__price-sub { font-size: 0.75rem; color: #94a3b8; font-variant-numeric: tabular-nums; }
.fav-item__spark-row {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.75rem;
    margin-top: 2px;
}
.fav-item__spark-row .bap-spark {
    width: 80px !important;
    height: 22px !important;
}
.bap-spark { display: block; }
.fav-change { font-weight: 600; font-size: 0.75rem; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.fav-change--down { color: #16a34a; }
.fav-change--up { color: #dc2626; }

.fav-min-line {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
}
.fav-min-line strong { color: #475569; font-weight: 600; }
.fav-min-date { color: #94a3b8; font-size: 0.6875rem; }

.fav-min-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #0f766e;
    letter-spacing: 0.01em;
}
.fav-min-badge svg { color: #0f766e; flex-shrink: 0; }

@media (max-width: 640px) {
    .fav-item {
        grid-template-columns: 48px 1fr;
        gap: 12px;
        padding: 14px 4px;
    }
    .fav-item__img { width: 48px; height: 48px; }
    .fav-item__price-col {
        grid-column: 2; align-items: flex-start;
        min-width: 0;
    }
}

/* ──────────────────────────────────────────────
   DASHBOARD FAV-ITEM (4-col with CTA)
   ────────────────────────────────────────────── */
.fav-item--dash {
    grid-template-columns: 64px 1fr minmax(140px, auto) auto;
}
.fav-item__badges {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-top: 6px;
    align-items: center;
}
.fav-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 999px;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.fav-badge--accent {
    background: #ccfbf1;
    color: #0f766e;
}
.fav-badge--drop {
    background: #dcfce7;
    color: #15803d;
    font-variant-numeric: tabular-nums;
}
.fav-badge--alert {
    background: #fef3c7;
    color: #92400e;
}
.fav-meta-muted {
    font-size: 0.6875rem;
    color: #94a3b8;
    letter-spacing: 0.01em;
}

.fav-item__actions {
    display: flex;
    align-items: center;
}
.fav-item__cta {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    background: #0f766e;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s ease;
    white-space: nowrap;
}
.fav-item__cta:hover { background: #0d5d57; }

/* Empty state per section */
.fav-empty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
}
.fav-empty__text {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.4;
}
.fav-empty__cta {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0f766e;
    text-decoration: none;
    white-space: nowrap;
}
.fav-empty__cta:hover { text-decoration: underline; }

@media (max-width: 640px) {
    .fav-item--dash { grid-template-columns: 48px 1fr; }
    .fav-item--dash .fav-item__price-col,
    .fav-item--dash .fav-item__actions {
        grid-column: 2;
    }
    .fav-empty { flex-direction: column; align-items: flex-start; }
}

/* ──────────────────────────────────────────────
   NÆSTE SKRIDT (replaces hero viz — dynamic CTAs)
   ────────────────────────────────────────────── */
.portal-nextstep {
    position: relative;
    padding: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.015) 100%);
    border-radius: 18px;
    border: 1px solid rgba(94, 234, 212, 0.14);
}
.portal-nextstep__label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(94, 234, 212, 0.85);
    margin-bottom: 14px;
}
.portal-nextstep__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.portal-nextstep__item {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 13px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}
.portal-nextstep__item:hover {
    background: rgba(94, 234, 212, 0.09);
    border-color: rgba(94, 234, 212, 0.3);
    transform: translateX(2px);
}
.portal-nextstep__icon {
    display: inline-flex;
    width: 36px; height: 36px;
    align-items: center; justify-content: center;
    background: rgba(94, 234, 212, 0.12);
    color: #5eead4;
    border-radius: 10px;
    flex-shrink: 0;
}
.portal-nextstep__item--accent .portal-nextstep__icon {
    background: rgba(94, 234, 212, 0.22);
    color: #99f6e4;
}
.portal-nextstep__item--muted .portal-nextstep__icon {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.55);
}
.portal-nextstep__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.portal-nextstep__title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.005em;
    line-height: 1.25;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.portal-nextstep__desc {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.4;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.portal-nextstep__arrow {
    color: rgba(94, 234, 212, 0.75);
    font-size: 1.125rem;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}
.portal-nextstep__item:hover .portal-nextstep__arrow { transform: translateX(3px); }
.portal-nextstep__item--muted .portal-nextstep__arrow { color: rgba(255,255,255,0.4); }

/* ──────────────────────────────────────────────
   SPLIT LAYOUT - Login/Register pages
   Full-width gradient with floating white form card
   ────────────────────────────────────────────── */
.portal-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - 68px);
    position: relative;
    background: linear-gradient(135deg, #0a1f1d 0%, #0f3d3a 45%, #0f766e 100%);
    overflow: hidden;
}

/* Animated gradient orbs - on the full background */
.portal-split::before,
.portal-split::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

.portal-split::before {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #2ec4b6 0%, transparent 70%);
    top: -150px;
    right: 20%;
    animation-delay: 0s;
    opacity: 0.4;
}

.portal-split::after {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #10b981 0%, transparent 70%);
    bottom: -100px;
    left: -80px;
    animation-delay: -10s;
    opacity: 0.3;
}

.portal-split__left {
    position: relative;
    z-index: 1;
    padding: 64px 48px 64px max(24px, calc((100vw - 1440px) / 2 + 24px));
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.portal-split__left-content {
    position: relative;
    z-index: 1;
    max-width: 620px;
    width: 100%;
}

.portal-split__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 99px;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.portal-split__eyebrow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.3);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0.1); }
}

.portal-split__headline {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 20px;
}

.portal-split__headline em {
    font-style: normal;
    background: linear-gradient(90deg, #fef3c7, #fde68a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.portal-split__subheadline {
    font-size: 1.0625rem;
    line-height: 1.55;
    opacity: 0.92;
    margin: 0 0 40px;
    max-width: 460px;
}

/* Feature list */
.portal-features {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 40px;
}

.portal-feature {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.portal-feature__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-feature__icon svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
    stroke-width: 2;
    fill: none;
}

.portal-feature__text {
    flex: 1;
}

.portal-feature__title {
    font-weight: 700;
    font-size: 0.9375rem;
    margin-bottom: 2px;
}

.portal-feature__desc {
    font-size: 0.875rem;
    opacity: 0.8;
    line-height: 1.45;
}

/* Trust strip under subheadline */
.portal-trust-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 36px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
}

.portal-trust-strip__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
}

.portal-trust-strip__item svg {
    color: #4ade80;
    flex-shrink: 0;
}

/* Live ticker below stats */
.portal-live-ticker {
    margin-top: 20px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 10px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    gap: 10px;
}

.portal-live-ticker strong {
    color: #fef3c7;
}

.portal-live-ticker__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.3);
    animation: pulse-dot 2s infinite;
    flex-shrink: 0;
}

/* Stats row */
.portal-stats-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.portal-stat-item {
    text-align: left;
}

.portal-stat-item__value {
    font-size: 1.625rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 4px;
}

.portal-stat-item__label {
    font-size: 0.75rem;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Right side - form */
.portal-split__right {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px max(24px, calc((100vw - 1440px) / 2 + 24px)) 48px 32px;
    background: transparent;
}

.portal-auth-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
}

.portal-auth-card__title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
}

.portal-auth-card__subtitle {
    color: #64748b;
    font-size: 0.9375rem;
    margin: 0 0 32px;
}

/* ──────────────────────────────────────────────
   MAIN CONTAINER (dashboard pages)
   ────────────────────────────────────────────── */
.portal-main {
    padding: 40px 0;
}

.portal-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.portal-container--narrow {
    max-width: 720px;
}


/* ──────────────────────────────────────────────
   ONBOARDING (State 1: New User)
   Calm, clear, single primary action
   ────────────────────────────────────────────── */
.onboarding {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px 0;
}

.onboarding__intro {
    margin-bottom: 40px;
}

.onboarding__title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin: 0 0 8px;
    color: #0f172a;
}

.onboarding__lead {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
}

.onboarding__steps {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}

/* Connecting line between step numbers */
.onboarding__steps::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 40px;
    bottom: 40px;
    width: 2px;
    background: #e2e8f0;
    z-index: 0;
}

.onboarding__step {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    position: relative;
    z-index: 1;
}

.onboarding__step-num {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9375rem;
    border: 2px solid #fff;
}

.onboarding__step--current .onboarding__step-num {
    background: #0f172a;
    color: #fff;
}

.onboarding__step-body {
    flex: 1;
    padding-top: 4px;
}

.onboarding__step-title {
    font-size: 1.0625rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: #0f172a;
}

.onboarding__step-text {
    color: #64748b;
    font-size: 0.9375rem;
    margin: 0 0 14px;
    line-height: 1.55;
    max-width: 460px;
}

.onboarding__step--current .onboarding__step-body {
    padding-bottom: 4px;
}

.onboarding__alt {
    padding-top: 28px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.875rem;
    color: #64748b;
}

.onboarding__alt a {
    color: #0f766e;
    text-decoration: none;
    font-weight: 600;
}

.onboarding__alt a:hover {
    text-decoration: underline;
}

.onboarding__alt-sep {
    margin: 0 8px;
    color: #cbd5e1;
}

/* ──────────────────────────────────────────────
   DASHBOARD HERO (for returning users)
   ────────────────────────────────────────────── */
.dashboard-hero {
    margin-bottom: 28px;
}

.dashboard-hero + .portal-stats {
    margin-top: 0;
}

/* ──────────────────────────────────────────────
   PORTAL HERO-BAND — shared signature hero (dashboard + favorites)
   Dark teal, serif-italic name, eyebrow, stats + viz panel
   ────────────────────────────────────────────── */
.portal-hero-band {
    position: relative;
    margin: 0 0 40px;
    padding: 48px 40px 44px;
    color: #fff;
    overflow: hidden;
    isolation: isolate;
    border-radius: 24px;
    box-shadow: 0 10px 40px -12px rgba(15, 23, 42, 0.25);
}
.portal-hero-band__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
    max-width: 1052px;
    margin: 0 auto;
    position: relative;
}
@media (max-width: 880px) {
    .portal-hero-band__grid { grid-template-columns: 1fr; gap: 28px; }
}
.portal-hero-band__viz {
    position: relative;
    padding: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.035) 0%, rgba(255,255,255,0.01) 100%);
    border-radius: 18px;
    border: 1px solid rgba(94, 234, 212, 0.12);
}
.portal-hero-band__viz-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}
.portal-hero-band__viz-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(94, 234, 212, 0.85);
}
.portal-hero-band__viz-big {
    font-family: Georgia, ui-serif, serif;
    font-size: 2.5rem;
    font-weight: 500;
    color: #fff;
    letter-spacing: -0.025em;
    line-height: 1;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}
.portal-hero-band__viz-sub {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.55);
    margin-top: 6px;
    letter-spacing: 0.02em;
}
.portal-hero-band__viz-trend {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 0.75rem; font-weight: 600;
    padding: 4px 9px;
    border-radius: 999px;
    letter-spacing: -0.005em;
}
.portal-hero-band__viz-trend--down { color: #5eead4; background: rgba(94, 234, 212, 0.12); }
.portal-hero-band__viz-trend--up   { color: #fca5a5; background: rgba(252, 165, 165, 0.12); }
.portal-hero-band__viz-trend--flat { color: rgba(255,255,255,0.55); }
.portal-hero-band__viz-chart {
    height: 140px;
    width: 100%;
    position: relative;
}
.portal-hero-band__viz-empty {
    height: 140px;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.35);
    font-size: 0.8125rem;
    text-align: center;
    font-style: italic;
    border-top: 1px dashed rgba(255,255,255,0.08);
    padding: 0 20px;
}
.portal-hero-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 15% 40%, rgba(13, 148, 136, 0.38), transparent 60%),
        radial-gradient(ellipse 50% 60% at 90% 10%, rgba(16, 185, 129, 0.18), transparent 65%),
        linear-gradient(135deg, #0a1f1d 0%, #0f3d3a 55%, #0d2522 100%);
    z-index: -2;
}
.portal-hero-band::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255,255,255,0.06) 1px, transparent 0);
    background-size: 28px 28px;
    opacity: 0.7;
    z-index: -1;
    pointer-events: none;
}
.portal-hero-band__inner {
    position: relative;
    min-width: 0;
}
.portal-hero-band__eyebrow {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(94, 234, 212, 0.9);
    margin-bottom: 14px;
    display: flex; align-items: center; gap: 10px;
}
.portal-hero-band__eyebrow::before {
    content: '';
    width: 24px; height: 1px;
    background: rgba(94, 234, 212, 0.7);
}
.portal-hero-band__eyebrow-dot {
    width: 3px; height: 3px; border-radius: 50%;
    background: rgba(94, 234, 212, 0.5);
    display: inline-block;
}
.portal-hero-band__title {
    font-family: Georgia, 'Times New Roman', ui-serif, serif;
    font-size: 2.25rem;
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1.08;
    margin: 0 0 10px;
    color: #fff;
}
@media (max-width: 880px) { .portal-hero-band__title { font-size: 1.875rem; } }
.portal-hero-band__title em {
    font-style: italic;
    color: #5eead4;
    font-weight: 400;
}
.portal-hero-band__lead {
    font-size: 1.0625rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.5;
    max-width: 620px;
    margin: 0 0 32px;
    letter-spacing: 0.005em;
}
.portal-hero-band__lead strong { color: #5eead4; font-weight: 600; }
.portal-hero-band__stats {
    display: flex; gap: 36px; flex-wrap: wrap;
}
.portal-hero-band__stat { min-width: 0; }
.portal-hero-band__stat-num {
    font-family: Georgia, ui-serif, serif;
    font-size: 2rem;
    font-weight: 500;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.portal-hero-band__stat-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 8px;
}
.portal-hero-band__stat--accent .portal-hero-band__stat-num {
    color: #5eead4;
}
@media (max-width: 640px) {
    .portal-hero-band { padding: 40px 20px 36px; margin: -40px -24px 28px; }
    .portal-hero-band__title { font-size: 2rem; }
    .portal-hero-band__lead { font-size: 0.9375rem; }
    .portal-hero-band__stats { gap: 22px; }
    .portal-hero-band__stat-num { font-size: 1.5rem; }
}

/* ──────────────────────────────────────────────
   RECOMMENDATION CARDS (State 2)
   Prominent, with visible heart CTA
   ────────────────────────────────────────────── */
.rec-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.rec-card {
    display: grid;
    grid-template-columns: 36px 1fr auto auto;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    transition: border-color 0.15s ease;
}

.rec-card:hover {
    border-color: #cbd5e1;
}

.rec-card__rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0f172a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.rec-card__main {
    min-width: 0;
}

.rec-card__title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 2px;
    color: #0f172a;
}

.rec-card__meta {
    color: #64748b;
    font-size: 0.8125rem;
}

.rec-card__price {
    text-align: right;
}

.rec-card__price-value {
    font-size: 1.125rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.rec-card__price-value span {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    margin-left: 2px;
}

.rec-card__savings {
    font-size: 0.75rem;
    color: #15803d;
    font-weight: 600;
    margin-top: 2px;
}

.rec-card__actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.rec-card--compact {
    grid-template-columns: 1fr auto;
    padding: 14px 18px;
}

.rec-list--compact {
    gap: 8px;
}

.dashboard-nudge {
    text-align: center;
    padding: 12px 0;
}

/* Nudge card (highlighting next action) */
.portal-card--nudge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: #fafbfc;
    border-color: #e2e8f0;
}

.portal-card--nudge h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: #0f172a;
}

.portal-card--nudge p {
    color: #64748b;
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.5;
}

.portal-card--nudge .portal-card__nudge-body {
    flex: 1;
    min-width: 0;
}

/* ──────────────────────────────────────────────
   FAVORITE ROWS (dashboard)
   ────────────────────────────────────────────── */
.fav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    gap: 16px;
}

.fav-row:last-child {
    border-bottom: none;
}

.fav-row--dim {
    opacity: 0.55;
}

.fav-row__main {
    flex: 1;
    min-width: 0;
}

.fav-row__meta {
    color: #64748b;
    font-size: 0.8125rem;
    margin-left: 8px;
}

.fav-row__price {
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
}

/* Rich fav-row with product image + sparkline */
.fav-row--rich {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 12px;
    padding: 10px 0;
}

.fav-row__img {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}
.fav-row__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.fav-row__img--logo { background: #fff; border: 1px solid #f1f5f9; }

.fav-row--rich .fav-row__main {
    display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.fav-row--rich .fav-row__main strong {
    font-size: 0.9375rem;
    color: #0f172a;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fav-row--rich .fav-row__meta {
    margin-left: 0;
    font-size: 0.75rem;
}

.fav-row__price-col {
    display: flex; flex-direction: column; align-items: flex-end; gap: 3px;
}

.fav-row__spark {
    display: flex; align-items: center; gap: 6px;
}

.fav-change--down { color: #16a34a; }
.fav-change--up { color: #dc2626; }
.bap-spark { display: block; }

.portal-card__foot {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    text-align: right;
}

.portal-card__foot a {
    color: #64748b;
    font-size: 0.875rem;
    text-decoration: none;
}

.portal-card__foot a:hover {
    color: #0f766e;
}

/* Responsive tweaks */
@media (max-width: 640px) {
    .rec-card {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .rec-card__rank {
        position: absolute;
        top: 20px;
        right: 20px;
    }
    .rec-card__price {
        text-align: left;
    }
    .portal-card--nudge {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ──────────────────────────────────────────────
   PAGE HEADINGS
   ────────────────────────────────────────────── */
.portal-title {
    font-family: Georgia, 'Times New Roman', ui-serif, serif;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 6px;
    color: #0f172a;
    line-height: 1.1;
}

.portal-subtitle {
    font-size: 0.9375rem;
    color: #64748b;
    margin: 0 0 32px;
    letter-spacing: 0.005em;
}

/* ──────────────────────────────────────────────
   CARDS - soft shadow, no hard borders
   ────────────────────────────────────────────── */
.portal-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    padding: 28px;
    margin-bottom: 20px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.03),
        0 4px 16px rgba(15, 23, 42, 0.04);
}

.portal-card--highlight {
    background: linear-gradient(135deg, #f0fdfa 0%, #ecfdf5 100%);
    border-color: #99f6e4;
}

.portal-card--gradient {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    color: #fff;
    border: none;
}

.portal-card__title {
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
}

.portal-card--gradient .portal-card__title {
    color: #fff;
}

.portal-card__title-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #f0fdfa;
    color: #0f766e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ──────────────────────────────────────────────
   FORMS
   ────────────────────────────────────────────── */
.portal-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.portal-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.portal-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}

.portal-input,
.portal-select {
    padding: 13px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-family: inherit;
    color: #0f172a;
    background: #fff;
    transition: all 0.15s ease;
    outline: none;
    width: 100%;
}

.portal-input:focus,
.portal-select:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1);
}

.portal-input::placeholder {
    color: #94a3b8;
}

.portal-input--error {
    border-color: #ef4444;
}

/* ──────────────────────────────────────────────
   BUTTONS
   ────────────────────────────────────────────── */
.portal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.portal-btn--primary {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    color: #fff;
    box-shadow: 0 1px 2px rgba(15, 118, 110, 0.2);
}

.portal-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 118, 110, 0.3);
}

.portal-btn--primary:active {
    transform: translateY(0);
}

.portal-btn--secondary {
    background: #f1f5f9;
    color: #0f172a;
}

.portal-btn--secondary:hover {
    background: #e2e8f0;
}

.portal-btn--outline {
    background: #fff;
    color: #0f172a;
    border: 1.5px solid #e2e8f0;
}

.portal-btn--outline:hover {
    border-color: #14b8a6;
    color: #0f766e;
}

.portal-btn--danger {
    background: #ef4444;
    color: #fff;
}

.portal-btn--danger:hover {
    background: #dc2626;
}

.portal-btn--small {
    padding: 8px 14px;
    font-size: 0.8125rem;
    border-radius: 8px;
}

.portal-btn--full {
    width: 100%;
}

.portal-btn--large {
    padding: 15px 28px;
    font-size: 1rem;
    border-radius: 12px;
}

/* ──────────────────────────────────────────────
   REASSURANCE (risk-reversal under CTA)
   ────────────────────────────────────────────── */
.portal-reassurance {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.portal-reassurance li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: #475569;
}

.portal-reassurance svg {
    color: #0f766e;
    flex-shrink: 0;
}

/* ──────────────────────────────────────────────
   GOOGLE SIGN-IN BUTTON
   ────────────────────────────────────────────── */
.google-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px 20px;
    background: #fff;
    color: #0f172a;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.google-signin-btn:hover {
    border-color: #cbd5e1;
    background: #fafbfc;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.google-signin-btn svg {
    flex-shrink: 0;
}

/* ──────────────────────────────────────────────
   ALERTS / MESSAGES
   ────────────────────────────────────────────── */
.portal-alert {
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 0.875rem;
    margin-bottom: 16px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    line-height: 1.5;
}

.portal-alert--success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.portal-alert--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.portal-alert--info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

/* ──────────────────────────────────────────────
   AUTH TABS (login/register pill switcher)
   ────────────────────────────────────────────── */
.portal-authtabs {
    display: inline-flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 28px;
    width: 100%;
}

.portal-authtab {
    flex: 1;
    padding: 10px 20px;
    background: transparent;
    border: none;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-radius: 9px;
    transition: all 0.15s ease;
    font-family: inherit;
}

.portal-authtab.active {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ──────────────────────────────────────────────
   TABLES
   ────────────────────────────────────────────── */
.portal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.portal-table th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.portal-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.portal-table tr:last-child td {
    border-bottom: none;
}

.portal-table tr:hover td {
    background: #fafbfc;
}

/* ──────────────────────────────────────────────
   EMPTY STATE
   ────────────────────────────────────────────── */
.portal-empty {
    text-align: center;
    padding: 48px 24px;
}

.portal-empty svg {
    display: block;
    margin: 0 auto 16px;
    opacity: 0.3;
    color: #64748b;
}

.portal-empty__title {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #0f172a;
}

.portal-empty p {
    color: #64748b;
    font-size: 0.9375rem;
    max-width: 380px;
    margin: 0 auto;
}

/* ──────────────────────────────────────────────
   BADGES
   ────────────────────────────────────────────── */
.portal-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.portal-badge--green {
    background: #f0fdf4;
    color: #15803d;
}

.portal-badge--red {
    background: #fef2f2;
    color: #b91c1c;
}

.portal-badge--gray {
    background: #f1f5f9;
    color: #64748b;
}

.portal-badge--teal {
    background: #f0fdfa;
    color: #0f766e;
}

/* ──────────────────────────────────────────────
   HEART BUTTON (on plan cards)
   ────────────────────────────────────────────── */
.bapw-heart {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    padding: 0;
}

.bapw-heart:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.bapw-heart svg {
    width: 18px;
    height: 18px;
    transition: all 0.2s;
}

.bapw-heart--active {
    background: #fef2f2;
    border-color: #fca5a5;
}

.bapw-heart--active svg {
    fill: #ef4444;
    stroke: #ef4444;
}

.bapw-heart--inactive svg {
    fill: none;
    stroke: #64748b;
}

@keyframes heart-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.bapw-heart--pop {
    animation: heart-pop 0.3s ease;
}

/* ──────────────────────────────────────────────
   DASHBOARD STATS
   ────────────────────────────────────────────── */
.portal-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.portal-stat {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px 24px;
    position: relative;
    overflow: hidden;
}

.portal-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #14b8a6, #0f766e);
}

.portal-stat__label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 8px;
}

.portal-stat__value {
    font-size: 1.875rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #0f172a;
    line-height: 1;
}

.portal-stat__icon {
    position: absolute;
    top: 20px;
    right: 24px;
    color: #cbd5e1;
}

/* ──────────────────────────────────────────────
   PRICE CHANGE INDICATORS
   ────────────────────────────────────────────── */
.price-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.price-change--down { color: #15803d; }
.price-change--up   { color: #dc2626; }

/* ──────────────────────────────────────────────
   TOGGLE SWITCH
   ────────────────────────────────────────────── */
.portal-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.9375rem;
    color: #0f172a;
}

.portal-toggle input[type="checkbox"] {
    width: 44px;
    height: 24px;
    appearance: none;
    background: #cbd5e1;
    border-radius: 99px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.portal-toggle input[type="checkbox"]::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    left: 3px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.portal-toggle input[type="checkbox"]:checked {
    background: #14b8a6;
}

.portal-toggle input[type="checkbox"]:checked::after {
    transform: translateX(20px);
}

/* ──────────────────────────────────────────────
   CHECKBOX GROUP (quiz)
   ────────────────────────────────────────────── */
.portal-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.portal-checkbox-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    user-select: none;
    background: #fff;
}

.portal-checkbox-card:hover {
    border-color: #14b8a6;
    background: #f0fdfa;
}

.portal-checkbox-card.selected {
    border-color: #14b8a6;
    background: #f0fdfa;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1);
}

.portal-checkbox-card input[type="checkbox"],
.portal-checkbox-card input[type="radio"] {
    display: none;
}

/* ──────────────────────────────────────────────
   QUIZ STEPS
   ────────────────────────────────────────────── */
.quiz-step {
    display: none;
}

.quiz-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.quiz-progress {
    display: flex;
    gap: 6px;
    margin-bottom: 32px;
}

.quiz-progress__step {
    flex: 1;
    height: 4px;
    border-radius: 99px;
    background: #e2e8f0;
    transition: background 0.3s;
}

.quiz-progress__step.done,
.quiz-progress__step.current {
    background: linear-gradient(90deg, #0f766e, #14b8a6);
}

.quiz-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 36px;
}

/* Quiz Results */
.quiz-result-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 16px;
    position: relative;
    transition: all 0.2s ease;
}

.quiz-result-card:hover {
    border-color: #14b8a6;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.quiz-result-card__rank {
    position: absolute;
    top: -14px;
    left: 20px;
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.875rem;
    box-shadow: 0 4px 8px rgba(15, 118, 110, 0.3);
}

.quiz-result-card__match {
    float: right;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #0f766e;
    background: #f0fdfa;
    padding: 4px 10px;
    border-radius: 99px;
}

.quiz-result-card__savings {
    margin-top: 14px;
    padding: 12px 14px;
    background: #f0fdf4;
    border-radius: 10px;
    color: #15803d;
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ──────────────────────────────────────────────
   SIGNUP MODAL
   ────────────────────────────────────────────── */
.portal-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.portal-modal-overlay.open {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.portal-modal {
    background: #fff;
    border-radius: 16px;
    padding: 36px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
    text-align: center;
}

.portal-modal__close {
    float: right;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    line-height: 1;
    padding: 0;
    margin: -8px -8px 0 0;
}

.portal-modal__title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.portal-modal__text {
    color: #64748b;
    margin-bottom: 28px;
    font-size: 0.9375rem;
    line-height: 1.55;
}

/* ──────────────────────────────────────────────
   FOOTER
   ────────────────────────────────────────────── */
.portal-footer {
    padding: 24px 0;
    text-align: center;
    font-size: 0.8125rem;
    color: #94a3b8;
    border-top: 1px solid #f1f5f9;
    margin-top: 40px;
}

.portal-footer__inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}

.portal-footer a {
    color: #64748b;
    text-decoration: none;
}

.portal-footer a:hover {
    color: #0f766e;
}

/* ──────────────────────────────────────────────
   HELPERS
   ────────────────────────────────────────────── */
.portal-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #94a3b8;
    font-size: 0.8125rem;
    margin: 20px 0;
}

.portal-divider::before,
.portal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.portal-text-muted { color: #64748b; }
.portal-text-small { font-size: 0.8125rem; }
.portal-text-center { text-align: center; }

/* ──────────────────────────────────────────────
   RESPONSIVE
   ────────────────────────────────────────────── */
@media (max-width: 960px) {
    .portal-split {
        grid-template-columns: 1fr;
    }

    .portal-split__left {
        padding: 48px 32px;
    }

    .portal-split__headline {
        font-size: 2rem;
    }

    .portal-stats-strip {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .portal-stat-item__value {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    .portal-nav {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid #e2e8f0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        gap: 4px;
    }

    .portal-nav.open {
        display: flex;
    }

    .portal-nav__link {
        padding: 12px 16px;
    }

    .portal-nav__link--logout {
        border-left: none;
        border-top: 1px solid #e2e8f0;
        padding-top: 16px;
        margin-top: 8px;
        padding-left: 16px;
        margin-left: 0;
    }

    .portal-nav-toggle {
        display: block;
    }

    .portal-split__left {
        padding: 40px 24px;
    }

    .portal-split__right {
        padding: 32px 24px;
    }

    .portal-split__headline {
        font-size: 1.75rem;
    }

    .portal-title {
        font-size: 1.5rem;
    }

    .portal-checkbox-group {
        grid-template-columns: 1fr;
    }

    .portal-card {
        padding: 20px;
    }
}

