:root {
    --auth-border: rgba(140, 167, 255, 0.18);
    --auth-text: #f4f7ff;
    --auth-muted: #aab4d8;
    --auth-cyan: #4de3ff;
    --auth-violet: #8b5cf6;
    --auth-pink: #d946ef;
    --auth-danger-bg: rgba(255, 107, 129, 0.14);
    --auth-danger-border: rgba(255, 107, 129, 0.28);
    --auth-danger-text: #ffd4dc;
    --auth-panel: linear-gradient(180deg, rgba(13, 24, 46, 0.88), rgba(8, 15, 29, 0.96));
    --auth-shadow: 0 32px 70px rgba(2, 8, 23, 0.42);
}

* {
    box-sizing: border-box;
}

body.auth-body {
    margin: 0;
    min-height: 100vh;
    color: var(--auth-text);
    font-family: "Manrope", sans-serif;
    background:
        radial-gradient(circle at 12% 18%, rgba(77, 227, 255, 0.22), transparent 24%),
        radial-gradient(circle at 85% 12%, rgba(217, 70, 239, 0.22), transparent 26%),
        radial-gradient(circle at 70% 55%, rgba(30, 200, 255, 0.12), transparent 22%),
        linear-gradient(180deg, #050a15 0%, #07111f 45%, #09162a 100%);
}

body.auth-body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.62), transparent 92%);
}

.auth-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 40px;
    position: relative;
    z-index: 1;
}

.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 24px;
    border: 1px solid var(--auth-border);
    background: rgba(8, 18, 35, 0.7);
    border-radius: 24px;
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 35px rgba(6, 15, 34, 0.24);
}

.auth-topbar__brand img {
    display: block;
    height: 46px;
}

