/* Login Form Styles - Binary Biological Equipments */

:root {
    --primary-green: #62e176;
    --secondary-green: #50ae5c;
    --light-bg: #F0FEE8;
    --dark-footer: #0f1017;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --dark-gray: #6c757d;
    --text-dark: #2c3e50;
    --error-red: #e74c3c;
    --success-green: #27ae60;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--light-bg) 0%, rgba(98, 225, 118, 0.1) 100%);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Floating Icons Animation */
.floating-icons {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.floating-icons i {
    position: absolute;
    color: rgba(98, 225, 118, 0.15);
    font-size: 2rem;
    animation: float 6s ease-in-out infinite;
}

/* Distributed floating icons */
.floating-icons i:nth-child(1) { top: 12%; left: 10%; animation-delay: 0s; font-size: 1.8rem; }
.floating-icons i:nth-child(2) { top: 15%; left: 75%; animation-delay: 1.5s; font-size: 2.2rem; }
.floating-icons i:nth-child(3) { top: 25%; left: 45%; animation-delay: 3s; font-size: 1.6rem; }
.floating-icons i:nth-child(4) { top: 45%; left: 1%; animation-delay: 4.5s; font-size: 2rem; }
.floating-icons i:nth-child(5) { top: 35%; left: 85%; animation-delay: 0.5s; font-size: 1.9rem; }
.floating-icons i:nth-child(6) { top: 60%; left: 50%; animation-delay: 2.5s; font-size: 1.7rem; }
.floating-icons i:nth-child(7) { bottom: 25%; left: 25%; animation-delay: 1s; font-size: 2.1rem; }
.floating-icons i:nth-child(8) { bottom: 15%; left: 70%; animation-delay: 3.5s; font-size: 1.8rem; }
.floating-icons i:nth-child(9) { bottom: 30%; left: 90%; animation-delay: 5s; font-size: 1.5rem; }

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-10px) rotate(-3deg);
        opacity: 0.9;
    }
    75% {
        transform: translateY(-15px) rotate(2deg);
        opacity: 0.8;
    }
}

/* Main Login Container */
.login-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.employee-image-section {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* ensures image won’t overflow */
}

.employee-login-image {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* fills the div while maintaining aspect ratio */
}

/* Left Side - Image/Branding Section */
.login-image-section {
    flex: 1;
    background:
        linear-gradient(135deg, rgba(98, 225, 118, 0.4), rgba(80, 174, 92, 0.4)),
        url('/static/img/login-bg.jpg') center center / cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    overflow: hidden;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(98, 225, 118, 0.8), rgba(80, 174, 92, 0.6));
    z-index: 1;
}

.brand-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    animation: fadeInLeft 1s ease-out;
}

.logo-container {
    margin-bottom: 3rem;
}

.logo-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
    animation: heartbeat 2s infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}

.logo-container h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

.feature-highlights {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    opacity: 0.95;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateX(10px);
    opacity: 1;
}

.feature-item i {
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
}

/* Right Side - Login Form Section */
.login-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.form-container {
    width: 100%;
    max-width: 450px;
    animation: fadeInRight 1s ease-out;
}

.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.form-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    position: relative;
}

.form-header h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-green), var(--secondary-green));
    border-radius: 2px;
}

.form-header p {
    color: var(--dark-gray);
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* Form Styles */
.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group label i {
    color: var(--primary-green);
    width: 16px;
}

.form-group input {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
    color: var(--text-dark);
    position: relative;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(98, 225, 118, 0.1);
    transform: translateY(-2px);
}

.form-group.focused .input-highlight {
    width: 100%;
}

/* Password Input Container */
.password-input-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--dark-gray);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-green);
    background: rgba(98, 225, 118, 0.1);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e1e8ed;
    border-radius: 4px;
    margin-right: 0.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container input:checked + .checkmark {
    background: var(--primary-green);
    border-color: var(--primary-green);
}

.checkbox-container input:checked + .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 12px;
}

.forgot-password {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: var(--secondary-green);
    text-decoration: underline;
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 1.2rem 2rem;
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(98, 225, 118, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-icon {
    transition: all 0.3s ease;
}

/* Divider */
.divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e8ed;
    z-index: 1;
}

.divider span {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

/* Social Login */
.social-login {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-btn {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    background: var(--white);
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.social-btn:hover {
    border-color: var(--primary-green);
    background: rgba(98, 225, 118, 0.05);
    transform: translateY(-2px);
}

.google-btn:hover {
    border-color: #db4437;
    background: rgba(219, 68, 55, 0.05);
}

.microsoft-btn:hover {
    border-color: #00a1f1;
    background: rgba(0, 161, 241, 0.05);
}

/* Signup Link */
.signup-link {
    text-align: center;
    color: var(--dark-gray);
}

.signup-link a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.signup-link a:hover {
    color: var(--secondary-green);
    text-decoration: underline;
}

/* Message Container */
.message-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.message-container.show {
    opacity: 1;
    transform: translateX(0);
}

.message {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: none;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.message.show {
    display: flex;
}

.message.success {
    background: rgba(39, 174, 96, 0.95);
    color: var(--white);
}

.message.error {
    background: rgba(231, 76, 60, 0.95);
    color: var(--white);
}

/* Animations */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .login-container {
        flex-direction: column;
    }

    .login-image-section {
        min-height: 40vh;
    }

    .brand-content {
        padding: 1.5rem;
    }

    .logo-container h2 {
        font-size: 2rem;
    }

    .feature-highlights {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .login-form-section {
        padding: 1.5rem;
    }

    .form-container {
        max-width: 100%;
    }

    .form-header h1 {
        font-size: 2rem;
    }

    .social-login {
        flex-direction: column;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .floating-icons {
        display: none;
    }

    .message-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }
}

@media (max-width: 576px) {
    .login-image-section {
        min-height: 30vh;
    }

    .logo-container h2 {
        font-size: 1.5rem;
    }

    .logo-icon {
        font-size: 3rem;
    }

    .form-header h1 {
        font-size: 1.8rem;
    }

    .feature-highlights {
        gap: 1rem;
    }

    .feature-item {
        font-size: 1rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-green);
}