*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --ink: #141820;
    --muted: #5a6570;
    --border: #c5c9d0;
    --border-strong: #8b929d;
    --paper: #fdfcfa;
    --paper-2: #f4f6f9;
    --accent: #1a3a52;
    --accent-soft: rgba(26, 58, 82, 0.08);
    --focus: #1a3a52;
    --err: #b00020;
    --ok: #1b5e20;
    --warn: #c66900;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 4px 24px rgba(20, 24, 32, 0.08);
    --shadow-sheet: 0 12px 40px rgba(20, 24, 32, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04);
    --font-serif: "Georgia", "Times New Roman", "Times", serif;
    --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

.page-registration {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-serif);
    font-size: 1.05rem;
    line-height: 1.62;
    color: var(--ink);
    background: linear-gradient(165deg, #e8ecf2 0%, #dfe5ee 45%, #d5dce8 100%);
    -webkit-font-smoothing: antialiased;
}

.sheet {
    max-width: 52rem;
    margin: 1.75rem auto 3.5rem;
    padding: 2.25rem 2.5rem 2.75rem;
    background: var(--paper);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-sheet);
}

.sheet__head {
    text-align: center;
    margin: -0.25rem -0.5rem 2rem;
    padding: 1.5rem 1.25rem 1.35rem;
    background: linear-gradient(180deg, var(--accent-soft) 0%, transparent 100%);
    border-radius: var(--radius-sm);
    border-bottom: 2px solid var(--accent);
}

.sheet__to {
    margin: 0 0 0.35rem;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

.sheet__to strong {
    font-weight: 700;
}

.sheet__title {
    margin: 0;
    font-size: clamp(1.35rem, 3.5vw, 1.65rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--ink);
}

.notice {
    padding: 1rem 1.15rem;
    margin-bottom: 1.35rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-ui);
    font-size: 0.92rem;
    line-height: 1.5;
    border: 1px solid transparent;
    box-shadow: var(--shadow);
}

.notice a {
    color: inherit;
    font-weight: 600;
    text-underline-offset: 2px;
}

