*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f4f5f7;
  color: #1a1a2e;
  min-height: 100vh;
}

@keyframes ckSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Header ── */
.agpal-ck-header {
  background: #1b3a6b;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
}
.agpal-ck-header-inner {
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.agpal-ck-logo { text-decoration: none; }
.agpal-ck-secure-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #a7f3d0;
  font-size: 13px;
  font-weight: 600;
}

/* ── Page wrapper ── */
.agpal-ck-wrap {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px 60px;
}

/* ── Card ── */
.agpal-ck-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 680px) {
  .agpal-ck-card { grid-template-columns: 1fr; }
}

/* ── Left: summary ── */
.agpal-ck-summary {
  background: #1b3a6b;
  color: #fff;
  padding: 36px 32px;
}
.agpal-ck-summary-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}
.agpal-ck-org-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.agpal-ck-org-name {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}
.agpal-ck-org-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-top: 2px;
}
.agpal-ck-order-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}
.agpal-ck-line-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  gap: 12px;
}
.agpal-ck-line-sub { opacity: 0.75; }
.agpal-ck-line-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.agpal-ck-line-desc {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-top: 2px;
}
.agpal-ck-line-price {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}
.agpal-ck-divider {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin: 16px 0;
}
.agpal-ck-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
}
.agpal-ck-total-amount {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}
.agpal-ck-ref {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  margin-top: 20px;
}
.agpal-ck-ref strong { color: rgba(255,255,255,0.75); }

/* ── Right: payment ── */
.agpal-ck-payment {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
}
.agpal-ck-payment-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
}
.agpal-ck-payment-sub {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 24px;
}
.agpal-ck-info-row {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.agpal-ck-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.agpal-ck-info-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  flex-shrink: 0;
}
.agpal-ck-info-value {
  font-size: 14px;
  color: #1a1a2e;
  font-weight: 500;
  text-align: right;
  word-break: break-all;
}

/* ── Error ── */
.agpal-ck-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  color: #dc2626;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ── Pay button ── */
.agpal-ck-pay-btn {
  width: 100%;
  padding: 15px;
  background: #1b3a6b;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  margin-bottom: 16px;
  font-family: inherit;
}
.agpal-ck-pay-btn:hover:not(:disabled) {
  background: #142d54;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(27,58,107,0.3);
}
.agpal-ck-pay-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Stripe badge ── */
.agpal-ck-stripe-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 20px;
}

/* ── Cancel button ── */
.agpal-ck-cancel-btn {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  padding: 6px;
  font-family: inherit;
  transition: color 0.15s;
  margin-top: auto;
}
.agpal-ck-cancel-btn:hover { color: #1b3a6b; }