/* Shared styles for the sign-in, forgot-password and reset-password pages. */
:root {
    --ds-brand: #005bea;
    --ds-brand-light: #00c6fb;
    --ds-ink: #1f2a37;
    --ds-muted: #6b7280;
    --ds-border: #d1d5db;
    --ds-danger: #d42027;
    --ds-radius: 10px;
}

html, body { height: 100%; }

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Open Sans', Arial, sans-serif;
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- page background ---------- */
.login-block {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    width: 100%;
    margin: 0;
    position: relative;
    z-index: 1;
    color: #ffffff;
    background: url(../images/loginbg.jpg) center / cover no-repeat;
}

.login-block::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(to top, var(--ds-brand), var(--ds-brand-light));
    opacity: .9;
}

/* ---------- sign-in card ---------- */
.login-card {
    width: 100%;
    max-width: 420px;
    padding: 32px 28px 24px;
    color: var(--ds-ink);
    background: rgba(255, 255, 255, .97);
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(0, 30, 80, .35);
}

.login-logo {
    display: block;
    width: 150px;
    max-width: 60%;
    height: auto;
    margin: 0 auto 18px;
}

.login-title {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    color: var(--ds-ink);
}

.login-subtitle {
    margin: 0 0 22px;
    font-size: 14px;
    text-align: center;
    color: var(--ds-muted);
}

.login-card .field { margin-bottom: 16px; }

.login-card label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ds-ink);
}

.login-card .form-control {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 14px;
    font-size: 15px;
    color: var(--ds-ink);
    background: #fff;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius);
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
}

.login-card .form-control:focus {
    border-color: var(--ds-brand);
    box-shadow: 0 0 0 3px rgba(0, 91, 234, .2);
    outline: none;
}

.password-wrap { position: relative; }
.password-wrap .form-control { padding-right: 48px; }

.toggle-password {
    position: absolute;
    top: 0; right: 0;
    width: 48px; height: 48px;
    padding: 0;
    color: var(--ds-muted);
    background: transparent;
    border: 0;
    border-radius: 0 var(--ds-radius) var(--ds-radius) 0;
    cursor: pointer;
}

.toggle-password:hover { color: var(--ds-brand); }
.toggle-password:focus-visible { outline: 2px solid var(--ds-brand); outline-offset: -2px; }

.login-message {
    display: none;
    margin: 0 0 16px;
    padding: 10px 12px;
    font-size: 13px;
    color: #8a1218;
    background: #fdecec;
    border: 1px solid #f5c2c4;
    border-radius: var(--ds-radius);
}

.login-message.is-visible { display: block; }

.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(to right, var(--ds-brand), var(--ds-brand-light));
    border: 0;
    border-radius: var(--ds-radius);
    cursor: pointer;
    transition: box-shadow .15s, transform .05s, opacity .15s;
}

.login-btn:hover:not(:disabled) { box-shadow: 0 6px 16px rgba(0, 91, 234, .4); }
.login-btn:active:not(:disabled) { transform: translateY(1px); }
.login-btn:focus-visible { outline: 3px solid rgba(0, 91, 234, .4); outline-offset: 2px; }
.login-btn:disabled { opacity: .75; cursor: progress; }

.login-btn[aria-busy="true"]::after {
    content: "";
    width: 16px; height: 16px;
    margin-left: 10px;
    border: 2px solid rgba(255, 255, 255, .5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ds-spin .7s linear infinite;
}

@keyframes ds-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .login-btn[aria-busy="true"]::after { animation: none; }
}

.login-links {
    margin-top: 18px;
    text-align: center;
    font-size: 14px;
}

.login-links a { color: var(--ds-brand); font-weight: 600; text-decoration: none; }
.login-links a:hover { text-decoration: underline; }

.noscript-note {
    margin: 0 0 16px;
    padding: 10px 12px;
    font-size: 13px;
    color: #7a4b00;
    background: #fff4d6;
    border: 1px solid #f1d58a;
    border-radius: var(--ds-radius);
}

