/* ============================================
   AFRICALLSHOP — Modern Wizard Design System
   ============================================ */

/* Variables */
:root {
  --acs-primary: #24a6e4;
  --acs-primary-light: #45b8ef;
  --acs-primary-50: #e8f4fc;
  --acs-success: #5cb85c;
  --acs-success-light: #dff0d8;
  --acs-danger: #d9534f;
  --acs-danger-light: #f2dede;
  --acs-warning: #f0ad4e;
  --acs-warning-light: #fcf8e3;
  --acs-gray-50: #f9fafb;
  --acs-gray-100: #f3f4f6;
  --acs-gray-200: #e5e7eb;
  --acs-gray-300: #d1d5db;
  --acs-gray-500: #6b7280;
  --acs-gray-700: #374151;
  --acs-gray-800: #1f2937;
  --acs-radius: 6px;
  --acs-radius-sm: 4px;
  --acs-shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --acs-shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --acs-shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  --acs-transition: all .2s ease;
}

/* Base overrides */
.acs-wizard {
  font-family: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 15px;
}

.acs-wizard h1, .acs-wizard h2, .acs-wizard h3, .acs-wizard h4 {
  font-weight: 700;
  color: var(--acs-gray-800);
  letter-spacing: -0.02em;
}

/* Balance bar */
.acs-balance {
  background: linear-gradient(135deg, var(--acs-primary), var(--acs-primary-light));
  color: white;
  padding: 16px 24px;
  border-radius: var(--acs-radius);
  margin-bottom: 24px;
  text-align: center;
  box-shadow: var(--acs-shadow-md);
}
.acs-balance strong {
  font-size: 1.4em;
  display: block;
  margin-top: 4px;
}

/* Step indicator */
.acs-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  gap: 0;
}
.acs-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.35;
  transition: var(--acs-transition);
}
.acs-step.active {
  opacity: 1;
}
.acs-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--acs-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  transition: var(--acs-transition);
}
.acs-step.done .acs-step-num {
  background: var(--acs-success);
}
.acs-step-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--acs-gray-500);
}
.acs-step-line {
  width: 48px;
  height: 2px;
  background: var(--acs-gray-200);
  margin: 0 10px;
  margin-bottom: 22px;
  transition: var(--acs-transition);
}
.acs-step-line.active {
  background: var(--acs-primary);
}

/* Card panels */
.acs-card {
  background: white;
  border-radius: var(--acs-radius);
  box-shadow: var(--acs-shadow);
  border: 1px solid var(--acs-gray-200);
  overflow: hidden;
  margin-bottom: 24px;
  transition: var(--acs-transition);
}
.acs-card-body {
  padding: 28px;
}
.acs-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.acs-card-header h4 {
  margin: 0;
  font-size: 18px;
}

/* Inputs */
.acs-input {
  width: 100%;
  padding: 14px 18px;
  font-size: 17px;
  border: 2px solid var(--acs-gray-200);
  border-radius: var(--acs-radius-sm);
  outline: none;
  transition: var(--acs-transition);
  text-align: center;
  background: var(--acs-gray-50);
}
.acs-input:focus {
  border-color: var(--acs-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  background: white;
}

/* Buttons */
.acs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--acs-radius-sm);
  cursor: pointer;
  transition: var(--acs-transition);
  text-decoration: none;
  width: 100%;
}
.acs-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--acs-shadow-md);
}
.acs-btn:active {
  transform: translateY(0);
}
.acs-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.acs-btn-primary {
  background: var(--acs-primary);
  color: white;
}
.acs-btn-primary:hover {
  background: var(--acs-primary-light);
  color: white;
}
.acs-btn-success {
  background: var(--acs-success);
  color: white;
}
.acs-btn-success:hover {
  background: #16a34a;
  color: white;
}
.acs-btn-danger {
  background: var(--acs-danger);
  color: white;
}
.acs-btn-back {
  background: transparent;
  border: 1px solid var(--acs-gray-300);
  color: var(--acs-gray-700);
  padding: 8px 16px;
  font-size: 13px;
  width: auto;
}
.acs-btn-back:hover {
  background: var(--acs-gray-50);
  color: var(--acs-gray-700);
}

/* Top-up amount buttons */
.acs-amount-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.acs-amount-btn {
  padding: 16px 12px;
  border: 2px solid var(--acs-gray-200);
  border-radius: var(--acs-radius-sm);
  background: white;
  font-weight: 700;
  font-size: 16px;
  color: var(--acs-gray-700);
  cursor: pointer;
  transition: var(--acs-transition);
  text-align: center;
}
.acs-amount-btn:hover {
  border-color: var(--acs-primary);
  background: var(--acs-primary-50);
  color: var(--acs-primary);
}
.acs-amount-btn.selected {
  border-color: var(--acs-primary);
  background: var(--acs-primary);
  color: white;
  box-shadow: var(--acs-shadow-md);
}

