* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px;
}

header {
  background: #c0392b;
  color: white;
  padding: 20px 24px;
  border-radius: 8px;
  margin-bottom: 20px;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

header .subtitle {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-top: 4px;
}

.form-section,
.list-section {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: #444;
  border-bottom: 2px solid #c0392b;
  padding-bottom: 8px;
}

.form-group {
  margin-bottom: 14px;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: #555;
}

.required {
  color: #c0392b;
}

input[type="text"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #333;
  background: #fafafa;
  transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #c0392b;
  background: white;
}

textarea {
  resize: vertical;
}

.btn-primary {
  width: 100%;
  padding: 11px;
  background: #c0392b;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #a93226;
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 8px;
  flex-wrap: wrap;
}

.list-header h2 {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.count-badge {
  background: #c0392b;
  color: white;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.filter-group select {
  width: auto;
  padding: 6px 10px;
  font-size: 0.85rem;
}

.claim-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty-message {
  text-align: center;
  color: #999;
  padding: 32px 0;
  font-size: 0.9rem;
}

.claim-card {
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 14px 16px;
  background: #fafafa;
  cursor: pointer;
  transition: box-shadow 0.15s;
  position: relative;
}

.claim-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.claim-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.claim-customer {
  font-weight: 700;
  font-size: 1rem;
}

.claim-date {
  font-size: 0.8rem;
  color: #888;
  white-space: nowrap;
}

.claim-content {
  font-size: 0.88rem;
  color: #555;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.claim-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.status-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}

.status-対応中 {
  background: #fde8e6;
  color: #c0392b;
}

.status-完了 {
  background: #e6f4ea;
  color: #27ae60;
}

.status-保留 {
  background: #fef3e2;
  color: #e67e22;
}

.btn-delete {
  background: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.78rem;
  color: #999;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-delete:hover {
  border-color: #c0392b;
  color: #c0392b;
  background: #fde8e6;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  border-radius: 10px;
  padding: 24px;
  max-width: 520px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-content h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: #c0392b;
}

.modal-field {
  margin-bottom: 14px;
}

.modal-field .field-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #888;
  margin-bottom: 2px;
}

.modal-field .field-value {
  font-size: 0.95rem;
  color: #333;
  white-space: pre-wrap;
  word-break: break-word;
}

.btn-close {
  width: 100%;
  margin-top: 16px;
  padding: 10px;
  background: #f0f0f0;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  color: #555;
  font-weight: 600;
}

.btn-close:hover {
  background: #e0e0e0;
}

@media (max-width: 480px) {
  .list-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-group select {
    width: 100%;
  }
}
