/* ============================================================
   AuctionChamp Login — matches website brand tokens
   ============================================================ */
:root {
    --ac-navy:       #0d1b2a;
    --ac-navy-mid:   #1a3a6e;
    --ac-blue:       #1565c0;
    --ac-blue-light: #1976d2;
    --ac-gold:       #f5a623;
    --ac-gold-dark:  #d4831a;
    --ac-light:      #f4f7fb;
    --ac-white:      #ffffff;
    --ac-text:       #1a202c;
    --ac-text-soft:  #4a5568;
    --ac-text-light: #718096;
    --ac-border:     #e2e8f0;
    --ac-radius:     12px;
    --ac-shadow:     0 2px 20px rgba(13, 27, 42, .10);
    --ac-shadow-lg:  0 8px 40px rgba(13, 27, 42, .18);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
}

html {
    background: var(--ac-navy);
}

body.ac-login-body {
    min-height: 100vh;
    font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
    color: var(--ac-text);
    background: var(--ac-light);
    overflow-x: hidden;
}

/* ── Shell ──────────────────────────────────────────────────── */
.ac-login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    min-height: 100vh;
    width: 100%;
}

/* ── Brand panel (left) — same hero gradient as website ─────── */
.ac-login-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: clamp(36px, 5vw, 64px);
    color: #fff;
    background: linear-gradient(135deg, #0d1b2a 0%, #1a3a6e 55%, #1565c0 100%);
    overflow: hidden;
    isolation: isolate;
}

.ac-login-brand::before {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    top: -80px;
    right: -100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 166, 35, .13) 0%, transparent 68%);
    pointer-events: none;
    z-index: 0;
}

.ac-login-brand::after {
    content: '';
    position: absolute;
    width: 480px;
    height: 480px;
    bottom: -160px;
    left: -120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(21, 101, 192, .28) 0%, transparent 68%);
    pointer-events: none;
    z-index: 0;
}

.ac-login-brand > * {
    position: relative;
    z-index: 1;
}

.ac-login-brand-top {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 520px;
    animation: acLoginRise .55s cubic-bezier(.22, 1, .36, 1) both;
}

.ac-login-mark {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ac-login-home {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: opacity .2s ease;
}

.ac-login-home:hover {
    opacity: .88;
}

.ac-login-icon {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 18px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    background: linear-gradient(145deg, var(--ac-navy-mid), var(--ac-blue));
    border: 1px solid rgba(245, 166, 35, .45);
    box-shadow: 0 8px 24px rgba(13, 27, 42, .18);
}

.ac-login-icon svg {
    width: 36px;
    height: 36px;
}

.ac-login-wordmark {
    height: 34px;
    width: auto;
    max-width: min(240px, 58vw);
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .25));
}

.ac-login-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(245, 166, 35, .35);
    background: rgba(245, 166, 35, .10);
    color: var(--ac-gold);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.ac-login-brand h1 {
    font-size: clamp(1.85rem, 3.4vw, 2.65rem);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -.02em;
    max-width: 14ch;
}

.ac-login-brand h1 span {
    color: var(--ac-gold);
}

.ac-login-brand-copy {
    font-size: 1rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, .78);
    max-width: 38ch;
}

.ac-login-points {
    display: grid;
    gap: 12px;
    margin-top: 8px;
}

.ac-login-point {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 12px;
    align-items: start;
}

.ac-login-point-ico {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .14);
    color: var(--ac-gold);
    font-size: .85rem;
}

.ac-login-point strong {
    display: block;
    font-size: .92rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.ac-login-point span {
    font-size: .82rem;
    color: rgba(255, 255, 255, .68);
    line-height: 1.45;
}

.ac-login-brand-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: .78rem;
    color: rgba(255, 255, 255, .55);
    animation: acLoginRise .55s .08s cubic-bezier(.22, 1, .36, 1) both;
}

.ac-login-brand-foot a {
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color .2s, border-color .2s;
}

.ac-login-brand-foot a:hover {
    color: var(--ac-gold);
    border-bottom-color: rgba(245, 166, 35, .5);
}

/* Subtle field texture (no center stripe) */
.ac-login-pitch {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: .10;
    background-image: repeating-linear-gradient(
        0deg,
        transparent 0 46px,
        rgba(255, 255, 255, .14) 46px 47px
    );
    mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}

/* ── Form panel (right) ─────────────────────────────────────── */
.ac-login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 4vw, 48px);
    background:
        radial-gradient(ellipse 70% 50% at 100% 0%, rgba(21, 101, 192, .06), transparent 60%),
        var(--ac-light);
    animation: acLoginRise .55s .05s cubic-bezier(.22, 1, .36, 1) both;
}

.ac-login-card {
    width: 100%;
    max-width: 420px;
    background: var(--ac-white);
    border: 1px solid var(--ac-border);
    border-radius: calc(var(--ac-radius) + 4px);
    box-shadow: var(--ac-shadow-lg);
    padding: clamp(28px, 4vw, 40px);
}

.ac-login-card-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 4px;
}

.ac-login-card-head {
    margin-bottom: 28px;
    text-align: center;
}

