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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f6fa;
  color: #333;
  font-size: 14px;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
}

/* Wallet Card */
.wallet-card {
  background: linear-gradient(135deg, #6e3bde 0%, #3b5fe2 100%);
  border-radius: 16px;
  padding: 28px 24px;
  margin-bottom: 16px;
  color: white;
  box-shadow: 0 4px 20px rgba(110, 59, 222, 0.3);
}

.wallet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wallet-label {
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.wallet-balance {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -1px;
}

.wallet-currency {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 4px;
}

.btn-load {
  background: white;
  color: #6e3bde;
  border: none;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-load:hover {
  background: #f0ebff;
  transform: translateY(-1px);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tab {
  padding: 9px 18px;
  border: none;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.2s;
  font-weight: 500;
}

.tab:hover { background: #f8f5ff; color: #6e3bde; }
.tab.active { background: #6e3bde; color: white; box-shadow: 0 2px 8px rgba(110,59,222,0.3); }

/* Card */
.card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.card h2 {
  font-size: 15px;
  margin-bottom: 16px;
  color: #444;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Table */
table { width: 100%; border-collapse: collapse; font-size: 13px; }

th {
  text-align: left;
  padding: 10px 12px;
  color: #888;
  font-weight: 500;
  border-bottom: 2px solid #f0f0f0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 12px 12px;
  border-bottom: 1px solid #f8f8f8;
  color: #555;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }

.credit { color: #16a34a; font-weight: 600; }
.debit { color: #dc2626; font-weight: 600; }

/* Badge */
.badge {
  background: #f0ebff;
  color: #6e3bde;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
}

/* Status */
.status-completed { color: #16a34a; font-weight: 500; }
.status-pending { color: #d97706; font-weight: 500; }
.status-failed { color: #dc2626; font-weight: 500; }

/* Empty & Loading */
.empty, .loading {
  text-align: center;
  padding: 48px 20px;
  color: #bbb;
  font-size: 14px;
}

.empty::before { content: '📭'; display: block; font-size: 32px; margin-bottom: 8px; }

/* Rate Card */
.rate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.rate-item label {
  display: block;
  font-size: 13px;
  color: #555;
  margin-bottom: 8px;
  font-weight: 500;
}

.rate-input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.rate-input-wrap:focus-within { border-color: #6e3bde; }

.currency-symbol {
  padding: 0 10px;
  background: #f5f5f5;
  color: #666;
  font-size: 14px;
  border-right: 1.5px solid #e0e0e0;
  line-height: 38px;
}

.rate-input-wrap input {
  flex: 1;
  border: none;
  padding: 8px 12px;
  font-size: 14px;
  outline: none;
}

.btn-save-rates {
  background: #6e3bde;
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-save-rates:hover { background: #5c2ec4; }

.usage-type { font-weight: 500; color: #555; }
.usage-sms { color: #3b82f6; }
.usage-email { color: #8b5cf6; }
.usage-whatsapp { color: #22c55e; }
.usage-call { color: #f59e0b; }
.usage-mms { color: #ec4899; }

/* Modal */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.modal-content {
  background: white;
  border-radius: 16px;
  padding: 28px;
  width: 360px;
  max-width: 92%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-content h2 {
  margin-bottom: 24px;
  font-size: 18px;
  color: #333;
}

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

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

.form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus { border-color: #6e3bde; }

.quick-amounts {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.quick-amounts button {
  padding: 6px 14px;
  border: 1.5px solid #6e3bde;
  background: white;
  color: #6e3bde;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
}

.quick-amounts button:hover { background: #6e3bde; color: white; }

.modal-actions { display: flex; gap: 10px; }

.btn-cancel {
  flex: 1;
  padding: 11px;
  border: 1.5px solid #e0e0e0;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  transition: all 0.2s;
}

.btn-cancel:hover { background: #f5f5f5; }

.btn-pay {
  flex: 2;
  padding: 11px;
  background: #6e3bde;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-pay:hover { background: #5c2ec4; }
.btn-pay:disabled { background: #ccc; cursor: not-allowed; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e1e2e;
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  display: none;
  z-index: 9999;
  font-size: 13px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  max-width: 320px;
}

.toast.success { background: #16a34a; }
.toast.error { background: #dc2626; }

/* Responsive */
@media (max-width: 600px) {
  .wallet-balance { font-size: 28px; }
  .btn-load { padding: 10px 14px; font-size: 13px; }
  th, td { padding: 8px 6px; }
}
