* {
    margin: 0;
    /* padding: 0; */
    box-sizing: border-box;
}

body, html {
    height: 100%;
    width: 100%;
    min-width: 360px;
    font-family: 'Geist', sans-serif;
    background: url('/views/static/img/BaryonsBackgroundLarge.jpg') no-repeat center center;
    background-size: cover;
    /* Remove global flex centering so .with-footer can control layout */
}

.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.login-box {
    background-color: rgba(255, 255, 255, 1);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    min-width: 250px;
    width: 100%;
    text-align: left;
    margin: auto;
}

.login-box h2 {
    font-size: 2.5rem;
    font-weight: 300;
    color: #333;
    margin-bottom: 30px;
}

.login-box p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 20px;
}

.error-message {
    color: #d9534f;
    /* Bootstrap danger color for error */
    background-color: #f8d7da;
    /* Light red background */
    border: 1px solid #f5c6cb;
    /* Slightly darker red border */
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: left;
    /* Align the text to the left */
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: #666;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group select {
    display: block;
    /* Ensures each input is on its own line */
    width: 100%;
    /* Full width, adjust as desired */
    padding: 16px;
    /* Top/bottom padding, no left/right so the underline is flush */
    margin-bottom: 16px;
    /* Space below each input */
    border: none;
    /* Remove default border */
    border-bottom: 1px solid #ccc;
    /* Underline */
    background: #f5f5f5;
    /* No background so it appears minimal */
    font-size: 1rem;
    /* Adjust text size */
    color: #333;
    /* Text color */
    outline: none;
    /* Remove outline on focus (handled by border) */
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="password"]:focus,
.form-group select:focus {
    border-color: #5fb8d9;
    /* Change the underline color on focus */
}

.form-group input[type="text"]::placeholder,
.form-group input[type="email"]::placeholder,
.form-group input[type="tel"]::placeholder,
.form-group input[type="password"]::placeholder,
.form-group select::placeholder {
    color: #999;
    /* Placeholder text color */
}

.form-group input[type="checkbox"] {
    margin-right: 10px;
}

/* Container for the checkbox and label text */
.custom-checkbox {
    display: inline-flex;
    /* Lay out items side by side */
    align-items: center;
    /* Vertically center checkbox and text */
    cursor: pointer;
    /* Make entire label clickable */
    font-family: sans-serif;
    /* Example font, adjust as needed */
    padding-bottom: 15px;
}

/* Hide the default checkbox input, but keep it in the document for accessibility */
.custom-checkbox input[type="checkbox"] {
    position: absolute;
    /* Take it out of normal flow */
    opacity: 0;
    /* Make it invisible */
    cursor: pointer;
    /* Maintain pointer style */
}

/* The custom box to replace the default checkbox */
.custom-checkbox .checkmark {
    width: 20px;
    /* Size of the box */
    height: 20px;
    background-color: #fff;
    /* Initial background */
    border: 2px solid #4AA9D9;
    /* Border color matching the “checked” color */
    border-radius: 3px;
    /* Slightly rounded corners */
    margin-right: 8px;
    /* Space between box and label text */
    position: relative;
    /* So we can position the checkmark pseudo-element */
    transition: background-color 0.3s ease;
}

/* The checkmark (tick) shape, initially hidden */
.custom-checkbox .checkmark::after {
    content: "";
    position: absolute;
    display: none;
    /* Hidden until the box is checked */
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    /* Creates the tick shape */
    transform: rotate(45deg);
}

/* When the checkbox is checked, fill the box and show the checkmark */
.custom-checkbox input[type="checkbox"]:checked~.checkmark {
    background-color: #4AA9D9;
}

.custom-checkbox input[type="checkbox"]:checked~.checkmark::after {
    display: block;
}

.btn {
    display: inline-block;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border-radius: 30px;
    text-decoration: none;
}

