/* Card rewards dashboard. Dark surface is deliberate, not an auto-flip: this is
   a phone-in-a-restaurant page, and the palette below is the validated dark
   column stepped for the #1a1a19 surface. */
:root {
  color-scheme: dark;
  --plane:        #0d0d0d;
  --surface:      #1a1a19;
  --ink:          #ffffff;
  --ink-2:        #c3c2b7;
  --muted:        #898781;
  --hair:         rgba(255, 255, 255, 0.10);
  --rule:         #2c2c2a;

  /* Status palette, fixed and never themed. Always paired with an icon and a
     word so the colour is never the only carrier of meaning. */
  --good:     #0ca30c;
  --warning:  #fab219;
  --serious:  #ec835a;
  --critical: #d03b3b;

  /* Sequential blue, one hue, for the capture meters. */
  --seq-fill:  #3987e5;
  --seq-track: #184f95;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--plane);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
  padding: 20px 16px 64px;
}
.wrap { max-width: 760px; margin: 0 auto; }

header { margin-bottom: 24px; }
h1 { font-size: 19px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.stamp { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* Hero figure. Exactly one per view, proportional figures, same sans. */
.hero {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 14px;
  padding: 22px 20px;
  margin-bottom: 14px;
}
.hero .label { color: var(--ink-2); font-size: 14px; }
.hero .value { font-size: 54px; font-weight: 600; line-height: 1.05; margin: 6px 0 2px; }
.hero .sub { color: var(--muted); font-size: 14px; }

/* Stat tiles. No plot, so no hover layer. */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 28px; }
.tile {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 12px;
  padding: 14px;
}
.tile .label { color: var(--ink-2); font-size: 13px; }
.tile .value { font-size: 26px; font-weight: 600; margin-top: 5px; }
.tile .note { color: var(--muted); font-size: 12px; margin-top: 3px; }

h2 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

.card {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 10px;
}
.card .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card .name { font-weight: 600; font-size: 15px; }
.card .amt { font-weight: 600; font-size: 20px; white-space: nowrap; }
.card .note { color: var(--ink-2); font-size: 13.5px; margin-top: 8px; }

/* Status chip: icon + label + colour, never colour alone. */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid currentColor;
  margin-top: 10px;
}
.chip .ic { font-style: normal; }
.chip.critical { color: var(--critical); }
.chip.serious  { color: var(--serious); }
.chip.warning  { color: var(--warning); }
.chip.good     { color: var(--good); }

/* Capture meter: one hue, light-on-dark step pair, magnitude only. Severity is
   carried by the chip above, not doubled up here. */
.meter { height: 6px; border-radius: 3px; background: var(--seq-track); margin-top: 12px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--seq-fill); border-radius: 3px; }
.meter-cap { color: var(--muted); font-size: 12px; margin-top: 6px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; color: var(--muted); font-weight: 600;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 0 0 8px;
}
td { padding: 9px 0; border-top: 1px solid var(--rule); color: var(--ink-2); }
/* Numeric columns need a real gutter or the header words butt together and the
   label column collides with its own value at phone width. */
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; padding-left: 14px; white-space: nowrap; }
td.name { color: var(--ink); word-break: break-word; }

.msg { color: var(--muted); padding: 40px 0; text-align: center; }
.msg.err { color: var(--critical); }
footer { color: var(--muted); font-size: 12px; margin-top: 40px; line-height: 1.6; }

@media (max-width: 420px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .hero .value { font-size: 46px; }
}