.ac-login-card-head h2 {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--ac-navy);
    letter-spacing: -.02em;
    margin-bottom: 6px;
}

.ac-login-card-head p {
    font-size: .92rem;
    color: var(--ac-text-soft);
    line-height: 1.5;
}

.ac-login-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
    font-size: .88rem;
    line-height: 1.4;
}

.ac-login-alert i {
    margin-top: 2px;
    color: #dc2626;
}

.ac-login-field {
    margin-bottom: 16px;
}

.ac-login-field label {
    display: block;
    margin-bottom: 7px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--ac-text-soft);
}

.ac-login-input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--ac-border);
    border-radius: 10px;
    background: var(--ac-white);
    color: var(--ac-text);
    font: inherit;
    font-size: .95rem;
    transition: border-color .2s, box-shadow .2s;
}

.ac-login-input::placeholder {
    color: var(--ac-text-light);
}

.ac-login-input:focus {
    outline: none;
    border-color: var(--ac-blue);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, .15);
}

.ac-login-submit {
    width: 100%;
    height: 50px;
    margin-top: 8px;
    border: 1px solid var(--ac-gold);
    border-radius: 10px;
    background: var(--ac-gold);
    color: var(--ac-navy);
    font: inherit;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .01em;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s, transform .15s;
}

.ac-login-submit:hover {
    background: var(--ac-gold-dark);
    border-color: var(--ac-gold-dark);
    color: #fff;
}

.ac-login-submit:active {
    transform: translateY(1px);
}

.ac-login-card-foot {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--ac-border);
    text-align: center;
    font-size: .82rem;
    color: var(--ac-text-light);
}

.ac-login-card-foot a {
    color: var(--ac-blue);
    font-weight: 600;
    text-decoration: none;
}

.ac-login-card-foot a:hover {
    color: var(--ac-navy-mid);
    text-decoration: underline;
}

.ac-login-copy {
    display: none;
    margin-top: 12px;
    font-size: .75rem;
    color: var(--ac-text-light);
}

/* ── Overlays ───────────────────────────────────────────────── */
.ac-login-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    background: linear-gradient(135deg, rgba(13, 27, 42, .96) 0%, rgba(26, 58, 110, .96) 55%, rgba(21, 101, 192, .94) 100%);
    color: #fff;
    opacity: 0;
    transition: opacity .35s ease;
}

.ac-login-overlay.is-on {
    display: flex;
    opacity: 1;
}

.ac-login-overlay.is-leaving {
    opacity: 0;
}

.ac-login-spinner {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, .18);
    border-top-color: var(--ac-gold);
    animation: acLoginSpin .8s linear infinite;
}

.ac-login-overlay-logo {
    height: 28px;
    width: auto;
}

.ac-login-overlay-msg {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .01em;
    transition: opacity .25s ease;
}

.ac-login-overlay-msg.is-fade {
    opacity: 0;
}

.ac-login-overlay-sub {
    font-size: .78rem;
    color: rgba(255, 255, 255, .55);
}

@keyframes acLoginSpin {
    to { transform: rotate(360deg); }
}

@keyframes acLoginRise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .ac-login-brand-top,
    .ac-login-brand-foot,
    .ac-login-panel,
    .ac-login-spinner {
        animation: none !important;
    }
}

/* ── Mobile — keep sign-in above the fold ───────────────────── */
@media (max-width: 900px) {
    .ac-login-shell {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        min-height: 100dvh;
    }

    /* Slim brand strip only (logo + icon) — no long copy */
    .ac-login-brand {
        flex: 0 0 auto;
        min-height: 0;
        padding: 16px 18px 14px;
        gap: 0;
        justify-content: center;
    }

    .ac-login-brand::before,
    .ac-login-brand::after,
    .ac-login-pitch {
        display: none;
    }

    .ac-login-brand-top {
        gap: 0;
        max-width: none;
        animation: none;
    }

    .ac-login-mark {
        gap: 12px;
        justify-content: center;
    }

    .ac-login-wordmark {
        height: 28px;
        max-width: min(200px, 55vw);
    }

    .ac-login-kicker,
    .ac-login-brand h1,
    .ac-login-brand-copy,
    .ac-login-points,
    .ac-login-brand-foot {
        display: none !important;
    }

    /* Form immediately under the strip — no scroll required */
    .ac-login-panel {
        flex: 1 1 auto;
        order: 0;
        padding: 18px 16px 28px;
        align-items: flex-start;
        justify-content: flex-start;
        animation: none;
    }

    .ac-login-card {
        box-shadow: var(--ac-shadow);
        padding: 22px 18px 24px;
        max-width: none;
    }

    .ac-login-icon {
        width: 64px;
        height: 64px;
        border-radius: 16px;
        margin-bottom: 14px;
    }

    .ac-login-icon svg {
        width: 32px;
        height: 32px;
    }

    .ac-login-card-head {
        margin-bottom: 18px;
    }

    .ac-login-card-head h2 {
        font-size: 1.35rem;
    }

    .ac-login-copy {
        display: block;
    }

    .ac-login-input {
        height: 46px;
    }

    .ac-login-submit {
        height: 48px;
    }
}