.login {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #5fb8d9;
    color: #fff;
    font-size: 1rem;
    font-weight: 400;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn.login:hover {
    background-color: #349dc3;
}

.signup-link {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #666;
}

.signup-link a {
    color: #666;
    text-decoration: none;
}

.signup-link a:hover {
    text-decoration: underline;
}

@media (max-width:820px) {
    .footer-social ul {
        justify-content: flex-start;
    }

    .footer-bottom-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .right {
        padding-top: 50px;
        padding-bottom: 50px;
    }

    .content {
        /* border: 4px solid red; */
        width: 65%;
        min-width: 400px;
    }

    .mobile-content {
        margin: 0 auto;
        padding-top: 50px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        max-width: 400px;
    }

    .buttons {
        margin: 0 auto;
        width: 75%;
    }

    .footer-brand {
        display: none;
    }

    .footer-product-links {
        display: none;
    }

    .footer-company-links {
        display: none;
    }
}

/* Media Queries for Mobile Responsive Design */
@media (max-width: 768px) {
    body,
        html {
                height: 100%;
                font-family: 'Geist', sans-serif;
                background: url('/views/static/img/BaryonsBackgroundLarge.jpg') no-repeat center center fixed;
                background-size: cover;
            }
    
    .container {
        padding: 20px;
        max-width: 500px;
        min-width: 300px;
        height: 100%;
        margin: 0 auto;
    }

    .login-box {
        padding: 20px;
        width: 100%;
        max-width: 100%;
        min-width: 100%;
    }

    .login-box img {
        max-width: 100%;
        min-width: 100px;
    }

    .login-box h2 {
        font-size: 2rem;
        font-weight: 300;
    }

    .login-box p {
        font-size: 0.9rem;
    }

    .form-group label {
        font-size: 0.8rem;
    }

    .form-group input[type="text"],
    .form-group input[type="password"] {
        font-size: 0.9rem;
    }

    .btn.login {
        font-size: 0.9rem;
        padding: 10px;
    }

    .signup-link {
        font-size: 0.8rem;
    }
}

/* --- Footer + Page Layout (mirrors styles-welcome.css) --- */
/* To enable footer layout without breaking existing centered login, add class 'with-footer' to <body>. */

html.with-footer, body.with-footer {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.with-footer > .container {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 0;
}

body.with-footer footer.site-footer {
    flex-shrink: 0;
    margin-top: 0;
}

.site-footer {
    background: #0d1b2a;
    opacity: 0.90;
    color: #ffffff;
    margin-top: 0px;
    padding: 40px 24px 28px;
    font-size: 14px;
}

.site-footer a { color: #ffffff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.footer-grid {
    display: grid;
    gap: 32px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: start;
    max-width: 1200px;
    margin: 0 auto 24px;
}

.footer-brand h5 { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.footer-brand .subtitle { color: #DDDDDD; font-size: 14px; max-width: 260px; line-height: 1.4; margin: 0; }

.footer-links ul, .footer-social ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-social ul { flex-direction: row; flex-wrap: wrap; gap: 14px; }
.footer-social a { display:inline-flex; width:34px; height:34px; align-items:center; justify-content:center; border:1px solid rgba(255,255,255,0.25); border-radius:50%; transition:background .25s, border-color .25s; }
.footer-social a:hover { background:#1b2f47; border-color:#ffffff; }
.footer-social img { width:18px; height:18px; object-fit:contain; filter:brightness(0) invert(1); }

.footer-bottom { border-top:1px solid rgba(255,255,255,0.15); padding-top:16px; display:flex; flex-direction:column; gap:8px; max-width:1200px; margin:0 auto; }
.footer-bottom-row { display:flex; flex-wrap:wrap; gap:18px; align-items:center; justify-content:space-between; }
.footer-legal { display:flex; flex-wrap:wrap; gap:18px; align-items:center; }

@media (max-width:640px) {
    .footer-social ul { justify-content:flex-start; }
    .footer-bottom-row { flex-direction:column; align-items:flex-start; }
}

@media (max-width: 380px) {
    .container {
            padding: 30px;
            max-width: 500px;
            min-width: 300px;
            margin: 0 auto;
            margin-top: 30px;
            margin-bottom: 30px;
        }
    
        .login-box {
            padding: 30px;
            width: 100%;
            max-width: 100%;
            min-width: 100%;
        }
}