/* static/css/login.css */

/* ===== СТРАНИЦА ВХОДА ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #F2F3F5;
    transition: background 0.5s ease;
}

/* ===== АНИМИРОВАННЫЙ ФОН (как в личном кабинете) ===== */
.auth-page .bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #F2F3F5 0%, #E8EAEF 50%, #F2F3F5 100%);
    transition: background 0.6s ease;
}

.auth-page .bg-animated .blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.35;
    animation: float 20s ease-in-out infinite;
    transition: opacity 0.6s ease;
}

.auth-page .bg-animated .blob-1 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #4D5CFF 0%, #8B5CF6 100%);
    top: -50px;
    right: -50px;
    animation-delay: 0s;
}

.auth-page .bg-animated .blob-2 {
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, #06B6D4 0%, #4D5CFF 100%);
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.auth-page .bg-animated .blob-3 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #F472B6 0%, #8B5CF6 100%);
    top: 40%;
    left: 50%;
    animation-delay: -10s;
}

.auth-page .bg-animated .blob-4 {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #34D399 0%, #06B6D4 100%);
    top: 60%;
    right: 10%;
    animation-delay: -15s;
}

@media (min-width: 768px) {
    .auth-page .bg-animated .blob {
        filter: blur(80px);
        opacity: 0.4;
    }
    .auth-page .bg-animated .blob-1 {
        width: 400px;
        height: 400px;
        top: -150px;
        right: -80px;
    }
    .auth-page .bg-animated .blob-2 {
        width: 350px;
        height: 350px;
        bottom: -100px;
        left: -80px;
    }
    .auth-page .bg-animated .blob-3 {
        width: 280px;
        height: 280px;
    }
    .auth-page .bg-animated .blob-4 {
        width: 220px;
        height: 220px;
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -50px) scale(1.05);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    75% {
        transform: translate(-40px, -30px) scale(1.02);
    }
}

/* ===== ХЕДЕР ===== */
.auth-page header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.75rem 0;
    transition: all 0.4s ease;
}

