body {
  background: linear-gradient(180deg, #f7f2e8 0%, #eef3ea 40%, #e7efe7 100%);
  color: var(--color-ink);
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--color-ink);
}

.brand-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
}

.brand-subtitle {
  margin: 4px 0 0;
  color: var(--color-muted);
  font-size: 13px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-ink);
  font-weight: 600;
  background: white;
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

.back-link .arrow {
  font-size: 18px;
}

.branch-hero {
  background: white;
  border-radius: 26px;
  padding: 28px;
  box-shadow: var(--shadow-strong);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-emerald);
  font-size: 12px;
}

.branch-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 38px);
  margin: 16px 0 10px;
}

.subtitle {
  color: var(--color-muted);
  font-size: 16px;
  line-height: 1.7;
}

.hero-panel {
  background: white;
  color: var(--color-ink);
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(27, 42, 36, 0.1);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.panel-title {
  font-weight: 700;
  margin: 0;
}

.panel-text {
  margin: 0;
  color: var(--color-muted);
  font-size: 13px;
}

.payment-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px 12px;
  padding-top: 6px;
}

.pay-logo {
  height: 27px;
  width: auto;
  object-fit: contain;
  background: transparent;
  border: none;
  padding: 0;
  filter: saturate(1.05);
}

.pay-logo--boost {
  transform: scale(1.6);
  transform-origin: center;
  margin: 0 6px;
}


.loading {
  text-align: center;
  padding: 30px 20px;
}

.spinner {
  width: 46px;
  height: 46px;
  border: 4px solid rgba(27, 42, 36, 0.1);
  border-top-color: var(--color-emerald);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error-message {
  text-align: center;
  padding: 24px 20px;
  background: #fff5f5;
  border-radius: 16px;
  margin: 0 auto;
  max-width: 500px;
  box-shadow: var(--shadow-soft);
}

.error-message p {
  color: #c53030;
  margin: 0;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.link-card {
  background: white;
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.link-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
}

.link-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.link-card h3 {
  margin: 0;
  font-size: 18px;
}

.link-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.6;
}

.link-badge {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-recurring {
  background: rgba(62, 124, 95, 0.15);
  color: var(--color-emerald-dark);
}

.badge-flex {
  background: rgba(27, 42, 36, 0.08);
  color: var(--color-muted);
}

.link-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(27, 42, 36, 0.1);
  padding-top: 14px;
}

.link-amount {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.link-amount .amount {
  font-size: 22px;
  font-weight: 700;
}

.link-amount .amount.open {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-muted);
}

.link-amount .currency {
  font-size: 12px;
  color: var(--color-muted);
  font-weight: 600;
}

.currency-symbol {
  width: 14px;
  height: 14px;
  display: inline-block;
}

.link-amount .interval {
  font-size: 12px;
  color: var(--color-emerald-dark);
  font-weight: 600;
}

.buy-button {
  padding: 10px 22px;
  background: var(--color-emerald);
  color: white;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.buy-button:hover {
  background: var(--color-emerald-dark);
}

.empty-state {
  background: rgba(27, 42, 36, 0.05);
  padding: 18px;
  border-radius: 14px;
  color: var(--color-muted);
  font-size: 14px;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(27, 42, 36, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-strong);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid rgba(27, 42, 36, 0.1);
}

.modal-header h2 {
  font-size: 20px;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--color-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.modal-close:hover {
  background: rgba(27, 42, 36, 0.05);
}

#checkout-form {
  padding: 24px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(27, 42, 36, 0.2);
  border-radius: 12px;
  font-size: 14px;
  transition: all 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-emerald);
  box-shadow: 0 0 0 3px rgba(62, 124, 95, 0.15);
}

.phone-input-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid rgba(27, 42, 36, 0.2);
  border-radius: 12px;
  transition: all 0.2s;
  background: white;
  cursor: text;
  direction: ltr;
}

.phone-input-wrapper.focused {
  border-color: var(--color-emerald);
  box-shadow: 0 0 0 3px rgba(62, 124, 95, 0.15);
}

.phone-prefix {
  padding: 12px;
  font-size: 14px;
  color: var(--color-ink);
  font-weight: 600;
  user-select: none;
  background: rgba(27, 42, 36, 0.04);
  border-right: 1px solid rgba(27, 42, 36, 0.1);
  border-radius: 12px 0 0 12px;
  display: flex;
  align-items: center;
}

.phone-input-wrapper input {
  border: none;
  border-radius: 0 12px 12px 0;
  flex: 1;
  padding: 12px 16px;
  direction: ltr;
  text-align: left;
}

.phone-input-wrapper input:focus {
  outline: none;
  border: none;
  box-shadow: none;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.btn-primary,
.btn-secondary {
  flex: 1;
  padding: 12px 22px;
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background: var(--color-emerald);
  color: white;
}

.btn-primary:hover {
  background: var(--color-emerald-dark);
}

.btn-secondary {
  background: rgba(27, 42, 36, 0.05);
  color: var(--color-ink);
}

.btn-secondary:hover {
  background: rgba(27, 42, 36, 0.1);
}

@media (max-width: 768px) {
  .modal-content {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .modal-actions {
    flex-direction: column;
  }
}
