@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --auth-bg-1: #111827;
    --auth-bg-2: #30384f;
    --auth-bg-3: #1f2937;

    --auth-card-border: rgba(255, 255, 255, .08);

    --auth-text: #ffffff;
    --auth-muted: rgba(255, 255, 255, .68);

    --auth-field: rgba(255, 255, 255, .10);
    --auth-field-hover: rgba(255, 255, 255, .14);
    --auth-field-focus: rgba(255, 255, 255, .16);

    --auth-blue: #2493f7;
    --auth-blue-2: #36b5ff;
    --auth-danger: #ff7474;

    --auth-radius-main: 24px;
    --auth-radius-field: 10px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body.auth-page {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    font-family: "Raleway", Arial, sans-serif;
    color: var(--auth-text);
    background:
        radial-gradient(circle at 18% 34%, rgba(36, 147, 247, .30), transparent 30%),
        radial-gradient(circle at 78% 76%, rgba(89, 82, 190, .36), transparent 34%),
        linear-gradient(135deg, var(--auth-bg-1), var(--auth-bg-2) 52%, var(--auth-bg-3));
}

.auth-shell {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 48px 24px;
    isolation: isolate;
}

.auth-shell::before,
.auth-shell::after {
    content: "";
    position: fixed;
    z-index: -2;
    width: 52vw;
    height: 52vw;
    min-width: 420px;
    min-height: 420px;
    border-radius: 50%;
    filter: blur(38px);
    opacity: .42;
    animation: authFloat 14s ease-in-out infinite alternate;
}

.auth-shell::before {
    left: -14vw;
    top: -18vw;
    background: rgba(36, 147, 247, .42);
}

.auth-shell::after {
    right: -16vw;
    bottom: -18vw;
    background: rgba(125, 105, 255, .34);
    animation-delay: -5s;
}

.auth-card {
    position: relative;
    width: min(1256px, 100%);
    min-height: 690px;
    overflow: hidden;
    border-radius: var(--auth-radius-main);
    background: #111827;
    border: 1px solid var(--auth-card-border);
    box-shadow:
        0 34px 110px rgba(0, 0, 0, .34),
        inset 0 1px 0 rgba(255, 255, 255, .05);
}

/* Фон именно ВНУТРИ большой карточки */
.auth-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(90deg, rgba(10, 14, 24, .88) 0%, rgba(10, 14, 24, .68) 40%, rgba(10, 14, 24, .42) 100%),
        url("/assets/admin/img/auth-bg.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: .95;
}

/* Мягкое затемнение и блик поверх фоновой картинки */
.auth-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 34% 48%, rgba(36, 147, 247, .11), transparent 26%),
        linear-gradient(120deg, rgba(255, 255, 255, .045), transparent 36%, rgba(255, 255, 255, .025));
    pointer-events: none;
}

.auth-content {
    position: relative;
    z-index: 2;
    width: min(520px, 100%);
    min-height: 690px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 42px 24px 52px;
}

/* Логотип картинкой */
.auth-logo {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 84px;
}

.auth-logo__image {
    display: block;
    width: 210px;
    height: auto;
    max-width: 100%;
}

.auth-form-wrap {
    width: 100%;
    margin-top: 0;
}

