.customer-profile-column {
    width: 100%;
    max-width: 860px;
    padding-right: 15px;
    padding-left: 15px;
}

.customer-profile {
    --profile-primary: #5f63f2;
    --profile-primary-dark: #4347d9;
    --profile-primary-soft: rgba(95, 99, 242, 0.12);
    --profile-success: #4faf87;
    --profile-success-soft: #e5f5ee;
    --profile-warning-soft: #fbf0dc;
    --profile-danger: #cf3032;
    --profile-danger-soft: #fbe6e9;
    --profile-text: #272b41;
    --profile-muted: #9299b8;
    --profile-line: #eceef2;
    --profile-surface: #f4f5f8;

    width: 100%;
    border-radius: 16px;
    box-shadow:
        0 1px 3px rgba(30, 33, 55, 0.06),
        0 8px 30px rgba(30, 33, 55, 0.06);
    overflow: visible;
}

.customer-profile__body {
    padding: 26px 28px 24px;
}

.customer-profile__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.customer-profile__identity {
    min-width: 0;
}

.customer-profile__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.customer-profile__badge,
.customer-profile__status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    padding: 4px 9px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.customer-profile__badge i,
.customer-profile__status i {
    margin: 0;
    font-size: 12px;
}

.customer-profile__badge--registered {
    color: var(--profile-primary-dark);
    background: var(--profile-primary-soft);
}

.customer-profile__badge--anonymous,
.customer-profile__badge--birthday-upcoming,
.customer-profile__badge--birthday-recent {
    color: #9a6a12;
    background: var(--profile-warning-soft);
}

.customer-profile__badge--birthday-today,
.customer-profile__status--active {
    color: #2f7d5c;
    background: var(--profile-success-soft);
}

.customer-profile__badge--danger,
.customer-profile__status--blocked,
.customer-profile__status--inactive {
    color: var(--profile-danger);
    background: var(--profile-danger-soft);
}

.customer-profile__title {
    margin: 0;
    color: var(--profile-text);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
    word-break: break-word;
}

.customer-profile__title--card {
    display: flex;
    align-items: center;
    gap: 10px;
}

.customer-profile__card-icon {
    display: inline-grid;
    flex: none;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 9px;
    color: var(--profile-primary-dark);
    background: var(--profile-primary-soft);
}

.customer-profile__card-icon i {
    margin: 0;
    font-size: 18px;
}

.customer-profile__subtitle {
    margin: 6px 0 0;
    color: var(--profile-muted);
    font-size: 13px;
}

.customer-profile .btn i {
    margin-right: 0;
}

.customer-profile .customer-profile__header-action {
    display: inline-flex;
    flex: none;
    width: auto;
    min-height: 39px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 13px;
    border: 1px solid var(--profile-line);
    border-radius: 10px;
    background: #fff;
    color: #5a5f7d;
    font-size: 13px;
    font-weight: 600;
}

.customer-profile .customer-profile__header-action:hover {
    border-color: #dfe2e9;
    background: var(--profile-surface);
    color: var(--profile-text);
}

.customer-profile__balance {
    display: flex;
    flex-direction: column;
    margin: 4px 0 22px;
}

.customer-profile__balance strong {
    color: var(--profile-text);
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
}

