* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  max-width: 800px;
  margin: 0 auto;
  padding: 24px;
  background: #f7f7f8;
  color: #1a1a1a;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.net-worth {
  text-align: right;
}
.net-worth span { display: block; font-size: 12px; color: #666; }
.net-worth strong { font-size: 24px; }
.data-tools {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.data-tools button, .import-label {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid #ccc;
  background: white;
}
.import-label {
  display: inline-flex;
  align-items: center;
}
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid #ddd;
}
.tab-btn {
  padding: 10px 16px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  border-bottom: 2px solid transparent;
}
.tab-btn.active {
  color: #1a1a1a;
  border-bottom-color: #1a1a1a;
  font-weight: 600;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }
form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding: 16px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
}
input, select, button {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}
button[type="submit"] {
  background: #1a1a1a;
  color: white;
  border: none;
  cursor: pointer;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e5e5;
}
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}
th { background: #fafafa; color: #666; font-weight: 600; }
.delete-btn {
  background: none;
  border: none;
  color: #c33;
  cursor: pointer;
  font-size: 13px;
}
.edit-btn, .save-btn {
  background: none;
  border: none;
  color: #1a1a1a;
  cursor: pointer;
  font-size: 13px;
  text-decoration: underline;
}
.other-input {
  min-width: 160px;
}
.income { color: #1a7a1a; }
.expense { color: #c33; }
#summary-content .row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}
.budget-columns {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}
.budget-columns > div { flex: 1; }
#budget-comparison {
  margin-top: 20px;
  padding: 16px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
}
#budget-comparison .row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}
#budget-comparison .row:last-child {
  border-bottom: none;
  font-weight: 700;
  font-size: 16px;
  padding-top: 12px;
}
.surplus { color: #1a7a1a; }
.deficit { color: #c33; }
