/* ===== PRICING PAGE — Clean neutral light theme ===== */

[data-theme="pricing"] {
    --bg-primary: #f8f8fb;
    --bg-secondary: #f0f0f6;
    --bg-card: #ffffff;
    --text-primary: #0e0e14;
    --text-secondary: #555570;
    --text-muted: #9494b0;
    --border-subtle: rgba(0, 0, 0, 0.08);
    --accent-cyan: #4f46e5;
}

[data-theme="pricing"] body {
    background: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme="pricing"] .nav {
    background: rgba(248, 248, 251, 0.88);
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

[data-theme="pricing"] .nav.scrolled {
    background: rgba(248, 248, 251, 0.97);
}

[data-theme="pricing"] .nav-links a {
    color: #555570;
}

[data-theme="pricing"] .nav-links a:hover {
    color: #0e0e14;
}

[data-theme="pricing"] .nav-links a::after {
    background: #4f46e5;
}

[data-theme="pricing"] .footer {
    border-top-color: rgba(0, 0, 0, 0.08);
}

/* ── Page layout ── */
.pricing-page {
    padding: 9rem 2rem 5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* ── Hero ── */
.pricing-hero {
    text-align: center;
    margin-bottom: 4rem;
}

.pricing-hero-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: #4f46e5;
    margin-bottom: 1.25rem;
}

.pricing-hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #0e0e14;
    margin-bottom: 1.25rem;
}

.pricing-hero-sub {
    font-size: 1.05rem;
    color: #555570;
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.75;
}

/* ── Subscription management panel ── */
.sub-manage {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.09);
    border-radius: 18px;
    padding: 2rem 2rem 1.75rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
}

.sub-manage-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.sub-manage-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #4f46e5;
    margin-bottom: 0.5rem;
}

.sub-manage-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0e0e14;
    margin: 0 0 0.35rem;
    letter-spacing: -0.01em;
}

.sub-manage-sub {
    font-size: 0.88rem;
    color: #555570;
    margin: 0;
    line-height: 1.5;
}

.sub-status-pill {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
    white-space: nowrap;
}

.sub-status-pill.status-cancelled { background: rgba(220, 38, 38, 0.1); color: #dc2626; }
.sub-status-pill.status-paused    { background: rgba(234, 179, 8, 0.15); color: #b45309; }
.sub-status-pill.status-halted    { background: rgba(220, 38, 38, 0.15); color: #b91c1c; }

.sub-manage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1.25rem;
    background: #f8f8fb;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.sub-manage-stat-label {
    font-size: 0.72rem;
    color: #9494b0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
}

.sub-manage-stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: #0e0e14;
}

.sub-pending-banner {
    padding: 0.85rem 1rem;
    background: rgba(79, 70, 229, 0.06);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #4338ca;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.sub-manage-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.sub-action-btn {
    padding: 0.65rem 1.1rem;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #0e0e14;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.sub-action-btn:hover {
    background: #f4f4f8;
    border-color: rgba(0, 0, 0, 0.25);
}

.sub-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sub-action-danger {
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.25);
}

.sub-action-danger:hover {
    background: rgba(220, 38, 38, 0.05);
    border-color: #dc2626;
}

/* Drawers */
.sub-drawer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.sub-drawer-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0e0e14;
    margin-bottom: 1rem;
}

.sub-drawer-options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.sub-plan-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    background: #f8f8fb;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.18s;
}

.sub-plan-option:hover {
    background: #fff;
    border-color: rgba(79, 70, 229, 0.35);
}

.sub-plan-option.current {
    background: #fff;
    border-color: rgba(22, 163, 74, 0.3);
    cursor: default;
    opacity: 0.7;
}

