/* assets/css/login.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #7209b7;
    --success-color: #4cc9f0;
    --danger-color: #f72585;
    --warning-color: #f8961e;
    --dark-color: #1a1a2e;
    --light-color: #f8f9fa;
    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-color);
    position: relative;
    overflow-x: hidden;
}

.login-container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
    z-index: 100;
    position: relative;
}

.login-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 40px;
    animation: fadeIn 0.6s ease-out;
    position: relative;
    z-index: 10;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.logo svg {
    flex-shrink: 0;
}

.logo h1 {
    font-size: 28px;
    color: var(--dark-color);
    font-weight: 700;
}

.logo h1 span {
    color: var(--primary-color);
}

.login-subtitle {
    color: #666;
    font-size: 16px;
    margin-top: 10px;
    opacity: 0.8;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-error {
    background: rgba(247, 37, 133, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(247, 37, 133, 0.2);
}

.alert-success {
    background: rgba(76, 201, 240, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(76, 201, 240, 0.2);
}

.login-form .form-group {
    margin-bottom: 25px;
    position: relative;
}

.login-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-size: 14px;
    cursor: pointer;
}

.login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: var(--transition);
    background: white;
    color: var(--dark-color);
    font-family: inherit;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.login-form input:hover {
    border-color: #c1c9d2;
}

.login-form input::placeholder {
    color: #999;
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
    text-transform: none;
    letter-spacing: normal;
    font-family: inherit;
    position: relative;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    width: 100%;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(67, 97, 238, 0.3);
}

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

.btn-block {
    width: 100%;
}

.login-footer {
    margin-top: 30px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.login-footer p {
    color: #666;
    font-size: 12px;
    opacity: 0.7;
}

.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite ease-in-out;
    pointer-events: none;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -150px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: -100px;
    animation-delay: 5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 10%;
    animation-delay: 10s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    33% {
        transform: translateY(-20px) rotate(120deg);
    }

    66% {
        transform: translateY(20px) rotate(240deg);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .login-container {
        padding: 15px;
    }

    .login-card {
        padding: 30px 25px;
    }

    .logo {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .logo h1 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 25px 20px;
    }

    .login-form input {
        padding: 10px 14px;
    }

    .btn {
        padding: 12px 20px;
    }
}

/* Loader */
.loader-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Улучшения для доступности */
.login-form input:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Иконки в полях ввода */
.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-left: 40px;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

/* Показать/скрыть пароль */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    font-size: 18px;
}

.password-toggle:hover {
    color: var(--primary-color);
}