*, *::before, *::after {
    box-sizing: border-box;
}

@font-face {
    font-family: 'poppins', sans-serif;
    font-style: normal;
    font-weight: 500;
    src: url('Poppins-Regular.woff2') format('woff2');
}

html,
body {
    margin: 0;
    min-height: 100vh;
    background-color: #f3f3f3;
    display: flex;
    font-family: "poppins", sans-serif;
    padding-top: 30px;
    align-items: flex-start;
    justify-content: center;

    @media (max-width: 600px) {
        padding-top: 10px;
    }
}

body {
    background-color: #f3f3f3;
}

.login-container {
    border-radius: 5px;
    background-color: #ffffff;
    width: 420px;
    padding: 20px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    box-shadow: 0 1rem 3rem #0000002d;
    position: relative;
    
    /* Safari is bugged af */
    transform: translateZ(0); /* forces GPU compositing in Safari */
    will-change: transform, height;
    backface-visibility: hidden;

    transition: height 0.3s ease;

    @media (max-width: 600px) {
        width: 90%;
    }
}

.login-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin: 0 auto;
}

/* 🔥 Form toggle visibility fixed */
.form-container {
    display: none;
    width: 340px;
    
    @media (max-width: 600px){
        width: 90%;
    }
}

.form-container.visible {
    display: block;
}

.login-container > div > h2 {
    margin-top: 0;
}

.login-container > .login-inner > div > img {
    display: block;
    margin: 20px auto 0 auto;
    width: 100%;
    padding-bottom: 20px;
    padding-left: 5px;
}


a {
    display: inline-block;
    padding: 12px 0;
    text-decoration: none;
    color: #8D0501;
    border-radius: 4px;
}

a:hover {
    text-decoration: underline;
}

label {
    margin-bottom: 10px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]) {
    padding: 10px;
    margin: 0 0 10px 0;
    box-sizing: border-box;
    font-size: medium;
    font-family: "poppins", sans-serif;
    width: 100%;
    outline-style: none;
    border: 1px #ccc solid;
    border-radius: 5px;
    height: 45px;
}


input[type="submit"] {
    display: block;
    margin: 10px 0;
    font-size: 16px;
    padding: 20px;
    border-radius: 10px;
    border-style: none;
    color: white;
    background-color: #8D0501;
    transition: background-color 0.2s;
    cursor: pointer;
    font-weight: 700;
    box-sizing: border-box;
    width: 100%;
}

input[type="submit"]:hover {
    background-color: #570504;
}

.login-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    width: 100%;              /* Ensure it respects its container */
    max-width: 340px;         /* Match your form's width */
    margin-left: auto;        /* Center horizontally */
    margin-right: auto;
    @media (max-width: 400px){
        flex-wrap: wrap;          /* Allow wrapping on small screens */
    }
}

.toggle-btn {
    padding: 10px 15px;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    margin-right: 10px;
    font-size: 1em;
}

.toggle-btn.active {
    font-weight: bold;
    border-bottom: 2px solid #8D0501;
}

.under-construction {
    text-align: center;
    padding: 30px;
    background-color: #fff9e6;
    border-radius: 5px;
    border: 1px dashed #ffc107;
    margin-bottom: 20px;
}

.warning-icon {
    font-size: 48px;
    color: #ffc107;
    margin-bottom: 15px;
}

.field-validation-error {
    color: #d9534f;
    font-size: 0.875rem;
    margin-bottom: 12px;
    display: block;
    line-height: 1.4;
}

