﻿.auth-page {
    --background: #0b1016;
    --surface: #121a24;
    --surface-soft: #182330;
    --border: #2b3948;
    --border-light: #3b4b5d;
    --text: #f3f6f9;
    --muted: #aeb9c5;
    --accent: #f0b44d;
    --accent-dark: #d99a30;
    --danger: #ff8585;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at 12% 12%, rgba(240, 180, 77, 0.09), transparent 28%), radial-gradient(circle at 88% 88%, rgba(67, 101, 135, 0.12), transparent 30%), linear-gradient(145deg, #0b1016 0%, #101822 100%);
    color: var(--text);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.auth-header {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 5vw;
    border-bottom: 1px solid rgba(174, 185, 197, 0.16);
    background: rgba(11, 16, 22, 0.9);
    backdrop-filter: blur(14px);
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--text);
    text-decoration: none;
}

.auth-brand-name {
    font-size: 1.3rem;
    font-weight: 750;
}

.home-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 700;
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

    .home-link:hover,
    .home-link:focus-visible {
        border-color: var(--accent);
        background: rgba(240, 180, 77, 0.06);
        color: var(--accent);
    }

.auth-main {
    width: min(100%, 680px);
    flex: 1;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 56px 20px 80px;
}

.auth-introduction {
    position: sticky;
    top: 110px;
    padding-top: 30px;
}

