* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f4f6f8;
  color: #1a1a1a;
}
.hidden { display: none !important; }

/* LOGIN */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f766e, #134e4a);
  padding: 20px;
}
.login-card {
  background: white;
  padding: 32px 24px;
  border-radius: 16px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.login-card h1 { margin-bottom: 8px; }
.login-card p { color: #666; margin-bottom: 20px; font-size: 14px; }
.login-card input {
  width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px;
  margin-bottom: 12px; font-size: 16px;
}
.login-card button {
  width: 100%; padding: 12px; background: #0f766e; color: white; border: none;
  border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer;
}
.error-text { color: #dc2626; font-size: 13px; margin-top: 8px; min-height: 18px; }

/* APP */
.app { max-width: 720px; margin: 0 auto; padding-bottom: 40px; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; background: #0f766e; color: white;
  position: sticky; top: 0; z-index: 10;
}
.topbar h1 { font-size: 20px; }
.btn-ghost { background: none; border: 1px solid rgba(255,255,255,0.4); color: white; padding: 6px 14px; border-radius: 6px; cursor: pointer; }

.tabs {
  display: flex; background: white; position: sticky; top: 56px; z-index: 9;
  border-bottom: 1px solid #e5e5e5; overflow-x: auto;
}
.tab-btn {
  flex: 1; padding: 14px 8px; border: none; background: none; font-size: 14px;
  cursor: pointer; color: #666; white-space: nowrap; border-bottom: 3px solid transparent;
}
.tab-btn.active { color: #0f766e; border-bottom-color: #0f766e; font-weight: 600; }

main { padding: 16px; }
.tab-content { display: none; }
.tab-content.active { display: block; }

.card {
  background: white; border-radius: 12px; padding: 16px; margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.card h3 { margin-bottom: 12px; font-size: 15px; color: #333; }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.summary-card {
  background: white; border-radius: 12px; padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.summary-card .label { font-size: 12px; color: #888; margin-bottom: 4px; }
.summary-card .value { font-size: 18px; font-weight: 700; }
.summary-card.income .value { color: #16a34a; }
.summary-card.expense .value { color: #dc2626; }
.summary-card.balance .value { color: #0f766e; }

.form-grid { display: grid; gap: 10px; }
.form-grid input, .form-grid select {
  padding: 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 15px; width: 100%;
}
.full-width { grid-column: 1 / -1; }
.btn-primary {
  background: #0f766e; color: white; border: none; padding: 12px; border-radius: 8px;
  font-weight: 600; cursor: pointer; font-size: 15px;
}
.btn-secondary {
  background: #e5e5e5; color: #333; border: none; padding: 10px 16px; border-radius: 8px; cursor: pointer;
}
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-row input, .filter-row select { flex: 1; min-width: 120px; padding: 8px; border: 1px solid #ddd; border-radius: 6px; }

.tx-list { display: flex; flex-direction: column; gap: 8px; }
.tx-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px; border-radius: 8px; background: #fafafa; border-left: 4px solid #ccc;
}
.tx-item.masuk { border-left-color: #16a34a; }
.tx-item.keluar { border-left-color: #dc2626; }
.tx-info .desc { font-weight: 600; font-size: 14px; }
.tx-info .meta { font-size: 12px; color: #888; }
.tx-amount { font-weight: 700; font-size: 14px; }
.tx-amount.masuk { color: #16a34a; }
.tx-amount.keluar { color: #dc2626; }
.tx-actions { display: flex; gap: 6px; margin-left: 8px; }
.tx-actions button { background: none; border: none; cursor: pointer; font-size: 16px; }

.report-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.report-btn { flex: 1; padding: 10px; border: 1px solid #ddd; background: white; border-radius: 8px; cursor: pointer; }
.report-btn.active { background: #0f766e; color: white; border-color: #0f766e; }

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

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