/* Premium Split-Screen Authentication Styles */

:root {
    --auth-brand-primary: #F15412;
    --auth-brand-secondary: #34B3F1;
    --auth-text-dark: #0f172a;
    --auth-text-muted: #64748b;
    --auth-bg-light: #ffffff;
    --auth-bg-alt: #f8fafc;
    --auth-border: #cbd5e1;
    --auth-input-focus: rgba(241, 84, 18, 0.15);
}

body,
html {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: var(--auth-bg-light);
    color: var(--auth-text-dark);
}

.auth-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    font-family: 'Inter', sans-serif !important;
}

.auth-container * {
    font-family: 'Inter', sans-serif;
}

/* --- Left Side: Branding --- */
.auth-branding {
    flex: 1;
    position: relative;
    display: none;
    /* Beautiful elegant farm/scenery image */
    background-image: url('/Images/cows.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding: 4rem;
    overflow: hidden;
}

@media (min-width: 992px) {
    .auth-branding {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: flex-start;
    }
}

.branding-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Premium dark gradient for text legibility with a subtle warm tint */
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.85) 100%),
        linear-gradient(90deg, rgba(241, 84, 18, 0.15) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 1;
}

.branding-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    animation: fadeIn 1s ease-out;
}

.brand-logo {
    display: inline-block;
    font-size: 2.25rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    margin-bottom: 2.5rem;
    letter-spacing: -0.5px;
}

.brand-logo.text-dark {
    color: var(--auth-text-dark) !important;
}

.brand-logo:hover {
    color: white;
}

.brand-accent {
    color: var(--auth-brand-primary);
}

.branding-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

.branding-subtitle {
    font-size: 1.15rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3.5rem;
    font-weight: 300;
}

.branding-stats {
    display: flex;
    gap: 4rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--auth-brand-primary);
    line-height: 1;
    margin-bottom: 0.35rem;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* --- Right Side: Login Form --- */
.auth-form-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background-color: var(--auth-bg-light);
    position: relative;
    max-width: 100%;
}

@media (min-width: 992px) {
    .auth-form-wrapper {
        flex: 0 0 520px;
        padding: 4rem;
    }
}

.auth-form-container {
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--auth-text-dark);
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.auth-header p {
    font-size: 0.95rem;
    color: var(--auth-text-muted);
}

/* Form Controls */
.form-label {
    font-size: 0.75rem;
    color: var(--auth-text-dark);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.form-label.tracking-wide {
    letter-spacing: 0.08em;
}

.custom-input {
    background-color: #ffffff !important;
    border: 1px solid var(--auth-border) !important;
    border-radius: 8px !important;
    padding: 0.85rem 1rem !important;
    font-size: 0.95rem !important;
    color: var(--auth-text-dark) !important;
    transition: all 0.2s ease !important;
    height: auto !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

.custom-input::placeholder {
    color: #94a3b8 !important;
    font-weight: 400 !important;
}

.custom-input:focus {
    background-color: #ffffff !important;
    border-color: var(--auth-brand-primary) !important;
    box-shadow: 0 0 0 4px var(--auth-input-focus) !important;
    outline: none !important;
}

/* Fix browser autofill blue background */
.custom-input:-webkit-autofill,
.custom-input:-webkit-autofill:hover,
.custom-input:-webkit-autofill:focus,
.custom-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: var(--auth-text-dark) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Checkbox */
.custom-checkbox {
    display: flex;
    align-items: center;
}

.custom-checkbox .form-check-input {
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 4px;
    border: 1px solid var(--auth-border);
    margin-top: 0;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.2s ease;
}

.custom-checkbox .form-check-input:checked {
    background-color: var(--auth-brand-primary);
    border-color: var(--auth-brand-primary);
}

.custom-checkbox .form-check-input:focus {
    box-shadow: 0 0 0 4px var(--auth-input-focus);
    border-color: var(--auth-brand-primary);
}

.custom-checkbox .form-check-label {
    padding-left: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--auth-text-muted);
}

/* Button */
.btn-login {
    background-color: var(--auth-brand-primary) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.85rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(241, 84, 18, 0.2) !important;
}

.btn-login:hover,
.btn-login:focus {
    background-color: #d04810 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(241, 84, 18, 0.3) !important;
}

.btn-login:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(241, 84, 18, 0.2) !important;
}

