:root {
  --ink: #101820;
  --panel: #172336;
  --green: #0f766e;
  --amber: #f59e0b;
  --blue: #38bdf8;
  --red: #fb7185;
  --white: #f8fafc;
  --muted: #aab7c7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(ellipse 32rem 26rem at var(--cursor-x, 18%) var(--cursor-y, 18%), rgba(245, 158, 11, 0.22), transparent 72%),
    radial-gradient(ellipse 28rem 24rem at 84% 16%, rgba(15, 118, 110, 0.24), transparent 70%),
    linear-gradient(135deg, #07130f, #101820 44%, #10251e);
  color: var(--white);
  overflow-x: hidden;
  position: relative;
}

body::before {
  animation: moneyFlow 15s linear infinite;
  background-image:
    linear-gradient(90deg, transparent 0 18%, rgba(245, 158, 11, 0.1) 18% 19%, transparent 19% 38%),
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 180px 100%, 64px 64px;
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: 0;
}

.app {
  display: grid;
  grid-template-columns: 380px 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.summary {
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.28), transparent 20rem),
    var(--green);
  padding: 38px;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.7rem, 7vw, 5.5rem);
  line-height: 0.94;
  margin: 0 0 28px;
}

.metrics,
.insights {
  display: grid;
  gap: 12px;
}

.metrics article,
.insights article,
.entry,
form,
.toolbar {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  backdrop-filter: blur(16px);
  padding: 16px;
}

@keyframes moneyFlow {
  from { background-position: 0 0, 0 0; }
  to { background-position: 360px 0, 128px 64px; }
}

.metrics span,
.insights span {
  color: var(--muted);
  display: block;
  font-weight: 800;
}

.metrics strong,
.insights strong {
  font-size: 1.6rem;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 800;
  margin-top: 24px;
}

progress {
  width: 100%;
  height: 18px;
}

.workspace {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 38px;
}

form {
  display: grid;
  grid-template-columns: 1fr 120px 140px 130px auto;
  gap: 10px;
  background: var(--panel);
}

input,
select,
button {
  border: 0;
  border-radius: 8px;
  padding: 13px;
  font: inherit;
}

button {
  background: var(--amber);
  color: #111827;
  cursor: pointer;
  font-weight: 900;
}

.insights {
  grid-template-columns: repeat(2, 1fr);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--panel);
}

.toolbar button:last-child {
  background: #334155;
  color: white;
}

#entries {
  display: grid;
  gap: 12px;
}

.entry {
  align-items: center;
  background: var(--panel);
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
}

.entry small {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

.expense { color: var(--red); }
.income { color: #34d399; }

.delete {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: white;
}

@media (max-width: 920px) {
  .app,
  form,
  .insights,
  .entry {
    grid-template-columns: 1fr;
  }
}
