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

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

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

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2563eb;
  text-align: center;
  margin-bottom: 16px;
}

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

h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 14px 0 8px;
  color: #475569;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

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

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

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

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

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.85;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
  width: 100%;
  margin-top: 4px;
}

.btn-secondary {
  background: #e2e8f0;
  color: #1e293b;
}

.month-selector {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.month-selector input {
  flex: 1;
  min-width: 160px;
}

.receipt-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.receipt-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #2563eb;
  gap: 8px;
}

.receipt-info {
  flex: 1;
  min-width: 0;
}

.receipt-date {
  font-size: 0.78rem;
  color: #64748b;
}

.receipt-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.receipt-category {
  font-size: 0.8rem;
  background: #dbeafe;
  color: #1d4ed8;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.receipt-memo {
  font-size: 0.82rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.receipt-amount {
  font-weight: 700;
  font-size: 1rem;
  color: #0f172a;
  white-space: nowrap;
}

.delete-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.2s;
}

.delete-btn:hover {
  color: #ef4444;
}

.report-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #eff6ff;
  border-radius: 10px;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 1rem;
  color: #1e3a8a;
}

.total-num {
  font-size: 1.4rem;
  font-weight: 700;
  color: #2563eb;
}

.breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 8px;
}

.breakdown-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.cat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.breakdown-amount {
  font-weight: 600;
  font-size: 0.95rem;
}

.report-detail {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.report-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 0.88rem;
  gap: 8px;
}

.report-item-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.report-item-date {
  color: #94a3b8;
  font-size: 0.78rem;
}

.report-item-cat {
  color: #2563eb;
}

.report-item-amount {
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 480px) {
  h1 { font-size: 1.3rem; }
  .receipt-memo { max-width: 80px; }
}
