.merchant-content {
  max-width: 1440px;
}
.merchant-content .hero {
  min-height: 240px;
}
.hero-art {
  align-self: center;
  height: 170px;
}
.period,
.breadcrumb {
  font-size: 0.9rem;
  color: #54635b;
}
.stat-glyph {
  height: 23px;
  color: #58705a;
}
.toast {
  position: fixed;
  z-index: 20;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: 95vw;
  background: #1a3028;
  border-radius: 10px;
  color: white;
  padding: 0.5rem 0.75rem 0.5rem 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  box-shadow: 0 4px 24px #0003;
}
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.empty {
  padding: 2rem;
  text-align: center;
  color: #66756b;
}
.auth-page {
  max-width: 540px;
  margin: 5vh auto;
  padding: 1rem;
}
.auth-page > .brand {
  margin-bottom: 2rem;
}
dl {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 2fr;
  gap: 0.6rem;
  font-size: 0.92rem;
}
dt {
  color: #667168;
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.perms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.balance {
  font-size: 2.8rem;
}
.qr-paper {
  background: white;
  border-radius: 0.7rem;
  padding: 0.75rem;
  text-align: center;
}
.qr-paper img {
  width: min(230px, 100%);
}
.checkout-qr > * + *,
.checkout-detail > * + * {
  margin-top: 1rem;
}
.copyline small {
  display: block;
  color: #e7e7e7;
}
.copyline button {
  width: 100%;
  margin-top: 0.25rem;
}
.light-link {
  color: white;
}
.checkout-card {
  margin: auto;
}
.checkout-detail p {
  overflow-wrap: anywhere;
}
.checkout-detail > small,
.checkout-detail > a {
  display: block;
}
.modal {
  max-height: 88svh;
  overflow: auto;
}
.modal > .panel-head {
  margin-bottom: 1.2rem;
}
.modal code {
  overflow-wrap: anywhere;
}
.gateway-main .checkout-qr {
  background: #251e37;
  color: #fff;
}
.topbar select {
  max-width: 250px;
}
.field input[type="file"] {
  max-width: 100%;
}
button.stat {
  text-align: left;
  position: relative;
  padding-right: 2.5rem;
}
button.stat::after {
  content: "View";
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 0.76rem;
  color: #365b49;
  text-decoration: underline;
}
button.stat:hover {
  box-shadow: 0 2px 8px #18241f22;
}
.modal:has(.table-wrap) {
  width: min(94vw, 1100px);
  max-width: 1100px;
}
.deposit-requests {
  padding: clamp(16px, 2.4vw, 38px);
  min-width: 0;
}
.deposit-requests .tabs {
  border: 0;
  gap: 12px;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.deposit-tabs {
  border-bottom: 1px solid #c8cad0;
  padding-bottom: 24px;
}
.deposit-tabs .tabs button,
.request-tabs .tabs button {
  color: #303846;
  background: white;
  border-radius: 9px;
  min-height: 42px;
  padding: 10px 24px;
}
.deposit-tabs .tabs button {
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.deposit-tabs svg {
  color: #16181b;
  background: #f2f2f3;
  border-radius: 7px;
  width: 34px;
  height: 34px;
  padding: 6px;
}
.deposit-tabs .tabs .active,
.request-tabs .tabs .active {
  background: #252527;
  color: white;
}
.request-tabs .tabs button {
  border: 1px solid #687186;
  min-width: 145px;
}
.deposit-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 22px 0;
}
.deposit-tools label {
  display: flex;
  align-items: center;
  gap: 5px;
}
.deposit-tools input,
.deposit-tools select {
  width: auto;
  min-height: 34px;
  padding: 5px 8px;
  font-size: 0.88rem;
}
.deposit-tools input[type="search"] {
  margin-left: auto;
  min-width: 190px;
}
.deposit-requests .table-wrap {
  overflow-x: auto;
  max-width: 100%;
  border-radius: 0;
}
.deposit-requests th,
.deposit-requests td {
  white-space: nowrap;
  padding: 12px 10px;
}
.deposit-requests tbody tr {
  background: #f8f9fa;
}
.deposit-requests .badge.pending {
  background: #fff3bb;
  color: #764800;
}
.deposit-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}
.deposit-actions .deposit-action,
.slip-thumb,
.deposit-id {
  padding: 2px;
  background: transparent;
  border: 0;
  min-height: 0;
}
.deposit-actions .deposit-action {
  width: 28px;
  height: 30px;
  color: #687386;
  display: grid;
  place-items: center;
}
.deposit-action svg {
  width: 22px;
  height: 22px;
}
.deposit-action.approve {
  color: #009b50;
}
.deposit-action.reject {
  color: #da0928;
}
.deposit-action.webhook {
  color: #282b30;
}
.slip-thumb img {
  width: 38px;
  height: 54px;
  object-fit: contain;
  display: block;
}
.slip-preview {
  margin: 0;
  text-align: center;
}
.slip-preview img {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
}
.slip-preview figcaption {
  margin-top: 0.5rem;
}
.deposit-id {
  color: #38526b;
  text-decoration: underline;
}

.deposit-requests th {
  background: white;
  border-top: 1px solid #e0e2e5;
  color: #394454;
  letter-spacing: 0;
}

.scope-editor fieldset {
  border: 1px solid #e0e2e5;
  border-radius: 10px;
  padding: 0.6rem 0.9rem 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
}
.scope-editor legend {
  font-weight: 600;
  padding: 0 0.3rem;
}
.scope-editor .pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  width: 100%;
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}
.sidebar > label,
.sidebar .field {
  margin: 0 0 1rem;
}

