/* KEYSTONE'S OWN LOOK. This is a customer's application, not a PureID surface, so it wears the
   customer's soft brand colours, light only, like the other tenants' applications (Tulip green,
   Nova blue): a warm apricot page, a clay brand colour and pastel states. No product indigo.
   Contrast on the card: ink 12.9:1, quiet text 6.6:1, white on the brand fill 5.8:1. */
:root {
  color-scheme: light;
  --bg: #fbf6f1; --card: #ffffff; --well: #f5e9df; --line: #e6d5c7; --fg: #3b2a26; --muted: #6b554c;
  --accent: #a4532f; --accent-dark: #86411f; --ring: #e9b99d;
  --good: #1f6b4a; --good-bg: #dff3e8; --wait: #8a5a0b; --wait-bg: #fdf0d2; --bad: #a3303a; --bad-bg: #fbe4e6;
  --idle-bg: #f5e9df;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, sans-serif; }
[hidden] { display: none !important; }
a { color: var(--accent); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px;
  background: var(--well); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; }
.mark { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 800;
  font-size: 20px; display: flex; align-items: center; justify-content: center; }
.company { font-weight: 700; font-size: 17px; }
.product { color: var(--muted); font-size: 13px; }
.who { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
main { max-width: 920px; margin: 0 auto; padding: 24px 16px 48px; display: flex; flex-direction: column; gap: 18px; }
#signed-in { display: flex; flex-direction: column; gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: 0 1px 2px rgba(59, 42, 38, .04); }
.card.center { text-align: center; padding: 48px 24px; }
h1 { margin: 0 0 6px; font-size: 22px; }
h2 { margin: 0 0 12px; font-size: 17px; }
.lead { margin: 0 0 18px; color: var(--muted); }
.lead strong { color: var(--fg); }
form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.wide { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
input { font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--fg); min-height: 44px; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--ring); outline-offset: 1px; }
.actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.primary { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border: none;
  border-radius: 10px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.primary:hover { background: var(--accent-dark); }
.primary:disabled { opacity: .6; cursor: default; }
.quiet { min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--fg); font: inherit; cursor: pointer; }
.error { color: var(--bad); font-size: 14px; }
.notice { background: var(--wait-bg); color: var(--wait); border-radius: 9px; padding: 10px 14px; display: inline-block; }
.quick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; color: var(--muted); font-size: 14px; }
.chip { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--well); color: var(--fg);
  font: inherit; font-size: 14px; font-variant-numeric: tabular-nums; cursor: pointer; }
.empty { margin: 0; color: var(--muted); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: none; padding-top: 4px; }
.what { font-weight: 600; }
.amount { font-family: ui-monospace, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.memo, .when { color: var(--muted); font-size: 14px; }
.when { text-align: right; font-family: ui-monospace, Menlo, Consolas, monospace; }
.status { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.pill { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; font-weight: 600; font-size: 13px; }
.pill.paid { background: var(--good-bg); color: var(--good); }
.pill.waiting { background: var(--wait-bg); color: var(--wait); }
.pill.not_paid { background: var(--bad-bg); color: var(--bad); }
.pill.queued, .pill.starting, .pill.working { background: var(--idle-bg); color: var(--muted); }
.approve { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 10px; background: var(--accent);
  color: #fff; font-weight: 600; text-decoration: none; }
