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

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

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

h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #2563eb;
}

h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #374151;
}

/* フォーム */
.form-section {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

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

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

label {
  font-size: 0.82rem;
  color: #6b7280;
  font-weight: 500;
}

input[type="text"],
input[type="number"],
input[type="month"] {
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #1e293b;
  background: #f9fafb;
  width: 100%;
  transition: border-color 0.15s;
}

input:focus {
  outline: none;
  border-color: #2563eb;
  background: #fff;
}

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

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

.btn-secondary {
  background: #e5e7eb;
  color: #374151;
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-secondary:hover {
  background: #d1d5db;
}

/* フィルター */
.filter-section {
  background: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  flex-wrap: wrap;
}

.filter-section label {
  font-size: 0.88rem;
  white-space: nowrap;
}

.filter-section input[type="month"] {
  flex: 1;
  min-width: 140px;
}

/* サマリー */
.summary-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.summary-card {
  background: #2563eb;
  color: #fff;
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(37,99,235,0.2);
}

.summary-label {
  font-size: 0.75rem;
  opacity: 0.85;
  margin-bottom: 6px;
}

.summary-value {
  font-size: 1.15rem;
  font-weight: 700;
}

/* リスト */
.list-section {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.project-list {
  list-style: none;
}

.empty-msg {
  color: #9ca3af;
  font-size: 0.9rem;
  text-align: center;
  padding: 20px 0;
}

.project-item {
  border-bottom: 1px solid #f1f5f9;
  padding: 12px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.project-item:last-child {
  border-bottom: none;
}

.project-info {
  flex: 1;
}

.project-name {
  font-weight: 600;
  font-size: 0.97rem;
  margin-bottom: 3px;
}

.project-meta {
  font-size: 0.82rem;
  color: #6b7280;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-income {
  font-size: 1rem;
  font-weight: 700;
  color: #2563eb;
  white-space: nowrap;
}

.delete-btn {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.1s;
  flex-shrink: 0;
}

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

@media (max-width: 480px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .summary-section {
    grid-template-columns: repeat(3, 1fr);
  }

  .summary-value {
    font-size: 0.95rem;
  }
}