.auth-page .header-block {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-page .header-block img {
    max-height: 40px;
    transition: filter 0.4s ease;
}

.auth-page .form-check-label {
    color: #1A1A1A;
    transition: color 0.4s ease;
}

/* ===== КАРТОЧКА ВХОДА ===== */
.auth-page .container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    margin-top: 80px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2.5rem;
    padding: 3rem 2.5rem;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(77, 92, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.auth-icon {
    width: 64px;
    height: 64px;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, #4D5CFF 0%, #8B5CF6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.auth-icon i {
    font-size: 1.75rem;
    color: white;
}

.auth-card h2 {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 0.5rem;
    transition: color 0.4s ease;
}

.auth-card .subtitle {
    color: #6B7280;
    font-size: 1rem;
    margin-bottom: 2rem;
    transition: color 0.4s ease;
}

/* ===== ПОЛЯ ВВОДА ===== */
.auth-card .form-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.auth-card .input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    z-index: 2;
    transition: color 0.3s ease;
    pointer-events: none;
}

.auth-card .form-control {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    background: rgba(242, 243, 245, 0.7);
    border: 2px solid transparent;
    border-radius: 1rem;
    font-size: 1rem;
    color: #1A1A1A;
    transition: all 0.3s ease;
}

.auth-card .form-control:focus {
    background: rgba(255, 255, 255, 0.9);
    border-color: #4D5CFF;
    box-shadow: 0 0 0 4px rgba(77, 92, 255, 0.08);
    outline: none;
}

.auth-card .form-control::placeholder {
    color: #9CA3AF;
}

.auth-card .form-control:focus + .input-icon,
.auth-card .form-control:focus ~ .input-icon {
    color: #4D5CFF;
}

/* ===== КНОПКА ===== */
.auth-card .btn-primary {
    width: 100%;
    justify-content: center;
    padding: 0.875rem;
    font-size: 1rem;
    border-radius: 1rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #4D5CFF 0%, #8B5CF6 100%);
    border: none;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(77, 92, 255, 0.3);
}

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

/* ===== АЛАРМЫ ===== */
.auth-card .alert {
    border-radius: 1rem;
    padding: 0.875rem 1.25rem;
    border: none;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-card .alert-danger {
    background: rgba(239, 68, 68, 0.08);
    color: #DC2626;
}

/* ===== ССЫЛКИ ===== */
.auth-card .links {
    margin-top: 1.5rem;
    text-align: center;
    color: #6B7280;
    font-size: 0.875rem;
    transition: color 0.4s ease;
}

.auth-card .links a {
    color: #4D5CFF;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.auth-card .links a:hover {
    color: #3A45CC;
    text-decoration: underline;
}

.auth-card .links .text-muted {
    color: #9CA3AF;
}

/* ================================================ */
/* ===== ТЁМНАЯ ТЕМА ===== */
/* ================================================ */

.dark-mode .auth-page {
    background: #0f0f1a;
}

.dark-mode .auth-page .bg-animated {
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #0f0f1a 100%);
}

.dark-mode .auth-page .bg-animated .blob {
    opacity: 0.12;
}

.dark-mode .auth-page .bg-animated .blob-1 {
    background: linear-gradient(135deg, #4D5CFF 0%, #8B5CF6 100%);
}

.dark-mode .auth-page .bg-animated .blob-2 {
    background: linear-gradient(135deg, #06B6D4 0%, #4D5CFF 100%);
}

.dark-mode .auth-page .bg-animated .blob-3 {
    background: linear-gradient(135deg, #F472B6 0%, #8B5CF6 100%);
}

.dark-mode .auth-page .bg-animated .blob-4 {
    background: linear-gradient(135deg, #34D399 0%, #06B6D4 100%);
}

.dark-mode .auth-page header {
    background: rgba(18, 18, 30, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.dark-mode .auth-page .header-block img {
    filter: brightness(0.9) invert(1) hue-rotate(180deg);
}

.dark-mode .auth-page .form-check-label {
    color: #E8E8F0;
}

.dark-mode .auth-card {
    background: rgba(30, 30, 50, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.dark-mode .auth-card::before {
    background: radial-gradient(circle, rgba(77, 92, 255, 0.08) 0%, transparent 70%);
}

.dark-mode .auth-card h2 {
    color: #E8E8F0;
}

.dark-mode .auth-card .subtitle {
    color: #8888A0;
}

.dark-mode .auth-card .form-control {
    background: rgba(40, 40, 60, 0.7);
    color: #E8E8F0;
}

.dark-mode .auth-card .form-control:focus {
    background: rgba(40, 40, 60, 0.9);
    border-color: #4D5CFF;
    box-shadow: 0 0 0 4px rgba(77, 92, 255, 0.15);
}

.dark-mode .auth-card .form-control::placeholder {
    color: #6C6C8A;
}

.dark-mode .auth-card .input-icon {
    color: #6C6C8A;
}

.dark-mode .auth-card .form-control:focus + .input-icon,
.dark-mode .auth-card .form-control:focus ~ .input-icon {
    color: #8A9AFF;
}

.dark-mode .auth-card .btn-primary {
    background: linear-gradient(135deg, #4D5CFF 0%, #8B5CF6 100%);
}

.dark-mode .auth-card .btn-primary:hover {
    box-shadow: 0 8px 30px rgba(77, 92, 255, 0.4);
}

.dark-mode .auth-card .alert-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

.dark-mode .auth-card .links {
    color: #8888A0;
}

.dark-mode .auth-card .links a {
    color: #8A9AFF;
}

.dark-mode .auth-card .links a:hover {
    color: #AABAFF;
}

.dark-mode .auth-card .links .text-muted {
    color: #6C6C8A;
}

/* ================================================ */
/* ===== АДАПТИВНОСТЬ ===== */
/* ================================================ */

@media (max-width: 576px) {
    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 2rem;
    }

    .auth-card h2 {
        font-size: 1.5rem;
    }

    .auth-page .container {
        margin-top: 70px;
        padding: 1rem;
    }

    .auth-icon {
        width: 48px;
        height: 48px;
        border-radius: 1rem;
    }

    .auth-icon i {
        font-size: 1.25rem;
    }

    .auth-card .form-control {
        padding: 0.75rem 1rem 0.75rem 2.75rem;
        font-size: 0.9rem;
    }

    .auth-card .btn-primary {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}