/* auth-login.css
   Moved out of auth/login.php (was an inline block).
   Code is unchanged from the inline version; see docs/ASSETS.md. */
/* ===== Login page design (scoped to .login-*) ===== */
body { background: #dddddd; }

.login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 24px 16px;
    font-family: 'Poppins', system-ui, sans-serif;
}

.login-card {
    display: grid;
    grid-template-columns: 55% 45%;
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    overflow: hidden;
}

/* Left: form */
.login-form-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 40px;
}

.login-form-side h1 {
    margin: 0 0 28px;
    text-align: center;
    font-size: 2.6rem;
    font-weight: 600;
    color: #000;
}

.login-form-side form { display: flex; flex-direction: column; gap: 18px; }

.login-form-side .sr-only {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.login-form-side input[type="text"],
.login-form-side input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    height: 56px;
    padding: 0 18px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #efefef;
    font: inherit;
    font-size: 1rem;
    color: #222;
    outline: none;
    transition: border-color .2s, background .2s;
}

.login-form-side input::placeholder { color: #9a9a9a; }

.login-form-side input:focus {
    background: #fff;
    border-color: #e0343b;
}

.login-form-side button[type="submit"] {
    height: 62px;
    margin-top: 4px;
    border: 0;
    border-radius: 8px;
    background: #d0141c;
    color: #fff;
    font: inherit;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background .2s, transform .1s;
}

.login-form-side button[type="submit"]:hover  { background: #a80f16; }
.login-form-side button[type="submit"]:active { transform: scale(.99); }

.login-error {
    padding: 12px 16px;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: .92rem;
}

/* Right: welcome panel */
.login-welcome-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    text-align: center;
    color: #fff;
    background: linear-gradient(180deg, #f0555a 0%, #d0141c 100%);
}

.login-welcome-side h2 {
    margin: 0 0 18px;
    font-size: 1.9rem;
    font-weight: 600;
}

.login-welcome-side p {
    margin: 0 0 28px;
    max-width: 380px;
    font-size: 1.15rem;
    line-height: 1.7;
}

.login-welcome-side a.login-signup-btn {
    display: inline-block;
    padding: 20px 52px;
    border-radius: 999px;
    background: #e0343b;
    color: #fff;
    font-size: 1.05rem;
    text-decoration: none;
    transition: background .2s, transform .1s;
}

.login-welcome-side a.login-signup-btn:hover { background: #c9262d; }
.login-welcome-side a.login-signup-btn:active { transform: scale(.98); }

.login-form-side .login-forgot {
    align-self: flex-end;
    margin-top: -6px;
    color: #d0141c;
    font-size: .9rem;
    text-decoration: none;
}
.login-form-side .login-forgot:hover { text-decoration: underline; }

/* ===== Rounded card + corner accents ===== */
.login-card {
    border-radius: 24px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .12);
}

/* Soft translucent circles in the panel corners */
.login-welcome-side::before,
.login-welcome-side::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
.login-welcome-side::before {
    width: 280px; height: 280px;
    top: -100px; right: -100px;
    background: rgba(255, 255, 255, .13);
}
.login-welcome-side::after {
    width: 210px; height: 210px;
    bottom: -80px; left: -80px;
    background: rgba(255, 255, 255, .09);
}
.login-welcome-side > * { position: relative; z-index: 1; }

/* ===== Page transitions ===== */
.login-form-side,
.login-welcome-side { position: relative; }
.login-welcome-side { z-index: 2; }

.login-form-side > *,
.login-welcome-side > * { transition: opacity .25s ease; }

/* Leaving: the two halves slide past each other and swap places */
.login-card.is-leaving .login-form-side,
.login-card.is-leaving .login-welcome-side {
    transition: transform .65s cubic-bezier(.77, 0, .18, 1);
}
.login-card.is-leaving .login-form-side > *,
.login-card.is-leaving .login-welcome-side > * { opacity: 0; }

/* Arriving */
@keyframes authFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}
@keyframes authFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
/* Fresh visit: card gently rises in */
.login-card { animation: authFadeUp .5s ease backwards; }
/* Coming from the other form: halves are already in place, just fade content in */
html.auth-swap .login-card { animation: none; }
html.auth-swap .login-form-side > *,
html.auth-swap .login-welcome-side > * { animation: authFade .5s ease .05s backwards; }

@media (prefers-reduced-motion: reduce) {
    .login-card,
    .login-form-side > *,
    .login-welcome-side > * { animation: none !important; }
    .login-card.is-leaving .login-form-side,
    .login-card.is-leaving .login-welcome-side { transition: none !important; }
}

/* Mobile: stack the panels */
@media (max-width: 768px) {
    .login-card { grid-template-columns: 1fr; min-height: 0; }
    .login-form-side,
    .login-welcome-side { padding: 36px 24px; }
    .login-form-side h1 { font-size: 2.1rem; }
    .login-welcome-side { order: 2; }
}
