/* ============================================================================
   auth.css — sign-in, forgot-password and reset screens for all four portals.

   One brand, unmistakable audiences. Staff, students and job applicants all
   get the Institute Crimson accent — crimson button, crimson focus ring,
   Inter — and are told apart by the brand panel's MATERIAL, badge, icon and
   words, never by a non-brand colour:
       staff          graphite panel, crimson 4px rule, white lock-up plate
       student        crimson panel
       job-applicant  light panel with a crimson inline-start band
   A screenshot of any of the three is identifiable by audience with the
   form hidden. (Admissions applicants keep their teal accent.)

   The audience is data-portal on <body> and on the panel — see
   auth/layouts/master. Nothing here leaks outside .au-page, so the admin
   theme is untouched.

   Prefix: .au-
   ---------------------------------------------------------------------------
    1. Tokens and the four portal identities
    2. Page ground
    3. Shell and the two panels
    4. Brand panel (left)
    5. Form panel (right)
    6. Fields
    7. Buttons and links
    8. Alerts
    9. Portal switcher
   10. Footer
   11. Responsive
   12. Motion and print
   ========================================================================= */


/* == 1. Tokens and the four portal identities ============================= */

.au-page {
    /* Warm neutrals from the brand standard. */
    --au-ground:      #f7f6f4;
    --au-ground-deep: #eeece9;
    --au-card:        #ffffff;
    --au-ink:         #191919;
    --au-ink-soft:    #55534f;
    --au-muted:       #85817b;
    --au-line:        #e5e3e0;
    --au-line-soft:   #efedea;
    --au-field:       #fbfaf9;
    --au-placeholder: #a8a49e;
    --au-line-strong: #cfccc7;

    /* Errors are burnt orange: on a crimson page a red error reads as decoration. */
    --au-bad:         #c2410c;
    --au-bad-soft:    #fff1e8;
    --au-bad-line:    #f6cfb6;
    --au-bad-dark:    #9a3412;
    --au-ok:          #17694a;
    --au-ok-soft:     #e8f5ef;
    --au-ok-line:     #bfe3d2;
    --au-warn:        #8a6100;
    --au-warn-soft:   #fdf4e0;
    --au-warn-line:   #f0dcae;

    /* Institute Crimson — the accent of every audience below. */
    --au-accent:      #a41e22;
    --au-accent-deep: #861a1d;
    --au-accent-dark: #690f12;
    --au-accent-soft: #fce6e6;
    --au-accent-line: #efc9cb;
    --au-focus:       #b8383c;

    /* The brand panel's material. Crimson by default; each audience sets its own. */
    --au-panel:       linear-gradient(#a41e22, #a41e22);
    --au-panel-ink:   #ffffff;
    --au-panel-rule:  transparent;

    --au-font:        "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --au-radius:      8px;
    --au-radius-sm:   4px;
    --au-shadow:      0 6px 18px rgba(25, 25, 25, .06), 0 1px 2px rgba(25, 25, 25, .04);
}

/* Staff — graphite, a crimson rule, the lock-up on a white plate. */
.au-page[data-portal="staff"] {
    --au-panel:       linear-gradient(158deg, #191919 0%, #2b2a28 100%);
    --au-panel-rule:  #a41e22;
}

/* Students — the crimson panel. */
.au-page[data-portal="student"] {
    --au-panel:       linear-gradient(#a41e22, #a41e22);
}

/* Job applicants — a light panel with a crimson band and crimson words. */
.au-page[data-portal="job-applicant"] {
    --au-panel:       #ffffff;
    --au-panel-ink:   #191919;
}

/* Admissions applicants — deep teal (outside the crimson brand pass). */
.au-page[data-portal="applicant"] {
    --au-accent:      #0f6357;
    --au-accent-deep: #0a4a41;
    --au-accent-dark: #06342d;
    --au-accent-soft: #eaf5f2;
    --au-accent-line: #c3e0d9;
    --au-focus:       #0f6357;
    --au-panel:       linear-gradient(158deg, #0f6357 0%, #0a4a41 52%, #06342d 100%);
}


/* == 2. Page ground ======================================================= */

body.au-page {
    margin: 0;
    min-height: 100vh;
    background-color: var(--au-ground);
    color: var(--au-ink);
    font-family: var(--au-font);
    font-size: 14.5px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Two very soft washes of the portal accent, so the ground belongs to the
   portal without the page turning into a colour field. */
.au-page::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(transparent, transparent),
        linear-gradient(transparent, transparent),
        linear-gradient(var(--au-ground), var(--au-ground));
}

/* color-mix is recent; older engines get a flat ground rather than nothing. */
@supports not (background: color-mix(in srgb, red 10%, transparent)) {
    .au-page::before {
        background: linear-gradient(var(--au-ground), var(--au-ground));
    }
}

/* The institute's brand image, when one is configured. Deliberately faint —
   it is texture, not subject matter. */
.au-page .au-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .07;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    filter: grayscale(100%);
}

.au-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 34px 18px;
    box-sizing: border-box;
}


/* == 3. Shell and the two panels ========================================== */

.au-shell {
    width: 100%;
    max-width: 940px;
}

.au-card {
    display: flex;
    align-items: stretch;
    background: var(--au-card);
    border-radius: var(--au-radius);
    box-shadow: var(--au-shadow);
    overflow: hidden;
}

.au-aside {
    flex: 0 0 40%;
    max-width: 40%;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 40px 34px;
    box-sizing: border-box;
    color: var(--au-panel-ink);
    background: var(--au-panel);
    border-top: 4px solid var(--au-panel-rule);
}

/* A single hairline of light along the fold, so the two panels read as one
   object rather than two rectangles pushed together. */
.au-aside::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, .16);
}

