:root {
  --ink: #1f2a44;
  --paper: #f5f3ee;
  --card: #ffffff;
  --muted: #6b7280;
  --line: #e5e1d8;
  --accent: #c2410c;
  --in: #15803d;
  --out: #1f2a44;
  --bad: #b91c1c;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
}

.bar {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 14px 20px;
  background: var(--ink);
  color: #fff;
}

.brand {
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.role {
  flex: 1;
  color: #cbd5e1;
  font-size: 14px;
}

main {
  max-width: 520px;
  margin: 0 auto;
  padding: 16px;
  display: grid;
  gap: 14px;
}

#till,
#console {
  display: grid;
  gap: 14px;
}

.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  color: inherit;
  text-decoration: none;
}

.door:hover,
.door:focus-visible {
  border-color: var(--accent);
}

h1,
h2 {
  margin: 0 0 8px;
  line-height: 1.25;
}

h1 {
  font-size: 22px;
}

h2 {
  font-size: 17px;
}

p {
  margin: 0 0 8px;
}

ol {
  margin: 0;
  padding-left: 20px;
}

.label {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}

.amount {
  font-size: 40px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin: 0 0 4px;
}

.merchant {
  font-size: 20px;
  font-weight: 600;
  margin: 2px 0;
  overflow-wrap: anywhere;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

code {
  font: 13px ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin: 10px 0 4px;
}

input {
  width: 100%;
  padding: 12px;
  border: 1px solid #cfc9bc;
  border-radius: 10px;
  font: inherit;
  background: #fff;
  color: inherit;
}

input.big {
  font-size: 28px;
  font-weight: 700;
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid #fdba74;
  outline-offset: 1px;
}

button,
.button {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 18px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

button:disabled {
  opacity: 0.55;
  cursor: progress;
}

button.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid #cfc9bc;
}

button.small {
  margin: 0;
  padding: 6px 12px;
  font-size: 14px;
}

button.link {
  margin: 0;
  padding: 0;
  background: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}

button.link.light,
a.link.light {
  color: #fdba74;
}

a.link {
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

a.button.secondary-link {
  background: #fff;
  color: var(--ink);
  border: 1px solid #cfc9bc;
}

h3 {
  margin: 14px 0 4px;
  font-size: 15px;
}

form > button {
  width: 100%;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tabs button {
  margin: 0;
  background: #fff;
  color: var(--ink);
  border: 1px solid #cfc9bc;
}

.tabs button.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.list li:first-child {
  border-top: 0;
}

.list p {
  margin: 0;
}

.title {
  font-weight: 600;
}

.money {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.money.in {
  color: var(--in);
}

.money.out {
  color: var(--out);
}

.money.void {
  color: var(--muted);
  text-decoration: line-through;
}

.notice {
  margin: 0;
  padding: 12px 20px;
  font-weight: 600;
}

.notice.ok {
  background: #dcfce7;
  color: #14532d;
}

.notice.error {
  background: #fee2e2;
  color: #7f1d1d;
}

.result {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
}

.result.ok {
  background: #dcfce7;
  color: #14532d;
}

.result.bad {
  background: #fee2e2;
  color: #7f1d1d;
}

canvas {
  display: block;
  margin: 8px auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.paid {
  text-align: center;
}

.tick {
  width: 72px;
  height: 72px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--in);
  color: #fff;
  font-size: 44px;
  line-height: 72px;
}

dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  margin: 8px 0;
}

dt {
  color: var(--muted);
  font-size: 14px;
}

dd {
  margin: 0;
}

dialog {
  width: min(420px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

dialog::backdrop {
  background: rgba(31, 42, 68, 0.45);
}

a.button.small-link {
  margin: 0;
  padding: 6px 12px;
  font-size: 14px;
}

.who {
  margin: 0 0 4px;
  font-size: 17px;
}

.center-note {
  margin: 0;
  text-align: center;
  font-size: 13.5px;
}

/* ---- the wallet's balance: the one thing on the screen that should be seen first ---- */

.card.balance {
  position: relative;
  overflow: hidden;
  padding: 24px 22px;
  border: 0;
  background: linear-gradient(140deg, #26335a, #0b1020 70%);
  color: #fff;
  box-shadow: 0 22px 44px rgba(11, 16, 32, 0.3);
}

.card.balance::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -110px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.55), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
}

.card.balance > * {
  position: relative;
  z-index: 1;
}

.card.balance .label,
.card.balance .muted {
  color: #aab4c5;
}

.card.balance .amount {
  font-size: 52px;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 2px 0 10px;
}

.card.balance code {
  color: #e5e9f2;
}

.card.balance button.link {
  color: #fdba74;
}

.card {
  box-shadow: 0 1px 2px rgba(11, 16, 32, 0.04);
}

button,
.button {
  border-radius: 14px;
  transition: transform 0.12s, box-shadow 0.12s, opacity 0.12s;
}

button:not(.secondary):not(.link):not(:disabled):hover,
.button:hover {
  box-shadow: 0 10px 22px rgba(194, 65, 12, 0.3);
}

button:not(:disabled):active {
  transform: scale(0.98);
}

.tabs button {
  border-radius: 999px;
  box-shadow: none !important;
}

input {
  border-radius: 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus {
  border-color: #f3a877;
}

.list li {
  padding: 13px 0;
}

/* ---- the operator's console: wider, with tables ---- */

main.wide {
  max-width: 1120px;
}

.narrow {
  max-width: 520px;
}

.view {
  display: grid;
  gap: 14px;
}

.tabs.five {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.tile {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 10px;
}

.tile.good {
  border-left-color: var(--in);
}

.tile.warn {
  border-left-color: #d97706;
}

.tile.bad {
  border-left-color: var(--bad);
}

.tile p {
  margin: 0;
}

.figure {
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
}

.filters label {
  margin: 0;
}

.filters button {
  margin: 0;
}

select {
  display: block;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid #cfc9bc;
  border-radius: 10px;
  background: #fff;
  color: inherit;
  font: inherit;
}

.scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  text-align: left;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #faf8f3;
}

td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

td.muted {
  font-weight: 400;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge.ok {
  background: #dcfce7;
  color: #14532d;
}

.badge.bad {
  background: #fee2e2;
  color: #7f1d1d;
}

.badge.wait {
  background: #fef3c7;
  color: #78350f;
}

.offline {
  margin: 0;
  padding: 10px 20px;
  background: #fef3c7;
  color: #78350f;
  font-weight: 600;
}

[hidden] {
  display: none !important;
}
