﻿/* =========================================================
   LOGIN PAGE STYLES
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html, body, form {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: #f8fafc;
}

/* Split Screen Container */
.login-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* Left Brand Panel */
.brand-section {
    flex: 1;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

    .brand-section::before {
        content: '';
        position: absolute;
        top: -100px;
        right: -100px;
        width: 400px;
        height: 400px;
        border-radius: 50%;
        background: rgba(59, 130, 246, 0.08);
        pointer-events: none;
    }

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

    .brand-logo i {
        color: #3b82f6;
        font-size: 26px;
    }

.brand-headline h2 {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 16px;
    color: #f8fafc;
}

.brand-headline p {
    font-size: 15px;
    color: #94a3b8;
    line-height: 1.6;
    max-width: 440px;
}

.brand-footer {
    font-size: 13px;
    color: #64748b;
}

/* Right Form Panel */
.form-section {
    width: 500px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.03);
}

.form-wrapper {
    width: 100%;
    max-width: 360px;
}

.form-header {
    margin-bottom: 32px;
}

    .form-header h1 {
        font-size: 24px;
        font-weight: 700;
        color: #0f172a;
        margin-bottom: 8px;
    }

    .form-header p {
        font-size: 14px;
        color: #64748b;
    }

/* Error Alert Banner */
.alert-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-danger {
    background-color: #fef2f2;
    border: 1px solid #fee2e2;
    color: #dc2626;
}

/* Form Controls */
.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: block;
        font-size: 13px;
        font-weight: 600;
        color: #334155;
        margin-bottom: 8px;
    }

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

    .input-wrapper i.field-icon {
        position: absolute;
        left: 14px;
        color: #94a3b8;
        font-size: 15px;
        transition: color 0.2s ease;
    }

.form-control {
    width: 100%;
    height: 44px;
    padding: 0 14px 0 42px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    outline: none;
    transition: all 0.2s ease;
}

    .form-control:focus {
        background-color: #ffffff;
        border-color: #3b82f6;
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    }

        .form-control:focus + i.field-icon {
            color: #3b82f6;
        }

/* Options Bar */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    cursor: pointer;
}

    .remember-me input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: #2563eb;
        cursor: pointer;
    }

.forgot-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

    .forgot-link:hover {
        text-decoration: underline;
    }

/* Submit Button */
.btn-submit {
    width: 100%;
    height: 44px;
    background-color: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-submit:hover {
        background-color: #1d4ed8;
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    }

    .btn-submit:active {
        transform: translateY(1px);
    }

/* Responsive Screen Handling */
@media (max-width: 900px) {
    .brand-section {
        display: none;
    }

    .form-section {
        width: 100vw;
    }
}



/* =========================================================
   LOGIN BUTTON LOADER STYLES
   ========================================================= */

/* Disabled button state during submission */
.btn-submit.loading {
    pointer-events: none !important;
    opacity: 0.85 !important;
    cursor: not-allowed !important;
}

/* Spinner element inside button */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* =========================================================
   PASSWORD EYE ICON TOGGLE
   ========================================================= */

/* Adjust padding-right so password text doesn't overlap the eye icon */
.form-control.has-toggle {
    padding-right: 42px !important;
}

/* Eye Icon Positioned on Right Side */
.toggle-password {
    position: absolute;
    right: 14px;
    color: #94a3b8;
    font-size: 15px;
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 10;
}

    .toggle-password:hover {
        color: #2563eb; /* Primary theme color on hover */
    }
