/* Infinyte Hub — Auth screens */

:root {
    --auth-primary: #4f46e5;
    --auth-primary-hover: #4338ca;
    --auth-primary-soft: #eef2ff;
    --auth-accent: #22d3ee;
    --auth-ink: #0f172a;
    --auth-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-surface: #ffffff;
    --auth-bg: #f8fafc;
    --auth-danger: #dc2626;
    --auth-danger-bg: #fef2f2;
    --auth-success: #047857;
    --auth-success-bg: #ecfdf5;
    --auth-radius: 14px;
    --auth-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 16px 40px rgba(15, 23, 42, 0.06);
}

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

html,
body {
    height: 100%;
}

body.auth-body {
    font-family: "Plus Jakarta Sans", Inter, system-ui, -apple-system, sans-serif;
    color: var(--auth-ink);
    background: var(--auth-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-shell {
    min-height: 100%;
    display: grid;
    grid-template-columns: minmax(340px, 44%) 1fr;
}

/* Left brand panel */
.auth-showcase {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem 2.75rem 2rem;
    color: #fff;
    background:
        radial-gradient(1200px 600px at -10% -20%, rgba(99, 102, 241, 0.45), transparent 55%),
        radial-gradient(800px 500px at 110% 80%, rgba(6, 182, 212, 0.28), transparent 50%),
        linear-gradient(165deg, #0b1220 0%, #111827 42%, #1e1b4b 100%);
}

.auth-showcase::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(ellipse at 30% 20%, #000 20%, transparent 75%);
    pointer-events: none;
}

.auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
}

.auth-orb--one {
    width: 280px;
    height: 280px;
    top: -80px;
    right: -60px;
    background: rgba(99, 102, 241, 0.45);
}

.auth-orb--two {
    width: 220px;
    height: 220px;
    bottom: 12%;
    left: -70px;
    background: rgba(34, 211, 238, 0.22);
}

.auth-showcase-brand,
.auth-showcase-copy,
.auth-showcase-footer {
    position: relative;
    z-index: 1;
}

.auth-showcase-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auth-showcase-brand img {
    height: 48px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1.25rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #c7d2fe;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-kicker i {
    color: var(--auth-accent);
    font-size: 0.95rem;
}

.auth-showcase-copy h2 {
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.15;
    margin-bottom: 0.85rem;
    max-width: 16ch;
}

.auth-showcase-copy p {
    color: rgba(226, 232, 240, 0.78);
    font-size: 1rem;
    line-height: 1.65;
    max-width: 36ch;
    margin-bottom: 2rem;
}

.auth-features {
    list-style: none;
    display: grid;
    gap: 0.85rem;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #e2e8f0;
    font-size: 0.925rem;
    font-weight: 500;
}

.auth-feature-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--auth-accent);
    flex-shrink: 0;
}

.auth-showcase-footer {
    margin-top: 2.5rem;
    color: rgba(148, 163, 184, 0.9);
    font-size: 0.8rem;
}

.auth-qr-mark {
    position: absolute;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 132px;
    height: 132px;
    opacity: 0.18;
    z-index: 0;
}

/* Right form panel */
.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    background: var(--auth-bg);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    animation: authRise 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authRise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

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

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

.auth-logo img {
    height: 42px;
    width: auto;
    object-fit: contain;
}

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

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.4rem;
}

.auth-header p {
    color: var(--auth-muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.45;
}

.auth-alert i {
    font-size: 1.15rem;
    margin-top: 0.05rem;
    flex-shrink: 0;
}

.auth-alert--error {
    background: var(--auth-danger-bg);
    color: var(--auth-danger);
    border: 1px solid #fecaca;
}

.auth-alert--success {
    background: var(--auth-success-bg);
    color: var(--auth-success);
    border: 1px solid #a7f3d0;
}

.auth-field {
    margin-bottom: 1.15rem;
}

.auth-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.45rem;
    color: var(--auth-ink);
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap>i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
    pointer-events: none;
}

.auth-input {
    width: 100%;
    height: 3rem;
    padding: 0 2.75rem 0 2.65rem;
    font: inherit;
    font-size: 0.95rem;
    color: var(--auth-ink);
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

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

.auth-input:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
    background: #fff;
}

.auth-input::placeholder {
    color: #94a3b8;
}

.auth-input.is-invalid {
    border-color: #f87171;
}

.auth-input.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.auth-toggle-password {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    background: transparent;
    color: #94a3b8;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-toggle-password:hover,
.auth-toggle-password:focus-visible {
    color: var(--auth-ink);
    background: #f1f5f9;
    outline: none;
}

.auth-error {
    display: block;
    color: var(--auth-danger);
    font-size: 0.8rem;
    margin-top: 0.4rem;
    font-weight: 500;
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.25rem 0 1.5rem;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    color: var(--auth-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.auth-check input {
    appearance: none;
    -webkit-appearance: none;
    width: 1.05rem;
    height: 1.05rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 5px;
    background: #fff;
    display: grid;
    place-content: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.auth-check input::before {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
    transform: scale(0);
    background: #fff;
    transition: transform 0.12s ease;
}

.auth-check input:checked {
    background: var(--auth-primary);
    border-color: var(--auth-primary);
}

.auth-check input:checked::before {
    transform: scale(1);
}

.auth-check input:focus-visible {
    outline: 2px solid var(--auth-primary);
    outline-offset: 2px;
}

.auth-link {
    color: var(--auth-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
}

.auth-link:hover {
    color: var(--auth-primary-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-submit {
    width: 100%;
    height: 3.05rem;
    border: 0;
    border-radius: var(--auth-radius);
    background: var(--auth-primary);
    color: #fff;
    font: inherit;
    font-size: 0.975rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.28);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-submit:hover {
    background: var(--auth-primary-hover);
    transform: translateY(-1px);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-submit:focus-visible {
    outline: 2px solid var(--auth-primary);
    outline-offset: 3px;
}

.auth-submit:disabled,
.auth-submit.is-loading {
    opacity: 0.75;
    cursor: wait;
    transform: none;
}

.auth-submit.is-loading .auth-submit-label,
.auth-submit.is-loading i:not(.auth-spinner) {
    display: none;
}

.auth-spinner {
    display: none;
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: authSpin 0.7s linear infinite;
}

.auth-submit.is-loading .auth-spinner {
    display: inline-block;
}

@keyframes authSpin {
    to {
        transform: rotate(360deg);
    }
}

.auth-footnote {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--auth-muted);
    font-size: 0.875rem;
}

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

.auth-footnote a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-top: 1.15rem;
    padding: 0.8rem 0.9rem;
    border-radius: 12px;
    background: var(--auth-primary-soft);
    color: #3730a3;
    font-size: 0.8rem;
    line-height: 1.45;
}

.auth-hint i {
    margin-top: 0.05rem;
    flex-shrink: 0;
}

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

    .auth-showcase {
        display: none;
    }

    .auth-logo {
        display: block;
    }

    .auth-panel {
        min-height: 100vh;
        padding: 2rem 1.25rem 3rem;
        align-items: flex-start;
        padding-top: 12vh;
    }
}

@media (prefers-reduced-motion: reduce) {

    .auth-card,
    .auth-submit,
    .auth-input,
    .auth-spinner {
        animation: none;
        transition: none;
    }
}

@media (max-width: 480px) {
    .auth-header h1 {
        font-size: 1.5rem;
    }

    .auth-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}