:root {
    --bg: #f6f7f5;
    --surface: rgba(255, 255, 255, 0.86);
    --surface-strong: #ffffff;
    --text: #101214;
    --muted: #6f7782;
    --line: rgba(16, 18, 20, 0.08);
    --kiwi: #8bc34a;
    --kiwi-dark: #6da530;
    --kiwi-soft: rgba(139, 195, 74, 0.1);
    --red: #d94a4a;
    --red-soft: rgba(217, 74, 74, 0.08);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 20px;
    --radius-sm: 16px;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.07);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
            radial-gradient(circle at top left, rgba(139, 195, 74, 0.14), transparent 24%),
            radial-gradient(circle at top center, rgba(139, 195, 74, 0.08), transparent 28%),
            var(--bg);
}

body.auth-page {
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-shell {
    width: 100%;
    max-width: 1040px;
    display: grid;
    grid-template-columns: 1.02fr 0.98fr;
    gap: 22px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.brand-panel {
    min-height: 760px;
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--kiwi), #b7ea7b);
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
}

.brand-name {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-content {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 18px;
}

.brand-icon-wrap {
    width: 96px;
    height: 96px;
    border-radius: 28px;
    display: grid;
    place-items: center;
    background: var(--kiwi-soft);
    border: 1px solid rgba(139, 195, 74, 0.12);
}

.brand-icon {
    font-size: 2rem;
}

.brand-copy h1 {
    margin: 0;
    font-size: clamp(2.4rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-copy p {
    margin: 10px 0 0;
    max-width: 360px;
    color: var(--muted);
    line-height: 1.6;
}

.bottom-info {
    display: grid;
    gap: 10px;
    text-align: center;
}

.bottom-info p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.divider {
    height: 1px;
    background: var(--line);
    margin-bottom: 6px;
}

.form-panel {
    min-height: 760px;
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-card {
    width: 100%;
    max-width: 420px;
}

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

.step-block {
    display: grid;
    gap: 16px;
}

.field-block {
    display: grid;
    gap: 10px;
}

.field-block label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--muted);
}

.input-shell {
    height: 62px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border-radius: 20px;
    background: rgba(245, 246, 247, 0.95);
    border: 1px solid rgba(16, 18, 20, 0.06);
}

.input-shell:focus-within {
    border-color: rgba(139, 195, 74, 0.75);
    box-shadow: 0 0 0 4px rgba(139, 195, 74, 0.12);
}

.input-icon {
    width: 18px;
    text-align: center;
    opacity: 0.7;
}

.input-shell input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 1rem;
    color: var(--text);
}

.input-action {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-weight: 700;
    cursor: pointer;
}

.confirmed-email {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px;
}

.confirmed-icon {
    color: var(--kiwi-dark);
    font-weight: 800;
}

.confirmed-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--kiwi-dark);
}

.confirmed-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    word-break: break-word;
}

.code-boxes {
    display: grid;
    gap: 10px;
    cursor: text;
}

.code-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.code-cell {
    height: 58px;
    border-radius: 16px;
    background: rgba(245, 246, 247, 0.95);
    border: 1px solid rgba(16, 18, 20, 0.06);
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    font-weight: 800;
}

.code-cell.filled {
    border-color: rgba(139, 195, 74, 0.24);
}

.code-cell.active {
    border-color: rgba(139, 195, 74, 0.9);
    box-shadow: 0 0 0 3px rgba(139, 195, 74, 0.1);
}

.field-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.primary-button {
    height: 58px;
    border: 0;
    border-radius: 18px;
    background: var(--kiwi);
    color: white;
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
}

.primary-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.secondary-actions {
    display: grid;
    gap: 10px;
    justify-items: center;
}

.text-button {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
}

.text-button.kiwi {
    color: var(--kiwi-dark);
}

.text-button.muted {
    color: var(--muted);
}

.register-row {
    display: flex;
    justify-content: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--muted);
}

.register-row a {
    color: var(--kiwi-dark);
    font-weight: 700;
    text-decoration: none;
}

.error-box {
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--red-soft);
    border: 1px solid rgba(217, 74, 74, 0.12);
    color: var(--red);
    font-size: 0.9rem;
    line-height: 1.5;
}

.sr-only-input {
    position: absolute;
    opacity: 0.01;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.hidden {
    display: none !important;
}

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

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

@media (max-width: 640px) {
    body.auth-page {
        padding: 14px;
    }

    .brand-panel,
    .form-panel {
        padding: 20px;
    }

    .brand-copy h1 {
        font-size: 2.2rem;
    }
}