/**
 * GIPIX CRM — экраны входа/регистрации: фон, canvas, hero, чипы, бейджи.
 * Порядок: hero → panel → extras. Подключать только из auth_base.html после style.css.
 */

/* === Auth pages: полноэкранный фон + стеклянная панель === */
body.auth-page {
    margin: 0;
    min-height: 100dvh;
    min-height: 100vh;
    font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: #050a12;
    color: var(--gipix-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    --auth-primary: var(--gipix-primary-hover);
    --auth-primary-light: var(--gipix-primary);
    --auth-accent: #00838f;
    --auth-accent-soft: #26c6da;
    --auth-warm: #ff8f00;
    --auth-warm-soft: #ffb74d;
    --auth-hero-text: rgba(255, 255, 255, 0.94);
    --auth-parallax-x: 0px;
    --auth-parallax-y: 0px;
}

body.auth-page-split {
    overflow-x: hidden;
}

.auth-split {
    position: relative;
    isolation: isolate;
    min-height: 100dvh;
    min-height: 100vh;
}

/* Фон и эффекты на весь экран */
.auth-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: linear-gradient(152deg, #061222 0%, #0c3558 32%, #0d5f6e 58%, #082030 100%);
    transform: translateZ(0);
    backface-visibility: hidden;
}

.auth-canvas .auth-hero__mesh {
    position: absolute;
    inset: -15%;
    background:
        radial-gradient(ellipse 90% 70% at 18% 28%, rgba(33, 150, 243, 0.42) 0%, transparent 58%),
        radial-gradient(ellipse 75% 60% at 88% 18%, rgba(0, 172, 193, 0.38) 0%, transparent 52%),
        radial-gradient(ellipse 55% 45% at 55% 88%, rgba(255, 152, 0, 0.14) 0%, transparent 50%),
        radial-gradient(ellipse 40% 35% at 72% 48%, rgba(100, 181, 246, 0.12) 0%, transparent 45%);
    transform: translate3d(var(--auth-parallax-x), var(--auth-parallax-y), 0);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-canvas .auth-hero__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(72px);
    opacity: 0.62;
    pointer-events: none;
    transform: translate3d(0, 0, 0);
    animation: authOrbFloat 18s ease-in-out infinite;
}

.auth-canvas .auth-hero__orb--1 {
    width: min(72vmin, 520px);
    height: min(72vmin, 520px);
    background: radial-gradient(circle, rgba(41, 121, 255, 0.55) 0%, rgba(25, 118, 210, 0.2) 65%);
    top: -18%;
    left: -12%;
    animation-delay: 0s;
}

.auth-canvas .auth-hero__orb--2 {
    width: min(58vmin, 440px);
    height: min(58vmin, 440px);
    background: radial-gradient(circle, rgba(0, 188, 212, 0.5) 0%, rgba(0, 96, 100, 0.15) 70%);
    bottom: -10%;
    right: -14%;
    animation-delay: -6s;
}

.auth-canvas .auth-hero__orb--3 {
    width: min(42vmin, 320px);
    height: min(42vmin, 320px);
    background: radial-gradient(circle, rgba(255, 183, 77, 0.22) 0%, transparent 70%);
    top: 38%;
    left: 32%;
    animation-delay: -11s;
}

.auth-canvas .auth-hero__orb--4 {
    width: min(48vmin, 360px);
    height: min(48vmin, 360px);
    background: radial-gradient(circle, rgba(13, 71, 161, 0.45) 0%, transparent 65%);
    top: 12%;
    right: 8%;
    animation-delay: -3s;
    opacity: 0.4;
}

@keyframes authOrbFloat {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    33% { transform: translate3d(16px, -22px, 0) scale(1.04); }
    66% { transform: translate3d(-14px, 14px, 0) scale(0.99); }
}

.auth-canvas .auth-hero__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.034) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.034) 1px, transparent 1px);
    background-size: 56px 56px;
    pointer-events: none;
    animation: authGridShift 28s ease-in-out infinite;
    opacity: 0.85;
}

