/* Civic redesign: colours remapped to the VOTARA Civic palette (see votara-civic.css). */
/* VOTARA login page */
:root {
    --login-navy: #10192b;
    --login-blue: #2359ab;
    --login-royal: #2662bb;
    --login-cyan: #2867c4;
    --login-ink: #131d33;
    --login-muted: #66768e;
    --login-border: #e9e7e2;
    --login-surface: #f9f8f6;
}

body.login-bg {
    min-width: 320px;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    overflow-x: hidden;
    color: var(--login-ink);
    background: var(--login-surface);
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

.login-bg h1,
.login-bg h2,
.login-bg h3,
.login-bg button,
.login-bg input { font-family: inherit; }

.login-skip-link {
    position: fixed;
    top: .75rem;
    left: .75rem;
    z-index: 100;
    padding: .7rem 1rem;
    color: var(--login-navy);
    background: #ffffff;
    border-radius: .6rem;
    box-shadow: 0 8px 24px rgba(16,25,43, .18);
    transform: translateY(-150%);
    transition: transform .2s ease;
}

.login-skip-link:focus { transform: translateY(0); }

.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(470px, .96fr);
    align-items: start;
    min-height: 100vh;
    min-height: 100svh;
}

/* Left brand panel */
.login-brand-panel {
    position: sticky;
    top: 0;
    isolation: isolate;
    display: flex;
    height: 100vh;
    height: 100svh;
    min-height: 100vh;
    min-height: 100svh;
    align-self: start;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(145deg, #0e1626 0%, #213258 52%, #235aac 100%);
}

.brand-grid {
    position: absolute;
    z-index: -3;
    inset: 0;
    opacity: .16;
    background-image:
        linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px);
    background-size: 54px 54px;
    -webkit-mask-image: linear-gradient(to bottom right, #000000 0%, transparent 78%);
    mask-image: linear-gradient(to bottom right, #000000 0%, transparent 78%);
}

.login-brand-panel::after {
    position: absolute;
    z-index: -2;
    right: -18%;
    bottom: -34%;
    width: 65%;
    aspect-ratio: 1;
    content: '';
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 50%;
    box-shadow: 0 0 0 54px rgba(255,255,255,.025), 0 0 0 108px rgba(255,255,255,.02);
}

.brand-orb {
    position: absolute;
    z-index: -1;
    display: block;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(2px);
}

.brand-orb-one {
    top: -8rem;
    right: -4rem;
    width: 22rem;
    height: 22rem;
    background: radial-gradient(circle, rgba(40,103,196,.28), rgba(40,103,196,0) 68%);
}

.brand-orb-two {
    bottom: -7rem;
    left: -7rem;
    width: 24rem;
    height: 24rem;
    background: radial-gradient(circle, rgba(40,103,196,.18), rgba(40,103,196,0) 68%);
}

.brand-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    width: 100%;
    max-width: 760px;
    min-height: 100%;
    margin-inline: auto;
    padding: clamp(2rem, 4vw, 4rem) clamp(2rem, 5vw, 5rem) 2rem;
}

.brand-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: login-rise .65s ease both;
}

.brand-logo-wrap {
    display: grid;
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    place-items: center;
    overflow: hidden;
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(255,255,255,.58);
    border-radius: 20px;
    box-shadow: 0 16px 36px rgba(10,15,26, .2);
}

.brand-logo { display: block; width: 59px; height: 59px; object-fit: contain; }

.brand-kicker {
    display: block;
    margin-top: .45rem;
    color: rgba(255,255,255,.68);
    font-size: .8rem;
    font-weight: 500;
    line-height: 1.4;
}

.brand-identity h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.8rem, 3vw, 2.45rem);
    font-weight: 800;
    letter-spacing: .055em;
    line-height: 1;
}

/* Message and ballot sit as one group, centred between the identity and the trust row. */
.brand-message {
    max-width: 600px;
    margin-top: auto;
    padding-top: clamp(2rem, 5vh, 3.5rem);
    animation: login-rise .5s .06s ease both;
}