/* Plan cards */
.acs-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.acs-plan-card {
  padding: 16px;
  border: 2px solid var(--acs-gray-200);
  border-radius: var(--acs-radius-sm);
  background: white;
  cursor: pointer;
  transition: var(--acs-transition);
  text-align: left;
}
.acs-plan-card:hover {
  border-color: var(--acs-primary);
  background: var(--acs-primary-50);
}
.acs-plan-card.selected {
  border-color: var(--acs-primary);
  background: var(--acs-primary-50);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}
.acs-plan-card h5 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--acs-gray-800);
}
.acs-plan-card p {
  margin: 0;
  font-size: 13px;
  color: var(--acs-gray-500);
}

/* Confirmation table */
.acs-confirm-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}
.acs-confirm-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--acs-gray-100);
  font-size: 14px;
}
.acs-confirm-table td:first-child {
  color: var(--acs-gray-500);
  width: 40%;
}
.acs-confirm-table td:last-child {
  font-weight: 600;
  color: var(--acs-gray-800);
}
.acs-confirm-table .acs-highlight {
  color: var(--acs-success) !important;
  font-size: 16px;
}
.acs-confirm-table .acs-cost {
  color: var(--acs-primary) !important;
  font-size: 16px;
}

/* Result screen */
.acs-result {
  text-align: center;
  padding: 32px 20px;
}
.acs-result-icon {
  font-size: 64px;
  margin-bottom: 16px;
}
.acs-result-icon.success { color: var(--acs-success); }
.acs-result-icon.failed { color: var(--acs-danger); }
.acs-result h3 {
  margin-bottom: 8px;
  font-size: 22px;
}
.acs-result p {
  color: var(--acs-gray-500);
  margin-bottom: 20px;
}
.acs-result .acs-result-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.acs-result .acs-result-actions .acs-btn {
  width: auto;
  padding: 10px 20px;
  font-size: 14px;
}

/* Error message */
.acs-error {
  background: var(--acs-danger-light);
  color: var(--acs-danger);
  padding: 10px 14px;
  border-radius: var(--acs-radius-sm);
  margin-top: 12px;
  font-size: 13px;
  display: none;
}
.acs-error.visible {
  display: block;
}

/* Loading spinner */
.acs-loading {
  display: none;
  text-align: center;
  padding: 16px;
}
.acs-loading.visible {
  display: block;
}
.acs-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--acs-gray-200);
  border-top-color: var(--acs-primary);
  border-radius: 50%;
  animation: acs-spin 0.7s linear infinite;
  margin: 0 auto;
}
@keyframes acs-spin {
  to { transform: rotate(360deg); }
}

/* Submitted status */
.acs-submitted {
  background: var(--acs-warning-light);
  color: #92400e;
  padding: 10px 14px;
  border-radius: var(--acs-radius-sm);
  font-size: 13px;
  margin-top: 12px;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.acs-login {
  max-width: 420px;
  margin: 40px auto;
  padding: 0 15px;
}
.acs-login-header {
  text-align: center;
  margin-bottom: 32px;
}
.acs-login-header h2 {
  font-size: 28px;
  margin-bottom: 8px;
}
.acs-login-header p {
  color: var(--acs-gray-500);
}
.acs-form-group {
  margin-bottom: 16px;
}
.acs-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--acs-gray-700);
  margin-bottom: 6px;
}
.acs-form-links {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
}
.acs-form-links a {
  color: var(--acs-primary);
  text-decoration: none;
  font-weight: 500;
}
.acs-form-links a:hover {
  text-decoration: underline;
}
.acs-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--acs-gray-400);
  font-size: 12px;
  margin: 16px 0;
}
.acs-divider::before, .acs-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--acs-gray-200);
}

/* ============================================
   ACCOUNT / DASHBOARD
   ============================================ */
.acs-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 15px;
}
.acs-page-header {
  margin-bottom: 28px;
}
.acs-page-header h2 {
  font-size: 24px;
  margin-bottom: 4px;
}
.acs-page-header p {
  color: var(--acs-gray-500);
  margin: 0;
}
.acs-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.acs-info-item {
  background: white;
  border: 1px solid var(--acs-gray-200);
  border-radius: var(--acs-radius-sm);
  padding: 16px;
}
.acs-info-item .acs-info-label {
  font-size: 12px;
  color: var(--acs-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.acs-info-item .acs-info-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--acs-gray-800);
}
.acs-info-item .acs-info-value.highlight {
  color: var(--acs-primary);
  font-size: 20px;
}

