:root {
    --auth-white: #ffffff;
    --auth-ink: #172321;
    --auth-muted: #60706d;
    --auth-line: #dfe8e5;
    --auth-surface: #f7faf9;
    --auth-surface-strong: #eef7f4;
    --auth-emerald-deep: #004b4f;
    --auth-emerald: #006b6f;
    --auth-emerald-soft: #dcefeb;
    --auth-gold: #d4af37;
    --auth-gold-light: #f2d16b;
    --auth-danger: #b42318;
    --auth-danger-bg: #fff1f0;
    --auth-success: #067647;
    --auth-success-bg: #ecfdf3;
    --auth-shadow: 0 26px 70px rgba(18, 54, 51, 0.16);
    --auth-radius: 8px;
    --auth-transition: 180ms ease;
    --auth-sans: "DM Sans", "Inter", "Segoe UI", Arial, sans-serif;
    --auth-serif: Georgia, "Times New Roman", serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body.auth-page {
    background:
        linear-gradient(120deg, rgba(0, 75, 79, 0.08), rgba(255, 255, 255, 0) 36%),
        linear-gradient(300deg, rgba(212, 175, 55, 0.12), rgba(255, 255, 255, 0) 42%),
        var(--auth-white);
    color: var(--auth-ink);
    font-family: var(--auth-sans);
    line-height: 1.5;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.auth-page::before {
    background-image:
        linear-gradient(rgba(0, 75, 79, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 75, 79, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    content: "";
    inset: 0;
    mask-image: linear-gradient(110deg, #000 0%, transparent 66%);
    opacity: 0.7;
    pointer-events: none;
    position: fixed;
}

body.auth-page::after {
    background:
        linear-gradient(115deg, rgba(242, 209, 107, 0.16), rgba(255, 255, 255, 0) 44%),
        linear-gradient(275deg, rgba(0, 107, 111, 0.13), rgba(255, 255, 255, 0) 52%);
    content: "";
    height: 100%;
    left: 0;
    opacity: 0.9;
    pointer-events: none;
    position: fixed;
    right: 0;
    top: 0;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: var(--auth-emerald);
    font-weight: 800;
    text-decoration: none;
    transition: color var(--auth-transition);
}

a:hover,
a:focus-visible {
    color: var(--auth-emerald-deep);
}

h1,
h2,
p {
    margin: 0;
}

h1,
h2 {
    color: var(--auth-emerald-deep);
    font-family: var(--auth-serif);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.06;
}

button,
input {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

.skip-link {
    background: var(--auth-emerald-deep);
    color: var(--auth-white);
    left: 16px;
    opacity: 0;
    padding: 10px 16px;
    pointer-events: none;
    position: fixed;
    top: 16px;
    transform: translateY(-130%);
    transition: opacity var(--auth-transition), transform var(--auth-transition);
    z-index: 20;
}

.skip-link:focus {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.auth-brand-panel {
    align-content: center;
    display: grid;
    gap: 24px;
    overflow: hidden;
    padding: clamp(40px, 7vw, 92px);
    position: relative;
}

.auth-brand-panel::before {
    background:
        linear-gradient(140deg, rgba(0, 75, 79, 0.94), rgba(0, 107, 111, 0.9)),
        linear-gradient(45deg, rgba(212, 175, 55, 0.26), transparent 46%);
    content: "";
    inset: 24px 0 24px 24px;
    position: absolute;
    z-index: -2;
}

.auth-brand-panel::after {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 52px 52px;
    content: "";
    inset: 24px 0 24px 24px;
    opacity: 0.55;
    position: absolute;
    z-index: -1;
}

.brand-mark {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(242, 209, 107, 0.42);
    border-radius: var(--auth-radius);
    box-shadow: 0 14px 36px rgba(0, 30, 32, 0.16);
    padding: 14px 16px;
    width: fit-content;
}

.brand-mark img,
.card-logo img {
    height: auto;
    width: auto;
}

.eyebrow {
    color: var(--auth-gold-light);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-brand-panel h1 {
    color: var(--auth-white);
    font-size: clamp(44px, 6.3vw, 82px);
    max-width: 760px;
}

.brand-copy {
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(17px, 1.7vw, 21px);
    max-width: 660px;
}

.journey-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.journey-list span {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--auth-radius);
    color: var(--auth-white);
    font-size: 13px;
    font-weight: 800;
    padding: 9px 12px;
}

.auth-card-section {
    align-items: center;
    display: flex;
    justify-content: center;
    padding: clamp(24px, 5vw, 56px);
}

.auth-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(0, 75, 79, 0.12);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
    max-width: 440px;
    padding: clamp(24px, 4vw, 38px);
    width: 100%;
}

.card-header {
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
}

.card-logo {
    display: inline-flex;
    margin-bottom: 10px;
    width: fit-content;
}

.card-header .eyebrow {
    color: var(--auth-emerald);
}

.card-header h2 {
    font-size: clamp(32px, 4vw, 44px);
}

.card-header p {
    color: var(--auth-muted);
    font-size: 16px;
}

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

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

.field label,
.checkbox-label {
    color: var(--auth-ink);
    font-size: 14px;
    font-weight: 800;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    background: var(--auth-white);
    border: 1px solid var(--auth-line);
    border-radius: var(--auth-radius);
    color: var(--auth-ink);
    min-height: 50px;
    outline: none;
    padding: 12px 14px;
    transition:
        border-color var(--auth-transition),
        box-shadow var(--auth-transition),
        background var(--auth-transition);
    width: 100%;
}

input:focus-visible {
    border-color: var(--auth-emerald);
    box-shadow: 0 0 0 4px rgba(0, 107, 111, 0.14);
}

.password-control {
    align-items: center;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.password-control input {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
    grid-column: 1 / 3;
    grid-row: 1;
    padding-right: 82px;
}

.password-toggle {
    align-self: stretch;
    background: var(--auth-surface-strong);
    border: 1px solid var(--auth-line);
    border-bottom-right-radius: var(--auth-radius);
    border-left: 0;
    border-top-right-radius: var(--auth-radius);
    color: var(--auth-emerald-deep);
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
    grid-column: 2;
    grid-row: 1;
    min-height: 50px;
    min-width: 70px;
    padding: 0 12px;
    transition:
        background var(--auth-transition),
        color var(--auth-transition);
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: var(--auth-emerald-deep);
    color: var(--auth-white);
    outline: none;
}

.form-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
}

.checkbox-label {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    gap: 9px;
}

.checkbox-label input {
    accent-color: var(--auth-emerald);
    height: 18px;
    width: 18px;
}

.submit-button {
    align-items: center;
    background: linear-gradient(135deg, var(--auth-emerald-deep), var(--auth-emerald));
    border: 0;
    border-radius: var(--auth-radius);
    color: var(--auth-white);
    cursor: pointer;
    display: inline-flex;
    font-weight: 900;
    gap: 10px;
    justify-content: center;
    min-height: 52px;
    padding: 13px 18px;
    position: relative;
    transition:
        box-shadow var(--auth-transition),
        transform var(--auth-transition),
        opacity var(--auth-transition);
}

.submit-button:hover,
.submit-button:focus-visible {
    box-shadow: 0 14px 30px rgba(0, 75, 79, 0.24);
    outline: none;
    transform: translateY(-1px);
}

.submit-button:disabled {
    cursor: not-allowed;
    opacity: 0.72;
    transform: none;
}

.button-loader {
    border: 2px solid rgba(255, 255, 255, 0.42);
    border-top-color: var(--auth-gold-light);
    border-radius: 50%;
    display: none;
    height: 17px;
    width: 17px;
}

.submit-button.is-loading .button-loader {
    animation: auth-spin 700ms linear infinite;
    display: inline-block;
}

.form-message {
    border-radius: var(--auth-radius);
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.form-message.is-error {
    background: var(--auth-danger-bg);
    border: 1px solid rgba(180, 35, 24, 0.18);
    color: var(--auth-danger);
}

.form-message.is-success {
    background: var(--auth-success-bg);
    border: 1px solid rgba(6, 118, 71, 0.18);
    color: var(--auth-success);
}

.auth-links {
    border-top: 1px solid var(--auth-line);
    display: grid;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    text-align: center;
}

.auth-links p {
    color: var(--auth-muted);
}

@keyframes auth-spin {
    to {
        transform: rotate(360deg);
    }
}

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

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

    .auth-brand-panel::before,
    .auth-brand-panel::after {
        inset: 0;
    }

    .auth-brand-panel h1 {
        font-size: clamp(34px, 11vw, 52px);
    }

    .auth-card-section {
        padding: 20px;
    }

    .auth-card {
        max-width: 620px;
    }
}

@media (max-width: 560px) {
    .brand-mark {
        padding: 10px 12px;
    }

    .brand-mark img {
        max-height: 44px;
    }

    .brand-copy {
        font-size: 16px;
    }

    .journey-list span {
        font-size: 12px;
        padding: 8px 10px;
    }

    .auth-card-section {
        padding: 16px;
    }

    .auth-card {
        padding: 22px 18px;
    }

    .form-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
