/* ── Basher Login Page Styles ── */

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: "Baloo Bhaijaan 2", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* Hide default content wrapper margins on login */
.login-page #contentWrapper {
    margin: 0 !important;
    padding: 0 !important;
}

/* ── Main Container ── */
.login-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* ── Left Pane (Branding) ── */
.login-left {
    flex: 1;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f2038 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 3rem;
}

.login-left::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/images/bg-login.svg') center/cover no-repeat;
    opacity: 0.15;
    z-index: 0;
}

.login-left > * {
    position: relative;
    z-index: 1;
}

.login-brand {
    text-align: center;
}

.login-brand-logo {
    max-width: 600px;
    margin-bottom: 2rem;
    filter: brightness(0) invert(1);
}

.login-brand h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0;
}

.login-brand .subtitle {
    font-size: 0.85rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    opacity: 0.7;
    margin-top: 0.5rem;
}

.login-left-footer {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.75rem;
    opacity: 0.5;
    z-index: 1;
}

.login-left-footer a {
    color: inherit;
}

/* ── Right Pane (Form) ── */
.login-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    padding: 3rem;
    position: relative;
    overflow-y: auto;
}

.login-right-inner {
    width: 100%;
    max-width: 420px;
}

/* Language selector positioned top-right */
.login-lang {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10;
}

.login-right[dir="rtl"] .login-lang {
    right: auto;
    left: 1.5rem;
}

/* ── Welcome Section ── */
.login-welcome {
    margin-bottom: 2rem;
}

.login-welcome h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e3a5f;
    margin: 0 0 0.25rem;
}

.login-welcome p {
    color: #6c757d;
    font-size: 0.95rem;
    margin: 0;
}

/* ── Error Message ── */
.login-error {
    background-color: #fff5f5;
    border: 1px solid #feb2b2;
    color: #c53030;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

/* ── Form Inputs ── */
.login-form .form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.login-form .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 1rem;
    z-index: 2;
    pointer-events: none;
}

.login-right[dir="rtl"] .login-form .input-icon {
    left: auto;
    right: 14px;
}

.login-form .form-control-user {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #2d3748;
    background-color: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    box-sizing: border-box;
}

.login-right[dir="rtl"] .login-form .form-control-user {
    padding-left: 1rem;
    padding-right: 2.75rem;
}

.login-form .form-control-user:focus {
    outline: none;
    border-color: #1e3a5f;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.login-form .form-control-user::placeholder {
    color: #a0aec0;
}

.login-form .field-validation-error {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
}

/* ── Remember Me ── */
.login-remember {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.login-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    accent-color: #1e3a5f;
}

.login-right[dir="rtl"] .login-remember input[type="checkbox"] {
    margin-right: 0;
    margin-left: 0.5rem;
}

.login-remember label {
    font-size: 0.875rem;
    color: #4a5568;
    margin: 0;
    cursor: pointer;
}

/* ── Submit Button ── */
.btn-login {
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
    opacity: 0.95;
}

.btn-login:active {
    transform: translateY(0);
}

/* ── Forgot Password ── */
.login-forgot {
    text-align: right;
    margin-bottom: 1.25rem;
}

.login-right[dir="rtl"] .login-forgot {
    text-align: left;
}

.login-forgot a {
    color: #1e3a5f;
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 500;
}

.login-forgot a:hover {
    text-decoration: underline;
}

/* ── Divider ── */
.login-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #a0aec0;
    font-size: 0.8rem;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: #e2e8f0;
}

.login-divider span {
    padding: 0 1rem;
}

/* ── SSO Button ── */
.btn-sso {
    width: 100%;
    padding: 0.75rem;
    background-color: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    color: #4a5568;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.2s, border-color 0.2s;
}

.btn-sso:hover {
    background-color: #f8fafc;
    border-color: #cbd5e0;
}

.btn-sso svg {
    width: 18px;
    height: 18px;
}

/* ── Footer Links ── */
.login-footer {
    margin-top: 2.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: #a0aec0;
}

.login-footer a {
    color: #1e3a5f;
    text-decoration: none;
    margin: 0 0.5rem;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 992px) {
    .login-container {
        flex-direction: column;
    }

    .login-left {
        flex: none;
        padding: 2rem;
        min-height: 200px;
    }

    .login-brand h1 {
        font-size: 1.75rem;
    }

    .login-brand .subtitle {
        font-size: 0.7rem;
        letter-spacing: 2px;
    }

    .login-left-footer {
        position: static;
        margin-top: 1rem;
    }

    .login-right {
        flex: 1;
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 576px) {
    .login-left {
        min-height: 160px;
        padding: 1.5rem;
    }

    .login-brand-logo {
        max-width: 150px;
        margin-bottom: 1rem;
    }

    .login-brand h1 {
        font-size: 1.4rem;
    }

    .login-right {
        padding: 1.5rem 1rem;
    }

    .login-welcome h2 {
        font-size: 1.4rem;
    }
}
