.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.95fr);
    gap: 24px;
    min-height: 100vh;
    padding: 28px;
}

.brand-panel,
.login-panel {
    position: relative;
    min-height: calc(100vh - 56px);
    border: 1px solid rgba(232, 224, 212, 0.9);
}

.login-panel {
    overflow: hidden;
}

.brand-panel {
    display: grid;
    place-items: center;
    padding: 34px;
    background:
        radial-gradient(circle at 70% 24%, rgba(240, 213, 201, 0.62), transparent 32%),
        linear-gradient(152deg, rgba(255, 253, 248, 0.96), rgba(243, 237, 226, 0.92)),
        var(--color-panel);
    box-shadow: var(--shadow-soft);
}

.brand-panel::before,
.brand-panel::after {
    position: absolute;
    content: "";
    pointer-events: none;
}

.brand-panel::before {
    inset: 18% auto auto 50%;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(31, 79, 70, 0.12);
    background: rgba(216, 232, 224, 0.42);
    transform: rotate(-18deg);
}

.brand-panel::after {
    inset: auto -80px -110px auto;
    width: 360px;
    height: 250px;
    border: 1px solid rgba(181, 83, 54, 0.13);
    background: rgba(245, 230, 213, 0.7);
}

.login-panel {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    padding: 46px clamp(30px, 5vw, 72px);
    background:
        linear-gradient(180deg, rgba(255, 253, 248, 0.95), rgba(250, 247, 241, 0.9)),
        var(--color-page);
}

.login-panel::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 7px;
    background: linear-gradient(180deg, var(--color-primary), var(--color-accent), #d9a441);
    content: "";
}

.brand-mark {
    position: relative;
    z-index: 1;
    display: block;
    width: min(100%, 460px);
    padding: 0 24px;
    color: var(--color-text);
    text-align: center;
}

.brand-name {
    font-size: clamp(56px, 7vw, 92px);
    line-height: 0.88;
}

.form-heading {
    width: min(100%, 430px);
    margin: 0 0 34px;
}

.form-heading h2 {
    margin: 0;
    color: var(--color-text);
    font-family: var(--font-serif);
    font-size: 56px;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 0.98;
}

.login-form {
    display: grid;
    gap: 20px;
    width: min(100%, 430px);
}

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

label {
    color: var(--color-text);
    font-size: 14px;
    font-weight: 800;
}

input[type="text"] {
    width: 100%;
    min-height: 54px;
    border: 1px solid var(--color-line);
    color: var(--color-text);
    background: rgba(255, 253, 248, 0.86);
    padding: 0 16px;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input::placeholder {
    color: #a69d92;
}

input:hover {
    border-color: #d8cbbd;
    background: #ffffff;
}

input:focus {
    border-color: var(--color-focus);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(63, 127, 114, 0.12);
    outline: none;
}

.captcha-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: 10px;
}

.captcha-button {
    display: block;
    overflow: hidden;
    width: 160px;
    height: 54px;
    border: 1px solid var(--color-line);
    background: #fffdf8;
    padding: 0;
    transition: border-color 160ms ease, transform 160ms ease;
}

.captcha-button:hover {
    border-color: #d8cbbd;
    transform: translateY(-1px);
}

.captcha-button img {
    display: block;
    width: 160px;
    height: 54px;
}

.submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 54px;
    margin-top: 4px;
    border: 1px solid var(--color-primary);
    color: #fffdf8;
    background: var(--color-primary);
    font-weight: 800;
    transition: transform 160ms ease, background 160ms ease;
}

.submit-button:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
}

.submit-button:disabled {
    opacity: 0.76;
    transform: none;
}

.field-error,
.form-status {
    min-height: 20px;
    color: #a13d29;
    font-size: 13px;
    font-weight: 700;
}

.form-status {
    margin: -2px 0 0;
}

.form-status.success {
    color: var(--color-primary);
}

.field-group.invalid input {
    border-color: #bc5c45;
    box-shadow: 0 0 0 4px rgba(181, 83, 54, 0.12);
}

@media (max-width: 960px) {
    .login-shell {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 18px;
    }

    .brand-panel,
    .login-panel {
        min-height: auto;
    }

    .brand-name {
        font-size: clamp(54px, 13vw, 82px);
    }
}

@media (max-width: 520px) {
    .login-shell {
        padding: 12px;
    }

    .brand-panel {
        padding: 24px;
    }

    .brand-name {
        font-size: clamp(46px, 14vw, 64px);
    }

    .login-panel {
        padding: 28px 20px;
    }

    .form-heading h2 {
        font-size: 46px;
    }

    .captcha-row {
        grid-template-columns: 1fr;
    }

    .captcha-button,
    .captcha-button img {
        width: 100%;
    }
}
