:root {
    --navy: #1b3263;
    --teal: #29c4a8;
    --teal-dark: #179d88;
    --sky: #238fda;
    --yellow: #ffc21b;
    --purple: #7a61c8;
    --red: #f04b37;
    --ink: #132344;
    --muted: #66748a;
    --line: #dce7ef;
    --panel: #ffffff;
    --soft: #f4fbf9;
    --danger: #c9352c;
    --success: #167c5f;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background:
        linear-gradient(135deg, rgba(41, 196, 168, 0.16), transparent 34%),
        linear-gradient(315deg, rgba(255, 194, 27, 0.18), transparent 30%),
        #f8fbff;
    overflow-x: hidden;
}

button,
input {
    font: inherit;
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.login-shell {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
    gap: 44px;
    align-items: center;
}

.brand-section {
    min-width: 0;
}

.brand-mark {
    display: inline-flex;
    width: min(260px, 66vw);
    margin-bottom: 28px;
}

.brand-mark img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 18px 32px rgba(27, 50, 99, 0.12));
}

.brand-copy {
    max-width: 620px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--teal-dark);
    font-size: 0.92rem;
    font-weight: 800;
    text-transform: uppercase;
}

.brand-copy h1 {
    margin: 0;
    color: var(--navy);
    font-size: clamp(2.1rem, 4.6vw, 4.3rem);
    line-height: 1.02;
    font-weight: 900;
    overflow-wrap: break-word;
}

.brand-copy p:not(.eyebrow) {
    max-width: 560px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 1.06rem;
    line-height: 1.65;
    overflow-wrap: break-word;
}

.feature-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.feature-strip span {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid rgba(27, 50, 99, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--navy);
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(27, 50, 99, 0.08);
}

.feature-strip span:nth-child(1) {
    border-top-color: var(--yellow);
}

.feature-strip span:nth-child(2) {
    border-top-color: var(--sky);
}

.feature-strip span:nth-child(3) {
    border-top-color: var(--purple);
}

.auth-panel {
    width: 100%;
    min-width: 0;
    padding: 26px;
    border: 1px solid rgba(27, 50, 99, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 22px 60px rgba(27, 50, 99, 0.16);
}

.auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 6px;
    border-radius: 8px;
    background: var(--soft);
}

.tab-button {
    min-height: 44px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-weight: 800;
    cursor: pointer;
}

.tab-button.is-active {
    background: var(--panel);
    color: var(--navy);
    box-shadow: 0 8px 18px rgba(27, 50, 99, 0.1);
}

.tab-button:focus-visible,
.primary-button:focus-visible,
.field input:focus-visible {
    outline: 3px solid rgba(35, 143, 218, 0.28);
    outline-offset: 2px;
}

.auth-form {
    display: none;
    margin-top: 28px;
}

.auth-form.is-active {
    display: grid;
    gap: 18px;
}

.form-heading h2 {
    margin: 0;
    color: var(--navy);
    font-size: 1.6rem;
}

.form-heading p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.field {
    display: grid;
    gap: 8px;
}

.field span {
    color: var(--navy);
    font-size: 0.94rem;
    font-weight: 800;
}

.field input {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 0 15px;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

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

.field input:focus {
    border-color: var(--sky);
    box-shadow: 0 0 0 4px rgba(35, 143, 218, 0.12);
}

.field input.is-invalid {
    border-color: var(--danger);
}

.field-hint,
.field-error {
    min-height: 16px;
    font-size: 0.82rem;
    line-height: 1.25;
}

.field-hint {
    color: var(--muted);
}

.field-error {
    color: var(--danger);
    font-weight: 700;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--teal), var(--sky));
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 14px 26px rgba(41, 196, 168, 0.26);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(41, 196, 168, 0.32);
}

.primary-button:active {
    transform: translateY(0);
}

.text-link {
    width: fit-content;
    min-height: 36px;
    margin: -4px auto 0;
    border: 0;
    background: transparent;
    color: var(--teal-dark);
    font-weight: 800;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.text-link:hover {
    color: var(--navy);
}

.text-link:focus-visible {
    outline: 3px solid rgba(35, 143, 218, 0.28);
    outline-offset: 2px;
    border-radius: 6px;
}

.auth-status {
    min-height: 22px;
    margin: 18px 0 0;
    color: var(--success);
    font-size: 0.92rem;
    font-weight: 800;
    text-align: center;
}

.auth-status.is-error {
    color: var(--danger);
}

.auth-status.is-success {
    color: var(--success);
}

.single-auth-shell {
    width: min(460px, 100%);
}

.auth-message-panel {
    display: grid;
    gap: 16px;
    text-align: center;
}

.auth-message-panel h1 {
    margin: 0;
    color: var(--navy);
    font-size: 1.8rem;
}

.auth-message-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.auth-message-panel .auth-status {
    margin: 0;
}

.auth-message-logo {
    width: 130px;
    height: auto;
    margin-inline: auto;
    filter: drop-shadow(0 12px 24px rgba(27, 50, 99, 0.14));
}

.reset-form {
    margin-top: 4px;
    text-align: left;
}

@media (max-width: 900px) {
    .login-page {
        align-items: flex-start;
        padding: 24px;
    }

    .login-shell {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .brand-section {
        text-align: center;
    }

    .brand-mark {
        width: min(210px, 58vw);
        margin-inline: auto;
        margin-bottom: 18px;
    }

    .brand-copy {
        margin-inline: auto;
    }

    .brand-copy p:not(.eyebrow) {
        margin-inline: auto;
    }

    .feature-strip {
        justify-content: center;
    }

    .auth-tabs {
        grid-template-columns: 1fr;
    }

    .auth-panel {
        max-width: 520px;
        margin-inline: auto;
    }
}

@media (max-width: 520px) {
    .login-page {
        display: block;
        padding: 18px 16px;
    }

    .login-shell,
    .brand-copy,
    .auth-panel {
        width: 100%;
        max-width: 100%;
    }

    .brand-copy h1 {
        font-size: 1.8rem;
        line-height: 1.12;
    }

    .brand-copy p:not(.eyebrow) {
        font-size: 0.98rem;
    }

    .feature-strip span {
        min-height: 38px;
        padding-inline: 14px;
        font-size: 0.9rem;
    }

    .auth-panel {
        padding: 18px;
    }

    .auth-tabs {
        gap: 6px;
    }

    .form-heading h2 {
        font-size: 1.35rem;
    }

    .tab-button {
        min-height: 42px;
        padding-inline: 8px;
        font-size: 0.82rem;
    }
}
