* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #eef2f6;
    color: #17202a;
    font-family: Arial, Helvetica, sans-serif;
}

.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.form-panel {
    width: min(100%, 720px);
    background: #ffffff;
    border: 1px solid #d6dde6;
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(23, 32, 42, 0.08);
    padding: 32px;
}

h1 {
    margin: 0 0 24px;
    font-size: 28px;
    line-height: 1.2;
}

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

.field,
.message {
    display: grid;
    gap: 8px;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

label {
    font-weight: 700;
    font-size: 15px;
}

.required {
    color: #b42318;
}

input,
textarea {
    width: 100%;
    border: 1px solid #bac5d3;
    border-radius: 6px;
    color: #17202a;
    background: #ffffff;
    font: inherit;
    font-size: 18px;
    padding: 14px 16px;
}

input:focus,
textarea:focus {
    border-color: #1b6ac9;
    box-shadow: 0 0 0 3px rgba(27, 106, 201, 0.16);
    outline: none;
}

textarea {
    resize: vertical;
}

button,
.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 48px;
    border: 0;
    border-radius: 6px;
    background: #1b6ac9;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    padding: 0 22px;
}

button:hover,
.back-link:hover {
    background: #1557a6;
}

.message {
    border-left: 4px solid #697586;
    background: #f8fafc;
    padding: 20px;
}

.message h1 {
    margin-bottom: 6px;
}

.message p {
    margin: 0 0 10px;
}

.message.success {
    border-left-color: #16803c;
}

.message.error {
    border-left-color: #b42318;
}

pre {
    overflow-x: auto;
    white-space: pre-wrap;
    border: 1px solid #d6dde6;
    border-radius: 6px;
    background: #ffffff;
    padding: 14px;
}

@media (max-width: 640px) {
    .page {
        align-items: flex-start;
    }

    .form-panel {
        padding: 22px;
    }

    .field-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 24px;
    }

    button,
    .back-link {
        width: 100%;
    }
}

