:root {
    --ink: #f5f6f8;
    --muted: #a7a7b0;
    --line: rgba(255, 255, 255, 0.08);
    --red: #ff2b2b;
    --red-deep: #e10600;
    --card: #141416;
    --green: #22c55e;
    --green-text: #3dde9a;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body.auth-body {
    font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
    color: var(--ink);
    background: #050507;
    min-height: 100vh;
}

.auth-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 55% 70% at 82% 42%, rgba(190, 12, 24, 0.55), transparent 62%),
        radial-gradient(ellipse 40% 45% at 68% 88%, rgba(120, 8, 16, 0.45), transparent 70%),
        linear-gradient(90deg, #050507 0%, #070709 48%, #120206 100%);
}

body.theme-register .auth-bg {
    background:
        radial-gradient(ellipse 50% 80% at 18% 50%, rgba(10, 70, 120, 0.35), transparent 60%),
        linear-gradient(105deg, #071a2c 0%, #0a4f78 40%, #0c7468 74%, #0a5a48 100%);
}

.auth-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 430px);
    gap: 48px;
    width: min(1120px, calc(100% - 64px));
    margin: 0 auto;
    min-height: 100vh;
    align-items: center;
    padding: 40px 0;
}

.auth-shell.shell-register {
    grid-template-columns: minmax(240px, 0.78fr) minmax(460px, 640px);
    width: min(1180px, calc(100% - 56px));
    gap: 36px;
}

.brand-kicker {
    margin: 0 0 18px;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.28em;
    color: #d5d5dc;
}

.auth-hero h1 {
    margin: 0;
    font-size: 52px;
    line-height: 1.05;
    letter-spacing: -0.035em;
    font-weight: 750;
    max-width: 560px;
}

.accent { color: var(--red); }

body.theme-register .accent { color: var(--green-text); }

.hero-copy {
    margin: 18px 0 0;
    max-width: 460px;
    color: #b7b7c0;
    font-size: 15px;
    line-height: 1.55;
}

body.theme-register .hero-copy { color: #d5e6ea; max-width: 380px; }

.hero-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    margin-bottom: 22px;
    color: var(--red);
    background: rgba(255, 43, 43, 0.08);
    border: 1px solid rgba(255, 43, 43, 0.35);
}

body.theme-register .hero-icon {
    color: var(--green-text);
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(61, 222, 154, 0.45);
    border-radius: 12px;
}

.feature-grid {
    margin-top: 28px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: 560px;
}

.feature-card,
.step-card {
    background: rgba(16, 16, 18, 0.82);
    border: 1px solid #2a2a2e;
    border-radius: 14px;
    padding: 14px 14px 13px;
}

.feature-card strong,
.step-card strong {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
}

.feature-card p,
.step-card p {
    margin: 0;
    color: #9a9aa3;
    font-size: 12.5px;
    line-height: 1.45;
}

.step-list {
    margin-top: 26px;
    display: grid;
    gap: 12px;
    max-width: 460px;
}

.step-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.step-ico {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--red);
    background: rgba(255, 43, 43, 0.08);
    border: 1px solid rgba(255, 43, 43, 0.28);
}

.auth-card {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 22px;
    padding: 26px 24px 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

body.theme-register .auth-card {
    background: #0d2233;
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    padding: 26px 26px 18px;
}

.card-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    margin-bottom: 16px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.card-logo.left { justify-content: flex-start; }

.card-logo img {
    display: block;
    width: 100%;
    max-width: 250px;
    height: auto;
}

.card-lead {
    margin: 8px 0 18px;
    color: #9b9ba4;
    font-size: 13px;
    line-height: 1.4;
}

.center-ico {
    width: 54px;
    height: 54px;
    margin: 4px auto 12px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--red);
    background: rgba(255, 43, 43, 0.1);
    border: 1px solid rgba(255, 43, 43, 0.28);
}

.card-title {
    margin: 0;
    text-align: center;
    font-size: 26px;
    letter-spacing: -0.03em;
}

.card-title.left { text-align: left; font-size: 22px; }

