:root {
    --auth-ink: #0f172a;
    --auth-muted: #64748b;
    --auth-soft: #94a3b8;
    --auth-line: #dbe2ea;
    --auth-indigo: #4f46e5;
    --auth-indigo-dark: #3730a3;
    --auth-indigo-soft: #eef2ff;
    --auth-danger: #dc2626;
}

* {
    box-sizing: border-box;
}

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

body.auth-page {
    position: relative;
    display: grid;
    min-height: 100vh;
    margin: 0;
    place-items: center;
    overflow-x: hidden;
    padding: 32px 20px;
    background: #f3f6fb;
    color: var(--auth-ink);
    font-family: "Plus Jakarta Sans", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.auth-page::before,
body.auth-page::after {
    position: fixed;
    z-index: 0;
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

body.auth-page::before {
    top: -220px;
    left: -180px;
    width: 560px;
    height: 560px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.26), transparent 65%);
}

body.auth-page::after {
    right: -220px;
    bottom: -260px;
    width: 660px;
    height: 660px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.18), transparent 65%);
}

.auth-shell {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(1080px, 100%);
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 30px;
    background: #ffffff;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.13);
    grid-template-columns: 1.02fr 0.98fr;
}

.auth-showcase {
    position: relative;
    display: flex;
    min-height: 680px;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 42px;
    background: linear-gradient(145deg, #312e81 0%, #4f46e5 55%, #6366f1 100%);
    color: #ffffff;
}

.auth-showcase::before {
    position: absolute;
    top: 31%;
    right: -130px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 66%);
    content: "";
}

.auth-showcase::after {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
    background-size: 42px 42px;
    content: "";
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 80%);
    pointer-events: none;
}

.auth-brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    text-decoration: none;
}

.auth-brand:hover {
    color: #ffffff;
}

.auth-brand-mark {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    font-size: 22px;
}

.auth-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.auth-brand-text strong {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.auth-brand-text small {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.auth-showcase-content {
    position: relative;
    z-index: 1;
    max-width: 420px;
    padding: 44px 0;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-showcase h1 {
    margin: 22px 0 14px;
    font-size: clamp(34px, 3.4vw, 46px);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.08;
}

.auth-showcase p {
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 14px;
    line-height: 1.75;
}

.auth-feature-list {
    display: grid;
    gap: 14px;
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
}

.auth-feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    line-height: 1.5;
}

.auth-feature-icon {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 15px;
}

.auth-showcase-footer {
    position: relative;
    z-index: 1;
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 9px;
    color: rgba(255, 255, 255, 0.64);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.auth-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #6ee7b7;
    box-shadow: 0 0 0 4px rgba(110, 231, 183, 0.12);
}

.auth-panel {
    display: grid;
    place-items: center;
    padding: 48px 44px;
    background: #ffffff;
}

.auth-panel-inner {
    width: 100%;
    max-width: 368px;
}

.auth-mobile-brand {
    display: none;
    margin-bottom: 30px;
}

.auth-mobile-brand .auth-brand {
    color: var(--auth-ink);
}

.auth-mobile-brand .auth-brand > .auth-brand-mark {
    background: var(--auth-indigo-soft);
    box-shadow: none;
    color: var(--auth-indigo);
}

.auth-mobile-brand .auth-brand-text small {
    color: var(--auth-soft);
}

.auth-heading {
    margin-bottom: 26px;
}

.auth-kicker {
    display: block;
    margin-bottom: 7px;
    color: var(--auth-indigo);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-heading h2 {
    margin: 0 0 9px;
    color: var(--auth-ink);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.15;
}

.auth-heading p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 1.7;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.55;
}

.auth-alert i {
    margin-top: 1px;
    font-size: 15px;
    line-height: 1.2;
}

.auth-alert-success {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #047857;
}

.auth-alert-danger {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #b42318;
}

.auth-alert-info {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #4338ca;
}

.auth-field {
    margin-bottom: 17px;
}

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

.auth-label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.auth-label-row .auth-label {
    margin-bottom: 0;
}

.auth-link {
    color: var(--auth-indigo);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.auth-link:hover {
    color: var(--auth-indigo-dark);
    text-decoration: underline;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap > i {
    position: absolute;
    top: 50%;
    left: 14px;
    color: var(--auth-soft);
    font-size: 15px;
    pointer-events: none;
    transform: translateY(-50%);
}

.auth-input {
    width: 100%;
    height: 51px;
    padding: 0 44px 0 42px;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    outline: 0;
    background: #ffffff;
    color: var(--auth-ink);
    font: inherit;
    font-size: 13px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-input::placeholder {
    color: #a8b3c2;
}

.auth-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.auth-input.is-invalid {
    border-color: #f43f5e;
}

.auth-input.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    display: grid;
    width: 33px;
    height: 33px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--auth-soft);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.18s ease, color 0.18s ease;
}

.auth-password-toggle:hover {
    background: #f1f5f9;
    color: #475569;
}

.auth-password-toggle:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 1px;
}

.auth-error {
    display: block;
    margin-top: 6px;
    color: var(--auth-danger);
    font-size: 11px;
    line-height: 1.5;
}

.auth-hint {
    display: block;
    margin-top: 6px;
    color: var(--auth-soft);
    font-size: 11px;
    line-height: 1.5;
}

.auth-submit {
    display: inline-flex;
    width: 100%;
    height: 51px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 2px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--auth-indigo), #6366f1);
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.25);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.auth-submit:hover {
    box-shadow: 0 16px 30px rgba(79, 70, 229, 0.32);
    transform: translateY(-1px);
}

.auth-submit:active {
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.22);
    transform: translateY(0);
}

.auth-submit:focus-visible {
    outline: 3px solid rgba(99, 102, 241, 0.3);
    outline-offset: 2px;
}

.auth-recipient {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding: 11px 13px;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    background: #f8fafc;
    color: var(--auth-muted);
    font-size: 11px;
    line-height: 1.6;
}

.auth-recipient i {
    margin-top: 1px;
    color: var(--auth-indigo);
    font-size: 14px;
    line-height: 1.2;
}

.auth-recipient strong {
    color: var(--auth-ink);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.auth-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    background: #f8fafc;
    color: var(--auth-muted);
    font-size: 11px;
    line-height: 1.6;
}

.auth-note i {
    margin-top: 1px;
    color: var(--auth-indigo);
    font-size: 14px;
    line-height: 1.2;
}

.auth-footer {
    margin-top: 24px;
    color: var(--auth-soft);
    font-size: 11px;
    line-height: 1.7;
    text-align: center;
}

.auth-footer a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--auth-indigo);
    font-weight: 700;
    text-decoration: none;
}

.auth-footer a:hover {
    color: var(--auth-indigo-dark);
    text-decoration: underline;
}

.auth-footer-sep {
    margin: 0 7px;
    color: #cbd5e1;
}

.auth-note .auth-link {
    font-size: 11px;
}

@media (max-width: 900px) {
    .auth-shell {
        width: min(500px, 100%);
        grid-template-columns: 1fr;
    }

    .auth-showcase {
        display: none;
    }

    .auth-panel {
        padding: 38px 32px;
    }

    .auth-mobile-brand {
        display: block;
    }
}

@media (max-width: 520px) {
    body.auth-page {
        padding: 0;
    }

    .auth-shell {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .auth-panel {
        align-items: start;
        padding: 28px 22px;
    }

    .auth-panel-inner {
        padding-top: 12px;
    }

    .auth-heading h2 {
        font-size: 27px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-input,
    .auth-password-toggle,
    .auth-submit {
        transition: none;
    }
}
