/* wallet.garbo.ph: Garbo's colours (src/constants/brand.ts) and the app's wallet page look
   (docs/design/wallet/wallet-screens.png). Light only, like the app. One phone-width column. */

:root {
  --accent: #016dfd;
  --accent-soft: #e4effd;
  --ink: #14201b;
  --muted: #5e6964;
  --grey: #edefee;
  --line: #dce2e0;
  --pressed: #f4f6f5;
  --danger: #e5484d;
  --success: #1f8a4c;
  --title: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --text: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--ink); font: 16px/1.4 var(--text); }
button, input { font: inherit; color: inherit; }
img { display: block; }

.page { max-width: 480px; margin: 0 auto; padding: 20px 16px calc(40px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 18px; }
.page.narrow { max-width: 420px; padding-top: 40px; }
.page.center { align-items: center; text-align: center; }

h1 { font: 700 26px/1.15 var(--title); margin: 0; }
h2 { font: 700 20px/1.2 var(--title); margin: 0; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.error { color: var(--danger); font-size: 14px; min-height: 0; }
.error:empty { display: none; }
.notice { background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.warning { color: var(--danger); font-size: 14px; font-weight: 600; }

.jar { width: 64px; height: 64px; margin: 0 auto; }
.jar.big { width: 72px; height: 72px; }

/* Forms and buttons */
.stack { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.small-gap { gap: 8px; }
.label { font-weight: 600; font-size: 15px; }
.field { width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-size: 17px; outline: none; }
.field:focus { border-color: var(--accent); }
.field.code { font: 700 26px/1 var(--title); letter-spacing: 6px; text-align: center; }
.phone-row { display: flex; align-items: center; gap: 8px; }
.prefix { font-weight: 600; padding: 13px 4px; }
.primary, .secondary { width: 100%; padding: 13px 16px; border-radius: 999px; font-weight: 700; font-size: 16px; cursor: pointer; border: 1.5px solid var(--accent); }
.primary { background: var(--accent); color: #fff; }
.secondary { background: #fff; color: var(--accent); }
.primary:disabled, .secondary:disabled { opacity: 0.6; cursor: default; }
.busy { opacity: 0.6; }
.link { background: none; border: 0; padding: 6px 0; color: var(--accent); font-weight: 600; cursor: pointer; text-align: left; }
.link.back { align-self: flex-start; }
.plain { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }

/* The person or Outlet */
.who { display: flex; flex-direction: column; gap: 8px; }
.who-row { display: flex; align-items: center; gap: 12px; }
.who-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.who-text h1 { font-size: 22px; overflow-wrap: anywhere; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: var(--grey); }
.avatar.s48 { width: 48px; height: 48px; }
.avatar.letter { display: inline-flex; align-items: center; justify-content: center; font: 700 17px/1 var(--title); color: var(--accent); background: var(--accent-soft); }
.avatar.letter.outlet { color: var(--muted); background: var(--grey); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.chip { flex: none; padding: 7px 14px; border-radius: 999px; border: 0; background: var(--grey); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--accent); color: #fff; }

/* The total and the three kinds */
.total { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0 2px; }
.total-amount { font: 700 40px/1.1 var(--title); }
.kinds { display: flex; flex-direction: column; gap: 10px; }
.kind { display: flex; justify-content: space-between; gap: 12px; padding: 13px 16px; background: var(--grey); border-radius: 14px; }
.kind-title { font-weight: 700; }
.kind-amount { font-weight: 700; white-space: nowrap; }

.soon-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.soon { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 11px 6px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; color: var(--muted); }
.soon-note { font-size: 12px; font-weight: 500; }

/* Sections */
.card-section { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.ready { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ready li { padding: 10px 14px; border-radius: 12px; background: var(--grey); font-weight: 600; }
.how ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--ink); }

.tabs { display: flex; gap: 8px; }
.tab { padding: 7px 14px; border-radius: 999px; border: 0; background: var(--grey); font-weight: 600; font-size: 14px; cursor: pointer; }
.tab.on { background: var(--accent); color: #fff; }

.list { display: flex; flex-direction: column; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row.undone { opacity: 0.6; }
.row-main { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.row-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-title { font-weight: 600; overflow-wrap: anywhere; }
.row-sub { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.row-end { display: flex; align-items: center; gap: 10px; }
.row-end.column { flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.row-note { flex-basis: 100%; color: var(--muted); font-size: 13px; }
.row-note:empty { display: none; }
.amount { font-weight: 700; white-space: nowrap; }
.amount.in { color: var(--success); }
.pill { padding: 6px 14px; border-radius: 999px; border: 0; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; }
.pill.done, .pill:disabled { background: var(--grey); color: var(--muted); cursor: default; }

.foot { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); }

button:focus-visible, .field:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
@media (hover: hover) { .row-main.plain:hover, .plain:hover .row-title { text-decoration: underline; } }
