/* Authentication screens: centered column on a soft light backdrop. */
:root {
    --a-canvas: #f6f4fb;
    --a-surface: #ffffff;
    --a-ink: #1b1530;
    --a-ink-2: #4a4463;
    --a-muted: #7a7391;
    --a-line: #e3def0;
    --a-line-strong: #d3cce4;
    --a-brand: #6f42c1;
    --a-brand-strong: #5b34a8;
    --a-brand-soft: #eee8fa;
    --a-red: #d9475a;
    --a-red-soft: #fbe3e7;
    --a-green: #2fae7b;
    --a-green-soft: #dff4ea;
    --a-amber: #e0a21b;
    --a-amber-soft: #fbf0d4;
    --a-orange: #f0782e;
    --a-orange-soft: #fdebdd;
    --a-blue: #3f7be0;
    --a-blue-soft: #e1ecfc;
    --a-focus: 0 0 0 4px rgba(111, 66, 193, 0.22);
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body.auth-body {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--a-canvas);
    color: var(--a-ink);
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Backdrop: soft glow, faded dot grid, circuit lines with travelling pulses, status chips */
body.auth-body {
    position: relative;
}

.auth-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(60% 420px at 50% -8%, rgba(111, 66, 193, 0.18), transparent 70%),
        radial-gradient(40% 40% at 100% 100%, rgba(63, 123, 224, 0.1), transparent 70%),
        var(--a-canvas);
}

.auth-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(111, 66, 193, 0.22) 1px, transparent 1.4px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(70% 60% at 50% 38%, #000 0%, transparent 78%);
    mask-image: radial-gradient(70% 60% at 50% 38%, #000 0%, transparent 78%);
}

/* 1440 x 640 stage centred on the page: chips and lines share its pixel coordinates. */
.auth-stage {
    position: absolute;
    top: 0;
    left: 50%;
    width: 1440px;
    height: 640px;
    margin-left: -720px;
}

.auth-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.auth-lines__grid {
    stroke: rgba(111, 66, 193, 0.1);
    stroke-width: 1;
}

.auth-lines__branch {
    stroke: rgba(111, 66, 193, 0.28);
    stroke-width: 1;
    stroke-dasharray: 3 5;
}

.auth-lines__node {
    fill: rgba(111, 66, 193, 0.32);
}

.auth-lines__diamond {
    stroke: rgba(111, 66, 193, 0.2);
    stroke-width: 1;
}

.auth-pulse {
    stroke: var(--a-brand);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 70 1000;
    stroke-dashoffset: 70;
    opacity: 0.75;
    filter: drop-shadow(0 0 4px rgba(111, 66, 193, 0.55));
    animation: authPulse var(--dur, 9s) linear infinite;
    animation-delay: var(--delay, 0s);
}

@keyframes authPulse {
    0% { stroke-dashoffset: 70; }
    72%, 100% { stroke-dashoffset: -1000; }
}

.auth-chip {
    --tone: var(--a-brand);
    --tone-soft: var(--a-brand-soft);
    position: absolute;
    translate: -50% -50%;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 8px 8px;
    border: 1px solid var(--a-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 28px -14px rgba(29, 19, 51, 0.3);
    color: var(--a-ink-2);
    font-size: 0.84rem;
    font-weight: 600;
    white-space: nowrap;
    animation: authFloat 7s ease-in-out infinite;
}

.auth-chip i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--tone-soft);
    color: var(--tone);
    font-size: 0.95rem;
}

.auth-chip--received { --tone: #a9740a; --tone-soft: var(--a-amber-soft); left: 320px; top: 175px; }
.auth-chip--interview { --tone: var(--a-orange); --tone-soft: var(--a-orange-soft); left: 250px; top: 330px; animation-delay: -2s; }
.auth-chip--hired { --tone: var(--a-green); --tone-soft: var(--a-green-soft); left: 330px; top: 485px; animation-delay: -4s; }
.auth-chip--candidates { --tone: var(--a-blue); --tone-soft: var(--a-blue-soft); left: 1120px; top: 175px; animation-delay: -1s; }
.auth-chip--agenda { --tone: var(--a-brand); --tone-soft: var(--a-brand-soft); left: 1190px; top: 330px; animation-delay: -3s; }
.auth-chip--cv { --tone: var(--a-red); --tone-soft: var(--a-red-soft); left: 1110px; top: 485px; animation-delay: -5s; }

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

@media (max-width: 1099.98px) {
    .auth-stage {
        display: none;
    }
}

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

    .auth-pulse {
        display: none;
    }
}

/* Column */
.auth-shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 28px 20px 24px;
}

.auth-shell__top {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.auth-logo img {
    display: block;
    height: 34px;
    width: auto;
}

.auth-content {
    width: 100%;
    max-width: 440px;
    padding: 36px 36px 32px;
    border: 1px solid var(--a-line);
    border-radius: 24px;
    background: var(--a-surface);
    box-shadow: 0 24px 60px -32px rgba(29, 19, 51, 0.35), 0 2px 6px rgba(29, 19, 51, 0.04);
}

.auth-content--wide {
    max-width: 580px;
}

.auth-title {
    margin-bottom: 6px;
    color: var(--a-ink);
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-align: center;
}

.auth-subtitle {
    margin-bottom: 28px;
    color: var(--a-muted);
    font-size: 0.95rem;
    text-align: center;
}

.auth-icon-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    border-radius: 16px;
    background: var(--a-brand-soft);
    color: var(--a-brand);
}

/* Below the card */
.auth-aux {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--a-muted);
    font-size: 0.86rem;
    font-weight: 500;
    text-decoration: none;
}

.auth-back-link:hover {
    color: var(--a-brand-strong);
}

.auth-aux .locale-switcher {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--a-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
}

.auth-aux .locale-switcher-current,
.auth-aux .locale-switcher-link {
    min-width: 44px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.auth-aux .locale-switcher-current {
    background: var(--a-brand);
    color: #fff;
}

.auth-aux .locale-switcher-link {
    color: var(--a-ink-2);
}

.auth-aux .locale-switcher-link:hover {
    background: var(--a-brand-soft);
    color: var(--a-brand-strong);
}

.auth-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 28px;
    color: var(--a-muted);
    font-size: 0.8rem;
    text-align: center;
}

.auth-secure {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #17724d;
    font-weight: 600;
}

.auth-footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 18px;
}

.auth-footer__links a {
    color: var(--a-muted);
    text-decoration: none;
}

.auth-footer__links a:hover {
    color: var(--a-brand-strong);
    text-decoration: underline;
}

@media (max-width: 575.98px) {
    .auth-shell {
        padding: 24px 14px 20px;
    }

    .auth-content {
        padding: 28px 20px 24px;
        border-radius: 20px;
    }

    .auth-title {
        font-size: 1.45rem;
    }
}
