/* Shared light design for login and two-factor verification. */
body.login-page {
    margin: 0;
    background: #f3f6fa;
    color: #172b46;
    font-family: 'Noto Kufi Arabic', 'Segoe UI', Tahoma, sans-serif;
}

.auth-wrapper {
    display: flex;
    min-height: 100vh;
    min-height: 100svh;
}

/* Static brand panel */
.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 0 0 39%;
    padding: 54px clamp(32px, 4vw, 72px) 32px;
    overflow: hidden;
    background: #142c4c;
    color: #fff;
}

.brand-logo, .brand-content, .brand-footer {
    position: relative;
    z-index: 1;
}

.brand-logo img {
    max-width: 190px;
    max-height: 80px;
    filter: brightness(0) invert(1);
    float: left;
}

.brand-content {
    padding-block: 70px 110px;
}

.brand-eyebrow {
    display: block;
    direction: ltr;
    text-align: start;
    color: #99b6d6;
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 28px;
}

.brand-content h2 {
    color: #fff;
    font-size: clamp(30px, 3vw, 46px);
    font-weight: 700;
    line-height: 1.7;
    margin: 0 0 20px;
}

.brand-content p {
    color: #bacce0;
    font-size: 14px;
    line-height: 2.2;
    margin: 0;
}

.brand-rule {
    width: 42px;
    height: 3px;
    background: #4f96ef;
    margin-block: 32px 22px;
}

.brand-company, .brand-footer {
    color: #b8cbe1;
    font-size: 13px;
    line-height: 2;
}

.brand-footer {
    border-top: 1px solid #ffffff1a;
    padding-top: 20px;
}

.brand-geometry {
    position: absolute;
    width: 115%;
    bottom: 25px;
    inset-inline-end: -25%;
    color: #82b3ec;
    opacity: .12;
    pointer-events: none;
}

/* Form card */
.auth-form-side {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    padding: 44px;
    border: 1px solid #e4eaf2;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 14px 48px #1c39590a;
}

.mobile-brand { display: none; }
.auth-header { margin-bottom: 32px; }
.auth-eyebrow { color: #60758d; font-size: 12px; }

.auth-header h1 {
    font-size: 29px;
    font-weight: 700;
    margin: 14px 0 12px;
    color: #172b46;
}

.auth-header p { font-size: 12px; color: #63758b; line-height: 2; margin: 0; }
.field-group { margin-bottom: 22px; }
.field-label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 10px; }

.input-wrapper {
    display: flex;
    align-items: center;
    min-height: 54px;
    border: 1px solid #dbe3ed;
    border-radius: 10px;
    background: #fbfcfe;
    transition: border-color .2s, box-shadow .2s;
}

.input-wrapper:focus-within { border-color: #2875db; box-shadow: 0 0 0 3px #2875db14; }
.input-icon { padding-inline: 16px 12px; color: #7c90a8; font-size: 15px; }
.input-wrapper input {
    width: 100%;
    min-width: 0;
    padding: 15px 0;
    padding-inline-end: 14px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #172b46;
    font: inherit;
    font-size: 13px;
}
.input-wrapper input::placeholder { color: #8493a6; }
.input-wrapper input:-webkit-autofill { -webkit-text-fill-color: #172b46; box-shadow: 0 0 0 1000px #fbfcfe inset; }

.password-toggle {
    align-self: stretch;
    flex-shrink: 0;
    width: 44px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #657b94;
    cursor: pointer;
}
.password-toggle:hover { color: #2069cb; background: #edf4ff; }
.auth-options { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 28px; font-size: 11px; }
.remember-wrap { display: flex; align-items: center; gap: 8px; color: #53677f; cursor: pointer; }
.remember-wrap input { width: 16px; height: 16px; accent-color: #246fd3; cursor: pointer; }
.forgot-link { color: #2069cb; font-weight: 600; text-decoration: none; }
.forgot-link:hover { color: #174f9c; text-decoration: underline; }

.btn-auth {
    width: 100%;
    min-height: 52px;
    padding: 14px 20px;
    border: 0;
    border-radius: 10px;
    background: #246fd3;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.btn-auth:hover { background: #1b5db5; }
.btn-auth:disabled { opacity: .65; cursor: wait; }
.btn-auth:focus-visible, .forgot-link:focus-visible, .password-toggle:focus-visible, .remember-wrap input:focus-visible { outline: 2px solid #246fd3; outline-offset: 4px; }
.auth-footer { margin-top: 28px; padding-top: 22px; border-top: 1px solid #edf0f5; text-align: center; font-size: 12px; color: #7d8da1; line-height: 2; }

/* Server and client validation */
.auth-errors, .auth-status { padding: 12px 16px; margin-bottom: 20px; border-radius: 10px; font-size: 12px; line-height: 2; }
.auth-errors { color: #a52935; background: #fff1f2; border: 1px solid #ffd9df; }
.auth-status { color: #146644; background: #edfaf3; border: 1px solid #cbeedc; }
.auth-errors ul { margin: 0; padding-inline-start: 18px; }
.login-page .fv-plugins-message-container { color: #a52935; font-size: 11px; margin-top: 6px; }

/* Two-factor verification */
.input-wrapper .verification-code {
    text-align: center;
    font-size: 20px;
    letter-spacing: .3em;
    font-variant-numeric: tabular-nums;
}

.auth-recovery {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid #edf0f5;
}

.auth-recovery summary {
    color: #2069cb;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    line-height: 2;
}

.auth-recovery summary:focus-visible {
    outline: 2px solid #246fd3;
    outline-offset: 4px;
}

.auth-recovery p {
    margin: 16px 0;
    color: #63758b;
    font-size: 12px;
    line-height: 2;
}

.btn-auth-secondary {
    background: #edf4ff;
    color: #2069cb;
    border: 1px solid #d5e5fa;
}

.btn-auth-secondary:hover {
    background: #deebfc;
}

@media (max-width: 900px) {
    .auth-brand { flex-basis: 36%; padding-inline: 28px; }
    .brand-content h2 { font-size: 30px; }
    .brand-content p { font-size: 12px; }
    .auth-card { padding: 32px; }
    .auth-form-side { padding: 32px 24px; }
}

@media (max-width: 700px) {
    .auth-brand { display: none; }
    .auth-form-side { padding: 28px 18px; }
    .auth-card { padding: 30px 24px; }
    .mobile-brand { display: block; margin-bottom: 30px; }
    .mobile-brand img { max-width: 150px; max-height: 48px; }
    .auth-header h1 { font-size: 26px; }
}

@media (max-width: 360px) {
    .auth-card { padding: 24px 18px; }
    .auth-options { flex-wrap: wrap; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .login-page * { transition: none !important; }
}
