:root {
    --auth-accent: #2b7fff;
    --auth-accent-hover: #1b6ef0;
    --auth-ink: #1c2430;
    --auth-mute: #6b7785;
    --auth-line: #d7dee6;
    --auth-paper: #ffffff;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

.auth-body {
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    color: var(--auth-ink);
    background: #07111d;
    -webkit-font-smoothing: antialiased;
}

.auth-stage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    min-height: 100dvh;
}

.auth-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(1.75rem, 4.5vw, 3.5rem) clamp(1.5rem, 4vw, 3.25rem) 1.4rem;
    color: #fff;
}

.auth-visual__photo {
    position: absolute;
    inset: -6%;
    width: 112%;
    height: 112%;
    object-fit: cover;
    object-position: 50% 45%;
    animation: auth-drift 30s ease-in-out infinite alternate;
}

@keyframes auth-drift {
    from { transform: scale(1) translate3d(0, 0, 0); }
    to { transform: scale(1.07) translate3d(-1.8%, -1%, 0); }
}

.auth-visual__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(6, 16, 32, 0.42) 0%, rgba(8, 20, 40, 0.62) 48%, rgba(5, 14, 28, 0.9) 100%),
        linear-gradient(90deg, rgba(6, 18, 36, 0.28), transparent 55%);
    pointer-events: none;
}

.auth-visual__body,
.auth-visual__foot {
    position: relative;
    z-index: 1;
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 22rem;
    color: inherit;
    text-decoration: none;
    animation: auth-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes auth-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-brand__a {
    width: 4.4rem;
    height: 4.4rem;
    margin-bottom: 1.15rem;
    fill: var(--auth-accent);
    filter: drop-shadow(0 8px 18px rgba(43, 127, 255, 0.28));
}

.auth-brand__word {
    display: flex;
    flex-direction: column;
    font-family: Syne, "Plus Jakarta Sans", sans-serif;
    font-weight: 800;
    font-size: clamp(2.7rem, 4.6vw, 4.15rem);
    letter-spacing: -0.05em;
    line-height: 0.88;
}

.auth-brand__mail {
    color: var(--auth-accent);
}

.auth-brand__line {
    margin-top: 1.15rem;
    max-width: 20rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.82);
}

.auth-points {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 0 0 1.1rem;
    padding: 0;
    list-style: none;
}

.auth-points li {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.auth-points__icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    margin-bottom: 0.35rem;
    color: var(--auth-accent);
}

.auth-points__icon svg {
    width: 1.35rem;
    height: 1.35rem;
}

.auth-points strong {
    font-size: 0.92rem;
    font-weight: 700;
}

.auth-points span {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.68);
}

.auth-copy {
    margin: 0;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.48);
}

.auth-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--auth-paper);
    padding: 4.5rem clamp(1.5rem, 4vw, 4.5rem) 2.5rem;
    animation: auth-panel-in 0.8s 0.08s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes auth-panel-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-lang {
    position: absolute;
    top: 1.35rem;
    right: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--auth-mute);
    font-size: 0.88rem;
    font-weight: 600;
}

.auth-lang svg {
    width: 1.05rem;
    height: 1.05rem;
}

.auth-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-intro__mark {
    display: grid;
    place-items: center;
    width: 4.1rem;
    height: 4.1rem;
    margin-bottom: 1.15rem;
    border-radius: 1.05rem;
    background: #fff;
    box-shadow: 0 10px 28px rgba(28, 36, 48, 0.1);
}

.auth-intro__mark svg {
    width: 2rem;
    height: 2rem;
}

