/* ===================================
   Auth & Pricing Page Styles
   =================================== */

/* Auth Pages */
.auth-page {
    background: var(--color-bg);
    min-height: 100vh;
}

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 70px);
    margin-top: 70px;
    padding: var(--space-xl);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.auth-subtitle {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
}

/* Alerts */
.auth-alert {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    margin-bottom: var(--space-lg);
}

.auth-alert.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

.auth-alert.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #059669;
}

.auth-alert svg {
    flex-shrink: 0;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
}

.form-input {
    padding: 0.75rem var(--space-md);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--color-text);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-muted);
}

.form-input::placeholder {
    color: var(--color-text-faint);
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 0.75rem;
    font-size: 1rem;
}

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
    font-size: 0.9375rem;
    color: var(--color-text-muted);
}

.auth-footer a {
    color: var(--color-primary);
    font-weight: 500;
}

.auth-footer a:hover {
    color: var(--color-primary-dark);
}

/* Nav user display */
.nav-user {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
}

a.nav-user:hover {
    color: var(--color-primary);
}


/* ===================================
   Account Page
   =================================== */

.account-card {
    width: 100%;
    max-width: 500px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-lg);
}

.account-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-xl);
}

.account-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.account-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
}

.account-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.account-value {
    font-size: 0.9375rem;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.account-upgrade-link {
    font-size: 0.8125rem;
    color: var(--color-primary);
    font-weight: 500;
}

.account-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.account-section-desc {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.change-password-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.change-password-form .btn {
    align-self: flex-start;
    margin-top: var(--space-xs);
}

/* Danger Zone */
.danger-zone {
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.danger-title {
    font-size: 1rem;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: var(--space-sm);
}

.danger-description {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.btn-danger {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.delete-confirm {
    padding: var(--space-lg);
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
}

.delete-warning {
    font-size: 0.875rem;
    color: #991b1b;
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.delete-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
}

.hidden {
    display: none !important;
}

.nav-pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    background: linear-gradient(135deg, #7c3aed, #6366f1);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.nav-pro-badge.oneoff {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
}


/* ===================================
   Pricing Page
   =================================== */

.pricing-main {
    margin-top: 70px;
    padding: var(--space-3xl) var(--space-xl) var(--space-xl);
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.pricing-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.pricing-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.pricing-subtitle {
    font-size: 1.0625rem;
    color: var(--color-text-muted);
    max-width: 520px;
    margin: 0 auto;
}

.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: stretch;
}

.pricing-grid.three-col {
    grid-template-columns: 1fr 1.15fr 1fr;
}

/* Pricing Card */
.pricing-card {
    position: relative;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    box-shadow: var(--shadow-lg);
}

.pricing-card.pro {
    border-color: var(--color-primary);
    border-width: 2px;
    box-shadow: var(--shadow-xl);
}

.pricing-card.oneoff {
    border-color: #f59e0b;
    border-width: 2px;
}

/* Card Badge (shared between Pro and One-Off) */
.card-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px;
    background: linear-gradient(135deg, #7c3aed, #6366f1);
    color: white;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    white-space: nowrap;
}

.card-badge.oneoff-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Keep legacy .pro-badge working */
.pro-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px;
    background: linear-gradient(135deg, #7c3aed, #6366f1);
    color: white;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.pricing-card-header {
    text-align: center;
    margin-bottom: var(--space-md);
}

.plan-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: var(--space-xs);
}

.price-amount {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.price-period {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
}

.plan-billing-note {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
    font-weight: 500;
}

.plan-audience {
    font-size: 0.8125rem;
    color: var(--color-text-faint);
    margin-top: var(--space-xs);
}

.plan-divider {
    height: 1px;
    background: var(--color-border);
    margin: var(--space-md) 0;
}

.plan-description {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

/* Feature List */
.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-xl) 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    flex: 1;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    font-size: 0.9375rem;
    color: var(--color-text);
    line-height: 1.5;
}

.feature-item svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--color-success);
}

.feature-item.excluded {
    color: var(--color-text-faint);
}

.feature-item.excluded svg {
    color: var(--color-text-faint);
}

.feature-item.pro-feature {
    flex-direction: column;
    gap: 2px;
    padding-left: 24px;
    position: relative;
}

.feature-item.pro-feature svg {
    position: absolute;
    left: 0;
    top: 2px;
}

.feature-detail {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

/* One-Off Credit Note */
.oneoff-credit-note {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    color: #92400e;
    line-height: 1.5;
    margin-bottom: var(--space-lg);
}

.oneoff-credit-note svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: #d97706;
}

/* Buttons */
.btn-pro {
    background: linear-gradient(135deg, #7c3aed, #6366f1);
    color: white;
    border-color: #6366f1;
}

.btn-pro:hover:not(:disabled) {
    background: linear-gradient(135deg, #6d28d9, #4f46e5);
    border-color: #4f46e5;
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-pro:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-active-plan {
    cursor: default !important;
    opacity: 0.85;
}

.btn-active-plan:hover {
    transform: none !important;
    box-shadow: none !important;
}

.btn-oneoff {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-color: #d97706;
}

.btn-oneoff:hover:not(:disabled) {
    background: linear-gradient(135deg, #d97706, #b45309);
    border-color: #b45309;
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-oneoff:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}


/* ===================================
   Pricing FAQ
   =================================== */

.pricing-faq {
    margin-top: var(--space-4xl);
    padding-top: var(--space-3xl);
    border-top: 1px solid var(--color-border);
}

.faq-title {
    text-align: center;
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-2xl);
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
}

.faq-item {
    padding: var(--space-lg);
    background: var(--color-bg-muted);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
}

.faq-question {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
    line-height: 1.4;
}

.faq-answer {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}


/* ===================================
   Responsive
   =================================== */

@media (max-width: 900px) {
    .pricing-grid.three-col {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }

    /* On mobile, show Pro card first */
    .pricing-grid.three-col .pricing-card.pro {
        order: -1;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }
}

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

    .auth-card {
        padding: var(--space-xl);
    }

    .pricing-main {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }
}
