/* ==========================================================================
   LOGIN PAGE STYLES — matches Figma design exactly
   Font: Montserrat | Colors: #30348A (primary), #6D6E70 (text), #F5F8FF (bg)
   ========================================================================== */

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Layout: Two-Column Split ===== */
.login-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* --- Left Column (Form) --- */
.login-column {
    flex: 0 0 53.3%; /* 921 / 1728 from Figma */
    max-width: 53.3%;
    background: #F5F8FF;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 53px 0 40px 0;
    overflow-y: auto;
}

/* --- Right Column (Image) --- */
.image-column {
    flex: 1;
    background-image: url('/static/icons/Rectangle1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
}

/* ===== Logo ===== */
.login-logo-container {
    padding-left: 88px;
    flex-shrink: 0;
}

.login-logo {
    width: 187px;
    height: 122px;
    display: block;
    object-fit: contain;
}

/* ===== Form Wrapper (Centered Content) ===== */
.login-form-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 40px;
    width: 100%;
}

.login-form-wrapper form {
    width: 100%;
    max-width: 503px;
}

/* ===== Title ===== */
.login-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 28px;
    line-height: normal;
    color: #30348A;
    margin: 0 0 16px 0;
    text-align: center;
}

/* ===== Description ===== */
.login-description {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: normal;
    color: #6D6E70;
    text-align: center;
    max-width: 465px;
    margin: 0 0 40px 0;
}

/* ===== Form Group ===== */
.form-group {
    margin-bottom: 16px;
    width: 100%;
}

/* ===== Labels ===== */
.field-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: normal;
    color: #6D6E70;
    display: block;
    margin-bottom: 8px;
}

/* ===== Inputs ===== */
.login-input {
    width: 100%;
    height: 48px;
    border-radius: 100px;
    background: #FFFFFF;
    border: 1px solid transparent;
    box-shadow: 0px 4px 6px 0px rgba(48, 52, 138, 0.1);
    padding: 0 24px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #333333;
    outline: none;
    transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.login-input::placeholder {
    font-family: 'Montserrat', sans-serif;
    font-style: italic;
    font-weight: 400;
    font-size: 18px;
    color: #6D6E70;
}

.login-input:focus {
    box-shadow: 0px 4px 10px 0px rgba(48, 52, 138, 0.2);
    border-color: #30348A;
}

/* ===== Error State (Input) ===== */
.login-input.input-error {
    background: #FFEFEF;
    border: 1px solid #EA4335;
    color: #EA4335;
    box-shadow: 0px 4px 6px 0px rgba(48, 52, 138, 0.1);
}

.login-input.input-error:focus {
    box-shadow: 0px 4px 10px 0px rgba(234, 67, 53, 0.25);
    border-color: #EA4335;
}

/* ===== Error Message ===== */
.error-message {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 12px;
    color: #EA4335;
    margin: 8px 0 0 20px;
    padding: 0;
    display: none;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.error-message.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ===== Remember Me Row ===== */
.remember-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 24px 0;
}

/* Custom checkbox */
.remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 18px;
    color: #6D6E70;
    cursor: pointer;
    user-select: none;
}

.remember-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.custom-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid #B0B0B0;
    border-radius: 6px;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.custom-checkbox::after {
    content: '';
    display: block;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) translate(-1px, -1px);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.remember-label input[type="checkbox"]:checked + .custom-checkbox {
    background: #30348A;
    border-color: #30348A;
}

.remember-label input[type="checkbox"]:checked + .custom-checkbox::after {
    opacity: 1;
}

/* Forgot password link */
.forgot-link {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 18px;
    color: #0465AE;
    text-decoration: none;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.forgot-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ===== Submit Button ===== */
.login-btn {
    width: 100%;
    height: 48px;
    border-radius: 100px;
    background: #30348A;
    color: #FFFFFF;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 18px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.15s ease;
}

.login-btn:hover {
    background: #252870;
}

.login-btn:active {
    transform: scale(0.985);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* --- Tablet Landscape (< 1200px) --- */
@media (max-width: 1199px) {
    .login-column {
        flex: 0 0 55%;
        max-width: 55%;
        padding: 40px 0;
    }

    .login-logo-container {
        padding-left: 40px;
    }

    .login-form-wrapper {
        padding: 0 30px;
    }
}

/* --- Tablet Portrait (< 992px): single column --- */
@media (max-width: 991px) {
    .login-column {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 30px 0;
        min-height: 100vh;
    }

    .image-column {
        display: none;
    }

    .login-logo-container {
        padding-left: 30px;
        text-align: center;
    }

    .login-form-wrapper {
        padding: 0 30px;
    }

    .login-description {
        max-width: 500px;
    }
}

/* --- Small Tablets / Large Phones (< 768px) --- */
@media (max-width: 767px) {
    .login-column {
        padding: 24px 0;
    }

    .login-logo-container {
        padding-left: 24px;
        display: flex;
        justify-content: center;
    }

    .login-logo {
        width: 150px;
        height: auto;
    }

    .login-title {
        font-size: 26px;
    }

    .login-description {
        font-size: 15px;
        margin-bottom: 32px;
    }

    .field-label {
        font-size: 16px;
    }

    .login-input {
        height: 46px;
    }

    .login-input::placeholder {
        font-size: 16px;
    }

    .remember-label span:last-child,
    .forgot-link {
        font-size: 15px;
    }

    .login-btn {
        height: 46px;
        font-size: 16px;
    }
}

/* --- Phones (< 576px) --- */
@media (max-width: 575px) {
    .login-column {
        padding: 20px 0;
    }

    .login-logo-container {
        padding-left: 20px;
    }

    .login-logo {
        width: 130px;
    }

    .login-form-wrapper {
        padding: 0 20px;
    }

    .login-title {
        font-size: 24px;
    }

    .login-description {
        font-size: 14px;
        margin-bottom: 28px;
    }

    .field-label {
        font-size: 15px;
    }

    .login-input::placeholder {
        font-size: 15px;
    }

    .remember-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .remember-label span:last-child,
    .forgot-link {
        font-size: 14px;
    }

    .login-btn {
        font-size: 16px;
    }
}

/* --- Very Small Phones (< 380px) --- */
@media (max-width: 379px) {
    .login-form-wrapper {
        padding: 0 16px;
    }

    .login-logo-container {
        padding-left: 16px;
    }

    .login-logo {
        width: 110px;
    }

    .login-title {
        font-size: 22px;
    }

    .login-description {
        font-size: 13px;
    }
}
