/* ==========================================================================
   SMART PRESENSI - TEMA PUTIH (CLEAN WHITE) & MOBILE FIRST
   Minimalis, Elegan, Cepat & Ringan
   ========================================================================== */

:root {
  /* Clean White Palette */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;

  /* Primary Blue Accent */
  --primary: #eb6025;
  --primary-hover: #d8521d;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;

  /* Neutral Slate Text */
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;

  /* Borders & Shadows */
  --border: #e2e8f0;
  --border-focus: #f68f3b;
  --shadow-card: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.02);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-btn: 0 4px 12px rgba(37, 99, 235, 0.2);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: all 0.2s ease-in-out;
}

/* Base Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  background: radial-gradient(circle at 50% 0%, #f1f5f9 0%, #f8fafc 100%);
}

/* Container Mobile-First (Max 440px) */
.mobile-container {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ==========================================================================
   TOP STEPPER PROGRESS (RINGKAS & BERSIH)
   ========================================================================== */
.step-progress-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  box-shadow: var(--shadow-sm);
}

.step-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  z-index: 2;
  transition: var(--transition);
}

.node-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-light);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  transition: var(--transition);
}

.node-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  transition: var(--transition);
}

/* Garis Antar Step */
.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 8px 18px 8px;
  transition: var(--transition);
  position: relative;
}

/* Step State: Active & Completed */
.step-node.active .node-circle {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.step-node.active .node-label {
  color: var(--primary);
  font-weight: 700;
}

.step-node.completed .node-circle {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.step-node.completed .node-label {
  color: var(--text-muted);
}

.step-line.completed {
  background: var(--primary);
}

/* ==========================================================================
   WHITE CARD UTAMA
   ========================================================================== */
.white-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

/* Panel Step Transisi */
.step-panel {
  display: none;
  animation: fadeIn 0.25s ease-out forwards;
}

.step-panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header Panel */
.panel-header {
  text-align: center;
  margin-bottom: 20px;
}

.panel-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.panel-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==========================================================================
   STEP 1: SAMBUTAN
   ========================================================================== */
.brand-header {
  text-align: center;
  margin-bottom: 18px;
}

.app-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px auto;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--primary-border);
}

.app-icon svg {
  width: 28px;
  height: 28px;
}

.app-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.4px;
}

.app-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

.welcome-box {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.welcome-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: center;
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
}

.pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   STEP 2: DONASI (HANYA GAMBAR QRIS)
   ========================================================================== */
.qris-single-wrapper {
  display: flex;
  justify-content: center;
  margin: 8px 0 20px 0;
}

.qris-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  max-width: 300px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  cursor: zoom-in;
  transition: var(--transition);
}

.qris-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(235, 96, 37, 0.12);
  transform: translateY(-2px);
}

.qris-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: contain;
  transition: var(--transition);
}

.qris-zoom-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  transition: var(--transition);
}

.qris-card:hover .qris-zoom-badge {
  background: var(--primary);
  transform: scale(1.1);
}

/* ==========================================================================
   MODAL LIGHTBOX (BUKA GAMBAR DENGAN LEBAR PENUH)
   ========================================================================== */
.image-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.image-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.image-modal-content {
  position: relative;
  max-width: 96vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: modalZoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalZoomIn {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.image-modal-img {
  max-width: 92vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  background: #ffffff;
  padding: 8px;
}

.image-modal-close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.image-modal-close:hover {
  background: #ffffff;
  color: #0f172a;
}

/* ==========================================================================
   STEP 3: DOWNLOAD
   ========================================================================== */
.file-summary-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 18px;
}

.file-icon {
  width: 40px;
  height: 40px;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.file-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.file-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 11px;
  color: var(--text-muted);
}

.download-action-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.btn-download {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-download.primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-btn);
}

.btn-download.primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-download.secondary {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-download.secondary:hover {
  background: var(--bg-subtle);
  border-color: #cbd5e1;
}

.btn-download-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-download.secondary .btn-download-icon {
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.btn-download-text {
  display: flex;
  flex-direction: column;
}

.btn-download-text strong {
  font-size: 13px;
  line-height: 1.2;
}

.btn-download-text small {
  font-size: 11px;
  opacity: 0.85;
}

/* ==========================================================================
   BUTTONS & ACTIONS
   ========================================================================== */
.card-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.btn-primary {
  width: 100%;
  height: 48px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(1px);
}

.btn-primary:disabled,
.btn-primary.disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
  transform: none !important;
}

/* Spinner mini dalam tombol */
.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #cbd5e1;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: btnSpin 0.7s linear infinite;
  display: inline-block;
}

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

.sub-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  transition: var(--transition);
}

.btn-link:hover {
  color: var(--primary);
}

.divider-dot {
  color: var(--text-light);
  font-size: 12px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.app-footer {
  text-align: center;
  font-size: 11px;
  color: var(--text-light);
  padding: 4px 0 12px 0;
}

/* Responsive Extra Small Screen */
@media (max-width: 360px) {
  .white-card {
    padding: 18px 14px;
  }

  .panel-title {
    font-size: 16px;
  }

  .qris-card {
    max-width: 230px;
  }
}