@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

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

body {
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 50%, #e0f2fe 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    color: #1e293b;
}

/* ── Logo link ───────────────────────────────────────────────────── */
.auth-logo-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    margin-bottom: 2rem;
}
.auth-logo-link svg { width: 64px; height: 64px; }
.auth-logo-name {
    font-size: 1rem;
    font-weight: 700;
    color: #1e3a8a;
    letter-spacing: -0.01em;
    text-align: center;
}

/* ── Card ────────────────────────────────────────────────────────── */
.auth-card {
    background: #ffffff;
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 10px 40px rgba(30, 58, 138, 0.1), 0 2px 8px rgba(0,0,0,0.06);
}

.auth-card-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e3a8a;
    margin-bottom: 0.35rem;
    text-align: center;
}
.auth-card-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    text-align: center;
    margin-bottom: 1.75rem;
}

/* ── Tabs ────────────────────────────────────────────────────────── */
.auth-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 0.75rem;
    padding: 0.25rem;
    gap: 0.25rem;
    margin-bottom: 2rem;
}
.auth-tab {
    flex: 1;
    padding: 0.6rem;
    border: none;
    background: transparent;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.auth-tab.active {
    background: #ffffff;
    color: #1e3a8a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ── Forms ───────────────────────────────────────────────────────── */
.auth-form { display: none; flex-direction: column; gap: 1.1rem; }
.auth-form.active { display: flex; }

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.auth-field label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e3a8a;
}
.auth-field input {
    padding: 0.75rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.75rem;
    font-family: inherit;
    font-size: 0.95rem;
    color: #1e293b;
    background: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.auth-field input:focus {
    outline: none;
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.auth-field input::placeholder { color: #94a3b8; }

/* ── Submit button ───────────────────────────────────────────────── */
.auth-submit {
    margin-top: 0.5rem;
    padding: 0.85rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    border-radius: 0.75rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.auth-submit:hover:not(:disabled) {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}
.auth-submit:active:not(:disabled) { opacity: 1; transform: none; }
.auth-submit:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Messages ────────────────────────────────────────────────────── */
.auth-msg {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: none;
    margin-top: 0.5rem;
}
.auth-msg.error {
    display: block;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.auth-msg.success {
    display: block;
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* ── Back link ───────────────────────────────────────────────────── */
.auth-back {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
}
.auth-back a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}
.auth-back a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
