/* Flyt: the logo's colours (logo 03e, 2026-09-26) on a light, calm
   layout (design direction B). Buyers are Western and have never heard of
   the vendor, so the checkout is calm and light; vendors are mostly
   Chinese and on phones, so vendor pages are compact.
   Ink (#0B1512) for the header and main buttons, green (#0B5D45) for links,
   selection and focus, mint (#9EE6C4) on ink, on a warm cream background.
   "Paid / done" keeps its own badge (--flyt-ok) with a tinted background.
   System fonts only: Google Fonts is blocked in mainland China, and a
   blocked stylesheet would stall the page there. */
:root {
  --flyt-bg: #f5f3ee;
  --flyt-card: #ffffff;
  --flyt-border: #dcd8cf;
  --flyt-border-strong: #b8b2a6;
  --flyt-text: #0b1512;
  --flyt-muted: #505b56;
  --flyt-faint: #6f7974;
  --flyt-ink: #0b1512;
  --flyt-ink-hover: #26332e;
  --flyt-primary: #0b5d45;
  --flyt-primary-hover: #08402f;
  --flyt-primary-soft: #e4f2ea;
  --flyt-navy: #0b1512;
  --flyt-on-navy: #b9c2be;
  --flyt-ok: #0e6b3f;
  --flyt-ok-soft: #e1f3e8;
  --flyt-warn: #8a5a00;
  --flyt-warn-soft: #fff3dc;
  --flyt-danger: #b42318;
  --flyt-danger-soft: #fdecea;
  /* Kept for older markup: the accent is the brand green. */
  --flyt-accent: var(--flyt-primary);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", Helvetica, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--flyt-bg);
  color: var(--flyt-text);
  min-height: 100vh;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}
.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 64px;
}
.wrap-wide { max-width: 960px; }