/* Links */
.forgot-link,
.register-prompt a {
    color: var(--auth-brand-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-link:hover,
.register-prompt a:hover {
    color: #d04810;
    text-decoration: underline;
}

/* Alerts & Validation */
.custom-alert {
    border-radius: 8px;
    border: none;
    background-color: #fef2f2;
    color: #991b1b;
    padding: 1rem;
    font-size: 0.9rem;
    border-left: 4px solid #ef4444;
}

.text-danger {
    color: #ef4444 !important;
    font-size: 0.8rem;
}

/* Footer layout */
.auth-footer {
    position: absolute;
    bottom: 1.5rem;
    left: 0;
    width: 100%;
}

.auth-footer p {
    font-size: 0.8rem;
    color: var(--auth-text-muted);
    margin: 0;
}

.auth-footer img {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.auth-footer img:hover {
    opacity: 1;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================================
   RESPONSIVE DESIGN (All Devices: Mobile, Tablet, Desktop, Projector)
   ========================================================================= */

/* Very Small Mobile Phones (e.g., iPhone SE, 375px) */
@media (max-width: 575.98px) {
    .auth-form-wrapper {
        padding: 1rem 0.75rem;
    }

    .auth-form-container {
        padding: 1.75rem 1.25rem;
        border-radius: 16px;
    }

    .auth-header h2 {
        font-size: 1.4rem;
    }

    .auth-header p {
        font-size: 0.85rem;
    }

    .btn-login {
        padding: 0.8rem 1rem !important;
        font-size: 0.95rem !important;
    }

    .custom-input {
        padding: 0.75rem 0.9rem !important;
        font-size: 0.9rem !important;
    }
}


/* Mobile & Tablets (Tablet Portrait and smaller) */
@media (max-width: 991.98px) {
    .auth-form-wrapper {
        background-color: transparent;
        padding: 1.5rem;
        min-height: 100vh;
        min-height: 100dvh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .auth-container {
        align-items: center;
        background-image: url('/Images/cows.jpg');
        background-size: cover;
        background-position: center;
        /* fixed causes blank bg on iOS Safari — use scroll */
        background-attachment: scroll;
    }

    .auth-form-container {
        background: rgba(255, 255, 255, 0.98);
        padding: 2rem 1.75rem;
        border-radius: 20px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
        border: 1px solid rgba(255, 255, 255, 0.5);
        margin: 0 auto;
        width: 100%;
        max-width: 420px;
    }

    .auth-footer {
        position: relative;
        bottom: 0;
        margin-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .auth-footer p {
        color: rgba(255, 255, 255, 0.9) !important;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    }

    .auth-footer img {
        filter: brightness(10);
    }
}

/* Tablets (Landscape & Small Laptops) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .auth-branding {
        padding: 3rem;
    }

    .auth-form-wrapper {
        flex: 0 0 450px;
        padding: 2.5rem;
    }

    .branding-title {
        font-size: 2.5rem;
    }
}

/* Very Large Monitors & Projectors (4K, Ultrawides) */
@media (min-width: 1600px) {
    .auth-branding {
        padding: 6rem;
    }

    .branding-content {
        max-width: 800px;
    }

    .branding-title {
        font-size: 4.5rem;
        margin-bottom: 2rem;
    }

    .branding-subtitle {
        font-size: 1.5rem;
        max-width: 700px;
    }

    .stat-value {
        font-size: 3rem;
    }

    .auth-form-wrapper {
        flex: 0 0 650px;
        /* Give the form more breathing room so it doesn't look tiny */
        padding: 6rem;
    }

    .auth-form-container {
        max-width: 480px;
    }

    .auth-header h2 {
        font-size: 2.25rem;
    }

    .auth-header p {
        font-size: 1.1rem;
    }

    .form-label {
        font-size: 0.85rem;
    }

    .custom-input {
        padding: 1rem 1.25rem !important;
        font-size: 1.05rem !important;
    }

    .btn-login {
        padding: 1.15rem 1.5rem !important;
        font-size: 1.15rem !important;
    }
}