/* ---------- footer ---------- */
.page-footer.font-small.blue { flex-shrink: 0; background: #0772db; color: #fff; }
.page-footer a { color: #fff; }
.page-footer .fa.fa-circle { color: #04ff04; font-size: 14px; margin-right: 4px; }
.flinks { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 14px; }
.flinks a { padding: 0; }
.sicons { padding: 0; font-size: 16px; }
@media (max-width: 767px) { .flinks { justify-content: center; } }

/* ---------- customer picker modal ---------- */
#ModalLogin .modal-header {
    align-items: center;
    padding: 12px 16px;
    color: #fff;
    background: linear-gradient(to right, var(--ds-brand), var(--ds-brand-light));
    border-bottom: 0;
}
#ModalLogin .modal-header .close { margin: 0; padding: 0; color: #fff; opacity: .9; text-shadow: none; }
#ModalLogin .modal-title-text { font-size: 15px; font-weight: 600; }
#ModalLogin .ms-List { max-height: 60vh; margin: 0; padding: 0; overflow: auto; list-style: none; }
#ModalLogin .ms-List li { padding: 10px 12px; font-size: 14px; border-radius: 8px; cursor: pointer; }
#ModalLogin .ms-List li:hover, #ModalLogin .ms-List li:focus { background: #eef4ff; }

/* ---------- 2-step verification modal ---------- */
#twofactorepass .modal-body { padding: 24px 24px 8px; }
#twofactorepass .twofa-logo { display: block; width: 130px; margin: 0 auto 12px; }
#twofactorepass .twofa-title { margin: 0 0 6px; font-size: 20px; font-weight: 700; text-align: center; }
#twofactorepass .twofa-help { margin: 0 0 16px; font-size: 14px; text-align: center; color: var(--ds-muted); }

#twofactorepass #validatecode {
    height: 52px;
    font-size: 22px;
    letter-spacing: 6px;
    text-align: center;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius);
}

#twofactorepass #validatecode:focus {
    border-color: var(--ds-brand);
    box-shadow: 0 0 0 3px rgba(0, 91, 234, .2);
    outline: none;
}

#twofactorepass .remember {
    display: flex;
    align-items: center;
    margin: 14px 0 0;
    font-size: 14px;
}

#twofactorepass .remember input { width: 18px; height: 18px; margin: 0 8px 0 0; }
#twofactorepass .remember label { margin: 0; cursor: pointer; }

#twofactorepass #showerror {
    display: block;
    min-height: 22px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--ds-danger);
}

#twofactorepass .modal-footer { display: block; border-top: 0; padding: 8px 24px 20px !important; }
#twofactorepass #btntwofactore { width: 100%; height: 46px; font-weight: 700; border-radius: var(--ds-radius); }

@media (max-width: 480px) {
    .login-card { padding: 24px 18px 20px; border-radius: 12px; }
    .page-footer .text-md-left > .row > div { text-align: center !important; }
}
    
/* ---------- extra pieces used by forgot / reset password ---------- */
.login-message.is-success {
    color: #14532d;
    background: #e8f7ee;
    border-color: #b7e4c7;
}

.login-message.is-info {
    color: #1e3a8a;
    background: #eaf1ff;
    border-color: #c7d8fb;
}

.auth-hint { margin: 6px 0 0; font-size: 12px; color: var(--ds-muted); }

.pw-meter { margin-top: 8px; }
.pw-meter-track { height: 6px; overflow: hidden; background: #e5e7eb; border-radius: 3px; }
.pw-meter-fill { width: 0; height: 100%; background: #dc2626; border-radius: 3px; transition: width .2s, background-color .2s; }
.pw-meter-fill.is-fair { background: #f59e0b; }
.pw-meter-fill.is-strong { background: #16a34a; }
.pw-meter-label { margin-top: 4px; font-size: 12px; color: var(--ds-muted); }

.login-links .sep { margin: 0 8px; color: var(--ds-border); }
