* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f4f5f7;
  color: #1f2430;
}

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

header.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #2f6f4f;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

header.topbar a { color: #fff; text-decoration: none; }

header.topbar .brand { font-weight: 600; font-size: 17px; }

nav.tabbar {
  display: flex;
  justify-content: space-around;
  background: #fff;
  border-top: 1px solid #e0e0e0;
  position: sticky;
  bottom: 0;
}

nav.tabbar a {
  flex: 1;
  text-align: center;
  padding: 10px 4px;
  color: #555;
  text-decoration: none;
  font-size: 13px;
}

nav.tabbar a.active { color: #2f6f4f; font-weight: 600; }

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

.card h3 { margin: 0 0 8px; font-size: 15px; color: #666; }

.card .amount { font-size: 22px; font-weight: 700; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }

th, td { text-align: left; padding: 8px 4px; border-bottom: 1px solid #eee; }

th { color: #888; font-weight: 500; font-size: 12px; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.badge.active { background: #e3f2e6; color: #2f6f4f; }
.badge.ended { background: #eee; color: #888; }

form.form-stack { display: flex; flex-direction: column; gap: 12px; }

label { font-size: 13px; color: #555; margin-bottom: 4px; display: block; }

input, select, textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
}

button, .btn {
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: #2f6f4f;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}

button.secondary, .btn.secondary { background: #888; }
button.danger, .btn.danger { background: #c0392b; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters select { width: auto; }

.error { color: #c0392b; font-size: 13px; margin-top: 4px; }

.fab-add {
  display: block;
  text-align: center;
  margin: 12px 0;
}

.empty { color: #999; text-align: center; padding: 24px 0; font-size: 14px; }
