:root {
    --loyalty-primary: #720AA4;
    --loyalty-dark: #050A24;
    --loyalty-gold: #f0b429;
    --loyalty-gradient: linear-gradient(135deg, #720AA4 0%, #2d0a4e 55%, #050A24 100%);
}

.loyalty-hero {
    background: var(--loyalty-gradient);
    color: #fff;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.loyalty-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 15%, rgba(255,255,255,.15), transparent 45%);
    pointer-events: none;
}

.loyalty-hero .card-body {
    position: relative;
    z-index: 1;
    padding: 1.5rem 1.5rem 1.85rem;
}

.loyalty-scale {
    margin-bottom: 0.15rem;
}

.loyalty-scale__next {
    margin-bottom: 0.25rem;
}

.loyalty-hero__badge {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(255,255,255,.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: .75rem;
}

.loyalty-hero__title {
    font-weight: 700;
}

.loyalty-hero__boost {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--loyalty-gold);
}

.loyalty-hero__meta {
    color: rgba(255, 255, 255, 0.88);
}

.loyalty-hero__meta strong {
    color: #fff;
    font-weight: 700;
}

.loyalty-hero .text-muted,
.loyalty-hero .text-secondary {
    color: rgba(255, 255, 255, 0.88) !important;
}

.loyalty-scale__labels {
    color: rgba(255, 255, 255, 0.92);
}

.loyalty-scale__label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95) !important;
    letter-spacing: 0.01em;
}

.loyalty-scale__pct {
    font-weight: 800;
    color: #ffe08a !important;
}

.loyalty-scale__next {
    color: rgba(255, 255, 255, 0.92) !important;
}

.loyalty-scale__next strong {
    color: #fff !important;
    font-weight: 700;
}

.loyalty-scale__track {
    height: 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.2);
    overflow: hidden;
}

.loyalty-scale__fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #f0b429, #ffe08a);
    transition: width .6s ease;
}

.loyalty-rewards-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.loyalty-reward-item {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    padding: .75rem 1rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(240, 180, 41, .18) 0%, rgba(255, 248, 220, .95) 100%);
    border: 1px solid rgba(201, 151, 26, .35);
    box-shadow: 0 2px 10px rgba(201, 151, 26, .12);
}

.loyalty-reward-item--pin {
    background: rgba(240, 180, 41, .12);
    border-color: rgba(240, 180, 41, .25);
}

.loyalty-reward-item--private {
    background: rgba(255, 193, 7, .08);
    border-color: rgba(255, 193, 7, .2);
}

.loyalty-reward-item__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(145deg, #fff8dc, #f0b429);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9a7209;
    flex-shrink: 0;
}

.loyalty-private-card {
    border-left: 4px solid var(--loyalty-gold) !important;
}

.loyalty-levels-table__current {
    background: rgba(114, 10, 164, .08);
    font-weight: 600;
}

.loyalty-levels-table__done {
    opacity: .75;
}

.profile-dashboard-header {
    border-radius: 20px;
    background: linear-gradient(135deg, #f8f5fc, #fff);
    border: 1px solid rgba(114, 10, 164, .12);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.profile-dashboard-header h2 {
    font-weight: 800;
    color: var(--loyalty-dark);
}

.profile-stat-tile {
    border-radius: 16px;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 8px 24px rgba(5,10,36,.06);
    height: 100%;
    transition: transform .2s ease, box-shadow .2s ease;
}

.profile-stat-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(114, 10, 164, .12);
}

.profile-stat-tile__value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--loyalty-primary);
    line-height: 1.1;
}

.profile-stat-tile__label {
    font-size: .85rem;
    color: #5C647D;
}

.user-profile-loyalty-public {
    border-radius: 16px;
    border: 1px solid rgba(114, 10, 164, .15);
    background: linear-gradient(180deg, #faf7ff, #fff);
    padding: 1rem 1.25rem;
    margin-top: 1rem;
    text-align: left;
}

.user-profile-loyalty-public .loyalty-mini-level {
    font-weight: 800;
    color: var(--loyalty-primary);
}

.loyalty-pinned-tariff-card {
    border: 2px solid var(--loyalty-gold);
    background: linear-gradient(135deg, #fffdf5, #fff);
}

.loyalty-hero__points-total {
    font-weight: 800;
    color: #ffe08a;
    font-size: 1.05rem;
}

.loyalty-xp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.loyalty-xp-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .2);
    font-size: .78rem;
    color: rgba(255, 255, 255, .92);
}

.loyalty-xp-chip strong {
    color: #ffe08a;
    font-weight: 800;
}

.loyalty-earn-section__head {
    margin-bottom: 1.25rem;
}

.loyalty-earn-section__title {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--loyalty-dark);
    margin-bottom: .35rem;
}

.loyalty-earn-section__subtitle {
    color: #5C647D;
    font-size: .9rem;
}

.loyalty-earn-section__subtitle strong {
    color: var(--loyalty-primary);
}

.loyalty-earn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.loyalty-earn-card {
    border-radius: 18px;
    padding: 1.15rem 1.2rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
    box-shadow: 0 10px 28px rgba(5, 10, 36, .06);
    transition: transform .2s ease, box-shadow .2s ease;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.loyalty-earn-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(114, 10, 164, .12);
}

.loyalty-earn-card--done {
    border-color: rgba(25, 135, 84, .25);
    background: linear-gradient(180deg, #f6fffb, #fff);
}

.loyalty-earn-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: .85rem;
}

