* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
  background: linear-gradient(135deg, #ee4d2d 0%, #c0392b 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

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

.card {
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.card-header {
  text-align: center;
  margin-bottom: 28px;
}

.card-header h1 {
  font-size: 22px;
  color: #333;
  margin-bottom: 6px;
}

.card-header p {
  font-size: 13px;
  color: #888;
}

.step {
  display: none;
}

.step.active {
  display: block;
}

label {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  display: block;
  margin-bottom: 10px;
}

.amount-input-group {
  display: flex;
  align-items: center;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 0 16px;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}

.amount-input-group:focus-within {
  border-color: #ee4d2d;
}

.currency {
  font-size: 20px;
  font-weight: 700;
  color: #ee4d2d;
  margin-right: 10px;
}

#amount {
  width: 100%;
  border: none;
  outline: none;
  font-size: 24px;
  font-weight: 700;
  padding: 14px 0;
  color: #333;
}

.quick-amounts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.quick-btn {
  padding: 10px 0;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fafafa;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: all 0.15s;
}

.quick-btn:hover {
  border-color: #ee4d2d;
  color: #ee4d2d;
  background: #fff5f2;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #ee4d2d, #d84315);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(238, 77, 45, 0.4);
}

.btn-secondary {
  flex: 1;
  padding: 12px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-outline {
  flex: 1;
  padding: 12px;
  background: #fff;
  color: #888;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-outline:hover {
  border-color: #e74c3c;
  color: #e74c3c;
}

.qris-info {
  text-align: center;
  margin-bottom: 16px;
}

.amount-display {
  font-size: 32px;
  font-weight: 800;
  color: #ee4d2d;
}

.qr-code-wrapper {
  display: flex;
  justify-content: center;
  padding: 16px;
  background: #fafafa;
  border-radius: 12px;
  border: 1px solid #eee;
  margin-bottom: 12px;
}

#qr-image {
  width: 280px;
  height: 280px;
  image-rendering: pixelated;
}

.timer {
  text-align: center;
  font-size: 13px;
  color: #888;
  margin-bottom: 16px;
}

#expiry-time {
  font-weight: 700;
  color: #e67e22;
}

.status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: #fff8e1;
  border-radius: 8px;
  font-size: 14px;
  color: #b8860b;
  margin-bottom: 20px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 3px solid #f0d060;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.qris-actions {
  display: flex;
  gap: 12px;
}

.result-box {
  text-align: center;
  padding: 32px 16px;
  border-radius: 12px;
  margin-bottom: 24px;
}

.result-box.success {
  background: #e8f8f0;
}

.result-box.expired {
  background: #fdecea;
}

.result-box h2 {
  font-size: 20px;
  margin-bottom: 8px;
}

.result-box.success h2 { color: #27ae60; }
.result-box.expired h2 { color: #c0392b; }
.result-box p { color: #666; font-size: 15px; }

.checkmark, .cross {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 800;
  margin: 0 auto 16px;
  color: #fff;
}

.checkmark {
  background: #27ae60;
  animation: pop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.cross {
  background: #c0392b;
  animation: pop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes pop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

.hidden {
  display: none;
}

#step-result .btn-primary {
  margin-top: 0;
}

/* ===== LOGIN PAGE ===== */
.login-body {
  background: linear-gradient(135deg, #ee4d2d 0%, #c0392b 100%);
}

.login-container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.logo-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #ee4d2d, #d84315);
  color: #fff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  margin: 0 auto 16px;
}

.login-logo h1 {
  font-size: 20px;
  color: #333;
  margin-bottom: 4px;
}

.login-logo p {
  font-size: 13px;
  color: #888;
}

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

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

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

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

.error-msg {
  background: #fdecea;
  color: #c0392b;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ===== NAVBAR ===== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #333;
  font-size: 15px;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #ee4d2d, #d84315);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-user {
  font-size: 13px;
  color: #666;
  font-weight: 600;
}

.btn-nav {
  padding: 7px 14px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: #f0f0f0;
  color: #444;
  transition: background 0.15s;
}

.btn-nav:hover {
  background: #e0e0e0;
}

.btn-nav.btn-danger {
  background: #fdecea;
  color: #c0392b;
}

.btn-nav.btn-danger:hover {
  background: #f9d6d3;
}

/* ===== STATUS ===== */
.status-indicator.pending {
  background: #fff8e1;
  color: #b8860b;
}

.status-indicator.success {
  background: #e8f8f0;
  color: #27ae60;
}

/* ===== MODAL RIWAYAT ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 100;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 440px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid #eee;
}

.modal-header h2 {
  font-size: 17px;
  color: #333;
}

.btn-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

.btn-close:hover {
  color: #333;
}

.history-list {
  overflow-y: auto;
  padding: 14px 22px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.history-item:last-child {
  border-bottom: none;
}

.h-amount {
  font-weight: 700;
  color: #333;
  font-size: 15px;
}

.h-trx {
  font-size: 11px;
  color: #aaa;
  margin-top: 2px;
}

.h-right {
  text-align: right;
}

.h-date {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-success { background: #e8f8f0; color: #27ae60; }
.badge-pending { background: #fff8e1; color: #b8860b; }
.badge-expired { background: #fdecea; color: #c0392b; }
.badge-failed { background: #fdecea; color: #c0392b; }

.empty-state {
  text-align: center;
  color: #aaa;
  font-size: 14px;
  padding: 30px 0;
}

.paid-at {
  font-size: 13px !important;
  color: #888 !important;
  margin-top: 6px;
}

/* ===== SETTINGS / MERCHANT LOGIN ===== */
.btn-nav {
  text-decoration: none;
  display: inline-block;
}

.optional {
  font-weight: 400;
  color: #aaa;
  font-size: 12px;
}

.status-card {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 22px;
  font-size: 14px;
}

.status-card.connected {
  background: #e8f8f0;
}

.status-card.disconnected {
  background: #fff8e1;
}

.status-card p {
  display: flex;
  align-items: center;
  gap: 8px;
}

.otp-info {
  font-size: 14px;
  color: #555;
  margin-bottom: 14px;
}

.otp-input {
  width: 100%;
  padding: 14px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 8px;
  text-align: center;
  outline: none;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}

.otp-input:focus {
  border-color: #ee4d2d;
}
