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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f1f5f9;
  color: #1e293b;
  min-height: 100vh;
}

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

header {
  background: #2563eb;
  color: white;
  padding: 20px 24px;
  border-radius: 12px;
  margin-bottom: 20px;
}

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

/* フォームセクション */
.form-section {
  background: white;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.form-section h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: #475569;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
}

input[type="text"],
input[type="date"],
select,
textarea {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.95rem;
  width: 100%;
  background: #f8fafc;
  color: #1e293b;
  outline: none;
  transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
  border-color: #2563eb;
  background: white;
}

textarea {
  resize: vertical;
}

.btn-primary {
  background: #2563eb;
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #1d4ed8;
}

/* リストセクション */
.list-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  overflow: hidden;
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
}

.list-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge {
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}

.filter-buttons {
  display: flex;
  gap: 6px;
}

.filter-btn {
  background: #f1f5f9;
  border: none;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  color: #64748b;
  font-weight: 500;
  transition: all 0.2s;
}

.filter-btn.active {
  background: #2563eb;
  color: white;
}

.item-list {
  padding: 12px;
}

.empty-msg {
  text-align: center;
  color: #94a3b8;
  padding: 32px;
  font-size: 0.9rem;
}

/* 案件カード */
.item-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  transition: box-shadow 0.2s;
}

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

.item-card:last-child {
  margin-bottom: 0;
}

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

.card-title {
  font-weight: 700;
  font-size: 1rem;
  color: #1e293b;
}

.card-customer {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 2px;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.status-select {
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  cursor: pointer;
}

.status-受付中 { border-color: #f59e0b; color: #b45309; background: #fffbeb; }
.status-修理中 { border-color: #3b82f6; color: #1d4ed8; background: #eff6ff; }
.status-完了   { border-color: #10b981; color: #065f46; background: #ecfdf5; }
.status-引渡済 { border-color: #94a3b8; color: #475569; background: #f8fafc; }

.btn-delete {
  background: none;
  border: 1px solid #fca5a5;
  color: #ef4444;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-delete:hover {
  background: #fee2e2;
}

.card-meta {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 6px;
}

.card-symptom {
  font-size: 0.88rem;
  color: #475569;
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 6px;
  line-height: 1.5;
}

/* レスポンシブ */
@media (max-width: 500px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .list-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .card-top {
    flex-direction: column;
  }

  .card-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
