﻿:root {
    --primary-color: #6c5ce7;
    --primary-dark: #5649c0;
    --primary-light: #a29bfe;
    --accent-color: #fd79a8;
    --text-color: #2d3436;
    --text-light: #636e72;
    --white: #ffffff;
    --white-transparent: rgba(255, 255, 255, 0.92);
    --glass-shadow: 0 18px 50px rgba(31, 38, 135, 0.14);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.auth-page {
    margin: 0;
    min-height: 100dvh;
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    overflow-x: hidden;
}

.login-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100dvh;
    padding: clamp(16px, 2.5vw, 32px);
    overflow: hidden;
}

.background-animation {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.background-animation .shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.58;
}

.background-animation .shape:nth-child(1) {
    background: var(--primary-color);
    width: 400px;
    height: 400px;
    top: -100px;
    left: -100px;
    animation: float 15s infinite ease-in-out;
}

.background-animation .shape:nth-child(2) {
    background: var(--accent-color);
    width: 300px;
    height: 300px;
    bottom: -50px;
    right: 20%;
    animation: float 18s infinite ease-in-out;
    animation-delay: 2s;
}

.background-animation .shape:nth-child(3) {
    background: var(--primary-light);
    width: 250px;
    height: 250px;
    top: 28%;
    right: -50px;
    animation: float 12s infinite ease-in-out;
    animation-delay: 4s;
}

.background-animation .shape:nth-child(4) {
    background: #00cec9;
    width: 350px;
    height: 350px;
    bottom: 18%;
    left: 14%;
    animation: float 20s infinite ease-in-out;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }

    25% {
        transform: translateY(-20px) translateX(20px);
    }

    50% {
        transform: translateY(20px) translateX(-20px);
    }

    75% {
        transform: translateY(-30px) translateX(-30px);
    }
}

.login-card {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 0.96fr) minmax(320px, 1.04fr);
    width: min(1120px, 100%);
    background: var(--white-transparent);
    border-radius: 28px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    overflow: hidden;
    transition: var(--transition);
}

.login-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.14);
}

.login-form,
.login-welcome {
    padding: clamp(26px, 4vw, 54px);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    background: rgba(255, 255, 255, 0.98);
    min-width: 0;
}

.login-form form,
#account,
#send-code {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.logo-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: auto;
    height: auto;
    margin: 0 0 0.35rem;
}

.logo-full {
    width: clamp(176px, 28vw, 232px);
    height: auto;
    margin: 0;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: 1px;
}

.form-title {
    margin: 0;
    font-size: clamp(1.9rem, 3vw, 2.45rem);
    line-height: 1.08;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-subtitle {
    margin: 0;
    color: var(--text-light);
    font-size: 0.98rem;
    font-weight: 400;
    line-height: 1.65;
    max-width: 42ch;
}

.form-group,
.form-group.floating {
    position: relative;
    margin-bottom: 0;
}

.form-group.floating .form-control {
    width: 100%;
    min-height: 56px;
    padding: 22px 16px 8px 56px;
    border-radius: 14px;
    border: 1px solid rgba(162, 155, 254, 0.24);
    background: rgba(250, 249, 255, 0.96);
    font-size: 0.96rem;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.05);
}

.form-group.floating .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.12);
    background: var(--white);
    outline: none;
}

.form-group.floating .form-control:focus + label,
.form-group.floating .form-control:not(:placeholder-shown) + label,
.form-group.floating.has-value label {
    transform: translateY(-11px) translateX(10px) scale(0.85);
    color: var(--primary-color);
}

.form-group.floating label {
    position: absolute;
    top: 17px;
    left: 48px;
    color: var(--text-light);
    font-size: 0.94rem;
    font-weight: 400;
    pointer-events: none;
    transition: var(--transition);
    transform-origin: left top;
    background: transparent;
}

.form-group.floating .icon {
    position: absolute;
    left: 16px;
    top: 16px;
    color: var(--text-light);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group.floating .form-control:focus ~ .icon,
.form-group.floating.has-value .icon {
    color: var(--primary-color);
}

.form-group.floating .password-toggle {
    position: absolute;
    right: 10px;
    top: 8px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.form-group.floating .password-toggle:hover {
    color: var(--primary-color);
    background: rgba(108, 92, 231, 0.08);
}

.form-group.floating .password-toggle:focus-visible {
    outline: 2px solid rgba(108, 92, 231, 0.28);
    outline-offset: 2px;
}

.form-group.floating input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px rgba(250, 249, 255, 0.96) inset;
    -webkit-text-fill-color: var(--text-color);
    transition: background-color 9999s ease-in-out 0s;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: 0.1rem 0;
}

.checkbox-container {
    display: inline-flex;
    align-items: center;
    position: relative;
    padding-left: 32px;
    cursor: pointer;
    user-select: none;
    min-height: 20px;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    transition: var(--transition);
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--primary-color);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    font-size: 0.92rem;
    color: var(--text-light);
}

