@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
    --auth-ink: #101828;
    --auth-muted: #667085;
    --auth-line: #d0d5dd;
    --auth-soft: #f8faff;
    --auth-brand: #635bff;
    --auth-brand-dark: #5147e6;
    --auth-danger-bg: #fff5f5;
    --auth-danger: #b42318;
    --auth-success-bg: #f0fdf4;
    --auth-success: #027a48;
}

* {
    box-sizing: border-box;
}

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

body.auth-page {
    margin: 0;
    min-height: 100vh;
    color: var(--auth-ink);
    background:
        radial-gradient(circle at 8% 10%, rgba(99, 91, 255, 0.08), transparent 30%),
        radial-gradient(circle at 92% 90%, rgba(20, 184, 166, 0.08), transparent 28%),
        #f8fafc;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    display: grid;
    place-items: center;
    padding: 28px 18px;
}

.auth-shell {
    width: min(100%, 980px);
    min-height: 610px;
    display: grid;
    grid-template-columns: minmax(280px, 0.86fr) minmax(360px, 1.14fr);
    overflow: hidden;
    background: #fff;
    border: 1px solid #eaecf0;
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(16, 24, 40, 0.10);
}

.auth-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 42px;
    color: #fff;
    background:
        linear-gradient(145deg, rgba(17, 24, 39, 0.96), rgba(35, 34, 82, 0.98)),
        #171a2d;
}

.auth-brand-panel::after {
    content: "";
    position: absolute;
    width: 330px;
    height: 330px;
    right: -150px;
    bottom: -150px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    box-shadow:
        0 0 0 34px rgba(255, 255, 255, 0.035),
        0 0 0 68px rgba(255, 255, 255, 0.025);
    pointer-events: none;
}

.brand-lockup,
.brand-copy,
.brand-meta {
    position: relative;
    z-index: 1;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}

.brand-lockup img {
    width: 48px;
    height: 48px;
    padding: 6px;
    object-fit: contain;
    background: #fff;
    border-radius: 14px;
}

.brand-lockup strong {
    display: block;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-lockup span {
    display: block;
    margin-top: 3px;
    color: #aab1c5;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-copy {
    max-width: 290px;
    margin-top: auto;
    margin-bottom: auto;
}

.brand-copy h1 {
    margin: 0 0 16px;
    color: #fff;
    font-size: clamp(30px, 4vw, 43px);
    line-height: 1.08;
    letter-spacing: -0.055em;
}

.brand-copy p {
    margin: 0;
    color: #b6bdd0;
    font-size: 14px;
    line-height: 1.75;
}

.brand-meta {
    color: #8f98af;
    font-size: 12px;
}

.auth-content {
    display: flex;
    align-items: center;
    padding: 50px clamp(28px, 6vw, 76px);
}

.auth-form-wrap {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

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

.auth-heading h2 {
    margin: 0 0 8px;
    color: var(--auth-ink);
    font-size: 27px;
    letter-spacing: -0.045em;
}

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

.auth-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 28px;
    padding: 4px;
    background: #f2f4f7;
    border-radius: 10px;
}

.auth-switch button {
    border: 0;
    border-radius: 7px;
    padding: 10px 12px;
    color: var(--auth-muted);
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.auth-switch button.active {
    color: var(--auth-ink);
    background: #fff;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}

.auth-alert {
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
}

.auth-alert.error {
    color: var(--auth-danger);
    background: var(--auth-danger-bg);
    border: 1px solid #fecdca;
}

.auth-alert.success {
    color: var(--auth-success);
    background: var(--auth-success-bg);
    border: 1px solid #abefc6;
}

.auth-tab {
    display: none;
}

.auth-tab.active {
    display: block;
    animation: auth-fade-in 180ms ease-out;
}

@keyframes auth-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

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

.auth-input,
.auth-input-wrap .auth-input {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    color: var(--auth-ink);
    background: #fff;
    border: 1px solid var(--auth-line);
    border-radius: 9px;
    outline: none;
    font: inherit;
    font-size: 14px;
    transition: border 160ms ease, box-shadow 160ms ease;
}

.auth-input::placeholder {
    color: #98a2b3;
}

.auth-input:focus {
    border-color: var(--auth-brand);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.13);
}

.auth-input-wrap .auth-input {
    padding-right: 58px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    padding: 5px;
    color: var(--auth-muted);
    background: transparent;
    border: 0;
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.auth-submit {
    width: 100%;
    min-height: 47px;
    margin-top: 7px;
    color: #fff;
    background: var(--auth-brand);
    border: 0;
    border-radius: 9px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(99, 91, 255, 0.22);
    transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.auth-submit:hover {
    background: var(--auth-brand-dark);
    box-shadow: 0 8px 20px rgba(99, 91, 255, 0.28);
    transform: translateY(-1px);
}

.auth-note {
    margin: 22px 0 0;
    color: #98a2b3;
    font-size: 11px;
    line-height: 1.6;
    text-align: center;
}

@media (max-width: 760px) {
    body.auth-page {
        padding: 0;
        place-items: stretch;
    }

    .auth-shell {
        min-height: 100vh;
        grid-template-columns: 1fr;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .auth-brand-panel {
        min-height: 220px;
        padding: 28px 24px;
    }

    .brand-copy {
        margin-top: 42px;
        margin-bottom: 0;
    }

    .brand-copy h1 {
        max-width: 330px;
        font-size: 31px;
    }

    .brand-copy p,
    .brand-meta {
        display: none;
    }

    .auth-content {
        align-items: flex-start;
        padding: 34px 24px 44px;
    }
}