.au-main {
    flex: 1 1 60%;
    min-width: 0;
    padding: 42px 44px;
    box-sizing: border-box;
}


/* == 4. Brand panel (left) ================================================ */

.au-mark {
    margin: 0 0 26px;
}

.au-mark img {
    max-height: 62px;
    max-width: 158px;
    width: auto;
    /* Institute marks are supplied in full colour on white; on the accent they
       need to be knocked back to a single tone to sit properly. */
    filter: brightness(0) invert(1);
    opacity: .96;
}

/* Audience badge: a large icon beside an uppercase pill. The words carry the
   audience (never colour alone): "Staff sign-in", "Student sign-in",
   "Job applicant sign-in". */
.au-aud {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
}

.au-aud-ic {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .28);
    color: #fff;
    font-size: 20px;
}

.au-eyebrow {
    display: inline-block;
    margin: 0;
    padding: 4px 11px;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #fff;
}

/* Staff: the institute lock-up in its own colours, on a white plate. */
.au-page[data-portal="staff"] .au-mark {
    display: inline-block;
    align-self: flex-start;
    padding: 10px 14px;
    background: #ffffff;
    border-radius: 8px;
}

.au-page[data-portal="staff"] .au-mark img,
.au-page[data-portal="job-applicant"] .au-mark img {
    filter: none;
    opacity: 1;
}

/* Job applicant: a light panel with a 1px neutral edge, crimson words,
   dark text. */
.au-page[data-portal="job-applicant"] .au-aside {
    border-top: 0;
    border-left: 1px solid var(--au-line);
    background: linear-gradient(#ffffff, #ffffff);
}

.au-page[data-portal="job-applicant"] .au-aside::after {
    background: var(--au-line);
}

.au-page[data-portal="job-applicant"] .au-aud-ic {
    background: var(--au-accent-soft);
    border-color: var(--au-accent-line);
    color: var(--au-accent);
}

.au-page[data-portal="job-applicant"] .au-eyebrow {
    background: var(--au-accent-soft);
    border-color: var(--au-accent-line);
    color: var(--au-accent-dark);
}

.au-page[data-portal="job-applicant"] .au-portal {
    color: var(--au-accent-dark);
}

.au-page[data-portal="job-applicant"] .au-institute {
    color: var(--au-ink-soft);
}

.au-page[data-portal="job-applicant"] .au-notice {
    background: #ffffff;
    border-color: var(--au-line);
}

.au-page[data-portal="job-applicant"] .au-notice-lbl {
    color: var(--au-accent-dark);
}

.au-page[data-portal="job-applicant"] .au-notice p,
.au-page[data-portal="job-applicant"] .au-notice-list {
    color: var(--au-ink-soft);
}

.au-page[data-portal="job-applicant"] .au-notice-list li::marker {
    color: var(--au-muted);
}

[dir="rtl"] .au-page[data-portal="job-applicant"] .au-aside {
    border-left: 0;
    border-right: 1px solid var(--au-line);
}

/* Held deliberately small: what the panel is announcing is the institute, and
   the portal name is only the part of it you have arrived at. */
.au-portal {
    margin: 0 0 5px;
    font-size: 17px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: -.005em;
    color: #fff;
}

/* Carries the gap down to the notice — the tagline used to sit in between. */
.au-institute {
    margin: 0 0 26px;
    font-size: 12.6px;
    line-height: 1.45;
    font-weight: 500;
    letter-spacing: .02em;
    color: rgba(255, 255, 255, .82);
}

/* A sign-in screen is not the place to advertise features to someone who has
   already decided to sign in. What does belong here is the terms on which the
   account is held — so this panel carries a short notice instead, worded for
   whichever audience is at the door. */
.au-notice {
    /* Anchored to the bottom of the panel now that nothing follows it, so the
       mark and the portal name hold the top and the panel reads as composed
       rather than trailing off into empty colour. */
    margin: auto 0 0;
    padding: 15px 17px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 10px;
}

.au-notice-lbl {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 7px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .7);
}

