* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #f0f2f5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.container {
  width: 100%;
  max-width: 520px;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  position: relative;
}

.header {
  background: #fff;
  text-align: center;
  padding: 24px 20px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.header-success {
  background: linear-gradient(135deg, #2d8f4e, #28a745);
  color: #fff;
  padding: 36px 20px 28px;
}

.header-success h1 {
  color: #fff;
}

.check-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.subtitle {
  font-size: 14px;
  opacity: 0.85;
  margin-top: 4px;
}

.logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.header h1 {
  font-size: 20px;
  font-weight: 700;
  color: #212529;
}

.ref-banner {
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.ref-label {
  font-size: 13px;
  color: #6c757d;
  font-weight: 500;
}

.ref-number {
  font-size: 13px;
  font-weight: 700;
  color: #212529;
  font-family: 'SF Mono', 'Fira Code', monospace;
  word-break: break-all;
}

.status-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: #fef9f3;
  border-bottom: 1px solid #fde8c8;
}

.status-icon {
  flex-shrink: 0;
}

.status-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.status-label {
  font-size: 12px;
  color: #6c757d;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-value.pending {
  font-size: 16px;
  font-weight: 700;
  color: #e67e22;
}

.status-success {
  color: #28a745 !important;
  background: #e8f5e9;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 13px !important;
}

.tracking-timeline {
  padding: 24px 20px 24px 36px;
  border-bottom: 1px solid #f0f0f0;
}

.timeline-step {
  position: relative;
  padding-left: 28px;
  padding-bottom: 24px;
}

.timeline-step:last-child {
  padding-bottom: 0;
}

.timeline-step::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 18px;
  bottom: 0;
  width: 2px;
  background: #dee2e6;
}

.timeline-step:last-child::before {
  display: none;
}

.timeline-step.completed::before {
  background: #28a745;
}

.step-dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #dee2e6;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #dee2e6;
}

.timeline-step.completed .step-dot {
  background: #28a745;
  box-shadow: 0 0 0 2px #28a745;
}

.timeline-step.active .step-dot {
  background: #e67e22;
  box-shadow: 0 0 0 2px #e67e22, 0 0 0 6px rgba(230, 126, 34, 0.2);
}

.timeline-step.pending-step .step-dot {
  background: #fff;
  border: 3px solid #dee2e6;
  box-shadow: 0 0 0 2px #dee2e6;
}

.step-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.step-title {
  font-size: 14px;
  font-weight: 600;
  color: #212529;
}

.timeline-step.pending-step .step-title {
  color: #adb5bd;
}

.step-date {
  font-size: 12px;
  color: #868e96;
}

.timeline-step.pending-step .step-date {
  color: #ced4da;
}

.details-section {
  padding: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.details-section:last-of-type {
  border-bottom: none;
}

.details-section h2 {
  font-size: 13px;
  font-weight: 600;
  color: #495057;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  gap: 8px;
}

.detail-row .label {
  font-size: 14px;
  color: #6c757d;
  flex-shrink: 0;
}

.detail-row .value {
  font-size: 14px;
  font-weight: 600;
  color: #212529;
  text-align: right;
  word-break: break-word;
}

.total-row .label,
.total-row .value {
  font-size: 16px;
  font-weight: 700;
  color: #212529;
}

.pay-section {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
}

.pay-btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #e8590c, #f76707);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: opacity 0.2s;
  -webkit-appearance: none;
}

.pay-btn:hover {
  opacity: 0.9;
}

.pay-note {
  font-size: 12px;
  color: #868e96;
  margin-top: 8px;
}

.payment-form-section {
  padding: 20px;
}

.payment-form-section h2 {
  font-size: 13px;
  font-weight: 600;
  color: #495057;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #495057;
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #dee2e6;
  border-radius: 8px;
  font-size: 16px;
  color: #212529;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  background: #fff;
}

.form-group input:focus {
  border-color: #f76707;
  box-shadow: 0 0 0 3px rgba(247, 103, 7, 0.1);
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-group.half {
  flex: 1;
  min-width: 0;
}

.sms-info {
  font-size: 14px;
  color: #495057;
  line-height: 1.6;
  text-align: center;
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-radius: 16px;
}

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

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #f0f0f0;
  border-top: 4px solid #f76707;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  font-size: 16px;
  font-weight: 600;
  color: #212529;
  margin-bottom: 6px;
}

