/*
 * The employee portal's sign in pages (layouts/auth): one card on a warm
 * ground, in the site theme's type and accent.
 *   accent  #FF9800      text  #000000 / rgba(0,0,0,.6)
 *   type    Outfit, with Fraunces for the badge
 */

:root {
    --auth-accent: #FF9800;
    --auth-accent-dark: #E68900;
    --auth-accent-soft: rgba(255, 152, 0, 0.12);
    --auth-ink: #000000;
    --auth-muted: rgba(0, 0, 0, 0.6);
    --auth-line: rgba(0, 0, 0, 0.12);
    --auth-field: #FAF7F2;
    --auth-danger: #B3261E;
    --auth-good: #1C6B43;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body.auth {
    margin: 0;
    min-height: 100vh;
    font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.55;
    color: var(--auth-ink);
    background:
        radial-gradient(1200px 600px at 110% -10%, rgba(255, 152, 0, 0.14), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(255, 152, 0, 0.10), transparent 60%),
        #F4F0EA;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: rgba(255, 152, 0, 0.35);
}

a {
    color: inherit;
}

.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 48px 16px;
}

.auth-card {
    width: 100%;
    max-width: 520px;
    padding: 44px 40px 32px;
    border-radius: 24px;
    background: #FFFFFF;
    box-shadow: 0 30px 70px rgba(40, 24, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.04);
    text-align: center;
}

.auth-card.is-wide {
    max-width: 720px;
}

/* ---------- brand ---------- */

.auth-brand {
    display: inline-flex;
    margin-bottom: 18px;
    text-decoration: none;
}

.auth-brand .mil-logo-lockup {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.auth-brand .mil-logo-mark {
    display: block;
    width: 60px;
    height: 60px;
}

.auth-brand .mil-logo-name {
    font-family: "Fraunces", Georgia, "Times New Roman", serif;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--auth-ink);
}

/* "Employee portal", on its own line between the logo and the page title. */
.auth-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin: 0 auto 14px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9C5400;
    background: rgba(255, 152, 0, 0.12);
    border-radius: 99px;
}

.auth-title {
    margin: 0 0 28px;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

/* ---------- messages ---------- */

.auth-alert {
    margin-bottom: 22px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 15px;
    text-align: left;
}

.auth-alert.is-ok {
    color: var(--auth-good);
    background: rgba(35, 150, 90, 0.10);
}

.auth-alert.is-error {
    color: var(--auth-danger);
    background: rgba(179, 38, 30, 0.08);
}

/* ---------- fields ---------- */

.auth-form {
    text-align: left;
}

.auth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
}

.auth-field {
    margin-bottom: 18px;
}

.auth-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.auth-required {
    margin-left: 3px;
    color: var(--auth-accent-dark);
}

.auth-input {
    position: relative;
    display: flex;
    align-items: center;
    border: 1.5px solid transparent;
    border-radius: 12px;
    background: var(--auth-field);
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus-within {
    border-color: var(--auth-accent);
    background: #FFFFFF;
    box-shadow: 0 0 0 4px var(--auth-accent-soft);
}

.auth-input.is-invalid {
    border-color: var(--auth-danger);
    background: #FFFFFF;
}

.auth-input > i {
    position: absolute;
    left: 16px;
    font-size: 15px;
    color: rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.auth-input:focus-within > i {
    color: var(--auth-accent-dark);
}

.auth-input input,
.auth-input select {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 44px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    font: inherit;
    font-size: 15px;
    color: var(--auth-ink);
    outline: none;
}

.auth-input input::placeholder {
    color: rgba(0, 0, 0, 0.35);
}

.auth-input select {
    appearance: none;
    padding-right: 40px;
    cursor: pointer;
}

.auth-input.is-select::after {
    content: "";
    position: absolute;
    right: 18px;
    width: 8px;
    height: 8px;
    margin-top: -4px;
    border: solid rgba(0, 0, 0, 0.5);
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
    pointer-events: none;
}

/* Room for the show/hide button, whether the password is shown or not. */
.auth-input:has(.auth-reveal) input {
    padding-right: 48px;
}

.auth-reveal {
    position: absolute;
    right: 6px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: none;
    color: rgba(0, 0, 0, 0.45);
    cursor: pointer;
}

.auth-reveal:hover,
.auth-reveal:focus-visible {
    color: var(--auth-ink);
    background: rgba(0, 0, 0, 0.05);
}

.auth-hint {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--auth-muted);
}

.auth-error {
    display: block;
    min-height: 0;
    margin-top: 6px;
    font-size: 13px;
    color: var(--auth-danger);
}

.auth-error:empty {
    display: none;
}

/* ---------- remember me, links, button ---------- */

.auth-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 4px 0 22px;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--auth-muted);
    cursor: pointer;
}

.auth-check input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--auth-accent);
}

.auth-link {
    font-weight: 600;
    color: #9C5400;
    text-decoration: none;
}

.auth-link:hover,
.auth-link:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 54px;
    margin-top: 6px;
    border: 0;
    border-radius: 14px;
    background: var(--auth-accent);
    box-shadow: 0 12px 26px rgba(255, 152, 0, 0.28);
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    color: var(--auth-ink);
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.auth-button:hover {
    background: var(--auth-accent-dark);
    box-shadow: 0 14px 30px rgba(255, 152, 0, 0.34);
}

.auth-button:active {
    transform: translateY(1px);
}

.auth-button:focus-visible {
    outline: 3px solid var(--auth-ink);
    outline-offset: 3px;
}

.auth-button i {
    transition: transform 0.2s;
}

.auth-button:hover i {
    transform: translateX(3px);
}

.auth-switch {
    margin: 24px 0 0;
    font-size: 15px;
    color: var(--auth-muted);
}

@media (max-width: 600px) {
    .auth-card {
        padding: 32px 20px 24px;
        border-radius: 20px;
    }

    .auth-title {
        font-size: 26px;
    }

    .auth-brand .mil-logo-mark {
        width: 50px;
        height: 50px;
    }

    .auth-brand .mil-logo-name {
        font-size: 30px;
    }

    .auth-grid {
        grid-template-columns: 1fr;
    }
}