.au-notice-lbl i {
    font-size: 13px;
}

.au-notice p {
    margin: 0;
    font-size: 13.2px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .9);
}

/* Multi-clause notices (staff) render as lettered terms rather than a
   paragraph, so each clause reads as its own condition of use. */
.au-notice-list {
    margin: 0;
    padding-left: 20px;
    list-style: lower-alpha;
    font-size: 12.6px;
    line-height: 1.55;
    color: rgba(255, 255, 255, .9);
}

.au-notice-list li + li {
    margin-top: 5px;
}

.au-notice-list li::marker {
    color: rgba(255, 255, 255, .65);
}


/* == 5. Form panel (right) ================================================ */

.au-head {
    margin: 0 0 24px;
}

.au-title {
    margin: 0 0 6px;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--au-ink);
}

.au-sub {
    margin: 0;
    font-size: 13.8px;
    line-height: 1.6;
    color: var(--au-muted);
}

/* A small round glyph above the heading on the password screens, where there
   is no logo to anchor the panel. */
.au-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin: 0 0 16px;
    border-radius: 12px;
    background: var(--au-accent-soft);
    border: 1px solid var(--au-accent-line);
    color: var(--au-accent);
    font-size: 19px;
}


/* == 6. Fields ============================================================ */

/* Also the hook the layout's submit-once handler looks for. */
.au-form {
    margin: 0;
}

.au-field {
    margin: 0 0 17px;
}

.au-label {
    display: block;
    margin: 0 0 6px;
    font-size: 12.2px;
    font-weight: 600;
    letter-spacing: .01em;
    color: var(--au-ink-soft);
}

.au-input-wrap {
    position: relative;
}

.au-page .au-input {
    display: block;
    width: 100%;
    height: 46px;
    padding: 0 14px 0 42px;
    box-sizing: border-box;
    background: var(--au-field);
    border: 1px solid var(--au-line);
    border-radius: var(--au-radius-sm);
    color: var(--au-ink);
    font-family: inherit;
    font-size: 14.5px;
    line-height: 44px;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.au-page .au-input::placeholder {
    color: var(--au-placeholder);
}

.au-page .au-input:hover {
    border-color: var(--au-line-strong);
}

.au-page .au-input:focus {
    outline: 0;
    background: var(--au-card);
    border-color: var(--au-focus);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--au-focus) 22%, transparent);
}

/* Field with a trailing control (the show/hide password button). */
.au-page .au-input.has-tail {
    padding-right: 46px;
}

.au-ico {
    position: absolute;
    left: 14px;
    top: 0;
    height: 46px;
    display: flex;
    align-items: center;
    font-size: 15px;
    color: var(--au-muted);
    pointer-events: none;
    transition: color .16s ease;
}

.au-input:focus ~ .au-ico {
    color: var(--au-accent);
}

.au-eye {
    position: absolute;
    right: 6px;
    top: 6px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--au-muted);
    font-size: 15px;
    cursor: pointer;
    transition: color .16s ease, background-color .16s ease;
}

.au-eye:hover {
    color: var(--au-accent);
    background: var(--au-accent-soft);
}

.au-eye:focus-visible {
    outline: 2px solid var(--au-accent);
    outline-offset: 1px;
}

/* Invalid state — the message sits under its own field, not in a pile at the
   top of the form, so it is obvious which box needs attention. */
.au-page .au-input.is-bad,
.au-page .au-input.is-bad:hover {
    border-color: var(--au-bad);
    background: var(--au-bad-soft);
}

.au-page .au-input.is-bad:focus {
    box-shadow: 0 0 0 3px rgba(194, 65, 12, .14);
}

