/* ========== Отключаем нативный глаз браузера ========== */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

input[type="password"]::-webkit-credentials-auto-fill-button {
    visibility: hidden;
    display: none !important;
    pointer-events: none;
}

input[type="password"]::-webkit-textfield-decoration-container {
    display: none;
}

input[type="password"]::-webkit-caps-lock-indicator {
    display: none;
}

/* ========== Fonts ========== */
@font-face {
    font-family: 'Inter';
    src: url('/css/fonts/inter-latin-400-normal.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/css/fonts/inter-latin-500-normal.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/css/fonts/inter-latin-600-normal.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/css/fonts/inter-latin-700-normal.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ========== Variables ========== */
:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --primary-light: #38bdf8;
    --accent: #0ea5e9;
    --bg: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.75);
    --success: #10b981;
    --error: #ef4444;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: rgba(14, 165, 233, 0.15);
}

/* ========== Base ========== */
.page {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page__content {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 16px;
}

/* ========== Parallax ========== */
.parallax {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.parallax__layer {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: transform 0.15s ease-out;
    will-change: transform;
}

.parallax__layer--bg {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f8fafc 100%), linear-gradient(rgba(14, 165, 233, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(14, 165, 233, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
}

.parallax__layer--silhouettes {
    bottom: 0;
    left: 0;
    height: 60%;
}

.parallax__silhouette {
    position: absolute;
    bottom: 0;
    opacity: 0.04;
    fill: var(--primary);
}

.parallax__silhouette--left {
    left: -5%;
    height: 50%;
}

.parallax__silhouette--center {
    left: 30%;
    height: 35%;
}

.parallax__silhouette--right {
    right: -5%;
    height: 55%;
}

.parallax__layer--precision {
    top: 0;
    left: 0;
}

.precision {
    position: absolute;
    fill: none;
    stroke: var(--primary-light);
    stroke-width: 1.5;
    opacity: 0.12;
}

.precision--1 {
    top: 10%;
    left: 5%;
    width: 120px;
    height: 120px;
    animation: spin 40s linear infinite;
}

.precision--2 {
    top: 55%;
    right: 8%;
    width: 140px;
    height: 140px;
    animation: spin-reverse 45s linear infinite;
}

.precision--3 {
    bottom: 20%;
    left: 12%;
    width: 80px;
    height: 80px;
    animation: spin 35s linear infinite;
}

.precision--4 {
    top: 20%;
    right: 25%;
    width: 90px;
    height: 90px;
    animation: spin-reverse 38s linear infinite;
}

.precision--5 {
    top: 45%;
    left: 40%;
    width: 60px;
    height: 60px;
    animation: spin 28s linear infinite;
}

.precision--6 {
    bottom: 15%;
    right: 15%;
    width: 70px;
    height: 70px;
    animation: spin-reverse 32s linear infinite;
}

.precision--7 {
    top: 15%;
    left: 45%;
    width: 50px;
    height: 50px;
    animation: spin 25s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes spin-reverse {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

.parallax__layer--particles {
    top: 0;
    left: 0;
}

.parallax__particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float-up linear infinite;
    background: var(--accent);
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 0.15;
    }

    90% {
        opacity: 0.15;
    }

    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

/* ========== Login Card ========== */
.login-card {
    position: relative;
    width: 100%;
    max-width: 380px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px 28px;
    box-shadow: 0 20px 40px rgba(14, 165, 233, 0.08);
    overflow: hidden;
}

.login-card__decor {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    opacity: 0.08;
    pointer-events: none;
}

.login-card__decor--top-left {
    top: -40px;
    left: -40px;
    background: var(--primary);
}

.login-card__decor--bottom-right {
    bottom: -40px;
    right: -40px;
    background: var(--accent);
}

.login-card__header {
    text-align: center;
    margin-bottom: 28px;
}

.login-card__logo-img {
    display: block;
    max-width: 160px;
    height: auto;
    margin: 0 auto 16px;
}

.login-card__title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0;
}

/* ========== Form ========== */
.form__group {
    margin-bottom: 20px;
}

.form__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.form__input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form__input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    opacity: 0.5;
    pointer-events: none;
}

.form__input {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 42px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: var(--text-main);
    background: rgba(241, 245, 249, 0.6);
    border: 1.5px solid transparent;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
}

.form__input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.form__input:hover {
    background: rgba(241, 245, 249, 0.8);
}

.form__input:focus {
    background: white;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.form__input--error {
    border-color: var(--error) !important;
    background: rgba(239, 68, 68, 0.04) !important;
}

.form__input--error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

.form__password-toggle {
    position: absolute;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: color 0.2s ease;
    padding: 0;
}

.form__password-toggle:hover {
    color: var(--primary);
}

.form__eye-icon {
    width: 18px;
    height: 18px;
}

.form__error {
    display: none;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 12px;
    color: var(--error);
    font-weight: 500;
}

.form__error--visible {
    display: flex;
}

.form__error-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ========== Options ========== */
.form__options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.checkbox__input {
    display: none;
}

.checkbox__box {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background: rgba(241, 245, 249, 0.6);
}

.checkbox__input:checked+.checkbox__box {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox__icon {
    width: 12px;
    height: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.checkbox__input:checked+.checkbox__box .checkbox__icon {
    opacity: 1;
}

.checkbox__text {
    user-select: none;
}

.form__forgot-link {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.form__forgot-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ========== Button ========== */
.btn {
    position: relative;
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn--submit {
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: white;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
}

.btn--submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.4);
}

.btn--submit:active:not(:disabled) {
    transform: translateY(0);
}

.btn--loading {
    pointer-events: none;
}

.btn__text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s ease;
}

.btn--loading .btn__text {
    opacity: 0;
}

.btn__icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.btn--submit:hover:not(:disabled) .btn__icon {
    transform: translateX(4px);
}

.btn__spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.btn--loading .btn__spinner {
    opacity: 1;
}

/* ========== Shake Animation ========== */
.login-card--shake {
    animation: shake 0.5s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-8px);
    }

    40% {
        transform: translateX(8px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

/* ========== Overlay ========== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.overlay--active {
    opacity: 1;
    pointer-events: auto;
}

.overlay__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
}

.overlay__content {
    position: relative;
    z-index: 2;
    background: white;
    border-radius: 18px;
    padding: 32px;
    max-width: 340px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(15, 23, 42, 0.25);
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.overlay--active .overlay__content {
    transform: scale(1);
}

.overlay__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.overlay__icon--error {
    background: linear-gradient(135deg, var(--error), #dc2626);
}

.overlay__icon img {
    width: 28px;
    height: 28px;
}

.overlay__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.overlay__subtitle {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ========== Responsive ========== */
@media (max-width: 480px) {
    .login-card {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .login-card__title {
        font-size: 20px;
    }

    .login-card__logo-img {
        max-width: 140px;
    }
}