.customer-account-page {
    max-width: 1180px;
    margin: 0 auto;
    color: var(--catalog-ink);
}

.customer-account-page,
.customer-account-page * {
    box-sizing: border-box;
}

.customer-page-header {
    margin-bottom: 22px;
}

.customer-page-header .catalog-text-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.customer-panel,
.account-hub,
.wallet-summary-card,
.notification-card {
    margin: 0;
    background: #fff;
    border: 1px solid var(--catalog-line);
    border-radius: 16px;
    box-shadow: 0 7px 22px rgba(25, 31, 43, .045);
}

.customer-panel,
.account-hub {
    padding: 20px;
}

.customer-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 17px;
}

.customer-section-heading > div {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
}

.customer-section-heading > div > span {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    color: var(--catalog-red);
    background: #fff1f0;
    border-radius: 9px;
    place-items: center;
    font-size: .8rem;
}

.customer-section-heading h2 {
    margin: 0;
    color: var(--catalog-ink);
    font-size: 1rem;
    font-weight: 800;
}

.customer-section-heading p,
.customer-section-heading > small {
    margin: 2px 0 0;
    color: var(--catalog-muted);
    font-size: .7rem;
}

.customer-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    margin-left: auto;
    padding: 0 6px;
    color: #fff;
    background: var(--catalog-red, #d71920);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

/* Account hub and profile */
.account-identity {
    display: grid;
    justify-items: end;
    gap: 3px;
    padding: 9px 12px;
    background: var(--catalog-soft);
    border: 1px solid var(--catalog-line);
    border-radius: 10px;
}

.account-identity > span {
    color: var(--catalog-muted);
    font-size: .68rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.account-identity > strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--catalog-success);
    font-size: .72rem;
    font-weight: 800;
}

.account-identity > strong i {
    width: 7px;
    height: 7px;
    background: currentColor;
    border-radius: 50%;
}

.account-hub {
    margin-bottom: 18px;
}

.account-hub-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.account-hub-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    min-width: 0;
    gap: 11px;
    padding: 13px;
    color: var(--catalog-ink);
    background: #fff;
    border: 1px solid var(--catalog-line);
    border-radius: 12px;
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.account-hub-card:hover {
    color: var(--catalog-ink);
    border-color: #e6b0ad;
    box-shadow: 0 8px 20px rgba(25, 31, 43, .07);
    transform: translateY(-1px);
}

.account-hub-icon {
    display: grid;
    width: 42px;
    height: 42px;
    color: var(--catalog-red);
    background: #fff1f0;
    border-radius: 10px;
    place-items: center;
    font-size: .9rem;
}

.account-hub-card > span:nth-child(2) {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.account-hub-card strong {
    color: var(--catalog-ink);
    font-size: .82rem;
    overflow-wrap: anywhere;
}

.account-hub-card small {
    color: var(--catalog-muted);
    font-size: .69rem;
    line-height: 1.4;
}

.account-hub-card > i {
    color: #a1a9b4;
    font-size: .66rem;
}

.account-notification-link {
    grid-template-columns: 42px minmax(0, 1fr) auto auto;
}

.account-profile-panel {
    scroll-margin-top: 18px;
}

.account-profile-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.customer-field {
    display: grid;
    min-width: 0;
    gap: 6px;
}

.customer-field-wide,
.account-profile-actions {
    grid-column: 1 / -1;
}

.customer-field > label,
.customer-form .customer-field > label {
    margin: 0;
    color: var(--catalog-ink);
    font-size: .75rem;
    font-weight: 750;
}

.customer-field > label small {
    color: var(--catalog-muted);
    font-size: .65rem;
    font-weight: 600;
}

.customer-input-shell {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    overflow: hidden;
    background: #fff;
    border: 1px solid #d7dbe1;
    border-radius: 10px;
}

.customer-input-shell:focus-within {
    border-color: var(--catalog-red);
    box-shadow: 0 0 0 3px rgba(229, 57, 53, .1);
}

.customer-input-shell > i {
    color: #929baa;
    font-size: .75rem;
    text-align: center;
}

.customer-input-shell input {
    width: 100%;
    min-width: 0;
    height: 43px;
    padding: 9px 11px 9px 0;
    color: var(--catalog-ink);
    background: transparent;
    border: 0;
    outline: 0;
    font: inherit;
    font-size: .82rem;
}

.customer-field.has-error .customer-input-shell {
    border-color: #c62828;
}

.account-profile-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-top: 2px;
    padding-top: 15px;
    border-top: 1px solid var(--catalog-line);
}

