body,
html {
    height: 100%;
    margin: 0;
    font-family: 'Nunito', sans-serif;
    overflow-x: hidden;
    background-color: #F2F2F2;
}

.custom-control-label {
    color: #626262;
    /* Darker grey for better visibility */
    font-weight: 600;
}

.split-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Left Panel */
.left-panel {
    width: 50%;
    background-color: #F2F2F2;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Move content to top */
    align-items: center;
    position: relative;
    padding: 15vh 2rem 2rem 2rem;
    /* Top padding to place content at roughly 30% height */
}

.login-content {
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.login-content h1 {
    color: #333;
    font-weight: 700;
}

.brand-logo {
    display: block;
    max-width: 100%;
    /* Ensure it doesn't overflow parent */
    width: auto;
    /* Maintain aspect ratio */
    margin: 0 auto 2rem auto;
    /* Top 0, Auto L/R (Center), Bottom 2rem */
}

/* Form Styling */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    display: block;
}

.form-control {
    border-radius: 50px;
    /* Rounded inputs */
    padding: 0.75rem 1.5rem;
    border: 1px solid #ddd;
    background-color: #fff;
    height: auto;
    font-size: 1rem;
}

.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    border-color: #80bdff;
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.form-control.with-icon {
    padding-left: 3rem;
}

/* Password eye icon if needed */
.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #aaa;
}

.btn-login {
    width: 100%;
    border-radius: 50px;
    padding: 0.75rem;
    font-weight: bold;
    background-color: #08223A;
    border: none;
    color: white;
    margin-top: 1rem;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    cursor: pointer;
}

/* CSS-only spinner shown via ::before when .loading is applied */
.btn-login.loading::before {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

.btn-login:hover {
    background-color: #133a5e;
}

/* Pre-login text links (forgot password, back to login) — match hover with site link accent */
.auth-text-link,
.forgot-password {
    font-size: 0.9rem;
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-content a.auth-text-link:hover,
.login-content a.forgot-password:hover {
    color: #00A79D;
    font-weight: bold;
}

.forgot-password {
    display: block;
    text-align: right;
    margin-top: 0.5rem;
}

.left-footer {
    margin-top: auto;
    /* Push to bottom of flex container */
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    padding-bottom: 1rem;
}

.left-footer a {
    color: #888;
    margin: 0 0.5rem;
    text-decoration: none;
}

/* Right Panel */
.right-panel {
    width: 50%;
    background-image: url('../img/nocktronics_login.png');
    background-size: cover;
    background-position: center bottom;
    /* Anchor to bottom */
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
}



/* Showcase Styling (Non-Carousel) */
.showcase-container {
    position: relative;
    z-index: 2;
    max-width: 600px;
    text-align: center;
    padding-bottom: 2rem;
}

.showcase-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 2rem;
    /* Removed card styling */
}

.showcase-text {
    color: white;
    animation: pulse 3s infinite ease-in-out;
}

.showcase-text h3 {
    font-weight: bold;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .split-container {
        flex-direction: column;
    }

    .left-panel,
    .right-panel {
        width: 100%;
        height: 50%;
        /* or auto */
    }

    .right-panel {
        display: none;
        /* Often hidden on mobile for login pages to focus on form */
    }

    .left-panel {
        flex: 1 1 auto;
        min-height: 100vh;
        padding-top: 5vh;
        /* Reduce top padding on mobile */
        justify-content: center;
        /* Center vertically on mobile */
    }

    .brand-logo {
        min-width: unset;
        /* Remove fixed min-width on mobile */
        max-width: 80%;
        /* Responsive width */
        margin-bottom: 1.5rem;
    }

    .login-content {
        max-width: 90%;
        /* Ensure content fits on small screens */
    }

    .left-footer {
        position: relative;
        /* Prevent overlap on small screens */
        bottom: auto;
        margin-top: 2rem;
        padding-bottom: 1rem;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.btn-login-inline {
    display: inline-block;
    text-decoration: none;
    width: auto;
    padding: 0.75rem 2rem;
}

/* --- Modern auth error banner (validation summary) --- */
.auth-error-banner {
    display: none;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding: 0.875rem 1rem;
    text-align: left;
    background: rgba(239, 68, 68, 0.07);
    border: 1px solid #b91c1c;
    border-left: 3px solid #b91c1c;
    border-radius: 8px;
    animation: slideInDown 0.25s ease-out;
}

.auth-error-banner:has(.validation-summary-errors) {
    display: flex;
}

.auth-error-icon {
    flex-shrink: 0;
    font-size: 1.375rem;
    color: #b91c1c;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    align-self: center;
}

.auth-error-banner .validation-summary-errors {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: #b91c1c;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
}

.auth-error-banner .validation-summary-errors ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-error-banner .validation-summary-errors li {
    margin: 0;
    padding: 0;
}

.auth-error-banner .validation-summary-errors li + li {
    margin-top: 0.35rem;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Static status cards (Lockout, AccessDenied) --- */
.auth-status-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(8, 34, 58, 0.08), 0 1px 3px rgba(8, 34, 58, 0.06);
    overflow: hidden;
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-status-card__accent {
    height: 4px;
    width: 100%;
}

.auth-status-card--warning .auth-status-card__accent {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.auth-status-card--danger .auth-status-card__accent {
    background: linear-gradient(90deg, #f87171 0%, #ef4444 100%);
}

.auth-status-card__body {
    padding: 1.75rem 1.5rem 1.5rem;
}

.auth-status-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin-bottom: 1rem;
    border-radius: 50%;
    font-size: 2.25rem;
}

.auth-status-card--warning .auth-status-card__icon {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.auth-status-card--danger .auth-status-card__icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.auth-status-card__icon .material-icons {
    font-size: 2.25rem;
}

.auth-status-card__title {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.auth-status-card--warning .auth-status-card__title {
    color: #b45309;
}

.auth-status-card--danger .auth-status-card__title {
    color: #b91c1c;
}

.auth-status-card__text {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.55;
}

.auth-status-actions {
    text-align: center;
    margin-top: 0.5rem;
}