:root {
    --sub-purple: #6C63FF;
    --sub-cyan: #00D4FF;
    --sub-dark: #111827;
}

.sub-glass {
    background: linear-gradient(145deg, rgba(108, 99, 255, 0.12), rgba(0, 212, 255, 0.08));
    border: 1px solid rgba(108, 99, 255, 0.28);
    border-radius: 20px;
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 50px rgba(17, 24, 39, 0.18);
}

.sub-activate-page {
    max-width: 520px;
    margin: 40px auto 80px;
    padding: 0 16px;
}

.sub-activate-card {
    padding: 36px 28px;
}

.sub-activate-card h1 {
    margin: 0 0 8px;
    font-size: 1.7rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--sub-purple), var(--sub-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sub-activate-card .sub {
    color: var(--gray-500);
    margin-bottom: 24px;
    line-height: 1.7;
}

.sub-activate-card label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}

.sub-activate-card input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(108, 99, 255, 0.25);
    font: inherit;
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.7);
    margin-bottom: 16px;
}

[data-theme="dark"] .sub-activate-card input[type="text"] {
    background: rgba(17, 24, 39, 0.55);
    color: #fff;
}

.sub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: transform .15s, filter .15s;
}

.sub-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }

.sub-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--sub-purple), #4f46e5 50%, var(--sub-cyan));
    box-shadow: 0 12px 28px rgba(108, 99, 255, 0.35);
}

.sub-btn-whatsapp {
    margin-top: 12px;
    color: #fff;
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.sub-btn-ghost {
    margin-top: 12px;
    background: transparent;
    border: 1px solid rgba(108, 99, 255, 0.3);
    color: inherit;
}

.sub-plan-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    background: rgba(108, 99, 255, 0.12);
    color: var(--sub-purple);
}

.sub-plan-chip.is-pro {
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.2), rgba(0, 212, 255, 0.2));
    color: #4f46e5;
}

.sub-alert {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    white-space: pre-line;
    font-weight: 600;
}

.sub-alert-success {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.sub-alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.sub-account-card {
    padding: 22px;
    margin-bottom: 20px;
}

.sub-account-card h2 {
    margin: 0 0 14px;
    font-size: 1.15rem;
    font-weight: 800;
}

.sub-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.95rem;
}

[data-theme="dark"] .sub-meta-row {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.sub-meta-row:last-child { border-bottom: none; }

.sub-usage-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(108, 99, 255, 0.12);
    overflow: hidden;
    margin-top: 6px;
}

.sub-usage-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--sub-purple), var(--sub-cyan));
}

/* Upgrade modal */
.sub-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(17, 24, 39, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(6px);
}

.sub-modal-overlay.is-open { display: flex; }

.sub-modal {
    width: min(440px, 100%);
    padding: 28px 24px;
    border-radius: 20px;
    background: linear-gradient(160deg, #1a1f35, #111827);
    color: #fff;
    border: 1px solid rgba(108, 99, 255, 0.35);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    animation: subPop .28s ease;
}

@keyframes subPop {
    from { opacity: 0; transform: translateY(12px) scale(.97); }
    to { opacity: 1; transform: none; }
}

.sub-modal h3 {
    margin: 0 0 10px;
    font-size: 1.35rem;
    font-weight: 900;
}

.sub-modal p {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.75);
    white-space: pre-line;
    line-height: 1.7;
}

.sub-modal .sub-btn { margin-top: 10px; }

.sub-modal-close {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,.7);
    font-size: 1.4rem;
    cursor: pointer;
}

.sub-modal { position: relative; }
