/* Pay Go — IPG redirect bridge (local, no CDN) */
:root {
  --pg-bg: #eef2f6;
  --pg-surface: #ffffff;
  --pg-ink: #1a2332;
  --pg-muted: #5c6b7a;
  --pg-line: #d8e0e8;
  --pg-accent: #1565c0;
  --pg-accent-soft: #e3f0fb;
  --pg-success: #2e7d32;
  --pg-danger: #c62828;
  --pg-radius: 14px;
  --pg-shadow: 0 1px 3px rgba(26, 35, 50, 0.06), 0 12px 32px rgba(26, 35, 50, 0.06);
}

body.pay-go-page {
  background: linear-gradient(165deg, #e8eef5 0%, #f4f6f9 45%, #eef1f5 100%) !important;
  min-height: 100vh;
  color: var(--pg-ink);
  margin: 0;
}

.pg-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
}

.pg-card {
  width: 100%;
  max-width: 420px;
  background: var(--pg-surface);
  border: 1px solid var(--pg-line);
  border-radius: var(--pg-radius);
  box-shadow: var(--pg-shadow);
  padding: 28px 24px 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: pg-in 0.45s ease both;
}

.pg-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #0d47a1, #1565c0, #42a5f5);
}

.pg-card.is-error::before {
  background: var(--pg-danger);
}

.pg-card.is-success::before {
  background: var(--pg-success);
}

.pg-card.is-pending::before {
  background: #90a4ae;
}

.pg-pending-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #eceff1;
  color: #607d8b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-family: Tahoma, sans-serif;
  font-weight: 700;
  line-height: 1;
}

.pg-success-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #e8f5e9;
  color: var(--pg-success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-family: Tahoma, sans-serif;
  font-weight: 700;
  line-height: 1;
}

.pg-btn-success {
  background: var(--pg-success);
}

.pg-btn-success:hover {
  background: #1b5e20;
}

.pg-btn-danger {
  background: var(--pg-danger);
}

.pg-btn-danger:hover {
  background: #b71c1c;
}

.pg-status-ok {
  color: var(--pg-success);
  font-family: 'Shabnam-Bold-FD', Tahoma, sans-serif;
}

.pg-status-nok {
  color: var(--pg-danger);
  font-family: 'Shabnam-Bold-FD', Tahoma, sans-serif;
}

.pg-status-pending {
  color: #607d8b;
  font-family: 'Shabnam-Bold-FD', Tahoma, sans-serif;
}

.pg-countdown {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--pg-muted);
}

.pg-logo {
  width: 44px;
  height: auto;
  margin: 0 auto 14px;
  display: block;
}

.pg-title {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-family: 'Shabnam-Bold-FD', Tahoma, sans-serif;
}

.pg-sub {
  margin: 0 0 20px;
  color: var(--pg-muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.pg-meta {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
  text-align: right;
}

.pg-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #f5f8fb;
  border: 1px solid var(--pg-line);
  border-radius: 10px;
  font-size: 0.86rem;
}

.pg-row span {
  color: var(--pg-muted);
}

.pg-row strong {
  color: var(--pg-ink);
  font-family: 'Shabnam-Bold-FD', Tahoma, sans-serif;
  direction: ltr;
}

.pg-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 16px;
  border: 3px solid var(--pg-accent-soft);
  border-top-color: var(--pg-accent);
  border-radius: 50%;
  animation: pg-spin 0.8s linear infinite;
}

.pg-dots {
  display: inline-flex;
  gap: 5px;
  vertical-align: middle;
  margin-right: 4px;
}

.pg-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pg-accent);
  opacity: 0.35;
  animation: pg-dot 1.2s ease-in-out infinite;
}

.pg-dots i:nth-child(2) { animation-delay: 0.2s; }
.pg-dots i:nth-child(3) { animation-delay: 0.4s; }

.pg-hint {
  margin-top: 18px;
  font-size: 0.78rem;
  color: var(--pg-muted);
}

.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: none;
  border-radius: 10px;
  background: var(--pg-accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  margin-top: 8px;
}

.pg-btn:hover {
  background: #0d47a1;
}

.pg-btn-ghost {
  background: #f0f3f7;
  color: var(--pg-muted);
}

.pg-btn-ghost:hover {
  background: #e4e9ef;
  color: var(--pg-ink);
}

.pg-error-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #ffebee;
  color: var(--pg-danger);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-family: Tahoma, sans-serif;
  font-weight: 700;
}

.pg-foot {
  margin-top: 18px;
  font-size: 0.75rem;
  color: #9aa7b5;
}

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

@keyframes pg-dot {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

@keyframes pg-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Manual pay + receipt */
.pg-card-wide {
  max-width: 480px;
}

.pg-alert {
  background: #ffebee;
  color: var(--pg-danger);
  border: 1px solid #ffcdd2;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 16px;
  font-size: 0.86rem;
  text-align: right;
}

.pg-form {
  text-align: right;
}

.pg-field {
  margin-bottom: 14px;
}

.pg-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  color: var(--pg-muted);
}

.pg-field label span {
  opacity: 0.7;
}

.pg-field input[type="text"],
.pg-field input.browser-default {
  display: block !important;
  width: 100%;
  height: 44px;
  border: 1px solid var(--pg-line);
  border-radius: 10px;
  padding: 0 12px;
  background: #fafbfc;
  color: var(--pg-ink);
  font-family: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.pg-field input:focus {
  outline: none;
  border-color: var(--pg-accent);
  box-shadow: 0 0 0 3px var(--pg-accent-soft);
  background: #fff;
}

.pg-field-hint {
  display: block;
  margin-top: 5px;
  color: #9aa7b5;
  font-size: 0.75rem;
}

.pg-banks {
  display: grid;
  gap: 8px;
}

.pg-bank {
  display: block;
  border: 1px solid var(--pg-line);
  border-radius: 10px;
  padding: 12px;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.pg-bank input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pg-bank-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
}

.pg-bank-body strong {
  font-family: 'Shabnam-Bold-FD', Tahoma, sans-serif;
  font-size: 0.92rem;
  color: var(--pg-ink);
}

.pg-bank-body em {
  font-style: normal;
  font-size: 0.78rem;
  color: var(--pg-muted);
}

.pg-bank.is-active {
  border-color: var(--pg-accent);
  background: var(--pg-accent-soft);
  box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.12);
}

.pg-bank.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pg-btn-block {
  width: 100%;
  margin-top: 8px;
}

.pg-receipt-box {
  border: 1px dashed var(--pg-line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
  background: #fcfdff;
  text-align: right;
}

.pg-receipt-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--pg-line);
}

.pg-receipt-head strong {
  display: block;
  font-family: 'Shabnam-Bold-FD', Tahoma, sans-serif;
  font-size: 0.9rem;
}

.pg-receipt-head span {
  font-size: 0.75rem;
  color: var(--pg-muted);
}

.pg-row-accent {
  background: var(--pg-accent-soft) !important;
  border-color: #bbdefb !important;
}

.pg-row-accent strong {
  color: var(--pg-accent) !important;
  font-size: 1rem;
}

.pg-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

@media print {
  body.pay-go-page {
    background: #fff !important;
  }
  .no-print,
  .pg-spinner,
  .pg-foot,
  .pg-dots {
    display: none !important;
  }
  .pg-card {
    box-shadow: none !important;
    border: none !important;
    max-width: 100% !important;
  }
  .pg-shell {
    padding: 0 !important;
    min-height: auto !important;
  }
}
