﻿.upgrade-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: linear-gradient(135deg, var(--gold, #E8B923), #b8860b);
    color: #14110a;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1.6;
    margin-inline-start: 6px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(var(--gold-rgb, 232, 185, 35), .3);
}

.model-toggle-btn.is-locked,
.markets-tab.is-locked,
.markets-subtab.is-locked {
    opacity: .72;
    position: relative;
}

.plans-backdrop, .upgrade-backdrop, .receipt-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(6, 8, 10, .78);
    backdrop-filter: blur(4px);
    z-index: 220;
    opacity: 0;
    transition: opacity .2s ease;
}

    .plans-backdrop:not([hidden]), .upgrade-backdrop:not([hidden]) {
        opacity: 1;
    }

.plans-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -48%) scale(.97);
    width: min(980px, 94vw);
    max-height: 88vh;
    overflow-y: auto;
    background: var(--panel, #12161C);
    border: 1px solid rgba(var(--gold-rgb, 232, 185, 35), .22);
    border-radius: 20px;
    padding: 32px 26px 28px;
    z-index: 221;
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
    box-shadow: 0 30px 80px -20px rgba(0,0,0,.6);
}

    .plans-modal.is-open {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

.plans-close {
    position: absolute;
    top: 14px;
    left: 14px;
    color: #9aa2ad;
}

.plans-title {
    text-align: center;
    font-size: 22px;
    color: var(--text, #E7EAEE);
    margin: 0 0 6px;
}

.plans-sub {
    text-align: center;
    font-size: 13px;
    color: var(--muted, #8A93A3);
    margin: 0 0 26px;
}

.plans-loading {
    text-align: center;
    color: var(--muted, #8A93A3);
    padding: 40px 0;
    grid-column: 1/-1;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 920px) {
    .plans-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .plans-grid {
        grid-template-columns: 1fr;
    }
}

.plan-card {
    position: relative;
    background: var(--panel-alt, #171C24);
    border: 1px solid var(--border, #232A35);
    border-radius: 16px;
    padding: 22px 16px 18px;
    display: flex;
    flex-direction: column;
    animation: planCardIn .45s var(--ease, ease) both;
    animation-delay: calc(var(--stagger, 0) * 60ms);
    transition: transform .2s ease, border-color .2s ease;
}

    .plan-card:hover {
        transform: translateY(-4px);
        border-color: rgba(var(--gold-rgb, 232, 185, 35), .35);
    }

    .plan-card.is-highlight {
        border-color: rgba(var(--gold-rgb, 232, 185, 35), .55);
        box-shadow: 0 0 0 1px rgba(var(--gold-rgb, 232, 185, 35), .18);
    }

    .plan-card.is-current {
        border-color: rgba(var(--bull-rgb, 23, 199, 135), .5);
    }

@keyframes planCardIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.plan-ribbon {
    position: absolute;
    top: -10px;
    right: 16px;
    background: linear-gradient(135deg, var(--gold, #E8B923), #b8860b);
    color: #14110a;
    font-size: 10.5px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
}

.plan-name {
    font-size: 17px;
    color: var(--text, #E7EAEE);
    margin: 4px 0 2px;
}

.plan-tagline {
    font-size: 11.5px;
    color: var(--muted, #8A93A3);
    margin: 0 0 14px;
    min-height: 30px;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 2px;
}

.plan-price-num {
    font-size: 20px;
    font-weight: 800;
    color: var(--gold, #E8B923);
    font-family: var(--font-mono, monospace);
}

.plan-price-unit {
    font-size: 11px;
    color: var(--muted, #8A93A3);
}

.plan-price-vat {
    font-size: 10.5px;
    color: var(--muted, #8A93A3);
    margin-bottom: 14px;
}

.plan-features {
    list-style: none;
    margin: 6px 0 18px;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .plan-features li {
        font-size: 12px;
        color: var(--text, #E7EAEE);
        line-height: 1.5;
        padding-inline-start: 18px;
        position: relative;
    }

        .plan-features li::before {
            content: "";
            position: absolute;
            inline-size: 6px;
            block-size: 6px;
            background: var(--bull, #17C787);
            border-radius: 50%;
            inset-inline-start: 0;
            top: 6px;
        }

.plan-btn {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    background: linear-gradient(135deg, var(--gold, #E8B923), #b8860b);
    color: #14110a;
    transition: transform .15s ease;
}

    .plan-btn:hover:not(:disabled) {
        transform: translateY(-1px);
    }

    .plan-btn:disabled {
        cursor: default;
        opacity: .8;
    }

    .plan-btn.is-current {
        background: rgba(var(--bull-rgb, 23, 199, 135), .18);
        color: var(--bull, #17C787);
    }

    .plan-btn.is-ghost {
        background: transparent;
        border: 1px solid var(--border, #232A35);
        color: var(--muted, #8A93A3);
    }

.upgrade-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -46%) scale(.96);
    width: min(360px, 90vw);
    background: var(--panel, #12161C);
    border: 1px solid rgba(var(--gold-rgb, 232, 185, 35), .28);
    border-radius: 18px;
    padding: 28px 22px 24px;
    text-align: center;
    z-index: 222;
    opacity: 0;
    transition: opacity .22s ease, transform .22s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,.55);
}

    .upgrade-modal.is-open {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

.upgrade-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(var(--gold-rgb, 232, 185, 35), .18), rgba(var(--gold-rgb, 232, 185, 35), .05));
    color: var(--gold, #E8B923);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: badgePulse 1.8s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(var(--gold-rgb, 232, 185, 35), .3);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(var(--gold-rgb, 232, 185, 35), 0);
    }
}

.upgrade-title {
    font-size: 17px;
    color: var(--text, #E7EAEE);
    margin: 0 0 8px;
}

.upgrade-message {
    font-size: 12.5px;
    color: var(--muted, #8A93A3);
    line-height: 1.7;
    margin: 0 0 18px;
}

.upgrade-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.receipt-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -46%) scale(.96);
    width: min(400px, 92vw);
    background: var(--panel, #12161C);
    border: 1px solid rgba(var(--bull-rgb, 23, 199, 135), .3);
    border-radius: 18px;
    padding: 30px 24px 24px;
    text-align: center;
    z-index: 223;
    opacity: 0;
    transition: opacity .22s ease, transform .22s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,.55);
}

    .receipt-modal.is-open {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

.receipt-check {
    width: 60px;
    height: 60px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: rgba(var(--bull-rgb, 23, 199, 135), .14);
    color: var(--bull, #17C787);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: receiptPop .5s var(--ease, ease) both;
}

@keyframes receiptPop {
    from {
        transform: scale(.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.receipt-title {
    font-size: 17px;
    color: var(--text, #E7EAEE);
    margin: 0 0 6px;
}

.receipt-sub {
    font-size: 12.5px;
    color: var(--muted, #8A93A3);
    margin: 0 0 18px;
}

.receipt-rows {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 20px;
    text-align: right;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
    color: var(--text, #E7EAEE);
}

    .receipt-row span {
        color: var(--muted, #8A93A3);
    }

    .receipt-row b {
        font-family: var(--font-mono, monospace);
        font-weight: 700;
    }

    .receipt-row.is-total {
        border-top: 1px dashed var(--border, #232A35);
        padding-top: 10px;
        font-size: 14px;
    }

        .receipt-row.is-total b {
            color: var(--gold, #E8B923);
        }