.account-profile-actions p {
    max-width: 580px;
    margin: 0;
    color: var(--catalog-muted);
    font-size: .7rem;
    line-height: 1.5;
}

.account-profile-actions p i {
    margin-right: 4px;
    color: var(--catalog-success);
}

.account-profile-actions button,
.customer-primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 10px 16px;
    color: #fff;
    background: var(--catalog-red);
    border: 1px solid var(--catalog-red);
    border-radius: 10px;
    font-size: .78rem;
    font-weight: 800;
    cursor: pointer;
}

.account-profile-actions button:hover,
.customer-primary-action:hover {
    color: #fff;
    background: var(--catalog-red-dark);
    border-color: var(--catalog-red-dark);
}

/* Saved addresses */
.customer-account-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(310px, 350px);
    gap: 22px;
    align-items: start;
}

.customer-account-list,
.notification-list {
    display: grid;
    gap: 14px;
}

.customer-create-panel {
    position: sticky;
    top: 18px;
    scroll-margin-top: 18px;
}

.address-card {
    position: relative;
    overflow: hidden;
}

.address-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #d5dae0;
    content: "";
}

.address-card.is-default::before {
    background: var(--catalog-success);
}

.address-card.is-default {
    border-color: #cfe7da;
}

.address-card-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.address-card-title {
    display: flex;
    min-width: 0;
    gap: 11px;
}

.address-icon {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    color: var(--catalog-red);
    background: #fff1f0;
    border-radius: 10px;
    place-items: center;
    font-size: .8rem;
}

.address-card.is-default .address-icon {
    color: var(--catalog-success);
    background: #eaf8f1;
}

.address-card-title > div {
    min-width: 0;
}

.address-card-title span {
    display: block;
    color: var(--catalog-muted);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.address-card-title h2 {
    margin: 4px 0 0;
    color: var(--catalog-ink);
    font-size: .94rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.customer-default-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 27px;
    padding: 5px 9px;
    color: #0f6940;
    background: #e7f8ef;
    border: 1px solid #bce7cf;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
    white-space: nowrap;
}

.address-coordinates {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 2px 6px;
    margin: 15px 0 0;
    padding: 10px 11px;
    color: var(--catalog-muted);
    background: var(--catalog-soft);
    border-radius: 9px;
    font-size: .68rem;
}

.address-coordinates i {
    grid-row: 1 / 3;
    margin-top: 2px;
    color: #8d97a5;
}

.address-coordinates strong {
    color: #4d5664;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.customer-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px 14px;
    margin-top: 15px;
}

.customer-card-actions form {
    margin: 0;
}

.customer-text-action,
.customer-danger-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    background: transparent;
    border: 0;
    font-size: .72rem;
    font-weight: 800;
    cursor: pointer;
}

.customer-text-action {
    color: var(--catalog-red-dark);
}

.customer-danger-action {
    color: #7b8490;
}

.customer-editor {
    margin-top: 15px;
    padding-top: 13px;
    border-top: 1px solid var(--catalog-line);
}

.customer-editor summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--catalog-ink);
    font-size: .73rem;
    font-weight: 800;
    cursor: pointer;
}

.customer-editor[open] summary {
    color: var(--catalog-red-dark);
}

