/* ==========================================================================
   login.css - the sign-in page.
   One card in two halves: on the left a short note on who signs in here, on the right the form.
   On a phone the left half shrinks to a banner above the form.
   ========================================================================== */
[hidden] { display: none !important; }

body.login-page {
    background: #eef2f7;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    color: #1e293b;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.auth-main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 56px 20px 72px;
    background: linear-gradient(180deg, #e3e9f2 0%, #eef2f7 38%, #eef2f7 100%);
}

.auth-shell {
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    border-radius: 22px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 34px 70px -34px rgba(10, 25, 47, .55), 0 0 0 1px rgba(10, 25, 47, .06);
}

/* ------------------------------------------------------------------ left half */
.auth-side {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 46px 40px 34px;
    color: #ffffff;
    background: linear-gradient(158deg, #12294b 0%, #0a192f 58%, #08142a 100%);
    overflow: hidden;
}
.auth-side::before {
    content: '';
    position: absolute;
    top: -140px;
    right: -130px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(229, 168, 35, .34), transparent 66%);
    pointer-events: none;
}
.auth-side::after {
    content: '';
    position: absolute;
    left: -90px;
    bottom: -120px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 0 0 46px rgba(255, 255, 255, .025), 0 0 0 92px rgba(255, 255, 255, .02);
    pointer-events: none;
}
.auth-side > * { position: relative; z-index: 1; }

.auth-seal {
    width: 64px;
    height: 64px;
    margin-bottom: 22px;
    padding: 3px;
    border-radius: 16px;
    background: #ffffff;
    object-fit: contain;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
}
.auth-eyebrow {
    margin: 0 0 8px;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent-gold, #e5a823);
}
.auth-side-title {
    margin: 0 0 8px;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.15;
}
.auth-side-lead {
    margin: 0 0 30px;
    color: #b9c6da;
    font-size: .98rem;
    line-height: 1.55;
}

.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.auth-points li { display: flex; gap: 14px; align-items: flex-start; }
.auth-pt-ico {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(229, 168, 35, .13);
    border: 1px solid rgba(229, 168, 35, .32);
}
.auth-pt-ico svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: var(--accent-gold, #e5a823);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.auth-points li > div > strong { display: block; font-size: .97rem; font-weight: 700; margin-bottom: 2px; }
.auth-points li > div > span { display: block; color: #aebcd2; font-size: .87rem; line-height: 1.5; }

.auth-side-foot {
    margin: auto 0 0;
    padding-top: 30px;
    font-size: .78rem;
    color: #7f93b0;
    letter-spacing: .02em;
}

/* ----------------------------------------------------------------- right half */
.auth-panel {
    padding: 50px 48px 34px;
    min-width: 0;
}
.login-header { margin-bottom: 28px; }
.login-title {
    margin: 0 0 6px;
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--primary-navy, #0a192f);
}
.login-subtitle {
    margin: 0;
    font-size: .9rem;
    color: #64748b;
    line-height: 1.45;
}

.auth-panel .form-group { margin-bottom: 20px; text-align: left; }
.form-label {
    display: block;
    margin-bottom: 7px;
    font-size: .88rem;
    font-weight: 650;
    color: #1e293b;
}

/* "Password" on the left, "Forgot password?" on the right of the same line */
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.label-row .form-label { margin-bottom: 0; }
.forgot-link {
    font-size: .84rem;
    font-weight: 650;
    color: var(--primary-navy, #0a192f);
    text-decoration: underline;
    text-decoration-color: rgba(10, 25, 47, .28);
    text-underline-offset: 3px;
    border-radius: 4px;
}
.forgot-link:hover { text-decoration-color: var(--accent-gold-hover, #c99218); color: #000; }
.forgot-link:focus-visible { outline: 3px solid var(--accent-gold, #e5a823); outline-offset: 2px; }

/* "Your password was changed" */
.login-notice {
    margin: 0 0 20px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #e9f7ef;
    border: 1px solid #bfe6cf;
    color: #14683f;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.45;
}

.input-wrapper { position: relative; display: flex; align-items: center; }
.input-ico {
    position: absolute;
    left: 15px;
    top: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    fill: none;
    stroke: #7d8da3;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
    transition: stroke .15s ease;
}
.input-wrapper:focus-within .input-ico { stroke: var(--primary-navy, #0a192f); }

.login-input {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 47px;
    font-size: .97rem;
    font-family: inherit;
    color: #0f172a;
    background: #f6f8fb;
    border: 1.5px solid #d5dde8;
    border-radius: 13px;
    box-sizing: border-box;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.login-input::placeholder { color: #98a6ba; }
.login-input:hover { border-color: #b6c3d4; }
.login-input:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--primary-navy, #0a192f);
    box-shadow: 0 0 0 4px rgba(229, 168, 35, .3);
}
.login-input-password { padding-right: 52px; }

.pw-toggle-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #7d8da3;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: color .15s ease, background-color .15s ease;
}
.pw-toggle-btn:hover { color: var(--primary-navy, #0a192f); background: #e8edf4; }
.pw-toggle-btn:focus-visible { outline: 2px solid var(--accent-gold, #e5a823); outline-offset: 1px; }
.pw-toggle-btn svg { width: 20px; height: 20px; fill: currentColor; }

.btn-login {
    width: 100%;
    height: 52px;
    margin-top: 6px;
    background: linear-gradient(180deg, #14305a 0%, var(--primary-navy, #0a192f) 100%);
    color: #ffffff;
    border: 0;
    border-radius: 13px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
    box-shadow: 0 10px 22px -10px rgba(10, 25, 47, .7);
    transition: transform .12s ease, box-shadow .15s ease, filter .15s ease;
}
/* the arrow is drawn by CSS, so the script can change the button's text ("Signing in...") without losing it */
.btn-login::after {
    content: '';
    width: 18px;
    height: 18px;
    background: var(--accent-gold, #e5a823);
    -webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform .15s ease;
}
.btn-login:hover:not(:disabled) { filter: brightness(1.12); box-shadow: 0 14px 26px -10px rgba(10, 25, 47, .75); }
.btn-login:hover:not(:disabled)::after { transform: translateX(3px); }
.btn-login:active:not(:disabled) { transform: translateY(1px); }
.btn-login:focus-visible { outline: 3px solid var(--accent-gold, #e5a823); outline-offset: 3px; }
.btn-login:disabled { opacity: .7; cursor: not-allowed; }

/* the second step, for staff with an authenticator app */
.mfa-lead { margin: 0 0 18px; font-size: .93rem; line-height: 1.55; color: #475569; }
.mfa-back { margin: 16px 0 0; text-align: center; font-size: .9rem; }
.mfa-back a { color: var(--primary-navy, #0a192f); font-weight: 600; }

/* ---------------------------------------------------------- the register line */
.login-card-footer { margin-top: 28px; padding-top: 22px; border-top: 1px solid #e3e9f1; }
.auth-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff8e6;
    border: 1px solid #f3dca0;
}
.auth-new-text { font-size: .93rem; font-weight: 650; color: #5b4300; }
.auth-register-btn {
    display: inline-flex;
    align-items: center;
    padding: 9px 18px;
    border-radius: 10px;
    background: var(--accent-gold, #e5a823);
    color: var(--primary-navy-dark, #060e1a);
    font-size: .9rem;
    font-weight: 800;
    text-decoration: none;
    transition: background-color .15s ease, transform .12s ease;
}
.auth-register-btn:hover { background: var(--accent-gold-hover, #c99218); }
.auth-register-btn:active { transform: translateY(1px); }
.auth-register-btn:focus-visible { outline: 3px solid var(--primary-navy, #0a192f); outline-offset: 2px; }

.personnel-hint { margin: 12px 0 0; font-size: .8rem; color: #64748b; line-height: 1.45; text-align: center; }
.form-group .personnel-hint { text-align: left; margin-top: 8px; }

/* ----------------------------------------------------------------- smaller screens */
@media (max-width: 860px) {
    .auth-main { padding: 28px 14px 48px; align-items: flex-start; }
    .auth-shell { grid-template-columns: 1fr; max-width: 520px; border-radius: 18px; }
    .auth-side { padding: 26px 26px 24px; }
    .auth-seal { width: 52px; height: 52px; margin-bottom: 14px; border-radius: 13px; }
    .auth-side-title { font-size: 1.55rem; }
    .auth-side-lead { margin-bottom: 0; }
    .auth-points, .auth-side-foot { display: none; }
    .auth-panel { padding: 30px 26px 26px; }
}
@media (max-width: 420px) {
    .auth-panel { padding: 26px 18px 22px; }
    .login-title { font-size: 1.6rem; }
    .auth-new { flex-direction: column; align-items: stretch; text-align: center; }
    .auth-register-btn { justify-content: center; }
}

/* ---- staff sign in with their CSPC Google account (2026-11-11) ---- */
.staff-google { margin: 0 0 6px; }
.btn-google {
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-sizing: border-box;
    background: #ffffff;
    color: #1f2937;
    border: 1px solid #cbd5e1;
    border-radius: 13px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    box-shadow: 0 6px 16px -10px rgba(10, 25, 47, .45);
    transition: box-shadow .15s ease, border-color .15s ease;
}
.btn-google:hover { border-color: #94a3b8; box-shadow: 0 10px 22px -12px rgba(10, 25, 47, .55); }
.btn-google:focus-visible { outline: 3px solid var(--accent-gold, #e5a823); outline-offset: 3px; }
.btn-google svg { width: 20px; height: 20px; flex: none; }
/* On a phone the full label wrapped onto two lines beside the logo (30 November 2026): a shorter one there. */
.btn-google .g-short { display: none; }
@media (max-width: 430px) {
    .btn-google .g-long { display: none; }
    .btn-google .g-short { display: inline; }
}
.staff-google .personnel-hint { margin-top: 8px; }
.staff-google-off { margin: 0 0 6px; padding: 12px 14px; border: 1px dashed #cbd5e1; border-radius: 12px; font-size: .9rem; color: #475569; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; color: #64748b; font-size: .82rem; font-weight: 600; letter-spacing: .02em; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: #e3e9f1; }
