@page {
            size: A4 portrait;
            margin: 0;
        }

        :root {
            --canvas: #e7eaee;
            --paper: #ffffff;
            --ink: #000000;
            --muted: #222222;
            --line: #000000;
            --placeholder: #8d96a3;
            --shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
            font-family: Arial, Helvetica, sans-serif;
        }

        * {
            box-sizing: border-box;
        }

        html,
        body {
            margin: 0;
            min-height: 100%;
            color: var(--ink);
            background: var(--canvas);
            font-family: Arial, Helvetica, sans-serif;
        }

        body {
            padding: 18px;
        }

        .document {
            display: grid;
            gap: 18px;
            justify-content: center;
        }

        .a4-page {
            position: relative;
            width: 210mm;
            min-height: 297mm;
            padding: 18mm 18mm 22mm;
            background: var(--paper);
            box-shadow: var(--shadow);
        }

        .doc-header {
            display: grid;
            grid-template-columns: 1fr auto;
            align-items: start;
            gap: 14mm;
            margin-bottom: 6mm;
        }

        h1 {
            margin: 0;
            color: var(--ink);
            font-size: 25px;
            line-height: 1.05;
            font-weight: 800;
            letter-spacing: 0;
        }

        .subtitle {
            margin: 1mm 0 0;
            color: var(--ink);
            font-size: 14.8px;
            line-height: 1.25;
            white-space: nowrap;
        }

        .reference-line {
            margin-top: 2.8mm;
            white-space: nowrap;
            color: var(--ink);
            font-size: 12px;
            line-height: 1.25;
            font-weight: 800;
        }

        .section-title {
            margin: 4mm 0 5mm;
            padding-bottom: 1.5mm;
            border-bottom: 1.5px solid var(--line);
            color: var(--ink);
            font-size: 21px;
            line-height: 1.05;
            font-weight: 800;
        }

        .data-table {
            width: 100%;
            border-collapse: collapse;
            table-layout: fixed;
            margin-bottom: 4mm;
        }

        .data-table th,
        .data-table td {
            min-height: 10.5mm;
            border: 1px solid var(--line);
            padding: 0;
            vertical-align: middle;
        }

        .data-table th {
            width: 37%;
            padding: 3mm 3mm;
            text-align: left;
            color: var(--ink);
            background: #ffffff;
            font-size: 14px;
            line-height: 1.2;
            font-weight: 800;
        }

        .data-table td {
            width: 63%;
        }

        input,
        select,
        textarea {
            display: block;
            width: 100%;
            min-height: 10.3mm;
            margin: 0;
            border: 0;
            border-radius: 0;
            padding: 2.2mm 3mm;
            color: var(--ink);
            background: transparent;
            font: 15px/1.22 Arial, Helvetica, sans-serif;
            outline: none;
            appearance: auto;
        }

        textarea {
            min-height: 13.5mm;
            resize: vertical;
            overflow: hidden;
        }

        input::placeholder,
        textarea::placeholder {
            color: var(--placeholder);
            opacity: 1;
        }

        input:focus,
        select:focus,
        textarea:focus {
            box-shadow: inset 0 0 0 2px #6d8eb6;
        }

        input[readonly] {
            color: var(--ink);
            background: #fafafa;
        }

        .phone-field {
            display: block;
            min-height: 10.3mm;
        }

        .phone-field input {
            min-height: 10.3mm;
        }

        .hint {
            display: block;
            padding: 0 3mm 2mm;
            color: #5f6670;
            font-size: 10px;
            line-height: 1.2;
        }

        .checkbox-value {
            display: flex;
            align-items: center;
            min-height: 10.3mm;
            padding: 2.2mm 3mm;
            gap: 3mm;
            font-size: 15px;
        }

        .checkbox-value input {
            width: 4.2mm;
            height: 4.2mm;
            min-height: 0;
            padding: 0;
            accent-color: #111111;
        }

        .checkbox-print-text {
            color: var(--ink);
        }

        .declaration-text {
            min-height: 18mm;
            padding: 3mm;
            color: var(--ink);
            font-size: 15px;
            line-height: 1.32;
        }

        .signature-cell {
            min-height: 10.3mm;
            padding: 3mm;
            color: var(--ink);
            font-size: 15px;
            line-height: 1.2;
        }

        .page-footer {
            position: absolute;
            right: 18mm;
            bottom: 12mm;
            left: 18mm;
            display: flex;
            justify-content: space-between;
            color: var(--ink);
            font-size: 12px;
            line-height: 1.2;
        }

        .toolbar {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin: 18px auto 0;
        }

        .toolbar button {
            min-height: 38px;
            border: 1px solid #939ba5;
            border-radius: 4px;
            padding: 0 16px;
            color: #1f2833;
            background: #ffffff;
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
        }

        .toolbar .primary {
            border-color: #111111;
            color: #ffffff;
            background: #111111;
        }

        .hidden {
            display: none !important;
        }

        @media (max-width: 900px) {
            body {
                padding: 10px;
            }

            .a4-page {
                width: 100%;
                min-height: auto;
                padding: 18px;
            }

            .doc-header {
                grid-template-columns: 1fr;
                gap: 4px;
            }

            .subtitle {
                font-size: clamp(10px, 3.1vw, 14.8px);
            }

            .reference-line {
                white-space: normal;
            }

            .page-footer {
                position: static;
                margin-top: 18px;
            }
        }

        @media print {
            html,
            body {
                width: 210mm;
                min-height: 297mm;
                padding: 0;
                background: #ffffff;
            }

            .document {
                display: block;
            }

            .a4-page {
                width: 210mm;
                height: 297mm;
                min-height: 297mm;
                margin: 0;
                padding: 18mm 18mm 22mm;
                box-shadow: none;
                page-break-after: always;
                overflow: hidden;
            }

            .a4-page:last-child {
                page-break-after: auto;
            }

            .toolbar {
                display: none !important;
            }

            input,
            select,
            textarea {
                color: #000000;
                background: transparent;
                -webkit-print-color-adjust: exact;
                print-color-adjust: exact;
            }

            input::placeholder,
            textarea::placeholder {
                color: transparent;
            }

            .hint {
                display: none;
            }

            .data-table,
            .doc-header,
            .section-title {
                break-inside: avoid;
            }
        }