.sub-plan-option-info { font-size: 0.9rem; color: #0e0e14; font-weight: 600; }
.sub-plan-option-meta { font-size: 0.78rem; color: #9494b0; margin-top: 0.15rem; font-weight: 400; }
.sub-plan-option-price { font-family: var(--font-mono); font-size: 0.85rem; color: #4f46e5; font-weight: 600; }

.sub-drawer-note {
    font-size: 0.78rem;
    color: #9494b0;
    line-height: 1.55;
}

.sub-invoices-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.sub-invoice-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    padding: 0.65rem 0.85rem;
    background: #f8f8fb;
    border-radius: 6px;
    align-items: center;
}

.sub-invoice-date  { color: #0e0e14; }
.sub-invoice-plan  { color: #9494b0; font-size: 0.78rem; }
.sub-invoice-amt   { font-family: var(--font-mono); color: #4f46e5; font-weight: 600; }
.sub-invoices-empty { color: #9494b0; font-size: 0.85rem; padding: 1rem 0; text-align: center; }

@media (max-width: 700px) {
    .sub-manage-grid { grid-template-columns: 1fr; }
}

/* ── Plans grid ── */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: start;
}

/* ── Plan card ── */
.plan-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.09);
    border-radius: 18px;
    padding: 2.2rem 2rem 2rem;
    position: relative;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.plan-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

/* ── Active (subscribed) card ── */
.plan-card.plan-active {
    border-color: rgba(22, 163, 74, 0.4);
    box-shadow: 0 4px 24px rgba(22, 163, 74, 0.12);
}

.plan-active-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: #16a34a;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    white-space: nowrap;
}

.plan-renews {
    font-size: 0.78rem;
    color: #16a34a;
    margin: 0 0 1.25rem;
    text-align: center;
}

.btn-subscribe-active {
    background: rgba(22, 163, 74, 0.08) !important;
    border-color: rgba(22, 163, 74, 0.35) !important;
    color: #16a34a !important;
    cursor: default !important;
}

.plan-active-badge-cancelled {
    background: #dc2626 !important;
}

.btn-cancel-sub {
    display: block;
    width: 100%;
    margin-top: 0.6rem;
    padding: 0.7rem;
    background: transparent;
    border: 1px solid rgba(220, 38, 38, 0.25);
    color: #dc2626;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel-sub:hover {
    background: rgba(220, 38, 38, 0.06);
    border-color: #dc2626;
}

.btn-cancel-sub:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Featured card ── */
.plan-card.plan-featured {
    border-color: rgba(79, 70, 229, 0.35);
    box-shadow: 0 4px 24px rgba(79, 70, 229, 0.1);
}

.plan-card.plan-featured:hover {
    box-shadow: 0 12px 40px rgba(79, 70, 229, 0.18);
}

.plan-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: #4f46e5;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    white-space: nowrap;
}

/* ── Plan header ── */
.plan-header {
    margin-bottom: 1.75rem;
}

.plan-tier {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #4f46e5;
    margin-bottom: 0.75rem;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.plan-amount {
    font-size: 2.6rem;
    font-weight: 800;
    color: #0e0e14;
    letter-spacing: -0.02em;
    line-height: 1;
}

.plan-period {
    font-size: 0.9rem;
    color: #9494b0;
}

.plan-tagline {
    font-size: 0.9rem;
    color: #555570;
    line-height: 1.6;
    margin: 0;
}

/* ── Features list ── */
.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: #444460;
    line-height: 1.5;
}

.feat-check {
    color: #4f46e5;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.plan-card.plan-featured .feat-check {
    color: #4f46e5;
}

/* ── Subscribe buttons ── */
.btn-subscribe {
    display: block;
    width: 100%;
    padding: 0.9rem;
    background: transparent;
    border: 1.5px solid rgba(79, 70, 229, 0.35);
    color: #4f46e5;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-subscribe:hover {
    background: rgba(79, 70, 229, 0.06);
    border-color: #4f46e5;
}

.btn-subscribe-featured {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}

.btn-subscribe-featured:hover {
    background: #4338ca;
    border-color: #4338ca;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.3);
}

/* ── Footer note ── */
.pricing-note {
    text-align: center;
    font-size: 0.82rem;
    color: #9494b0;
    margin-top: 2.5rem;
    line-height: 1.7;
}

/* ── Email gate modal ── */
.email-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(14, 14, 20, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.email-modal.open {
    display: flex;
}

.email-modal-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 18px;
    padding: 2.5rem 2.2rem 2.2rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.email-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #9494b0;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    padding: 0;
}

.email-modal-close:hover { color: #0e0e14; }

.email-modal-icon {
    width: 54px;
    height: 54px;
    background: rgba(79, 70, 229, 0.08);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    color: #4f46e5;
}

.email-modal-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0e0e14;
    margin-bottom: 0.6rem;
}

.email-modal-card p {
    font-size: 0.9rem;
    color: #555570;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.email-input {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: #f8f8fb;
    color: #0e0e14;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    margin-bottom: 0.75rem;
    font-family: var(--font-sans);
}

.email-input:focus {
    border-color: #4f46e5;
    background: #fff;
}

.email-error {
    font-size: 0.82rem;
    color: #dc2626;
    margin-bottom: 0.75rem;
    min-height: 1.1rem;
    text-align: left;
}

.btn-proceed {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.9rem;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.btn-proceed:hover {
    background: #4338ca;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.3);
}

.btn-proceed:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ── Spinner animation ── */
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-top-color: #0e0e14;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 0.5rem;
    animation: spin 0.8s linear infinite;
}

/* ── Auth error message ── */
.auth-error-msg {
    margin-top: 0.75rem;
    font-size: 0.82rem;
    color: #dc2626;
    text-align: left;
    line-height: 1.5;
}

/* ── Success modal ── */
.success-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .plans-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 0 auto;
    }

    .plan-card.plan-featured {
        order: -1;
    }
}

@media (max-width: 600px) {
    .pricing-page {
        padding: 8rem 1.25rem 4rem;
    }

    .pricing-hero-title {
        font-size: 1.8rem;
    }

    .plan-amount {
        font-size: 2.1rem;
    }
}

/* ── Auth gate ── */
.auth-gate {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.auth-gate-card {
    background: #ffffff;
    border: 1.5px solid rgba(0, 0, 0, 0.14);
    border-radius: 18px;
    padding: 2.5rem 2.2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.12);
}

.auth-gate-icon {
    width: 54px;
    height: 54px;
    background: rgba(79, 70, 229, 0.08);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    color: #4f46e5;
}

.auth-gate-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0e0e14;
    margin-bottom: 0.5rem;
}

.auth-gate-card p {
    font-size: 0.9rem;
    color: #555570;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.btn-google-sign-in {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: #ffffff;
    border: 1.5px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #0e0e14;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    font-family: var(--font-sans);
}

.btn-google-sign-in:hover {
    background: #f8f8fb;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* ── User bar ── */
.user-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2.5rem;
    font-size: 0.9rem;
    color: #555570;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-weight: 500;
    color: #0e0e14;
}

.btn-sign-out {
    background: none;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    color: #9494b0;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    font-family: var(--font-sans);
}

.btn-sign-out:hover {
    color: #0e0e14;
    border-color: rgba(0, 0, 0, 0.25);
}