.brand-message h2 {
    max-width: 16ch;
    margin: 0 0 1rem;
    color: #ffffff;
    font-size: clamp(2.1rem, 3.3vw, 3.4rem);
    text-wrap: balance;
    font-weight: 750;
    letter-spacing: -.045em;
    line-height: 1.08;
}

.brand-message p {
    max-width: 44ch;
    margin: 0;
    color: rgba(247,246,243,.8);
    font-size: clamp(.96rem, 1.35vw, 1.1rem);
    line-height: 1.75;
}

/* Paper ballot illustration: the shaded-oval ballot students mark on election day, with
   machine timing marks down the edge and the commission's seal stamped in the corner. */
.voting-visual {
    position: relative;
    width: min(100%, 390px);
    flex: 0 0 auto;
    margin: clamp(1.75rem, 4vh, 2.75rem) 0 auto;
    padding-bottom: 1.5rem;
    animation: login-rise .55s .12s ease both;
}

.ballot-sheet {
    position: relative;
    padding: 1rem 1.15rem 1.15rem 1.6rem;
    color: #1a1f2b;
    background: #fbfaf6;
    border-radius: 3px;
    box-shadow: 0 30px 60px -22px rgba(0, 0, 0, .6), 0 2px 0 rgba(0, 0, 0, .18);
    transform: rotate(-1.6deg);
}

.ballot-sheet::before {
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 8px;
    width: 6px;
    content: "";
    background: repeating-linear-gradient(to bottom, #1a1f2b 0 6px, transparent 6px 22px);
}

.ballot-sheet-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .8rem;
    padding-bottom: .55rem;
    border-bottom: 2px solid #1a1f2b;
}

