﻿/* ══════════════════════════════════════════════════════════════════
   AUTH — Register, Login, Verify Email, Account, Change Password
   ══════════════════════════════════════════════════════════════════ */

/* ── Auth Page Layout ────────────────────────────────────────────── */
.auth-page {
    min-height: calc(100vh - var(--nav-height) - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: var(--cream);
}

.auth-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 24px rgba(26,50,99,0.12);
    width: 100%;
    max-width: 460px;
    overflow: hidden;
}

/* ── Auth Header — navy solid ────────────────────────────────────── */
.auth-header {
    background: var(--navy);
    padding: 2rem 2rem 1.75rem;
    text-align: center;
    color: white;
}

    .auth-header h2 {
        font-size: 1.5rem;
        font-weight: 800;
        margin-bottom: 0.3rem;
        color: white;
    }

    .auth-header p {
        font-size: 0.875rem;
        color: rgba(255,255,255,0.75);
    }

/* ── Auth Form ───────────────────────────────────────────────────── */
.auth-form {
    padding: 1.75rem 2rem;
}

    .auth-form .form-group {
        margin-bottom: 1.1rem;
    }

        .auth-form .form-group label {
            display: block;
            font-size: 0.82rem;
            font-weight: 600;
            color: var(--text-muted);
            margin-bottom: 0.4rem;
        }

/* ── Consent Checkboxes ──────────────────────────────────────────── */
.consent-section {
    background: rgba(26,50,99,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.consent-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

    .consent-item input[type="checkbox"] {
        margin-top: 3px;
        width: 16px;
        height: 16px;
        accent-color: var(--navy);
        flex-shrink: 0;
        cursor: pointer;
    }

    .consent-item label {
        font-size: 0.82rem;
        color: var(--text-muted);
        line-height: 1.5;
        cursor: pointer;
    }

        .consent-item label a {
            color: var(--navy);
            text-decoration: underline;
            font-weight: 600;
        }

/* ── Auth Primary Button (full width) ───────────────────────────── */
.btn-primary.btn-block {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--navy);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

    .btn-primary.btn-block:hover:not(:disabled) {
        background: var(--navy-dark);
        transform: translateY(-1px);
        box-shadow: var(--shadow);
    }

    .btn-primary.btn-block:disabled {
        opacity: 0.65;
        cursor: not-allowed;
        transform: none;
    }

/* ── Inline link button ──────────────────────────────────────────── */
.btn-link {
    background: none;
    border: none;
    color: var(--navy);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-decoration: underline;
    padding: 0;
}

    .btn-link:hover {
        color: var(--steel);
    }

    .btn-link:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* ── Auth Footer ─────────────────────────────────────────────────── */
.auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

    .auth-footer a {
        color: var(--navy);
        font-weight: 700;
        text-decoration: underline;
    }

        .auth-footer a:hover {
            color: var(--steel);
        }

/* ── Verify Email ────────────────────────────────────────────────── */
.verify-icon {
    font-size: 4rem;
    margin: 0 auto 0.5rem;
    width: fit-content;
}

.verify-success {
    color: #16a34a;
}

.verify-error {
    color: #dc2626;
}

/* ── Account Page ────────────────────────────────────────────────── */
.account-page {
    padding: 2rem 1rem;
    min-height: calc(100vh - var(--nav-height) - 60px);
    background: var(--cream);
}

.account-container {
    max-width: 600px;
    margin: 0 auto;
}

/* Account Header — navy solid */
.account-header {
    background: var(--navy);
    border-radius: var(--radius);
    padding: 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    color: white;
    box-shadow: 0 4px 16px rgba(26,50,99,0.2);
}

.account-avatar {
    font-size: 3.5rem;
    color: rgba(255,255,255,0.9);
    flex-shrink: 0;
    line-height: 1;
}

.account-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.2rem;
}

.account-info .text-muted {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.5rem;
}

.account-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-card);
}

    .account-card h5 {
        font-size: 1rem;
        font-weight: 700;
        color: var(--navy);
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

.subscription-info {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.sub-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--cream);
    font-size: 0.9rem;
}

    .sub-row:last-child {
        border-bottom: none;
    }

    .sub-row span:first-child {
        color: var(--text-muted);
        font-weight: 500;
    }

    .sub-row strong {
        color: var(--navy);
    }

/* ── Package Badges ──────────────────────────────────────────────── */
.package-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.package-free {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.4);
}

.package-monthly {
    background: rgba(250,185,91,0.2);
    color: var(--gold);
    border: 1px solid rgba(250,185,91,0.5);
}

.package-yearly {
    background: rgba(250,185,91,0.9);
    color: var(--navy);
    border: 1px solid var(--gold);
}

.package-badge-sm {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
}

/* ── Upgrade Button — Gold ───────────────────────────────────────── */
.btn-upgrade {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.6rem 1.4rem;
    background: var(--gold);
    color: var(--navy);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    text-decoration: none;
}

    .btn-upgrade:hover {
        background: var(--gold-dark);
        transform: translateY(-1px);
        box-shadow: var(--shadow);
        color: var(--navy);
    }

/* ── Logout Button — Primary ─────────────────────────────────────── */
.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    background: var(--navy);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

    .btn-logout:hover {
        background: var(--navy-dark);
        transform: translateY(-1px);
        box-shadow: var(--shadow);
    }

/* ── Change Password ─────────────────────────────────────────────── */
.change-password-section {
    margin-top: 0;
}

.form-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.25rem 0;
}

/* ── Responsive Auth ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .auth-card {
        border-radius: var(--radius-sm);
    }

    .auth-header {
        padding: 1.5rem;
    }

    .auth-form {
        padding: 1.25rem;
    }

    .account-header {
        flex-direction: column;
        text-align: center;
    }
}
