/* ==========================================================================
   Computershare FICA — shared auth screens (login / forgot / reset password)
   Namespaced with `auth-` so nothing collides with Bootstrap / DaisyUI.
   ========================================================================== */

:root {
    --auth-brand: #93186c;
    --auth-brand-deep: #4b2067;
    --auth-brand-bright: #b5179e;
    --auth-gradient: linear-gradient(120deg, #4b2067 0%, #93186c 55%, #b5179e 100%);
    --auth-ink: #2d1b36;
    --auth-muted: #6b7280;
    --auth-line: #e6e3ea;
    --auth-field: #f8f6fa;
}

/* ---------- page shell ---------------------------------------------------- */

body.auth-bg {
    min-height: 100vh;
    margin: 0;
    background-color: #3d1a5b;
    background-image:
        linear-gradient(140deg, rgba(38, 10, 58, .72) 0%, rgba(120, 20, 100, .45) 55%, rgba(28, 8, 48, .8) 100%),
        url('../images/login-bg.png');
    background-size: cover, cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.auth-shell {
    width: 100%;
    max-width: 470px;
}

.auth-card {
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow:
        0 34px 70px -22px rgba(24, 5, 38, .6),
        0 2px 8px rgba(0, 0, 0, .08);
}

/* Softer treatment for cards sitting on a light dashboard page rather than
   on the full-bleed auth background. */
.auth-card--flat {
    border: 1px solid #ece8ef;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(24, 5, 38, .06), 0 10px 30px -18px rgba(24, 5, 38, .35);
}

/* ---------- header -------------------------------------------------------- */

.auth-card__header {
    position: relative;
    background: var(--auth-gradient);
    padding: 30px 32px 26px;
    text-align: center;
}

.auth-card__header::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 90% at 12% 0%, rgba(255, 255, 255, .2), transparent 62%);
    pointer-events: none;
}

.auth-logo-plate {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 14px;
    padding: 12px 24px;
    margin-bottom: 18px;
    box-shadow: 0 10px 24px rgba(18, 3, 28, .3);
}

.auth-logo-plate img {
    display: block;
    width: 180px;
    max-width: 100%;
    height: auto;
}

.auth-title {
    position: relative;
    z-index: 1;
    margin: 0 0 4px;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.auth-subtitle {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(255, 255, 255, .82);
    font-size: .875rem;
    font-weight: 400;
}

/* ---------- body / footer ------------------------------------------------- */

.auth-card__body {
    padding: 28px 32px 24px;
}

.auth-card__footer {
    border-top: 1px solid var(--auth-line);
    background: #faf8fb;
    padding: 15px 32px 17px;
    text-align: center;
}

.auth-legal {
    margin: 0 0 5px;
    font-size: .8rem;
}

.auth-copy {
    margin: 0;
    font-size: .7rem;
    color: #8b8494;
}

/* ---------- alerts -------------------------------------------------------- */

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    padding: 11px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: .83rem;
    line-height: 1.4;
}

.auth-alert i {
    flex: 0 0 auto;
    font-size: 1rem;
    line-height: 1.3;
}

.auth-alert--error {
    background: #fdf2f4;
    border-color: #f7ccd6;
    color: #a1112f;
}

.auth-alert--success {
    background: #f0fbf5;
    border-color: #bfe9d0;
    color: #12693f;
}

/* ---------- fields -------------------------------------------------------- */

.auth-field {
    margin-bottom: 16px;
}

.auth-label {
    display: block;
    margin-bottom: 6px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--auth-ink);
}

.auth-control {
    position: relative;
    display: block;
}

.auth-control > .auth-icon {
    position: absolute;
    left: 15px;
    top: 24px;
    transform: translateY(-50%);
    color: #a996b3;
    font-size: 1.05rem;
    line-height: 1;
    pointer-events: none;
}

.auth-input {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 44px 0 42px;
    border: 1.5px solid var(--auth-line);
    border-radius: 12px;
    background: var(--auth-field);
    color: var(--auth-ink);
    font-size: .9rem;
    outline: none;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.auth-input::placeholder {
    color: #9b93a3;
    opacity: 1;
}

.auth-input:focus {
    background: #fff;
    border-color: var(--auth-brand);
    box-shadow: 0 0 0 4px rgba(147, 24, 108, .12);
}

.auth-input[readonly] {
    background: #f1eef4;
    color: #6b6472;
    cursor: not-allowed;
}

.auth-input[readonly]:focus {
    border-color: var(--auth-line);
    box-shadow: none;
}

.auth-input.is-invalid {
    border-color: #e11d48;
    background: #fdf6f8;
}

.auth-input.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(225, 29, 72, .1);
}