.au-err {
    display: block;
    margin: 6px 0 0;
    font-size: 12.4px;
    line-height: 1.5;
    color: var(--au-bad);
}

.au-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 20px;
    flex-wrap: wrap;
}

.au-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13.4px;
    font-weight: 500;
    color: var(--au-ink-soft);
    cursor: pointer;
    user-select: none;
}

.au-page .au-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--au-accent);
    cursor: pointer;
}

/* Read-only value shown in place of a field — on the reset screen the account
   is fixed by the token, so it is stated rather than offered for editing. */
.au-static {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 46px;
    padding: 0 14px;
    box-sizing: border-box;
    background: var(--au-accent-soft);
    border: 1px solid var(--au-accent-line);
    border-radius: var(--au-radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--au-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.au-static i {
    flex: 0 0 auto;
    color: var(--au-accent);
    font-size: 15px;
}

/* A quiet note under a field — password rules, where a link was sent, and so on. */
.au-hint {
    margin: 6px 0 0;
    font-size: 12.4px;
    line-height: 1.55;
    color: var(--au-muted);
}


/* == 7. Buttons and links ================================================= */

.au-page .au-btn {
    display: block;
    width: 100%;
    height: 47px;
    padding: 0 20px;
    box-sizing: border-box;
    background: var(--au-accent);
    border: 1px solid var(--au-accent);
    border-radius: var(--au-radius-sm);
    color: #fff;
    font-family: inherit;
    font-size: 14.6px;
    font-weight: 600;
    letter-spacing: .01em;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, transform .1s ease, box-shadow .16s ease;
}

.au-page .au-btn:hover {
    background: var(--au-accent-deep);
    border-color: var(--au-accent-deep);
    box-shadow: 0 6px 18px -8px var(--au-accent);
}

.au-page .au-btn:active {
    transform: translateY(1px);
}

.au-page .au-btn:focus-visible {
    outline: 2px solid var(--au-focus);
    outline-offset: 2px;
}

.au-links {
    margin: 20px 0 0;
    padding: 18px 0 0;
    border-top: 1px solid var(--au-line-soft);
    font-size: 13.4px;
    color: var(--au-muted);
}

.au-links p {
    margin: 0 0 7px;
}

.au-links p:last-child {
    margin-bottom: 0;
}

.au-page .au-link {
    color: var(--au-accent);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .16s ease;
}

.au-page .au-link:hover {
    color: var(--au-accent-deep);
    border-bottom-color: currentColor;
}

.au-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--au-muted);
    text-decoration: none;
}

.au-back:hover {
    color: var(--au-accent);
}


/* == 8. Alerts ============================================================ */

.au-alert {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 16px;
    padding: 12px 38px 12px 14px;
    border: 1px solid transparent;
    border-radius: var(--au-radius-sm);
    font-size: 13.4px;
    line-height: 1.55;
}

.au-alert i {
    flex: 0 0 auto;
    margin-top: 2px;
    font-size: 14px;
}

.au-alert.is-bad {
    background: var(--au-bad-soft);
    border-color: var(--au-bad-line);
    color: var(--au-bad-dark);
}

.au-alert.is-ok {
    background: var(--au-ok-soft);
    border-color: var(--au-ok-line);
    color: var(--au-ok);
}

.au-alert.is-info {
    background: var(--au-warn-soft);
    border-color: var(--au-warn-line);
    color: var(--au-warn);
}

.au-alert-x {
    position: absolute;
    top: 7px;
    right: 8px;
    width: 22px;
    height: 22px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: inherit;
    opacity: .5;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
}

.au-alert-x:hover {
    opacity: 1;
}


/* == 10. Footer ============================================================ */

.au-foot {
    margin: 20px 0 0;
    text-align: center;
    font-size: 12.2px;
    line-height: 1.7;
    color: var(--au-muted);
}

.au-foot a {
    color: var(--au-ink-soft);
    text-decoration: none;
}

.au-foot a:hover {
    color: var(--au-accent);
}


/* == 11. Responsive ======================================================== */

