/*
 * Modern Authentication Pages Styling
 * Login, Reset Password, and Registration Pages
 */

/* ========================================
   Login Page Background
   ======================================== */
.fix-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.fix-header::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -100px;
    left: -100px;
    animation: float 6s ease-in-out infinite;
}

.fix-header::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -150px;
    right: -150px;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-20px) translateX(20px);
    }
}

/* ========================================
   Login Card/Form Container
   ======================================== */
.unix-login {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    padding: 50px 40px;
    max-width: 480px;
    width: 100%;
    margin: 40px auto;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.login-logo {
    text-align: center;
    margin-bottom: 35px;
}

.login-logo img {
    max-width: 120px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.login-logo h2 {
    color: #1e293b;
    font-weight: 700;
    font-size: 28px;
    margin-top: 20px;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

/* Fix for login heading - stronger override */
.login-form h2,
.login-content h2,
.unix-login h2 {
    color: #1e293b !important;
    font-weight: 700 !important;
    font-size: 28px !important;
    margin-bottom: 30px !important;
    text-align: center !important;
    letter-spacing: normal !important;
    word-spacing: normal !important;
    word-break: normal !important;
    writing-mode: horizontal-tb !important;
    white-space: normal !important;
    display: block !important;
}

.login-logo p {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

/* ========================================
   Login Form Styling
   ======================================== */
.login-form .form-group {
    margin-bottom: 25px;
    position: relative;
    width: 100%;
}

.login-form,
.login-content {
    width: 100%;
    box-sizing: border-box;
}

.login-form label {
    font-weight: 600;
    color: #475569;
    margin-bottom: 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.login-form label i {
    margin-right: 8px;
    color: #6366f1;
}

.login-form .form-control {
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    padding: 14px 18px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #f8fafc;
    width: 100%;
    box-sizing: border-box;
}

.login-form .form-control:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background-color: #ffffff;
    transform: translateY(-2px);
}

.login-form .form-control::placeholder {
    color: #94a3b8;
}

/* ========================================
   Login Button
   ======================================== */
.login-form .btn-login {
    width: 100%;
    padding: 14px 24px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    margin-top: 10px;
    box-sizing: border-box;
}

.login-form .btn-login:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.login-form .btn-login:active {
    transform: translateY(0);
}

/* ========================================
   Remember Me & Forgot Password
   ======================================== */
.login-form .checkbox {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.login-form .checkbox label {
    color: #64748b;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    margin: 0;
}

.login-form .checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #6366f1;
}

.login-form .forgot-password {
    color: #6366f1;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s ease;
}

.login-form .forgot-password:hover {
    color: #4f46e5;
    text-decoration: none;
}

/* ========================================
   Divider
   ======================================== */
.login-divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.login-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

.login-divider span {
    background: #ffffff;
    padding: 0 15px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* ========================================
   Register Link
   ======================================== */
.register-link {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #f1f5f9;
}

.register-link p {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}

.register-link a {
    color: #6366f1;
    font-weight: 600;
    transition: color 0.2s ease;
}

.register-link a:hover {
    color: #4f46e5;
    text-decoration: none;
}

/* ========================================
   Error/Success Messages
   ======================================== */
.login-form .alert {
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 25px;
    border: none;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-form .alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #7f1d1d;
}

.login-form .alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

/* ========================================
   Loading State
   ======================================== */
.btn-login.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   Social Login Buttons (if needed)
   ======================================== */
.social-login {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-login .btn-social {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.social-login .btn-social:hover {
    border-color: #6366f1;
    color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 576px) {
    .unix-login {
        padding: 35px 25px;
        margin: 20px;
        border-radius: 20px;
    }
    
    .login-logo h2 {
        font-size: 24px;
    }
    
    .login-form .btn-login {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* ========================================
   Password Strength Indicator (Optional)
   ======================================== */
.password-strength {
    height: 4px;
    border-radius: 2px;
    background: #e2e8f0;
    margin-top: 8px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-bar.weak {
    width: 33%;
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.password-strength-bar.medium {
    width: 66%;
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.password-strength-bar.strong {
    width: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
}

/* ========================================
   Input Icons
   ======================================== */
.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .form-control {
    padding-left: 45px;
}

.input-icon-wrapper .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 18px;
    pointer-events: none;
    transition: color 0.3s ease;
}

.input-icon-wrapper .form-control:focus ~ .input-icon {
    color: #6366f1;
}

/* ========================================
   Password Toggle Button
   ======================================== */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    font-size: 18px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #6366f1;
}

