.commerce-account-login {
    width: min(100%, 29rem);
    margin: clamp(1.25rem, 5vh, 3.5rem) auto;
}

.commerce-account-login-panel,
.commerce-brand .account-recover-password-form {
    padding: clamp(1.25rem, 5vw, 2rem);
    border: 1px solid var(--checkout-line);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 12px 36px rgb(28 36 48 / 5%);
}

.commerce-account-login h1,
.commerce-account-shell h1,
.commerce-brand .account-recover-password-form h1 {
    margin: 0 0 .6rem;
    color: var(--checkout-ink);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.13;
    letter-spacing: -.035em;
}

.commerce-account-login .login-card {
    margin: 0 !important;
    border: 0;
    background: transparent;
}

.commerce-account-login .card-body,
.commerce-brand .account-recover-password-form .card-body {
    padding: 0;
}

.commerce-account-login .login-form-description {
    margin: 0 0 1.35rem;
}

.commerce-account-login .login-password-recover {
    margin-top: .4rem;
}

.commerce-account-login .login-submit .btn,
.commerce-account-app-button {
    width: 100%;
    min-height: 2.875rem;
}

.commerce-account-app-button {
    display: grid;
    place-items: center;
}

.commerce-account-app-profile {
    margin-bottom: 1rem;
}

.commerce-account-shell .profile-form-submit {
    min-height: 2.75rem;
}

.commerce-account-login-next {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .25rem .65rem;
    padding: 1rem .125rem 0;
    font-size: .875rem;
}

.commerce-account-login-next a,
.commerce-account-card-link {
    font-weight: 650;
    text-underline-offset: .18em;
}

.commerce-account-shell {
    width: min(100%, 69rem);
    padding-block: clamp(.75rem, 3vw, 2rem) 2rem;
}

.commerce-account-shell .account-content {
    display: grid;
    grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
    align-items: start;
    gap: clamp(1rem, 3.6vw, 3rem);
    margin: 0;
}

.commerce-account-shell .account-content > :is(.account-content-aside, .account-content-main) {
    width: auto;
    min-width: 0;
    padding-inline: 0;
}

.commerce-account-shell .account-aside .account-menu-inner {
    padding: .75rem;
}

.commerce-account-shell .account-aside-header {
    margin: 0;
    padding: .45rem .65rem .65rem;
    border: 0;
    background: transparent;
    color: var(--checkout-ink);
    font-size: .9375rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.commerce-account-shell .account-aside-list-group {
    gap: .2rem;
}

.commerce-account-shell .account-aside-item {
    display: block;
    padding: .55rem .65rem;
    border: 0;
    border-radius: .5rem;
    background: transparent;
    color: var(--checkout-muted);
    font-size: .9rem;
    line-height: 1.35;
    text-decoration: none;
}

.commerce-account-shell .account-aside-item:hover {
    background: var(--checkout-wash);
    color: var(--checkout-ink);
}

.commerce-account-shell .account-aside-item.is-active {
    background: #171b22;
    color: #fff;
    font-weight: 700;
}

.commerce-account-shell .account-aside-footer {
    margin-top: .6rem;
    padding: .5rem .65rem .1rem;
    border-color: var(--checkout-line);
    background: transparent;
}

.commerce-account-shell .account-aside-btn {
    padding: .3rem 0;
    color: var(--checkout-muted);
    font-size: .875rem;
    font-weight: 600;
    text-underline-offset: .18em;
}

.commerce-account-shell .account-aside-btn .icon {
    width: 1rem;
    height: 1rem;
    margin-right: .35rem;
}

.commerce-account-shell .account-welcome {
    margin-bottom: 1.25rem;
}

.commerce-account-shell .account-welcome p,
.commerce-account-login .login-form-description,
.commerce-account-login-next {
    color: var(--checkout-muted);
}

.commerce-account-shell .account-welcome p {
    margin-bottom: 0;
}

.commerce-account-shell .account-content .card-title {
    border-color: var(--checkout-line);
    color: var(--checkout-ink);
    font-size: 1.125rem;
    font-weight: 700;
}

.commerce-account-shell .account-overview-profile .card-body p {
    margin-bottom: .55rem;
    overflow-wrap: anywhere;
}

.commerce-account-shell .account-overview .card-actions:not(:empty) {
    padding-top: .65rem;
}

.commerce-account-shell .account-overview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 1rem;
}

.commerce-account-shell .account-overview > :not(.row) {
    grid-column: 1 / -1;
}

.commerce-account-shell .account-overview > .row {
    display: contents;
}

.commerce-account-shell .account-overview .account-overview-card {
    width: auto;
    margin: 0;
    padding: 0;
}

