/* SnapFile — phone-first styles. Big touch targets, thumb-friendly. */
:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --ink: #23201a;
  --muted: #8a8478;
  --line: #e5e0d4;
  --accent: #1a73e8;
  --accent-dark: #1558b0;
  --good: #1e7e34;
  --warn: #b26a00;
  --danger: #c0392b;
  --radius: 14px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.45;
}
#app { max-width: 560px; margin: 0 auto; min-height: 100vh; }
.view { padding-bottom: 32px; }
.hidden { display: none !important; }

/* header + tabs */
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
header h1 { font-size: 20px; margin: 0; }
.tabbar {
  display: flex; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 57px; z-index: 10;
}
.tab {
  flex: 1; padding: 14px 4px; border: 0; background: none; font-size: 14px;
  color: var(--muted); border-bottom: 3px solid transparent; min-height: 52px;
}
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }
main { padding: 16px; }
h2 { font-size: 18px; margin: 8px 0 12px; }

/* buttons + inputs */
button { font-size: 16px; border-radius: var(--radius); }
.primary {
  background: var(--accent); color: #fff; border: 0;
  padding: 14px 18px; font-weight: 700; width: 100%; min-height: 52px; margin: 8px 0;
}
.primary:active { background: var(--accent-dark); }
.ghost {
  background: var(--card); color: var(--ink); border: 1.5px solid var(--line);
  padding: 12px 14px; font-weight: 600; min-height: 48px; margin: 8px 0;
}
.danger-ghost {
  background: none; color: var(--danger); border: 1.5px solid var(--danger);
  padding: 12px 14px; font-weight: 600; min-height: 48px; margin: 8px 0;
}
.link { background: none; border: 0; color: var(--accent); font-size: 17px; padding: 10px; }
.big { font-size: 18px; }
.grow { flex: 1; }
input, select, textarea {
  width: 100%; font-size: 16px; padding: 13px 12px; margin: 6px 0 12px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
  min-height: 50px;
}
input:focus, select:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
label { display: block; font-weight: 600; font-size: 14px; margin-top: 4px; }
.row { display: flex; align-items: center; }
.row.gap { gap: 10px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--danger); }
.banner {
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin: 10px 0; font-weight: 600;
}

/* auth */
.auth-card {
  background: var(--card); border-radius: 18px; padding: 28px 22px; margin: 40px 16px;
  box-shadow: 0 4px 18px rgba(0,0,0,.06);
}
.auth-card h1 { margin: 0 0 4px; font-size: 26px; }
.tabs-mini { display: flex; gap: 8px; margin: 14px 0; }
.mini-tab {
  flex: 1; padding: 10px; border-radius: 10px; border: 1.5px solid var(--line);
  background: #fff; color: var(--muted); font-weight: 600;
}
.mini-tab.active { border-color: var(--accent); color: var(--accent); }

/* snap */
.snap-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  width: 100%; min-height: 190px; margin: 24px 0 12px; font-size: 64px;
  background: var(--accent); color: #fff; border: 0; border-radius: 22px;
  box-shadow: 0 6px 20px rgba(26,115,232,.35);
}
.snap-btn span { font-size: 22px; font-weight: 800; }
.snap-btn:active { transform: scale(.98); }

/* cards (queue / batches) */
.cards { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 10px; }
.card {
  display: flex; gap: 12px; align-items: center; background: var(--card);
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 10px 12px;
  width: 100%; text-align: left; min-height: 76px;
}
.card:active { background: #f0ede6; }
.card img.thumb {
  width: 54px; height: 54px; object-fit: cover; border-radius: 10px; flex-shrink: 0;
  background: #eee;
}
.card .meta { flex: 1; min-width: 0; }
.card .title { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .amt { font-weight: 800; font-size: 16px; white-space: nowrap; }
.badge {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .4px;
  padding: 3px 8px; border-radius: 999px; margin-top: 4px; text-transform: uppercase;
}
.badge.captured { background: #fff4d6; color: var(--warn); }
.badge.coded { background: #dceafe; color: var(--accent-dark); }
.badge.filed { background: #d9f0df; color: var(--good); }
.badge.open { background: #e8e6df; color: var(--muted); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.dot.captured { background: var(--warn); }
.dot.coded { background: var(--accent); }
.dot.filed { background: var(--good); }
.pill {
  display: inline-block; background: var(--accent); color: #fff; border-radius: 999px;
  font-size: 12px; font-weight: 800; padding: 1px 8px; margin-left: 4px; vertical-align: 2px;
}
.chips-row { margin: 4px 0 2px; }
.chip {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px;
  padding: 10px 16px; font-weight: 600; color: var(--muted); min-height: 44px;
}
.chip.active { border-color: var(--accent); color: var(--accent); }

/* editor */
.receipt-img {
  width: 100%; max-height: 320px; object-fit: contain; background: #222;
  border-radius: var(--radius); margin: 4px 0 12px;
}
fieldset { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 12px 0; background: #fff; }
legend { font-weight: 700; padding: 0 6px; }
