/* ============================================================
   Cypherwave — Auth screens
   Aligned with cypher-pay-login reference:
   Space Grotesk + Manrope + JetBrains Mono, brand terminal,
   light form panel. Partner logos kept as images.
   ============================================================ */

:root {
    --ink: #0b0714;
    --violet-900: #2e1065;
    --violet-700: #5b21b6;
    --magenta-600: #c026d3;
    --pink-500: #ec4899;
    --pink-300: #f9a8d4;
    --white: #ffffff;
    --surface-tint: #f6f4fb;
    --muted: #756e86;
    --line: #e8e4f2;
    --success: #34d399;

    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Manrope', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --cw-violet: #5b21b6;
    --cw-pink: #ec4899;
    --cw-ink: #0b0714;
    --cw-ink-soft: #756e86;
    --cw-muted: #756e86;
    --cw-line: #e8e4f2;
    --cw-grad: linear-gradient(100deg, #5b21b6, #c026d3 60%, #ec4899);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }

.auth-body {
    min-height: 100dvh;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--ink);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-wrap {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    min-height: 100dvh;
    width: 100%;
}
.auth-brand,
.auth-form-side { min-width: 0; }

/* ===================== LEFT — BRAND ===================== */
.auth-brand {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 64px 72px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        radial-gradient(circle at 15% 15%, rgba(244, 114, 182, 0.35), transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(192, 38, 212, 0.30), transparent 50%),
        linear-gradient(150deg, var(--violet-900) 0%, var(--violet-700) 40%, var(--magenta-600) 75%, var(--pink-500) 100%);
}

.auth-brand__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.auth-dot-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: radial-gradient(ellipse 80% 60% at 30% 30%, black 40%, transparent 90%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 30% 30%, black 40%, transparent 90%);
}
.auth-glow-orb {
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.10), transparent 70%);
    top: -160px;
    right: -160px;
}

.auth-brand__top {
    position: relative;
    z-index: 2;
}

.auth-eyebrow {
    margin: 0 0 28px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.22em;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 10px;
}
.auth-eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
}

