:root {
    --pioner-red: #e30613;
    --pioner-red-dark: #bd0712;
    --ink: #17191d;
    --muted: #707783;
    --line: #e7e9ed;
    --surface: #ffffff;
    --page: #f4f5f7;
    --shadow: 0 24px 70px rgba(22, 26, 32, .13);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--page);
    -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
}
.auth-shell {
    width: min(980px, 100%);
    min-height: 590px;
    background: var(--surface);
    border: 1px solid rgba(20, 24, 31, .06);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.auth-logo {
    display: inline-flex;
    align-items: center;
    min-height: 52px;
    text-decoration: none;
}
.auth-logo img {
    display: block;
    width: auto;
    max-width: 220px;
    max-height: 58px;
    object-fit: contain;
}
.auth-logo-fallback {
    display: none;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 25px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .08em;
}
.auth-logo-fallback::before {
    content: "P";
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--pioner-red);
    border-radius: 12px;
    letter-spacing: 0;
}
.auth-kicker {
    color: var(--pioner-red);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.auth-title {
    margin: 12px 0 10px;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.08;
    letter-spacing: -.035em;
}
.auth-subtitle {
    margin: 0;
    max-width: 500px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
}
.auth-form { margin-top: 30px; }
.auth-field { margin: 0 0 18px; }
.auth-label {
    display: block;
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: #353a42;
}
.auth-input-wrap { position: relative; }
.auth-input {
    width: 100%;
    height: 52px;
    padding: 0 46px 0 15px;
    border: 1px solid #dcdfe4;
    border-radius: 13px;
    outline: none;
    color: var(--ink);
    background: #fff;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.auth-input::placeholder { color: #a4a9b1; }
.auth-input:hover { border-color: #c7cbd2; }
.auth-input:focus {
    border-color: var(--pioner-red);
    box-shadow: 0 0 0 4px rgba(227, 6, 19, .10);
}
.auth-input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 19px;
    height: 19px;
    color: #9197a0;
    pointer-events: none;
}
button.auth-password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    color: #858b94;
    background: transparent;
    cursor: pointer;
}
button.auth-password-toggle:hover { background: #f2f3f5; color: #42464d; }
button.auth-password-toggle svg { width: 19px; height: 19px; }
.auth-input--password { padding-right: 52px; }
.auth-submit {
    width: 100%;
    min-height: 52px;
    margin-top: 6px;
    padding: 0 20px;
    border: 0;
    border-radius: 13px;
    color: #fff;
    background: var(--pioner-red);
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(227, 6, 19, .22);
    transition: transform .14s ease, background .14s ease, box-shadow .14s ease;
}
.auth-submit:hover {
    background: var(--pioner-red-dark);
    box-shadow: 0 13px 28px rgba(227, 6, 19, .28);
    transform: translateY(-1px);
}
.auth-submit:active { transform: translateY(0); }
.auth-error {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid #ffd1d5;
    border-radius: 12px;
    color: #9f1520;
    background: #fff5f6;
    font-size: 13px;
    line-height: 1.45;
}
.auth-error-dot {
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--pioner-red);
}
.auth-meta {
    margin-top: 22px;
    color: #9398a0;
    font-size: 12px;
    line-height: 1.55;
}
.auth-meta a { color: #5f646c; text-decoration: none; }
.auth-meta a:hover { color: var(--pioner-red); }

/* Variant 1 — clean card */
.auth-page--card {
    background:
        radial-gradient(circle at 20% 10%, rgba(227,6,19,.06), transparent 32%),
        #f5f6f8;
}
.auth-page--card .auth-shell {
    width: min(470px, 100%);
    min-height: 0;
    padding: 42px;
}
.auth-page--card .auth-logo { margin-bottom: 42px; }

/* Variant 2 — split, default */
.auth-page--split {
    background:
        radial-gradient(circle at 85% 5%, rgba(227,6,19,.08), transparent 26%),
        #f1f3f5;
}
.auth-page--split .auth-shell {
    display: grid;
    grid-template-columns: minmax(0, .98fr) minmax(390px, 1.02fr);
}
.auth-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 590px;
    padding: 48px;
    overflow: hidden;
    color: #fff;
    background: #17191d;
}
.auth-brand-panel::before {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    right: -130px;
    top: -120px;
    border-radius: 50%;
    background: rgba(227, 6, 19, .86);
}
.auth-brand-panel::after {
    content: "";
    position: absolute;
    width: 210px;
    height: 210px;
    left: -100px;
    bottom: -110px;
    border: 42px solid rgba(255,255,255,.045);
    border-radius: 50%;
}
.auth-brand-panel > * { position: relative; z-index: 1; }
.auth-brand-panel .auth-logo {
    align-self: flex-start;
    padding: 10px 15px;
    border-radius: 14px;
    background: #fff;
}
.auth-brand-panel .auth-logo img { max-width: 190px; max-height: 48px; }
.auth-brand-copy h2 {
    max-width: 430px;
    margin: 0 0 16px;
    font-size: 38px;
    line-height: 1.1;
    letter-spacing: -.035em;
}
.auth-brand-copy p {
    max-width: 430px;
    margin: 0;
    color: rgba(255,255,255,.66);
    font-size: 15px;
    line-height: 1.7;
}
.auth-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255,255,255,.72);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.auth-brand-badge::before {
    content: "";
    width: 26px;
    height: 3px;
    border-radius: 4px;
    background: var(--pioner-red);
}
.auth-brand-foot { color: rgba(255,255,255,.38); font-size: 12px; }
.auth-form-panel {
    display: flex;
    align-items: center;
    padding: 58px 64px;
}
.auth-form-panel-inner { width: 100%; max-width: 390px; margin: auto; }

