/* Auth — split login layout */
.auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font, "Inter", system-ui, sans-serif);
    background: #fff;
    overflow-x: hidden;
}

.auth-split {
    display: grid;
    grid-template-columns: minmax(320px, 42%) 1fr;
    min-height: 100vh;
}

.auth-form-panel {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    background: #fff;
}

.auth-form-inner {
    width: min(100%, 400px);
}

.auth-logo {
    display: inline-block;
    margin-bottom: 2.5rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0a0a0a;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.auth-logo-colon {
    color: #ff3b30;
}

.auth-title {
    margin: 0 0 0.5rem;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0a0a0a;
}

.auth-lead {
    margin: 0 0 1.75rem;
    font-size: 1rem;
    color: #6b7280;
}

.auth-alert {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    font-size: 0.88rem;
}

.auth-alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.auth-alert-success {
    background: #ecfdf5;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.auth-alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    margin-bottom: 1.5rem;
}

.auth-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.auth-google-btn:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.35rem 0;
    color: #9ca3af;
    font-size: 0.82rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.auth-form {
    display: grid;
    gap: 1rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.auth-field {
    margin: 0;
}

.auth-field input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font: inherit;
    font-size: 0.95rem;
    background: #fff;
    color: #111;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.auth-field input::placeholder {
    color: #9ca3af;
}

.auth-field input:hover {
    border-color: #d1d5db;
}

.auth-field input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.auth-forgot-wrap {
    text-align: right;
    margin-top: -0.25rem;
}

.auth-forgot {
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-forgot:hover {
    color: #111;
}

.auth-submit {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.95rem 1.25rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    background: #0a0a0a !important;
    color: #fff !important;
    border: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.2s;
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.auth-switch {
    margin: 1.75rem 0 0;
    text-align: center;
    font-size: 0.9rem;
    color: #6b7280;
}

.auth-switch a {
    font-weight: 600;
    color: #0a0a0a;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-home-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
    padding: 0.8rem 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.2s;
}

.auth-home-btn:hover {
    border-color: #d1d5db;
    background: #f9fafb;
    color: #111;
    transform: translateY(-1px);
}

.auth-home-btn svg {
    flex-shrink: 0;
    opacity: 0.75;
}

/* Visual panel */
.auth-visual-panel {
    position: relative;
    background: #fafafa;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
}

.auth-visual-panel-compact {
    background: linear-gradient(135deg, #faf8fc 0%, #f3e8ff 50%, #fff0f3 100%);
    align-items: center;
    justify-content: center;
}

.auth-mosaic {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 6px;
    padding: 6px;
}

.auth-tile {
    border-radius: 8px;
    display: grid;
    place-items: center;
    opacity: 0;
    transform: scale(0.85);
    animation: authTileIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(0.15s + var(--tile-delay, 0) * 45ms);
}

.auth-tile-hero {
    grid-column: span 2;
    grid-row: span 2;
    border-radius: 50% 50% 12px 12px;
    overflow: hidden;
}

@keyframes authTileIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.auth-tile-avatar {
    width: 56%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-shape {
    display: block;
    background: rgba(255, 255, 255, 0.85);
}

.auth-shape-star {
    width: 28px;
    height: 28px;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.auth-shape-diamond {
    width: 32px;
    height: 32px;
    transform: rotate(45deg);
    border-radius: 4px;
}

.auth-shape-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.auth-shape-semi {
    width: 48px;
    height: 24px;
    border-radius: 48px 48px 0 0;
}

.auth-tile-hero-art {
    position: relative;
    width: 80%;
    height: 70%;
    animation: authHeroFloat 5s ease-in-out infinite;
}

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

.auth-key {
    position: absolute;
    bottom: 15%;
    left: 10%;
    width: 55%;
    height: 28%;
    background: linear-gradient(180deg, #e5e7eb, #9ca3af);
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.auth-key::before {
    content: "";
    position: absolute;
    top: -40%;
    left: 5%;
    width: 18%;
    height: 50%;
    background: inherit;
    border-radius: 3px;
}

.auth-block {
    position: absolute;
    border-radius: 6px;
    animation: authBlockBob 4s ease-in-out infinite;
}

.auth-block-1 {
    width: 22%;
    height: 22%;
    top: 8%;
    right: 15%;
    background: #f472b6;
    animation-delay: 0s;
}

.auth-block-2 {
    width: 18%;
    height: 18%;
    top: 25%;
    right: 5%;
    background: #60a5fa;
    animation-delay: -1s;
}

.auth-block-3 {
    width: 20%;
    height: 20%;
    top: 5%;
    left: 35%;
    background: #34d399;
    animation-delay: -2s;
}

@keyframes authBlockBob {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(5deg); }
}

.auth-visual-copy {
    position: relative;
    z-index: 2;
    max-width: 380px;
    padding: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: authCopyIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards;
}

.auth-visual-copy-centered {
    text-align: center;
    max-width: 420px;
    animation: authCopyIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

@keyframes authCopyIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-visual-copy h2 {
    margin: 0 0 0.65rem;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0a0a0a;
    line-height: 1.2;
}

.auth-visual-copy p {
    margin: 0;
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.5;
}

/* Form entrance animations — visible by default; animate when JS adds is-ready */
[data-auth-animate] {
    opacity: 1;
    transform: none;
}

.auth-form-inner:not(.is-ready) [data-auth-animate] {
    opacity: 0;
    transform: translateY(16px);
}

.auth-form-inner.is-ready [data-auth-animate] {
    animation: authFormIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.auth-form-inner.is-ready [data-auth-delay="1"] { animation-delay: 0.08s; }
.auth-form-inner.is-ready [data-auth-delay="2"] { animation-delay: 0.16s; }
.auth-form-inner.is-ready [data-auth-delay="3"] { animation-delay: 0.24s; }
.auth-form-inner.is-ready [data-auth-delay="4"] { animation-delay: 0.32s; }
.auth-form-inner.is-ready [data-auth-delay="5"] { animation-delay: 0.4s; }
.auth-form-inner.is-ready [data-auth-delay="6"] { animation-delay: 0.48s; }
.auth-form-inner.is-ready [data-auth-delay="7"] { animation-delay: 0.56s; }
.auth-form-inner.is-ready [data-auth-delay="8"] { animation-delay: 0.64s; }

@keyframes authFormIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toast */
.auth-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 400;
    padding: 0.75rem 1.25rem;
    background: #0a0a0a;
    color: #fff;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-toast.is-shown {
    transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media (max-width: 960px) {
    .auth-split {
        grid-template-columns: 1fr;
    }

    .auth-visual-panel {
        min-height: 280px;
        order: -1;
        padding: 1.5rem;
    }

    .auth-mosaic {
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }

    .auth-tile-hero {
        display: none;
    }

    .auth-visual-copy h2 {
        font-size: 1.35rem;
    }
}

@media (max-width: 480px) {
    .auth-form-panel {
        padding: 1.5rem 1.25rem;
    }

    .auth-logo {
        margin-bottom: 1.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-tile,
    [data-auth-animate],
    .auth-visual-copy {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .auth-tile-hero-art,
    .auth-block {
        animation: none;
    }
}
