* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 24px;
  background: #efefef;
  font-family: Arial, sans-serif;
  color: #111;
}

.form-container {
  max-width: 980px;
  margin: 0 auto;
  background: #ffffff;
  padding: 26px 24px 32px;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.main-title {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 14px;
  letter-spacing: 0.3px;
}

.title-line {
  border-top: 2px solid #222;
  margin-bottom: 22px;
}

.sub-title {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  margin: 34px 0 14px;
  padding-top: 10px;
  /*border-top: 1px solid #d7d7d7;*/
}

.section-title {
  background: #1f1f1f;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 10px 12px;
  border-radius: 2px;
  margin: 22px 0 14px;
}

.section-note {
  font-size: 12px;
  line-height: 1.55;
  color: #555;
  margin-top: -4px;
  margin-bottom: 14px;
}

.row-grid {
  display: grid;
  gap: 16px 18px;
  margin-bottom: 14px;
}

.grid-1 {
  grid-template-columns: 1fr;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.field {
  min-width: 0;
}

.field-full {
  grid-column: 1 / -1;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #111;
}

.form-control {
  width: 100%;
  border: none;
  border-bottom: 1px solid #bfbfbf;
  background: transparent;
  border-radius: 0;
  padding: 7px 0 8px;
  font-size: 14px;
  color: #111;
  outline: none;
  box-shadow: none;
}

.form-control:focus {
  border-bottom-color: #111;
}

textarea.form-control {
  min-height: 42px;
  resize: vertical;
}

.question-row {
  /* border-bottom: 1px solid #ececec;*/
  padding: 10px 0 12px;
  margin-bottom: 0;
  font-size: 13px;
}

.question-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
}

.question-text {
  line-height: 1.6;
}

.question-number {
  font-weight: 700;
  margin-right: 6px;
}

.yes-no-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  padding-top: 1px;
}

.yes-no-group label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.inline-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.inline-field label {
  font-size: 13px;
  font-weight: 500;
  margin: 0;
}

.inline-field .form-control {
  flex: 1;
  min-width: 220px;
}

.sub-note {
  margin-top: 8px;
  font-size: 12px;
  color: #555;
  line-height: 1.55;
  font-style: italic;
}

.declaration-text {
  margin-top: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: #222;
}

.signature-wrapper {
  border: 1px solid #bdbdbd;
  border-radius: 2px;
  background: #fff;
  width: 100%;
  overflow: hidden;
}

.signature-pad {
  width: 100%;
  height: 170px;
  display: block;
  background: #fff;
  touch-action: none;
  cursor: crosshair;
}

.signature-actions {
  margin-top: 8px;
  text-align: left;
}

.clear-btn {
  display: inline-block;
  padding: 5px 12px;
  font-size: 12px;
  border: 1px solid #a8a8a8;
  background: #f5f5f5;
  color: #111;
  border-radius: 2px;
  cursor: pointer;
}

.clear-btn:hover {
  background: #ececec;
}

.signature-note {
  margin-top: 6px;
  font-size: 11px;
  color: #666;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 20px;
  margin-bottom: 16px;
  font-size: 13px;
}

.consent-row input[type="checkbox"] {
  margin-top: 2px;
}

.btn-submit {
  width: 100%;
  padding: 12px 18px;
  background: #1f6fff;
  border: none;
  border-radius: 2px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn-submit:hover {
  background: #165de0;
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.loading {
  display: none;
  text-align: center;
  margin-top: 12px;
  color: #666;
  font-size: 13px;
}

.alert {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 3px;
  font-size: 15px;
  line-height: 1.55;
}

.alert-success {
  background: #e7f7eb;
  color: #145c27;
  border: 1px solid #b9dfc0;
}

.alert-warning {
  background: #fff7dc;
  color: #7a5b00;
  border: 1px solid #ebd98a;
}

.alert-danger {
  background: #fde9e9;
  color: #8b1e1e;
  border: 1px solid #efb8b8;
}

.pdf-link {
  font-weight: 700;
  color: #0b57d0;
  text-decoration: none;
}

.pdf-link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  body {
    padding: 12px;
  }

  .form-container {
    padding: 18px 14px 24px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .question-layout {
    grid-template-columns: 1fr;
  }

  .yes-no-group {
    justify-content: flex-start;
  }

  .signature-pad {
    height: 150px;
  }

}