.customer-form {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.customer-form input,
.customer-form textarea {
    width: 100%;
    min-width: 0;
    padding: 10px 11px;
    color: var(--catalog-ink);
    background: #fff;
    border: 1px solid #d7dbe1;
    border-radius: 9px;
    outline: 0;
    font: inherit;
    font-size: .78rem;
}

.customer-form input {
    min-height: 41px;
}

.customer-form textarea {
    line-height: 1.5;
    resize: vertical;
}

.customer-form input:focus,
.customer-form textarea:focus {
    border-color: var(--catalog-red);
    box-shadow: 0 0 0 3px rgba(229, 57, 53, .1);
}

.customer-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

.customer-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 1px 0;
    color: var(--catalog-ink);
    font-size: .73rem;
    font-weight: 700;
    cursor: pointer;
}

.customer-checkbox input {
    flex: 0 0 auto;
    width: 16px;
    min-height: 16px;
    margin: 0;
    padding: 0;
    accent-color: var(--catalog-red);
}

.customer-primary-action {
    width: 100%;
}

.customer-panel-note {
    margin: 13px 0 0;
    padding-top: 12px;
    color: var(--catalog-muted);
    border-top: 1px solid var(--catalog-line);
    font-size: .68rem;
    line-height: 1.5;
}

.customer-panel-note i {
    margin-right: 4px;
}

.customer-empty-state {
    display: grid;
    justify-items: center;
    padding: 34px 24px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--catalog-line);
    border-radius: 15px;
}

.customer-empty-state > span {
    display: grid;
    width: 52px;
    height: 52px;
    margin-bottom: 13px;
    color: var(--catalog-red);
    background: #fff1f0;
    border-radius: 50%;
    place-items: center;
    font-size: 1.05rem;
}

.customer-empty-state h2 {
    margin: 0;
    color: var(--catalog-ink);
    font-size: 1rem;
}

.customer-empty-state p {
    max-width: 360px;
    margin: 7px 0 16px;
    color: var(--catalog-muted);
    font-size: .77rem;
    line-height: 1.5;
}

.customer-outline-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 8px 12px;
    color: var(--catalog-red-dark);
    background: #fff;
    border: 1px solid #efc0bd;
    border-radius: 9px;
    font-size: .72rem;
    font-weight: 800;
    text-decoration: none;
}

.customer-outline-action:hover {
    color: var(--catalog-red-dark);
    background: #fff7f6;
    border-color: #e8aaa6;
}

/* Wallet and rewards */
.wallet-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 17px;
}

.wallet-summary-card {
    position: relative;
    display: grid;
    min-height: 190px;
    align-content: start;
    padding: 20px;
    overflow: hidden;
}

.wallet-summary-card::after {
    position: absolute;
    right: -32px;
    bottom: -42px;
    width: 130px;
    height: 130px;
    border: 24px solid rgba(255, 255, 255, .16);
    border-radius: 50%;
    content: "";
}

