/* Account screens: login, register, forgot and reset password (Views/Users).
   Split layout: photo panel on the left (_AuthAside), form on the right.
   Old auth.css stays only for Suppliers/Create until that screen is redesigned. */

.au-page {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(1.5rem, 1rem + 2vw, 3rem);
    max-width: calc(var(--ec-container) + 160px);
    min-height: calc(100vh - var(--ec-nav-h) - var(--ec-nav-top) * 2);
    margin: 0 auto;
    padding: 1rem var(--ec-gutter) clamp(3rem, 2rem + 3vw, 5rem);
}

/* ── Photo panel ── */
.au-aside {
    position: sticky;
    top: calc(var(--ec-nav-h) + var(--ec-nav-top) * 2 + 0.5rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: calc(100vh - var(--ec-nav-h) - var(--ec-nav-top) * 2 - 2rem);
    min-height: 520px;
    max-height: 820px;
    padding: clamp(1.75rem, 1rem + 2vw, 2.75rem);
    overflow: hidden;
    border-radius: var(--ec-radius-xl);
    color: var(--ec-on-dark);
    isolation: isolate;
}
.au-aside__photo {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
}
.au-aside::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(74, 15, 43, 0.15) 0%, rgba(74, 15, 43, 0) 30%),
        linear-gradient(0deg, rgba(74, 15, 43, 0.92) 0%, rgba(140, 29, 80, 0.55) 45%, rgba(232, 76, 136, 0.1) 100%);
}
.au-aside__content { margin-top: auto; }
.au-aside__title {
    max-width: 14ch;
    margin: 0 0 0.75rem;
    color: var(--ec-white);
    font-size: clamp(2rem, 1.3rem + 2.4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.035em;
}
.au-aside__title em { font-family: var(--ec-serif); font-style: italic; font-weight: 400; color: var(--ec-rose-pale); }
.au-aside__text { max-width: 30rem; margin: 0; color: var(--ec-on-dark-2); font-size: 1rem; }

/* ── Form side ── */
.au-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.5rem, 0.2rem + 2vw, 2rem) 0;
}
.au-panel { width: 100%; max-width: 440px; }
.au-page--wide .au-panel { max-width: 620px; }

.au-head { margin-bottom: 1.75rem; }
.au-head h1 { margin: 0 0 0.4rem; font-size: clamp(2rem, 1.6rem + 1.4vw, 2.6rem); font-weight: 800; letter-spacing: -0.035em; }
.au-head p { margin: 0; color: var(--ec-ink-2); }
.au-icon {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1.1rem;
    border-radius: 16px;
    background: var(--ec-rose-soft);
    color: var(--ec-rose-deep);
    font-size: 1.1rem;
}

.au-form .form-control { min-height: 50px; }
.au-form .text-danger { display: block; margin-top: 0.3rem; color: var(--ec-err) !important; font-size: 0.82rem; }
.au-form .text-danger:empty { display: none; }
.au-form .validation-summary-valid { display: none; }
.au-form .btn-lg { min-height: 54px; margin-top: 0.25rem; }
.au-form .btn-primary:disabled { opacity: 0.55; box-shadow: none; }

/* Password field with the eye button inside the same pill */
.au-password {
    border: 1px solid var(--ec-line-strong);
    border-radius: 14px;
    background: var(--ec-surface);
    transition: border-color var(--ec-dur), box-shadow var(--ec-dur);
}
.au-password:focus-within { border-color: var(--ec-rose); box-shadow: var(--ec-focus); }
.au-password .form-control,
.au-password .form-control:focus {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent;
}
.au-password .toggle-password {
    width: 3rem;
    padding: 0;
    border: 0;
    border-radius: 0 14px 14px 0 !important;
    background: transparent;
    color: var(--ec-ink-3);
    box-shadow: none;
}
.au-password .toggle-password:hover,
.au-password .toggle-password:focus-visible { color: var(--ec-rose-deep); background: var(--ec-blush); transform: none; }

.au-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.25rem 0 1.5rem;
    font-size: 0.92rem;
}
.au-link { color: var(--ec-rose-deep); font-weight: 600; text-decoration: none; }
.au-link:hover { color: var(--ec-plum); text-decoration: underline; }
.au-foot { margin: 1.75rem 0 0; color: var(--ec-ink-2); text-align: center; font-size: 0.95rem; }

/* Register: supplier switch card */
.au-switch {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.5rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: var(--ec-blush);
    box-shadow: inset 0 0 0 1px rgba(232, 76, 136, 0.18);
    cursor: pointer;
    transition: background-color var(--ec-dur), box-shadow var(--ec-dur);
}
.au-switch:has(input:checked) { background: var(--ec-rose-soft); box-shadow: inset 0 0 0 2px var(--ec-rose); }
.au-switch__icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 14px;
    background: var(--ec-surface);
    color: var(--ec-rose);
}
.au-switch__text { flex: 1; min-width: 0; }
.au-switch__text strong { display: block; font-size: 0.95rem; }
.au-switch__text small { display: block; color: var(--ec-ink-3); font-size: 0.8rem; }
.au-switch .form-switch .form-check-input { width: 2.6em; height: 1.4em; margin: 0; cursor: pointer; }

/* Password rules: neutral until met (register.js toggles text-danger / text-success) */
.password-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.6rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.75rem;
}
.password-hints li {
    padding: 0.2rem 0.55rem;
    border-radius: var(--ec-radius-pill);
    background: var(--ec-surface-2);
    font-weight: 500;
    transition: background-color var(--ec-dur), color var(--ec-dur);
}
.password-hints li.text-danger { color: var(--ec-ink-3) !important; }
.password-hints li.text-success { background: var(--ec-ok-soft); color: var(--ec-ok-text) !important; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: 1.75rem 0 1.25rem;
    color: var(--ec-rose-deep);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--ec-line); }
.auth-divider i { margin-right: 0.3rem; }

/* ── Responsive ── */
@media (max-width: 991.98px) {
    .au-page { grid-template-columns: 1fr; min-height: 0; padding-top: 0.5rem; }
    .au-aside {
        position: relative;
        top: 0;
        height: auto;
        min-height: 0;
        padding: 1.5rem;
    }
    .au-aside__title { max-width: none; font-size: clamp(1.6rem, 1.2rem + 2vw, 2.2rem); }
    .au-aside__text { font-size: 0.92rem; }
    .au-panel { margin: 0 auto; }
}
@media (max-width: 575.98px) {
    .au-aside { padding: 1.25rem; border-radius: var(--ec-radius-l); }
    .au-aside__text { display: none; }
}
