:root {
  --bg: #000000;
  --surface: #111111;
  --border: #222222;
  --primary: #22c55e; 
  --primary-grad: linear-gradient(135deg, #16a34a 0%, #14532d 100%);
  --text: #ffffff;
  --muted: #888888;
  --danger: #ef4444;
  --refund: #3b82f6;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.screen {
  display: none;
  flex-direction: column;
  height: 100%;
  padding: 24px;
  box-sizing: border-box;
}
.screen.active { display: flex; animation: fade 0.4s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Typography */
h1 { font-size: 32px; font-weight: 800; margin: 0 0 8px 0; color: var(--primary); letter-spacing: -0.02em; }
h2 { font-size: 16px; color: var(--muted); font-weight: 500; margin: 0 0 24px 0; }
.label { font-size: 11px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; display: block; }

/* Inputs */
input, select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 16px;
  outline: none;
}
input:focus { border-color: var(--primary); }

button.btn-primary { background: var(--primary); color: black; border: none; padding: 16px; border-radius: 12px; font-size: 16px; font-weight: 700; width: 100%; cursor: pointer; }
button.btn-sec { background: transparent; color: var(--muted); border: none; padding: 10px; cursor: pointer; font-size: 14px; margin-top: 10px; }

/* Chart & Cards */
.chart-container { height: 180px; width: 100%; position: relative; margin-bottom: 20px; display: flex; justify-content: center; }
.card { background: var(--primary-grad); padding: 20px; border-radius: 20px; text-align: center; margin-bottom: 20px; border: 1px solid var(--primary-dark); }
.card-label { font-size: 12px; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 1px; }
.card-val { font-size: 32px; font-weight: 800; margin-top: 5px; color: white; }

/* List & Swipe Items */
.tx-list { flex: 1; overflow-y: auto; overflow-x: hidden; padding-bottom: 80px; }
.tx-wrapper { position: relative; overflow: hidden; margin-bottom: 12px; border-radius: 12px; background: var(--surface); }
.swipe-bg { position: absolute; top: 0; bottom: 0; width: 100%; display: flex; align-items: center; font-weight: bold; font-size: 14px; padding: 0 20px; box-sizing: border-box; z-index: 1; }
.bg-left { background: var(--refund); color: white; justify-content: flex-end; right: 0; }
.bg-right { background: var(--danger); color: white; justify-content: flex-start; left: 0; }
.tx-item { position: relative; background: var(--surface); padding: 16px; display: flex; justify-content: space-between; align-items: center; z-index: 2; transition: transform 0.2s ease-out; border: 1px solid var(--border); border-radius: 12px; }
.tx-main { font-weight: 600; font-size: 16px; }
.tx-cat { font-size: 10px; background: #222; padding: 2px 6px; border-radius: 4px; color: #888; margin-top: 4px; display: inline-block; }
.tx-amt { font-weight: 700; font-size: 16px; }
.income { color: var(--primary); }
.expense { color: var(--text); }

.fab { position: fixed; bottom: 30px; right: 24px; width: 60px; height: 60px; background: var(--primary); color: black; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 32px; box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4); cursor: pointer; z-index: 10; }
.modal-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); display: none; align-items: flex-end; z-index: 100; }
.modal-content { background: var(--surface); width: 100%; padding: 30px 24px; border-radius: 24px 24px 0 0; border-top: 1px solid var(--border); animation: slideUp 0.3s; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }