.merchant-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  margin-bottom: 20px;
  padding: 26px 28px;
  border: 1px solid #ddd6fe;
  border-radius: 22px;
  background:
    radial-gradient(circle at 82% 20%, rgba(34, 197, 94, .18), transparent 28%),
    radial-gradient(circle at 14% 120%, rgba(139, 92, 246, .22), transparent 38%),
    linear-gradient(135deg, #ffffff, #f8f7ff 56%, #effcf7);
  box-shadow: 0 14px 35px rgba(46, 31, 104, .08);
}

.merchant-hero::after {
  content: "₹";
  position: absolute;
  right: 150px;
  top: -38px;
  color: rgba(109, 40, 217, .055);
  font-size: 170px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.merchant-hero h2 {
  margin: 6px 0 5px;
  font-size: clamp(22px, 3vw, 30px);
}

.merchant-hero p {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.merchant-hero button {
  position: relative;
  z-index: 1;
  min-width: 155px;
  box-shadow: 0 11px 24px rgba(109, 40, 217, .24);
}

.route-designer {
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 7px 24px rgba(32, 24, 74, .04);
}

.route-designer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.route-designer-head h3 {
  margin: 5px 0 3px;
  font-size: 19px;
}

.route-designer-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.live-count {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #ecfdf3;
  color: #087a4b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}

.route-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 13px;
}

.route-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 17px;
  border: 1px solid #e5e0f8;
  border-radius: 17px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(249, 247, 255, .96)),
    #fff;
  box-shadow: 0 8px 20px rgba(37, 25, 82, .055);
}

.route-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--purple2), var(--green));
}

.route-card-blocked {
  opacity: .72;
  background: #fafafa;
}

.route-card-blocked::before {
  background: #ef6375;
}

.route-card-top,
.route-usage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.route-number {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: #f0eafe;
  color: var(--purple);
  font-size: 12px;
  font-weight: 900;
}

.route-status {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}

.route-status.is-live {
  color: var(--green);
}

.route-status.is-blocked {
  color: var(--red);
}

