/* ==========================================
   LOGIN PAGE STYLES - css/login.css
   ========================================== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background-color: #f0f4f8;
    position: relative;
    overflow: hidden;
    font-family: 'Cairo', sans-serif;
}

/* Background Decorations */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    opacity: 0.6;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-light);
    top: -100px;
    right: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-color);
    bottom: -50px;
    left: -50px;
}

/* Container & Card */
.login-container {
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 2;
    animation: fadeInDown 0.6s ease-out;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Card Header */
.card-header {
    text-align: center;
    margin-bottom: 35px;
    position: relative;
}

.back-home {
    position: absolute;
    top: -20px;
    right: -20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    padding: 8px 15px;
    border-radius: var(--border-radius-md);
}

.back-home:hover {
    color: var(--primary-color);
    background: rgba(52, 73, 152, 0.05);
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.logo img {
    height: 60px;
    width: auto;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.welcome-text h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-weight: 800;
}

.welcome-text p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    right: 15px;
    color: var(--text-lighter);
    font-size: 1.1rem;
    transition: var(--transition);
}

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    padding: 14px 45px 14px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-dark);
    transition: var(--transition);
    background: var(--white);
    outline: none;
    appearance: none;
    /* For select */
}

/* Adjust padding for password toggle icon */
.input-wrapper input[type="password"] {
    padding-left: 45px;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(52, 73, 152, 0.1);
}

.input-wrapper input:focus+.input-icon,
.input-wrapper select:focus+.input-icon {
    color: var(--primary-color);
}

.select-arrow {
    position: absolute;
    left: 15px;
    color: var(--text-light);
    font-size: 0.8rem;
    pointer-events: none;
}

.password-toggle {
    position: absolute;
    left: 15px;
    background: none;
    border: none;
    color: var(--text-lighter);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--primary-color);
}

.forgot-link {
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Remember Me */
.form-options {
    margin: 5px 0;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-light);
    user-select: none;
}

.remember-me input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* Button */
.btn-login {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border: none;
    padding: 16px;
    border-radius: var(--border-radius-md);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(52, 73, 152, 0.3);
}

.btn-login:active {
    transform: translateY(-1px);
}

/* Footer Section */
.register-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.register-footer p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.register-footer a {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
}

.register-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Footer Info */
.login-footer-info {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 0.8rem;
    text-align: center;
}

.info-item i {
    font-size: 1.2rem;
    color: var(--primary-lighter);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styles */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }

    .login-footer-info {
        flex-direction: column;
        gap: 20px;
    }

    .back-home {
        top: -35px;
        right: 0;
    }
}

/* Loader Styles */
.loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading .btn-text,
.loading i.fa-sign-in-alt {
    display: none;
}

.loading .loader {
    display: block;
}