/* static/css/auth.css — Split-screen auth layout with animated network graphics */

/* ── Base ─────────────────────────────────────────────────────────── */
.auth-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow: hidden;
}

.auth-split {
    display: flex;
    min-height: 100vh;
}

/* ── Hero Panel (left) ────────────────────────────────────────────── */
.auth-hero {
    position: relative;
    flex: 0 0 55%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1e2e 0%, #1e2a4a 25%, #2d3a8c 50%, #1a73e8 75%, #1e2a4a 100%);
    background-size: 400% 400%;
    animation: auth-gradient-shift 15s ease infinite;
}

@keyframes auth-gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ── Network Nodes ────────────────────────────────────────────────── */
.auth-hero-network {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.auth-node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: auth-node-pulse 4s ease-in-out infinite;
}

.auth-node--lg {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.7);
}

.auth-node:nth-child(2) { animation-delay: 0.5s; }
.auth-node:nth-child(3) { animation-delay: 1.0s; }
.auth-node:nth-child(4) { animation-delay: 1.5s; }
.auth-node:nth-child(5) { animation-delay: 2.0s; }
.auth-node:nth-child(6) { animation-delay: 2.5s; }
.auth-node:nth-child(7) { animation-delay: 3.0s; }
.auth-node:nth-child(8) { animation-delay: 3.5s; }

@keyframes auth-node-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.1);
    }
    50% {
        transform: scale(1.5);
        box-shadow: 0 0 14px 4px rgba(26, 115, 232, 0.35);
    }
}

/* ── Connection Lines (SVG) ───────────────────────────────────────── */
.auth-connections {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.auth-connections line {
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 1;
}

/* ── Signal Wave Rings ────────────────────────────────────────────── */
.auth-wave-ring {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 1.5px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    animation: auth-wave-expand 8s ease-out infinite;
    z-index: 1;
    pointer-events: none;
}

.auth-wave-ring--sm {
    width: 80px;
    height: 80px;
    animation-duration: 10s;
    animation-delay: 2s;
}

.auth-wave-ring--md {
    width: 100px;
    height: 100px;
    animation-duration: 12s;
    animation-delay: 4s;
}

@keyframes auth-wave-expand {
    0% {
        transform: scale(0.5);
        opacity: 0.5;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* ── Hero Content (branding) ──────────────────────────────────────── */
.auth-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    padding: 0 2rem;
}

.auth-hero-logo {
    max-height: 80px;
    max-width: 280px;
    width: auto;
    height: auto;
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.auth-hero-logo-icon {
    font-size: 64px;
    color: #ffffff;
    margin-bottom: 1.25rem;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.auth-hero-name {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.25rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.auth-hero-subtitle {
    font-size: 0.9rem;
    opacity: 0.65;
    margin: 0 0 1.5rem;
}

.auth-hero-tagline {
    font-size: 1rem;
    opacity: 0.45;
    font-style: italic;
    margin: 0;
    max-width: 300px;
    margin-inline: auto;
}

.auth-hero-footer {
    position: absolute;
    bottom: 1.5rem;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.25);
    z-index: 2;
}

/* ── Form Panel (right) ──────────────────────────────────────────── */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #ffffff;
    overflow-y: auto;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 420px;
}

/* Override Tabler's container-tight max-width inside the form panel */
.auth-form-wrapper .container-tight {
    max-width: 100%;
    padding: 0;
}

/* Input focus accent matching hero */
.auth-form-wrapper .form-control:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 0.2rem rgba(26, 115, 232, 0.15);
}

/* Primary button matches hero accent */
.auth-form-wrapper .btn-primary {
    background-color: #1a73e8;
    border-color: #1a73e8;
}

.auth-form-wrapper .btn-primary:hover {
    background-color: #1557b0;
    border-color: #1557b0;
}

/* ── Responsive (mobile) ─────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .auth-split {
        flex-direction: column;
    }

    .auth-hero {
        flex: 0 0 auto;
        min-height: 180px;
        padding: 2rem 1.5rem;
    }

    .auth-hero-tagline,
    .auth-hero-footer,
    .auth-hero-network,
    .auth-wave-ring {
        display: none;
    }

    .auth-hero-logo {
        max-height: 48px;
        max-width: 200px;
        margin-bottom: 0.75rem;
    }

    .auth-hero-logo-icon {
        font-size: 40px;
        margin-bottom: 0.75rem;
    }

    .auth-hero-name {
        font-size: 1.25rem;
    }

    .auth-hero-subtitle {
        font-size: 0.8rem;
        margin-bottom: 0;
    }

    .auth-form-panel {
        flex: 1;
        padding: 1.5rem;
        align-items: flex-start;
        padding-top: 1.5rem;
    }
}

/* ── Accessibility: Reduced Motion ────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .auth-hero {
        animation: none;
        background-position: 50% 50%;
    }

    .auth-node {
        animation: none;
    }

    .auth-wave-ring {
        animation: none;
        opacity: 0.06;
        transform: scale(1.5);
    }
}
