* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 10px;
  font-family: Arial, sans-serif;
  background: #f3f4f6;
  color: #111;
}

.form-sheet {
  max-width: 1000px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #222;
  padding: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  flex-shrink: 0;
}

.header-text {
  flex: 1;
  text-align: center;
}

.header-text h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.header-text h2 {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: normal;
  line-height: 1.2;
}

.top-fields {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.left-fields,
.right-fields {
  flex: 1;
}

label {
  display: block;
  font-weight: bold;
  margin: 8px 0 6px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  font-size: 16px;
  border: 1px solid #999;
  border-radius: 6px;
  background: #fff;
  color: #111;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #1d4ed8;
  outline-offset: 1px;
  border-color: #1d4ed8;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-top: 10px;
  background: #fff;
}

th,
td {
  border: 1px solid #333;
  padding: 6px;
  vertical-align: middle;
}

th {
  background: #f0f0f0;
  text-align: left;
  font-size: 14px;
}

td {
  font-size: 14px;
}

th:nth-child(1),
td:nth-child(1) {
  width: 30%;
}

th:nth-child(2),
td:nth-child(2) {
  width: 11%;
  text-align: center;
}

th:nth-child(3),
td:nth-child(3) {
  width: 18%;
  text-align: center;
}

th:nth-child(4),
td:nth-child(4) {
  width: 41%;
}

td.center {
  text-align: center;
}

td input[type="text"] {
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid #bbb;
  border-radius: 4px;
  font-size: 14px;
}

input[type="radio"] {
  width: 18px;
  height: 18px;
  min-height: auto;
  padding: 0;
  margin: 0;
  transform: none;
  vertical-align: middle;
}

.bottom-section {
  margin-top: 16px;
}

.other-field,
.signature-field {
  margin-top: 10px;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

button {
  flex: 1 1 180px;
  min-height: 48px;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  cursor: pointer;
}

button.secondary {
  background: #6b7280;
}

button:active {
  transform: scale(0.98);
}

#message {
  margin-top: 14px;
  font-weight: bold;
  min-height: 24px;
}

@media (max-width: 768px) {
  body {
    padding: 6px;
  }

  .form-sheet {
    padding: 8px;
  }

  .header {
    flex-direction: column;
    text-align: center;
  }

  .logo {
    width: 72px;
    height: 72px;
  }

  .header-text h1 {
    font-size: 20px;
  }

  .header-text h2 {
    font-size: 14px;
  }

  .top-fields {
    flex-direction: column;
    gap: 4px;
  }

  table {
    table-layout: fixed;
  }

  th,
  td {
    padding: 4px;
    font-size: 12px;
  }

  th:nth-child(1),
  td:nth-child(1) {
    width: 32%;
  }

  th:nth-child(2),
  td:nth-child(2) {
    width: 10%;
  }

  th:nth-child(3),
  td:nth-child(3) {
    width: 16%;
  }

  th:nth-child(4),
  td:nth-child(4) {
    width: 42%;
  }

  td input[type="text"] {
    min-height: 32px;
    padding: 4px 6px;
    font-size: 12px;
  }

  input[type="radio"] {
    width: 16px;
    height: 16px;
  }

  button {
    width: 100%;
    flex: 1 1 100%;
  }
}

@media print {
  body {
    background: #fff;
    padding: 0;
  }

  .form-sheet {
    border: none;
    box-shadow: none;
    max-width: 100%;
    padding: 0;
  }

  .buttons,
  #message {
    display: none;
  }
}