:root {
    --auth-primary: #15803d;
    --auth-primary-dark: #14532d;
    --auth-primary-soft: #ecfdf3;
    --auth-ink: #172033;
    --auth-muted: #667085;
    --auth-border: #d0d5dd;
    --auth-error: #b42318;
    --auth-error-soft: #fef3f2;
}

.auth-page {
    background: #f8fafc;
    color: var(--auth-ink);
    display: grid;
    grid-template-columns: minmax(360px, 0.9fr) minmax(500px, 1.1fr);
    min-height: 100dvh;
    width: 100%;
}

.auth-skip-link {
    background: #fff;
    border-radius: 0 0 8px 8px;
    color: var(--auth-primary-dark);
    font-weight: 700;
    padding: 10px 16px;
    position: fixed;
    right: 16px;
    top: -60px;
    z-index: 1000;
}

.auth-skip-link:focus { top: 0; }

.auth-showcase {
    background: linear-gradient(150deg, #0f3d27 0%, #14532d 48%, #15803d 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    overflow: hidden;
    padding: clamp(32px, 5vw, 72px);
    position: relative;
}

.auth-showcase::before,
.auth-showcase::after {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    content: "";
    position: absolute;
}

.auth-showcase::before { height: 430px; left: -230px; top: -180px; width: 430px; }
.auth-showcase::after { bottom: -240px; height: 520px; right: -270px; width: 520px; }

.auth-brand,
.auth-mobile-brand {
    align-items: center;
    display: inline-flex;
    font-size: 1.15rem;
    font-weight: 800;
    gap: 10px;
}

.auth-brand { color: #fff; position: relative; width: fit-content; z-index: 1; }
.auth-brand:hover { color: #fff; }

.auth-brand__mark {
    align-items: center;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    display: flex;
    font-size: 1.35rem;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.auth-showcase__content { margin: auto 0; max-width: 560px; position: relative; z-index: 1; }
.auth-eyebrow { color: var(--auth-primary); display: block; font-size: 0.8rem; font-weight: 800; margin-bottom: 9px; }
.auth-showcase .auth-eyebrow { color: #bbf7d0; }
.auth-showcase h1 { color: #fff; font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 850; line-height: 1.45; margin: 0 0 16px; }
.auth-showcase__content > p { color: rgba(255, 255, 255, 0.76); font-size: 1rem; line-height: 1.9; margin: 0; max-width: 520px; }
.auth-showcase ul { display: grid; gap: 17px; list-style: none; margin: 36px 0 0; padding: 0; }
.auth-showcase li { align-items: center; display: flex; gap: 13px; }
.auth-showcase li > i { align-items: center; background: rgba(255, 255, 255, 0.12); border-radius: 11px; color: #bbf7d0; display: flex; font-size: 1.35rem; height: 46px; justify-content: center; width: 46px; }
.auth-showcase li span { display: flex; flex-direction: column; gap: 3px; }
.auth-showcase li strong { color: #fff; font-size: 0.9rem; }
.auth-showcase li small { color: rgba(255, 255, 255, 0.65); font-size: 0.76rem; }
.auth-showcase__footer { align-items: center; color: rgba(255, 255, 255, 0.66); display: flex; font-size: 0.74rem; gap: 7px; margin: 0; position: relative; z-index: 1; }

.auth-form-shell { align-items: center; display: flex; justify-content: center; min-width: 0; padding: 40px 24px; }
.auth-form-card { max-width: 460px; width: 100%; }
.auth-mobile-brand { color: var(--auth-primary-dark); display: none; margin-bottom: 34px; }
.auth-mobile-brand .auth-brand__mark { background: var(--auth-primary-soft); border-color: #bbf7d0; color: var(--auth-primary); }
.auth-form-card__heading { margin-bottom: 28px; }
.auth-form-card__heading h2 { color: var(--auth-ink); font-size: 1.8rem; font-weight: 850; margin: 0 0 8px; }
.auth-form-card__heading p { color: var(--auth-muted); line-height: 1.7; margin: 0; }

.auth-error-summary { align-items: flex-start; background: var(--auth-error-soft); border: 1px solid #fecdca; border-radius: 12px; color: var(--auth-error); display: flex; gap: 10px; margin-bottom: 22px; padding: 13px 14px; }
.auth-error-summary > i { font-size: 1.2rem; margin-top: 2px; }
.auth-error-summary strong { display: block; font-size: 0.84rem; margin-bottom: 3px; }
.auth-error-summary p { font-size: 0.76rem; line-height: 1.6; margin: 0; }

.auth-field { margin-bottom: 20px; }
.auth-field > label,
.auth-label-row label { color: #344054; display: block; font-size: 0.83rem; font-weight: 700; margin-bottom: 8px; }
.auth-label-row { align-items: center; display: flex; justify-content: space-between; }
.auth-label-row a { color: var(--auth-primary-dark); font-size: 0.76rem; font-weight: 700; margin-bottom: 8px; }

.auth-input-wrap { align-items: center; background: #fff; border: 1px solid var(--auth-border); border-radius: 11px; display: flex; min-height: 50px; transition: border-color 180ms ease, box-shadow 180ms ease; }
.auth-input-wrap:focus-within { border-color: var(--auth-primary); box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.12); }
.auth-input-wrap.has-error { border-color: var(--auth-error); }
.auth-input-wrap > i { color: #98a2b3; flex: 0 0 auto; font-size: 1.15rem; margin-right: 14px; }
.auth-input-wrap input { background: transparent; border: 0; color: var(--auth-ink); direction: rtl; font-size: 1rem; height: 48px; min-width: 0; outline: 0; padding: 0 12px; width: 100%; }
.auth-input-wrap input::placeholder { color: #98a2b3; }
#email { direction: ltr; text-align: right; }
.auth-password-toggle { align-items: center; background: transparent; border: 0; border-radius: 8px; color: var(--auth-muted); display: flex; flex: 0 0 auto; font-size: 1.15rem; height: 44px; justify-content: center; margin-left: 3px; width: 44px; }
.auth-password-toggle:hover { background: var(--auth-primary-soft); color: var(--auth-primary); }
.auth-field-error { color: var(--auth-error); font-size: 0.74rem; line-height: 1.6; margin: 6px 2px 0; }

.auth-captcha { align-items: center; display: flex; gap: 10px; margin-bottom: 10px; }
.auth-captcha__image { align-items: center; background: #fff; border: 1px solid var(--auth-border); border-radius: 10px; display: flex; height: 50px; justify-content: center; overflow: hidden; padding: 2px 8px; }
.auth-captcha__image img { display: block; height: 46px; max-width: 160px; object-fit: contain; }
.auth-captcha__refresh { align-items: center; background: var(--auth-primary-soft); border: 1px solid #bbf7d0; border-radius: 10px; color: var(--auth-primary-dark); display: inline-flex; font-size: 0.76rem; font-weight: 700; gap: 7px; min-height: 50px; padding: 0 14px; }
.auth-captcha__refresh:hover { background: #dcfce7; }
.auth-captcha__refresh.is-loading i { animation: auth-spin 700ms linear infinite; }

.auth-remember { align-items: center; color: #475467; cursor: pointer; display: inline-flex; font-size: 0.8rem; gap: 9px; margin-bottom: 22px; min-height: 44px; }
.auth-remember input { accent-color: var(--auth-primary); height: 18px; width: 18px; }

.auth-submit { align-items: center; background: var(--auth-primary); border: 0; border-radius: 11px; color: #fff; display: grid; font-size: 0.9rem; font-weight: 800; gap: 8px; grid-template-columns: 1fr auto; min-height: 52px; padding: 0 18px; transition: background-color 180ms ease, box-shadow 180ms ease; width: 100%; }
.auth-submit:hover { background: var(--auth-primary-dark); box-shadow: 0 10px 24px rgba(20, 83, 45, 0.2); }
.auth-submit:disabled { cursor: wait; opacity: 0.7; }
.auth-submit__loading { align-items: center; display: inline-flex; gap: 8px; justify-self: center; }
.auth-submit__loading[hidden] { display: none; }

.auth-register-link { color: var(--auth-muted); font-size: 0.82rem; margin: 24px 0 0; text-align: center; }
.auth-register-link a { color: var(--auth-primary-dark); font-weight: 800; }

.auth-page a:focus-visible,
.auth-page button:focus-visible,
.auth-page input:focus-visible {
    outline: 3px solid rgba(23, 92, 211, 0.35);
    outline-offset: 3px;
}

@keyframes auth-spin { to { transform: rotate(360deg); } }

@media (max-width: 991.98px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-showcase { display: none; }
    .auth-form-shell { min-height: 100dvh; }
    .auth-mobile-brand { display: inline-flex; }
}

@media (max-width: 575.98px) {
    .auth-form-shell { align-items: flex-start; padding: 28px 18px 40px; }
    .auth-form-card { max-width: none; }
    .auth-mobile-brand { margin-bottom: 44px; }
    .auth-form-card__heading h2 { font-size: 1.55rem; }
    .auth-captcha { align-items: stretch; }
    .auth-captcha__image { flex: 1; }
    .auth-captcha__refresh span { display: none; }
    .auth-captcha__refresh { justify-content: center; min-width: 50px; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page *,
    .auth-page *::before,
    .auth-page *::after {
        animation-duration: 0.01ms !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