.ballot-sheet-title { font-family: "Source Serif 4", Georgia, serif; font-size: 1.05rem; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.ballot-sheet-sub { color: #6b7180; font-size: .66rem; text-align: right; }

.ballot-race + .ballot-race { margin-top: .85rem; }

.ballot-race-name {
    display: flex;
    justify-content: space-between;
    margin: 0 0 .5rem;
    padding: .28rem .55rem;
    background: #ece8df;
    color: #1a1f2b;
    font-size: .7rem;
    font-weight: 700;
}

.ballot-race-name span { color: #545b6a; font-weight: 500; }

.ballot-race ul { display: grid; gap: .5rem; margin: 0; padding: 0 .55rem; list-style: none; }
.ballot-race li { display: flex; align-items: center; gap: .75rem; }
.ballot-race li i { display: block; width: var(--w, 50%); height: 5px; background: #dcd6c8; border-radius: 2px; }
.ballot-race li.is-marked i { background: #a39c8c; }

.oval {
    position: relative;
    flex: 0 0 auto;
    width: 24px;
    height: 12px;
    overflow: hidden;
    border: 1.5px solid #1a1f2b;
    border-radius: 50%;
}

/* Marked ovals rest filled; the load animation only inks them in, so reduced motion still shows them. */
.oval::after {
    position: absolute;
    inset: 1px;
    content: "";
    background: #1a1f2b;
    border-radius: 50%;
    transform: scale(0);
}

.is-marked .oval::after { transform: none; animation: ballot-ink .32s ease-out var(--delay, .7s) both; }

.ballot-seal {
    position: absolute;
    right: 16px;
    bottom: 14px;
    width: 76px;
    height: 76px;
    object-fit: cover;
    border-radius: 50%;
    mix-blend-mode: multiply;
    opacity: .88;
    transform: rotate(-14deg);
    animation: ballot-stamp .38s cubic-bezier(.2, 1.3, .4, 1) 1.6s both;
}

@keyframes ballot-ink { from { transform: scale(0); } }
@keyframes ballot-stamp { from { opacity: 0; transform: rotate(-14deg) scale(1.4); } }

.trust-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: auto;
    padding-top: .5rem;
    color: rgba(247,246,243,.72);
    font-size: .76rem;
    font-weight: 600;
}

.trust-row span { display: inline-flex; align-items: center; gap: .45rem; }
.trust-row .bi { color: #80a4da; }

/* Right form panel */
.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 100vh;
    min-height: 100svh;
    align-self: start;
    padding: clamp(2rem, 4vw, 4rem);
    background: radial-gradient(circle at 100% 0, rgba(38,98,187,.07), transparent 31%), var(--login-surface);
}

.login-form-wrap {
    width: min(100%, 520px);
    margin-block: auto;
    animation: login-rise .5s .08s ease both;
}

.login-card {
    padding: clamp(1.65rem, 4vw, 3rem);
    background: #ffffff;
    border: 1px solid rgba(224,221,216,.9);
    border-radius: 24px;
    box-shadow: 0 22px 60px rgba(26,39,69,.11);
}

.login-card-heading { margin-bottom: 1.75rem; }

.login-overline {
    margin: 0 0 .6rem;
    color: var(--login-blue) !important;
    font-size: .72rem;
    font-weight: 750;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.login-card-heading :is(h1, h2) {
    margin: 0 0 .55rem;
    color: #121c31;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 750;
    letter-spacing: -.035em;
}

.login-card-heading > p:last-child {
    margin: 0;
    color: var(--login-muted);
    font-size: .92rem;
    line-height: 1.6;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    margin: -.35rem 0 1.25rem;
    padding: .8rem .9rem;
    color: #912d26;
    background: #faf9f8;
    border: 1px solid #f2ccc9;
    border-radius: 11px;
    font-size: .82rem;
    line-height: 1.45;
}

.alert-icon {
    display: grid;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    place-items: center;
    color: #c44037;
    background: #fae6e5;
    border-radius: 7px;
}

.login-form { display: grid; gap: 1.15rem; }

.login-field label {
    display: inline-block;
    margin-bottom: .5rem;
    color: #232f4c;
    font-size: .79rem;
    font-weight: 700;
}

.field-control { position: relative; }

.field-icon {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 1rem;
    color: #788dad;
    font-size: 1rem;
    pointer-events: none;
    transform: translateY(-50%);
    transition: color .2s ease;
}

.field-control .form-control {
    width: 100%;
    min-height: 52px;
    padding: .82rem 1rem .82rem 2.8rem;
    color: #151f37;
    background: #fbfbfb;
    border: 1px solid var(--login-border);
    border-radius: 12px;
    box-shadow: none;
    font-size: .91rem;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.password-control .form-control { padding-right: 3.25rem; }
.field-control .form-control::placeholder { color: #a2aec0; }
.field-control .form-control:hover { border-color: #b8c6da; }

.field-control .form-control:focus {
    background: #ffffff;
    border-color: var(--login-royal);
    box-shadow: 0 0 0 4px rgba(38,98,187,.11);
}

.field-control:focus-within .field-icon { color: var(--login-royal); }

.password-toggle {
    position: absolute;
    z-index: 3;
    top: 50%;
    right: .55rem;
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    color: #687a96;
    background: transparent;
    border: 0;
    border-radius: 9px;
    transform: translateY(-50%);
    transition: color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.password-toggle:hover { color: var(--login-blue); background: #f6f5f3; }

.password-toggle:focus-visible {
    color: var(--login-blue);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(38,98,187,.18);
}

.login-submit {
    position: relative;
    display: grid;
    width: 100%;
    min-height: 52px;
    margin-top: .15rem;
    padding: .82rem 1.2rem;
    place-items: center;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(100deg, #2256a4, #2662bb);
    border: 0;
    border-radius: 12px;
    box-shadow: 0 9px 20px rgba(35,90,173,.22);
    font-size: .9rem;
    font-weight: 750;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.login-submit::before {
    position: absolute;
    inset: 0;
    content: '';
    background: linear-gradient(100deg, transparent 25%, rgba(255,255,255,.15), transparent 75%);
    transform: translateX(-110%);
    transition: transform .55s ease;
}

.login-submit:hover:not(:disabled) {
    box-shadow: 0 13px 28px rgba(35,90,173,.3);
    transform: translateY(-1px);
}

.login-submit:hover:not(:disabled)::before { transform: translateX(110%); }
.login-submit:active:not(:disabled) { box-shadow: 0 6px 14px rgba(35,90,173,.22); transform: translateY(1px); }
.login-submit:focus-visible { outline: 3px solid rgba(38,98,187,.28); outline-offset: 3px; }
.login-submit:disabled { cursor: wait; filter: saturate(.72) opacity(.84); }
.submit-label, .submit-loading { display: inline-flex; align-items: center; gap: .5rem; }
.submit-loading, .login-submit.is-loading .submit-label { display: none; }
.login-submit.is-loading .submit-loading { display: inline-flex; }

.security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .42rem;
    margin: -.2rem 0 0;
    color: #75849a;
    font-size: .7rem;
    text-align: center;
}

.security-note .bi { color: #288a59; font-size: .82rem; }

/* Demo accounts */
.demo-panel {
    margin-top: 1.45rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f0eeeb;
}

.demo-panel .collapsing {
    display: block;
    height: 0;
    overflow: hidden;
    transition: height 250ms cubic-bezier(.4, 0, .2, 1);
}

.demo-panel .collapse.show {
    overflow: visible;
}

.demo-toggle {
    display: flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    padding: .68rem .8rem;
    color: #2d3a59;
    background: #fafaf9;
    border: 1px solid #ebe9e6;
    border-radius: 11px;
    font-size: .79rem;
    font-weight: 700;
    touch-action: manipulation;
    transition: color .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.demo-toggle > span { display: inline-flex; align-items: center; gap: .55rem; }
.demo-toggle > span .bi { color: var(--login-blue); font-size: 1rem; }
.demo-toggle:hover { color: var(--login-blue); background: #f8f7f6; border-color: #bdcce3; }
.demo-toggle:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(38,98,187,.16); }
.demo-chevron {
    flex: 0 0 auto;
    transition: transform 250ms cubic-bezier(.4, 0, .2, 1);
}
.demo-toggle[aria-expanded='true'] .demo-chevron { transform: rotate(180deg); }
.demo-content { padding-top: .85rem; }
.demo-content > p { margin: 0 0 .7rem; color: #7a889d; font-size: .7rem; }
.demo-list { display: grid; gap: .5rem; }

.demo-btn {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto 18px;
    gap: .7rem;
    width: 100%;
    min-height: 58px;
    align-items: center;
    padding: .58rem .65rem;
    color: #24314f;
    text-align: left;
    background: #ffffff;
    border: 1px solid #ebe9e6;
    border-radius: 11px;
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.demo-btn:hover {
    background: #f8fbff;
    border-color: #a9c1e6;
    box-shadow: 0 7px 16px rgba(38,57,101,.08);
    transform: translateY(-1px);
}

.demo-btn:focus-visible,
.demo-btn.active {
    outline: 0;
    background: #f9f8f6;
    border-color: #2b6ed3;
    box-shadow: 0 0 0 3px rgba(38,98,187,.12);
}

.demo-role {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .28rem;
    padding: .3rem .42rem;
    border-radius: 7px;
    font-size: .61rem;
    font-weight: 750;
    letter-spacing: .025em;
}

.role-admin { color: #21539f; background: #f4f3f0; }
.role-auditor { color: #4b6791; background: #f2eef6; }
.role-voter { color: #1f6b45; background: #e4f6ed; }
.demo-account { min-width: 0; }
.demo-account strong, .demo-account small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-account strong { font-size: .72rem; font-weight: 700; }
.demo-account small { margin-top: .13rem; color: #8390a4; font-size: .61rem; }

.demo-password {
    color: #73839a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .64rem;
}

.demo-arrow { color: #8293ad; font-size: 1.05rem; transition: transform .18s ease; }
.demo-btn:hover .demo-arrow { color: var(--login-blue); transform: translateX(2px); }

.login-footer {
    margin-top: 1.35rem;
    color: #938e83;
    font-size: .68rem;
    line-height: 1.6;
    text-align: center;
}

.login-footer span::before { margin: 0 .35rem; content: '•'; }

@keyframes login-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive layout */
@media (max-width: 1199.98px) {
    .login-shell { grid-template-columns: minmax(0, .92fr) minmax(460px, 1.08fr); }
    .brand-content { padding-inline: clamp(2rem, 4vw, 3.5rem); }
    .voting-visual { width: min(100%, 360px); }
}

@media (max-width: 991.98px) {
    .login-shell { display: block; }
    .login-brand-panel {
        position: relative;
        top: auto;
        height: auto;
        min-height: auto;
    }

    .brand-content {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(250px, .65fr);
        gap: 1.5rem 2rem;
        max-width: 900px;
        padding: 2.25rem clamp(1.5rem, 6vw, 4rem) 2.5rem;
    }

    .brand-identity, .trust-row { grid-column: 1 / -1; }
    .brand-message { align-self: center; margin-top: 1rem; padding-top: 0; }
    .brand-message h2 { font-size: clamp(2rem, 6vw, 3.1rem); }
    .voting-visual { align-self: center; width: min(100%, 320px); margin: 0; padding-bottom: 0; }
    .trust-row { margin: .75rem 0 0; padding-top: 0; }
    .login-form-panel { min-height: auto; padding: 3.5rem 1.5rem 2rem; }
    .login-form-wrap { width: min(100%, 560px); }
}

@media (max-width: 767.98px) {
    .brand-content { display: block; padding: 1.6rem 1.4rem 2rem; }
    .brand-logo-wrap { width: 58px; height: 58px; flex-basis: 58px; border-radius: 16px; }
    .brand-logo { width: 48px; height: 48px; }
    .brand-kicker { font-size: .72rem; }
    .brand-identity h1 { font-size: 1.65rem; }
    .brand-message { margin-top: 2.35rem; padding-top: 0; }
    .brand-message h2 { margin-bottom: .75rem; font-size: clamp(1.9rem, 9vw, 2.6rem); }
    .brand-message p { font-size: .9rem; line-height: 1.65; }
    .voting-visual { display: none; }
    .trust-row { margin-top: 1.6rem; gap: .9rem 1.3rem; flex-wrap: wrap; }
    .login-form-panel { padding: 2rem 1rem 1.5rem; }
    .login-card { padding: 1.5rem; border-radius: 19px; box-shadow: 0 14px 38px rgba(26,39,69,.09); }
    .login-card-heading { margin-bottom: 1.4rem; }
    .login-card-heading :is(h1, h2) { font-size: 1.75rem; }
}

@media (max-width: 479.98px) {
    .login-form-panel { padding-inline: .75rem; }
    .login-card { padding: 1.25rem; border-radius: 16px; }
    .demo-btn { grid-template-columns: 72px minmax(0, 1fr) 18px; }
    .demo-password { display: none; }
    .security-note { align-items: flex-start; line-height: 1.45; }
    .login-footer span { display: block; }
    .login-footer span::before { content: none; }
}

@media (max-height: 860px) and (min-width: 992px) {
    .brand-content { padding-top: 1.5rem; padding-bottom: 1.25rem; }
    .brand-logo-wrap { width: 62px; height: 62px; flex-basis: 62px; border-radius: 17px; }
    .brand-logo { width: 51px; height: 51px; }
    .brand-message { margin-top: 1.6rem; }
    .brand-message h2 { margin-bottom: .7rem; font-size: clamp(2.2rem, 3.3vw, 3.15rem); }
    .brand-message p { font-size: .94rem; line-height: 1.55; }
    .brand-message { padding-top: 1.5rem; }
    .voting-visual { width: min(100%, 330px); margin-top: 1.25rem; padding-bottom: .75rem; }
    .ballot-race li:nth-child(n+4) { display: none; }
    .trust-row { padding-top: 0; font-size: .7rem; }
    .login-form-panel { padding-top: 1.25rem; padding-bottom: 1.25rem; }
    .login-card { padding-top: 1.7rem; padding-bottom: 1.7rem; }
    .login-card-heading { margin-bottom: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
    .login-bg *,
    .login-bg *::before,
    .login-bg *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    .demo-panel .collapsing,
    .demo-chevron {
        transition: none !important;
    }
}

.login-access-help { border-top:1px solid var(--login-border); padding-top:20px; margin-top:20px; }
.login-access-help h3 { font-size:14px; font-weight:600; color:#314b72; }
.login-access-help p { font-size:13px; color:#52627b; line-height:1.65; margin:8px 0 0; }
.login-access-help p + p { margin-top: 2px; }

/* Compact demo credentials within the existing account-access card. */
.login-demo { margin-top: 1.15rem; padding: .85rem; border: 1px solid #dee6f3; border-radius: 12px; background: #faf9f7; }
.login-demo h3 { margin: 0 0 .55rem; color: #314b72; font-size: .82rem; font-weight: 700; }
.login-demo-content { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1rem; }
.login-demo-credentials { display: grid; gap: .3rem; flex: 1 0 auto; margin: 0; color: #52627b; font-size: .75rem; }
.login-demo-credentials > div { display: flex; flex-wrap: wrap; gap: .4rem; }
.login-demo-credentials dt { font-weight: 400; }
.login-demo-credentials dt i { margin-right: .2rem; color: var(--login-blue); }
.login-demo-credentials dd { margin: 0; color: #232f4c; overflow-wrap: anywhere; }
.login-demo-use { min-height: 44px; padding: .5rem .7rem; border: 1px solid #ccd9ec; border-radius: 8px; background: #ffffff; color: var(--login-blue); font: inherit; font-size: .75rem; font-weight: 700; transition: background-color .18s ease, border-color .18s ease; }
.login-demo-use:hover { background: #f5f4f1; border-color: #96b4e0; }
.login-demo-use:focus-visible { outline: 3px solid var(--login-royal); outline-offset: 3px; }
.login-demo-content + .login-demo-content { margin-top: .65rem; padding-top: .65rem; border-top: 1px dashed #dee6f3; }
.login-demo-credentials .login-demo-role dd { color: #314b72; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.login-demo-use { min-width: 8.5rem; }

/* Return link to the public landing page (index.php), above the sign-in card. */
.login-back-home {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 40px;
    margin-bottom: .75rem;
    padding: .25rem .1rem;
    border-radius: 6px;
    color: #545b6a;
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    transition: color .18s ease;
}
.login-back-home i { font-size: 1rem; transition: transform .18s ease; }
.login-back-home:hover { color: #1f4e9c; }
.login-back-home:hover i { transform: translateX(-3px); }
.login-back-home:focus-visible { outline: 3px solid rgba(38,98,187,.35); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .login-back-home, .login-back-home i { transition: none; } }

/* Password recovery (modules/auth/forgot_password.php): the sign-in card on its own, under a brand row. */
.recovery-shell {
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    place-items: center;
    padding: clamp(1.5rem, 6vh, 4rem) 1rem;
}
.recovery-wrap { width: min(100%, 480px); animation: login-rise .45s ease both; }
.recovery-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; margin-bottom: 1rem; }
.recovery-top .login-back-home { margin-bottom: 0; }
.recovery-brand { display: inline-flex; align-items: center; gap: .75rem; color: inherit; text-decoration: none; }
.recovery-brand-mark {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    background: #ffffff;
    border: 1px solid #e3ded3;
    border-radius: 8px;
}
.recovery-brand-mark img { width: 38px; height: 38px; object-fit: cover; border-radius: 50%; }
.recovery-brand strong { display: block; color: #141d31; font-family: "Source Serif 4", Georgia, serif; font-size: 1.3rem; font-weight: 700; letter-spacing: .08em; line-height: 1.1; }
.recovery-brand small { display: block; margin-top: .15rem; color: #6b7180; font-size: .75rem; }
.recovery-brand:focus-visible { border-radius: 8px; }

.recovery-page .login-card-heading h1 { font-size: clamp(1.6rem, 3vw, 2rem); }

.recovery-sent { display: flex; align-items: flex-start; gap: .9rem; margin-bottom: 1.5rem; }
.recovery-sent-icon {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    color: #1d6b45;
    background: #e7f3ec;
    border-radius: 50%;
    font-size: 1.3rem;
}
.recovery-sent h1 { margin: .35rem 0 .45rem; color: #1a1f2b; font-family: "Source Serif 4", Georgia, serif; font-size: 1.5rem; font-weight: 600; }
.recovery-sent p { margin: 0; color: #545b6a; font-size: .9rem; line-height: 1.6; }
.recovery-sent p + p { margin-top: .5rem; }

@media (max-width: 479.98px) {
    .recovery-shell { place-items: start center; padding-inline: .75rem; }
    .recovery-wrap .login-card { padding: 1.25rem; }
}
