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

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

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

h1 {
  font-size: 1.4rem;
  color: #27ae60;
  margin-bottom: 16px;
  text-align: center;
}

h2 {
  font-size: 1rem;
  color: #555;
  margin: 20px 0 10px;
  border-left: 4px solid #27ae60;
  padding-left: 8px;
}

/* タブ */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: #e8f5e9;
  border-radius: 8px;
  padding: 4px;
}

.tab {
  flex: 1;
  padding: 8px 4px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #555;
  transition: background 0.2s;
}

.tab.active {
  background: #27ae60;
  color: #fff;
  font-weight: bold;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* フォーム */
.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 4px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #27ae60;
}

/* ボタン */
.btn-primary {
  width: 100%;
  padding: 12px;
  background: #27ae60;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.2s;
}

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

.btn-secondary {
  padding: 10px 16px;
  background: #eee;
  color: #333;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}

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

/* 物件リスト */
.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.property-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.property-card .name {
  font-weight: bold;
  font-size: 0.95rem;
}

.property-card .loan {
  font-size: 0.85rem;
  color: #888;
  margin-top: 2px;
}

.btn-delete {
  background: none;
  border: none;
  color: #e74c3c;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
}

/* フィルタ行 */
.filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.filter-row select,
.filter-row input {
  flex: 1;
  min-width: 120px;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.9rem;
  background: #fff;
}

/* 収支テーブル */
.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
}

.summary-table th {
  background: #e8f5e9;
  padding: 10px 8px;
  text-align: left;
  font-weight: bold;
  color: #27ae60;
}

.summary-table td {
  padding: 10px 8px;
  border-top: 1px solid #f0f0f0;
}

.summary-table tr:hover td {
  background: #f9f9f9;
}

.positive {
  color: #27ae60;
  font-weight: bold;
}

.negative {
  color: #e74c3c;
  font-weight: bold;
}

.total-row {
  margin-top: 12px;
  background: #27ae60;
  color: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 1rem;
  font-weight: bold;
  text-align: right;
}

.no-data {
  text-align: center;
  color: #aaa;
  padding: 30px 0;
  font-size: 0.95rem;
}

.btn-row-delete {
  background: none;
  border: none;
  color: #e74c3c;
  cursor: pointer;
  font-size: 0.95rem;
}

@media (max-width: 480px) {
  .summary-table th,
  .summary-table td {
    padding: 8px 5px;
    font-size: 0.8rem;
  }
}