.route-card > small {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.route-card h4 {
  overflow: hidden;
  margin: 4px 0 2px;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-card code {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.range-pill {
  display: grid;
  gap: 4px;
  margin: 15px 0;
  padding: 11px 12px;
  border: 1px solid #ddd6fe;
  border-radius: 12px;
  background: linear-gradient(135deg, #f7f3ff, #f0fdf8);
}

.range-pill span,
.range-preview span {
  color: var(--purple);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .13em;
}

.range-pill strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-usage {
  color: var(--muted);
  font-size: 10px;
}

.route-usage strong {
  color: var(--ink);
}

.route-meter {
  overflow: hidden;
  height: 6px;
  margin-top: 8px;
  border-radius: 99px;
  background: #eceaf2;
}

.route-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple2), var(--green));
}

.route-alerts {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.route-alert {
  display: grid;
  grid-template-columns: 135px 1fr;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 11px;
  font-size: 12px;
}

.route-alert.gap {
  background: #fff7e8;
  color: #945b05;
}

.route-alert.overlap {
  background: #f2efff;
  color: #5d2ab7;
}

.route-alert span {
  color: inherit;
  opacity: .9;
}

.route-empty {
  padding: 28px;
  border: 1px dashed #d8d3e7;
  border-radius: 15px;
  background: #fbfaff;
  color: var(--muted);
  text-align: center;
}

.merchant-help-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.merchant-help-grid > div {
  display: grid;
  gap: 4px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .72);
}

.merchant-help-grid strong {
  font-size: 12px;
}

.merchant-help-grid span {
  color: var(--muted);
  font-size: 11px;
}

.table-range {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 8px;
  background: #f3efff;
  color: #5c25b5;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 5px;
  padding-top: 4px;
}

.form-section-title:not(:first-child) {
  margin-top: 13px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.form-section-title > span {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--purple), var(--purple2));
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.form-section-title div {
  display: grid;
  gap: 2px;
}

.form-section-title small,
.merchant-form label small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.range-preview {
  display: grid;
  gap: 5px;
  padding: 13px 15px;
  border: 1px solid #d8cafa;
  border-radius: 12px;
  background: linear-gradient(135deg, #f5f0ff, #effcf7);
}

.range-preview strong {
  font-size: 16px;
}

.range-preview strong.invalid {
  color: var(--red);
}

@supports selector(.modal:has(.merchant-form)) {
  .modal:has(.merchant-form) .modal-card {
    width: min(790px, 100%);
  }
}

@media (max-width: 760px) {
  .merchant-hero {
    align-items: stretch;
    flex-direction: column;
    padding: 22px 19px;
  }

  .merchant-hero::after {
    right: -12px;
  }

  .merchant-hero button {
    width: 100%;
  }

  .route-designer {
    padding: 17px 14px;
  }

  .route-card-grid,
  .merchant-help-grid {
    grid-template-columns: 1fr;
  }

  .route-alert {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

.payment-link-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 16px;
  padding: 25px 27px;
  border: 1px solid #d8cdf8;
  border-radius: 21px;
  background:
    radial-gradient(circle at 90% 0, rgba(19, 151, 101, .16), transparent 30%),
    linear-gradient(135deg, #fff, #f5f0ff 65%, #effcf7);
  box-shadow: 0 12px 32px rgba(39, 25, 91, .07);
}

.payment-link-hero h2 {
  margin: 5px 0 4px;
  font-size: 25px;
}

.payment-link-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.payment-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
  margin-top: 18px;
}

.payment-link-card {
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 8px 25px rgba(32, 24, 74, .055);
}

.payment-link-card.is-disabled {
  opacity: .7;
}

.payment-link-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
}

.payment-link-card h3 {
  margin: 15px 0 3px;
  font-size: 17px;
}

.payment-link-card > p {
  min-height: 34px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.payment-link-amount {
  display: grid;
  gap: 3px;
  margin: 14px 0;
  padding: 11px 12px;
  border: 1px solid #ddd5f5;
  border-radius: 11px;
  background: linear-gradient(135deg, #f5f1ff, #f1fcf8);
}

.payment-link-amount span {
  color: var(--purple);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .1em;
}

.payment-link-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  margin-bottom: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.payment-link-stats > div {
  display: grid;
  gap: 3px;
  padding: 9px;
  text-align: center;
}

.payment-link-stats > div + div {
  border-left: 1px solid var(--line);
}

.payment-link-stats span {
  color: var(--muted);
  font-size: 9px;
}

.payment-link-stats strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
}

.share-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  margin: 10px 0;
}

.share-link input {
  min-width: 0;
  padding: 9px 10px;
  background: #fafbfe;
  font-size: 10px;
}

.share-link button {
  padding: 8px 11px;
  font-size: 11px;
}

.real-link-warning {
  padding: 11px 13px;
  border-radius: 10px;
  background: #fff7e8;
  color: #8b5607;
  font-size: 11px;
  line-height: 1.45;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid #dcd5f1;
  border-radius: 11px;
  background: #f8f6ff;
}

.checkbox-label input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  accent-color: var(--purple);
}

.link-ready {
  display: grid;
  gap: 13px;
  text-align: center;
}

.link-ready .state-icon {
  display: grid;
  width: 60px;
  height: 60px;
  margin: auto;
  place-items: center;
  border-radius: 50%;
  background: #eafaf3;
  color: var(--green);
  font-size: 26px;
  font-weight: 900;
}

.link-ready h3,
.link-ready p {
  margin: 0;
}

.link-ready p {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 760px) {
  .payment-link-hero {
    align-items: stretch;
    flex-direction: column;
    padding: 21px 18px;
  }

  .payment-link-grid {
    grid-template-columns: 1fr;
  }
}
