.checkout-body { background: #f4f6fb; min-height: 100vh; }

.checkout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: var(--black);
}
.checkout-header .brand img { height: 22px; }
.checkout-secure {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  font-weight: 600;
}

.checkout-wrap { max-width: 980px; margin: 0 auto; padding: 40px 24px 80px; }
.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.checkout-col { display: flex; flex-direction: column; gap: 20px; }

.checkout-card, .checkout-summary {
  background: #fff;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 10px 40px -20px rgba(15,23,42,0.15);
}
.checkout-card h2, .checkout-summary h2 { font-size: 16px; font-weight: 700; margin: 0 0 20px; color: var(--ink); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row .field-sm { grid-template-columns: none; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.field input, .field select {
  border: 1px solid #e4e7f0;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--blue-dark);
  box-shadow: 0 0 0 3px rgba(49,97,233,0.12);
}
.field input::placeholder { color: #a7adba; }

.pay-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.pay-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border: 1.5px solid #e4e7f0;
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.pay-tab .ic { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }
.pay-tab .ic svg { width: 100%; height: 100%; }
.pay-tab.active { border-color: var(--blue-dark); color: var(--blue-dark); background: #f2f6ff; }
.pay-info {
  background: #f6f7fb;
  border-radius: 10px;
  padding: 16px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
}

.checkout-summary { position: sticky; top: 24px; }
.summary-plan { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.summary-plan-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.summary-plan-icon img { width: 18px; filter: brightness(0) invert(1); }
.summary-plan strong { display: block; font-size: 15px; }
.summary-plan span { font-size: 12.5px; color: var(--muted); }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.summary-divider { height: 1px; background: #eef0f4; margin: 14px 0; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 20px; font-weight: 800; color: var(--ink); margin-bottom: 22px; }
.summary-total small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.checkout-submit { width: 100%; margin-bottom: 14px; }
.checkout-note { font-size: 11.5px; color: #9aa1b0; line-height: 1.6; margin: 0; }

.checkout-success[hidden] { display: none; }
.checkout-success {
  position: fixed;
  inset: 0;
  background: rgba(11,16,23,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.success-card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 44px 36px;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.35);
  animation: successPop .4s cubic-bezier(.2,.9,.3,1.3) both;
}
@keyframes successPop {
  from { opacity: 0; transform: scale(.9) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.success-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 15px; color: var(--muted); cursor: pointer; }
.success-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #ecfdf3;
  color: #16a34a;
  font-size: 26px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.success-card h3 { font-size: 19px; margin: 0 0 10px; }
.success-card p { font-size: 14px; color: var(--muted); line-height: 1.6; margin: 0 0 24px; }
.success-card .btn { width: 100%; }

.checkout-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13.5px;
  margin-top: 16px;
  line-height: 1.5;
}
.checkout-loading {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.85);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}
.checkout-loading[hidden] { display: none; }
.loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid #e4e7f0;
  border-top-color: var(--blue-dark);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 800px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-summary { position: static; order: -1; }
  .field-row { grid-template-columns: 1fr; }
}
