﻿/* Global Styles */
body {
    background-color: #898989; /* Light grey background */
    height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
    color: #1c1e21;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Login Container */
.login-container {
    width: 100%; /* Take full width */
    max-width: 360px; /* Max width to avoid stretching too much on large screens */
    background: #CFD4D7; /* Grey container background */
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem 2rem 1rem 2rem;
    text-align: center;
    transition: background 0.4s ease, box-shadow 0.4s ease;
    box-sizing: border-box; /* Ensure padding doesn't affect width */
}

/* Logo */
.logo {
    margin-bottom: 1.5rem;
    max-width: 80%;
}

/* Form Styles */
.form-group {
    text-align: left;
    margin-bottom: 1rem;
}

label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.form-control {
    border-radius: 4px;
    background-color: #fff;
    color: #1c1e21;
    border: 1px solid #ced4da;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.3s ease;
    width: 100%; /* Maintain field width */
}

    .form-control:focus {
        border-color: #80bdff;
        box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    }

.is-invalid {
    color: #dc3545; /* Red text for error hint */
}

/* Button Styles */
.gradient-btn {
    background: linear-gradient(to right, #ffab0a 0%, #009d94 50%, #351755 90%);
    border: none;
    border-radius: 50px;
    padding: 0.6rem 1.5rem;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

    .gradient-btn:hover {
        opacity: 0.9;
        transform: translateY(-2px);
    }

.alert.general-error {
    margin-bottom: 1rem; /* Adjust space before form */
    text-align: left;
    color: #fff;
    background-color: #dc3545;
    border-radius: 5px;
    padding: 10px;
}

/* Responsive Styles */
@media (max-width: 480px) {
    .login-container {
        width: 90vw; /* Allow container to take up more space on small screens */
        max-width: 100%; /* Remove the max-width limitation for smaller screens */
        padding: 2rem; /* Increase padding to make the form more comfortable */
        box-sizing: border-box; /* Ensure padding doesn't shrink the container */
    }

    .logo {
        max-width: 100%; /* Allow logo to stretch more */
        margin-bottom: 2rem; /* Increase margin between logo and form */
    }

    .form-control, .gradient-btn {
        font-size: 1.2rem; /* Make font size larger for better readability */
        padding: 1rem 1.5rem; /* Increase padding for touch-friendly inputs/buttons */
    }

    label {
        font-size: 1.2rem; /* Larger font for labels */
    }

    .gradient-btn {
        padding: 1rem 2rem; /* Increase padding for buttons */
    }
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #121212;
    color: #e4e6eb;
}

    body.dark-mode .login-container {
        background: #1e1e1e;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    }

    body.dark-mode .form-control {
        background-color: #333;
        color: #e4e6eb;
        border: 1px solid #555;
    }

    body.dark-mode .input-group-text {
        background-color: #444;
        color: #e4e6eb;
        border: 1px solid #666;
    }

    body.dark-mode .gradient-btn {
        background: linear-gradient(to right, #ffab0a 0%, #009d94 50%, #351755 90%);
        border-radius: 50px;
        padding: 0.6rem 1.5rem;
        color: #fff;
        font-weight: 600;
        cursor: pointer;
        width: 100%;
        margin-top: 1rem;
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

        body.dark-mode .gradient-btn:hover {
            opacity: 0.9;
            transform: translateY(-2px);
        }

    body.dark-mode .form-control:focus {
        border-color: #80bdff;
        box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    }

    body.dark-mode .alert.general-error {
        color: #fff;
        background-color: #dc3545;
        border-radius: 5px;
        padding: 10px;
    }

        body.dark-mode .alert.general-error .btn-secondary {
            background-color: #333;
            color: #e4e6eb;
            border: 1px solid #555;
        }

.build-version {
    font-size: 0.8rem; /* Reduced text size */
    margin-bottom: 0; /* No gap below */
}