.wallet-balance-card {
    color: #fff;
    background: linear-gradient(135deg, #b91c1c, #e53935);
    border-color: #c92724;
}

.loyalty-balance-card {
    color: #3a2a05;
    background: linear-gradient(135deg, #fff8e5, #f9e4a7);
    border-color: #ebd38c;
}

.wallet-summary-heading {
    display: flex;
    align-items: center;
    gap: 9px;
}

.wallet-summary-heading > span {
    display: grid;
    width: 32px;
    height: 32px;
    color: inherit;
    background: rgba(255, 255, 255, .17);
    border-radius: 9px;
    place-items: center;
    font-size: .75rem;
}

.loyalty-balance-card .wallet-summary-heading > span {
    background: rgba(135, 91, 0, .1);
}

.wallet-summary-heading small {
    color: inherit;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.wallet-value,
.loyalty-value {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin-top: 18px;
}

.wallet-value h2,
.loyalty-value h2 {
    margin: 0;
    color: inherit;
    font-size: 1.8rem;
    font-weight: 850;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.wallet-value span,
.loyalty-value span {
    padding: 4px 7px;
    color: inherit;
    background: rgba(255, 255, 255, .16);
    border-radius: 6px;
    font-size: .64rem;
    font-weight: 800;
}

.loyalty-value span {
    background: rgba(135, 91, 0, .1);
}

.wallet-summary-card > p {
    position: relative;
    z-index: 1;
    margin: 8px 0 0;
    color: inherit;
    font-size: .72rem;
    line-height: 1.45;
    opacity: .88;
}

.wallet-summary-card > time {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding-top: 13px;
    color: inherit;
    font-size: .64rem;
    opacity: .75;
}

.wallet-summary-card > time i {
    margin-right: 4px;
}

.wallet-history {
    margin-top: 0;
}

.wallet-transactions {
    display: grid;
}

.wallet-transaction-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 13px 0;
    border-top: 1px solid var(--catalog-line);
}

.wallet-transaction-row:first-child {
    padding-top: 0;
    border-top: 0;
}

.wallet-transaction-row:last-child {
    padding-bottom: 0;
}

.wallet-transaction-icon {
    display: grid;
    width: 36px;
    height: 36px;
    color: var(--catalog-success);
    background: #eaf8f1;
    border-radius: 10px;
    place-items: center;
    font-size: .7rem;
}

.wallet-transaction-icon.is-debit {
    color: #a3322d;
    background: #fff0ef;
}

.wallet-transaction-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.wallet-transaction-copy strong {
    color: var(--catalog-ink);
    font-size: .8rem;
}

.wallet-transaction-copy time,
.wallet-transaction-copy small {
    color: var(--catalog-muted);
    font-size: .67rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.wallet-transaction-copy small span {
    font-weight: 750;
}

.wallet-amount {
    display: grid;
    justify-items: end;
    gap: 2px;
    text-align: right;
}

.wallet-amount strong {
    color: var(--catalog-success);
    font-size: .82rem;
    white-space: nowrap;
}

.wallet-amount.is-debit strong {
    color: #a3322d;
}

.wallet-amount small {
    color: var(--catalog-muted);
    font-size: .64rem;
    white-space: nowrap;
}

.wallet-empty-state {
    padding-block: 28px;
    background: var(--catalog-soft);
    border-style: dashed;
}

/* Notifications */
.notifications-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 14px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--catalog-line);
    border-radius: 12px;
}

.notifications-summary {
    display: flex;
    align-items: center;
    gap: 9px;
}

.notifications-summary > span {
    display: grid;
    width: 34px;
    height: 34px;
    color: var(--catalog-red);
    background: #fff1f0;
    border-radius: 9px;
    place-items: center;
    font-size: .75rem;
}

.notifications-summary > div {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.notifications-summary strong {
    color: var(--catalog-ink);
    font-size: 1.25rem;
    line-height: 1;
}

.notifications-summary small {
    color: var(--catalog-muted);
    font-size: .72rem;
}

.notifications-toolbar > p {
    margin: 0;
    color: var(--catalog-muted);
    font-size: .68rem;
}

.notifications-toolbar > p i {
    margin-right: 4px;
}

.notification-card {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding: 17px 18px;
    overflow: hidden;
}

.notification-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: transparent;
    content: "";
}

.notification-card.is-unread {
    background: #fffdfd;
    border-color: #edcfcd;
}

.notification-card.is-unread::before {
    background: var(--catalog-red);
}

.notification-card.is-read {
    background: #fcfcfd;
}

.notification-type-icon {
    display: grid;
    width: 40px;
    height: 40px;
    color: #7b8490;
    background: var(--catalog-soft);
    border-radius: 10px;
    place-items: center;
    font-size: .82rem;
}

.notification-card.is-unread .notification-type-icon {
    color: var(--catalog-red);
    background: #fff1f0;
}

.notification-content {
    min-width: 0;
}

.notification-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    min-width: 0;
    gap: 14px;
}

.notification-heading > div {
    min-width: 0;
}

.notification-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 8px;
    color: var(--catalog-muted);
    font-size: .64rem;
    font-weight: 700;
}