/* Top bar on vendor and admin pages: brand, "Merchant center", language. */
.topbar {
  background: var(--flyt-card);
  border-bottom: 1px solid var(--flyt-border);
}
.topbar-inner {
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topbar-wide { max-width: 960px; }
.topbar-brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: #0B1512;
  text-decoration: none;
  line-height: 1;
}
.brand-mark { flex-shrink: 0; }
.brand-dot { color: #0B5D45; }
.brand-sub { font-size: 0.9rem; color: var(--flyt-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.card {
  background: var(--flyt-card);
  border: 1px solid var(--flyt-border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 12px;
}
h1 { font-size: 1.2rem; margin: 0 0 4px; }
h2 { font-size: 0.95rem; margin: 0 0 14px; color: var(--flyt-muted); font-weight: 400; }
p { margin: 0 0 12px; }
p.hint { color: var(--flyt-muted); font-size: 0.85rem; margin-top: -4px; }
label { display: block; font-size: 0.85rem; color: var(--flyt-muted); margin: 14px 0 6px; }
form > label:first-child, .card > label:first-child { margin-top: 0; }
input[type="text"], input[type="email"], input[type="number"], input[type="password"], input[type="url"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--flyt-card);
  border: 1px solid var(--flyt-border-strong);
  border-radius: 8px;
  color: var(--flyt-text);
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming into the field */
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--flyt-primary);
  outline-offset: 0;
  border-color: var(--flyt-primary);
}
input:disabled, select:disabled { background: var(--flyt-bg); color: var(--flyt-faint); }
button, .btn {
  display: inline-block;
  width: 100%;
  margin-top: 16px;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  background: var(--flyt-ink);
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
button:hover, .btn:hover { background: var(--flyt-ink-hover); }
button:focus-visible, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--flyt-primary); outline-offset: 2px; }
.btn-secondary {
  background: var(--flyt-card);
  color: var(--flyt-ink);
  border: 1px solid var(--flyt-ink);
}
.btn-secondary:hover { background: var(--flyt-bg); }
a { color: var(--flyt-primary); }
a:hover { color: var(--flyt-primary-hover); }
.muted { color: var(--flyt-muted); }
.error {
  color: var(--flyt-danger);
  background: var(--flyt-danger-soft);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  margin: 8px 0;
}
.link-box {
  background: var(--flyt-bg);
  border: 1px solid var(--flyt-border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.85rem;
  word-break: break-all;
  margin-top: 8px;
}
.amount { font-size: 2rem; font-weight: 700; margin: 4px 0 20px; font-variant-numeric: tabular-nums; }

/* Language switcher: a small segmented control. */
.lang-switcher {
  display: inline-flex;
  border: 1px solid var(--flyt-border);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.lang-link {
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--flyt-muted);
  background: var(--flyt-card);
  text-decoration: none;
}
.lang-link + .lang-link { border-left: 1px solid var(--flyt-border); }
.lang-link:hover { color: var(--flyt-text); }
.lang-link.active { color: #ffffff; background: var(--flyt-ink); }
.lang-in-progress-notice {
  font-size: 0.8rem;
  color: var(--flyt-muted);
  background: var(--flyt-card);
  border: 1px solid var(--flyt-border);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
}

/* --- Setup steps: every step of getting started on one screen, the ones
   not reached yet greyed out (signup, payout wallet, first link, share). */
.steps-head { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 0 10px; }
.steps-head h1 { margin: 0; }
.steps-left { font-size: 0.85rem; color: var(--flyt-muted); }
.steps-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  font-size: 0.72rem;
  text-align: center;
}
.steps-bar li { display: flex; flex-direction: column; gap: 6px; color: var(--flyt-faint); }
.steps-bar li::before { content: ""; height: 4px; border-radius: 2px; background: var(--flyt-border); }
.steps-bar li.done { color: var(--flyt-ok); }
.steps-bar li.done::before { background: var(--flyt-ok); }
.steps-bar li.current { color: var(--flyt-primary); font-weight: 700; }
.steps-bar li.current::before { background: var(--flyt-primary); }
.step-done {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--flyt-card);
  border: 1px solid var(--flyt-border);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.step-done .check {
  width: 24px;
  height: 24px;
  border-radius: 12px;
  background: var(--flyt-ok-soft);
  color: var(--flyt-ok);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-done .step-title { flex-grow: 1; }
.step-done .step-detail { font-size: 0.8rem; color: var(--flyt-muted); overflow-wrap: anywhere; text-align: right; }
.card.step-current { border: 2px solid var(--flyt-primary); }
.step-title-row { font-weight: 700; margin-bottom: 4px; }
.step-later {
  background: #faf9f6;
  border: 1px dashed var(--flyt-border-strong);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
  color: var(--flyt-faint);
  font-size: 0.9rem;
}
.step-later .step-title-row { margin: 0; }
.step-later .step-note { font-size: 0.8rem; }

/* Choice cards: a radio shown as a tappable card (payout asset, how the
   buyer pays). The native radio stays for keyboards and screen readers. */
.choices { border: none; padding: 0; margin: 14px 0 0; }
.choices legend { padding: 0; margin-bottom: 6px; font-size: 0.85rem; color: var(--flyt-muted); }
.choices legend .required { color: var(--flyt-danger); }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
label.choice {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--flyt-border-strong);
  border-radius: 10px;
  background: var(--flyt-card);
  color: var(--flyt-text);
  font-size: 0.95rem;
  cursor: pointer;
}
label.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
label.choice strong { font-weight: 700; }
label.choice span { font-size: 0.75rem; color: var(--flyt-muted); }
label.choice:has(input:checked) { border: 2px solid var(--flyt-primary); background: var(--flyt-primary-soft); padding: 9px 11px; }
label.choice:has(input:focus-visible) { outline: 2px solid var(--flyt-primary); outline-offset: 2px; }
label.choice.is-disabled { cursor: not-allowed; opacity: 0.55; }

/* --- Vendor dashboard --- */
.account-row { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.8rem; color: var(--flyt-muted); margin: 0 0 12px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.tile {
  background: var(--flyt-card);
  border: 1px solid var(--flyt-border);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.tile-label { font-size: 0.75rem; color: var(--flyt-muted); }
.tile-value { font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile-sub { font-size: 0.7rem; color: var(--flyt-muted); }
.tile-sub.warn { color: var(--flyt-warn); }
.card-title { font-size: 1rem; font-weight: 700; margin: 0 0 10px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid label { margin: 0 0 4px; }
.amount-row { display: flex; gap: 8px; }
.amount-row input[type="number"] { flex: 1; min-width: 0; }
.amount-row select { width: 96px; flex-shrink: 0; }

.card-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.card-header-row h1, .card-header-row .card-title { margin: 0; }
.request-list { display: flex; flex-direction: column; }
.request-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid #efece5;
}
.request-row:last-child { border-bottom: none; }
.request-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.request-title { font-weight: 700; font-size: 0.95rem; overflow-wrap: anywhere; }
.request-amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.request-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.78rem; color: var(--flyt-muted); }
.status {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--flyt-warn-soft);
  color: var(--flyt-warn);
}
.status.paid { background: var(--flyt-ok-soft); color: var(--flyt-ok); }
.status.expired { background: #efece5; color: var(--flyt-muted); }
.request-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.request-actions form { margin: 0; }
.btn-small, .copy-btn, .delete-btn, .qr-toggle {
  width: auto;
  margin-top: 0;
  padding: 7px 12px;
  font-size: 0.85rem;
  border-radius: 8px;
}
.qr-toggle { display: inline-block; font-weight: 600; line-height: inherit; cursor: pointer; margin-bottom: 0; }
.request-actions { align-items: flex-start; }
.copy-btn, .qr-toggle {
  background: var(--flyt-card);
  color: var(--flyt-text);
  border: 1px solid var(--flyt-border-strong);
}
.copy-btn:hover, .qr-toggle:hover { background: var(--flyt-primary-soft); }
.delete-form { margin-left: auto !important; }
.delete-btn { background: transparent; color: var(--flyt-danger); padding: 7px 4px; }
.delete-btn:hover { background: transparent; text-decoration: underline; }
.ship-form { display: flex; gap: 8px; margin: 0; }
.ship-form input { flex-grow: 1; min-width: 0; padding: 8px 10px; }
.ship-form button { width: auto; margin-top: 0; padding: 8px 12px; font-size: 0.85rem; white-space: nowrap; }
.row-hint { font-size: 0.78rem; color: var(--flyt-muted); }
.qr-code {
  width: 160px;
  height: 160px;
  border-radius: 8px;
  background: #fff;
  padding: 6px;
  border: 1px solid var(--flyt-border);
}
details.qr summary { list-style: none; }
details.qr summary::-webkit-details-marker { display: none; }
details.qr[open] .qr-code { margin-top: 8px; display: block; }

/* The share panel after a link is created. */
.share { text-align: center; }
.share-total-label { font-size: 0.85rem; color: var(--flyt-muted); }
.share-total { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.share-sub { font-size: 0.85rem; color: var(--flyt-muted); margin-bottom: 12px; }
.share .qr-code { width: 200px; height: 200px; margin: 0 auto 12px; display: block; }
.share-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.share-actions .btn, .share-actions button { margin-top: 0; }
.next-steps { text-align: left; margin: 12px 0 0; padding: 12px 14px 12px 32px; border-radius: 10px; background: var(--flyt-bg); font-size: 0.85rem; color: var(--flyt-muted); }
.next-steps li + li { margin-top: 4px; }
.fee-note { font-size: 0.8rem; color: var(--flyt-muted); margin-top: 8px; }

/* The "..." menu on the payment list. */
.menu { position: relative; }
.menu-btn {
  width: auto;
  margin-top: 0;
  padding: 4px 10px;
  font-size: 1.1rem;
  line-height: 1;
  background: transparent;
  border: 1px solid var(--flyt-border);
  color: var(--flyt-muted);
}
.menu-btn:hover { color: var(--flyt-text); background: var(--flyt-bg); }
.menu-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 10;
  min-width: 260px;
  background: var(--flyt-card);
  border: 1px solid var(--flyt-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(11, 21, 18, 0.12);
  padding: 6px;
}
.menu-dropdown form { margin: 0; }
.menu-item {
  width: 100%;
  margin-top: 0;
  padding: 10px 12px;
  background: transparent;
  color: var(--flyt-text);
  font-weight: 500;
  font-size: 0.85rem;
  text-align: left;
  border-radius: 6px;
}
.menu-item:hover { background: var(--flyt-bg); }

/* --- Buyer checkout: a navy header with the total, then the details. --- */
.checkout-hero { background: var(--flyt-navy); color: #ffffff; }
.checkout-hero-inner { max-width: 480px; margin: 0 auto; padding: 16px 16px 56px; }
.checkout-hero .hero-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.checkout-hero .brand { color: #ffffff; }
.checkout-hero .brand-dot { color: #9EE6C4; }
.checkout-hero .secure { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--flyt-on-navy); }
.checkout-hero .lang-switcher { border-color: rgba(255, 255, 255, 0.25); }
.checkout-hero .lang-link { background: transparent; color: var(--flyt-on-navy); }
.checkout-hero .lang-link + .lang-link { border-left-color: rgba(255, 255, 255, 0.25); }
.checkout-hero .lang-link.active { background: #9EE6C4; color: var(--flyt-navy); }
.hero-pay-to { font-size: 0.85rem; color: var(--flyt-on-navy); }
.hero-total { font-size: 2.3rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.hero-desc { font-size: 0.85rem; color: var(--flyt-on-navy); overflow-wrap: anywhere; }
.checkout-body { margin-top: -40px; padding-top: 0; }
.checkout-body .card { padding: 16px; }
.price-summary { margin: 0; }
.price-summary div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 0.9rem; }
.price-summary dt { color: var(--flyt-muted); }
.price-summary dd { margin: 0; font-variant-numeric: tabular-nums; }
.price-summary .price-total { border-top: 1px solid var(--flyt-border); margin-top: 6px; padding-top: 10px; font-weight: 700; }
.price-summary .price-total dt { color: var(--flyt-text); }
.checkout-body .price-hint { font-size: 0.78rem; color: var(--flyt-muted); margin: 8px 0 0; }
.methods { border: none; padding: 0; margin: 4px 0 0; }
.methods legend {
  padding: 0;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--flyt-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
label.method-option {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  padding: 12px 14px;
  background: var(--flyt-card);
  border: 1px solid var(--flyt-border);
  border-radius: 10px;
  color: var(--flyt-text);
  font-size: 0.95rem;
  cursor: pointer;
  position: relative;
}
label.method-option:first-of-type { margin-top: 0; }
.method-option input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.method-option:has(input:checked) { border-color: var(--flyt-primary); box-shadow: 0 0 0 1px var(--flyt-primary) inset; }
.method-option:has(input:focus-visible) { outline: 2px solid var(--flyt-primary); outline-offset: 2px; }
.method-option.is-disabled { cursor: not-allowed; opacity: 0.5; }
.method-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--flyt-bg);
  color: var(--flyt-muted);
  flex-shrink: 0;
}
.method-option:has(input:checked) .method-icon { color: var(--flyt-primary); background: var(--flyt-primary-soft); }
.method-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.method-name { font-weight: 600; }
.method-detail { font-size: 0.8rem; color: var(--flyt-muted); }
.method-form button { margin-top: 12px; font-size: 1.05rem; padding: 14px 16px; }
.stripe-embed { min-height: 120px; }
.stripe-embed #stripe-payment { margin-top: 14px; }
.stripe-embed .btn { margin-top: 8px; }
.checkout-summary .card, .checkout-pay .card { margin-bottom: 12px; }
/* Laptops: the order on the left (it stays in view), paying on the right. */
@media (min-width: 880px) {
  .checkout-hero-inner, main.checkout-body { max-width: 920px; }
  .checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px; align-items: start; }
  .checkout-summary { position: sticky; top: 16px; }
}
.protection {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--flyt-card);
  border: 1px solid var(--flyt-border);
  font-size: 0.85rem;
  margin-top: 12px;
}
.protection svg { flex-shrink: 0; color: var(--flyt-ok); margin-top: 1px; }
.checkout-foot { text-align: center; font-size: 0.78rem; color: var(--flyt-muted); margin-top: 14px; }
.return-link { display: inline-block; margin-top: 12px; }
.done-icon {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  background: var(--flyt-ok-soft);
  color: var(--flyt-ok);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

/* --- Admin dashboard (src/adminViews.js) --- */
.small { font-size: 0.8rem; }
.admin-vendor-row { align-items: flex-start; flex-wrap: wrap; gap: 8px; }
.admin-fee-form { display: flex; align-items: center; gap: 6px; margin: 0; }
.admin-fee-form input[type="number"] { width: 64px; padding: 6px 8px; }
.admin-fee-form button { width: auto; margin-top: 0; padding: 6px 12px; font-size: 0.85rem; }
.admin-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--flyt-border);
}
.admin-nav a {
  padding: 8px 12px;
  color: var(--flyt-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.admin-nav a.active { color: var(--flyt-text); border-bottom-color: var(--flyt-primary); }
.admin-nav .admin-logout { margin-left: auto; font-weight: 500; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-head h1 { margin: 0; }
.segmented { display: inline-flex; border: 1px solid var(--flyt-border); border-radius: 8px; overflow: hidden; }
.segmented a { padding: 6px 12px; font-size: 0.8rem; font-weight: 600; color: var(--flyt-muted); text-decoration: none; background: var(--flyt-card); }
.segmented a + a { border-left: 1px solid var(--flyt-border); }
.segmented a.active { background: var(--flyt-ink); color: #ffffff; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--flyt-card); border: 1px solid var(--flyt-border); border-radius: 12px; padding: 16px; }
.stat-label { font-size: 0.8rem; color: var(--flyt-muted); }
.stat-value { font-size: 1.4rem; font-weight: 700; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 0.75rem; color: var(--flyt-muted); }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.admin-grid .card { margin-bottom: 0; }
.admin-grid + .card { margin-top: 16px; }
.admin-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--flyt-border);
}
.admin-row:last-child { border-bottom: none; }
.admin-row-link { color: inherit; text-decoration: none; }
.admin-row-link:hover .admin-row-main strong { color: var(--flyt-primary); }
.admin-row-main { min-width: 0; }
.admin-row-figures { text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #efece5;
  color: var(--flyt-muted);
  vertical-align: middle;
}
.pill-good { background: var(--flyt-ok-soft); color: var(--flyt-ok); }
.pill-bad { background: var(--flyt-danger-soft); color: var(--flyt-danger); }
.flash {
  background: var(--flyt-ok-soft);
  color: var(--flyt-ok);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.85rem;
  margin-bottom: 16px;
}
.flash-error { background: var(--flyt-danger-soft); color: var(--flyt-danger); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 0.9rem; }
.kv dt { color: var(--flyt-muted); white-space: nowrap; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row > div { flex: 1 1 160px; }
.field-row > .field-narrow { flex: 0 1 140px; }
.field-row label { margin-top: 0; }
.btn-danger { background: transparent; border: 1px solid var(--flyt-danger); color: var(--flyt-danger); }
.btn-danger:hover { background: var(--flyt-danger-soft); }
.admin-row-form { display: block; }
.partner-form { margin: 0; }
.partner-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }

/* Developers page: API keys, webhook deliveries. */
.table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin: 8px 0 16px; }
.table th { text-align: left; color: var(--flyt-muted); font-weight: 500; padding: 6px 8px; border-bottom: 1px solid var(--flyt-border); }
.table td { padding: 8px; border-bottom: 1px solid var(--flyt-border); vertical-align: middle; }
.table form { margin: 0; }
.link-button { background: none; border: none; padding: 0; width: auto; margin: 0; color: var(--flyt-primary); font: inherit; cursor: pointer; text-decoration: underline; }
.link-button:hover { background: none; color: var(--flyt-primary-hover); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85em; word-break: break-all; }
details summary { cursor: pointer; color: var(--flyt-primary); margin-bottom: 8px; }

@media (max-width: 560px) {
  .stat { padding: 12px; }
  .stat-value { font-size: 1.1rem; }
  .admin-row { flex-direction: column; }
  .admin-row-figures { text-align: left; }
  .table { display: block; overflow-x: auto; }
}

/* Admin payouts: the row's actions (hold, release, refund). */
.admin-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin-top: 6px; }
.admin-actions form { margin: 0; }

/* The vendor's payout for a paid request (views.js payoutLine). */
.payout-line { font-size: 0.8rem; color: var(--flyt-muted); margin: 2px 0 4px; }
.payout-line.payout-paid_out { color: var(--flyt-ok); }
.payout-line.payout-on_hold { color: var(--flyt-warn); }

/* Flyt-Shop (src/shopViews.js): product grid, product page, legal pages. */
.shop-currency { display: flex; gap: 4px; }
.shop-currency a { padding: 4px 10px; border: 1px solid var(--flyt-border); border-radius: 999px; font-size: 0.8rem; color: var(--flyt-muted); text-decoration: none; }
.shop-currency a.active { background: var(--flyt-ink); border-color: var(--flyt-ink); color: #ffffff; }
.shop-intro { margin: 8px 0 20px; }
.shop-intro h1 { font-size: 1.5rem; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.product-card { display: flex; flex-direction: column; gap: 8px; background: var(--flyt-card); border: 1px solid var(--flyt-border); border-radius: 12px; padding: 12px; }
.product-card:hover { border-color: var(--flyt-border-strong); }
.product-card-link { display: flex; flex-direction: column; gap: 4px; color: var(--flyt-text); text-decoration: none; }
.product-card-link:hover { color: var(--flyt-text); }
.product-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.add-form-inline { margin: 0; }
.add-form-inline button { width: auto; margin: 0; padding: 8px 12px; font-size: 0.85rem; }
.product-thumb, .product-image { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; background: var(--flyt-bg); margin-bottom: 6px; }
.product-image { border: 1px solid var(--flyt-border); border-radius: 12px; }
.shop-no-image { display: flex; align-items: center; justify-content: center; }
.product-card-name { font-weight: 600; }
.product-card-size { font-size: 0.85rem; color: var(--flyt-muted); }
.product-card-price { font-weight: 600; }
.product-layout { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 720px) { .product-layout { grid-template-columns: 1fr 1fr; align-items: start; } }
.product-price { font-size: 1.5rem; font-weight: 700; margin: 8px 0 4px; }
.product-text { white-space: pre-line; font-size: 0.92rem; }
.shop-narrow { max-width: 560px; margin: 0 auto; }
.shop-legal { max-width: 720px; margin: 0 auto; }
.shop-legal h2 { color: var(--flyt-text); font-weight: 600; margin: 20px 0 6px; }
.shop-details div { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--flyt-border); }
.shop-details dt { width: 170px; flex-shrink: 0; color: var(--flyt-muted); }
.shop-details dd { margin: 0; }
.shop-not-set { color: var(--flyt-danger); font-weight: 600; }
.shop-footer { border-top: 1px solid var(--flyt-border); background: var(--flyt-card); }
.shop-footer-inner { max-width: 960px; margin: 0 auto; padding: 20px 16px 32px; font-size: 0.82rem; color: var(--flyt-muted); }
.shop-footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 12px; }
.admin-product-form textarea { min-height: 90px; }
.admin-product-form .check { display: flex; gap: 8px; align-items: center; margin-top: 14px; color: var(--flyt-text); }
.admin-product-form .check input { width: auto; }

/* The box bar: sticks under the top of the screen on every shop page. */
.box-bar { position: sticky; top: 0; z-index: 10; background: var(--flyt-ink); color: #ffffff; box-shadow: 0 2px 8px rgba(11, 21, 18, 0.18); }
.box-bar-inner { max-width: 960px; margin: 0 auto; padding: 10px 16px; }
.box-bar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.box-bar-size { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; line-height: 1.3; }
.box-bar .muted, .box-bar-detail, .box-bar-hint { color: var(--flyt-on-navy); }
.box-bar-detail { font-size: 0.82rem; }
.box-bar-hint { font-size: 0.8rem; margin-top: 4px; }
.box-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 8px; background: #9EE6C4; color: var(--flyt-ink); font-weight: 700; }
.box-bar-btn { width: auto; margin: 0; padding: 8px 14px; background: #ffffff; color: var(--flyt-ink); font-size: 0.88rem; white-space: nowrap; }
.box-bar-btn:hover { background: var(--flyt-bg); color: var(--flyt-ink); }
.box-notice { font-size: 0.85rem; margin-bottom: 6px; color: #9EE6C4; }
.box-notice-error { color: #ffb4ab; }
.box-line { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--flyt-border); }
.box-line-name { flex: 1; color: var(--flyt-text); text-decoration: none; font-weight: 600; }
.box-line-qty { margin: 0; display: flex; gap: 6px; }
.box-line-qty select { width: auto; padding: 6px 8px; }
.box-line-qty button { margin: 0; }
.box-line-total { min-width: 80px; text-align: right; }
.box-sizes .box-current td { background: var(--flyt-primary-soft); }