.card-sub {
    margin: 6px 0 18px;
    text-align: center;
    color: #9b9ba4;
    font-size: 13.5px;
}

.card-sub.left { text-align: left; color: #b7c9d4; }

.role-switch {
    display: grid;
    grid-template-columns: 1.35fr 0.8fr;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: #0c0c0e;
    border: 1px solid #26262a;
    margin-bottom: 18px;
}

.role-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: #bdbdc6;
    border-radius: 999px;
    min-height: 38px;
    font: inherit;
    font-size: 13.5px;
    font-weight: 650;
    cursor: pointer;
}

.role-btn.is-active {
    background: var(--red);
    color: white;
}

.field { margin-bottom: 14px; }

.field label {
    display: block;
    margin-bottom: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9a9aa3;
}

body.theme-register .field label {
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
    font-weight: 650;
    color: #e7f1f6;
}

.req { color: #fb7185; }

.control { position: relative; }

.field input {
    width: 100%;
    height: 46px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: #fff;
    color: #111827;
    padding: 0 14px;
    font: inherit;
    font-size: 14.5px;
    outline: none;
}

.field input::placeholder { color: #9ca3af; }

.field input:focus {
    border-color: #fecaca;
    box-shadow: 0 0 0 3px rgba(255, 43, 43, 0.15);
}

.eye {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    display: grid;
    place-items: center;
}

body.theme-reset .field input,
body.theme-register .field input {
    background: #101820;
    border: 1px solid #24384a;
    color: #f4f7fb;
    height: 44px;
}

body.theme-reset .field input { background: #121214; border-color: #2c2c31; }

body.theme-reset .field input::placeholder,
body.theme-register .field input::placeholder { color: #7f93a3; }

body.theme-register .field input:focus {
    border-color: #34d399;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
}

body.theme-reset .eye,
body.theme-register .eye { color: #9fb0bd; }

.field-error {
    margin: 6px 0 0;
    color: #fb7185;
    font-size: 12px;
}

.hint {
    margin: 6px 0 0;
    color: #8ea4b4;
    font-size: 11.5px;
    line-height: 1.4;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 14px;
}

.span-2 { grid-column: span 2; }

.btn {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 10px;
    background: var(--red);
    color: white;
    font: inherit;
    font-size: 15px;
    font-weight: 750;
    cursor: pointer;
}

.btn:hover { background: var(--red-deep); }

.btn-green { background: var(--green); }
.btn-green:hover { background: #16a34a; }

.forgot-row {
    display: flex;
    justify-content: flex-end;
    margin: 12px 0 16px;
}

.auth-card a {
    color: #c6c6ce;
    text-decoration: none;
    font-size: 13px;
}

.auth-card a.accent-link { color: var(--red); font-weight: 700; }

body.theme-register .auth-card a.accent-link { color: var(--green-text); }

.signup-row,
.back-row {
    text-align: center;
    color: #b7b7c0;
    font-size: 13.5px;
    margin: 16px 0 4px;
}

.back-row { margin-top: 16px; }

.back-row a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #d0d0d6;
}

.toast-area {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 80;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    pointer-events: none;
}

.mp-toast {
    pointer-events: auto;
    min-width: 240px;
    max-width: 360px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    transform: translateY(8px);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.mp-toast.is-in { opacity: 1; transform: none; }

.mp-toast-dot {
    width: 8px;
    height: 8px;
    border-radius: 99px;
    margin-top: 5px;
    flex: 0 0 auto;
}

.mp-toast-success { background: #ecfdf5; color: #166534; border-color: #86efac; }
.mp-toast-success .mp-toast-dot { background: #16a34a; }
.mp-toast-error { background: #fff1f2; color: #9f1239; border-color: #fecdd3; }
.mp-toast-error .mp-toast-dot { background: #e11d48; }
.mp-toast-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.mp-toast-warning .mp-toast-dot { background: #d97706; }
.mp-toast-info { background: #eff6ff; color: #1e3a8a; border-color: #bfdbfe; }
.mp-toast-info .mp-toast-dot { background: #2563eb; }
