* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background-color: #f9fafb;
  padding: 24px;
  line-height: 1.6;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

.header {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  padding: 24px;
  margin-bottom: 24px;
}

h1 {
  font-size: 24px;
  color: #1f2937;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 16px;
}

.compliance-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #dcfce7; /* Light green */
  color: #166534; /* Dark green */
  font-size: 14px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 9999px; /* Pill shape */
  margin-bottom: 12px;
  border: 1px solid #86efac; /* Slightly darker green border */
}

.button-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-excel {
  background: #16a34a;
  color: white;
}

.btn-excel:hover {
  background: #15803d;
}

.btn-pdf {
  background: #dc2626;
  color: white;
}

.btn-pdf:hover {
  background: #b91c1c;
}

.btn-add {
  background: #2563eb;
  color: white;
  margin-left: auto;
}

.btn-add:hover {
  background: #1d4ed8;
}

.worker-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  padding: 20px;
  margin-bottom: 16px;
}

.worker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.worker-title {
  font-size: 18px;
  font-weight: 600;
  color: #374151;
}

.btn-delete {
  background: transparent;
  color: #dc2626;
  padding: 8px;
  border-radius: 4px;
}

.btn-delete:hover {
  background: #fee2e2;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.span-2 {
  grid-column: span 2;
}

label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 4px;
}

.required {
  color: #dc2626;
}

input,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s;
  font-family: inherit; /* bodyのフォント設定を継承 */
}

/* チェックボックスは幅100%にしたくないので、サイズを固定 */
input[type="checkbox"] {
  width: 20px;
  height: 20px;
}

/* 血圧入力欄が均等に幅を持つようにする */
.blood-pressure-inputs input {
  flex: 1;
}

input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

@media (max-width: 768px) {
  body {
    padding: 16px;
  }

  .header {
    padding: 16px;
  }

  h1 {
    font-size: 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-group.span-2 {
    grid-column: span 1;
  }

  .button-group {
    flex-direction: column;
    align-items: stretch; /* ボタンを親要素の幅いっぱいに広げる */
  }

  .btn-add {
    margin-left: 0;
  }
}