.notification-meta strong {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--catalog-red-dark);
    font-size: inherit;
}

.notification-meta strong i {
    width: 6px;
    height: 6px;
    background: var(--catalog-red);
    border-radius: 50%;
}

.notification-heading h2 {
    margin: 4px 0 0;
    color: var(--catalog-ink);
    font-size: .9rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.notification-heading time {
    flex: 0 0 auto;
    color: var(--catalog-muted);
    font-size: .65rem;
    white-space: nowrap;
}

.notification-content > p {
    margin: 9px 0 0;
    color: #596273;
    font-size: .76rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
    white-space: normal;
}

.notification-actions {
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid #edf0f3;
}

.notification-actions .customer-outline-action {
    min-height: 33px;
    padding: 7px 10px;
}

.notifications-empty-state {
    max-width: 620px;
    margin-inline: auto;
}

.customer-pagination {
    font-size: .75rem;
}

.customer-account-page a:focus-visible,
.customer-account-page button:focus-visible,
.customer-account-page summary:focus-visible,
.customer-account-page input:focus-visible,
.customer-account-page textarea:focus-visible {
    outline: 3px solid rgba(229, 57, 53, .2);
    outline-offset: 2px;
}

@media (max-width: 960px) {
    .customer-account-grid {
        grid-template-columns: 1fr;
    }

    .customer-create-panel {
        position: static;
    }
}

@media (max-width: 700px) {
    .customer-account-page {
        padding-bottom: calc(104px + env(safe-area-inset-bottom));
    }

    .customer-page-header {
        gap: 12px;
        margin-bottom: 18px;
    }

    .account-identity {
        justify-items: start;
    }

    .account-hub-grid,
    .account-profile-form,
    .wallet-summary-grid {
        grid-template-columns: 1fr;
    }

    .customer-field-wide,
    .account-profile-actions {
        grid-column: auto;
    }

    .account-profile-actions {
        display: grid;
    }

    .account-profile-actions button {
        width: 100%;
    }

    .customer-panel,
    .account-hub,
    .wallet-summary-card {
        padding: 16px;
        border-radius: 14px;
    }

    .wallet-summary-card {
        min-height: 175px;
    }

    .notifications-toolbar {
        align-items: flex-start;
    }
}

@media (max-width: 540px) {
    .account-hub-card {
        grid-template-columns: 38px minmax(0, 1fr) auto;
        padding: 11px;
    }

    .account-notification-link {
        grid-template-columns: 38px minmax(0, 1fr) auto auto;
    }

    .account-hub-icon {
        width: 38px;
        height: 38px;
    }

    .address-card-heading,
    .notification-heading,
    .notifications-toolbar {
        display: grid;
    }

    .customer-default-badge {
        justify-self: start;
    }

    .customer-form-row {
        grid-template-columns: 1fr;
    }

    .wallet-transaction-row {
        grid-template-columns: 34px minmax(0, 1fr);
        align-items: start;
    }

    .wallet-transaction-icon {
        width: 34px;
        height: 34px;
    }

    .wallet-amount {
        grid-column: 2;
        justify-items: start;
        text-align: left;
    }

    .notification-card {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 9px;
        padding: 15px 13px;
    }

    .notification-type-icon {
        width: 34px;
        height: 34px;
    }

    .notification-heading time {
        white-space: normal;
    }

    .notification-actions {
        align-items: stretch;
    }

    .notification-actions .customer-outline-action,
    .notification-actions form,
    .notification-actions button {
        width: 100%;
    }

    .notification-actions button {
        justify-content: center;
        min-height: 34px;
        border: 1px solid var(--catalog-line);
        border-radius: 9px;
    }
}
