/* ==================================================================
   Sign in, sign up and password reset (templates/base/login-base.html, static/js/auth.js), in the landing
   page's look: its header, buttons and colour tokens (landing.css --lp-*, so light and dark both work).
   Left, a stage with Migo; right, the card. Phones and tablets: one column (heading, Migo, card, then the preview).
   ================================================================== */

/* The legal pages' header still uses these (templates/base/legal-base.html) */
.auth-brand { position: relative; display: inline-flex; align-items: center; gap: .85rem; color: #ffffff; }
.auth-brand:hover { color: #ffffff; }
.auth-brand img { height: 35px; }
.auth-brand span { font-size: 1.35rem; font-weight: 600; letter-spacing: -.01em; }
.auth-link { color: var(--lp-accent, #3445E5); font-weight: 600; }
.auth-link:hover { color: var(--lp-blue-dark, #2531B8); text-decoration: underline; }

.lp-auth__home { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 .5rem; color: var(--lp-muted); font-weight: 500; text-decoration: none; }
.lp-auth__home:hover { color: var(--lp-ink); text-decoration: none; }
.lp-auth__home i { font-size: .85rem; color: inherit; transition: transform .25s ease; }
.lp-auth__home:hover i { transform: translateX(-3px); }

/* ---- Layout ---- */
.lp-auth__main { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 28px; padding-bottom: 40px; }
.lp-auth__stage { display: contents; }
.lp-auth__copy { order: 1; }
.lp-auth__migo { order: 2; }
.lp-auth__panel { order: 3; }
.lp-auth__preview { order: 4; }
.lp-auth__copy, .lp-auth__migo, .lp-auth__panel, .lp-auth__preview { width: min(100%, 560px); justify-self: center; }
@media (min-width: 992px) {
    .lp-auth__main {
        grid-template-columns: minmax(0, 1fr) minmax(0, 500px); column-gap: clamp(40px, 6vw, 96px); align-items: center;
        min-height: calc(100vh - var(--lp-nav-height)); padding-top: 32px; padding-bottom: 48px;
    }
    .lp-auth__stage { position: relative; display: flex; flex-direction: column; gap: 32px; }
    .lp-auth__copy, .lp-auth__migo, .lp-auth__preview { width: auto; justify-self: auto; }
    .lp-auth__panel { width: 100%; }
}

/* ---- The stage ---- */
.lp-auth__title { margin: 0; font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 700; line-height: 1.08; }
.lp-auth__title span { display: block; color: var(--lp-accent); }
.lp-auth__lead { max-width: 34rem; margin: 14px 0 0; color: var(--lp-muted); font-size: 1.12rem; line-height: 1.6; }
.lp-auth__migo { display: flex; align-items: flex-end; gap: 14px; }
.lp-auth__face {
    flex: 0 0 auto; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--lp-blue-wash);
    box-shadow: 0 0 0 4px var(--lp-surface), 0 10px 24px rgba(52, 69, 229, .2); animation: lp-breathe 4s ease-in-out infinite;
}
.lp-auth__bubble {
    position: relative; flex: 1 1 auto; max-width: 30rem; min-height: 52px; margin: 0 0 14px; padding: 12px 16px;
    border: 1px solid var(--lp-line); border-radius: 18px 18px 18px 6px; background: var(--lp-surface);
    box-shadow: 0 12px 30px rgba(30, 36, 51, .08); font-weight: 500; line-height: 1.45;
}
.lp-auth__preview { display: grid; gap: 14px; }
.lp-auth__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.lp-auth__chips li {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--lp-line); border-radius: 2rem;
    background: var(--lp-surface); font-size: .92rem; font-weight: 500; transition: transform .25s ease, border-color .25s ease;
}
.lp-auth__chips li:hover { transform: translateY(-2px); border-color: var(--lp-blue-line); }
.lp-auth__chips i { color: var(--lp-accent); font-size: .85rem; }
.lp-auth .lp-coin { display: none; }
@media (min-width: 992px) {
    .lp-auth__face { width: 96px; height: 96px; }
    .lp-auth .lp-coin { display: grid; }
    .lp-auth .lp-coin--1 { top: -12px; left: auto; right: 12%; }
    .lp-auth .lp-coin--2 { top: 46%; right: 4%; }
}

/* ---- The card ---- */
.auth-card {
    width: 100%; padding: 28px; border: 1px solid var(--lp-line); border-radius: 22px; background: var(--lp-surface);
    box-shadow: 0 24px 60px rgba(30, 36, 51, .1);
}
[data-theme="dark"] .auth-card { box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
@media (min-width: 576px) { .auth-card { padding: 36px; } }
.auth-foot { display: flex; justify-content: center; gap: 22px; margin: 18px 0 0; font-size: .95rem; }

/* Sign in / Create account: a pill whose marker slides under the chosen side */
.auth-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 26px; padding: 4px; border-radius: 14px; background: var(--lp-wash); }
.auth-tabs__marker {
    position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px; background: var(--lp-surface);
    box-shadow: 0 4px 14px rgba(30, 36, 51, .1); transition: transform .45s cubic-bezier(.16, 1, .3, 1);
}
.auth-tabs[data-mode="signup"] .auth-tabs__marker { transform: translateX(100%); }
.auth-tabs__tab {
    position: relative; z-index: 1; min-height: 46px; border: 0; border-radius: 10px; background: none; color: var(--lp-muted);
    font: inherit; font-weight: 600; cursor: pointer; transition: color .2s ease;
}
.auth-tabs__tab[aria-selected="true"] { color: var(--lp-ink); }
.auth-tabs__tab:focus-visible { outline: 3px solid rgba(52, 69, 229, .4); outline-offset: 2px; }
.auth-forms { overflow: hidden; }
.auth-form[hidden] { display: none; }

.auth-head { margin-bottom: 22px; }
.auth-head h2, .auth-head h3 { margin: 0 0 6px; font-size: 1.9rem; font-weight: 700; }
.auth-head p { margin: 0; color: var(--lp-muted); font-size: 1.05rem; }
.lp-auth .form-group { margin-bottom: 18px; }
.lp-auth .auth-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 1rem; font-weight: 600; color: var(--lp-ink); }
.auth-label .auth-link { font-size: .95rem; }
.auth-row { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 14px; }
@media (min-width: 576px) { .auth-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Inputs: soft fields that light up in the brand blue */
.auth-input { position: relative; }
.auth-input > i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--lp-faint); font-size: 1rem; pointer-events: none; transition: color .2s ease; }
.auth-input:focus-within > i { color: var(--lp-accent); }
.lp-auth .form-control {
    height: 50px; padding: 0 16px 0 44px; border: 1px solid transparent; border-radius: 12px; background: var(--lp-wash);
    color: var(--lp-ink); font-size: 1.08rem; transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.lp-auth .form-control::placeholder { color: var(--lp-faint); }
.lp-auth .form-control:focus { border-color: var(--lp-accent); background: var(--lp-surface); box-shadow: 0 0 0 4px var(--lp-blue-wash); color: var(--lp-ink); }
.lp-auth .form-control.is-invalid { border-color: var(--lp-bad); background-image: none; padding-right: 16px; }
.lp-auth .form-control.is-invalid:focus { box-shadow: 0 0 0 4px var(--lp-red-wash); }
.lp-auth .auth-input--password .form-control, .lp-auth .auth-input--password .form-control.is-invalid { padding-right: 52px; }
.lp-auth .auth-input--password:has(.auth-match) .form-control { padding-right: 84px; }
.auth-reveal {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 40px; height: 40px;
    border: 0; border-radius: 10px; background: none; color: var(--lp-muted); cursor: pointer;
}
.auth-reveal:hover { background: var(--lp-blue-wash); color: var(--lp-accent); }
.auth-reveal i { color: inherit; }
.auth-reveal:focus-visible { outline: 2px solid var(--lp-accent); outline-offset: 1px; }
.auth-match {
    position: absolute; right: 50px; top: 50%; display: grid; place-items: center; width: 24px; height: 24px; margin-top: -12px;
    border-radius: 50%; background: var(--lp-good); color: #fff; font-size: .7rem; transform: scale(0); transition: transform .25s ease;
}
.auth-match i { color: inherit; }
.auth-match.is-on { transform: scale(1); }
.auth-error { margin: 6px 0 0; color: var(--lp-bad); font-size: .92rem; font-weight: 500; }
.auth-alert { margin: 0 0 18px; padding: 12px 14px; border-radius: 12px; font-size: .98rem; font-weight: 500; line-height: 1.45; }
.auth-alert--error { background: var(--lp-red-wash); color: var(--lp-bad); }
.auth-alert--success { background: var(--lp-good-wash); color: var(--lp-good); }
.auth-note { margin: 0 0 18px; padding: 14px 16px; border-radius: 12px; background: var(--lp-blue-wash); line-height: 1.55; }
.auth-alt { margin: 18px 0 0; text-align: center; color: var(--lp-muted); }

/* Password strength: four bars that fill and colour as it gets stronger */
.auth-strength { display: flex; align-items: center; gap: 10px; margin-top: 8px; color: var(--lp-muted); font-size: .88rem; }
.auth-strength__bars { display: grid; flex: 0 0 auto; grid-template-columns: repeat(4, 1fr); gap: 4px; width: 112px; }
.auth-strength__bars i { height: 5px; border-radius: 3px; background: var(--lp-track); transform-origin: left; transition: background-color .25s ease; }
.auth-strength[data-level="1"] i:nth-child(-n+1) { background: var(--lp-bad); }
.auth-strength[data-level="2"] i:nth-child(-n+2) { background: var(--lp-warn); }
.auth-strength[data-level="3"] i:nth-child(-n+3) { background: var(--lp-accent); }
.auth-strength[data-level="4"] i { background: var(--lp-good); }
.auth-strength[data-level="4"] { color: var(--lp-good); }

/* The agreement: the theme's checkbox, recoloured (the theme styles every <span> in it as the box, so the words are a <div>) */
.auth-agree { align-items: flex-start !important; margin: 4px 0 0; color: var(--lp-muted) !important; font-size: .95rem; line-height: 1.5; }
.auth-agree > span { flex: 0 0 auto; margin-top: 2px; background-color: var(--lp-track) !important; }
.auth-agree > input:checked ~ span { background-color: var(--lp-blue) !important; }
.auth-agree__text { flex: 1 1 auto; }

/* Buttons: the landing page's, full width; the arrow nudges on hover, a spinner while sending, a tick when done */
.auth-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.auth-actions .lp-btn { width: 100%; }
.auth-submit i { transition: transform .25s ease; }
.auth-submit:hover i { transform: translateX(4px); }
.auth-submit[disabled] { cursor: progress; opacity: .92; transform: none; }
.auth-submit.is-busy i::before { content: "\f110"; }
.auth-submit.is-busy i { animation: auth-spin 1s linear infinite; }
.auth-submit.is-done { background: var(--lp-good); box-shadow: 0 8px 20px rgba(30, 127, 92, .3); }
.auth-submit.is-done i::before { content: "\f00c"; }
.auth-submit.is-done i { animation: none; }
.auth-divider { display: flex; align-items: center; gap: 14px; color: var(--lp-muted); font-size: .92rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--lp-line); }
.auth-google svg { flex: 0 0 auto; }
.auth-google-note { margin: 0; color: var(--lp-muted); font-size: .86rem; line-height: 1.5; text-align: center; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

/* ---- Coming in: the heading, Migo, the card and the preview rise in turn (only with motion) ---- */
.lp-motion [data-auth-enter] { animation: auth-rise .7s cubic-bezier(.16, 1, .3, 1) both; }
.lp-motion .lp-auth__migo[data-auth-enter] { animation-delay: .12s; }
.lp-motion .auth-card[data-auth-enter] { animation-delay: .08s; }
.lp-motion .lp-auth__preview[data-auth-enter] { animation-delay: .22s; }
@keyframes auth-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---- Privacy Policy and Terms (templates/base/legal-base.html) ---- */
.legal-body { background: #F3F5FA; font-family: Poppins, sans-serif; color: var(--au-ink, #1E2433); }
.legal-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 52rem; margin: 0 auto; padding: 1.5rem 16px; }
.legal-brand span { color: #1E2433; }
.legal-page { max-width: 52rem; margin: 0 auto 3rem; padding: 2.5rem 2.75rem; border-radius: 1.25rem; background: #ffffff; box-shadow: 0 12px 40px rgba(30, 36, 51, .07); font-size: 1.1rem; line-height: 1.7; }
.legal-page h1 { margin: 0 0 .35rem; font-size: 2.1rem; font-weight: 600; letter-spacing: -.02em; }
.legal-page h2 { margin: 2rem 0 .6rem; font-size: 1.3rem; font-weight: 600; }
.legal-page ul { padding-left: 1.25rem; }
.legal-page li { margin-bottom: .45rem; }
.legal-meta { margin: 0 0 1.5rem; color: #7E8299; font-size: .98rem; }
.legal-lead { font-size: 1.18rem; }
@media (max-width: 575.98px) {
    .legal-page { margin: 0 16px 2rem; padding: 1.75rem 1.25rem; font-size: 1.05rem; }
    .legal-page h1 { font-size: 1.7rem; }
}
