/* Reset and fonts */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    height: 100%;
    overflow: hidden;
    position: relative;
}

/* Background gradient */
body {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Floating dots for subtle animation */
.dot {
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    position: absolute;
    animation: float 6s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Main wrapper */
.login-wrapper {
    display: flex;
    width: 90%;
    max-width: 1000px;  /* a bit bigger for spacing */
    min-height: 500px;
    background: #ffffff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    z-index: 1;
}

/* Left: login form */
.login-form {
    flex: 1;
    max-width: 50%;          /* ensure form doesn't exceed half */
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;      /* solid background to separate from image */
    box-sizing: border-box;   /* include padding in width */
}

/* Form heading */
.login-form h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2rem;
    text-align: center;
}

/* Input wrapper with icon */
.input-wrapper {
    width: 80%;
    position: relative;
    margin-bottom: 1rem;
}

.input-wrapper i {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #9ca3af;
}

.input-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrapper input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* Button with hover animation */
button {
    width: 100%;
    padding: 0.75rem;
    background-color: #3b82f6;
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: transform 0.2s, background-color 0.2s;
}

button:hover {
    transform: translateY(-2px);
    background-color: #2563eb;
}

/* Error messages */
.errors {
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
}

/* Links */
.login-form a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.9rem;
}

.login-form a:hover {
    text-decoration: underline;
}


.login-image {
    flex: 1;
    max-width: 50%;
    background: url('/images/fleet-bg.jpg') no-repeat center center;
    background-size: cover;
}


/* Responsive */
@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
        min-height: auto;
    }

    .login-form,
    .login-image {
        max-width: 100%;
    }

    .login-image {
        height: 200px;
    }
}

#constellation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* behind login wrapper */
}
.login-wrapper {
    position: relative;
    z-index: 1; /* keep form above canvas */
}
