/* DocArchive Auth — 2026 vault signal */

:root {
    --auth-ink: #0b1c3d;
    --auth-ink-deep: #061228;
    --auth-mist: #f3f6fb;
    --auth-panel: #fbfcfe;
    --auth-signal: #3d8bff;
    --auth-signal-ink: #ffffff;
    --auth-coral: #ff5a3c;
    --auth-lime: #b8f53d;
    --auth-line: rgba(11, 28, 61, 0.12);
    --auth-muted: #5f6f8a;
    --auth-text: #121a2b;
    --auth-radius: 1.15rem;
    --auth-font-display: "Outfit", "Segoe UI", sans-serif;
    --auth-font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

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

html,
body {
    margin: 0;
    min-height: 100%;
}

body.auth-body {
    font-family: var(--auth-font-body);
    color: var(--auth-text);
    background: var(--auth-mist);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--auth-ink);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 0.2em;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    color: var(--auth-coral);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
}

/* —— Brand stage —— */
.auth-brand {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 18% 8%, rgba(61, 139, 255, 0.35), transparent 55%),
        radial-gradient(ellipse 70% 50% at 92% 78%, rgba(184, 245, 61, 0.14), transparent 50%),
        linear-gradient(155deg, #0d2248 0%, #0b1c3d 45%, #060f22 100%);
    color: #e8eef8;
    padding: clamp(2rem, 4vw, 3.5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    isolation: isolate;
}

.auth-brand__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 40% 40%, #000 20%, transparent 75%);
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
}

.auth-brand__orb {
    position: absolute;
    border-radius: 40% 60% 55% 45%;
    filter: blur(2px);
    pointer-events: none;
    z-index: 0;
    animation: auth-drift 18s ease-in-out infinite;
}

.auth-brand__orb--a {
    width: min(42vw, 28rem);
    height: min(42vw, 28rem);
    top: -8%;
    right: -12%;
    background: radial-gradient(circle, rgba(61, 139, 255, 0.45), transparent 68%);
}

.auth-brand__orb--b {
    width: min(36vw, 22rem);
    height: min(36vw, 22rem);
    bottom: 5%;
    left: -10%;
    background: radial-gradient(circle, rgba(184, 245, 61, 0.22), transparent 70%);
    animation-delay: -7s;
    animation-duration: 22s;
}

.auth-brand__docs {
    position: absolute;
    right: 8%;
    bottom: 18%;
    width: min(46%, 20rem);
    aspect-ratio: 4 / 5;
    z-index: 1;
    pointer-events: none;
}

.auth-brand__doc {
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
    backdrop-filter: blur(8px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    transform-origin: 70% 90%;
}

.auth-brand__doc--1 {
    transform: rotate(-8deg) translate(-12%, 6%);
}

.auth-brand__doc--2 {
    transform: rotate(4deg) translate(6%, -4%);
}

.auth-brand__doc--3 {
    transform: rotate(-1deg);
    background:
        linear-gradient(90deg, transparent 12%, rgba(184, 245, 61, 0.7) 12%, rgba(184, 245, 61, 0.7) 14%, transparent 14%),
        linear-gradient(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
    background-size: 100% 100%, 100% 100%;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1.4rem 1.25rem;
}

.auth-brand__doc-line {
    height: 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

.auth-brand__doc-line:nth-child(1) { width: 72%; }
.auth-brand__doc-line:nth-child(2) { width: 90%; }
.auth-brand__doc-line:nth-child(3) { width: 58%; }
.auth-brand__doc-line:nth-child(4) { width: 80%; margin-top: auto; background: var(--auth-lime); opacity: 0.9; height: 0.55rem; }

.auth-brand__copy,
.auth-brand__foot {
    position: relative;
    z-index: 2;
}

.auth-brand__copy {
    margin-bottom: 2rem;
}

.auth-brand__foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    font-size: 0.85rem;
    color: rgba(232, 238, 248, 0.65);
}

.auth-brand__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--auth-lime);
}

.auth-brand__eyebrow::before {
    content: "";
    width: 1.5rem;
    height: 2px;
    background: currentColor;
}

