body.auth-page {
    font-family: 'Geist', system-ui, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow-x: hidden;
    background-color: #f8fafc;
    background-image:
        radial-gradient(at 18% 22%, rgba(99, 137, 255, 0.22) 0px, transparent 55%),
        radial-gradient(at 82% 18%, rgba(45, 100, 245, 0.18) 0px, transparent 52%),
        radial-gradient(at 78% 85%, rgba(147, 197, 253, 0.28) 0px, transparent 58%),
        radial-gradient(at 12% 88%, rgba(59, 130, 246, 0.14) 0px, transparent 55%),
        radial-gradient(at 50% 50%, rgba(224, 231, 255, 0.35) 0px, transparent 70%);
}

body.auth-page::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(15, 23, 42, 0.05) 1px, transparent 0);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, transparent 70%);
}

.auth-wrapper {
    width: 100%;
    max-width: 24rem;
    position: relative;
    z-index: 1;
    background-color: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 1rem;
    padding: 2rem 1.75rem;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 12px 32px -8px rgba(15, 23, 42, 0.12),
        0 24px 48px -12px rgba(59, 130, 246, 0.08);
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
    margin-bottom: 0.5rem;
}

.auth-back:hover {
    color: var(--foreground, #0f172a);
}

.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.auth-logo img {
    height: 4rem;
    width: 4rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 0.25rem;
}

.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.auth-header p {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Animated emoji in the auth subtitle (👋 on sign-in, 🚀 on sign-up) */
.auth-emoji {
    display: inline-block;
    font-size: 1.05em;
    line-height: 1;
    transform-origin: 70% 80%;
    will-change: transform;
}

.auth-emoji--wave {
    transform-origin: 70% 80%;
    animation: emojiWave 2.6s ease-in-out infinite;
}

.auth-emoji--rocket {
    transform-origin: 50% 80%;
    animation: emojiRocket 2.8s ease-in-out infinite;
}

@keyframes emojiWave {
    0%, 55%, 100% { transform: rotate(0deg); }
    60% { transform: rotate(14deg); }
    68% { transform: rotate(-8deg); }
    76% { transform: rotate(14deg); }
    84% { transform: rotate(-4deg); }
    92% { transform: rotate(10deg); }
}

@keyframes emojiRocket {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    45% { transform: translateY(-5px) rotate(-10deg); }
    70% { transform: translateY(-2px) rotate(-4deg); }
}

@media (prefers-reduced-motion: reduce) {
    .auth-emoji {
        animation: none;
    }
}

.auth-form {
    margin-top: 1.5rem;
}

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.name-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.password-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.forgot-link {
    font-size: 0.75rem;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    font-size: 0.875rem;
    margin-top: 1.5rem;
}

.auth-footer a {
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.copyright {
    text-align: center;
    font-size: 0.75rem;
    margin-top: 1.5rem;
}

.loading-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-message {
    margin-top: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.5;
    text-align: center;
}

.auth-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.resend-form {
    margin-top: 0.75rem;
}

.resend-form button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 0.8125rem;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.verify-mail {
    position: relative;
    width: 4rem;
    height: 4rem;
    margin: 1rem auto 0.25rem;
}

.verify-mail__icon {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 1rem;
    background: linear-gradient(160deg, #ffffff, #f4f4f5);
    border: 1px solid #e4e4e7;
    color: #18181b;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 6px 18px -8px rgba(24, 24, 27, 0.25);
    animation: mailFloat 3.2s ease-in-out infinite;
}

/* Glossy highlight sweeping diagonally across the envelope */
.verify-mail__icon::after {
    content: "";
    position: absolute;
    top: -60%;
    left: -130%;
    width: 55%;
    height: 220%;
    transform: rotate(8deg);
    background: linear-gradient(
        115deg,
        transparent 0%,
        rgba(255, 255, 255, 0.9) 50%,
        transparent 100%
    );
    animation: mailShine 3.6s ease-in-out infinite;
}

.verify-mail__spark {
    position: absolute;
    color: #f5b740;
    opacity: 0;
    animation: mailSparkle 2.1s ease-in-out infinite;
    filter: drop-shadow(0 0 3px rgba(245, 183, 64, 0.65));
    pointer-events: none;
}

.verify-mail__spark svg {
    display: block;
    width: 100%;
    height: 100%;
}

.verify-mail__spark--1 {
    top: -9px;
    right: -8px;
    width: 17px;
    height: 17px;
    animation-delay: 0s;
}

.verify-mail__spark--2 {
    top: 8px;
    right: -15px;
    width: 11px;
    height: 11px;
    animation-delay: 0.55s;
}

.verify-mail__spark--3 {
    top: -15px;
    right: 16px;
    width: 9px;
    height: 9px;
    animation-delay: 1.1s;
}

@keyframes mailFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes mailShine {
    0%, 55% { left: -130%; }
    100% { left: 150%; }
}

@keyframes mailSparkle {
    0%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); }
    40% { opacity: 1; transform: scale(1) rotate(25deg); }
    70% { opacity: 0.55; transform: scale(0.78) rotate(12deg); }
}

@media (prefers-reduced-motion: reduce) {
    .verify-mail__icon,
    .verify-mail__icon::after,
    .verify-mail__spark {
        animation: none;
    }
    .verify-mail__spark {
        opacity: 1;
    }
}

.verify-email {
    color: #18181b;
    font-weight: 500;
    word-break: break-word;
}

.verify-resent {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 0.875rem;
    font-size: 0.8125rem;
    color: #52525b;
}

.resend-prompt {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 1.25rem;
    font-size: 0.8125rem;
}

.resend-prompt .resend-form {
    margin-top: 0;
}

.resend-prompt .resend-form button {
    color: #18181b;
    font-weight: 500;
    text-underline-offset: 2px;
}

.resend-prompt .resend-form button:hover {
    color: #000000;
}

.invite-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.875rem;
    border-radius: 0.75rem;
    background:
        linear-gradient(135deg, rgba(99, 137, 255, 0.08), rgba(59, 130, 246, 0.04)),
        #ffffff;
    border: 1px solid rgba(59, 130, 246, 0.18);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.invite-banner-icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 4px 10px -2px rgba(59, 130, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    overflow: hidden;
}

.invite-banner-icon--logo {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    padding: 0;
}

.invite-banner-icon--logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.invite-banner-content {
    min-width: 0;
    line-height: 1.25;
}

.invite-banner-label {
    font-size: 0.6875rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.invite-banner-org {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0.125rem 0 0;
    letter-spacing: -0.01em;
    word-break: break-word;
}
