:root {
  --bg: #f4f5f7; --card: #fff; --ink: #1c2430; --muted: #6b7785;
  --brand: #0b5fff; --line: #e3e7ec;
  --ok: #1a8a4b; --okbg: #e6f5ec; --warn: #b06f00; --warnbg: #fff4e0;
  --bad: #c0392b; --badbg: #fdecea; --pend: #b06f00; --pendbg: #fff4e0;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--ink);
  -webkit-text-size-adjust: 100%;
}
.container {
  max-width: 560px; margin: 0 auto; padding: 20px 16px 96px;
}
h1 { font-size: 1.5rem; margin: 0 0 12px; }
.muted { color: var(--muted); }
.balance { font-size: 1.05rem; }

/* Forms — large tap targets */
form { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; }
input, select, textarea {
  font: inherit; padding: 13px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; min-height: 48px; width: 100%;
}
textarea { min-height: 110px; resize: vertical; }
input[type=checkbox] { width: auto; min-height: 0; transform: scale(1.3); }
button {
  font: inherit; font-weight: 700; color: #fff; background: var(--brand);
  border: 0; border-radius: 12px; padding: 14px; min-height: 50px; cursor: pointer;
}
button:active { opacity: .9; }
a { color: var(--brand); }

/* Home tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.tiles a {
  display: flex; flex-direction: column; gap: 8px; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 14px; color: var(--ink); font-weight: 600; min-height: 92px;
}
.tiles .ico { font-size: 1.5rem; }

/* Cards / lists */
.cards { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 12px; }
.cards li {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px;
}
.cards .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.score { font-weight: 700; }
.bar { height: 8px; background: var(--line); border-radius: 6px; margin-top: 8px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--brand); }
.resolution { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }

/* Status chips */
.chip {
  font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  text-transform: capitalize; white-space: nowrap;
}
.chip.yes, .chip.resolved { background: var(--okbg); color: var(--ok); }
.chip.pending { background: var(--pendbg); color: var(--pend); }
.chip.no, .chip.cancelled { background: var(--badbg); color: var(--bad); }

/* Messages */
.err  { background: var(--badbg);  color: var(--bad);  padding: 10px 12px; border-radius: 10px; }
.warn { background: var(--warnbg); color: var(--warn); padding: 10px 12px; border-radius: 10px; }

/* Bottom nav */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; background: #fff;
  border-top: 1px solid var(--line); display: flex; justify-content: space-around;
  padding: 6px 4px env(safe-area-inset-bottom);
}
.bottomnav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none; color: var(--muted); font-size: 1.15rem; padding: 6px 8px;
  min-width: 48px;
}
.bottomnav a span { font-size: .65rem; font-weight: 600; }

@media (min-width: 600px) {
  .bottomnav { max-width: 560px; margin: 0 auto; border-radius: 14px 14px 0 0; }
}