/* Variant 3 — premium dark */
.auth-page--dark {
    background:
        radial-gradient(circle at 20% 20%, rgba(227,6,19,.23), transparent 30%),
        radial-gradient(circle at 80% 90%, rgba(255,255,255,.06), transparent 30%),
        #0d0f12;
}
.auth-page--dark .auth-shell {
    width: min(480px, 100%);
    min-height: 0;
    padding: 44px;
    color: #fff;
    border-color: rgba(255,255,255,.08);
    background: rgba(25, 28, 33, .92);
    box-shadow: 0 28px 90px rgba(0,0,0,.42);
}
.auth-page--dark .auth-logo {
    margin-bottom: 42px;
    padding: 9px 14px;
    border-radius: 13px;
    background: #fff;
}
.auth-page--dark .auth-title { color: #fff; }
.auth-page--dark .auth-subtitle { color: #969ca5; }
.auth-page--dark .auth-label { color: #d8dbe0; }
.auth-page--dark .auth-input {
    color: #fff;
    border-color: #353941;
    background: #202329;
}
.auth-page--dark .auth-input:hover { border-color: #4a4f58; }
.auth-page--dark .auth-input:focus { border-color: var(--pioner-red); }
.auth-page--dark button.auth-password-toggle:hover { background: rgba(255,255,255,.06); color: #fff; }
.auth-page--dark .auth-meta { color: #686e77; }
.auth-page--dark .auth-meta a { color: #9ba0a8; }

@media (max-width: 760px) {
    .auth-page { padding: 16px; }
    .auth-shell { border-radius: 22px; }
    .auth-page--split .auth-shell { display: block; min-height: 0; }
    .auth-brand-panel { min-height: auto; padding: 28px 28px 30px; }
    .auth-brand-copy { margin-top: 54px; }
    .auth-brand-copy h2 { font-size: 28px; }
    .auth-brand-copy p { display: none; }
    .auth-brand-foot { display: none; }
    .auth-form-panel { padding: 38px 28px 42px; }
    .auth-page--card .auth-shell,
    .auth-page--dark .auth-shell { padding: 32px 26px; }
}

@media (max-width: 420px) {
    .auth-page { padding: 0; background: #fff; }
    .auth-shell { width: 100%; border: 0; border-radius: 0; box-shadow: none; }
    .auth-page--split .auth-shell { min-height: 100vh; }
    .auth-brand-panel { border-radius: 0 0 22px 22px; }
    .auth-page--card .auth-shell,
    .auth-page--dark .auth-shell { min-height: 100vh; }
}


/* Mobile auth refinement: the logo is an accent, not the hero element. */
@media (max-width: 760px) {
    .auth-brand-panel {
        padding: 18px 22px 20px;
    }

    .auth-brand-panel .auth-logo {
        min-height: 0;
        padding: 6px 10px;
        border-radius: 10px;
    }

    .auth-brand-panel .auth-logo img,
    .auth-logo img {
        max-width: 118px;
        max-height: 32px;
    }

    .auth-logo-fallback {
        font-size: 17px;
    }

    .auth-logo-fallback::before {
        width: 30px;
        height: 30px;
        border-radius: 8px;
        font-size: 14px;
    }

    .auth-brand-copy {
        margin-top: 24px;
    }

    .auth-brand-copy h2 {
        margin-bottom: 0;
        font-size: 22px;
        line-height: 1.18;
    }

    .auth-brand-badge {
        margin-bottom: 10px;
        font-size: 10px;
    }

    .auth-form-panel {
        padding: 30px 22px 34px;
    }
}

@media (max-width: 420px) {
    .auth-brand-panel {
        padding: 14px 18px 16px;
        border-radius: 0 0 16px 16px;
    }

    .auth-brand-copy {
        display: none;
    }

    .auth-form-panel {
        padding: 28px 20px 32px;
    }
}