/* password reveal toggle */
.auth-eye {
    position: absolute;
    right: 6px;
    top: 24px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #8c7d96;
    font-size: 1.05rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.auth-eye:hover,
.auth-eye:focus {
    background: rgba(147, 24, 108, .08);
    color: var(--auth-brand);
    outline: none;
}

/* legacy hook kept for the reset screen's show/hide script */
.auth-control .passkey-icon {
    position: absolute;
    right: 15px;
    top: 24px;
    transform: translateY(-50%);
    font-size: 1rem;
    line-height: 1;
    color: #8c7d96;
    cursor: pointer;
    transition: color .15s ease;
}

.auth-control .passkey-icon:hover {
    color: var(--auth-brand);
}

.auth-control .passkey-icon + .auth-input,
.auth-input.has-eye {
    padding-right: 44px;
}

/* inline validation text (`messg`, `error-message`, `error-messg` are JS hooks) */
.auth-error,
.auth-field .messg,
.auth-field .error-message,
.auth-field .error-messg {
    display: block;
    margin-top: 6px;
    font-size: .76rem;
    font-weight: 500;
    line-height: 1.3;
    color: #e11d48;
}

.auth-label .required {
    color: #e11d48;
    font-weight: 700;
}

/* ---------- buttons ------------------------------------------------------- */

.auth-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* left-aligned, content-width actions (dashboard forms) */
.auth-actions--start {
    justify-content: flex-start;
}

.auth-btn--auto {
    flex: 0 0 auto;
    width: auto;
    min-width: 180px;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1 1 0;
    width: 100%;
    height: 48px;
    padding: 0 18px;
    border: 1.5px solid transparent;
    border-radius: 12px;
    font-size: .92rem;
    font-weight: 600;
    letter-spacing: .01em;
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .2s ease, background .2s ease, color .2s ease, filter .2s ease;
}

.auth-btn:active {
    transform: translateY(1px);
}

.auth-btn:disabled,
.auth-btn[disabled] {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
    filter: none;
}

.auth-btn--primary {
    background: var(--auth-gradient);
    color: #fff;
    box-shadow: 0 12px 24px -12px rgba(147, 24, 108, .95);
}

.auth-btn--primary:hover,
.auth-btn--primary:focus {
    color: #fff;
    filter: brightness(1.08);
    box-shadow: 0 16px 28px -12px rgba(147, 24, 108, 1);
}

.auth-btn--ghost {
    background: #fff;
    color: var(--auth-brand);
    border-color: rgba(147, 24, 108, .35);
}

.auth-btn--ghost:hover,
.auth-btn--ghost:focus {
    background: rgba(147, 24, 108, .07);
    color: var(--auth-brand);
    border-color: var(--auth-brand);
}

/* ---------- "or" divider -------------------------------------------------- */

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 16px;
    color: #a49bad;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--auth-line);
}

/* ---------- links --------------------------------------------------------- */

.auth-links {
    margin-top: 20px;
    text-align: center;
    font-size: .85rem;
    color: var(--auth-muted);
}

.auth-links p {
    margin: 0 0 6px;
}

.auth-links p:last-child {
    margin-bottom: 0;
}

.auth-link {
    color: var(--auth-brand);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.auth-link:hover,
.auth-link:focus {
    color: var(--auth-brand-bright);
    text-decoration: underline;
}

/* ---------- password strength (reset screen) ------------------------------ */

.auth-strength {
    margin: 2px 0 18px;
    padding: 14px 16px;
    border: 1px solid var(--auth-line);
    border-radius: 14px;
    background: #faf8fb;
}

.auth-strength__bar {
    height: 6px;
    border-radius: 99px;
    background: #eae5ee;
    overflow: hidden;
}

.auth-strength__bar > .progress-bar {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 99px;
    background: #e11d48;
    transition: width .25s ease, background-color .25s ease;
}

.auth-strength__bar > .progress-bar-danger  { background: #e11d48; }
.auth-strength__bar > .progress-bar-warning { background: #f59e0b; }
.auth-strength__bar > .progress-bar-success { background: #10b981; }

.auth-strength__title {
    margin: 13px 0 8px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--auth-brand);
}

.auth-reqs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px 12px;
}

.auth-reqs span {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .75rem;
    color: var(--auth-muted);
}

.auth-reqs i {
    width: 14px;
    text-align: center;
    font-size: .5rem;
    color: #c9c1d0;
}

.auth-reqs i.fa-check {
    font-size: .75rem;
    color: #10b981;
}

/* ---------- small screens ------------------------------------------------- */

@media (max-width: 480px) {
    body.auth-bg {
        background-attachment: scroll;
    }

    .auth-page {
        padding: 24px 12px;
    }

    .auth-card {
        border-radius: 18px;
    }

    .auth-card__header {
        padding: 24px 20px 22px;
    }

    .auth-card__body {
        padding: 22px 20px 20px;
    }

    .auth-card__footer {
        padding: 14px 20px 16px;
    }

    .auth-logo-plate img {
        width: 150px;
    }

    .auth-title {
        font-size: 1.25rem;
    }

    .auth-actions {
        flex-direction: column;
    }

    .auth-reqs {
        grid-template-columns: 1fr;
    }
}
