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

:root {
  --lime: #c8f169;
  --lime-press: #b6e14f;
  --bg: #ececea;
  --surface: #fff;
  --field: #f3f3f1;
  --field-press: #e8e8e5;
  --ink: #101010;
  --muted: #8b8b90;
  --r-card: 28px;
  --r-field: 18px;
}

body {
  font-family: -apple-system, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  padding: max(env(safe-area-inset-top), 16px) 14px calc(env(safe-area-inset-bottom) + 20px);
  -webkit-tap-highlight-color: transparent;
}

/* Card fills the screen so Simpan lands under the thumb, not mid-page. */
body { min-height: 100dvh; display: flex; }
main { flex: 1; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; }

/* The form is the single white card the whole UI sits on. */
form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border-radius: var(--r-card);
  padding: 18px 16px;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 2px; }

.chip {
  width: auto;
  padding: 11px 16px;
  border: none;
  border-radius: 999px;
  background: var(--field);
  font-size: 15px;
  font-weight: 500;
  color: #55555a;
}

.chip[aria-checked="true"] {
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
}

/* 16px+ font on inputs prevents iOS zoom-on-focus */
input, button {
  font-size: 17px;
  border: none;
  border-radius: var(--r-field);
  padding: 16px;
  width: 100%;
  background: var(--field);
  color: var(--ink);
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}

input::placeholder { color: var(--muted); }
input:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }

/* Amount is the hero: oversized numerals on a filled tile. */
.amount-wrap {
  position: relative;
  display: block;
  background: var(--field);
  border-radius: var(--r-field);
  padding: 6px 0;
}
.amount-wrap .rp {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 20px; font-weight: 600;
}
#amount {
  padding: 14px 18px 14px 54px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: none;
}

#date { color: #55555a; }

button[type="submit"] {
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  font-size: 18px;
  border-radius: 999px;
  padding: 19px;
  margin-top: auto; /* pushes the button to the bottom of the card */
}
button[type="submit"]:active { background: var(--lime-press); }
button[type="submit"]:disabled { opacity: 0.5; }

.ghost {
  background: none; color: var(--muted);
  text-align: left; padding: 2px 4px; font-size: 15px; width: auto;
  border-radius: 8px;
}

.relink {
  background: #ffe9e6; color: #8c2f22;
  padding: 16px; border-radius: var(--r-field); margin-bottom: 12px;
  font-size: 15px; line-height: 1.4;
}

/* order:-1 keeps the badge above the full-height card instead of below the fold */
.badge {
  order: -1; margin-bottom: 10px; font-size: 14px; font-weight: 500; color: #6b5a12;
  background: #fbf0c4; border-radius: 999px; padding: 11px 18px; text-align: center;
}

.toast {
  /* Top, not bottom: the Simpan button now occupies the bottom of the screen. */
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 16px);
  transform: translateX(-50%);
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.18);
  background: var(--ink); color: #fff;
  padding: 14px 24px; border-radius: 999px; font-weight: 600;
}
