/* Tesserae Pay merchant app (layers on /c/style.css) */
body { background: var(--bg); }
#app { max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: calc(env(safe-area-inset-top) + 14px) 18px 6px; }
.biz { font-weight: 650; font-size: 15px; color: var(--ink); max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen { flex: 1; padding: 8px 18px calc(96px + env(safe-area-inset-bottom)); }
h1 { font-size: 26px; margin: 18px 0 6px; letter-spacing: -0.01em; }
h3 { font-size: 15px; margin: 22px 0 8px; color: var(--ink-2); font-weight: 650; }
.small { font-size: 12.5px; }
.center { text-align: center; }

.field { display: block; font-size: 14px; color: var(--ink-2); margin-top: 16px; font-weight: 550; }
.field input { display: block; width: 100%; margin-top: 6px; padding: 14px; font-size: 17px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-family: inherit; }
.field input:focus { outline: none; border-color: var(--accent); }
.seg { display: flex; gap: 8px; margin-top: 16px; }
.seg label { flex: 1; display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 12px; background: #fff; border: 1.5px solid var(--line); font-size: 15px; }
.seg label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.check { display: flex; gap: 10px; align-items: center; margin-top: 16px; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.secret { background: #fff; border: 1.5px dashed var(--ink-3); border-radius: 12px; padding: 14px; margin-top: 14px; font-size: 14px; line-height: 1.6; user-select: all; }
button.danger { background: transparent; color: var(--bad); box-shadow: inset 0 0 0 1.5px var(--bad); }

/* charge */
.display { font-size: 56px; font-weight: 750; text-align: center; padding: 28px 0 18px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad button { margin: 0; padding: 20px 0; font-size: 26px; font-weight: 600; background: #fff; color: var(--ink); border-radius: 16px; box-shadow: 0 1px 2px rgba(20, 24, 31, 0.08); }
.keypad button.muted { font-size: 17px; color: var(--ink-2); }
.keypad button:active { background: var(--accent-soft); }

/* qr */
.qr-amount { font-size: 44px; font-weight: 750; text-align: center; margin-top: 8px; font-variant-numeric: tabular-nums; }
.qr-label { text-align: center; color: var(--ink-2); font-weight: 600; }
.qr-box { background: #fff; border-radius: 20px; padding: 14px; margin: 16px auto 0; width: min(82vw, 360px); box-shadow: 0 1px 2px rgba(20, 24, 31, 0.06), 0 8px 24px rgba(20, 24, 31, 0.07); }
.qr-box svg { display: block; width: 100%; height: auto; }
.qr-hint { text-align: center; color: var(--ink-2); font-size: 14px; margin: 12px 0 4px; }
.qr-status { text-align: center; font-weight: 600; margin-top: 8px; }
.paid-amount { font-size: 44px; font-weight: 750; margin: 6px 0; font-variant-numeric: tabular-nums; }

/* activity */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.stat { background: #fff; border-radius: 14px; padding: 14px; }
.stat .k { font-size: 12.5px; color: var(--ink-2); }
.stat .v { font-size: 22px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.panel { background: #fff; border-radius: 16px; padding: 6px 16px 16px; margin-top: 14px; }
.panel h3 { margin-top: 12px; }
.facts.compact { margin-top: 6px; }
.plist { list-style: none; padding: 0; margin: 0; background: #fff; border-radius: 16px; overflow: hidden; }
.plist li { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; gap: 12px; }
.plist li:last-child { border-bottom: 0; }
.plist .when { font-size: 13px; color: var(--ink-2); }
.plist .who { font-size: 12px; color: var(--ink-3); }
.plist .amt { font-weight: 700; font-variant-numeric: tabular-nums; }

/* tabs */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
.tabs button { margin: 0; flex: 1; max-width: 173px; background: transparent; color: var(--ink-3); border-radius: 0; padding: 16px 0; font-size: 15px; }
.tabs button.active { color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }

.toast { position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top) + 12px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 10; max-width: 90vw; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); }

@media print {
  .topbar, .tabs, .toast { display: none !important; }
  .screen { padding: 0; }
}

.dlist { list-style: none; padding: 0; margin: 8px 0 0; }
.dlist li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.dlist li button { width: auto; margin: 0; padding: 8px 12px; font-size: 13px; }
.dlist .exp { color: var(--ink-3); font-size: 12px; }