/* Settings grid */
.acs-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.acs-settings-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border: 1px solid var(--acs-gray-200);
  border-radius: var(--acs-radius-sm);
  padding: 16px;
  text-decoration: none;
  color: var(--acs-gray-700);
  transition: var(--acs-transition);
  cursor: pointer;
}
.acs-settings-item:hover {
  border-color: var(--acs-primary);
  background: var(--acs-primary-50);
  color: var(--acs-primary);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--acs-shadow);
}
.acs-settings-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--acs-radius-sm);
  background: var(--acs-gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.acs-settings-item:hover .acs-settings-icon {
  background: var(--acs-primary-50);
}
.acs-settings-label {
  font-weight: 600;
  font-size: 14px;
}

/* ============================================
   BUY CREDIT
   ============================================ */
.acs-credit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.acs-credit-btn {
  padding: 20px 12px;
  border: 2px solid var(--acs-gray-200);
  border-radius: var(--acs-radius-sm);
  background: white;
  font-weight: 700;
  font-size: 18px;
  color: var(--acs-gray-700);
  cursor: pointer;
  transition: var(--acs-transition);
  text-align: center;
}
.acs-credit-btn:hover {
  border-color: var(--acs-primary);
  background: var(--acs-primary-50);
  color: var(--acs-primary);
}
.acs-credit-btn.selected {
  border-color: var(--acs-primary);
  background: var(--acs-primary);
  color: white;
  box-shadow: var(--acs-shadow-md);
}
.acs-payment-methods {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  background: var(--acs-gray-50);
  border-radius: var(--acs-radius-sm);
  margin-bottom: 20px;
}
.acs-payment-methods img {
  height: 28px;
  opacity: 0.7;
}
.acs-order-summary {
  background: var(--acs-gray-50);
  border-radius: var(--acs-radius-sm);
  padding: 20px;
  margin-bottom: 20px;
}
.acs-order-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}
.acs-order-row.total {
  border-top: 2px solid var(--acs-gray-200);
  margin-top: 8px;
  padding-top: 12px;
  font-weight: 700;
  font-size: 16px;
}

/* ============================================
   DATA TABLE
   ============================================ */
.acs-table {
  width: 100%;
  border-collapse: collapse;
}
.acs-table thead th {
  background: var(--acs-gray-50);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--acs-gray-500);
  border-bottom: 2px solid var(--acs-gray-200);
  text-align: left;
}
.acs-table tbody td {
  padding: 12px 14px;
  font-size: 14px;
  border-bottom: 1px solid var(--acs-gray-100);
  color: var(--acs-gray-700);
}
.acs-table tbody tr:hover {
  background: var(--acs-gray-50);
}
.acs-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.acs-badge-success { background: var(--acs-success-light); color: #166534; }
.acs-badge-danger { background: var(--acs-danger-light); color: #991b1b; }
.acs-badge-warning { background: var(--acs-warning-light); color: #92400e; }
.acs-badge-info { background: var(--acs-primary-50); color: var(--acs-primary); }

/* ============================================
   MODAL (modern override)
   ============================================ */
.acs-modal .modal-content {
  border: none;
  border-radius: var(--acs-radius);
  box-shadow: var(--acs-shadow-lg);
}
.acs-modal .modal-header {
  border-bottom: 1px solid var(--acs-gray-100);
  padding: 20px 24px;
}
.acs-modal .modal-body {
  padding: 24px;
}
.acs-modal .modal-footer {
  border-top: 1px solid var(--acs-gray-100);
  padding: 16px 24px;
}

/* Responsive */
@media (max-width: 768px) {
  .acs-card-body { padding: 20px; }
  .acs-amount-grid { grid-template-columns: repeat(2, 1fr); }
  .acs-plan-grid { grid-template-columns: 1fr; }
  .acs-steps { gap: 0; }
  .acs-step-line { width: 24px; margin: 0 4px; margin-bottom: 22px; }
  .acs-step-label { font-size: 10px; }
  .acs-balance strong { font-size: 1.2em; }
  .acs-info-grid { grid-template-columns: 1fr; }
  .acs-settings-grid { grid-template-columns: 1fr; }
  .acs-credit-grid { grid-template-columns: repeat(3, 1fr); }
  .acs-page { padding: 0 10px; }
  .acs-login { margin: 20px auto; }
}