.auth-brand__title {
    margin: 0;
    font-family: var(--auth-font-display);
    font-weight: 700;
    font-size: clamp(2.4rem, 4.5vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
    max-width: 11ch;
    animation: auth-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-brand__title span {
    display: block;
    background: linear-gradient(90deg, #7eb6ff 0%, #3d8bff 45%, var(--auth-lime) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-brand__lede {
    margin: 1.25rem 0 0;
    max-width: 28ch;
    font-size: 1.05rem;
    line-height: 1.55;
    color: rgba(232, 238, 248, 0.78);
    animation: auth-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.auth-brand__stat strong {
    display: block;
    font-family: var(--auth-font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.03em;
}

/* —— Form panel —— */
.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: clamp(1.5rem, 4vw, 3.5rem);
    background:
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(61, 139, 255, 0.1), transparent 55%),
        var(--auth-panel);
    position: relative;
    min-height: 100vh;
}

.auth-panel__brand {
    margin-bottom: 1.75rem;
    text-align: center;
}

.auth-panel__brand a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0.65rem 0.9rem;
    background: #fff;
    border-radius: 0.85rem;
    border: 1px solid var(--auth-line);
}

.auth-panel__brand img {
    height: 3.75rem;
    width: auto;
    max-width: 16rem;
    object-fit: contain;
    border-radius: 0.35rem;
}

.auth-panel__inner {
    width: 100%;
    max-width: 26rem;
    margin: auto;
    animation: auth-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.auth-heading {
    margin: 0 0 0.4rem;
    font-family: var(--auth-font-display);
    font-size: clamp(1.85rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--auth-ink);
}

.auth-subheading {
    margin: 0 0 1.75rem;
    color: var(--auth-muted);
    font-size: 0.98rem;
    line-height: 1.5;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.auth-field__label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.auth-label {
    font-size: 0.82rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    color: var(--auth-ink);
}

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

.auth-link-quiet:hover {
    color: var(--auth-coral);
}

.auth-input {
    width: 100%;
    appearance: none;
    border: 1.5px solid var(--auth-line);
    background: #fff;
    color: var(--auth-text);
    border-radius: 0.85rem;
    padding: 0.85rem 1rem;
    font: inherit;
    font-size: 0.98rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

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

.auth-input:hover {
    border-color: rgba(4, 63, 58, 0.28);
}

.auth-input:focus {
    outline: none;
    border-color: var(--auth-signal);
    box-shadow: 0 0 0 4px rgba(61, 139, 255, 0.2);
}

.auth-input.is-invalid {
    border-color: var(--auth-coral);
    box-shadow: 0 0 0 4px rgba(255, 90, 60, 0.15);
}

.auth-error {
    font-size: 0.8rem;
    color: var(--auth-coral);
    font-weight: 550;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.9rem;
    color: var(--auth-muted);
    user-select: none;
}

.auth-check input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--auth-ink);
    border-radius: 0.3rem;
}

.auth-btn {
    appearance: none;
    border: 0;
    cursor: pointer;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.95rem 1.25rem;
    border-radius: 0.95rem;
    background: linear-gradient(135deg, #5aa0ff 0%, #2f74f0 55%, #1f5fd6 100%);
    color: var(--auth-signal-ink);
    font-family: var(--auth-font-display);
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.auth-btn:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
}

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

.auth-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(4, 63, 58, 0.25);
}

.auth-btn__arrow {
    font-size: 1.15em;
    line-height: 1;
    transition: transform 0.2s ease;
}

.auth-btn:hover .auth-btn__arrow {
    transform: translateX(3px);
}

.auth-alert {
    border-radius: 0.9rem;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    line-height: 1.45;
    margin-bottom: 1.25rem;
}

.auth-alert--success {
    background: rgba(184, 245, 61, 0.2);
    color: #2a4010;
    border: 1px solid rgba(184, 245, 61, 0.55);
}

.auth-alert--info {
    background: rgba(4, 63, 58, 0.06);
    color: var(--auth-ink);
    border: 1px solid var(--auth-line);
}

.auth-footer-note {
    margin-top: 1.75rem;
    text-align: center;
    font-size: 0.92rem;
    color: var(--auth-muted);
}

.auth-footer-note a {
    font-weight: 700;
    text-decoration: none;
    color: var(--auth-ink);
    border-bottom: 2px solid var(--auth-lime);
}

.auth-footer-note a:hover {
    color: var(--auth-coral);
    border-bottom-color: var(--auth-coral);
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--auth-muted);
    text-decoration: none;
}

.auth-back:hover {
    color: var(--auth-ink);
}

.auth-panel__legal {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: #8a97ad;
}

/* —— Motion —— */
@keyframes auth-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes auth-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-3%, 4%) scale(1.06); }
}

@keyframes auth-float-a {
    0%, 100% { transform: rotate(-8deg) translate(-12%, 6%); }
    50% { transform: rotate(-6deg) translate(-12%, calc(6% - 10px)); }
}

@keyframes auth-float-b {
    0%, 100% { transform: rotate(4deg) translate(6%, -4%); }
    50% { transform: rotate(6deg) translate(6%, calc(-4% - 10px)); }
}

@keyframes auth-float-c {
    0%, 100% { transform: rotate(-1deg) translateY(0); }
    50% { transform: rotate(1deg) translateY(-10px); }
}

.auth-brand__doc--1 { animation: auth-float-a 9s ease-in-out infinite; }
.auth-brand__doc--2 { animation: auth-float-b 11s ease-in-out infinite; }
.auth-brand__doc--3 { animation: auth-float-c 10s ease-in-out infinite; }

.auth-form > * {
    animation: auth-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-form > *:nth-child(1) { animation-delay: 0.12s; }
.auth-form > *:nth-child(2) { animation-delay: 0.18s; }
.auth-form > *:nth-child(3) { animation-delay: 0.24s; }
.auth-form > *:nth-child(4) { animation-delay: 0.30s; }
.auth-form > *:nth-child(5) { animation-delay: 0.36s; }
.auth-form > *:nth-child(6) { animation-delay: 0.42s; }

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

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

    .auth-brand {
        display: none;
    }

    .auth-panel {
        padding-top: 1.75rem;
        padding-bottom: 2.5rem;
    }

    .auth-panel__brand img {
        height: 4.25rem;
        max-width: 18rem;
    }
}

@media (max-width: 560px) {
    .auth-panel {
        padding-inline: 1.25rem;
    }

    .auth-panel__brand {
        margin-bottom: 1.5rem;
    }

    .auth-panel__brand img {
        height: 3.85rem;
        max-width: min(16rem, 78vw);
    }
}