.auth-topbar__actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.auth-link,
.auth-topbar__actions a {
    color: var(--auth-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-link:hover,
.auth-topbar__actions a:hover {
    color: var(--auth-text);
}

.auth-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0.01em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.auth-button:hover {
    transform: translateY(-1px);
}

.auth-button--primary {
    color: #04101f;
    background: linear-gradient(135deg, var(--auth-cyan) 0%, #8ce6ff 100%);
    box-shadow: 0 18px 38px rgba(77, 227, 255, 0.24);
}

.auth-button--ghost {
    color: var(--auth-text);
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
}

.auth-main {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 470px);
    gap: 28px;
    align-items: stretch;
    padding-top: 28px;
}

.auth-hero,
.auth-card {
    border-radius: 30px;
    border: 1px solid rgba(140, 167, 255, 0.16);
    background: var(--auth-panel);
    box-shadow: var(--auth-shadow);
    backdrop-filter: blur(18px);
}

.auth-hero {
    position: relative;
    overflow: hidden;
    padding: 38px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 720px;
}

.auth-hero::before,
.auth-hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(80px);
    opacity: 0.72;
}

.auth-hero::before {
    inset: 10% auto auto 6%;
    width: 220px;
    height: 220px;
    background: rgba(77, 227, 255, 0.24);
}

.auth-hero::after {
    inset: auto 2% 8% auto;
    width: 260px;
    height: 260px;
    background: rgba(139, 92, 246, 0.24);
}

.auth-hero > * {
    position: relative;
    z-index: 1;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(77, 227, 255, 0.22);
    background: rgba(77, 227, 255, 0.08);
    color: var(--auth-cyan);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-hero h1 {
    margin: 22px 0 18px;
    max-width: 10ch;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(3rem, 6vw, 4.8rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.auth-hero h1 span {
    color: var(--auth-cyan);
}

.auth-hero p,
.auth-card__subtitle,
.auth-feature p,
.auth-preview__meta {
    color: var(--auth-muted);
    line-height: 1.75;
}

.auth-feature-list {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.auth-feature {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-feature strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
}

.auth-preview {
    margin-top: 28px;
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-preview__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.auth-preview__tag,
.auth-preview__status {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-preview__tag {
    color: #03182c;
    background: linear-gradient(135deg, #71f7ff, #bbf6ff);
}

.auth-preview__status {
    color: #afffdc;
    background: rgba(88, 242, 178, 0.12);
    border: 1px solid rgba(88, 242, 178, 0.22);
}

.auth-preview__bubble {
    max-width: 88%;
    padding: 14px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.65;
}

.auth-preview__bubble + .auth-preview__bubble {
    margin-top: 12px;
}

.auth-preview__bubble--client {
    color: #04111f;
    background: linear-gradient(135deg, #dff8ff, #87e9ff);
}

.auth-preview__bubble--ai {
    margin-left: auto;
    color: #f6f8ff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-card {
    padding: 32px;
}

.auth-card__header {
    margin-bottom: 24px;
}

.auth-card__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--auth-cyan);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-card__title {
    margin: 0 0 12px;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
    color: var(--auth-text);
}

.auth-form .form-group {
    margin-bottom: 1.2rem;
}

.auth-form .form-control,
.auth-form .password-field {
    width: 100% !important;
    max-width: 100%;
    margin: 0;
}

.auth-form .form-control {
    min-height: 58px;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--auth-text);
    box-shadow: none;
}

.auth-form .form-control::placeholder {
    color: rgba(207, 214, 238, 0.55);
}

.auth-form .form-control:focus {
    border-color: rgba(77, 227, 255, 0.45);
    background: rgba(255, 255, 255, 0.07);
    color: var(--auth-text);
}

.auth-form label,
.auth-form .form-check-label {
    color: var(--auth-text);
    font-weight: 700;
}

.auth-form .text-muted,
.auth-form .text-dark-50 {
    color: var(--auth-muted) !important;
}

.auth-form .form-check-input {
    border-color: rgba(255, 255, 255, 0.18);
    background-color: rgba(255, 255, 255, 0.04);
}

.auth-form .form-check-input:checked {
    border-color: var(--auth-cyan);
    background-color: var(--auth-cyan);
}

.auth-form .alert {
    width: 100%;
    margin: 0 0 1.5rem;
    border: 1px solid var(--auth-danger-border);
    border-radius: 20px;
    background: var(--auth-danger-bg);
    color: var(--auth-danger-text);
}

.auth-form .alert .text-dark,
.auth-form .alert li {
    color: var(--auth-danger-text) !important;
}

.auth-form .text-danger,
.auth-form .field-validation-error {
    color: #ffb4c1 !important;
}

.auth-form__actions {
    display: grid;
    gap: 16px;
    margin-top: 26px;
}

.auth-form__button {
    width: 100%;
    min-height: 54px;
    border: 0;
    cursor: pointer;
}

.auth-form__footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 20px;
    color: var(--auth-muted);
}

.auth-form__footer p {
    margin: 0;
}

.auth-card__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: var(--auth-muted);
    text-decoration: none;
    font-weight: 700;
}

.auth-card__back:hover {
    color: var(--auth-text);
}

@media (max-width: 1100px) {
    .auth-main {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        min-height: auto;
    }
}

@media (max-width: 991.98px) {
    .auth-card {
        order: -1;
    }

    .auth-hero {
        min-height: auto;
        padding: 24px;
    }

    .auth-hero h1 {
        max-width: none;
        font-size: clamp(2.4rem, 10vw, 3.6rem);
    }

    .auth-feature-list {
        gap: 12px;
        margin-top: 20px;
    }

    .auth-preview {
        margin-top: 20px;
        padding: 18px;
    }
}

@media (max-width: 768px) {
    .auth-shell {
        width: min(100% - 24px, 1240px);
        padding-top: 16px;
    }

    .auth-topbar,
    .auth-topbar__actions,
    .auth-form__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-topbar {
        padding: 18px;
    }

    .auth-topbar__brand img {
        height: 40px;
    }

    .auth-hero,
    .auth-card {
        padding: 22px;
    }

    .auth-preview {
        display: none;
    }

    .auth-feature-list {
        margin-top: 16px;
    }

    .auth-hero h1 {
        max-width: none;
        font-size: clamp(2.7rem, 14vw, 4rem);
    }
}