.auth-title {
    margin: 0 0 30px;
    color: #ffffff;
    font-size: clamp(34px, 4.4vw, 44px);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.auth-alert {
    margin-bottom: 16px;
    padding: 13px 16px;
    border-radius: 12px;
    background: rgba(255, 116, 116, .13);
    border: 1px solid rgba(255, 116, 116, .28);
    color: #ffd7d7;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 700;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.auth-field {
    position: relative;
    display: block;
    width: 100%;
}

.auth-field__input {
    width: 100%;
    height: 80px;
    padding: 30px 58px 15px 18px;
    border: 1px solid transparent;
    border-radius: var(--auth-radius-field);
    outline: none;
    background: var(--auth-field);
    color: #ffffff;
    font-family: "Raleway", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.2;
    transition:
        border-color .22s ease,
        box-shadow .22s ease,
        background .22s ease;
}

.auth-field__input:hover {
    background: var(--auth-field-hover);
}

.auth-field__input:focus {
    border-color: var(--auth-blue);
    background: var(--auth-field-focus);
    box-shadow:
        0 0 0 3px rgba(36, 147, 247, .16),
        0 10px 30px rgba(36, 147, 247, .16);
}

.auth-field__label {
    position: absolute;
    left: 18px;
    top: 15px;
    color: rgba(255, 255, 255, .82);
    font-size: 13px;
    line-height: 1;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
    pointer-events: none;
}

/* Убираем встроенные браузерные кнопки пароля, насколько браузер позволит. 
   Потому что браузеры тоже любят рисовать свои кнопочки поверх нашего дизайна. */
.auth-field__input::-ms-reveal,
.auth-field__input::-ms-clear {
    display: none;
}

.auth-field__input::-webkit-credentials-auto-fill-button,
.auth-field__input::-webkit-caps-lock-indicator,
.auth-field__input::-webkit-contacts-auto-fill-button {
    visibility: hidden;
    display: none !important;
    pointer-events: none;
    position: absolute;
    right: 0;
}

.auth-field__input:-webkit-autofill,
.auth-field__input:-webkit-autofill:hover,
.auth-field__input:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff;
    caret-color: #ffffff;
    box-shadow: 0 0 0 1000px rgba(255, 255, 255, .10) inset;
    transition: background-color 9999s ease-in-out 0s;
}

/* Наш глаз */
.auth-field__eye {
    position: absolute;
    right: 14px;
    top: 50%;
    z-index: 3;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: rgba(255, 255, 255, .82);
    cursor: pointer;
    transition:
        background .2s ease,
        color .2s ease;
}

.auth-field__eye:hover {
    background: rgba(255, 255, 255, .10);
    color: #ffffff;
}

.auth-field__eye svg {
    width: 27px;
    height: 27px;
    stroke: currentColor;
}

.auth-field__eye-line {
    opacity: 0;
    transform-origin: center;
    transition: opacity .18s ease;
}

.auth-field__eye.is-visible .auth-field__eye-line {
    opacity: 1;
}

.auth-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
}

.auth-button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 38px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-family: "Raleway", Arial, sans-serif;
    font-size: 16px;
    line-height: 1;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition:
        transform .22s ease,
        box-shadow .22s ease,
        background .22s ease;
}

.auth-button:hover {
    transform: translateY(-1px);
}

.auth-button--primary {
    background: linear-gradient(135deg, var(--auth-blue), var(--auth-blue-2));
    box-shadow: 0 16px 30px rgba(36, 147, 247, .24);
}

.auth-button--primary:hover {
    box-shadow: 0 18px 38px rgba(36, 147, 247, .36);
}

.auth-button--secondary {
    background: rgba(255, 255, 255, .20);
    color: rgba(255, 255, 255, .90);
}

.auth-button--secondary:hover {
    background: rgba(255, 255, 255, .26);
}

.auth-bottom-note {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, .50);
    font-size: 13px;
    line-height: 1.5;
}

@keyframes authFloat {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    100% {
        transform: translate3d(5vw, 4vh, 0) scale(1.08);
    }
}

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

    .auth-card {
        min-height: auto;
    }

    .auth-content {
        min-height: 640px;
        width: min(520px, 100%);
    }

    .auth-logo {
        margin-bottom: 70px;
    }
}

@media (max-width: 640px) {
    .auth-shell {
        padding: 12px;
        align-items: stretch;
    }

    .auth-card {
        width: 100%;
        min-height: calc(100vh - 24px);
        border-radius: 20px;
    }

    .auth-card::before {
        background:
            linear-gradient(90deg, rgba(10, 14, 24, .90) 0%, rgba(10, 14, 24, .78) 54%, rgba(10, 14, 24, .58) 100%),
            url("/assets/admin/img/auth-bg.jpg");
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }

    .auth-content {
        min-height: calc(100vh - 24px);
        padding: 24px 18px 28px;
    }

    .auth-logo {
        margin-bottom: 58px;
    }

    .auth-logo__image {
        width: 180px;
    }

    .auth-title {
        margin-bottom: 24px;
        font-size: 30px;
        letter-spacing: .02em;
    }

    .auth-field__input {
        height: 74px;
    }

    .auth-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        margin-top: 18px;
    }

    .auth-button {
        width: 100%;
    }
}