.auth-canvas .auth-hero__vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 95% 90% at 50% 45%, transparent 0%, rgba(5, 10, 18, 0.45) 100%);
}

@keyframes authGridShift {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 0.9; }
}

/* Контент поверх фона */
.auth-layout {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 100dvh;
    min-height: 100vh;
    width: 100%;
    max-width: 1320px;
    box-sizing: border-box;
    padding: clamp(0.45rem, 1.2vh, 1rem) 0 clamp(0.45rem, 1.2vh, 1rem) clamp(0.75rem, 2.5vw, 2rem);
    gap: clamp(1rem, 3vw, 2.75rem);
    margin-left: auto;
    margin-right: clamp(1.5rem, 4.5vw, 3.5rem);
    pointer-events: none;
}

.auth-layout > * {
    pointer-events: auto;
}

.auth-hero-copy {
    flex: 1 1 0;
    min-width: min(100%, 260px);
    max-width: 36rem;
    padding: 0.35rem 0;
    color: var(--auth-hero-text);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 6px 28px rgba(0, 0, 0, 0.4);
}

.auth-hero__content {
    position: relative;
    z-index: 1;
    max-width: 34rem;
    width: 100%;
}

.auth-hero__eyebrow {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: authFadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-hero__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--auth-accent-soft), var(--auth-warm-soft));
    box-shadow: 0 0 14px rgba(38, 198, 218, 0.75);
    animation: authPulseDot 2.2s ease-in-out infinite;
}

@keyframes authPulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.85; }
}

.auth-hero__title {
    margin: 0 0 1.125rem;
    line-height: 1.05;
    animation: authFadeUp 0.75s 0.08s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-hero__brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: clamp(2.75rem, 7vw, 4.25rem);
    letter-spacing: -0.04em;
    background: linear-gradient(120deg, #fff 0%, #b3e5fc 45%, #4dd0e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    margin-right: 0.35rem;
}

.auth-hero__crm {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-style: italic;
    font-size: clamp(2.25rem, 5.5vw, 3.5rem);
    color: var(--auth-warm-soft);
    text-shadow: 0 0 40px rgba(255, 183, 77, 0.35);
}

.auth-hero__lead {
    font-size: clamp(1rem, 1.35vw, 1.125rem);
    line-height: 1.62;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 1.2rem;
    animation: authFadeUp 0.75s 0.16s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes authFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-hero__chips {
    list-style: none;
    margin: 0 0 1.2rem;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.55rem;
    animation: authFadeUp 0.75s 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-hero__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.auth-hero__chip i {
    color: var(--auth-accent-soft);
    font-size: 0.9rem;
    opacity: 0.95;
}

.auth-hero__chip:hover,
.auth-hero__chip:focus-visible {
    transform: translateY(-3px) scale(1.02);
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(77, 208, 225, 0.45);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
    outline: none;
}

.auth-hero__footer {
    animation: authFadeUp 0.75s 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-hero__quote {
    position: relative;
    padding: 0.75rem 0.85rem 0.75rem 1.15rem;
    margin-bottom: 0.9rem;
    border-left: 3px solid var(--auth-accent-soft);
    background: rgba(0, 0, 0, 0.22);
    border-radius: 0 12px 12px 0;
    font-size: 0.9rem;
    line-height: 1.52;
    color: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.auth-hero__quote-mark {
    font-family: 'Fraunces', serif;
    font-size: 2.5rem;
    line-height: 0;
    color: rgba(77, 208, 225, 0.35);
    position: absolute;
    left: 0.5rem;
    top: 1.1rem;
}

.auth-hero__quote p {
    margin: 0;
    position: relative;
    z-index: 1;
}

.auth-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.auth-hero__badge {
    font-family: 'Outfit', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.35), rgba(13, 71, 161, 0.25));
    border: 1px solid rgba(100, 181, 246, 0.35);
    color: #e3f2fd;
}

.auth-hero__badge--warm {
    background: linear-gradient(135deg, rgba(255, 143, 0, 0.35), rgba(230, 81, 0, 0.2));
    border-color: rgba(255, 183, 77, 0.4);
    color: #fff8e1;
}

