/* =========================================================
   ICAX CRM — страница входа.
   Сплит-экран: бренд-панель с северным сиянием + стеклянная
   карточка формы. Тёмная фирменная эстетика ICAX.
   ========================================================= */

.auth {
    --a-page:      #050b11;
    --a-mint:      #6ff7c8;
    --a-teal:      #16d9c8;
    --a-blue:      #4f7cff;
    --a-text:      #f3fbff;
    --a-soft:      rgba(243, 251, 255, 0.74);
    --a-muted:     rgba(243, 251, 255, 0.5);
    --a-glass:     rgba(255, 255, 255, 0.06);
    --a-glass-brd: rgba(255, 255, 255, 0.16);

    margin: 0; min-height: 100vh;
    color: var(--a-text); background: var(--a-page);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
.auth *, .auth *::before, .auth *::after { box-sizing: border-box; }
.auth a { text-decoration: none; color: inherit; }

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

/* ---------------- Бренд-панель ---------------- */
.auth-brand {
    position: relative; overflow: hidden;
    margin: 16px; border-radius: 32px;
    isolation: isolate;
    box-shadow: 0 40px 100px rgba(0,0,0,.55);
}
.auth-brand__bg { position: absolute; inset: -40px; z-index: 0; pointer-events: none; isolation: isolate; }
.auth-brand__bg-img {
    position: absolute; inset: 0;
    background: url("/static/bckg.png") center / cover no-repeat;
    animation: a-breath 18s ease-in-out infinite;
}
.auth-brand__light, .auth-brand__light2 { position: absolute; inset: -45%; pointer-events: none; will-change: transform, opacity; }
.auth-brand__light {
    background: linear-gradient(115deg, transparent 30%, rgba(160,255,225,.55) 48%, rgba(120,200,255,.45) 62%, transparent 78%);
    mix-blend-mode: screen; animation: a-shimmer 11s ease-in-out infinite;
}
.auth-brand__light2 {
    background: radial-gradient(42% 55% at 60% 36%, rgba(130,255,205,.5), transparent 66%),
                radial-gradient(46% 60% at 34% 68%, rgba(95,160,255,.42), transparent 72%);
    mix-blend-mode: color-dodge; animation: a-shimmer2 15s ease-in-out infinite;
}
/* Затемнение снизу для читаемости текста */
.auth-brand::after {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: radial-gradient(130% 120% at 0% 100%, rgba(5,11,17,.85) 0%, rgba(5,11,17,.30) 44%, transparent 68%);
}
@keyframes a-breath { 0%,100%{ transform: scale(1.04) translate3d(0,0,0); } 50%{ transform: scale(1.09) translate3d(-18px,12px,0); } }
@keyframes a-shimmer { 0%{ transform: translate3d(-20%,-8%,0) rotate(0); opacity:.3; } 50%{ transform: translate3d(18%,8%,0) rotate(6deg); opacity:1; } 100%{ transform: translate3d(-20%,-8%,0) rotate(0); opacity:.3; } }
@keyframes a-shimmer2 { 0%{ transform: translate3d(10%,5%,0) scale(1); opacity:.25; } 50%{ transform: translate3d(-12%,-6%,0) scale(1.25); opacity:.85; } 100%{ transform: translate3d(10%,5%,0) scale(1); opacity:.25; } }
@media (prefers-reduced-motion: reduce) { .auth-brand__bg-img, .auth-brand__light, .auth-brand__light2 { animation: none; } }

.auth-brand__inner {
    position: relative; z-index: 2;
    height: 100%; padding: 44px 48px;
    display: flex; flex-direction: column; justify-content: space-between;
}
.auth-brand__logo { display: inline-flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.auth-brand__logo img { width: 40px; height: 40px; border-radius: 11px; object-fit: cover; }

.auth-brand__copy { max-width: 460px; }
.auth-brand__eyebrow {
    display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
    color: var(--a-mint); padding: 7px 14px; border-radius: 999px;
    border: 1px solid var(--a-glass-brd); background: var(--a-glass); backdrop-filter: blur(8px); margin-bottom: 22px;
}
.auth-brand__title { font-size: clamp(30px,3.6vw,46px); font-weight: 800; line-height: 1.05; letter-spacing: -.025em; margin: 0 0 16px; }
.auth-brand__lead { font-size: 17px; line-height: 1.55; color: var(--a-soft); margin: 0 0 26px; }
.auth-brand__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.auth-brand__list li { position: relative; padding-left: 26px; font-size: 15px; font-weight: 500; color: var(--a-text); }
.auth-brand__list li::before {
    content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, var(--a-mint), var(--a-teal));
    box-shadow: 0 0 12px rgba(111,247,200,.6);
}
.auth-brand__foot { font-size: 13px; color: var(--a-muted); }

/* ---------------- Форма ---------------- */
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }

.auth-card {
    width: 100%; max-width: 412px;
    padding: 38px 36px 30px; border-radius: 26px;
    background: linear-gradient(155deg, rgba(255,255,255,.10), rgba(255,255,255,.03) 60%), rgba(255,255,255,.04);
    border: 1px solid var(--a-glass-brd); backdrop-filter: blur(18px);
    box-shadow: 0 30px 70px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.28);
}
.auth-card__brand { display: inline-flex; align-items: center; gap: 11px; font-size: 19px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 26px; }
.auth-card__brand img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.auth-card__dim { color: var(--a-mint); font-weight: 700; }

.auth-card__title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; }
.auth-card__sub { font-size: 14px; color: var(--a-muted); margin: 0 0 24px; }

.auth-card__error {
    display: flex; align-items: center; gap: 9px;
    padding: 11px 14px; margin-bottom: 18px; border-radius: 12px;
    font-size: 14px; font-weight: 500; color: #ffd9d9;
    background: rgba(255,77,79,.12); border: 1px solid rgba(255,77,79,.32);
}

.auth-card__form { display: flex; flex-direction: column; gap: 16px; }
.auth-field { display: flex; flex-direction: column; gap: 8px; }
.auth-field > span { font-size: 13px; font-weight: 600; color: var(--a-soft); }
.auth-field input {
    width: 100%; padding: 13px 15px; border-radius: 13px;
    font: inherit; font-size: 15px; color: var(--a-text);
    background: rgba(255,255,255,.06); border: 1px solid var(--a-glass-brd);
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.auth-field input::placeholder { color: var(--a-muted); }
.auth-field input:focus {
    outline: none; border-color: var(--a-mint); background: rgba(255,255,255,.10);
    box-shadow: 0 0 0 3px rgba(111,247,200,.18);
}

.auth-card__submit {
    margin-top: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    padding: 14px 22px; border: none; border-radius: 14px; cursor: pointer;
    font: inherit; font-size: 15px; font-weight: 700; color: #04231d;
    background: linear-gradient(135deg, var(--a-mint), var(--a-teal));
    box-shadow: 0 14px 30px rgba(22,217,200,.35);
    transition: transform .18s, box-shadow .18s;
}
.auth-card__submit:hover { transform: translateY(-2px); box-shadow: 0 20px 42px rgba(22,217,200,.5); }
.auth-card__submit:active { transform: translateY(0); }

.auth-card__hint { margin-top: 22px; font-size: 13px; line-height: 1.5; color: var(--a-muted); text-align: center; }
.auth-card__back { display: block; margin-top: 14px; text-align: center; font-size: 13px; font-weight: 600; color: var(--a-soft); transition: color .2s; }
.auth-card__back:hover { color: var(--a-mint); }

/* ---------------- Адаптив ---------------- */
@media (max-width: 900px) {
    .auth-split { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-form-wrap { min-height: 100vh; }
}
