:root {
    color-scheme: dark;
    --auth-font: "Exo 2", "Segoe UI", sans-serif;
    --auth-display-font: "Saira Semi Condensed", "Exo 2", "Segoe UI", sans-serif;
    --auth-surface: linear-gradient(180deg, rgba(24, 26, 31, 0.98), rgba(20, 22, 27, 0.98));
    --auth-surface-soft: rgba(23, 25, 31, 0.96);
    --auth-line: rgba(255, 255, 255, 0.08);
    --auth-text: #ffffff;
    --auth-muted: rgba(255, 255, 255, 0.7);
    --auth-soft: rgba(255, 255, 255, 0.48);
    --auth-accent: #e28443;
    --auth-accent-strong: #ffb16a;
    --auth-accent-soft: rgba(226, 132, 67, 0.14);
    --auth-shadow: 0 28px 68px rgba(0, 0, 0, 0.32);
    --auth-input-bg: #20232b;
    --auth-input-text: #ffffff;
    --auth-input-placeholder: rgba(255, 255, 255, 0.32);
    --auth-input-focus: rgba(226, 132, 67, 0.12);
    --auth-overlay: rgba(5, 6, 10, 0.72);
}

.auth-page-main--experience {
    padding: 42px 0 84px;
    font-family: var(--auth-font);
}

.auth-shell {
    max-width: 1080px;
    margin: 0 auto;
    padding: 34px;
    border-radius: 28px;
    border: 1px solid var(--auth-line);
    background: var(--auth-surface);
    box-shadow: var(--auth-shadow);
    backdrop-filter: blur(12px);
}

.auth-shell-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
}

.auth-shell-brand {
    display: grid;
    gap: 0;
}

.auth-brand-mark {
    margin: 0;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.16em;
    color: #fff3ea;
    font-family: var(--auth-display-font);
    font-size: clamp(2.4rem, 3vw + 1rem, 3.9rem);
    font-weight: 800;
    line-height: 0.92;
    letter-spacing: 0.02em;
    text-shadow: 0 0 16px rgba(255, 177, 106, 0.12);
}

.auth-brand-mark--compact {
    margin-bottom: 8px;
    font-size: clamp(1.9rem, 2.2vw + 0.7rem, 2.8rem);
}

.auth-brand-mark__base {
    color: #fff7f0;
}

.auth-brand-mark__accent {
    background: linear-gradient(180deg, #fff0e1 0%, #ffbf88 42%, #e28443 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 14px rgba(226, 132, 67, 0.28));
}

.auth-shell-title,
.auth-card-title {
    margin: 0;
    color: var(--auth-text);
    font-family: var(--auth-display-font);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: 0.06em;
}

.auth-shell-title {
    font-size: clamp(1.6rem, 1.5vw + 1rem, 2.2rem);
    text-transform: uppercase;
    color: rgba(255, 234, 219, 0.82);
}

.auth-card-title {
    font-size: clamp(1.22rem, 1vw + 0.9rem, 1.7rem);
    text-transform: uppercase;
}

.auth-view-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    border: 1px solid var(--auth-line);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.auth-view-switch__button {
    min-height: 40px;
    padding: 0 18px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 232, 213, 0.78);
    font-family: var(--auth-display-font);
    font-size: 0.96rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-view-switch__button:hover,
.auth-view-switch__button:focus-visible {
    color: var(--auth-text);
}

.auth-view-switch__button.is-active {
    background: linear-gradient(180deg, rgba(243, 162, 95, 0.22), rgba(216, 116, 49, 0.14));
    color: #fff3e8;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.18);
}

.auth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
}

