/* Auth pages — mint / lime / black */
:root {
    --ua-bg: #e8f4dc;
    --ua-bg-soft: #f7fbee;
    --ua-card: #ffffff;
    --ua-ink: #1a1a1a;
    --ua-ink-deep: #0f0f0f;
    --ua-lime: #d4ff33;
    --ua-lime-soft: #e8ff7a;
    --ua-grad: linear-gradient(135deg, #e8ff7a 0%, #d4ff33 55%, #b8e832 100%);
    --ua-grad-ink: linear-gradient(145deg, #2b2b2b 0%, #1a1a1a 55%, #0f0f0f 100%);
    --ua-text: #1a1a1a;
    --ua-text-muted: #7c8a6f;
    --ua-border: rgba(40, 60, 20, 0.12);
    --ua-shadow: 0 14px 36px rgba(40, 60, 20, 0.1);
    --ua-shadow-lg: 0 20px 48px rgba(40, 60, 20, 0.14);
    --ua-radius: 16px;
    --ua-radius-lg: 22px;
}

html:has(.ua-screen--login),
html:has(.ua-screen--register),
body:has(.ua-screen--login),
body:has(.ua-screen--register) {
    background: var(--ua-bg) !important;
    background-image: linear-gradient(180deg, #eef8e4 0%, #e8f4dc 45%, #e2f0d4 100%) !important;
    background-attachment: fixed;
}

.ua-screen--login,
.ua-screen--register {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: max(20px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ua-text);
    position: relative;
    overflow-x: hidden;
}

.ua-screen--login::before,
.ua-screen--register::before {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    top: -80px;
    right: -100px;
    border-radius: 50%;
    background: rgba(212, 255, 51, 0.28);
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}

.ua-screen--login::after,
.ua-screen--register::after {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    bottom: 10%;
    left: -90px;
    border-radius: 50%;
    background: rgba(26, 26, 26, 0.08);
    filter: blur(50px);
    pointer-events: none;
    z-index: 0;
}

.ua-sheet--login,
.ua-sheet--register {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
    z-index: 1;
}

.ua-auth-back {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--ua-ink);
    border: 1px solid rgba(212, 255, 51, 0.25);
    color: var(--ua-lime);
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
    transition: transform .2s, opacity .2s;
}

.ua-auth-back:hover {
    color: var(--ua-lime);
    transform: translateY(-1px);
    opacity: .92;
}

.ua-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 4px 0 2px;
    text-align: center;
}

.ua-brand-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.ua-brand-logo {
    display: none;
}

.ua-brand-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #4b7a1e;
}

.ua-brand-title {
    margin: 0;
    font-size: clamp(22px, 5.5vw, 26px);
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--ua-ink);
    line-height: 1.15;
}

.ua-brand-sub {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--ua-text-muted);
    max-width: 32ch;
    line-height: 1.45;
}

.ua-form-card {
    background: var(--ua-card);
    border-radius: var(--ua-radius-lg);
    border: 1px solid var(--ua-border);
    box-shadow: var(--ua-shadow);
    padding: 22px 20px 20px;
    position: relative;
    overflow: hidden;
}

.ua-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--ua-grad);
}

.ua-auth-ref {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 16px;
    border-radius: 12px;
    border: 1px solid rgba(184, 232, 50, 0.35);
    background: linear-gradient(135deg, #f4ffd6 0%, #eaf7c8 100%);
    font-size: 12px;
    font-weight: 600;
    color: var(--ua-ink);
}

.ua-auth-ref i { color: #4b7a1e; }
.ua-auth-ref b {
    font-weight: 800;
    color: #2f4d0e;
}

.ua-auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ua-auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ua-auth-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ua-ink);
}

.ua-auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.ua-auth-input {
    width: 100%;
    min-height: 50px;
    border: 1.5px solid var(--ua-border);
    border-radius: 14px;
    background: var(--ua-bg-soft);
    padding: 12px 16px;
    color: var(--ua-text);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.4;
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.ua-auth-input-wrap .ua-auth-input {
    padding-right: 46px;
}

.ua-auth-input::placeholder {
    color: #9aab8a;
    font-weight: 500;
}

.ua-auth-input:focus {
    border-color: rgba(184, 232, 50, 0.7);
    box-shadow: 0 0 0 4px rgba(212, 255, 51, 0.22);
    background: #fff;
}

.ua-auth-input:-webkit-autofill,
.ua-auth-input:-webkit-autofill:hover,
.ua-auth-input:-webkit-autofill:focus,
.ua-auth-input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--ua-text) !important;
    caret-color: var(--ua-text);
    box-shadow: 0 0 0 1000px var(--ua-bg-soft) inset !important;
    -webkit-box-shadow: 0 0 0 1000px var(--ua-bg-soft) inset !important;
    transition: background-color 9999s ease-out 0s;
}

.ua-auth-eye {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    border: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: transparent;
    color: var(--ua-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    pointer-events: auto;
    transition: color .2s, background .2s;
}

.ua-auth-eye:hover {
    color: var(--ua-ink);
    background: rgba(40, 60, 20, 0.08);
}

.ua-auth-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: -2px;
}

.ua-login-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--ua-text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.ua-login-remember input {
    width: 16px;
    height: 16px;
    accent-color: #b8e832;
    cursor: pointer;
}

.ua-login-forgot {
    color: #4b7a1e;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.ua-login-forgot:hover {
    color: var(--ua-ink);
    text-decoration: underline;
}

.ua-auth-submit {
    width: 100%;
    min-height: 52px;
    margin-top: 6px;
    border: 0;
    border-radius: 14px;
    background: var(--ua-grad);
    color: #1a1a1a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 800;
    font-family: inherit;
    letter-spacing: .01em;
    box-shadow: 0 10px 24px rgba(184, 232, 50, 0.35);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.ua-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(184, 232, 50, 0.42);
}

.ua-auth-submit:active { transform: translateY(0); }
.ua-auth-submit i { font-size: 14px; opacity: .95; }

.ua-auth-footer {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--ua-border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    text-align: center;
}

.ua-auth-footer-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--ua-text-muted);
}

.ua-auth-link {
    color: var(--ua-ink);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    border-bottom: 2px solid var(--ua-lime);
}

.ua-auth-link:hover {
    color: #2f4d0e;
}

.ua-auth-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--ua-text-muted);
}

.ua-auth-trust i {
    color: #4b7a1e;
    font-size: 12px;
}

@media (max-width: 380px) {
    .ua-form-card { padding: 18px 16px 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .ua-auth-submit,
    .ua-auth-back,
    .ua-auth-input {
        transition-duration: .01ms !important;
    }
}
