:root {
  color-scheme: light;
  --bg:      #F8F7F5;
  --bg2:     #FFFFFF;
  --bg3:     #F2F0ED;
  --bg4:     #E8E5E0;
  --border:  rgba(0,0,0,0.08);
  --border2: rgba(0,0,0,0.14);
  --ink:     #111010;
  --ink2:    #44403C;
  --ink3:    #A8A29E;
  --ink4:    #D4CFC9;
  --blue:    #2563EB;
  --blue2:   #1D4ED8;
  --blue-l:  #EFF6FF;
  --green:   #16A34A;
  --green-l: #F0FDF4;
  --amber:   #D97706;
  --amber-l: #FFFBEB;
  --red:     #DC2626;
  --red-l:   #FEF2F2;
  --sans:    'Geist', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, sans-serif;
  --mono:    'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --r:       10px;
  --rlg:     14px;
  --shadow:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.10);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
}
a { color: inherit; }

.host {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 60px;
}

.page { width: 100%; max-width: 460px; }

.merchant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.merchant-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.merchant-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  background: #E11D48;
  flex-shrink: 0;
}
.merchant-name { font-size: 14px; font-weight: 650; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.merchant-url { font-size: 11px; color: var(--ink3); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }

.secure-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink3);
  font-family: var(--mono);
  flex-shrink: 0;
}
.secure-icon { width: 14px; height: 14px; }

.order-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--rlg);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.order-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.order-item { font-size: 13px; color: var(--ink2); }
.order-qty { font-size: 11px; color: var(--ink3); margin-top: 2px; }
.order-amount { font-family: var(--mono); font-size: 22px; font-weight: 550; color: var(--ink); letter-spacing: -0.8px; text-align: right; }
.order-equiv { font-size: 11px; color: var(--ink3); font-family: var(--mono); margin-top: 3px; text-align: right; }
.order-divider { border: none; border-top: 1px solid var(--border); margin: 14px 0; }
.order-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11px; color: var(--ink3); }
.order-meta-item { display: flex; align-items: center; gap: 6px; font-family: var(--mono); }

.panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--rlg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.status {
  text-align: center;
  padding: 20px 12px 6px;
}
.status-icon {
  width: 74px;
  height: 74px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  margin: 2px auto 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: var(--bg3);
}
.status-icon svg { width: 42px; height: 42px; }
.status-title { font-size: 18px; font-weight: 800; letter-spacing: -0.5px; margin: 0 0 8px; }
.status-msg { font-size: 13px; color: var(--ink2); line-height: 1.6; margin: 0 0 18px; }

.detail {
  background: var(--bg3);
  border-radius: var(--r);
  padding: 14px;
  margin: 0 0 18px;
  text-align: left;
}
.drow { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); gap: 12px; }
.drow:last-child { border-bottom: none; }
.dlbl { font-size: 11px; color: var(--ink3); }
.dval { font-family: var(--mono); font-size: 12px; font-weight: 650; color: var(--ink); word-break: break-word; text-align: right; }

.btn-primary {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.14s, transform 0.05s;
  letter-spacing: -0.2px;
}
.btn-primary:active { transform: translateY(1px); }
.btn-primary.blue { background: var(--blue); color: #fff; }
.btn-primary.blue:hover { background: var(--blue2); }
.btn-primary.green { background: var(--green); color: #fff; }
.btn-primary.green:hover { background: #15803D; }
.btn-primary.red { background: var(--red); color: #fff; }
.btn-primary.red:hover { background: #B91C1C; }
.btn-primary.gray { background: #0f172a; color: #fff; }
.btn-primary.gray:hover { background: #111827; }

.btn-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
.btn-secondary {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border2);
  border-radius: var(--r);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.btn-secondary:hover { background: var(--bg3); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.02em;
  font-family: var(--mono);
  border: 1px solid var(--border);
}
.pill.ok { background: var(--green-l); color: var(--green); border-color: rgba(22,163,74,0.22); }
.pill.warn { background: var(--amber-l); color: var(--amber); border-color: rgba(217,119,6,0.22); }
.pill.err { background: var(--red-l); color: var(--red); border-color: rgba(220,38,38,0.22); }

.powered {
  text-align: center;
  margin-top: 22px;
  font-size: 11px;
  color: var(--ink3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.powered-logo {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, var(--blue), #7C3AED);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  font-family: var(--mono);
}

@media (max-width: 520px) {
  .merchant-name, .merchant-url { max-width: 190px; }
}