.auth-intro__title {
    margin: 0;
    font-size: clamp(1.7rem, 2.4vw, 2.05rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.auth-intro__lead {
    margin: 0.4rem 0 0;
    color: var(--auth-mute);
    font-size: 0.95rem;
}

.auth-status {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0d7a4f;
    text-align: center;
}

.auth-form,
.auth-panel form {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    width: min(24.5rem, 100%);
    margin: 0 auto;
}

.auth-form > * + *,
.auth-panel form > * + * {
    margin-top: 0;
}

.auth-field {
    position: relative;
}

.auth-field__icon {
    position: absolute;
    top: 50%;
    left: 0.9rem;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 1.2rem;
    height: 1.2rem;
    color: var(--auth-accent);
    transform: translateY(-50%);
    pointer-events: none;
}

.auth-field__icon svg {
    width: 1.15rem;
    height: 1.15rem;
}

.auth-field input {
    padding-left: 2.7rem !important;
}

.auth-panel input[type="email"],
.auth-panel input[type="password"],
.auth-panel input[type="text"] {
    display: block;
    width: 100%;
    height: 3.35rem;
    padding: 0 2.7rem 0 1rem;
    border: 1.5px solid var(--auth-line) !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: none !important;
    font-family: inherit;
    font-size: 0.98rem;
    color: var(--auth-ink);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.auth-panel input::placeholder {
    color: #8b97a4;
}

.auth-panel input[type="email"]:focus,
.auth-panel input[type="password"]:focus,
.auth-panel input[type="text"]:focus {
    outline: none;
    border-color: var(--auth-accent) !important;
    box-shadow: 0 0 0 3px rgba(43, 127, 255, 0.16) !important;
    --tw-ring-shadow: 0 0 #0000 !important;
}

.auth-eye {
    position: absolute;
    top: 50%;
    right: 0.35rem;
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--auth-mute);
    cursor: pointer;
    transform: translateY(-50%);
}

.auth-eye svg {
    width: 1.12rem;
    height: 1.12rem;
}

.auth-eye .auth-eye__on { display: none; }
.auth-eye[aria-pressed="true"] .auth-eye__on { display: block; }
.auth-eye[aria-pressed="true"] .auth-eye__off { display: none; }

.auth-eye:hover {
    color: var(--auth-ink);
    background: rgba(28, 36, 48, 0.05);
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.1rem 0.05rem;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--auth-mute);
    cursor: pointer;
}

.auth-check input,
.auth-panel input[type="checkbox"] {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    accent-color: var(--auth-accent);
    box-shadow: none;
}

.auth-link,
.auth-panel a:not(.auth-brand) {
    color: var(--auth-accent);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.auth-link:hover,
.auth-panel a:not(.auth-brand):hover {
    text-decoration: underline;
}

.auth-submit,
.auth-panel button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 3.2rem;
    margin-top: 0.2rem;
    padding: 0 1rem;
    border: 0;
    border-radius: 10px;
    background: var(--auth-accent);
    color: #fff;
    font-family: inherit;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: none;
    cursor: pointer;
    transition: background 0.16s ease, transform 0.16s ease;
}

.auth-submit:hover,
.auth-panel button[type="submit"]:hover {
    background: var(--auth-accent-hover);
    transform: translateY(-1px);
}

.auth-submit:active,
.auth-panel button[type="submit"]:active {
    transform: translateY(0);
}

.auth-submit:focus-visible,
.auth-panel button[type="submit"]:focus-visible,
.auth-panel input:focus-visible {
    outline: 2px solid var(--auth-accent);
    outline-offset: 3px;
}

.auth-panel .text-sm.text-gray-600,
.auth-panel .mb-4.text-sm {
    width: min(24.5rem, 100%);
    margin-left: auto;
    margin-right: auto;
    color: var(--auth-mute);
    line-height: 1.55;
}

.auth-panel .text-red-600,
.auth-panel [class*="text-red"] {
    color: #c0392b;
    font-size: 0.8rem;
}

.auth-panel form > .flex.items-center {
    display: flex;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 1rem;
}

.auth-panel form > .flex.items-center a {
    text-align: center;
}

.auth-panel label.block,
.auth-panel .block.font-medium {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--auth-mute);
}

@media (prefers-reduced-motion: reduce) {
    .auth-visual__photo,
    .auth-brand,
    .auth-panel {
        animation: none;
    }
}

@media (max-width: 920px) {
    .auth-stage {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .auth-visual {
        min-height: 18rem;
        padding: 1.4rem 1.35rem 1.1rem;
    }

    .auth-brand__a {
        width: 3.1rem;
        height: 3.1rem;
        margin-bottom: 0.7rem;
    }

    .auth-brand__word {
        font-size: 2.3rem;
    }

    .auth-brand__line {
        margin-top: 0.6rem;
        font-size: 0.92rem;
    }

    .auth-points {
        display: none;
    }

    .auth-copy {
        display: none;
    }

    .auth-panel {
        min-height: auto;
        padding: 3.4rem 1.35rem 2.2rem;
    }
}