@media (max-width: 880px) {
    .au-wrap {
        padding: 22px 14px;
    }

    .au-shell {
        max-width: 480px;
    }

    .au-card {
        flex-direction: column;
    }

    /* The brand panel becomes a compact band: the mark, the portal name and
       one line of orientation. The selling points would only push the form
       below the fold on a phone, so they are dropped here. */
    .au-aside {
        flex: 0 0 auto;
        max-width: none;
        padding: 26px 26px 24px;
    }

    .au-aside::after {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        height: 1px;
    }

    .au-mark {
        margin-bottom: 16px;
    }

    .au-mark img {
        max-height: 48px;
    }

    /* The band is just the mark, the portal name and the institute here, so it
       stops at the institute rather than reserving room for the notice. */
    .au-portal {
        margin-bottom: 4px;
        font-size: 16px;
    }

    .au-institute {
        margin-bottom: 0;
        font-size: 12.2px;
    }

    .au-notice {
        display: none;
    }

    .au-main {
        padding: 28px 26px 30px;
    }
}

@media (max-width: 420px) {
    .au-aside {
        padding: 22px 20px 20px;
    }

    .au-main {
        padding: 24px 20px 26px;
    }

    .au-portal {
        font-size: 15px;
    }

    .au-institute {
        font-size: 11.8px;
    }

    .au-row {
        gap: 10px;
    }
}


/* == 12. Motion and print ================================================== */

.au-card {
    animation: au-rise .38s cubic-bezier(.22, .68, .36, 1) both;
}

@keyframes au-rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .au-card {
        animation: none;
    }

    .au-page * {
        transition-duration: .01ms !important;
    }
}

@media print {
    .au-page::before,
    .au-page .au-bg {
        display: none;
    }

    .au-card {
        box-shadow: none;
        border: 1px solid var(--au-line);
    }
}


/* == 12. Password requirements panel ======================================
   Used by the reset form (resources/views/web/student/passwords/reset.blade.php).
   It states the same standard the student meets on the account page, so the
   rule is visible while typing rather than delivered as a bounced form. Colours
   come from the shared tokens, so it follows whichever portal accent is set. */

.au-pw {
    margin: 2px 0 18px;
    padding: 13px 15px 14px;
    background: var(--au-field);
    border: 1px solid var(--au-line-soft);
    border-radius: var(--au-radius-sm);
}

.au-pw-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.au-pw-lbl {
    font-size: 12.4px;
    font-weight: 600;
    color: var(--au-ink-soft);
    letter-spacing: .01em;
}

.au-pw-gen {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    font: inherit;
    font-size: 11.8px;
    font-weight: 600;
    color: var(--au-accent);
    background: transparent;
    border: 1px solid var(--au-accent-line);
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.au-pw-gen:hover {
    background: var(--au-accent-soft);
}

.au-pw-gen:focus-visible {
    outline: 2px solid var(--au-accent);
    outline-offset: 2px;
}

/* Strength bar. The width is set from script; the class picks the colour. */
.au-pw-meter {
    height: 4px;
    margin-bottom: 11px;
    background: var(--au-line);
    border-radius: 999px;
    overflow: hidden;
}

.au-pw-meter span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--au-bad);
    transition: width .2s ease, background .2s ease;
}

.au-pw-meter span.is-fair   { background: var(--au-warn); }
.au-pw-meter span.is-strong { background: var(--au-ok); }

.au-pw-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.au-pw-list li {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.1px;
    line-height: 1.5;
    color: var(--au-muted);
    transition: color .15s ease;
}

.au-pw-list li.is-ok {
    color: var(--au-ok);
    font-weight: 600;
}

.au-pw-list li i {
    font-size: 13px;
}

/* Sits under the submit button, so it reads as the reason it is disabled. */
.au-pw-hint {
    margin-top: 8px;
    text-align: center;
}

/* A disabled submit must look disabled — the default button style is solid
   and would otherwise invite the click it is going to refuse. */
.au-page .au-btn:disabled,
.au-page .au-btn[disabled] {
    opacity: .45;
    cursor: not-allowed;
    box-shadow: none;
}

@media (max-width: 480px) {
    .au-pw-list {
        gap: 5px 12px;
    }
}

/* ...and it must not react to the pointer either, or the hover state reads as
   an invitation. Specificity beats the :hover/:active rules above. */
.au-page .au-btn:disabled:hover,
.au-page .au-btn[disabled]:hover,
.au-page .au-btn:disabled:active,
.au-page .au-btn[disabled]:active {
    transform: none;
    filter: none;
    box-shadow: none;
}


/* == 13. Two-step sign-in (auth/two-factor/*) ==============================
   The code box, the QR panel and the recovery codes (2026-09-29, ported from
   the admissions portal). Same tokens as the rest of this sheet, so it follows
   the staff accent. Transitions fall under the reduced-motion rule in 12. */