.commerce-account-shell .account-overview > .account-welcome {
    margin: 0;
}

.commerce-account-shell .account-overview .account-overview-newest-order {
    margin-top: .3rem;
}

.commerce-account-shell .account-overview-card > .card {
    height: 100%;
    margin: 0;
}

.commerce-account-login :is(.form-control, .form-select),
.commerce-account-shell :is(.form-control, .form-select),
.commerce-brand .account-recover-password-form .form-control {
    min-height: 2.75rem;
    border-color: #aeb8c5;
    border-radius: .55rem;
    background-color: #fff;
}

.commerce-account-login .form-label,
.commerce-brand .account-recover-password-form .form-label {
    color: var(--checkout-ink);
    font-size: .875rem;
    font-weight: 650;
}

.commerce-account-empty,
.commerce-account-shell .order-wrapper {
    margin-bottom: 1rem;
    border: 1px solid var(--checkout-line);
    border-radius: .875rem;
    background: #fff;
}

.commerce-account-shell .order-table {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.commerce-account-empty {
    padding: 1.25rem;
    color: var(--checkout-muted);
}

.commerce-account-shell .order-item-header {
    padding: clamp(1rem, 3vw, 1.4rem);
    border: 0;
    border-radius: .875rem;
    background: #fff;
}

.commerce-account-shell .account-overview-newest-order .order-wrapper {
    margin-bottom: 0;
}

.commerce-account-shell .order-item-header:has(.commerce-order-heading) > .row:first-child {
    --bs-gutter-x: 0;
    align-items: center;
    gap: .625rem;
    margin: 0;
}

.commerce-order-heading {
    display: grid;
    gap: .2rem;
}

.commerce-order-heading strong {
    color: var(--checkout-ink);
    font-size: 1.125rem;
    line-height: 1.3;
}

.commerce-order-heading time,
.commerce-order-facts dt {
    color: var(--checkout-muted);
    font-size: .8125rem;
}

.commerce-order-status {
    display: flex;
    justify-content: flex-end;
}

.commerce-order-badge {
    padding: .275rem .65rem;
    border-radius: 2rem;
    background: var(--checkout-wash);
    color: var(--checkout-ink);
    font-size: .8125rem;
    font-weight: 650;
}

.commerce-order-badge--paid {
    background: #e1f4e9;
    color: #175b3c;
}

.commerce-order-badge--open,
.commerce-order-badge--in_progress {
    background: #fff2d9;
    color: #744305;
}

.commerce-order-badge--cancelled,
.commerce-order-badge--failed {
    background: #fcebed;
    color: #8d2535;
}

/* Shopware zeigt "Zahlung abschließen" als Link-Badge; die Linkfarbe des Themes machte die Schrift dunkelrot auf Rot. */
.commerce-account-shell .order-item-status-badge.bg-danger,
.commerce-account-shell a.order-item-status-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .35rem .8rem;
    border-radius: 2rem;
    background: #fcebed !important;
    color: #8d2535 !important;
    font-size: .8125rem;
    font-weight: 650;
    text-decoration: none;
}

.commerce-account-shell a.order-item-status-badge:hover {
    background: #f8d7dc !important;
}

.commerce-account-shell a.order-item-status-badge .icon,
.commerce-account-shell a.order-item-status-badge svg {
    color: currentColor;
    fill: currentColor;
}

.commerce-account-shell .order-item-header .order-table-header-context-menu-wrapper {
    position: relative;
    inset: auto;
    flex: 0 0 auto;
    width: auto;
}

.commerce-account-shell .order-item-header .order-table-header-context-menu {
    min-width: 2rem;
    min-height: 2rem;
    padding: .2rem .45rem;
    border-radius: .5rem;
}

.commerce-order-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--checkout-line);
}

.commerce-order-facts {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem clamp(1.25rem, 4vw, 2.5rem);
    margin: 0;
}

.commerce-order-facts dt {
    font-weight: 500;
}

.commerce-order-facts dd {
    margin: .15rem 0 0;
    color: var(--checkout-ink);
    font-weight: 650;
    overflow-wrap: anywhere;
}

.commerce-order-summary .order-hide-btn {
    min-height: 2.5rem;
    padding-inline: .75rem;
    border: 1px solid var(--checkout-line);
    border-radius: .55rem;
    background: #fff;
    color: var(--checkout-ink);
}

.commerce-order-summary .order-hide-btn:hover {
    background: var(--checkout-wash);
}

.commerce-account-shell .order-detail-content {
    margin: 0;
    border-inline: 0;
    border-bottom: 0;
    border-color: var(--checkout-line);
}

.commerce-account-shell .order-item-detail {
    border-radius: 0 0 .875rem .875rem;
    overflow: hidden;
}