.auth-card {
    min-width: 0;
    position: relative;
    padding: 28px 26px 24px;
    border-radius: 24px;
    border: 1px solid var(--auth-line);
    background:
        radial-gradient(circle at bottom right, rgba(226, 132, 67, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
        var(--auth-surface-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-card.is-active {
    border-color: rgba(255, 177, 106, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.02),
        0 18px 42px rgba(0, 0, 0, 0.16);
}

.auth-card-head {
    margin-bottom: 20px;
}

.auth-card-head--modal {
    margin-bottom: 18px;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.auth-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.auth-field {
    display: grid;
    gap: 8px;
}

.auth-field label {
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--auth-display-font);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.auth-input-shell {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 54px;
    border-radius: 18px;
    border: 1px solid var(--auth-line);
    background: var(--auth-input-bg);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 10px 24px rgba(0, 0, 0, 0.12);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.auth-input-shell:focus-within {
    border-color: rgba(255, 177, 106, 0.36);
    box-shadow:
        0 0 0 4px var(--auth-input-focus),
        0 14px 28px rgba(0, 0, 0, 0.18);
    transform: translateY(-1px);
}

.auth-input-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    flex: 0 0 48px;
    color: rgba(255, 196, 149, 0.82);
    font-size: 0.98rem;
}

.auth-input-shell input {
    width: 100%;
    min-width: 0;
    min-height: 52px;
    padding: 0 14px 0 0;
    border: none;
    outline: none;
    background: transparent;
    color: var(--auth-input-text);
    font-family: var(--auth-font);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    appearance: none;
    -webkit-appearance: none;
}

.auth-input-shell input::placeholder {
    color: var(--auth-input-placeholder);
    font-weight: 500;
}

.auth-input-shell input:-webkit-autofill,
.auth-input-shell input:-webkit-autofill:hover,
.auth-input-shell input:-webkit-autofill:focus,
.auth-input-shell input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--auth-input-text);
    -webkit-box-shadow: 0 0 0 1000px var(--auth-input-bg) inset;
    box-shadow: 0 0 0 1000px var(--auth-input-bg) inset;
    caret-color: var(--auth-input-text);
    transition: background-color 9999s ease-in-out 0s;
}

.auth-input-shell--password input {
    padding-right: 2px;
}

.auth-password-toggle {
    width: 44px;
    height: 44px;
    margin-right: 5px;
    border: none;
    border-radius: 14px;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    color: var(--auth-text);
    transform: translateY(-1px);
}

.auth-password-toggle.is-active {
    color: #ffd9bd;
}

.auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.auth-actions--login {
    margin-top: 2px;
}

.auth-button {
    min-height: 52px;
    padding: 0 20px;
    border-radius: 16px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--auth-display-font);
    font-size: 0.96rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.auth-button:hover,
.auth-button:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

.auth-button--primary {
    background: linear-gradient(180deg, #f3a25f 0%, #d87431 100%);
    color: #1a0f08;
    box-shadow: 0 18px 34px rgba(226, 132, 67, 0.2);
}

.auth-button--ghost {
    border-color: var(--auth-line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--auth-text);
}

.auth-button--full {
    width: 100%;
}

.auth-status[hidden],
.auth-flow-overlay[hidden],
.auth-reset-block[hidden] {
    display: none !important;
}

.auth-status {
    min-height: 22px;
    margin: 0;
    color: var(--auth-muted);
    font-family: var(--auth-font);
    font-size: 0.88rem;
    line-height: 1.7;
}

.auth-status.is-success {
    color: #8dd7b4;
}

.auth-status.is-error {
    color: #ff9999;
}

.auth-links-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.auth-links-row--secondary {
    margin-top: 14px;
}

.auth-links-separator {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.26);
}

.auth-text-link {
    padding: 0;
    border: none;
    background: transparent;
    color: #ffd1af;
    font-family: var(--auth-display-font);
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.auth-text-link:hover,
.auth-text-link:focus-visible {
    color: var(--auth-accent-strong);
}

.auth-flow-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-flow-backdrop {
    position: absolute;
    inset: 0;
    border: none;
    background: var(--auth-overlay);
    backdrop-filter: blur(12px);
}

.auth-flow-dialog {
    position: relative;
    width: min(100%, 620px);
    max-height: min(calc(100vh - 48px), 880px);
    padding: 28px;
    border-radius: 28px;
    border: 1px solid var(--auth-line);
    background: var(--auth-surface);
    box-shadow: var(--auth-shadow);
    overflow: auto;
}

.auth-flow-shell {
    display: grid;
    gap: 10px;
}

.auth-flow-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--auth-line);
    border-radius: 14px;
    background: transparent;
    color: var(--auth-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.auth-flow-close:hover,
.auth-flow-close:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    color: #ffd1af;
    transform: translateY(-1px);
}

.auth-stage-panel {
    display: none;
}

.auth-stage-panel.is-active {
    display: block;
    animation: authStageIn 0.2s ease;
}

.auth-highlight-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding: 18px 20px;
    border-radius: 20px;
    border: 1px solid var(--auth-line);
    background: rgba(255, 255, 255, 0.04);
}

.auth-highlight-card--subtle {
    background: rgba(255, 255, 255, 0.03);
}

.auth-highlight-card__label {
    display: block;
    margin-bottom: 6px;
    color: var(--auth-soft);
    font-family: var(--auth-display-font);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-highlight-card strong {
    display: block;
    color: var(--auth-text);
    font-family: var(--auth-display-font);
    font-size: 0.96rem;
    font-weight: 700;
    word-break: break-word;
}

.auth-highlight-card__meta {
    color: #ffd7ba;
    font-family: var(--auth-display-font);
    font-size: 0.86rem;
    text-align: right;
}

.auth-reset-block {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

body.auth-flow-open {
    overflow: hidden;
}

@keyframes authStageIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 991.98px) {
    .auth-shell {
        padding: 26px 20px;
        border-radius: 24px;
    }

    .auth-shell-head {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 24px;
    }

    .auth-view-switch {
        width: 100%;
        justify-content: stretch;
    }

    .auth-view-switch__button {
        flex: 1 1 0;
    }

    .auth-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .auth-card {
        display: none;
    }

    .auth-card.is-active {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .auth-page-main--experience {
        padding: 28px 0 48px;
    }

    .auth-shell {
        padding: 18px 14px;
        border-radius: 20px;
    }

    .auth-card,
    .auth-flow-dialog {
        padding: 20px 16px;
        border-radius: 20px;
    }

    .auth-shell-title {
        font-size: 1.74rem;
    }

    .auth-brand-mark {
        font-size: 2rem;
    }

    .auth-form-grid {
        grid-template-columns: 1fr;
    }

    .auth-actions,
    .auth-highlight-card,
    .auth-links-row {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-button,
    .auth-text-link {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .auth-highlight-card__meta {
        text-align: left;
    }

    .auth-flow-overlay {
        padding: 12px;
    }
}