.loading-subtext {
  font-size: 13px;
  color: #868e96;
}

.footer {
  padding: 18px 20px;
  text-align: center;
  background: #fafafa;
}

.footer p {
  font-size: 13px;
  color: #868e96;
  line-height: 1.5;
}

@media (max-width: 480px) {
  body {
    padding: 8px;
    align-items: flex-start;
    padding-top: 12px;
  }

  .container {
    max-width: 100%;
  }

  .card {
    border-radius: 12px;
  }

  .header {
    padding: 20px 16px 14px;
  }

  .header h1 {
    font-size: 18px;
  }

  .logo {
    width: 42px;
    height: 42px;
  }

  .ref-banner {
    padding: 12px 16px;
    flex-direction: column;
    text-align: center;
    gap: 2px;
  }

  .ref-number {
    font-size: 12px;
  }

  .status-banner {
    padding: 14px 16px;
    gap: 10px;
  }

  .status-value.pending {
    font-size: 15px;
  }

  .tracking-timeline {
    padding: 20px 16px 20px 32px;
  }

  .timeline-step {
    padding-left: 24px;
    padding-bottom: 20px;
  }

  .step-title {
    font-size: 13px;
  }

  .step-date {
    font-size: 11px;
  }

  .details-section {
    padding: 16px;
  }

  .detail-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 6px 0;
  }

  .detail-row .value {
    text-align: left;
    font-size: 13px;
  }

  .detail-row .label {
    font-size: 13px;
  }

  .total-row {
    flex-direction: row !important;
    align-items: center !important;
  }

  .total-row .label,
  .total-row .value {
    font-size: 15px;
  }

  .pay-section {
    padding: 16px;
  }

  .pay-btn {
    padding: 14px 16px;
    font-size: 15px;
  }

  .payment-form-section {
    padding: 16px;
  }

  .form-group input {
    padding: 12px;
    font-size: 16px;
  }

  .form-row {
    gap: 8px;
  }

  .footer {
    padding: 14px 16px;
  }

  .footer p {
    font-size: 12px;
  }

  .loading-overlay {
    border-radius: 12px;
  }
}

@media (max-width: 360px) {
  body {
    padding: 4px;
    padding-top: 8px;
  }

  .header {
    padding: 16px 12px 12px;
  }

  .header h1 {
    font-size: 17px;
  }

  .logo {
    width: 38px;
    height: 38px;
  }

  .ref-banner {
    padding: 10px 12px;
  }

  .tracking-timeline {
    padding: 16px 12px 16px 28px;
  }

  .details-section {
    padding: 14px 12px;
  }

  .pay-section {
    padding: 14px 12px;
  }

  .payment-form-section {
    padding: 14px 12px;
  }

  .footer {
    padding: 12px;
  }
}

.step-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  gap: 0;
}

.step-progress-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 0 0 auto;
}

.step-progress-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #dee2e6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  position: relative;
  z-index: 2;
  transition: all 0.3s;
}

.step-progress-item.done .step-progress-dot {
  background: #28a745;
}

.step-progress-item.active .step-progress-dot {
  background: #f76707;
  box-shadow: 0 0 0 4px rgba(247, 103, 7, 0.2);
}

.step-progress-label {
  font-size: 10px;
  color: #adb5bd;
  margin-top: 4px;
  font-weight: 600;
  white-space: nowrap;
}

.step-progress-item.done .step-progress-label {
  color: #28a745;
}

.step-progress-item.active .step-progress-label {
  color: #f76707;
}

.step-progress-line {
  width: 24px;
  height: 2px;
  background: #dee2e6;
  flex-shrink: 0;
  margin: 0 2px;
  margin-bottom: 18px;
}

.step-progress-line.done {
  background: #28a745;
}

@media (max-width: 480px) {
  .step-progress {
    padding: 12px 10px;
  }
  .step-progress-dot {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }
  .step-progress-label {
    font-size: 9px;
  }
  .step-progress-line {
    width: 16px;
    margin-bottom: 16px;
  }
}

@media (max-width: 360px) {
  .step-progress {
    padding: 10px 6px;
  }
  .step-progress-dot {
    width: 22px;
    height: 22px;
    font-size: 9px;
  }
  .step-progress-label {
    font-size: 8px;
  }
  .step-progress-line {
    width: 12px;
    margin-bottom: 14px;
  }
}

@media (min-width: 768px) {
  body {
    padding: 40px 20px;
  }
}