.loyalty-earn-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.loyalty-earn-card--purple .loyalty-earn-card__icon { background: rgba(114, 10, 164, .12); color: var(--loyalty-primary); }
.loyalty-earn-card--gold .loyalty-earn-card__icon { background: rgba(240, 180, 41, .18); color: #b8860b; }
.loyalty-earn-card--green .loyalty-earn-card__icon { background: rgba(25, 135, 84, .12); color: #198754; }
.loyalty-earn-card--blue .loyalty-earn-card__icon { background: rgba(13, 110, 253, .1); color: #0d6efd; }
.loyalty-earn-card--orange .loyalty-earn-card__icon { background: rgba(253, 126, 20, .12); color: #fd7e14; }

.loyalty-earn-card__status {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #8a93a8;
    padding: .2rem .5rem;
    border-radius: 999px;
    background: #f1f3f8;
}

.loyalty-earn-card__status--done {
    background: rgba(25, 135, 84, .12);
    color: #198754;
}

.loyalty-earn-card__title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--loyalty-dark);
    margin-bottom: .35rem;
}

.loyalty-earn-card__points {
    font-weight: 800;
    color: var(--loyalty-primary);
    font-size: .95rem;
    margin-bottom: .5rem;
}

.loyalty-earn-card__desc {
    font-size: .82rem;
    color: #5C647D;
    margin-bottom: .75rem;
    flex-grow: 1;
}

.loyalty-earn-card__meta {
    font-size: .78rem;
    color: #8a93a8;
    margin-bottom: .65rem;
}

.loyalty-earn-card__link {
    font-size: .82rem;
    font-weight: 700;
    color: var(--loyalty-primary);
    text-decoration: none;
}

.loyalty-earn-card__link:hover {
    color: #4a0878;
}

.loyalty-timeline__head {
    margin-bottom: 1.25rem;
}

.loyalty-timeline__title {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--loyalty-dark);
    margin-bottom: .35rem;
}

.loyalty-timeline__subtitle {
    color: #5C647D;
    font-size: .9rem;
}

.loyalty-timeline__track {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.loyalty-timeline__item {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 1rem;
    position: relative;
    padding-bottom: 1.25rem;
}

.loyalty-timeline__item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 25px;
    top: 52px;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, rgba(114, 10, 164, .25), rgba(114, 10, 164, .08));
}

.loyalty-timeline__item--done:not(:last-child)::before {
    background: linear-gradient(180deg, rgba(25, 135, 84, .4), rgba(25, 135, 84, .15));
}

.loyalty-timeline__marker {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid rgba(114, 10, 164, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.loyalty-timeline__level-num {
    font-weight: 800;
    color: var(--loyalty-primary);
    font-size: 1.1rem;
}

.loyalty-timeline__item--done .loyalty-timeline__marker {
    border-color: #198754;
    background: rgba(25, 135, 84, .08);
}

.loyalty-timeline__item--current .loyalty-timeline__marker {
    border-color: var(--loyalty-gold);
    background: linear-gradient(135deg, #fff9e8, #fff);
    box-shadow: 0 0 0 4px rgba(240, 180, 41, .2);
}

.loyalty-timeline__item--locked .loyalty-timeline__marker {
    opacity: .65;
}

.loyalty-timeline__check {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #198754;
    color: #fff;
    font-size: .55rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loyalty-timeline__card {
    border-radius: 16px;
    padding: 1rem 1.15rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
    box-shadow: 0 8px 22px rgba(5, 10, 36, .05);
}

.loyalty-timeline__item--current .loyalty-timeline__card {
    border-color: rgba(240, 180, 41, .45);
    background: linear-gradient(135deg, #fffdf8, #fff);
}

.loyalty-timeline__item--locked .loyalty-timeline__card {
    opacity: .82;
}

.loyalty-timeline__card-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: .5rem;
    margin-bottom: .75rem;
}

.loyalty-timeline__name {
    font-weight: 800;
    color: var(--loyalty-dark);
}

.loyalty-timeline__threshold {
    font-size: .82rem;
    color: #5C647D;
}

.loyalty-timeline__threshold strong {
    color: var(--loyalty-primary);
}

.loyalty-timeline__badge {
    font-size: .72rem;
    font-weight: 700;
    padding: .25rem .6rem;
    border-radius: 999px;
    white-space: nowrap;
}

.loyalty-timeline__badge--current {
    background: rgba(240, 180, 41, .2);
    color: #9a6b00;
}

.loyalty-timeline__badge--max {
    background: rgba(114, 10, 164, .12);
    color: var(--loyalty-primary);
}

.loyalty-timeline__badge--locked {
    background: #f1f3f8;
    color: #6c757d;
}

.loyalty-timeline__rewards {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.loyalty-timeline__reward {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .7rem;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(240, 180, 41, .22) 0%, rgba(255, 250, 230, .98) 100%);
    border: 1px solid rgba(201, 151, 26, .32);
    font-size: .78rem;
    font-weight: 600;
    color: #7a5a08;
}

.loyalty-timeline__reward i {
    color: #c9971a;
    font-size: .85rem;
}

.loyalty-timeline__item--done .loyalty-timeline__reward {
    background: rgba(25, 135, 84, .08);
    border-color: rgba(25, 135, 84, .15);
}

.loyalty-timeline__item--done .loyalty-timeline__reward i {
    color: #198754;
}

.loyalty-levels-table__points {
    font-weight: 800;
    color: var(--loyalty-primary);
}

@media (max-width: 575.98px) {
    .loyalty-earn-grid {
        grid-template-columns: 1fr;
    }

    .loyalty-timeline__item {
        grid-template-columns: 44px 1fr;
        gap: .75rem;
    }

    .loyalty-timeline__marker {
        width: 44px;
        height: 44px;
    }

    .loyalty-timeline__item:not(:last-child)::before {
        left: 21px;
        top: 44px;
    }
}
