

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, sans-serif;
    background: #0a0e12;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}


.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.bg-blur {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.bg-blur-1 {
    width: 500px;
    height: 500px;
    background: #8B5E3C;
    top: -150px;
    right: -100px;
    opacity: 0.3;
    animation-delay: 0s;
}

.bg-blur-2 {
    width: 600px;
    height: 600px;
    background: #2D5F4C;
    bottom: -200px;
    left: -150px;
    opacity: 0.25;
    animation-delay: 3s;
}

.bg-blur-3 {
    width: 400px;
    height: 400px;
    background: #C9A87C;
    top: 40%;
    left: 20%;
    opacity: 0.2;
    animation-delay: 6s;
}

.bg-blur-4 {
    width: 350px;
    height: 350px;
    background: #4A7C6B;
    bottom: 20%;
    right: 10%;
    opacity: 0.2;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}


.container {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 20px;
}

.login-wrapper {
    max-width: 500px;
    margin: 0 auto;
}


.login-brand {
    text-align: center;
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease-out;
}

.logo-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #E8D5B5 0%, #C9A87C 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 15px 35px rgba(201, 168, 124, 0.3);
}

.logo-icon i {
    font-size: 36px;
    color: #1a1f24;
}

.login-brand h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #E8D5B5 0%, #C9A87C 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.login-brand p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-weight: 400;
}


.login-card {
    background: rgba(18, 24, 30, 0.7);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 40px 36px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.6s ease-out 0.1s both;
    overflow: hidden;
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #C9A87C, #E8D5B5, #C9A87C, transparent);
    opacity: 0.6;
}


.card-header {
    text-align: center;
    margin-bottom: 36px;
}

.card-header h2 {
    font-size: 26px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.card-header p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}


.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 16px;
    margin-bottom: 28px;
    font-size: 14px;
    animation: shake 0.4s ease-out;
}

.alert-error {
    background: rgba(220, 70, 70, 0.15);
    border: 1px solid rgba(220, 70, 70, 0.3);
    color: #ff8a8a;
}

.alert-error i {
    font-size: 18px;
    color: #ff6b6b;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}


.input-group {
    margin-bottom: 28px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.input-icon {
    width: 48px;
    height: 56px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.input-icon i {
    font-size: 20px;
    color: rgba(201, 168, 124, 0.7);
    transition: all 0.3s ease;
}

.input-group:focus-within .input-icon {
    background: rgba(201, 168, 124, 0.1);
}

.input-group:focus-within .input-icon i {
    color: #C9A87C;
}

.input-field {
    flex: 1;
    position: relative;
}

.input-field input {
    width: 100%;
    height: 56px;
    background: rgba(255, 255, 255, 0.03);
    border: none;
    border-radius: 18px;
    padding: 0 20px;
    padding-top: 18px;
    font-size: 16px;
    color: #fff;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.input-field input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.06);
}

.input-field label {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 15px;
    pointer-events: none;
    transition: all 0.2s ease;
}

.input-field.focused label,
.input-field input:focus + label,
.input-field input:not(:placeholder-shown) + label {
    top: 12px;
    transform: translateY(0);
    font-size: 11px;
    color: #C9A87C;
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #C9A87C;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.input-field input:focus ~ .input-border {
    left: 0;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 18px;
    transition: color 0.3s ease;
    padding: 8px;
}

.password-toggle:hover {
    color: #C9A87C;
}


.btn-login {
    width: 100%;
    height: 56px;
    background: linear-gradient(135deg, #C9A87C 0%, #B8926A 100%);
    border: none;
    border-radius: 18px;
    font-size: 16px;
    font-weight: 600;
    color: #1a1f24;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    margin-top: 16px;
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(201, 168, 124, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.btn-login:hover i {
    transform: translateX(5px);
}


.form-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}

.decor-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.form-footer span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 1px;
}

.login-footer {
    text-align: center;
    margin-top: 32px;
}

.login-footer p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.25);
}


@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


@media (max-width: 550px) {
    .login-card {
        padding: 32px 24px;
    }
    
    .logo-icon {
        width: 60px;
        height: 60px;
    }
    
    .logo-icon i {
        font-size: 30px;
    }
    
    .login-brand h1 {
        font-size: 24px;
    }
    
    .card-header h2 {
        font-size: 22px;
    }
    
    .input-group {
        gap: 10px;
    }
    
    .input-icon {
        width: 44px;
        height: 52px;
    }
    
    .input-field input {
        height: 52px;
        font-size: 14px;
    }
    
    .btn-login {
        height: 52px;
    }
}

@media (max-width: 450px) {
    .input-icon {
        display: none;
    }
    
    .login-card {
        padding: 28px 20px;
    }
}

/* COMPACT LOGIN 80% */
.login-wrapper {
    max-width: 420px !important;
}

.login-brand {
    margin-bottom: 22px !important;
}

.logo-icon {
    width: 56px !important;
    height: 56px !important;
    border-radius: 18px !important;
    margin-bottom: 14px !important;
}

.logo-icon i {
    font-size: 28px !important;
}

.login-brand h1 {
    font-size: 23px !important;
    margin-bottom: 5px !important;
}

.login-brand p {
    font-size: 12px !important;
}

.login-card {
    padding: 30px 28px !important;
    border-radius: 24px !important;
}

.card-header {
    margin-bottom: 26px !important;
}

.card-header h2 {
    font-size: 22px !important;
    margin-bottom: 5px !important;
}

.card-header p {
    font-size: 12px !important;
}

.input-group {
    margin-bottom: 20px !important;
    gap: 10px !important;
}

.input-icon {
    width: 42px !important;
    height: 48px !important;
    border-radius: 14px !important;
}

.input-icon i {
    font-size: 17px !important;
}

.input-field input {
    height: 48px !important;
    border-radius: 14px !important;
    padding: 0 16px !important;
    padding-top: 15px !important;
    font-size: 14px !important;
}

.input-field label {
    left: 16px !important;
    font-size: 13px !important;
}

.input-field.focused label,
.input-field input:focus + label,
.input-field input:not(:placeholder-shown) + label {
    top: 9px !important;
    font-size: 10px !important;
}

.password-toggle {
    right: 10px !important;
    font-size: 16px !important;
}

.btn-login {
    height: 48px !important;
    border-radius: 14px !important;
    font-size: 14px !important;
    margin-top: 10px !important;
}

.btn-login i {
    font-size: 16px !important;
}

.form-footer {
    margin-top: 24px !important;
}

.decor-line {
    width: 45px !important;
}

.login-footer {
    margin-top: 22px !important;
}

.alert {
    padding: 11px 14px !important;
    border-radius: 13px !important;
    margin-bottom: 20px !important;
    font-size: 12px !important;
}

/* чтобы на маленьких экранах тоже не было огромным */
@media (max-width: 550px) {
    .container {
        padding: 14px !important;
    }

    .login-wrapper {
        max-width: 390px !important;
    }

    .login-card {
        padding: 26px 22px !important;
        border-radius: 22px !important;
    }

    .login-brand {
        margin-bottom: 18px !important;
    }

    .logo-icon {
        width: 50px !important;
        height: 50px !important;
    }

    .logo-icon i {
        font-size: 25px !important;
    }

    .login-brand h1 {
        font-size: 21px !important;
    }

    .card-header h2 {
        font-size: 20px !important;
    }

    .input-field input,
    .btn-login {
        height: 46px !important;
    }
}