:root {
    --auth-ink: #09152b;
    --auth-muted: #64748b;
    --auth-line: #d8e1ee;
    --auth-soft: #f5f8fc;
    --auth-primary: #19b489;
    --auth-primary-dark: #0d906c;
}

* {
    box-sizing: border-box;
}

body.client-auth-page {
    margin: 0;
    min-height: 100vh;
    color: var(--auth-ink);
    background: #fff;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.client-auth-topbar {
    height: 88px;
    display: grid;
    grid-template-columns: minmax(210px, 1fr) auto;
    align-items: center;
    gap: 28px;
    padding: 0 36px;
    border-bottom: 1px solid #e8edf5;
    background: rgba(255, 255, 255, 0.96);
    position: relative;
    z-index: 3;
}

.client-auth-logo {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    color: var(--auth-ink);
    text-decoration: none;
    font-size: 32px;
    line-height: 1;
    letter-spacing: 0;
    font-weight: 900;
}

.client-auth-logo img {
    max-width: 168px;
    max-height: 38px;
    object-fit: contain;
    display: block;
}

.client-auth-nav {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 30px;
    color: #273244;
    font-size: 16px;
}

.client-auth-nav a {
    color: inherit;
    text-decoration: none;
}

.client-auth-nav .muted {
    color: var(--auth-muted);
}

.client-auth-shell {
    min-height: calc(100vh - 88px);
    display: grid;
    grid-template-columns: minmax(360px, 500px) minmax(0, 1fr);
}

.client-auth-form-panel {
    min-height: calc(100vh - 88px);
    display: flex;
    align-items: center;
    padding: 56px 88px;
    background: #fff;
}

.client-auth-form-wrap {
    width: min(100%, 320px);
}

.client-auth-tabs {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 22px;
    font-size: 25px;
    line-height: 1.1;
    font-weight: 800;
}

.client-auth-tabs a,
.client-auth-tabs span {
    color: #d1d5db;
    text-decoration: none;
}

.client-auth-tabs .active {
    color: var(--auth-ink);
}

.client-auth-error {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-left: 3px solid #e11d48;
    background: #fff1f2;
    color: #9f1239;
    font-size: 14px;
}

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

.client-auth-field {
    display: grid;
    gap: 6px;
}

.client-auth-field label {
    font-size: 14px;
    color: #111827;
}

.client-auth-field input {
    width: 100%;
    height: 35px;
    border: 0;
    border-bottom: 1px solid #c9ced6;
    border-radius: 0;
    background: transparent;
    color: var(--auth-ink);
    font: inherit;
    outline: 0;
    padding: 4px 0 8px;
}

.client-auth-field input:focus {
    border-color: var(--auth-primary);
}

.client-auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #1f2937;
    font-size: 14px;
}

.client-auth-remember input {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--auth-primary);
}

.client-auth-button {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 4px;
    background: var(--auth-primary);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.16s ease, transform 0.16s ease;
}

.client-auth-button:hover {
    background: var(--auth-primary-dark);
    transform: translateY(-1px);
}

.client-auth-help,
.client-auth-policy {
    color: #46566c;
    font-size: 13px;
    line-height: 1.55;
}

.client-auth-help {
    margin: 26px 0 0;
}

.client-auth-help a,
.client-auth-policy a {
    color: var(--auth-ink);
    text-decoration: none;
    font-weight: 700;
}

.client-auth-visual {
    min-height: calc(100vh - 88px);
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(6, 13, 28, 0.3), rgba(6, 13, 28, 0.08)),
        linear-gradient(135deg, #07152c 0%, #173b55 36%, #b31768 100%);
}

.client-auth-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(7, 12, 24, 0.28), rgba(7, 12, 24, 0)),
        var(--client-auth-image, url("/assets/client-auth-side.jpg"));
    background-size: cover;
    background-position: center;
}

.client-auth-visual-copy {
    position: absolute;
    left: 52px;
    bottom: 48px;
    width: min(420px, calc(100% - 104px));
    color: #fff;
    text-shadow: 0 1px 18px rgba(0, 0, 0, 0.32);
}

.client-auth-visual-copy h1 {
    margin: 0 0 10px;
    font-size: clamp(30px, 4vw, 54px);
    line-height: 1;
    letter-spacing: 0;
}

.client-auth-visual-copy p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 16px;
    line-height: 1.6;
}

@media (max-width: 980px) {
    .client-auth-topbar {
        grid-template-columns: 1fr auto;
        padding: 0 22px;
    }

    .client-auth-nav {
        gap: 16px;
        font-size: 14px;
    }

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

    .client-auth-form-panel {
        min-height: auto;
        padding: 46px 24px 40px;
        justify-content: center;
    }

    .client-auth-form-wrap {
        width: min(100%, 420px);
    }

    .client-auth-visual {
        min-height: 280px;
        order: -1;
    }
}

@media (max-width: 620px) {
    .client-auth-topbar {
        height: 72px;
        grid-template-columns: 1fr;
    }

    .client-auth-logo {
        font-size: 26px;
    }

    .client-auth-nav {
        display: none;
    }

    .client-auth-shell,
    .client-auth-form-panel,
    .client-auth-visual {
        min-height: auto;
    }

    .client-auth-visual {
        height: 220px;
    }

    .client-auth-visual-copy {
        left: 24px;
        bottom: 24px;
        width: calc(100% - 48px);
    }

    .client-auth-visual-copy h1 {
        font-size: 29px;
    }
}
