/* Authenticated customer portal: setup and downloads */
.portal-product-resource-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 24px 26px;
}

.portal-product-resource {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--portal-border, #dbe4e8);
    border-radius: 14px;
    background: var(--portal-surface, #fff);
    color: var(--portal-heading, #112b31);
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.portal-product-resource:hover,
.portal-product-resource:focus-visible {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgb(15 118 110 / 10%);
}

.portal-product-resource-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 16px;
    border-radius: 12px;
    color: #0f766e;
    background: rgb(15 118 110 / 8%);
}

.portal-product-resource-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.portal-product-resource h3 { margin: 0 0 9px; font-size: 1rem; line-height: 1.5; }
.portal-product-resource p { margin: 0 0 18px; color: var(--portal-muted, #71848a); font-size: .86rem; line-height: 1.75; }
.portal-product-resource-link { margin-top: auto; color: #0f766e; font-size: .83rem; font-weight: 750; }
.portal-product-resource-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; padding: 0 26px 24px; }
.portal-product-resource-shortcuts { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.portal-product-resource-shortcuts a { color: var(--portal-heading, #112b31); text-underline-offset: 4px; font-size: .82rem; }

@media (max-width: 850px) {
    .portal-product-resource-grid { grid-template-columns: 1fr; padding: 20px; }
    .portal-product-resource-footer { padding: 0 20px 20px; }
}

.portal-account-dashboard {
    display: grid;
    gap: 20px;
}

.portal-account-v2-onboarding,
.portal-account-v2-downloads {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--portal-border, #dbe4e8);
    border-radius: 18px;
    background: var(--portal-surface, #ffffff);
    box-shadow: 0 14px 34px rgba(15, 39, 45, .06);
}

.portal-account-v2-onboarding::before,
.portal-account-v2-downloads::before {
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #0f766e, #14b8a6 54%, #d97706);
    content: "";
}

.portal-account-v2-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 26px 20px;
    border-bottom: 1px solid var(--portal-border-soft, #edf1f2);
}

.portal-account-v2-section-head .eyebrow {
    color: #0f766e;
    font-weight: 750;
    letter-spacing: .1em;
}

.portal-account-v2-section-head h2 {
    margin: 6px 0 5px;
    color: var(--portal-heading, #112b31);
    font-size: clamp(1.15rem, 1.5vw, 1.45rem);
    line-height: 1.25;
}

.portal-account-v2-section-head p {
    max-width: 680px;
    margin: 0;
    color: var(--portal-muted, #71848a);
    font-size: .9rem;
    line-height: 1.65;
}

.portal-account-v2-progress,
.portal-account-v2-count {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    min-width: 72px;
    min-height: 58px;
    padding: 9px 13px;
    border: 1px solid rgba(15, 118, 110, .18);
    border-radius: 12px;
    background: rgba(20, 184, 166, .08);
    color: #0f766e;
}

.portal-account-v2-progress strong,
.portal-account-v2-count {
    font-size: 1.1rem;
    font-weight: 800;
}

.portal-account-v2-progress span {
    color: var(--portal-muted, #71848a);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.portal-account-v2-step-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 20px 26px 26px;
    list-style: none;
}

.portal-account-v2-step {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 13px;
    min-width: 0;
    min-height: 178px;
    padding: 15px;
    border: 1px solid var(--portal-border-soft, #e7edef);
    border-radius: 14px;
    background: var(--portal-surface-subtle, #fbfcfc);
    transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.portal-account-v2-step:hover {
    border-color: rgba(15, 118, 110, .38);
    transform: translateY(-2px);
}

.portal-account-v2-step-number {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e8f7f4;
    color: #0f766e;
    font-size: .78rem;
    font-weight: 800;
}

.portal-account-v2-step-copy {
    flex: 1;
    min-width: 0;
}

.portal-account-v2-step-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.portal-account-v2-step-title strong {
    color: var(--portal-heading, #112b31);
    font-size: .9rem;
    line-height: 1.35;
}

.portal-account-v2-step-copy p {
    margin: 7px 0 0;
    color: var(--portal-muted, #71848a);
    font-size: .78rem;
    line-height: 1.55;
}

.portal-account-v2-step-state {
    flex: 0 0 auto;
    color: #71848a;
    font-size: .63rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.portal-account-v2-step.is-complete {
    border-color: rgba(22, 163, 74, .22);
    background: rgba(22, 163, 74, .045);
}

.portal-account-v2-step.is-complete .portal-account-v2-step-number {
    background: #e9f8ee;
    color: #16803c;
}

.portal-account-v2-step.is-current {
    border-color: rgba(15, 118, 110, .42);
    background: rgba(20, 184, 166, .075);
    box-shadow: inset 0 0 0 1px rgba(20, 184, 166, .08);
}

.portal-account-v2-step.is-current .portal-account-v2-step-state {
    color: #0f766e;
}

.portal-account-v2-step.is-locked {
    opacity: .64;
}

.portal-account-v2-step-action {
    align-self: flex-start;
    min-height: 34px;
    padding: 7px 11px;
    font-size: .76rem;
}

.portal-account-v2-downloads {
    overflow: visible;
}

.portal-account-v2-download-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 20px 26px 26px;
}

.portal-account-v2-download-card,
.portal-account-v2-empty {
    min-width: 0;
    border: 1px solid var(--portal-border-soft, #e7edef);
    border-radius: 14px;
    background: var(--portal-surface-subtle, #fbfcfc);
}

.portal-account-v2-download-card {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.portal-account-v2-download-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.portal-account-v2-product-mark {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 42px;
    height: 42px;
    overflow: hidden;
    border-radius: 11px;
    background: #e8f7f4;
    color: #0f766e;
}

.portal-account-v2-product-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portal-account-v2-product-mark svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
}

.portal-account-v2-download-brand h3 {
    margin: 3px 0 0;
    color: var(--portal-heading, #112b31);
    font-size: 1.05rem;
}

.portal-account-v2-download-brand .eyebrow {
    color: var(--portal-muted, #71848a);
    font-size: .62rem;
    letter-spacing: .1em;
}

.portal-account-v2-ready {
    margin-inline-start: auto;
    padding: 5px 8px;
    border-radius: 999px;
    background: #e9f8ee;
    color: #16803c;
    font-size: .65rem;
    font-weight: 750;
    white-space: nowrap;
}

.portal-account-v2-release-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--portal-border-soft, #e7edef);
    border-radius: 10px;
    background: var(--portal-surface, #ffffff);
}

.portal-account-v2-release-meta > div {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 10px 11px;
}

.portal-account-v2-release-meta > div + div {
    border-inline-start: 1px solid var(--portal-border-soft, #e7edef);
}

.portal-account-v2-release-meta span {
    color: var(--portal-muted, #71848a);
    font-size: .63rem;
}

.portal-account-v2-release-meta strong {
    overflow: hidden;
    color: var(--portal-heading, #112b31);
    font-size: .78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-account-v2-release-notes {
    padding: 11px 12px;
    border-inline-start: 3px solid #d97706;
    background: rgba(217, 119, 6, .06);
}

.portal-account-v2-release-notes strong {
    color: #9a5204;
    font-size: .72rem;
}

.portal-account-v2-release-notes p {
    margin: 5px 0 0;
    color: var(--portal-muted, #71848a);
    font-size: .78rem;
    line-height: 1.55;
    white-space: pre-line;
}

.portal-account-v2-download-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.portal-account-v2-download-actions .btn {
    min-height: 36px;
    padding-inline: 13px;
    font-size: .76rem;
}

.portal-account-v2-empty {
    display: flex;
    align-items: center;
    grid-column: 1 / -1;
    gap: 13px;
    padding: 18px;
}

.portal-account-v2-empty-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: #eef4f5;
    color: #0f766e;
}

.portal-account-v2-empty-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
}

.portal-account-v2-empty strong {
    display: block;
    color: var(--portal-heading, #112b31);
    font-size: .85rem;
}

.portal-account-v2-empty p {
    margin: 3px 0 0;
    color: var(--portal-muted, #71848a);
    font-size: .78rem;
    line-height: 1.5;
}

html[data-theme="dark"] .portal-account-v2-onboarding,
html[data-theme="dark"] .portal-account-v2-downloads {
    --portal-surface: #152b2d;
    --portal-surface-subtle: #122427;
    --portal-border: #2b4b4e;
    --portal-border-soft: #244145;
    --portal-heading: #edf8f6;
    --portal-muted: #9bb4b5;
    border-color: #2b4b4e;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
}

html[data-theme="dark"] .portal-account-v2-step-number,
html[data-theme="dark"] .portal-account-v2-product-mark,
html[data-theme="dark"] .portal-account-v2-empty-icon {
    background: rgba(20, 184, 166, .15);
}

html[data-theme="dark"] .portal-account-v2-step.is-complete {
    background: rgba(22, 163, 74, .1);
}

html[data-theme="dark"] .portal-account-v2-step.is-current {
    background: rgba(20, 184, 166, .12);
}

html[data-theme="dark"] .portal-account-v2-release-meta {
    background: #152b2d;
}

html[data-theme="dark"] .portal-account-v2-release-notes {
    background: rgba(217, 119, 6, .12);
}

html[data-theme="dark"] .portal-account-v2-release-notes strong {
    color: #f3bd72;
}

@media (max-width: 1050px) {
    .portal-account-v2-step-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .portal-account-v2-section-head {
        align-items: stretch;
        flex-direction: column;
        padding: 20px;
    }

    .portal-account-v2-progress,
    .portal-account-v2-count {
        place-items: start;
        min-height: 0;
        width: fit-content;
    }

    .portal-account-v2-step-list,
    .portal-account-v2-download-grid {
        grid-template-columns: 1fr;
        padding: 16px 20px 20px;
    }

    .portal-account-v2-step {
        min-height: 0;
    }

    .portal-account-v2-download-brand {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .portal-account-v2-ready {
        margin-inline-start: 53px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portal-account-v2-step {
        transition: none;
    }
}

.portal-account-v2-release-notes .portal-release-benefits {
    display: grid;
    gap: 7px;
    margin: 9px 0 0;
    padding: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
    list-style: none;
}

.portal-account-v2-release-notes .portal-release-benefits li {
    position: relative;
    padding-inline-start: 18px;
}

.portal-account-v2-release-notes .portal-release-benefits li::before {
    content: "✓";
    position: absolute;
    inset-inline-start: 0;
    color: var(--brand, #0f766e);
    font-weight: 900;
}
