*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
  background: #f3f4f6;
  color: #111827;
}

.page-wrapper {
  max-width: 900px;
  margin: 20px auto;
  background: #ffffff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.header {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 3px solid #b91c1c;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.logo-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 999px;
  border: 2px dashed #b91c1c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  text-transform: uppercase;
  color: #b91c1c;
}

.logo {
  max-width: 80px;
  max-height: 80px;
  object-fit: contain;
}

.header-text h1 {
  margin: 0;
  font-size: 1.6rem;
  color: #111827;
}

.header-text p {
  margin: 2px 0 0;
  color: #4b5563;
}

.intro {
  margin-bottom: 16px;
  font-size: 0.95rem;
  color: #374151;
}

.block {
  margin-bottom: 18px;
}

.block h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  border-left: 4px solid #b91c1c;
  padding-left: 8px;
  color: #111827;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-field label {
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: #374151;
}

.form-field input,
textarea {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
}

.form-field input:focus,
textarea:focus {
  outline: none;
  border-color: #b91c1c;
  box-shadow: 0 0 0 1px rgba(185, 28, 28, 0.2);
}

textarea {
  width: 100%;
  resize: vertical;
}

/* Skalenlegende */
.scale-legend ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.9rem;
  color: #4b5563;
}

/* Tabelle */
.rating-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.rating-table th,
.rating-table td {
  border: 1px solid #e5e7eb;
  padding: 6px 8px;
  vertical-align: middle;
}

.rating-table th {
  background: #f9fafb;
  text-align: center;
  font-weight: 600;
}

.rating-table td:first-child {
  text-align: left;
  width: 60%;
}

.rating-table input[type="radio"] {
  display: block;
  margin: 0 auto;
}

/* Unterschrift & Stempel */
.signature-block {
  margin-top: 24px;
}

.signature-area {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.signature-box {
  border: 1px dashed #d1d5db;
  padding: 8px;
  border-radius: 8px;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.signature-box p {
  margin: 0 0 6px;
  font-size: 0.85rem;
  color: #4b5563;
}

.signature-box .line {
  border-bottom: 1px solid #9ca3af;
  height: 24px;
}

.stamp-box {
  border: 1px solid #9ca3af;
  height: 50px;
  border-radius: 6px;
}

/* Buttons */
.buttons-block {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.buttons-block button {
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.05s ease, box-shadow 0.1s ease;
}

#downloadPdf {
  background: #111827;
  color: #f9fafb;
}

.buttons-block button[type="submit"] {
  background: #b91c1c;
  color: #f9fafb;
}

.buttons-block button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.buttons-block button:active {
  transform: translateY(0);
  box-shadow: none;
}

@media print {
  body {
    background: #ffffff;
  }

  .page-wrapper {
    box-shadow: none;
    margin: 0;
    border-radius: 0;
  }

  .buttons-block {
    display: none;
  }
}
/* PDF Fix */
#pdf-content {
  width: 210mm;
  min-height: 297mm;
  background: #ffffff;
  padding: 10mm;
}

table {
  page-break-inside: avoid;
}

section {
  page-break-inside: avoid;
}
