/* 1. Foundations */
body {
    font-family: 'Livvic', sans-serif !important;
    margin: 0;
    padding: 0;
    min-height: 100vh; /* Changed to min-height for longer registration forms */
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url("/images/bg/login-bg.jpg");
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed; /* Keeps background steady during scroll */
}

/* 2. Main Card Wrapper */
.auth-wrapper {
    max-width: 480px; /* Slightly wider to accommodate longer registration fields */
    width: 90%;
    background: rgba(255, 255, 255, 0.98);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0px 15px 35px rgba(0, 0, 0, 0.3);
    border-top: 6px solid #E31E24; /* Brand Red */
    margin: 40px 0; /* Ensures space on mobile when keyboard pops up */
}

/* 3. Logo & Typography */
.auth-logo {
    text-align: center;
    margin-bottom: 20px;
}

.auth-logo img {
    width: 120px;
    height: auto;
}

h3 {
    color: #111;
    text-align: center;
    font-weight: 900 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px !important;
}

h3 span {
    color: #E31E24; /* Brand Red */
}

.auth-subtitle {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

/* 4. Form Elements */
.form-group {
    margin-bottom: 18px; /* Consistent spacing for all auth pages */
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-family: 'Livvic', sans-serif;
    transition: 0.3s;
    outline: none;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: #F5E027; /* Brand Yellow */
    box-shadow: 0 0 8px rgba(245, 224, 39, 0.2);
}

/* 5. Button (Universal) */
.auth-btn {
    width: 100%;
    background: #E31E24;
    color: white;
    border: none;
    padding: 14px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: 0.3s;
    margin-top: 10px;
}

.auth-btn:hover {
    background: #111;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 6. Links & Footer Text */
.form-links {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: #666;
}

.form-links a {
    color: #E31E24;
    text-decoration: none;
    font-weight: 700;
}

.form-links a:hover {
    text-decoration: underline;
}

.divider {
    border: 0;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

/* 7. Error Handling */
.alert-danger {
    background: #fff0f0;
    color: #d9534f;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid #d9534f;
}

/* 8. Floating Home Button */
.home-btn {
    position: fixed;
    top: 25px;
    left: 25px;
    background: #F5E027;
    color: #111;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: 0.3s;
    z-index: 1000;
}

.home-btn:hover {
    background: #E31E24;
    color: white;
}

/* 9. Responsive adjustments */
@media (max-width: 480px) {
    .home-btn { top: 15px; left: 15px; width: 40px; height: 40px; }
    .auth-wrapper { padding: 25px; margin: 20px 0; }
    h3 { font-size: 22px; }
}