.au-page .au-input.au-2fa-code {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: .5em;
    text-align: center;
    font-variant-numeric: tabular-nums;
    padding-left: .5em;
}

.au-page .au-input.au-2fa-code.is-recovery {
    letter-spacing: .18em;
    font-size: 20px;
    text-transform: uppercase;
}

/* Six soft dots separated by spaces, with no letter-spacing: nothing trails the last
   dot, so the row is exactly centred and the empty-box cursor falls in the middle gap. */
.au-page .au-input.au-2fa-code::placeholder {
    font-size: inherit;
    letter-spacing: 0;
    word-spacing: .25em;
    color: var(--au-ink-soft);
    opacity: .45;
}

.au-page .au-input.au-2fa-code.is-recovery::placeholder {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: .12em;
    opacity: .7;
}

.au-2fa-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin: -6px 0 18px;
    font-size: 12.5px;
    color: var(--au-muted);
}

.au-2fa-link {
    padding: 0;
    background: none;
    border: 0;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--au-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.au-2fa-link:disabled {
    color: var(--au-placeholder);
    text-decoration: none;
    cursor: default;
}

.au-2fa-resend {
    margin: 14px 0 0;
    text-align: center;
}

.au-2fa-out {
    padding: 0;
    background: none;
    border: 0;
    font: inherit;
    font-size: 13px;
    color: var(--au-muted);
    text-decoration: underline;
    cursor: pointer;
}

.au-2fa-out:hover {
    color: var(--au-accent);
}

.au-2fa-steps {
    display: grid;
    gap: 12px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
    counter-reset: au2fa;
}

.au-2fa-steps li {
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 10px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--au-ink-soft);
    counter-increment: au2fa;
}

.au-2fa-steps li::before {
    content: counter(au2fa);
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--au-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.au-2fa-stores {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.au-2fa-stores a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--au-line);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--au-ink-soft);
    text-decoration: none;
}

.au-2fa-stores a:hover {
    border-color: var(--au-accent-line);
    color: var(--au-accent);
}

.au-2fa-qr {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: center;
    margin: 0 0 18px;
    padding: 14px;
    background: var(--au-card);
    border: 1px solid var(--au-line-soft);
    border-radius: var(--au-radius);
}

.au-2fa-qr img {
    width: 168px;
    height: 168px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--au-line-soft);
    border-radius: var(--au-radius);
    image-rendering: pixelated;
}

.au-2fa-key {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--au-muted);
}

.au-2fa-key code {
    display: block;
    margin-top: 4px;
    padding: 6px 8px;
    border-radius: var(--au-radius-sm);
    background: var(--au-accent-soft);
    color: var(--au-accent-dark);
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: .06em;
    word-break: break-all;
    user-select: all;
}

.au-2fa-codes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 16px;
    padding: 14px;
    background: var(--au-accent-soft);
    border: 1px dashed var(--au-accent-line);
    border-radius: var(--au-radius);
    list-style: none;
}

.au-2fa-codes li {
    padding: 7px 10px;
    background: #fff;
    border-radius: var(--au-radius-sm);
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .08em;
    font-variant-numeric: tabular-nums;
    color: var(--au-accent-dark);
}

.au-2fa-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 16px;
}

.au-2fa-actions button {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid var(--au-line);
    border-radius: var(--au-radius-sm);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--au-ink-soft);
    cursor: pointer;
}

.au-2fa-actions button:hover {
    border-color: var(--au-accent-line);
    color: var(--au-accent);
}

/* The Continue link is an .au-btn that stays shut until the codes are kept. */
.au-page .au-btn.au-2fa-go {
    display: flex;
    align-items: center;
    justify-content: center;
}

.au-page .au-btn.au-2fa-go.is-off {
    opacity: .45;
    pointer-events: none;
    box-shadow: none;
}

@media (max-width: 480px) {
    .au-2fa-qr {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .au-2fa-codes {
        grid-template-columns: 1fr;
    }
}

/* Printing the recovery-code page shows the codes and nothing else. Scoped
   with :has() so every other sign-in screen still prints as it did. */
@media print {
    .au-page:has(.au-2fa-codes) * {
        visibility: hidden;
    }

    .au-page .au-2fa-codes,
    .au-page .au-2fa-codes * {
        visibility: visible;
    }

    .au-page .au-2fa-codes {
        position: absolute;
        top: 0;
        left: 0;
    }
}