.customer-profile__balance span {
    margin-top: 7px;
    color: var(--profile-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.customer-profile__actions--registered {
    grid-template-areas:
        "topup debit"
        "sell more";
}

.customer-profile__actions--anonymous {
    grid-template-areas:
        "identify identify"
        "topup debit"
        "secondary secondary";
}

/*
 * O tema global possui .btn { width: fit-content; }.
 * A largura precisa ser sobrescrita dentro do card.
 */
.customer-profile .customer-profile__action-button {
    width: 100%;
    min-height: 50px;
    margin: 0;
    gap: 9px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-transform: none;
}

.customer-profile__action-button--identify {
    grid-area: identify;
}

.customer-profile__action-button--topup {
    grid-area: topup;
    border-color: var(--profile-success);
    background: var(--profile-success);
}

.customer-profile__action-button--debit {
    grid-area: debit;
    border-color: var(--profile-primary);
    background: var(--profile-primary);
}

.customer-profile__action-button--sell {
    grid-area: sell;
    border: 1.5px solid var(--profile-primary);
    background: #fff;
    color: var(--profile-primary-dark);
}

.customer-profile__action-button--sell:hover {
    background: var(--profile-primary-soft);
    color: var(--profile-primary-dark);
}

.customer-profile__more-options {
    grid-area: more;
    width: 100%;
}

.customer-profile .customer-profile__more-button {
    width: 100%;
    min-height: 50px;
    gap: 8px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    color: #5a5f7d;
    font-size: 14px;
    font-weight: 600;
}

.customer-profile .customer-profile__more-button:hover {
    background: var(--profile-surface);
    color: var(--profile-text);
}

.customer-profile__more-button.dropdown-toggle::after {
    display: none;
}

.customer-profile__more-options .dropdown-menu {
    min-width: 245px;
    padding: 7px;
    border: 1px solid var(--profile-line);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(39, 43, 65, 0.14);
}

.customer-profile__more-options .dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 39px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #5a5f7d;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
}

.customer-profile__more-options .dropdown-item:hover {
    background: var(--profile-surface);
    color: var(--profile-primary-dark);
}

.customer-profile__anonymous-secondary {
    display: grid;
    grid-area: secondary;
    grid-template-columns: repeat(
        auto-fit,
        minmax(140px, 1fr)
    );
    gap: 12px;
}

.customer-profile .customer-profile__secondary-link {
    width: 100%;
    min-height: 44px;
    margin: 0;
    border: 0;
    border-radius: 11px;
    background: #fff;
    color: #5a5f7d;
    font-size: 13px;
    font-weight: 600;
}

.customer-profile .customer-profile__secondary-link:hover {
    background: var(--profile-surface);
    color: var(--profile-text);
}

.customer-profile .customer-profile__secondary-link--emphasis {
    background: var(--profile-surface);
    color: var(--profile-text);
}

.customer-profile__details {
    margin-top: 22px;
    padding-top: 6px;
    border-top: 1px solid var(--profile-line);
}

.customer-profile__field {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    border-bottom: 1px solid var(--profile-line);
}

.customer-profile__field:last-child {
    border-bottom: 0;
}

.customer-profile__field-label {
    color: var(--profile-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.customer-profile__field-value {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--profile-text);
    font-size: 14px;
    font-weight: 600;
}

.customer-profile__field-value--muted,
.customer-profile__birthday-detail {
    color: var(--profile-muted);
    font-weight: 500;
}

.customer-profile__field-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.customer-profile__icon-button {
    display: inline-grid;
    width: 32px;
    height: 32px;
    place-items: center;
    padding: 0;
    border: 1px solid #e3e6ef;
    border-radius: 8px;
    background: #fff;
    color: #5a5f7d;
    cursor: pointer;
}

.customer-profile__icon-button:hover,
.customer-profile__icon-button:focus {
    border-color: var(--profile-primary);
    color: var(--profile-primary);
}

.customer-profile__icon-button[disabled] {
    cursor: wait;
    opacity: 0.55;
}

.customer-profile__icon-button i {
    margin: 0;
    font-size: 17px;
}

.customer-profile__restricted,
.customer-profile__public-note {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--profile-muted);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.customer-profile__restricted i,
.customer-profile__public-note i {
    margin: 0;
    font-size: 12px;
}

@media (max-width: 767px) {
    .customer-profile__body {
        padding: 22px 20px;
    }

    .customer-profile__title {
        font-size: 21px;
    }

    .customer-profile__balance strong {
        font-size: 34px;
    }
}

@media (max-width: 575px) {
    .customer-profile__header {
        flex-direction: column;
    }

    .customer-profile .customer-profile__header-action {
        width: 100%;
    }

    .customer-profile__actions--registered {
        grid-template-areas:
            "topup topup"
            "debit debit"
            "sell sell"
            "more more";
    }

    .customer-profile__actions--anonymous {
        grid-template-areas:
            "identify identify"
            "topup topup"
            "debit debit"
            "secondary secondary";
    }

    .customer-profile__anonymous-secondary {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .customer-profile__field {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 7px 10px;
        padding: 11px 0;
    }

    .customer-profile__field-label {
        grid-column: 1 / -1;
    }

    .customer-profile__public-note {
        font-size: 10px;
    }
}

.customer-profile__alias-modal .modal-dialog {
    width: calc(100% - 30px);
    max-width: 480px;
}

.customer-profile__alias-modal .modal-content {
    border: 0;
    border-radius: 16px;
    box-shadow:
        0 12px 30px rgba(39, 43, 65, 0.14),
        0 3px 8px rgba(39, 43, 65, 0.08);
    overflow: hidden;
}

.customer-profile__alias-modal .modal-header {
    align-items: flex-start;
    padding: 24px 24px 8px;
    border-bottom: 0;
}

.customer-profile__alias-heading {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    min-width: 0;
    padding-right: 12px;
}

.customer-profile__alias-icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    color: var(--customer-profile-primary);
    background: var(--customer-profile-primary-soft);
    font-size: 21px;
}

.customer-profile__alias-icon i {
    margin: 0;
}

.customer-profile__alias-kicker {
    display: block;
    margin-bottom: 2px;
    color: var(--customer-profile-primary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.4;
    text-transform: uppercase;
}

.customer-profile__alias-modal .modal-title {
    color: var(--customer-profile-text);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
}

.customer-profile__alias-description {
    max-width: 340px;
    margin: 5px 0 0;
    color: var(--customer-profile-muted);
    font-size: 13px;
    line-height: 1.5;
}

.customer-profile__alias-modal .close {
    flex: none;
    margin: -5px -5px 0 0;
    padding: 8px;
    color: var(--customer-profile-muted);
    font-size: 25px;
    opacity: 1;
}

.customer-profile__alias-modal .modal-body {
    padding: 18px 24px 8px;
}

.customer-profile__alias-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--customer-profile-text);
    font-size: 13px;
    font-weight: 600;
}

.customer-profile__alias-label span {
    color: var(--customer-profile-muted);
    font-size: 11px;
    font-weight: 500;
}

.customer-profile__alias-input {
    height: 46px;
    padding: 10px 13px;
    border: 1px solid #dfe2e9;
    border-radius: 8px;
    color: var(--customer-profile-text);
    font-size: 14px;
}

.customer-profile__alias-input:focus {
    border-color: var(--customer-profile-primary);
    box-shadow: 0 0 0 3px rgba(95, 99, 242, 0.12);
}

.customer-profile__alias-meta {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 7px;
    color: var(--customer-profile-muted);
}

.customer-profile__alias-meta small {
    font-size: 11px;
}

.customer-profile__alias-error {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 7px;
    color: var(--customer-profile-danger);
    background: var(--customer-profile-danger-soft);
    font-size: 12px;
    line-height: 1.4;
}

.customer-profile__alias-modal .modal-footer {
    gap: 8px;
    padding: 18px 24px 24px;
    border-top: 0;
}

.customer-profile__alias-modal .modal-footer::before,
.customer-profile__alias-modal .modal-footer::after {
    display: none;
}

.customer-profile__alias-modal .modal-footer .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 42px;
    margin: 0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.customer-profile__alias-cancel {
    border: 1px solid #e3e6ec;
    color: #5a6078;
    background: #f4f5f8;
}

.customer-profile__alias-save {
    border-color: var(--customer-profile-primary);
    color: #ffffff;
    background: var(--customer-profile-primary);
}

.customer-profile__alias-save:hover,
.customer-profile__alias-save:focus {
    border-color: var(--customer-profile-primary-dark);
    color: #ffffff;
    background: var(--customer-profile-primary-dark);
}

.customer-profile__alias-save[aria-busy="true"] {
    cursor: wait;
    opacity: 0.75;
}

.customer-profile__alias-save i {
    margin-right: 6px !important;
}

@media (max-width: 575px) {
    .customer-profile__alias-modal .modal-header {
        padding: 20px 18px 8px;
    }

    .customer-profile__alias-modal .modal-body {
        padding: 16px 18px 6px;
    }

    .customer-profile__alias-modal .modal-footer {
        flex-direction: column-reverse;
        padding: 16px 18px 20px;
    }

    .customer-profile__alias-modal .modal-footer .btn {
        width: 100%;
    }
}