.auth-eyebrow,
.form-label {
    margin: 0 0 18px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-introduction h1 {
    margin: 0;
    font-size: clamp(3.2rem, 6vw, 5.5rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

    .auth-introduction h1 em {
        color: var(--accent);
        font-style: italic;
        font-weight: inherit;
    }

.auth-introduction > p:last-of-type {
    max-width: 600px;
    margin: 30px 0 0;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.75;
}

.auth-feature-list {
    display: grid;
    gap: 17px;
    margin-top: 42px;
}

    .auth-feature-list > div {
        display: grid;
        grid-template-columns: 46px 1fr;
        align-items: center;
        gap: 16px;
    }

    .auth-feature-list span {
        display: grid;
        place-items: center;
        width: 42px;
        height: 42px;
        border: 1px solid rgba(240, 180, 77, 0.36);
        border-radius: 12px;
        color: var(--accent);
        font-size: 0.75rem;
        font-weight: 850;
    }

    .auth-feature-list p {
        margin: 0;
        color: #d9e0e7;
        line-height: 1.5;
    }

.auth-card {
    width: min(100%, 560px);
    min-height: 560px;
    padding: clamp(30px, 4vw, 46px);
    border: 1px solid var(--border);
    border-radius: 26px;
    background: linear-gradient(145deg, rgba(24, 35, 48, 0.98), rgba(18, 26, 36, 0.98));
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.32);
}

.form-view {
    animation: form-enter 180ms ease-out;
}

@keyframes form-enter {
    from {
        opacity: 0;
        transform: translateY(7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-heading {
    margin-bottom: 32px;
}

    .form-heading h2 {
        margin: 0;
        font-size: clamp(2rem, 3vw, 2.8rem);
        line-height: 1.05;
        letter-spacing: -0.04em;
    }

    .form-heading > p:last-child {
        margin: 14px 0 0;
        color: var(--muted);
        line-height: 1.65;
    }

.field-group {
    display: grid;
    gap: 9px;
    margin-bottom: 21px;
}

    .field-group label {
        color: #e8edf2;
        font-size: 0.9rem;
        font-weight: 750;
    }

    .field-group small {
        color: #8795a4;
        font-size: 0.77rem;
        line-height: 1.5;
    }

    .field-group input,
    .field-group select {
        width: 100%;
        min-height: 50px;
        padding: 0 15px;
        border: 1px solid var(--border);
        border-radius: 11px;
        outline: none;
        background: #0d141d;
        color: var(--text);
        font-size: 0.96rem;
        transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
    }

        .field-group input::placeholder {
            color: #708090;
        }

    .field-group select {
        cursor: pointer;
    }

        .field-group select option {
            background: #101822;
            color: var(--text);
        }

        .field-group input:hover,
        .field-group select:hover {
            border-color: var(--border-light);
        }

        .field-group input:focus,
        .field-group select:focus {
            border-color: var(--accent);
            background: #101923;
            box-shadow: 0 0 0 3px rgba(240, 180, 77, 0.12);
        }

.password-field {
    position: relative;
}

    .password-field input {
        padding-right: 75px;
    }

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    min-width: 57px;
    min-height: 34px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.79rem;
    font-weight: 800;
    transform: translateY(-50%);
}

    .password-toggle:hover,
    .password-toggle:focus-visible {
        background: rgba(240, 180, 77, 0.1);
    }

.primary-button {
    width: 100%;
    min-height: 52px;
    margin-top: 8px;
    border: 1px solid var(--accent);
    border-radius: 11px;
    background: var(--accent);
    color: #17120a;
    cursor: pointer;
    font-weight: 850;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

    .primary-button:hover,
    .primary-button:focus-visible {
        border-color: var(--accent-dark);
        background: var(--accent-dark);
        transform: translateY(-1px);
        box-shadow: 0 12px 28px rgba(240, 180, 77, 0.14);
    }

    .primary-button:active {
        transform: translateY(0);
    }

.status-message {
    margin: 2px 0 18px;
    padding: 12px 14px;
    border: 1px solid rgba(240, 180, 77, 0.28);
    border-radius: 9px;
    background: rgba(240, 180, 77, 0.08);
    color: #e9c985;
    font-size: 0.84rem;
    line-height: 1.5;
}

    .status-message.status-error {
        border-color: rgba(255, 133, 133, 0.35);
        background: rgba(255, 133, 133, 0.08);
        color: #ff9a9a;
    }

button:disabled,
input:disabled,
select:disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

.form-links {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 13px;
    margin-top: 24px;
    color: var(--muted);
    font-size: 0.87rem;
}

    .form-links > :first-child {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .form-links span {
        justify-self: end;
    }

.centred-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

    .centred-links > :first-child {
        justify-self: auto;
    }

    .centred-links span {
        justify-self: auto;
    }

.text-button {
    padding: 3px 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: inherit;
    font-weight: 700;
    text-align: left;
}

    .text-button:hover,
    .text-button:focus-visible {
        color: var(--accent);
    }

.strong-link {
    color: var(--accent);
    font-weight: 850;
}

.recovery-question {
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: rgba(11, 16, 22, 0.48);
}

    .recovery-question span {
        color: var(--accent);
        font-size: 0.73rem;
        font-weight: 850;
        letter-spacing: 0.1em;
        text-transform: uppercase;
    }

    .recovery-question p {
        margin: 8px 0 0;
        color: #dce3ea;
        line-height: 1.55;
    }

.auth-footer {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 5vw;
    border-top: 1px solid rgba(174, 185, 197, 0.14);
    color: var(--muted);
    font-size: 0.84rem;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(240, 180, 77, 0.48);
    outline-offset: 4px;
}

@media (max-width: 940px) {
    .auth-main {
        width: min(680px, 90vw);
        padding-top: 44px;
    }

    .auth-introduction {
        position: static;
        padding-top: 5px;
        text-align: center;
    }

        .auth-introduction > p:last-of-type {
            margin-right: auto;
            margin-left: auto;
        }

    .auth-feature-list {
        width: min(520px, 100%);
        margin-right: auto;
        margin-left: auto;
        text-align: left;
    }

    .auth-card {
        min-height: auto;
    }
}

@media (max-width: 620px) {
    .auth-header {
        min-height: 68px;
        padding: 0 20px;
    }

    .auth-brand-name {
        font-size: 1.15rem;
    }

    .home-link {
        min-height: 40px;
        padding: 0 13px;
        font-size: 0.82rem;
    }

    .auth-main {
        width: calc(100% - 32px);
        padding: 28px 0 60px;
    }

    .auth-introduction h1 {
        font-size: clamp(3rem, 15vw, 4.4rem);
    }

    .auth-introduction > p:last-of-type {
        font-size: 1rem;
    }

    .auth-feature-list > div {
        grid-template-columns: 42px 1fr;
        gap: 13px;
    }

    .auth-card {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .form-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

        .form-links > :first-child {
            width: 100%;
            text-align: center;
        }

        .form-links span {
            justify-self: auto;
        }

    .auth-footer {
        min-height: 110px;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: 24px 20px;
    }
}

.dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 24px;
    overflow-y: auto;
    background: rgba(2, 5, 8, 0.82);
    backdrop-filter: blur(7px);
}

.status-dialog {
    width: min(100%, 540px);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 36px 34px 32px;
    border: 1px solid var(--accent);
    border-radius: 20px;
    background: linear-gradient( 145deg, rgba(20, 29, 39, 0.99), rgba(10, 15, 21, 0.99) );
    box-shadow: 0 36px 100px rgba(0, 0, 0, 0.64);
    animation: status-dialog-enter 180ms ease-out;
}

@keyframes status-dialog-enter {
    from {
        opacity: 0;
        transform: translateY(9px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.status-dialog-message {
    margin: 0;
    color: #f1f3f5;
    font-size: 1.22rem;
    font-weight: 400;
    line-height: 1.65;
    text-align: center;
}

.status-dialog-guidance {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

    .status-dialog-guidance p {
        margin: 0;
        padding: 14px 16px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: rgba(0, 0, 0, 0.25);
        color: #d1d7dd;
        font-size: 0.96rem;
        font-weight: 400;
        line-height: 1.62;
        text-align: center;
    }

.status-dialog-button {
    display: block;
    width: min(34%, 180px);
    min-width: 130px;
    min-height: 48px;
    margin: 36px auto 0;
    padding: 0 18px;
    border: 1px solid var(--accent);
    border-radius: 10px;
    background: var(--accent);
    color: #17120a;
    cursor: pointer;
    font-weight: 850;
}

.status-dialog-button:hover,
.status-dialog-button:focus-visible {
    border-color: var(--accent-dark);
    background: var(--accent-dark);
}

.licence-dialog {
    width: min(100%, 720px);
    height: min(650px, calc(100vh - 48px));
    display: flex;
    flex-direction: column;
    padding: 28px 30px 24px;
    border: 1px solid var(--accent);
    border-radius: 20px;
    background: linear-gradient( 145deg, rgba(20, 29, 39, 0.99), rgba(10, 15, 21, 0.99) );
    box-shadow: 0 36px 100px rgba(0, 0, 0, 0.64);
}

    .licence-dialog h2 {
        margin: 0;
        color: var(--text);
        font-size: 1.45rem;
        text-align: center;
    }

.licence-user {
    margin: 10px 0 16px;
    color: var(--muted);
    font-size: 0.88rem;
    text-align: center;
}

.licence-text {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: rgba(5, 9, 13, 0.58);
    color: #d7dde3;
    font-size: 0.88rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

    .licence-text p {
        margin: 0 0 15px;
    }

        .licence-text p:last-child {
            margin-bottom: 0;
        }

.licence-error {
    margin: 12px 0 0;
    color: var(--danger);
    font-size: 0.84rem;
    text-align: center;
}

.licence-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 20px;
}

    .licence-actions button {
        min-width: 130px;
        min-height: 46px;
        padding: 0 20px;
        border-radius: 10px;
        cursor: pointer;
        font-weight: 800;
    }

.licence-decline-button {
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--muted);
}

.licence-accept-button {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #17120a;
}

@media (max-width: 520px) {
    .dialog-backdrop {
        align-items: start;
        padding: 20px 16px;
    }

    .status-dialog {
        padding: 30px 20px 27px;
        border-radius: 17px;
    }

    .status-dialog-message {
        font-size: 1.12rem;
    }

    .status-dialog-button {
        width: min(50%, 170px);
    }
}
[hidden] {
    display: none !important;
}
:root {
    --background: #0b1016;
    --surface: #121a24;
    --surface-soft: #182330;
    --border: #2b3948;
    --border-light: #3b4b5d;
    --text: #f3f6f9;
    --muted: #aeb9c5;
    --accent: #f0b44d;
    --accent-dark: #d99a30;
    --danger: #ff8585;
}