.forgot-password,
.omit-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-password:hover,
.omit-link a:hover {
    color: var(--accent-color);
}

.omit-link {
    text-align: center;
    margin-top: 0.35rem;
}

.btn-primary {
    width: 100%;
    min-height: 54px;
    padding: 14px 16px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(108, 92, 231, 0.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(108, 92, 231, 0.34);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-text,
.btn-icon {
    position: relative;
    z-index: 1;
}

.btn-icon {
    transition: var(--transition);
}

.btn-primary:hover .btn-icon {
    transform: translateX(4px);
}

a.btn.btn-primary {
    text-decoration: none;
}

.auth-summary,
.text-danger[role="alert"] {
    margin: 0;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.18);
    color: #c0392b;
    font-size: 0.9rem;
}

.form-group .text-danger {
    display: block;
    margin-top: 0.45rem;
    color: #e74c3c;
    font-size: 0.82rem;
    font-weight: 500;
    padding-left: 0;
}

.support-email {
    margin-top: auto;
    padding-top: 0.5rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.support-email i {
    font-size: 1rem;
}

.login-welcome {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    position: relative;
    overflow: hidden;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.login-welcome::before,
.login-welcome::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.login-welcome::before {
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
}

.login-welcome::after {
    bottom: -80px;
    left: -80px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
}

.welcome-content {
    position: relative;
    z-index: 2;
    max-width: 32rem;
}

.welcome-content h2 {
    font-size: clamp(1.75rem, 2.6vw, 2.2rem);
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.18;
}

.welcome-content h2 span {
    font-weight: 300;
}

.welcome-content p {
    line-height: 1.8;
    margin-bottom: 0;
    font-weight: 300;
    opacity: 0.92;
    font-size: 0.97rem;
}

.features {
    display: grid;
    gap: 1rem;
    margin-top: 1.6rem;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 0.95rem;
    padding: 0.95rem 1rem;
    margin-bottom: 0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
}

.feature-icon {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.feature-text h4 {
    font-size: 0.98rem;
    margin: 0 0 0.25rem;
    font-weight: 600;
}

.feature-text p {
    font-size: 0.86rem;
    margin: 0;
    opacity: 0.82;
    line-height: 1.55;
}

.setup-steps {
    display: grid;
    gap: 0.9rem;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: auth-step;
}

.setup-steps li {
    position: relative;
    padding: 0.95rem 1rem 0.95rem 3.3rem;
    border-radius: 18px;
    background: rgba(108, 92, 231, 0.06);
    line-height: 1.65;
}

.setup-steps li::before {
    counter-increment: auth-step;
    content: counter(auth-step);
    position: absolute;
    left: 1rem;
    top: 1rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    font-size: 0.84rem;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.18);
}

.qr-shell,
#qrCode {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 224px);
    min-height: 224px;
    margin: 1rem auto 0;
    padding: 0.85rem;
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(162, 155, 254, 0.2);
    box-shadow: 0 14px 30px rgba(108, 92, 231, 0.08);
}

.auth-status-actions {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-top: 1.2rem;
}

.auth-help-card {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(108, 92, 231, 0.06);
    color: var(--text-light);
    line-height: 1.58;
}

.auth-help-card strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text-color);
}

@media (max-width: 992px) {
    .login-card {
        grid-template-columns: 1fr;
        max-width: 620px;
    }

    .login-welcome {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.14);
    }

    .welcome-content {
        max-width: 100%;
    }

    .feature {
        text-align: left;
    }
}

@media (max-width: 576px) {
    .login-container {
        padding: 14px;
    }

    .login-card {
        border-radius: 24px;
    }

    .login-form,
    .login-welcome {
        padding: 22px;
    }

    .logo-container {
        justify-content: center;
        margin-bottom: 0;
    }

    .logo-full {
        width: min(62vw, 210px);
    }

    .form-options {
        flex-direction: column;
        align-items: stretch;
    }

    .forgot-password {
        text-align: left;
    }

    .feature,
    .setup-steps li,
    .auth-help-card,
    .qr-shell,
    #qrCode {
        border-radius: 16px;
    }

    .setup-steps li {
        padding-left: 3rem;
    }
}