.panel td .actions {
  flex-wrap: nowrap;
}

.scope-cell {
  display: grid;
  gap: 0.1rem;
}
.scope-cell small {
  color: var(--muted, #667085);
}

.scope-editor .pair {
  align-items: end;
}
.account-form .grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1.2rem;
  align-items: end;
}
.account-form h3 {
  margin: 0;
}
.segmented {
  display: inline-flex;
  border: 1px solid #e0e2e5;
  border-radius: 8px;
  overflow: hidden;
  max-width: 720px;
  width: 100%;
}
.segmented button {
  flex: 1;
  border: 0;
  border-radius: 0;
  background: white;
  color: #16181b;
  padding: 0.75rem 1rem;
  font-weight: 600;
}
.segmented button.active {
  background: #222;
  color: white;
}
.form-end {
  display: flex;
  justify-content: flex-end;
}
@media (max-width: 720px) {
  .account-form .grid-2 {
    grid-template-columns: 1fr;
  }
}
.segmented button {
  transition: none;
}
.segmented button.active,
.segmented button.active:hover:not(:disabled) {
  background: #222;
  border-color: #222;
  color: white;
}

/* ---- shared building blocks: icons, chips, alerts, tiles ---- */
.icon { flex: none; vertical-align: -3px; }
.nav-item .icon { margin-right: 0.55rem; }
button.danger { color: #a3261b; border-color: #efc7c2; }
button.danger:hover:not(:disabled) { background: #fdf0ee; border-color: #e3a39b; }
.link-button { border: 0; background: none; padding: 0; min-height: 0; color: var(--forest); text-decoration: underline; text-underline-offset: 3px; }
.link-button:hover:not(:disabled) { background: none; }
a.btn.primary { display: inline-flex; justify-content: center; gap: 0.45rem; }

.chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.chip.approved { background: #e4f4ea; color: #17613b; }
.chip.rejected { background: #fdeceb; color: #a3261b; }
.chip.pending { background: #eef3f1; color: #23493d; }
.chip.warning { background: #fff4d9; color: #7a5600; }
.chip.info { background: #e8f0fb; color: #224f87; }
.chip.neutral { background: #f1f2ef; color: #49564f; }
.chip.critical { background: #a3261b; color: white; }

.alerts { display: grid; gap: 0.5rem; margin-bottom: 1rem; }
.alert { display: flex; align-items: center; justify-content: flex-start; gap: 0.6rem; width: 100%; text-align: left; border-radius: 10px; }
.alert span { flex: 1; }
.alert .icon:last-child { transform: rotate(180deg); }
.alert.critical { background: #fdeceb; border-color: #efc7c2; color: #7d1d15; }
.alert.warning { background: #fff8e6; border-color: #f0dca6; color: #6b4b00; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.8rem; }
.stat-tile { display: grid; justify-items: start; gap: 0.25rem; padding: 0.9rem 1rem; min-height: 96px; border-radius: 12px; background: white; text-align: left; }
.stat-tile strong { font-size: 1.6rem; line-height: 1.1; }
.stat-tile span { color: var(--muted); font-weight: 500; }
.stat-tile:disabled { opacity: 1; cursor: default; }
.stat-tile.warning { border-color: #f0dca6; background: #fffbef; }
.stat-tile.critical { border-color: #efc7c2; background: #fff5f4; }

.meter { display: inline-flex; align-items: center; gap: 0.4rem; min-width: 110px; }
.meter .track { position: relative; flex: 1; height: 6px; border-radius: 3px; background: #e6eae6; overflow: hidden; }
.meter .fill { position: absolute; inset: 0 auto 0 0; background: var(--forest); }
.meter.high .fill { background: #c08a12; }
.meter.full .fill { background: #a3261b; }
.meter small { color: var(--muted); }

.segmented.small { max-width: 640px; }
.segmented.small button { padding: 0.55rem 0.8rem; gap: 0.4rem; display: inline-flex; justify-content: center; align-items: center; }

.choice-row { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.choice { display: grid; justify-items: center; gap: 0.4rem; width: 150px; min-height: 100px; border-radius: 12px; background: white; }
.choice.active { background: var(--dark); color: white; border-color: var(--dark); }
.choice.active:hover:not(:disabled) { background: var(--dark); color: white; }
.choice.danger.active, .choice.danger.active:hover:not(:disabled) { background: #a3261b; border-color: #a3261b; color: white; }

.source-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.source-list li { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.8rem; border: 1px solid var(--line); border-radius: 10px; background: white; }
.source-list li.off { opacity: 0.6; }
.source-list .rank { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--dark); color: white; font-weight: 700; font-size: 0.8rem; }
.source-list .grow { flex: 1; display: grid; }
.source-list small { color: var(--muted); }
.source-list .usage { display: grid; justify-items: end; font-size: 0.8rem; color: var(--muted); }

.flow { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0; margin: 0.6rem 0 0; }
.flow li { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.25rem 0.65rem; border-radius: 999px; background: #f1f2ef; font-size: 0.82rem; font-weight: 600; color: #3d4a44; }
.flow li + li::before { content: "›"; margin-right: 0.35rem; color: #9aa59f; }

.timeline summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 0.35rem; }
.timeline ol { list-style: none; padding: 0 0 0 0.9rem; margin: 0.6rem 0 0; border-left: 2px solid var(--line); display: grid; gap: 0.55rem; }
.timeline li { display: grid; grid-template-columns: 7.5rem 1fr; column-gap: 0.6rem; }
.timeline time { color: var(--muted); font-size: 0.8rem; }
.timeline small { grid-column: 2; color: var(--muted); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem 1.2rem; align-items: center; }
.facts dt { display: flex; align-items: center; gap: 0.4rem; font-weight: 600; }
.facts dd { margin: 0; }
.integration-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0.8rem; }
.integration { display: flex; align-items: center; gap: 0.8rem; padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: 12px; }
.integration div { flex: 1; display: grid; }
.integration small { color: var(--muted); }
.secret { word-break: break-all; padding: 0.6rem; background: #f1f2ef; border-radius: 8px; }
.title-row { display: flex; align-items: center; gap: 0.7rem; }
.title-row h1 { margin: 0; }
.empty-state { display: grid; justify-items: center; gap: 0.6rem; padding: 2rem; color: var(--muted); text-align: center; }
.toolbar.filters { gap: 0.6rem; }
.toolbar.filters input[type="search"] { min-width: 220px; }
.checkout-qr a.btn.primary,
.checkout-qr a.btn.primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--dark);
  margin-top: 0.8rem;
}

/* Live checkout */
.pay-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: .25rem; color: #49564f; }
.notice.checking strong { display: inline-flex; align-items: center; gap: .4rem; }
.notice.checking .icon { animation: spin 2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .notice.checking .icon { animation: none; } }
.facts .btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* Checkout: reference layout */
.checkout-card { width: min(100%, 1180px); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.checkout-qr { gap: .9rem; }
.checkout-qr h2 { font-size: 1.05rem; margin: 0; display: flex; align-items: center; gap: .5rem; color: #fff; }
.qr-head { display: flex; justify-content: space-between; align-items: center; }
.qr-head a { color: #fff; display: inline-flex; }
.checkout-qr .qr-paper { background: #fff; border-radius: 10px; padding: 1.2rem; display: grid; place-items: center; min-height: 220px; }
.checkout-qr .qr-paper img { border: 0; width: 190px; }
.qr-expired { display: grid; justify-items: center; gap: .3rem; color: #4b4458; text-align: center; }
.qr-expired small { color: #6a6475 !important; }
.copy-field { display: grid; gap: .35rem; }
.copy-field > small { color: #fff !important; font-weight: 700; font-size: .9rem; }
.copy-field button { justify-content: space-between; width: 100%; background: #fff; color: #1b2420; border: 0; border-radius: 6px; padding: .75rem 1rem; font-weight: 700; }
.copy-field button:hover:not(:disabled) { background: #f3f1f6; }
.upi-apps { display: grid; gap: .5rem; }
.upi-apps > small { color: #fff !important; font-weight: 700; font-size: .9rem; }
.upi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; }
.upi-app { display: grid; place-items: center; min-height: 58px; padding: .5rem; border-radius: 6px; background: #fff; color: var(--app, #1b2420); font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; text-decoration: none; border: 2px solid transparent; }
.upi-app:hover { border-color: var(--app); }
.upi-app:focus-visible { outline: 3px solid #dfba6b; outline-offset: 2px; }
.upi-other { color: #e1dce8; font-size: .85rem; display: inline-flex; gap: .35rem; align-items: center; justify-self: start; }
.upi-badge { display: inline-block; font-weight: 900; font-style: italic; letter-spacing: .04em; font-size: 1.5rem; color: #3d3d3d; border-bottom: 3px solid #f58220; line-height: 1.1; }
.checkout-detail h1 { margin-top: .6rem; }
.pay-notes p { color: #c0291c; margin: .2rem 0; font-size: .95rem; }
.pay-notes b { color: #1b2420; }
.slip-picker { display: grid; gap: .4rem; grid-template-columns: minmax(0, 1fr); }
.slip-title { font-weight: 700; }
.slip-input { position: relative; display: flex; align-items: center; justify-content: space-between; gap: .5rem; border: 1px solid #d9ddd8; border-radius: 6px; padding: .3rem .3rem .3rem .9rem; color: #5b6560; font-size: .9rem; }
.slip-input input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.slip-input .btn, .checkout-detail .slip-input .primary { min-height: 34px; pointer-events: none; flex: none; width: auto; padding-inline: 1.4rem; }
.slip-input > span:first-child { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slip-input:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.must-show { display: grid; gap: .45rem; border: 1px solid #e3e6e1; background: #f8f9fb; border-radius: 8px; padding: .9rem 1rem; font-size: .92rem; }
.must-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.must-show a { color: #1a5fd0; cursor: pointer; }
.session { display: grid; gap: .35rem; font-size: .85rem; }
.session > div:first-child { display: flex; justify-content: space-between; }
.session .track { height: 4px; border-radius: 2px; background: #e6eae6; overflow: hidden; position: relative; }
.session .fill { position: absolute; inset: 0 auto 0 0; background: #1b2420; transition: width 1s linear; }
.btn.dark, button.dark { background: #161a1d; color: #fff; border-color: #161a1d; }
.btn.wide, button.wide { width: 100%; min-height: 46px; }
.checkout-detail .return { display: inline-flex; align-items: center; gap: .35rem; }
.notice.ok { background: #e4f4ea; border-color: #bfe0cb; color: #17613b; }
.notice.bad { background: #fdeceb; border-color: #efc7c2; color: #a3261b; }
@media (max-width: 760px) { .checkout-card { grid-template-columns: 1fr; } }

/* Demo shop deposit */
.deposit { display: grid; gap: 1rem; }
.amount-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.amount-chip { min-width: 92px; min-height: 46px; border-radius: 10px; font-size: 1rem; font-weight: 600; }
.amount-chip.active { border: 2px solid #6d8fd8; background: #f4f7ff; }
.deposit-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: .6rem; }
.stepper { display: flex; align-items: center; border: 1px solid #d9ddd8; border-radius: 12px; overflow: hidden; min-height: 60px; }
.stepper button { border: 0; background: transparent; font-size: 1.6rem; min-width: 56px; min-height: 58px; }
.stepper input { border: 0; width: 140px; text-align: center; font-size: 1.1rem; font-weight: 600; }
.stepper input:focus-visible { outline: none; }
.deposit-submit { min-width: 180px; background: #3ecf9a !important; border-color: #3ecf9a !important; color: #fff; box-shadow: 0 8px 20px #3ecf9a55; }
.deposit-row > .btn:not(.primary):not(.danger) { min-width: 180px; color: #16a06e; border-color: #3ecf9a; }
.selected-amount { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid #e3e6e1; border-radius: 999px; padding: .5rem 1.2rem; font-size: 1.1rem; box-shadow: 0 2px 8px #0000000d; }
.selected-amount b { color: #16a06e; font-size: 1.3rem; }
.transfer-card { display: grid; gap: .8rem; max-width: 520px; border: 1px solid #e3e6e1; border-top: 4px solid #3a4150; border-radius: 12px; padding: 1rem 1.2rem; }
.transfer-card h3 { display: flex; align-items: center; gap: .7rem; margin: 0; font-size: 1.15rem; }
.transfer-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: #eef0fb; }
.amount-pill { justify-self: start; border: 1px solid #d9ddd8; background: #f1f2ef; border-radius: 8px; padding: .35rem .8rem; font-weight: 600; }
.transfer-foot { display: flex; justify-content: space-between; align-items: center; gap: .8rem; }