.commerce-order-detail-documents {
    padding: 1rem clamp(1rem, 3vw, 1.4rem) 0;
}

.commerce-order-detail-documents h2 {
    margin: 0 0 .6rem;
    color: var(--checkout-ink);
    font-size: 1rem;
}

.commerce-order-detail-documents .order-detail-content-body {
    margin-bottom: 0;
}

.commerce-order-detail-documents .document-item a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    max-width: 100%;
    overflow-wrap: anywhere;
    text-underline-offset: .17em;
}

.commerce-order-detail-downloads {
    padding: 1rem clamp(1rem, 3vw, 1.4rem) 0;
}

.commerce-order-detail-downloads h2 {
    margin: 0 0 .6rem;
    color: var(--checkout-ink);
    font-size: 1rem;
}

.commerce-plugin-download + .commerce-plugin-download {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--checkout-line);
}

.commerce-plugin-download h3 {
    margin: 0 0 .25rem;
    color: var(--checkout-ink);
    font-size: .95rem;
}

.commerce-plugin-download p {
    margin: 0 0 .6rem;
}

.commerce-plugin-versions {
    margin: 0;
    padding: 0;
    list-style: none;
}

.commerce-plugin-versions li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .75rem;
    padding: .5rem 0;
    border-top: 1px solid var(--checkout-line);
}

.commerce-plugin-version {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.commerce-plugin-version-date,
.commerce-plugin-version-locked {
    color: var(--checkout-muted, #6b6b6b);
    font-size: .875rem;
}

.commerce-plugin-version-requirements {
    padding: .1rem .5rem;
    border: 1px solid var(--checkout-line);
    border-radius: 999px;
    color: var(--checkout-ink);
    font-size: .8rem;
}

.commerce-plugin-versions .btn {
    margin-left: auto;
}

.commerce-plugin-versions details {
    flex-basis: 100%;
}

.commerce-plugin-versions pre {
    margin: .4rem 0 0;
    white-space: pre-wrap;
    font-size: .8rem;
}

.commerce-account-shell .order-detail-content-footer:has(.commerce-order-detail-balance) {
    padding: 1rem clamp(1rem, 3vw, 1.4rem);
    border-top: 1px solid var(--checkout-line);
    background: var(--checkout-canvas);
}

.commerce-order-detail-balance {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: .75rem 1.5rem;
}

.commerce-order-detail-balance :is(.order-item-detail-summary, .commerce-order-detail-delivery) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: .5rem 1rem;
    margin: 0;
}

.commerce-order-detail-balance .order-item-detail-summary {
    width: min(100%, 19rem);
    margin-inline-start: auto;
    font-variant-numeric: tabular-nums;
}

.commerce-order-detail-balance :is(dt, dd) {
    width: auto;
    margin: 0;
    padding: 0;
    overflow-wrap: anywhere;
}

.commerce-order-detail-balance dt {
    color: var(--checkout-muted);
    font-weight: 500;
}

.commerce-order-detail-balance dd {
    text-align: end;
}

.commerce-order-detail-balance .order-item-detail-summary dt:last-of-type {
    color: var(--checkout-ink);
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .commerce-account-shell .account-content {
        grid-template-columns: minmax(0, 1fr);
    }

    .commerce-account-shell .account-aside .account-menu-inner {
        display: grid;
        grid-template:
            "greeting logout" auto
            "navigation navigation" auto / minmax(0, 1fr) auto;
        align-items: center;
        gap: .25rem .5rem;
    }

    .commerce-account-shell .account-aside-header {
        grid-area: greeting;
        padding-block: .35rem;
    }

    .commerce-account-shell .account-aside-list-group {
        display: grid;
        grid-area: navigation;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .commerce-account-shell .account-aside-item {
        display: flex;
        align-items: center;
        min-height: 2.75rem;
    }

    .commerce-account-shell .account-aside-footer {
        grid-area: logout;
        margin: 0;
        padding: 0 .45rem 0 0;
        border: 0;
    }

    .commerce-account-shell .account-aside-btn {
        display: inline-flex;
        align-items: center;
        min-height: 2.75rem;
    }
}

@media (max-width: 479.98px) {
    .commerce-account-shell .account-overview {
        grid-template-columns: minmax(0, 1fr);
    }

    .commerce-order-summary .order-hide-btn {
        width: 100%;
    }

    .commerce-order-badge {
        padding-inline: .5rem;
    }
}

.commerce-plugin-download-notice {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #e6d9bf;
    border-radius: 8px;
    background: #fbf7f0;
    color: #4a4a4a;
    font-size: 14px;
    line-height: 1.5;
}