.notice--ok {
    background: linear-gradient(135deg, #e8f5e9 0%, #e3f2e4 100%);
    color: var(--ok);
    border-color: #a5d6a7;
}

.notice--err {
    background: linear-gradient(135deg, #ffebee 0%, #fce4e4 100%);
    color: var(--err);
    border-color: #ef9a9a;
}

.notice--warn {
    background: linear-gradient(135deg, #fff8e1 0%, #fff3e0 100%);
    color: var(--warn);
    border-color: #ffcc80;
}

.appeal-form {
    text-align: justify;
}

.block {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    gap: 0.65rem 1.15rem;
    margin-bottom: 1.75rem;
    padding: 1.25rem 1.15rem 1.35rem;
    background: var(--paper-2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.block__label {
    margin: 0;
    padding-top: 0.15rem;
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.2;
}

.block__body {
    min-width: 0;
}

.row--top {
    margin: 0 0 1rem;
    line-height: 2.05;
}

.para {
    margin: 0 0 1.05rem;
    text-indent: 0;
}

.para:last-child {
    margin-bottom: 0;
}

.para strong {
    color: var(--accent);
    font-weight: 700;
}

.para--docs {
    margin-bottom: 0.65rem;
    font-weight: 600;
    font-family: var(--font-ui);
    font-size: 0.98rem;
    color: var(--ink);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.field {
    display: inline-block;
    vertical-align: baseline;
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.5rem;
    margin: 0 0.12rem;
    max-width: 100%;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background-color 0.15s ease;
}

.field:hover {
    border-color: var(--border-strong);
}

.field:focus {
    outline: none;
    border-color: var(--focus);
    box-shadow: 0 0 0 3px rgba(26, 58, 82, 0.2);
}

.field:focus-visible {
    outline: none;
    border-color: var(--focus);
    box-shadow: 0 0 0 3px rgba(26, 58, 82, 0.25);
}

.field::placeholder {
    color: #8a9099;
    font-style: italic;
}

select.field {
    cursor: pointer;
    appearance: auto;
    padding: 0.4rem 0.55rem;
    min-width: 7.5rem;
    font-family: var(--font-ui);
    font-size: 0.95rem;
}

select.field.field--select-relation {
    min-width: 11.75rem;
    max-width: 100%;
}

select.field.field--err {
    color: var(--ink);
}

.field--err {
    border-color: var(--err);
    background: #fff8f8;
}

.field--err:focus,
.field--err:focus-visible {
    box-shadow: 0 0 0 3px rgba(176, 0, 32, 0.18);
}

.field--xs {
    width: 3.35rem;
    text-align: center;
}

.field--sm {
    width: 6rem;
}

.field--md {
    width: 9.25rem;
}

.field--lg {
    width: 14rem;
}

.field--date {
    width: 10.75rem;
    font-family: var(--font-ui);
    font-size: 0.95rem;
}

.field--wide {
    width: min(100%, 23rem);
}

.dotted-fields {
    list-style: none;
    margin: 0 0 1.35rem;
    padding: 1rem 1.1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-ui);
    font-size: 0.95rem;
}

.dotted-fields li {
    display: flex;
    align-items: flex-end;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.dotted-fields li:last-child {
    margin-bottom: 0;
}

.dotted-fields label {
    flex: 0 0 auto;
    min-width: 7.75rem;
    color: var(--ink);
    font-weight: 500;
}

.dotted {
    flex: 1;
    min-width: 0;
    font: inherit;
    border: none;
    border-bottom: 2px dotted var(--border-strong);
    border-radius: 0;
    padding: 0.3rem 0;
    background: transparent;
    color: var(--ink);
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.dotted:hover {
    border-bottom-color: var(--accent);
}

.dotted:focus {
    outline: none;
    border-bottom-style: solid;
    border-bottom-color: var(--accent);
    box-shadow: 0 1px 0 0 var(--accent);
}

.dotted:focus-visible {
    outline: none;
    border-bottom-style: solid;
    border-bottom-color: var(--accent);
}

.address {
    margin: 1.5rem 0 0;
    padding: 1rem 1.15rem;
    background: linear-gradient(135deg, #f0f3f7 0%, #e8ecf2 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--accent);
    font-size: 0.9rem;
    font-family: var(--font-ui);
    line-height: 1.55;
    text-align: left;
    color: var(--ink);
    letter-spacing: 0.02em;
}

.address strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: center;
    align-items: center;
    margin-top: 2.25rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.btn {
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.72rem 1.65rem;
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(26, 58, 82, 0.28);
    transition:
        background 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.1s ease;
}

.btn:hover {
    background: #234a66;
    box-shadow: 0 4px 14px rgba(26, 58, 82, 0.35);
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 4px rgba(26, 58, 82, 0.25);
}

.btn:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px #fff,
        0 0 0 6px rgba(26, 58, 82, 0.45);
}

a.btn {
    text-decoration: none;
    display: inline-block;
}

.btn--ghost {
    color: var(--accent);
    background: #fff;
    border: 2px solid var(--accent);
    box-shadow: none;
}

.btn--ghost:hover {
    background: var(--accent-soft);
    box-shadow: none;
}

.btn--ghost:focus-visible {
    box-shadow:
        0 0 0 3px #fff,
        0 0 0 6px rgba(26, 58, 82, 0.35);
}

@media (max-width: 640px) {
    .sheet {
        margin: 0;
        padding: 1.35rem 1.1rem 2rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-shadow: none;
    }

    .sheet__head {
        margin-left: 0;
        margin-right: 0;
    }

    .block {
        grid-template-columns: 2rem 1fr;
        padding: 1rem 0.9rem;
    }

    .field--lg,
    .field--md,
    .field--wide,
    select.field {
        width: 100%;
        margin: 0.28rem 0;
        display: block;
    }

    .row--top {
        line-height: 1.65;
    }

    .appeal-form {
        text-align: left;
    }
}

@media print {
    .page-registration {
        background: #fff;
    }

    .sheet {
        box-shadow: none;
        border: none;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .actions {
        display: none;
    }

    .block {
        break-inside: avoid;
        box-shadow: none;
    }
}
