@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;500;600;700&family=Montserrat:wght@400;500;600;700&display=swap');

/* Career Funeral™ Auth Experience
   Palette
   - Navy (#002B49): Headings / Primary buttons
   - Teal (#2BA6A3): Accents / Focus states
   - Silver (#E0E0E0): Dividers / Muted borders
   - White (#FFFFFF): Cards / Input backgrounds
*/

:root {
    --color-navy: #111827;
    --color-navy-dark: #0b1528;
    --color-teal: #A78BFA;
    --color-teal-soft: rgba(167, 139, 250, 0.16);
    --color-silver: #E0E0E0;
    --color-slate-200: #E2E8F0;
    --color-slate-300: #CBD5E1;
    --color-slate-500: #64748B;
    --color-slate-600: #475569;
    --color-white: #FFFFFF;
    --color-bg: linear-gradient(145deg, rgba(17, 24, 39, 0.06), rgba(167, 139, 250, 0.1)), #f7f9fb;
    --color-error: #DC2626;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    --radius-s: 10px;
    --radius-m: 18px;
    --shadow-soft: 0 20px 48px -24px rgba(17, 24, 39, 0.28);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--color-slate-600);
    background: var(--color-bg);
}

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 3rem);
}

.brand-mark {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--color-navy), var(--color-teal));
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    box-shadow: 0 10px 26px rgba(0,0,0,0.25);
}
.brand-link {
    display: inline-flex;
    text-decoration: none;
}
.brand-link:focus-visible .brand-mark {
    outline: 2px solid var(--color-teal);
    outline-offset: 4px;
}

.auth-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    border-radius: var(--radius-m);
    border: 1px solid rgba(226, 232, 240, 0.75);
    box-shadow: var(--shadow-soft);
    padding: clamp(1.75rem, 4vw, 2.5rem);
    display: grid;
    gap: 1.1rem;
}

.slim-card {
    width: min(520px, 100%);
    margin: 0 auto;
}

.card-head {
    display: flex;
    gap: 0.9rem;
    align-items: center;
}

.auth-card h1 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(1.85rem, 4vw, 2.2rem);
    color: var(--color-navy);
    letter-spacing: -0.015em;
}

.auth-subtitle {
    margin: 0;
    font-size: 1rem;
    color: var(--color-slate-500);
    line-height: 1.6;
}

.auth-alerts {
    display: grid;
    gap: 0.6rem;
}

.auth-alert {
    border-radius: var(--radius-s);
    padding: 0.75rem 1rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.auth-alert--success {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.28);
    color: #065f46;
}

.auth-alert--info, .auth-alert--secondary {
    background: rgba(167, 139, 250, 0.1);
    border-color: rgba(167, 139, 250, 0.25);
    color: #0f172a;
}

.auth-alert--warning {
    background: rgba(251, 191, 36, 0.16);
    border-color: rgba(251, 191, 36, 0.3);
    color: #92400e;
}

.auth-alert--danger, .auth-alert--error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.28);
    color: #7f1d1d;
}

.form-group {
    display: grid;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--color-navy);
    display: block;
    margin-top: 0.65rem;
    margin-bottom: 0.1rem;
}

.form-control {
    border-radius: var(--radius-s);
    border: 1px solid var(--color-slate-300);
    background: var(--color-white);
    padding: 0.85rem 1rem;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-teal);
    box-shadow: 0 0 0 4px var(--color-teal-soft);
}

.form-error {
    color: var(--color-error);
    font-size: 0.9rem;
}

.form-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 1.25rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    border-radius: var(--radius-s);
    border: 1px solid transparent;
    font-weight: 600;
    padding: 0.85rem 1.4rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    text-decoration: none;
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--color-teal-soft);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-navy), var(--color-navy-dark));
    color: var(--color-white);
    box-shadow: 0 16px 32px -18px rgba(0, 43, 73, 0.45);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -20px rgba(0, 43, 73, 0.5);
}

.btn-block {
    width: 100%;
}

.btn-google {
    background: var(--color-white);
    border-color: var(--color-slate-200);
    color: var(--color-slate-600);
}

.btn-google:hover {
    background: rgba(226, 232, 240, 0.35);
    border-color: var(--color-slate-300);
}

.btn-google::before {
    content: "";
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg width='46' height='46' viewBox='0 0 46 46' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cpath d='M23 9c3.5 0 6.65 1.28 9.1 3.38l6.42-6.42C34.48 2.3 29.07 0 23 0 13.94 0 6.06 5.13 2.24 12.6l7.9 6.14C11.9 13.06 16.96 9 23 9Z' fill='%234285F4'/%3E%3Cpath d='M45.1 23.5c0-1.6-.16-3.15-.46-4.65H23v9.07h12.5c-.55 2.8-2.18 5.17-4.65 6.77l7.4 5.73c4.32-3.99 6.85-9.86 6.85-16.92Z' fill='%234285F4'/%3E%3Cpath d='M10.14 27.23a13.7 13.7 0 0 1-.72-4.23c0-1.47.26-2.9.7-4.23l-7.9-6.14A22.92 22.92 0 0 0 0 23c0 3.66.88 7.12 2.44 10.17l7.7-5.94Z' fill='%23FBBC05'/%3E%3Cpath d='M23 46c6.21 0 11.44-2.05 15.25-5.55l-7.4-5.73c-2.05 1.38-4.67 2.19-7.85 2.19-6 0-11.06-4.06-12.86-9.63l-7.9 6.13C6.06 40.86 13.94 46 23 46Z' fill='%2334A853'/%3E%3Cpath d='M0 0h46v46H0Z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.auth-divider {
    position: relative;
    text-align: center;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-slate-500);
    margin: 0.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 38%;
    height: 1px;
    background: rgba(148, 163, 184, 0.4);
}

.auth-divider::before {
    left: 0;
}

.auth-divider::after {
    right: 0;
}

.oauth-actions {
    display: flex;
    flex-direction: column;
}

.auth-footer {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-slate-500);
    text-align: center;
}

.auth-footer a {
    color: var(--color-navy);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-helper {
    background: rgba(226, 232, 240, 0.4);
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: var(--radius-s);
    padding: 0.9rem 1rem;
}

.hint-list {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.35rem;
    color: var(--color-slate-600);
    font-size: 0.95rem;
}

.hint-list li::marker {
    color: var(--color-navy);
}

@media (max-width: 640px) {
    .auth-card {
        padding: 1.5rem;
        gap: 1rem;
    }

    .form-actions {
        justify-content: center;
    }

    .oauth-actions .btn {
        width: 100%;
    }
}

/* "Did you mean …?" fix under the email field (app/auth/code_guard.py) */
.suggest-fix {
    display: inline-flex; align-self: flex-start; width: auto; align-items: center; margin-top: 0.5rem; padding: 0.35rem 0.8rem;
    border: 1px solid var(--color-teal); border-radius: 999px; background: var(--color-teal-soft);
    color: var(--color-navy); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.suggest-fix:hover { background: rgba(167, 139, 250, 0.26); }
.suggest-fix:focus-visible { outline: 2px solid var(--color-teal); outline-offset: 2px; }