.auth-hero__title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(36px, 4.5vw, 56px);
    line-height: 1.05;
    color: var(--white);
    letter-spacing: -0.01em;
}
.auth-hero__accent {
    background: linear-gradient(100deg, #fbcfe8, #ffffff 60%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-tagline {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 26px;
}
.auth-tagline span {
    font-family: var(--font-mono);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.03em;
    white-space: nowrap;
}
.auth-tagline__rule {
    display: block;
    height: 1px;
    flex: 0 0 40px;
    background: rgba(255, 255, 255, 0.35);
}

.auth-hero__sub {
    margin: 22px 0 0;
    font-family: var(--font-body);
    font-size: 16px;
    color: rgba(255, 255, 255, 0.72);
    max-width: 380px;
    line-height: 1.5;
}

/* Terminal signature */
.auth-terminal {
    position: relative;
    z-index: 2;
    margin-top: 44px;
    width: 100%;
    max-width: 420px;
    background: rgba(11, 7, 20, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    backdrop-filter: blur(14px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}
.auth-terminal__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.auth-terminal__bar > span:not(.auth-terminal__label) {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
}
.auth-terminal__label {
    margin-left: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.05em;
}
.auth-terminal__body {
    padding: 16px 18px 20px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.75);
    min-height: 118px;
}
.auth-terminal__body .ok { color: var(--success); }
.auth-terminal__body .tag { color: #f9a8d4; }
.auth-terminal__body .dim { color: rgba(255, 255, 255, 0.4); }
.auth-cursor {
    display: inline-block;
    width: 7px;
    height: 14px;
    background: #f9a8d4;
    margin-left: 2px;
    vertical-align: middle;
    animation: auth-blink 1s steps(1) infinite;
}
@keyframes auth-blink { 50% { opacity: 0; } }

.auth-brand__footer {
    position: relative;
    z-index: 2;
    margin-top: 48px;
}
.auth-partners__label {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 18px;
}
.partnership-marquee {
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.partnership-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: cw-marquee 40s linear infinite;
}
.partnership-track:hover { animation-play-state: paused; }
.pf-group {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}
.partnership-track .pf {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    flex-shrink: 0;
    opacity: 0.85;
    margin-right: clamp(20px, 2.6vw, 40px);
}
.partnership-track .pf img {
    max-height: 30px;
    max-width: 116px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}
@keyframes cw-marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ===================== RIGHT — FORM ===================== */
.auth-form-side {
    background: var(--surface-tint);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.auth-card-wrap {
    position: relative;
    width: 100%;
    max-width: 400px;
    min-width: 0;
    animation: cw-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.auth-form-card {
    position: relative;
    width: 100%;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 44px 40px 36px;
    box-shadow: 0 30px 60px -20px rgba(46, 16, 101, 0.18);
}
@keyframes cw-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-mobile-logo { display: none; width: 148px; margin: 0 auto 1.4rem; }

.auth-form__head { margin-bottom: 0; }
.auth-form__head h2 {
    margin: 0 0 6px;
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: var(--ink);
}
.auth-form__head p {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
}

.auth-form {
    display: flex;
    flex-direction: column;
    margin-top: 30px;
}
.auth-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}
.auth-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.auth-input-icon {
    position: absolute;
    left: 14px;
    font-size: 14px;
    color: #b7aecf;
    pointer-events: none;
    transition: color 0.15s ease;
}
.auth-input-wrap:focus-within .auth-input-icon { color: var(--magenta-600); }

.auth-input {
    width: 100%;
    height: auto;
    font-family: var(--font-body);
    font-size: 14.5px;
    color: var(--ink);
    padding: 13px 14px 13px 40px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-input-wrap:has(.auth-eye) .auth-input {
    padding-right: 40px;
}
.auth-input::placeholder { color: #b7aecf; }
.auth-input:hover { border-color: #d9d3e8; }
.auth-input:focus {
    border-color: var(--magenta-600);
    box-shadow: 0 0 0 4px rgba(192, 38, 212, 0.10);
}

.auth-eye {
    position: absolute;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    background: transparent;
    color: #b7aecf;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.15s ease;
}
.auth-eye:hover { color: var(--magenta-600); }

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 22px 0 26px;
}
.auth-remember {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}
.auth-remember input {
    width: 16px;
    height: 16px;
    accent-color: var(--magenta-600);
    cursor: pointer;
}
.auth-remember input + span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}
.auth-forgot {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--violet-700);
    text-decoration: none;
    transition: color 0.15s ease;
}
.auth-forgot:hover { color: var(--magenta-600); }

.auth-error {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    background: #fff5f4;
    border: 1px solid #fbd5d0;
    border-radius: 11px;
    padding: 12px 14px;
    margin-bottom: 16px;
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.07);
    animation: cw-err 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.auth-error-ic {
    flex: none;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fee2e0;
    color: #dc2626;
    font-size: 12px;
    margin-top: 1px;
}
.auth-error-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.auth-error-body strong { font-size: 0.86rem; font-weight: 700; color: #b42318; line-height: 1.3; }
.auth-error-body span { font-size: 0.83rem; font-weight: 500; color: #c0554e; line-height: 1.4; }
@keyframes cw-err {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}

.auth-status {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    background: #ecfdf3;
    border: 1px solid #c4ebd2;
    border-radius: 11px;
    padding: 12px 14px;
    margin-bottom: 1.2rem;
    box-shadow: 0 6px 16px rgba(16, 160, 106, 0.07);
    animation: cw-err 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.auth-status-ic {
    flex: none;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #d1fae0;
    color: #0d7a3a;
    font-size: 12px;
    margin-top: 1px;
}
.auth-status-body {
    font-size: 0.86rem;
    font-weight: 500;
    color: #1d6b46;
    line-height: 1.45;
}

.auth-foot {
    margin-top: 26px;
    text-align: center;
    font-size: 13.5px;
    color: var(--muted);
}
.auth-foot .auth-forgot {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.auth-foot .auth-forgot i { font-size: 11px; }

.auth-btn {
    width: 100%;
    height: auto;
    margin-top: 0;
    border: none;
    border-radius: 11px;
    padding: 14px 16px;
    background: linear-gradient(100deg, var(--violet-700), var(--magenta-600) 60%, var(--pink-500));
    background-size: 160% 100%;
    background-position: 0% 0%;
    color: #fff;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 14px 28px -10px rgba(192, 38, 212, 0.55);
    transition: background-position 0.35s ease, transform 0.15s ease;
}
.auth-btn:hover {
    background-position: 100% 0%;
    transform: translateY(-1px);
}
.auth-btn:active { transform: translateY(0); }
.auth-btn i {
    font-size: 0.85rem;
    transition: transform 0.18s ease;
}
.auth-btn:hover i { transform: translateX(3px); }

.auth-secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 22px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.05em;
    color: #b7aecf;
}
.auth-secure-note i { font-size: 11px; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 980px) {
    .auth-wrap {
        display: flex;
        flex-direction: column;
        grid-template-columns: 1fr;
    }
    .auth-brand {
        order: 1;
        padding: 48px 36px;
        min-height: 480px;
    }
    .auth-hero__title { font-size: 40px; }
    .auth-terminal { max-width: 100%; }
    .auth-form-side {
        order: 2;
        padding: 36px 20px 56px;
    }
}

@media (max-width: 640px) {
    .auth-brand { display: none; }
    .auth-form-side {
        min-height: 100dvh;
        padding: 32px 20px 48px;
    }
    .auth-mobile-logo { display: block; }
    .auth-form-card { padding: 32px 24px 28px; }
}

@media (max-width: 480px) {
    .auth-form-card { padding: 28px 20px 24px; }
    .auth-form__head h2 { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    .partnership-track,
    .auth-card-wrap,
    .auth-cursor {
        animation: none !important;
    }
    * { transition: none !important; }
}
