ilhamdev commited on
Commit
a364ccb
·
1 Parent(s): 2ebb4db

fix: resolve pairing 400 error, update whatsmeow, add favicon and GSC SEO assets, enhance clean UI

Browse files
Dockerfile CHANGED
@@ -1,5 +1,5 @@
1
  # Stage 1: Build binary Go
2
- FROM golang:1.24-alpine AS builder
3
 
4
  WORKDIR /app
5
 
 
1
  # Stage 1: Build binary Go
2
+ FROM golang:alpine AS builder
3
 
4
  WORKDIR /app
5
 
app.py CHANGED
@@ -28,7 +28,7 @@ def get_latest_go_version():
28
  return ver.lstrip("go")
29
  except Exception as e:
30
  print(f"[HF Space] Gagal mendeteksi versi Go otomatis: {e}", flush=True)
31
- return "1.25.0"
32
 
33
  import threading
34
  import time
 
28
  return ver.lstrip("go")
29
  except Exception as e:
30
  print(f"[HF Space] Gagal mendeteksi versi Go otomatis: {e}", flush=True)
31
+ return "1.26.0"
32
 
33
  import threading
34
  import time
frontend/app.js CHANGED
@@ -9,6 +9,10 @@ function getDefaultBackendUrl() {
9
  if (saved && saved.trim() !== '') {
10
  return saved.trim();
11
  }
 
 
 
 
12
  // Jika dibuka lokal di komputer (localhost/127.0.0.1)
13
  if (window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1') {
14
  return window.location.origin;
@@ -17,8 +21,11 @@ function getDefaultBackendUrl() {
17
  if (window.location.hostname.includes('hf.space')) {
18
  return window.location.origin;
19
  }
20
- // Default otomatis untuk Vercel:
21
- return DEFAULT_HF_BACKEND;
 
 
 
22
  }
23
 
24
  // Application State
@@ -40,11 +47,15 @@ const fileInput = document.getElementById('file-input');
40
  const dropEmpty = document.getElementById('drop-empty');
41
  const dropPreview = document.getElementById('drop-preview');
42
  const previewImage = document.getElementById('preview-image');
 
43
  const fileNameDisplay = document.getElementById('file-name-display');
44
  const fileDimDisplay = document.getElementById('file-dim-display');
45
  const btnChangeImage = document.getElementById('btn-change-image');
46
  const btnStart = document.getElementById('btn-start-process');
47
 
 
 
 
48
  const turnstileWrapper = document.getElementById('turnstile-wrapper');
49
  const turnstileWidget = document.getElementById('turnstile-widget');
50
  const turnstileFeedback = document.getElementById('turnstile-feedback');
@@ -273,6 +284,14 @@ function initDropZone() {
273
  }
274
  });
275
 
 
 
 
 
 
 
 
 
276
  btnChangeImage.addEventListener('click', (e) => {
277
  e.stopPropagation();
278
  fileInput.click();
@@ -347,6 +366,9 @@ function handleSelectedFile(file) {
347
  // Store optimized JPEG (quality 0.95)
348
  state.currentImageBase64 = canvas.toDataURL('image/jpeg', 0.95);
349
  previewImage.src = state.currentImageBase64;
 
 
 
350
  updateStartButtonState();
351
 
352
  dropEmpty.classList.add('hidden');
@@ -375,6 +397,17 @@ function initTabs() {
375
  phoneInputGroup.classList.remove('hidden');
376
  inputPhoneNumber.focus();
377
  });
 
 
 
 
 
 
 
 
 
 
 
378
  }
379
 
380
  /* ==========================================================================
@@ -612,6 +645,13 @@ function initSettings() {
612
  }
613
  });
614
 
 
 
 
 
 
 
 
615
  btnSaveSettings.addEventListener('click', () => {
616
  const val = inputBackendUrl.value.trim();
617
  if (val) {
@@ -629,6 +669,23 @@ function initSettings() {
629
  });
630
  }
631
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
632
  /* ==========================================================================
633
  Initialization
634
  ========================================================================== */
@@ -636,6 +693,7 @@ document.addEventListener('DOMContentLoaded', () => {
636
  initDropZone();
637
  initTabs();
638
  initSettings();
 
639
 
640
  btnStart.addEventListener('click', startProcess);
641
  btnCancelSession.addEventListener('click', cancelSession);
 
9
  if (saved && saved.trim() !== '') {
10
  return saved.trim();
11
  }
12
+ // Jika dibuka di domain kustom / subdomain mangrusdi.my.id
13
+ if (window.location.hostname.includes('mangrusdi.my.id')) {
14
+ return window.location.origin;
15
+ }
16
  // Jika dibuka lokal di komputer (localhost/127.0.0.1)
17
  if (window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1') {
18
  return window.location.origin;
 
21
  if (window.location.hostname.includes('hf.space')) {
22
  return window.location.origin;
23
  }
24
+ // Default jika di Vercel:
25
+ if (window.location.hostname.includes('vercel.app')) {
26
+ return DEFAULT_HF_BACKEND;
27
+ }
28
+ return window.location.origin || DEFAULT_HF_BACKEND;
29
  }
30
 
31
  // Application State
 
47
  const dropEmpty = document.getElementById('drop-empty');
48
  const dropPreview = document.getElementById('drop-preview');
49
  const previewImage = document.getElementById('preview-image');
50
+ const previewAvatarCircleImg = document.getElementById('preview-avatar-circle-img');
51
  const fileNameDisplay = document.getElementById('file-name-display');
52
  const fileDimDisplay = document.getElementById('file-dim-display');
53
  const btnChangeImage = document.getElementById('btn-change-image');
54
  const btnStart = document.getElementById('btn-start-process');
55
 
56
+ const btnCopyPairing = document.getElementById('btn-copy-pairing');
57
+ const copyBtnText = document.getElementById('copy-btn-text');
58
+
59
  const turnstileWrapper = document.getElementById('turnstile-wrapper');
60
  const turnstileWidget = document.getElementById('turnstile-widget');
61
  const turnstileFeedback = document.getElementById('turnstile-feedback');
 
284
  }
285
  });
286
 
287
+ // Keyboard accessibility (Enter / Space)
288
+ dropZone.addEventListener('keydown', (e) => {
289
+ if (e.key === 'Enter' || e.key === ' ') {
290
+ e.preventDefault();
291
+ fileInput.click();
292
+ }
293
+ });
294
+
295
  btnChangeImage.addEventListener('click', (e) => {
296
  e.stopPropagation();
297
  fileInput.click();
 
366
  // Store optimized JPEG (quality 0.95)
367
  state.currentImageBase64 = canvas.toDataURL('image/jpeg', 0.95);
368
  previewImage.src = state.currentImageBase64;
369
+ if (previewAvatarCircleImg) {
370
+ previewAvatarCircleImg.src = state.currentImageBase64;
371
+ }
372
  updateStartButtonState();
373
 
374
  dropEmpty.classList.add('hidden');
 
397
  phoneInputGroup.classList.remove('hidden');
398
  inputPhoneNumber.focus();
399
  });
400
+
401
+ // Realtime phone input sanitizer
402
+ if (inputPhoneNumber) {
403
+ inputPhoneNumber.addEventListener('input', () => {
404
+ let val = inputPhoneNumber.value.replace(/\D/g, '');
405
+ if (val.startsWith('0')) {
406
+ val = '62' + val.slice(1);
407
+ }
408
+ inputPhoneNumber.value = val;
409
+ });
410
+ }
411
  }
412
 
413
  /* ==========================================================================
 
645
  }
646
  });
647
 
648
+ // Close on Escape key
649
+ document.addEventListener('keydown', (e) => {
650
+ if (e.key === 'Escape' && !settingsModal.classList.contains('hidden')) {
651
+ closeModal();
652
+ }
653
+ });
654
+
655
  btnSaveSettings.addEventListener('click', () => {
656
  const val = inputBackendUrl.value.trim();
657
  if (val) {
 
669
  });
670
  }
671
 
672
+ function initCopyButton() {
673
+ if (!btnCopyPairing) return;
674
+ btnCopyPairing.addEventListener('click', async () => {
675
+ const raw = pairingCodeText.textContent.replace(/[^A-Za-z0-9]/g, '');
676
+ if (!raw || raw === '------') return;
677
+ try {
678
+ await navigator.clipboard.writeText(raw);
679
+ if (copyBtnText) copyBtnText.textContent = 'Tersalin!';
680
+ setTimeout(() => {
681
+ if (copyBtnText) copyBtnText.textContent = 'Salin';
682
+ }, 2000);
683
+ } catch (err) {
684
+ console.warn('Gagal menyalin kode:', err);
685
+ }
686
+ });
687
+ }
688
+
689
  /* ==========================================================================
690
  Initialization
691
  ========================================================================== */
 
693
  initDropZone();
694
  initTabs();
695
  initSettings();
696
+ initCopyButton();
697
 
698
  btnStart.addEventListener('click', startProcess);
699
  btnCancelSession.addEventListener('click', cancelSession);
frontend/apple-touch-icon.png ADDED
frontend/favicon-16x16.png ADDED
frontend/favicon-32x32.png ADDED
frontend/favicon.ico ADDED
frontend/favicon.png ADDED
frontend/icon-192.png ADDED
frontend/icon-512.png ADDED
frontend/index.html CHANGED
@@ -3,275 +3,379 @@
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>WhatsApp Full Profile Picture - No-Crop HD</title>
7
- <meta name="description" content="Ubah foto profil WhatsApp menjadi ukuran penuh (No Crop) dan resolusi tinggi tanpa kompresi secara instan, aman, dan langsung auto-logout.">
8
 
9
- <!-- Google Fonts: Outfit & Inter -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  <link rel="preconnect" href="https://fonts.googleapis.com">
11
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
12
- <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap" rel="stylesheet">
13
 
14
  <link rel="stylesheet" href="style.css">
15
 
16
- <!-- Cloudflare Turnstile Explicit Render API -->
17
  <script src="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit" async defer></script>
18
  </head>
19
  <body>
20
- <!-- Ambient background glow elements -->
21
- <div class="bg-glow glow-1"></div>
22
- <div class="bg-glow glow-2"></div>
23
- <div class="bg-glow glow-3"></div>
24
-
25
- <div class="app-wrapper">
26
- <!-- Header -->
27
- <header class="navbar">
28
- <div class="brand">
29
- <div class="brand-icon">
30
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
31
- <path stroke-linecap="round" stroke-linejoin="round" d="M12 4v16m8-8H4" />
32
- </svg>
33
- </div>
34
- <div class="brand-text">
35
- <span class="brand-title">WA Full Profile</span>
36
- <span class="badge">No-Crop HD</span>
37
- </div>
38
- </div>
39
 
40
- <div class="header-actions">
41
- <!-- Connection status pill -->
42
- <button id="server-status-btn" class="status-pill status-checking" title="Klik untuk atur Backend URL">
43
- <span class="status-dot"></span>
44
- <span id="server-status-text">Memeriksa Backend...</span>
45
- </button>
46
 
47
- <button id="btn-open-settings" class="icon-btn" title="Pengaturan Server">
48
- <svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2">
49
- <circle cx="12" cy="12" r="3"></circle>
50
- <path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"></path>
51
- </svg>
52
- </button>
 
53
  </div>
54
  </header>
55
 
56
- <!-- Main Content -->
57
- <main class="main-card glass-panel">
58
- <!-- App Header Banner -->
59
- <section class="hero-section">
60
- <h1 class="main-heading">Foto Profil WhatsApp Ukuran Penuh</h1>
61
- <p class="sub-heading">Pasang foto profil tanpa terpotong (No Crop) dan tanpa kompresi buram. Sesi WhatsApp otomatis dikeluarkan seketika setelah foto terpasang.</p>
62
- </section>
63
-
64
- <!-- Step Indicator -->
65
- <div class="steps-progress" id="steps-progress">
66
- <div class="step-item active" id="step-nav-1">
67
- <div class="step-circle">1</div>
68
- <span class="step-label">Upload Foto</span>
69
  </div>
70
- <div class="step-line" id="step-line-1"></div>
71
- <div class="step-item" id="step-nav-2">
72
- <div class="step-circle">2</div>
73
- <span class="step-label">Verifikasi WA</span>
74
- </div>
75
- <div class="step-line" id="step-line-2"></div>
76
- <div class="step-item" id="step-nav-3">
77
- <div class="step-circle">3</div>
78
- <span class="step-label">Selesai</span>
79
- </div>
80
- </div>
81
 
82
- <!-- VIEW 1: Upload & Adjust -->
83
- <section id="view-upload" class="view-panel active">
84
- <div class="drop-zone" id="drop-zone">
85
- <input type="file" id="file-input" accept="image/jpeg,image/png,image/webp,image/jpg" hidden>
86
-
87
- <div class="drop-empty" id="drop-empty">
88
- <div class="upload-icon-bubble">
89
- <svg viewBox="0 0 24 24" width="36" height="36" fill="none" stroke="currentColor" stroke-width="1.8">
90
- <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
91
- <polyline points="17 8 12 3 7 8"></polyline>
92
- <line x1="12" y1="3" x2="12" y2="15"></line>
93
- </svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  </div>
95
- <h3 class="upload-title">Tarik & Lepas Foto di Sini</h3>
96
- <p class="upload-subtitle">atau <span class="browse-link">pilih dari perangkat Anda</span></p>
97
- <div class="format-tags">
98
- <span class="tag">JPG</span>
99
- <span class="tag">PNG</span>
100
- <span class="tag">WEBP</span>
101
- <span class="tag-highlight">Rasio vertikal 9:16 disarankan</span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  </div>
103
  </div>
104
 
105
- <div class="drop-preview hidden" id="drop-preview">
106
- <div class="preview-container">
107
- <img id="preview-image" src="" alt="Preview Foto Profil">
108
- <div class="preview-guide-overlay" title="Rasio 9:16 yang akan dipasang">
109
- <span class="overlay-badge">Preview 9:16</span>
110
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  </div>
112
- <div class="preview-info">
113
- <div class="file-details">
114
- <span class="file-name" id="file-name-display">foto.jpg</span>
115
- <span class="file-dim" id="file-dim-display">1080 x 1920 px</span>
 
 
 
116
  </div>
117
- <button type="button" id="btn-change-image" class="btn-secondary btn-sm">Ganti Foto</button>
118
  </div>
119
  </div>
120
- </div>
121
 
122
- <!-- Connection Method Choice -->
123
- <div class="method-selector">
124
- <label class="selector-label">Metode Tautkan WhatsApp:</label>
125
- <div class="tab-options">
126
- <button type="button" class="tab-btn active" id="tab-qr" data-method="qr">
127
- <svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2">
128
- <rect x="3" y="3" width="7" height="7"></rect>
129
- <rect x="14" y="3" width="7" height="7"></rect>
130
- <rect x="14" y="14" width="7" height="7"></rect>
131
- <rect x="3" y="14" width="7" height="7"></rect>
132
- </svg>
133
- Scan QR Code
134
- </button>
135
- <button type="button" class="tab-btn" id="tab-phone" data-method="phone">
136
- <svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2">
137
- <path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>
138
- </svg>
139
- Kode Pairing (Nomor HP)
140
- </button>
141
  </div>
142
 
143
- <div id="phone-input-group" class="phone-input-group hidden">
144
- <label for="input-phone-number">Nomor WhatsApp (dengan kode negara):</label>
145
- <div class="input-with-prefix">
146
- <span class="phone-prefix">+</span>
147
- <input type="tel" id="input-phone-number" placeholder="6281234567890">
148
- </div>
149
- <p class="input-help">Contoh: 628123456789 (tanpa tanda strip atau spasi)</p>
 
150
  </div>
151
- </div>
152
 
153
- <!-- Cloudflare Turnstile Anti-Bot Security Widget -->
154
- <div id="turnstile-wrapper" class="turnstile-wrapper hidden">
155
- <div id="turnstile-widget" class="turnstile-widget"></div>
156
- <p id="turnstile-feedback" class="turnstile-feedback"></p>
157
- </div>
 
 
 
 
 
 
 
 
158
 
159
- <!-- Start Action Button -->
160
- <div class="action-row">
161
- <button type="button" id="btn-start-process" class="btn-primary" disabled>
162
- <span class="btn-text">Mulai Proses</span>
163
- <svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2">
164
- <polyline points="9 18 15 12 9 6"></polyline>
165
- </svg>
166
- </button>
167
- </div>
168
- </section>
169
 
170
- <!-- VIEW 2: Scanning & Processing -->
171
- <section id="view-scan" class="view-panel hidden">
172
- <div class="scan-wrapper">
173
- <!-- QR Display Box -->
174
- <div id="qr-box" class="qr-box">
175
- <div class="qr-frame">
176
- <div class="laser-scanner"></div>
177
- <img id="qr-image" src="" alt="QR Code WhatsApp" class="qr-img hidden">
178
 
179
- <div id="qr-loading-spinner" class="spinner-container">
180
- <div class="ring-spinner"></div>
181
- <p class="spinner-text">Menghubungkan ke WhatsApp...</p>
 
 
 
 
 
 
182
  </div>
183
- </div>
184
 
185
- <p class="scan-instructions" id="scan-instructions">
186
- Buka WhatsApp di HP &gt; Menu Titik Tiga / Pengaturan &gt; <strong>Perangkat Tertaut</strong> &gt; <strong>Tautkan Perangkat</strong>.
187
- </p>
188
- </div>
 
 
 
 
 
189
 
190
- <!-- Pairing Code Display Box -->
191
- <div id="pairing-box" class="pairing-box hidden">
192
- <p class="pairing-title">Masukkan Kode Pairing ini pada WhatsApp HP Anda:</p>
193
- <div class="code-display" id="pairing-code-text">------</div>
194
- <p class="scan-instructions">
195
- Notifikasi pairing akan muncul di ponsel Anda, ketuk dan masukkan kode di atas.
196
- </p>
197
- </div>
198
 
199
- <!-- Live Status Log Card -->
200
- <div class="status-log-card">
201
- <div class="log-indicator">
202
- <span class="pulsing-dot"></span>
203
- <span class="log-title">Status Pemrosesan</span>
204
  </div>
205
- <p class="log-message" id="live-status-message">Menyiapkan koneksi aman...</p>
206
  </div>
 
207
 
208
- <!-- Cancel / Abort Button -->
209
- <button type="button" id="btn-cancel-session" class="btn-danger-outline btn-sm">
210
- Batalkan Sesi
211
- </button>
212
- </div>
213
- </section>
214
-
215
- <!-- VIEW 3: Success Completed -->
216
- <section id="view-success" class="view-panel hidden">
217
- <div class="success-box">
218
- <div class="success-checkmark">
219
- <svg viewBox="0 0 24 24" width="56" height="56" fill="none" stroke="#10b981" stroke-width="2.5">
220
- <path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"></path>
221
- </svg>
222
- </div>
223
 
224
- <h2 class="success-title">Foto Profil Berhasil Dipasang!</h2>
225
- <p class="success-desc" id="success-desc-text">
226
- Foto profil WhatsApp Anda kini telah tampil dalam resolusi penuh (Full HD) tanpa terpotong (No-Crop).
227
- </p>
228
 
229
- <div class="security-guarantee-card">
230
- <div class="shield-icon">
231
- <svg viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="#25d366" stroke-width="2">
232
- <path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path>
233
- </svg>
 
 
 
 
 
234
  </div>
235
- <div class="shield-text">
236
- <h4>Privasi 100% Terjaga & Aman</h4>
237
- <p>Sesi WhatsApp Web telah langsung dikeluarkan (<strong>Logged Out</strong>) secara otomatis dari perangkat Anda. Tidak ada pesan, kontak, atau data yang disimpan.</p>
 
 
238
  </div>
239
  </div>
240
-
241
- <button type="button" id="btn-restart" class="btn-primary">
242
- Ubah Foto Lain
243
- </button>
244
- </div>
245
- </section>
246
  </main>
247
 
248
- <!-- Settings Modal (Backend URL Config) -->
249
- <div id="settings-modal" class="modal-overlay hidden">
250
- <div class="modal-card glass-panel">
251
- <div class="modal-header">
252
- <h3 class="modal-title">Pengaturan Server Backend</h3>
253
- <button type="button" id="btn-close-modal" class="close-btn">&times;</button>
254
  </div>
255
- <div class="modal-body">
256
- <p class="modal-info">
257
- Jika frontend ini di-deploy di <strong>Vercel</strong> dan backend di <strong>Hugging Face Spaces</strong>, masukkan URL Hugging Face Space Anda di bawah ini:
258
  </p>
259
- <div class="form-group">
260
- <label for="input-backend-url">URL Backend Server:</label>
261
- <input type="text" id="input-backend-url" placeholder="Contoh: https://username-spacename.hf.space">
262
- <span class="field-hint">Kosongkan jika backend dan frontend berada di domain yang sama (atau dijalankan lokal).</span>
263
  </div>
264
  </div>
265
- <div class="modal-footer">
266
- <button type="button" id="btn-save-settings" class="btn-primary btn-sm">Simpan Pengaturan</button>
267
  </div>
268
  </div>
269
  </div>
270
 
271
  <!-- Footer -->
272
- <footer class="footer">
273
- <p>Dibuat menggunakan <a href="https://github.com/tulir/whatsmeow" target="_blank" rel="noopener">whatsmeow</a> &bull; WhatsApp Full Profile Picture Tool</p>
274
- <p class="disclaimer">Aplikasi ini tidak berafiliasi dengan WhatsApp Inc. Sesi hanya berjalan sementara untuk mengunggah foto lalu seketika logout.</p>
 
 
 
 
 
 
275
  </footer>
276
  </div>
277
 
 
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>WhatsApp Full Profile Picture - Pasang Foto Profil No Crop HD</title>
 
7
 
8
+ <!-- Primary Meta Tags -->
9
+ <meta name="title" content="WhatsApp Full Profile Picture - Pasang Foto Profil No Crop HD">
10
+ <meta name="description" content="Pasang foto profil WhatsApp ukuran penuh tanpa terpotong (No Crop) dan resolusi tinggi HD. Aman, privasi terjaga, dan otomatis logout seketika.">
11
+ <meta name="author" content="Mang Rusdi">
12
+ <meta name="robots" content="index, follow">
13
+ <link rel="canonical" href="https://ppfull.mangrusdi.my.id/">
14
+
15
+ <!-- Favicon & PWA Icons -->
16
+ <link rel="icon" type="image/x-icon" href="/favicon.ico">
17
+ <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
18
+ <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
19
+ <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
20
+ <link rel="manifest" href="/site.webmanifest">
21
+ <meta name="theme-color" content="#111b21">
22
+ <meta name="mobile-web-app-capable" content="yes">
23
+ <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
24
+
25
+ <!-- Open Graph / Facebook -->
26
+ <meta property="og:type" content="website">
27
+ <meta property="og:url" content="https://ppfull.mangrusdi.my.id/">
28
+ <meta property="og:title" content="WhatsApp Full Profile Picture | No Crop HD">
29
+ <meta property="og:description" content="Ubah foto profil WhatsApp menjadi ukuran penuh tanpa terpotong (No Crop) dengan kualitas jernih dan aman.">
30
+ <meta property="og:image" content="https://ppfull.mangrusdi.my.id/icon-512.png">
31
+ <meta property="og:site_name" content="WA Full Profile Picture">
32
+ <meta property="og:locale" content="id_ID">
33
+
34
+ <!-- Twitter -->
35
+ <meta name="twitter:card" content="summary_large_image">
36
+ <meta name="twitter:url" content="https://ppfull.mangrusdi.my.id/">
37
+ <meta name="twitter:title" content="WhatsApp Full Profile Picture | No Crop HD">
38
+ <meta name="twitter:description" content="Pasang foto profil WhatsApp ukuran penuh tanpa terpotong secara instan dan aman.">
39
+ <meta name="twitter:image" content="https://ppfull.mangrusdi.my.id/icon-512.png">
40
+
41
+ <!-- Google Search Console Structured Data (JSON-LD) -->
42
+ <script type="application/ld+json">
43
+ {
44
+ "@context": "https://schema.org",
45
+ "@graph": [
46
+ {
47
+ "@type": "WebSite",
48
+ "@id": "https://ppfull.mangrusdi.my.id/#website",
49
+ "url": "https://ppfull.mangrusdi.my.id/",
50
+ "name": "WA Full Profile Picture",
51
+ "description": "Pasang foto profil WhatsApp ukuran penuh tanpa terpotong (No Crop) dan resolusi tinggi HD.",
52
+ "inLanguage": "id-ID"
53
+ },
54
+ {
55
+ "@type": "WebApplication",
56
+ "@id": "https://ppfull.mangrusdi.my.id/#app",
57
+ "name": "WhatsApp Full Profile Picture Tool",
58
+ "url": "https://ppfull.mangrusdi.my.id/",
59
+ "applicationCategory": "UtilitiesApplication",
60
+ "operatingSystem": "All",
61
+ "browserRequirements": "Requires JavaScript",
62
+ "offers": {
63
+ "@type": "Offer",
64
+ "price": "0",
65
+ "priceCurrency": "IDR"
66
+ }
67
+ }
68
+ ]
69
+ }
70
+ </script>
71
+
72
+ <!-- Google Fonts: Inter -->
73
  <link rel="preconnect" href="https://fonts.googleapis.com">
74
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
75
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
76
 
77
  <link rel="stylesheet" href="style.css">
78
 
79
+ <!-- Cloudflare Turnstile API -->
80
  <script src="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit" async defer></script>
81
  </head>
82
  <body>
83
+ <div class="app-layout">
84
+ <!-- Navbar -->
85
+ <header class="top-nav">
86
+ <div class="nav-content">
87
+ <a href="/" class="brand-badge" aria-label="Beranda WA Full Profile">
88
+ <img src="/favicon-32x32.png" width="30" height="30" alt="Favicon" class="brand-avatar">
89
+ <div class="brand-meta">
90
+ <span class="brand-name">WA Full Profile</span>
91
+ <span class="brand-tag">HD No-Crop</span>
92
+ </div>
93
+ </a>
 
 
 
 
 
 
 
 
94
 
95
+ <div class="nav-actions">
96
+ <button id="server-status-btn" class="status-indicator status-checking" type="button" title="Periksa status koneksi server">
97
+ <span class="status-indicator-dot"></span>
98
+ <span id="server-status-text">Memeriksa Server...</span>
99
+ </button>
 
100
 
101
+ <button id="btn-open-settings" class="btn-icon" type="button" title="Pengaturan Server" aria-label="Pengaturan Server">
102
+ <svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
103
+ <circle cx="12" cy="12" r="3"></circle>
104
+ <path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"></path>
105
+ </svg>
106
+ </button>
107
+ </div>
108
  </div>
109
  </header>
110
 
111
+ <!-- Main Card Container -->
112
+ <main class="main-content">
113
+ <div class="card-panel">
114
+ <!-- Hero Title -->
115
+ <div class="header-intro">
116
+ <h1 class="page-title">Foto Profil WhatsApp Ukuran Penuh</h1>
117
+ <p class="page-desc">Pasang foto profil tanpa terpotong dan tanpa kompresi buram. Sesi WhatsApp otomatis dikeluarkan seketika setelah foto terpasang demi privasi Anda.</p>
 
 
 
 
 
 
118
  </div>
 
 
 
 
 
 
 
 
 
 
 
119
 
120
+ <!-- Progress Steps -->
121
+ <nav class="flow-steps" aria-label="Alur Pemasangan Foto">
122
+ <div class="flow-step active" id="step-nav-1">
123
+ <span class="step-num">1</span>
124
+ <span class="step-text">Pilih Foto</span>
125
+ </div>
126
+ <div class="flow-divider" id="step-line-1"></div>
127
+ <div class="flow-step" id="step-nav-2">
128
+ <span class="step-num">2</span>
129
+ <span class="step-text">Tautkan WhatsApp</span>
130
+ </div>
131
+ <div class="flow-divider" id="step-line-2"></div>
132
+ <div class="flow-step" id="step-nav-3">
133
+ <span class="step-num">3</span>
134
+ <span class="step-text">Selesai</span>
135
+ </div>
136
+ </nav>
137
+
138
+ <!-- VIEW 1: Upload & Adjust -->
139
+ <section id="view-upload" class="stage-view active">
140
+ <!-- Dropzone -->
141
+ <div class="file-uploader" id="drop-zone" role="button" tabindex="0" aria-label="Area unggah foto profil">
142
+ <input type="file" id="file-input" accept="image/jpeg,image/png,image/webp,image/jpg" aria-label="Pilih file gambar foto profil" hidden>
143
+
144
+ <div class="upload-idle" id="drop-empty">
145
+ <div class="upload-icon-container">
146
+ <svg viewBox="0 0 24 24" width="32" height="32" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
147
+ <rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
148
+ <circle cx="8.5" cy="8.5" r="1.5"></circle>
149
+ <polyline points="21 15 16 10 5 21"></polyline>
150
+ </svg>
151
+ </div>
152
+ <h2 class="upload-lead">Pilih atau Tarik Foto ke Sini</h2>
153
+ <p class="upload-sub">Format JPG, PNG, atau WEBP didukung</p>
154
+ <div class="format-badges">
155
+ <span class="badge-item">Resolusi Penuh</span>
156
+ <span class="badge-item highlight">Rasio 9:16 Disarankan</span>
157
+ </div>
158
  </div>
159
+
160
+ <!-- Preview Card -->
161
+ <div class="upload-preview hidden" id="drop-preview">
162
+ <div class="dual-preview-grid">
163
+ <!-- Preview Full Vertical -->
164
+ <div class="preview-box">
165
+ <span class="preview-label">Tampilan Penuh (Detail Foto)</span>
166
+ <div class="preview-frame-rect">
167
+ <img id="preview-image" src="" alt="Preview Foto Profil Penuh">
168
+ </div>
169
+ </div>
170
+
171
+ <!-- Preview Circular Avatar -->
172
+ <div class="preview-box">
173
+ <span class="preview-label">Preview di Obrolan WhatsApp</span>
174
+ <div class="preview-avatar-wrap">
175
+ <div class="preview-avatar-circle">
176
+ <img id="preview-avatar-circle-img" src="" alt="Preview Avatar Lingkaran">
177
+ </div>
178
+ <span class="avatar-online-dot" title="Simulasi avatar WhatsApp"></span>
179
+ </div>
180
+ <span class="preview-hint">Tampilan foto saat dilihat di kontak</span>
181
+ </div>
182
+ </div>
183
+
184
+ <div class="preview-actions-bar">
185
+ <div class="file-summary">
186
+ <span class="file-title" id="file-name-display">foto.jpg</span>
187
+ <span class="file-res" id="file-dim-display">1080 x 1920 px</span>
188
+ </div>
189
+ <button type="button" id="btn-change-image" class="btn-subtle">Ganti Foto</button>
190
+ </div>
191
  </div>
192
  </div>
193
 
194
+ <!-- Connection Mode Switcher -->
195
+ <div class="method-box">
196
+ <label class="form-label">Metode Tautkan WhatsApp:</label>
197
+ <div class="segmented-control" role="tablist">
198
+ <button type="button" class="segment-btn active" id="tab-qr" data-method="qr" role="tab" aria-selected="true">
199
+ <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
200
+ <rect x="3" y="3" width="7" height="7"></rect>
201
+ <rect x="14" y="3" width="7" height="7"></rect>
202
+ <rect x="14" y="14" width="7" height="7"></rect>
203
+ <rect x="3" y="14" width="7" height="7"></rect>
204
+ </svg>
205
+ Scan Kode QR
206
+ </button>
207
+ <button type="button" class="segment-btn" id="tab-phone" data-method="phone" role="tab" aria-selected="false">
208
+ <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
209
+ <path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>
210
+ </svg>
211
+ Kode Pairing (Nomor HP)
212
+ </button>
213
  </div>
214
+
215
+ <!-- Phone Input Field -->
216
+ <div id="phone-input-group" class="phone-box hidden">
217
+ <label for="input-phone-number" class="sub-label">Nomor WhatsApp (Format Internasional):</label>
218
+ <div class="input-phone-wrapper">
219
+ <span class="phone-sign">+</span>
220
+ <input type="tel" id="input-phone-number" placeholder="6281234567890" autocomplete="tel">
221
  </div>
222
+ <p class="field-guide">Contoh: <strong>6281234567890</strong> (Gunakan kode negara 62, tanpa angka 0 di depan).</p>
223
  </div>
224
  </div>
 
225
 
226
+ <!-- Cloudflare Turnstile Verification -->
227
+ <div id="turnstile-wrapper" class="turnstile-container hidden">
228
+ <div id="turnstile-widget" class="turnstile-slot"></div>
229
+ <p id="turnstile-feedback" class="turnstile-note"></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
230
  </div>
231
 
232
+ <!-- Submit Button -->
233
+ <div class="submit-container">
234
+ <button type="button" id="btn-start-process" class="btn-action" disabled>
235
+ <span class="btn-caption">Mulai Pasang Foto Profil</span>
236
+ <svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
237
+ <polyline points="9 18 15 12 9 6"></polyline>
238
+ </svg>
239
+ </button>
240
  </div>
241
+ </section>
242
 
243
+ <!-- VIEW 2: Scanning & Processing -->
244
+ <section id="view-scan" class="stage-view hidden">
245
+ <div class="verify-layout">
246
+ <!-- QR Display Box -->
247
+ <div id="qr-box" class="qr-panel">
248
+ <div class="qr-canvas-holder">
249
+ <img id="qr-image" src="" alt="Kode QR WhatsApp" class="qr-visual hidden">
250
+
251
+ <div id="qr-loading-spinner" class="loader-box">
252
+ <div class="circular-spin"></div>
253
+ <p class="loader-text">Menyiapkan koneksi WhatsApp...</p>
254
+ </div>
255
+ </div>
256
 
257
+ <div class="instruction-box">
258
+ <p class="guide-lead">Langkah Scan di WhatsApp HP Anda:</p>
259
+ <ol class="guide-steps">
260
+ <li>Buka WhatsApp pada ponsel Anda</li>
261
+ <li>Buka <strong>Pengaturan / Menu Titik Tiga</strong> &gt; <strong>Perangkat Tertaut</strong></li>
262
+ <li>Pilih <strong>Tautkan Perangkat</strong> lalu arahkan kamera ke kode QR di atas</li>
263
+ </ol>
264
+ </div>
265
+ </div>
 
266
 
267
+ <!-- Pairing Code Display Box -->
268
+ <div id="pairing-box" class="pairing-panel hidden">
269
+ <p class="pairing-header">Masukkan Kode Pairing pada Ponsel Anda:</p>
 
 
 
 
 
270
 
271
+ <div class="pairing-code-card">
272
+ <span class="pairing-code-val" id="pairing-code-text">------</span>
273
+ <button type="button" id="btn-copy-pairing" class="btn-copy" title="Salin kode pairing">
274
+ <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
275
+ <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
276
+ <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
277
+ </svg>
278
+ <span id="copy-btn-text">Salin</span>
279
+ </button>
280
  </div>
 
281
 
282
+ <div class="instruction-box">
283
+ <p class="guide-lead">Cara Memasukkan Kode di WhatsApp HP:</p>
284
+ <ol class="guide-steps">
285
+ <li>Buka notifikasi WhatsApp di HP atau masuk ke <strong>Perangkat Tertaut</strong></li>
286
+ <li>Pilih <strong>Tautkan dengan nomor telepon</strong></li>
287
+ <li>Ketikkan 8 karakter kode pairing yang tertera di atas</li>
288
+ </ol>
289
+ </div>
290
+ </div>
291
 
292
+ <!-- Live Status Message -->
293
+ <div class="live-status-block">
294
+ <div class="pulse-indicator">
295
+ <span class="live-dot"></span>
296
+ <span class="live-heading">Status Proses</span>
297
+ </div>
298
+ <p class="live-info" id="live-status-message">Menyiapkan koneksi aman...</p>
299
+ </div>
300
 
301
+ <!-- Cancel Button -->
302
+ <div class="cancel-wrap">
303
+ <button type="button" id="btn-cancel-session" class="btn-cancel">
304
+ Batalkan Sesi
305
+ </button>
306
  </div>
 
307
  </div>
308
+ </section>
309
 
310
+ <!-- VIEW 3: Success Completed -->
311
+ <section id="view-success" class="stage-view hidden">
312
+ <div class="done-panel">
313
+ <div class="done-icon-circle">
314
+ <svg viewBox="0 0 24 24" width="48" height="48" fill="none" stroke="#25d366" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
315
+ <polyline points="20 6 9 17 4 12"></polyline>
316
+ </svg>
317
+ </div>
 
 
 
 
 
 
 
318
 
319
+ <h2 class="done-title">Foto Profil Berhasil Dipasang</h2>
320
+ <p class="done-subtitle" id="success-desc-text">
321
+ Foto profil WhatsApp Anda kini telah tampil dalam resolusi penuh tanpa terpotong (No Crop).
322
+ </p>
323
 
324
+ <div class="security-card">
325
+ <div class="shield-badge">
326
+ <svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="#00a884" stroke-width="2">
327
+ <path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path>
328
+ </svg>
329
+ </div>
330
+ <div class="shield-info">
331
+ <h3 class="shield-heading">Privasi Terjaga &amp; Aman</h3>
332
+ <p class="shield-desc">Sesi WhatsApp Web telah langsung dikeluarkan (<strong>Logged Out</strong>) secara otomatis. Tidak ada pesan, kontak, atau data pribadi yang disimpan di server.</p>
333
+ </div>
334
  </div>
335
+
336
+ <div class="done-actions">
337
+ <button type="button" id="btn-restart" class="btn-action">
338
+ Pasang Foto Baru
339
+ </button>
340
  </div>
341
  </div>
342
+ </section>
343
+ </div>
 
 
 
 
344
  </main>
345
 
346
+ <!-- Settings Modal -->
347
+ <div id="settings-modal" class="modal-backdrop hidden" role="dialog" aria-modal="true" aria-labelledby="modal-heading">
348
+ <div class="modal-window">
349
+ <div class="modal-top">
350
+ <h2 id="modal-heading" class="modal-header-title">Pengaturan Server Backend</h2>
351
+ <button type="button" id="btn-close-modal" class="btn-modal-close" aria-label="Tutup pengaturan">&times;</button>
352
  </div>
353
+ <div class="modal-content">
354
+ <p class="modal-explanation">
355
+ Jika frontend ini di-deploy di Vercel atau sub-domain terpisah, Anda dapat menghubungkannya ke alamat backend khusus di bawah ini:
356
  </p>
357
+ <div class="form-field">
358
+ <label for="input-backend-url" class="field-label">URL Backend Server:</label>
359
+ <input type="text" id="input-backend-url" class="field-input" placeholder="Contoh: https://ppfull.mangrusdi.my.id">
360
+ <span class="field-note">Kosongkan jika frontend dan backend berada dalam satu domain atau server lokal.</span>
361
  </div>
362
  </div>
363
+ <div class="modal-bottom">
364
+ <button type="button" id="btn-save-settings" class="btn-action btn-compact">Simpan Pengaturan</button>
365
  </div>
366
  </div>
367
  </div>
368
 
369
  <!-- Footer -->
370
+ <footer class="app-footer">
371
+ <div class="footer-inner">
372
+ <p class="footer-tech">
373
+ Ditenagai oleh <a href="https://github.com/tulir/whatsmeow" target="_blank" rel="noopener">whatsmeow</a> &bull; WhatsApp Full Profile Picture Tool
374
+ </p>
375
+ <p class="footer-legal">
376
+ Alat ini tidak berafiliasi dengan WhatsApp Inc. Sesi hanya berjalan sementara untuk mengunggah foto profil kemudian seketika keluar.
377
+ </p>
378
+ </div>
379
  </footer>
380
  </div>
381
 
frontend/robots.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ User-agent: *
2
+ Allow: /
3
+ Disallow: /ws
4
+
5
+ Sitemap: https://ppfull.mangrusdi.my.id/sitemap.xml
frontend/site.webmanifest ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "WA Full Profile Picture",
3
+ "short_name": "Full PFP",
4
+ "description": "Pasang foto profil WhatsApp ukuran penuh tanpa terpotong (No Crop) dan kualitas jernih HD.",
5
+ "start_url": "/",
6
+ "display": "standalone",
7
+ "background_color": "#0b141a",
8
+ "theme_color": "#128c7e",
9
+ "icons": [
10
+ {
11
+ "src": "/favicon-32x32.png",
12
+ "sizes": "32x32",
13
+ "type": "image/png"
14
+ },
15
+ {
16
+ "src": "/icon-192.png",
17
+ "sizes": "192x192",
18
+ "type": "image/png"
19
+ },
20
+ {
21
+ "src": "/icon-512.png",
22
+ "sizes": "512x512",
23
+ "type": "image/png"
24
+ }
25
+ ]
26
+ }
frontend/sitemap.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3
+ <url>
4
+ <loc>https://ppfull.mangrusdi.my.id/</loc>
5
+ <lastmod>2026-10-08</lastmod>
6
+ <changefreq>weekly</changefreq>
7
+ <priority>1.0</priority>
8
+ </url>
9
+ </urlset>
frontend/style.css CHANGED
@@ -1,1057 +1,1031 @@
1
  /* ==========================================================================
2
- Design System & Tokens (Dark Glassmorphism + Neon Emerald)
3
  ========================================================================== */
 
4
  :root {
5
- --bg-main: #0a0e17;
6
- --bg-card: rgba(17, 24, 39, 0.75);
7
- --bg-card-hover: rgba(31, 41, 55, 0.85);
8
- --bg-input: rgba(15, 23, 42, 0.8);
9
-
10
- --border-color: rgba(255, 255, 255, 0.08);
11
- --border-active: rgba(16, 185, 129, 0.4);
12
- --border-cyan: rgba(6, 182, 212, 0.4);
 
 
13
 
14
- --text-primary: #f8fafc;
15
- --text-secondary: #94a3b8;
16
- --text-muted: #64748b;
 
17
 
18
- --accent-emerald: #10b981;
19
- --accent-wa-green: #25d366;
20
- --accent-cyan: #06b6d4;
21
- --accent-red: #ef4444;
 
22
 
23
- --glow-emerald: 0 0 25px rgba(16, 185, 129, 0.25);
24
- --glow-cyan: 0 0 25px rgba(6, 182, 212, 0.2);
25
 
26
- --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
27
- --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
 
 
28
 
29
- --radius-sm: 8px;
30
- --radius-md: 14px;
31
- --radius-lg: 20px;
32
- --radius-full: 9999px;
33
 
34
- --transition-fast: 0.15s ease;
35
- --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
36
  }
37
 
38
- * {
 
 
 
 
 
39
  margin: 0;
40
  padding: 0;
41
- box-sizing: border-box;
 
 
 
42
  }
43
 
44
  body {
45
- font-family: var(--font-body);
46
- background-color: var(--bg-main);
47
- color: var(--text-primary);
48
- min-height: 100vh;
49
- display: flex;
50
- justify-content: center;
51
- align-items: center;
52
- overflow-x: hidden;
53
- position: relative;
54
  line-height: 1.5;
55
  -webkit-font-smoothing: antialiased;
 
56
  }
57
 
58
  /* ==========================================================================
59
- Ambient Background Glows
60
  ========================================================================== */
61
- .bg-glow {
62
- position: fixed;
63
- border-radius: 50%;
64
- filter: blur(120px);
65
- z-index: 0;
66
- pointer-events: none;
67
- opacity: 0.35;
68
- }
69
 
70
- .glow-1 {
71
- top: -10%;
72
- left: -5%;
73
- width: 500px;
74
- height: 500px;
75
- background: radial-gradient(circle, #059669 0%, transparent 70%);
76
- }
77
-
78
- .glow-2 {
79
- bottom: -15%;
80
- right: -5%;
81
- width: 600px;
82
- height: 600px;
83
- background: radial-gradient(circle, #0284c7 0%, transparent 70%);
84
  }
85
 
86
- .glow-3 {
87
- top: 40%;
88
- left: 45%;
89
- width: 350px;
90
- height: 350px;
91
- background: radial-gradient(circle, #0f766e 0%, transparent 70%);
92
- opacity: 0.18;
93
  }
94
 
95
- /* ==========================================================================
96
- Layout & Container
97
- ========================================================================== */
98
- .app-wrapper {
99
- position: relative;
100
- z-index: 1;
101
- width: 100%;
102
- max-width: 680px;
103
- padding: 24px 16px;
104
  margin: 0 auto;
105
- display: flex;
106
- flex-direction: column;
107
- gap: 20px;
108
- }
109
-
110
- /* ==========================================================================
111
- Navbar
112
- ========================================================================== */
113
- .navbar {
114
  display: flex;
115
  align-items: center;
116
  justify-content: space-between;
117
- padding: 12px 18px;
118
- background: var(--bg-card);
119
- backdrop-filter: blur(16px);
120
- -webkit-backdrop-filter: blur(16px);
121
- border: 1px solid var(--border-color);
122
- border-radius: var(--radius-md);
123
  }
124
 
125
- .brand {
126
  display: flex;
127
  align-items: center;
128
- gap: 12px;
 
 
 
 
 
 
 
129
  }
130
 
131
- .brand-icon {
132
- width: 36px;
133
- height: 36px;
134
- border-radius: 10px;
135
- background: linear-gradient(135deg, var(--accent-wa-green), var(--accent-cyan));
136
  display: flex;
137
  align-items: center;
138
- justify-content: center;
139
- color: #fff;
140
- box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
141
  }
142
 
143
- .brand-title {
144
- font-family: var(--font-heading);
145
  font-weight: 700;
146
- font-size: 1.1rem;
147
- letter-spacing: -0.02em;
 
148
  }
149
 
150
- .badge {
151
- font-size: 0.65rem;
152
- font-weight: 700;
153
- padding: 2px 7px;
154
- background: rgba(16, 185, 129, 0.15);
155
- color: var(--accent-wa-green);
156
- border: 1px solid rgba(16, 185, 129, 0.3);
157
- border-radius: var(--radius-full);
158
- margin-left: 6px;
159
- text-transform: uppercase;
160
- letter-spacing: 0.05em;
161
  }
162
 
163
- .header-actions {
164
  display: flex;
165
  align-items: center;
166
  gap: 10px;
167
  }
168
 
169
- .status-pill {
170
- display: flex;
171
  align-items: center;
172
  gap: 7px;
173
- padding: 5px 12px;
174
- font-size: 0.78rem;
 
 
 
 
175
  font-weight: 500;
176
- border-radius: var(--radius-full);
177
- background: rgba(15, 23, 42, 0.6);
178
- border: 1px solid var(--border-color);
179
- color: var(--text-secondary);
180
  cursor: pointer;
181
- transition: var(--transition-normal);
182
  }
183
 
184
- .status-pill:hover {
185
- background: rgba(30, 41, 59, 0.8);
186
- border-color: rgba(255, 255, 255, 0.15);
187
  }
188
 
189
- .status-dot {
190
- width: 8px;
191
- height: 8px;
192
  border-radius: 50%;
193
- background-color: #eab308; /* yellow checking */
194
  }
195
 
196
- .status-online .status-dot {
197
- background-color: var(--accent-wa-green);
198
- box-shadow: 0 0 8px var(--accent-wa-green);
199
  }
200
 
201
- .status-offline .status-dot {
202
- background-color: var(--accent-red);
203
  }
204
 
205
- .status-waking .status-dot {
206
- background-color: #f97316;
207
- box-shadow: 0 0 8px #f97316;
208
- animation: dot-pulse 1.2s infinite ease-in-out;
209
  }
210
 
211
- @keyframes dot-pulse {
212
- 0%, 100% {
213
- opacity: 1;
214
- transform: scale(1);
215
- }
216
- 50% {
217
- opacity: 0.35;
218
- transform: scale(0.8);
219
- }
220
  }
221
 
222
- .icon-btn {
223
- background: transparent;
224
- border: 1px solid var(--border-color);
 
 
 
225
  border-radius: var(--radius-sm);
226
- color: var(--text-secondary);
227
- padding: 6px;
228
- cursor: pointer;
229
- display: flex;
230
  align-items: center;
231
  justify-content: center;
232
- transition: var(--transition-fast);
 
233
  }
234
 
235
- .icon-btn:hover {
236
- color: #fff;
237
- border-color: rgba(255, 255, 255, 0.2);
238
- background: rgba(255, 255, 255, 0.05);
239
  }
240
 
241
  /* ==========================================================================
242
- Glass Panel Card
243
  ========================================================================== */
244
- .glass-panel {
245
- background: var(--bg-card);
246
- backdrop-filter: blur(20px);
247
- -webkit-backdrop-filter: blur(20px);
248
- border: 1px solid var(--border-color);
249
- border-radius: var(--radius-lg);
250
- box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
251
  }
252
 
253
- .main-card {
 
 
 
254
  padding: 32px 28px;
255
- display: flex;
256
- flex-direction: column;
257
- gap: 26px;
258
  }
259
 
260
- /* ==========================================================================
261
- Hero Section
262
- ========================================================================== */
263
- .hero-section {
264
  text-align: center;
 
265
  }
266
 
267
- .main-heading {
268
- font-family: var(--font-heading);
269
- font-size: 1.75rem;
270
- font-weight: 800;
271
- line-height: 1.25;
272
  letter-spacing: -0.02em;
273
- background: linear-gradient(135deg, #ffffff 40%, #a7f3d0 100%);
274
- -webkit-background-clip: text;
275
- -webkit-text-fill-color: transparent;
276
  margin-bottom: 8px;
277
  }
278
 
279
- .sub-heading {
280
- color: var(--text-secondary);
281
- font-size: 0.92rem;
282
- max-width: 520px;
283
  margin: 0 auto;
 
284
  }
285
 
286
  /* ==========================================================================
287
- Step Indicator
288
  ========================================================================== */
289
- .steps-progress {
 
290
  display: flex;
291
  align-items: center;
292
  justify-content: center;
293
- padding: 10px 0;
294
- gap: 12px;
295
  }
296
 
297
- .step-item {
298
  display: flex;
299
  align-items: center;
300
  gap: 8px;
301
- opacity: 0.45;
302
- transition: var(--transition-normal);
303
  }
304
 
305
- .step-item.active {
306
- opacity: 1;
307
  }
308
 
309
- .step-circle {
310
- width: 28px;
311
- height: 28px;
312
  border-radius: 50%;
313
- background: rgba(255, 255, 255, 0.08);
314
- border: 1px solid rgba(255, 255, 255, 0.15);
315
- display: flex;
316
  align-items: center;
317
  justify-content: center;
318
- font-size: 0.82rem;
319
  font-weight: 700;
320
- color: var(--text-secondary);
 
 
321
  }
322
 
323
- .step-item.active .step-circle {
324
- background: linear-gradient(135deg, var(--accent-wa-green), var(--accent-cyan));
325
- color: #042f2e;
326
- border-color: transparent;
327
- box-shadow: 0 0 12px rgba(37, 211, 102, 0.4);
328
  }
329
 
330
- .step-label {
331
- font-size: 0.82rem;
332
  font-weight: 600;
333
- color: var(--text-secondary);
334
  }
335
 
336
- .step-item.active .step-label {
337
- color: #fff;
338
- }
339
-
340
- .step-line {
341
- flex: 1;
342
- max-width: 45px;
343
- height: 2px;
344
- background: rgba(255, 255, 255, 0.1);
345
- border-radius: 2px;
346
  }
347
 
348
- .step-line.active {
349
- background: var(--accent-wa-green);
350
- box-shadow: 0 0 8px rgba(37, 211, 102, 0.5);
351
  }
352
 
353
  /* ==========================================================================
354
- Drop Zone & Image Upload
355
  ========================================================================== */
356
- .drop-zone {
357
- border: 2px dashed rgba(255, 255, 255, 0.15);
 
 
358
  border-radius: var(--radius-md);
359
- padding: 30px 20px;
360
- background: rgba(15, 23, 42, 0.4);
361
- cursor: pointer;
362
- transition: var(--transition-normal);
363
  text-align: center;
364
- position: relative;
365
- overflow: hidden;
 
 
366
  }
367
 
368
- .drop-zone:hover,
369
- .drop-zone.drag-over {
370
- border-color: var(--accent-wa-green);
371
- background: rgba(16, 185, 129, 0.05);
372
- box-shadow: var(--glow-emerald);
373
  }
374
 
375
- .upload-icon-bubble {
376
- width: 64px;
377
- height: 64px;
 
 
 
 
 
 
378
  border-radius: 50%;
379
- background: rgba(255, 255, 255, 0.05);
380
  display: flex;
381
  align-items: center;
382
  justify-content: center;
383
- margin: 0 auto 16px;
384
- color: var(--accent-wa-green);
385
- border: 1px solid rgba(255, 255, 255, 0.1);
386
  }
387
 
388
- .upload-title {
389
- font-family: var(--font-heading);
390
- font-size: 1.15rem;
391
  font-weight: 600;
392
- margin-bottom: 6px;
 
393
  }
394
 
395
- .upload-subtitle {
396
- font-size: 0.88rem;
397
- color: var(--text-secondary);
398
  margin-bottom: 14px;
399
  }
400
 
401
- .browse-link {
402
- color: var(--accent-cyan);
403
- font-weight: 600;
404
- text-decoration: underline;
405
- text-underline-offset: 3px;
406
- }
407
-
408
- .format-tags {
409
  display: flex;
410
  justify-content: center;
411
  gap: 8px;
412
  flex-wrap: wrap;
413
  }
414
 
415
- .tag {
416
  font-size: 0.72rem;
417
- font-weight: 600;
 
 
418
  padding: 3px 8px;
419
- border-radius: var(--radius-sm);
420
- background: rgba(255, 255, 255, 0.06);
421
- color: var(--text-muted);
422
  }
423
 
424
- .tag-highlight {
425
- font-size: 0.72rem;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
426
  font-weight: 600;
427
- padding: 3px 9px;
 
 
 
 
 
 
428
  border-radius: var(--radius-sm);
429
- background: rgba(16, 185, 129, 0.12);
430
- color: var(--accent-wa-green);
431
- border: 1px solid rgba(16, 185, 129, 0.2);
 
 
 
432
  }
433
 
434
- /* Image Preview inside Dropzone */
435
- .preview-container {
 
 
 
 
 
 
436
  position: relative;
437
- display: inline-block;
438
- max-height: 280px;
439
- border-radius: var(--radius-sm);
 
 
 
 
440
  overflow: hidden;
441
- box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
442
- border: 2px solid rgba(255, 255, 255, 0.1);
443
  }
444
 
445
- .preview-container img {
 
 
 
446
  display: block;
447
- max-height: 280px;
448
- max-width: 100%;
449
- object-fit: contain;
450
  }
451
 
452
- .preview-guide-overlay {
453
  position: absolute;
454
- top: 8px;
455
  right: 8px;
 
 
 
 
 
456
  }
457
 
458
- .overlay-badge {
459
- background: rgba(0, 0, 0, 0.75);
460
- backdrop-filter: blur(6px);
461
- color: var(--accent-wa-green);
462
- font-size: 0.7rem;
463
- font-weight: 700;
464
- padding: 3px 8px;
465
- border-radius: var(--radius-full);
466
- border: 1px solid rgba(37, 211, 102, 0.4);
467
  }
468
 
469
- .preview-info {
470
- margin-top: 14px;
471
  display: flex;
472
  align-items: center;
473
  justify-content: space-between;
474
- gap: 12px;
 
 
 
475
  }
476
 
477
- .file-details {
478
- text-align: left;
 
 
479
  }
480
 
481
- .file-name {
482
- display: block;
483
  font-weight: 600;
484
- font-size: 0.9rem;
485
- color: #fff;
486
  white-space: nowrap;
487
  overflow: hidden;
488
  text-overflow: ellipsis;
489
- max-width: 260px;
490
  }
491
 
492
- .file-dim {
493
- font-size: 0.78rem;
494
- color: var(--text-secondary);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
495
  }
496
 
497
  /* ==========================================================================
498
- Method Selector (Tabs)
499
  ========================================================================== */
500
- .method-selector {
501
- display: flex;
502
- flex-direction: column;
503
- gap: 10px;
504
  }
505
 
506
- .selector-label {
507
- font-size: 0.85rem;
 
508
  font-weight: 600;
509
- color: var(--text-secondary);
 
510
  }
511
 
512
- .tab-options {
513
  display: grid;
514
  grid-template-columns: 1fr 1fr;
515
- gap: 10px;
 
 
 
 
516
  }
517
 
518
- .tab-btn {
 
 
 
 
 
 
 
519
  display: flex;
520
  align-items: center;
521
  justify-content: center;
522
- gap: 8px;
523
- padding: 10px 14px;
524
- border-radius: var(--radius-md);
525
- border: 1px solid var(--border-color);
526
- background: rgba(15, 23, 42, 0.6);
527
- color: var(--text-secondary);
528
- font-family: var(--font-body);
529
- font-size: 0.88rem;
530
- font-weight: 500;
531
  cursor: pointer;
532
- transition: var(--transition-normal);
533
  }
534
 
535
- .tab-btn:hover {
536
- background: rgba(30, 41, 59, 0.7);
537
- color: #fff;
538
  }
539
 
540
- .tab-btn.active {
541
- background: rgba(16, 185, 129, 0.12);
542
- border-color: var(--accent-wa-green);
543
- color: #fff;
544
- font-weight: 600;
545
- box-shadow: 0 0 15px rgba(37, 211, 102, 0.15);
546
  }
547
 
548
- .phone-input-group {
549
- margin-top: 6px;
 
 
 
 
550
  }
551
 
552
- .phone-input-group label {
553
  display: block;
554
- font-size: 0.82rem;
555
- color: var(--text-secondary);
556
- margin-bottom: 6px;
 
557
  }
558
 
559
- .input-with-prefix {
560
  display: flex;
561
  align-items: center;
562
- background: var(--bg-input);
563
- border: 1px solid var(--border-color);
564
  border-radius: var(--radius-sm);
565
  padding: 0 12px;
566
- transition: var(--transition-fast);
567
  }
568
 
569
- .input-with-prefix:focus-within {
570
- border-color: var(--accent-wa-green);
571
- box-shadow: var(--glow-emerald);
572
  }
573
 
574
- .phone-prefix {
575
- color: var(--accent-wa-green);
576
- font-weight: 700;
577
  margin-right: 6px;
578
  }
579
 
580
- .input-with-prefix input {
581
  flex: 1;
582
  background: transparent;
583
  border: none;
584
  outline: none;
585
- color: #fff;
586
  padding: 10px 0;
587
  font-size: 0.95rem;
588
- font-family: monospace;
589
  }
590
 
591
- .input-help {
592
- font-size: 0.74rem;
593
  color: var(--text-muted);
594
- margin-top: 5px;
595
  }
596
 
597
  /* ==========================================================================
598
- Cloudflare Turnstile Widget
599
  ========================================================================== */
600
- .turnstile-wrapper {
601
- margin: 18px 0 14px 0;
602
  display: flex;
603
  flex-direction: column;
604
  align-items: center;
605
- justify-content: center;
606
- padding: 14px;
607
- background: rgba(15, 23, 42, 0.45);
608
- border: 1px solid var(--border-color);
609
- border-radius: var(--radius-md);
610
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
611
- backdrop-filter: blur(10px);
612
- -webkit-backdrop-filter: blur(10px);
613
- transition: var(--transition-normal);
614
  }
615
 
616
- .turnstile-wrapper:hover {
617
- border-color: rgba(37, 211, 102, 0.3);
618
- box-shadow: 0 4px 20px rgba(16, 185, 129, 0.08);
619
- }
620
-
621
- .turnstile-widget {
622
  min-height: 65px;
623
- display: flex;
624
- align-items: center;
625
- justify-content: center;
626
  }
627
 
628
- .turnstile-feedback {
629
- font-size: 0.78rem;
630
- color: var(--text-muted);
631
- margin-top: 8px;
632
- text-align: center;
633
- line-height: 1.4;
634
  }
635
 
636
- .turnstile-feedback.error {
637
- color: #f87171;
638
  }
639
 
640
- .turnstile-feedback.success {
641
- color: var(--accent-wa-green);
642
  }
643
 
644
  /* ==========================================================================
645
- Buttons
646
  ========================================================================== */
647
- .action-row {
648
- display: flex;
649
- justify-content: flex-end;
650
  }
651
 
652
- .btn-primary {
653
- display: inline-flex;
654
- align-items: center;
655
- justify-content: center;
656
- gap: 10px;
657
  width: 100%;
658
- padding: 14px 24px;
659
- border-radius: var(--radius-md);
660
  border: none;
661
- background: linear-gradient(135deg, var(--accent-wa-green) 0%, #059669 100%);
662
- color: #03231c;
663
- font-family: var(--font-heading);
664
- font-size: 1.02rem;
665
  font-weight: 700;
 
 
 
 
666
  cursor: pointer;
667
- box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
668
- transition: var(--transition-normal);
669
  }
670
 
671
- .btn-primary:hover:not(:disabled) {
672
- transform: translateY(-2px);
673
- box-shadow: 0 12px 25px rgba(37, 211, 102, 0.45);
674
  }
675
 
676
- .btn-primary:disabled {
677
- opacity: 0.4;
678
  cursor: not-allowed;
679
- box-shadow: none;
680
- }
681
-
682
- .btn-secondary {
683
- padding: 7px 14px;
684
- border-radius: var(--radius-sm);
685
- border: 1px solid var(--border-color);
686
- background: rgba(255, 255, 255, 0.05);
687
- color: #fff;
688
- font-size: 0.82rem;
689
- font-weight: 500;
690
- cursor: pointer;
691
- transition: var(--transition-fast);
692
  }
693
 
694
- .btn-secondary:hover {
695
- background: rgba(255, 255, 255, 0.1);
696
- border-color: rgba(255, 255, 255, 0.2);
697
- }
698
-
699
- .btn-danger-outline {
700
- padding: 8px 16px;
701
- border-radius: var(--radius-sm);
702
- border: 1px solid rgba(239, 68, 68, 0.4);
703
- background: rgba(239, 68, 68, 0.1);
704
- color: #fca5a5;
705
  font-size: 0.85rem;
706
- font-weight: 600;
707
- cursor: pointer;
708
- transition: var(--transition-fast);
709
- margin-top: 10px;
710
- }
711
-
712
- .btn-danger-outline:hover {
713
- background: rgba(239, 68, 68, 0.2);
714
- color: #fff;
715
- }
716
-
717
- .btn-sm {
718
- padding: 6px 14px;
719
- font-size: 0.8rem;
720
  }
721
 
722
  /* ==========================================================================
723
- VIEW 2: QR Scanner Box & Animation
724
  ========================================================================== */
725
- .scan-wrapper {
726
- display: flex;
727
- flex-direction: column;
728
- align-items: center;
729
- gap: 20px;
730
  text-align: center;
731
  }
732
 
733
- .qr-frame {
734
- position: relative;
735
- width: 260px;
736
- height: 260px;
 
 
 
 
 
737
  border-radius: var(--radius-md);
738
- background: #ffffff;
739
- padding: 12px;
740
  display: flex;
741
  align-items: center;
742
  justify-content: center;
743
- box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(16, 185, 129, 0.2);
744
- overflow: hidden;
745
  }
746
 
747
- .qr-img {
748
  width: 100%;
749
  height: 100%;
750
- object-fit: contain;
751
- }
752
-
753
- /* Glowing laser scanner animation line */
754
- .laser-scanner {
755
- position: absolute;
756
- top: 0;
757
- left: 0;
758
- right: 0;
759
- height: 3px;
760
- background: linear-gradient(90deg, transparent, #25d366, #06b6d4, transparent);
761
- box-shadow: 0 0 12px #25d366, 0 0 20px #06b6d4;
762
- animation: scanLaser 2.4s ease-in-out infinite alternate;
763
- z-index: 5;
764
- }
765
-
766
- @keyframes scanLaser {
767
- 0% {
768
- top: 5%;
769
- }
770
- 100% {
771
- top: 92%;
772
- }
773
  }
774
 
775
- .spinner-container {
776
  display: flex;
777
  flex-direction: column;
778
  align-items: center;
779
- gap: 14px;
780
- color: #0f172a;
781
  }
782
 
783
- .ring-spinner {
784
- width: 44px;
785
- height: 44px;
786
- border: 4px solid rgba(16, 185, 129, 0.2);
787
- border-top-color: var(--accent-wa-green);
788
  border-radius: 50%;
789
- animation: spin 0.9s linear infinite;
790
  }
791
 
792
- @keyframes spin {
793
- to {
794
- transform: rotate(360deg);
795
- }
796
  }
797
 
798
- .spinner-text {
799
- font-size: 0.85rem;
800
  font-weight: 600;
801
- color: #334155;
 
802
  }
803
 
804
- .scan-instructions {
805
- font-size: 0.88rem;
806
- color: var(--text-secondary);
807
- max-width: 420px;
 
 
 
 
 
808
  }
809
 
810
- .scan-instructions strong {
811
- color: #fff;
 
 
 
 
812
  }
813
 
814
- /* Pairing Code View */
815
- .pairing-box {
816
- background: rgba(15, 23, 42, 0.6);
817
- border: 1px solid var(--border-color);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
818
  border-radius: var(--radius-md);
819
- padding: 24px;
820
- width: 100%;
821
- max-width: 420px;
 
822
  }
823
 
824
- .pairing-title {
825
- font-size: 0.9rem;
826
- color: var(--text-secondary);
827
- margin-bottom: 14px;
 
828
  }
829
 
830
- .code-display {
831
- font-family: monospace;
832
- font-size: 2.2rem;
833
- font-weight: 800;
834
- letter-spacing: 0.25em;
835
- color: var(--accent-wa-green);
836
- background: rgba(0, 0, 0, 0.4);
837
- padding: 12px 18px;
838
- border-radius: var(--radius-sm);
839
- border: 1px solid rgba(37, 211, 102, 0.3);
840
- margin-bottom: 14px;
841
  }
842
 
843
- /* Status Log Card */
844
- .status-log-card {
845
- width: 100%;
846
- max-width: 460px;
847
- background: rgba(15, 23, 42, 0.7);
848
- border: 1px solid var(--border-color);
849
- border-radius: var(--radius-md);
850
- padding: 12px 18px;
 
 
851
  display: flex;
852
- flex-direction: column;
853
- gap: 6px;
854
- text-align: left;
855
  }
856
 
857
- .log-indicator {
858
  display: flex;
859
  align-items: center;
860
  gap: 8px;
861
  }
862
 
863
- .pulsing-dot {
864
  width: 8px;
865
  height: 8px;
866
  border-radius: 50%;
867
- background: var(--accent-wa-green);
868
- animation: pulse 1.5s infinite;
869
  }
870
 
871
- @keyframes pulse {
872
- 0% {
873
- box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
874
- }
875
- 70% {
876
- box-shadow: 0 0 0 8px rgba(37, 211, 102, 0);
877
- }
878
- 100% {
879
- box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
880
- }
881
  }
882
 
883
- .log-title {
884
- font-size: 0.75rem;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
885
  font-weight: 600;
886
- text-transform: uppercase;
887
- letter-spacing: 0.05em;
888
- color: var(--text-muted);
889
  }
890
 
891
- .log-message {
892
- font-size: 0.9rem;
893
- color: #fff;
894
- font-weight: 500;
895
  }
896
 
897
  /* ==========================================================================
898
- VIEW 3: Success Box
899
  ========================================================================== */
900
- .success-box {
901
- display: flex;
902
- flex-direction: column;
903
- align-items: center;
904
  text-align: center;
905
- gap: 20px;
906
- padding: 15px 0;
907
  }
908
 
909
- .success-checkmark {
910
- width: 88px;
911
- height: 88px;
912
  border-radius: 50%;
913
- background: rgba(16, 185, 129, 0.12);
914
- border: 2px solid rgba(16, 185, 129, 0.3);
915
  display: flex;
916
  align-items: center;
917
  justify-content: center;
918
- box-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
919
  }
920
 
921
- .success-title {
922
- font-family: var(--font-heading);
923
- font-size: 1.6rem;
924
  font-weight: 700;
925
- color: #fff;
 
926
  }
927
 
928
- .success-desc {
929
- font-size: 0.92rem;
930
- color: var(--text-secondary);
931
  max-width: 480px;
 
932
  }
933
 
934
- .security-guarantee-card {
 
 
 
 
935
  display: flex;
936
  align-items: flex-start;
937
  gap: 14px;
938
- background: rgba(16, 185, 129, 0.08);
939
- border: 1px solid rgba(16, 185, 129, 0.25);
940
- border-radius: var(--radius-md);
941
- padding: 16px;
942
  text-align: left;
943
- max-width: 480px;
 
944
  }
945
 
946
- .shield-icon {
947
- margin-top: 2px;
948
  }
949
 
950
- .shield-text h4 {
951
- font-size: 0.92rem;
952
  font-weight: 600;
953
- color: #a7f3d0;
954
  margin-bottom: 4px;
955
  }
956
 
957
- .shield-text p {
958
- font-size: 0.8rem;
959
- color: var(--text-secondary);
960
- line-height: 1.4;
 
 
 
 
 
961
  }
962
 
963
  /* ==========================================================================
964
- Modal Settings
965
  ========================================================================== */
966
- .modal-overlay {
 
967
  position: fixed;
968
- top: 0;
969
- left: 0;
970
- width: 100vw;
971
- height: 100vh;
972
- background: rgba(0, 0, 0, 0.7);
973
- backdrop-filter: blur(8px);
974
- -webkit-backdrop-filter: blur(8px);
975
  display: flex;
976
  align-items: center;
977
  justify-content: center;
978
- z-index: 50;
979
  padding: 16px;
 
980
  }
981
 
982
- .modal-card {
 
 
 
983
  width: 100%;
984
  max-width: 480px;
985
- padding: 24px;
986
- display: flex;
987
- flex-direction: column;
988
- gap: 18px;
989
  }
990
 
991
- .modal-header {
992
  display: flex;
993
- justify-content: space-between;
994
  align-items: center;
 
 
 
995
  }
996
 
997
- .modal-title {
998
- font-family: var(--font-heading);
999
- font-size: 1.15rem;
1000
- font-weight: 700;
1001
  }
1002
 
1003
- .close-btn {
1004
  background: transparent;
1005
  border: none;
1006
- font-size: 1.6rem;
1007
  color: var(--text-muted);
 
1008
  cursor: pointer;
1009
  line-height: 1;
1010
  }
1011
 
1012
- .close-btn:hover {
1013
- color: #fff;
1014
  }
1015
 
1016
- .modal-info {
1017
- font-size: 0.86rem;
1018
- color: var(--text-secondary);
1019
- margin-bottom: 14px;
 
 
 
 
 
1020
  }
1021
 
1022
- .form-group {
1023
  display: flex;
1024
  flex-direction: column;
1025
  gap: 6px;
1026
  }
1027
 
1028
- .form-group label {
1029
- font-size: 0.82rem;
1030
  font-weight: 600;
1031
- color: var(--text-secondary);
1032
  }
1033
 
1034
- .form-group input {
1035
- background: var(--bg-input);
1036
- border: 1px solid var(--border-color);
1037
  border-radius: var(--radius-sm);
1038
- padding: 10px 14px;
1039
- color: #fff;
1040
- font-size: 0.9rem;
 
1041
  outline: none;
 
1042
  }
1043
 
1044
- .form-group input:focus {
1045
- border-color: var(--accent-wa-green);
1046
- box-shadow: var(--glow-emerald);
1047
  }
1048
 
1049
- .field-hint {
1050
- font-size: 0.74rem;
1051
  color: var(--text-muted);
1052
  }
1053
 
1054
- .modal-footer {
 
 
1055
  display: flex;
1056
  justify-content: flex-end;
1057
  }
@@ -1059,56 +1033,97 @@ body {
1059
  /* ==========================================================================
1060
  Footer
1061
  ========================================================================== */
1062
- .footer {
 
 
 
 
 
 
 
 
 
 
1063
  text-align: center;
1064
- font-size: 0.78rem;
1065
- color: var(--text-muted);
1066
- display: flex;
1067
- flex-direction: column;
1068
- gap: 4px;
1069
- padding: 8px 0;
1070
  }
1071
 
1072
- .footer a {
1073
- color: var(--accent-wa-green);
 
 
 
 
 
 
1074
  text-decoration: none;
 
1075
  }
1076
 
1077
- .footer a:hover {
1078
  text-decoration: underline;
1079
  }
1080
 
1081
- .disclaimer {
1082
- font-size: 0.72rem;
1083
- opacity: 0.7;
 
1084
  }
1085
 
1086
  /* ==========================================================================
1087
- Utilities
1088
  ========================================================================== */
 
1089
  .hidden {
1090
  display: none !important;
1091
  }
1092
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1093
  /* ==========================================================================
1094
- Responsive Mobile Adjustments
1095
  ========================================================================== */
 
1096
  @media (max-width: 640px) {
1097
- .main-card {
1098
  padding: 24px 16px;
1099
  }
1100
-
1101
- .main-heading {
1102
- font-size: 1.45rem;
 
 
 
 
 
 
 
 
 
 
 
1103
  }
1104
 
1105
- .qr-frame {
1106
- width: 220px;
1107
- height: 220px;
1108
  }
1109
 
1110
- .code-display {
1111
- font-size: 1.7rem;
1112
- letter-spacing: 0.15em;
1113
  }
1114
  }
 
1
  /* ==========================================================================
2
+ Design System - WhatsApp Full Profile (Clean, Modern, Anti-Slop)
3
  ========================================================================== */
4
+
5
  :root {
6
+ /* Palette - WhatsApp Authentic Dark Theme */
7
+ --bg-app: #0b141a;
8
+ --bg-card: #111b21;
9
+ --bg-surface: #182229;
10
+ --bg-surface-hover: #222e35;
11
+ --bg-input: #111b21;
12
+
13
+ --border-subtle: #202c33;
14
+ --border-focus: #00a884;
15
+ --border-active: #2a3942;
16
 
17
+ --text-main: #e9edef;
18
+ --text-sub: #8696a0;
19
+ --text-muted: #667781;
20
+ --text-inverse: #0b141a;
21
 
22
+ --wa-primary: #00a884;
23
+ --wa-primary-hover: #02906f;
24
+ --wa-accent: #25d366;
25
+ --wa-danger: #ea4335;
26
+ --wa-danger-bg: rgba(234, 67, 53, 0.1);
27
 
28
+ --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
 
29
 
30
+ --radius-sm: 6px;
31
+ --radius-md: 10px;
32
+ --radius-lg: 16px;
33
+ --radius-circle: 50%;
34
 
35
+ --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35);
36
+ --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.2);
 
 
37
 
38
+ --transition-quick: 0.15s ease-out;
 
39
  }
40
 
41
+ /* ==========================================================================
42
+ Base & Reset
43
+ ========================================================================== */
44
+
45
+ *, *::before, *::after {
46
+ box-sizing: border-box;
47
  margin: 0;
48
  padding: 0;
49
+ }
50
+
51
+ html, body {
52
+ min-height: 100%;
53
  }
54
 
55
  body {
56
+ font-family: var(--font-family);
57
+ background-color: var(--bg-app);
58
+ color: var(--text-main);
 
 
 
 
 
 
59
  line-height: 1.5;
60
  -webkit-font-smoothing: antialiased;
61
+ -moz-osx-font-smoothing: grayscale;
62
  }
63
 
64
  /* ==========================================================================
65
+ Layout Structure
66
  ========================================================================== */
 
 
 
 
 
 
 
 
67
 
68
+ .app-layout {
69
+ min-height: 100vh;
70
+ display: flex;
71
+ flex-direction: column;
 
 
 
 
 
 
 
 
 
 
72
  }
73
 
74
+ .top-nav {
75
+ height: 60px;
76
+ border-bottom: 1px solid var(--border-subtle);
77
+ background-color: var(--bg-card);
78
+ position: sticky;
79
+ top: 0;
80
+ z-index: 50;
81
  }
82
 
83
+ .nav-content {
84
+ max-width: 960px;
 
 
 
 
 
 
 
85
  margin: 0 auto;
86
+ height: 100%;
87
+ padding: 0 20px;
 
 
 
 
 
 
 
88
  display: flex;
89
  align-items: center;
90
  justify-content: space-between;
 
 
 
 
 
 
91
  }
92
 
93
+ .brand-badge {
94
  display: flex;
95
  align-items: center;
96
+ gap: 10px;
97
+ text-decoration: none;
98
+ color: inherit;
99
+ }
100
+
101
+ .brand-avatar {
102
+ border-radius: var(--radius-sm);
103
+ display: block;
104
  }
105
 
106
+ .brand-meta {
 
 
 
 
107
  display: flex;
108
  align-items: center;
109
+ gap: 8px;
 
 
110
  }
111
 
112
+ .brand-name {
 
113
  font-weight: 700;
114
+ font-size: 0.95rem;
115
+ letter-spacing: -0.01em;
116
+ color: var(--text-main);
117
  }
118
 
119
+ .brand-tag {
120
+ font-size: 0.7rem;
121
+ font-weight: 600;
122
+ background-color: rgba(0, 168, 132, 0.15);
123
+ color: var(--wa-primary);
124
+ padding: 2px 6px;
125
+ border-radius: 4px;
 
 
 
 
126
  }
127
 
128
+ .nav-actions {
129
  display: flex;
130
  align-items: center;
131
  gap: 10px;
132
  }
133
 
134
+ .status-indicator {
135
+ display: inline-flex;
136
  align-items: center;
137
  gap: 7px;
138
+ background: var(--bg-surface);
139
+ border: 1px solid var(--border-subtle);
140
+ color: var(--text-sub);
141
+ padding: 5px 11px;
142
+ border-radius: var(--radius-sm);
143
+ font-size: 0.75rem;
144
  font-weight: 500;
 
 
 
 
145
  cursor: pointer;
146
+ transition: border-color var(--transition-quick);
147
  }
148
 
149
+ .status-indicator:hover {
150
+ border-color: var(--border-active);
 
151
  }
152
 
153
+ .status-indicator-dot {
154
+ width: 7px;
155
+ height: 7px;
156
  border-radius: 50%;
157
+ background-color: var(--text-muted);
158
  }
159
 
160
+ .status-online .status-indicator-dot {
161
+ background-color: var(--wa-accent);
 
162
  }
163
 
164
+ .status-checking .status-indicator-dot {
165
+ background-color: #f59e0b;
166
  }
167
 
168
+ .status-waking .status-indicator-dot {
169
+ background-color: #3b82f6;
170
+ animation: pulse-ring 1.5s infinite;
 
171
  }
172
 
173
+ .status-offline .status-indicator-dot {
174
+ background-color: var(--wa-danger);
 
 
 
 
 
 
 
175
  }
176
 
177
+ .btn-icon {
178
+ background: var(--bg-surface);
179
+ border: 1px solid var(--border-subtle);
180
+ color: var(--text-sub);
181
+ width: 32px;
182
+ height: 32px;
183
  border-radius: var(--radius-sm);
184
+ display: inline-flex;
 
 
 
185
  align-items: center;
186
  justify-content: center;
187
+ cursor: pointer;
188
+ transition: var(--transition-quick);
189
  }
190
 
191
+ .btn-icon:hover {
192
+ color: var(--text-main);
193
+ border-color: var(--border-active);
 
194
  }
195
 
196
  /* ==========================================================================
197
+ Main Content Container
198
  ========================================================================== */
199
+
200
+ .main-content {
201
+ flex: 1;
202
+ max-width: 720px;
203
+ width: 100%;
204
+ margin: 32px auto;
205
+ padding: 0 16px;
206
  }
207
 
208
+ .card-panel {
209
+ background-color: var(--bg-card);
210
+ border: 1px solid var(--border-subtle);
211
+ border-radius: var(--radius-lg);
212
  padding: 32px 28px;
213
+ box-shadow: var(--shadow-card);
 
 
214
  }
215
 
216
+ .header-intro {
 
 
 
217
  text-align: center;
218
+ margin-bottom: 28px;
219
  }
220
 
221
+ .page-title {
222
+ font-size: 1.5rem;
223
+ font-weight: 700;
 
 
224
  letter-spacing: -0.02em;
225
+ color: var(--text-main);
 
 
226
  margin-bottom: 8px;
227
  }
228
 
229
+ .page-desc {
230
+ font-size: 0.9rem;
231
+ color: var(--text-sub);
232
+ max-width: 580px;
233
  margin: 0 auto;
234
+ line-height: 1.5;
235
  }
236
 
237
  /* ==========================================================================
238
+ Progress Flow Indicator
239
  ========================================================================== */
240
+
241
+ .flow-steps {
242
  display: flex;
243
  align-items: center;
244
  justify-content: center;
245
+ margin-bottom: 32px;
246
+ gap: 10px;
247
  }
248
 
249
+ .flow-step {
250
  display: flex;
251
  align-items: center;
252
  gap: 8px;
253
+ color: var(--text-muted);
 
254
  }
255
 
256
+ .flow-step.active {
257
+ color: var(--wa-primary);
258
  }
259
 
260
+ .step-num {
261
+ width: 24px;
262
+ height: 24px;
263
  border-radius: 50%;
264
+ display: inline-flex;
 
 
265
  align-items: center;
266
  justify-content: center;
267
+ font-size: 0.75rem;
268
  font-weight: 700;
269
+ background-color: var(--bg-surface);
270
+ border: 1px solid var(--border-subtle);
271
+ color: var(--text-sub);
272
  }
273
 
274
+ .flow-step.active .step-num {
275
+ background-color: var(--wa-primary);
276
+ border-color: var(--wa-primary);
277
+ color: var(--text-inverse);
 
278
  }
279
 
280
+ .step-text {
281
+ font-size: 0.8rem;
282
  font-weight: 600;
 
283
  }
284
 
285
+ .flow-divider {
286
+ width: 32px;
287
+ height: 1px;
288
+ background-color: var(--border-subtle);
 
 
 
 
 
 
289
  }
290
 
291
+ .flow-divider.active {
292
+ background-color: var(--wa-primary);
 
293
  }
294
 
295
  /* ==========================================================================
296
+ File Uploader & Dropzone
297
  ========================================================================== */
298
+
299
+ .file-uploader {
300
+ border: 2px dashed var(--border-subtle);
301
+ background-color: var(--bg-surface);
302
  border-radius: var(--radius-md);
303
+ padding: 36px 20px;
 
 
 
304
  text-align: center;
305
+ cursor: pointer;
306
+ transition: border-color var(--transition-quick), background-color var(--transition-quick);
307
+ margin-bottom: 24px;
308
+ outline: none;
309
  }
310
 
311
+ .file-uploader:hover,
312
+ .file-uploader:focus-visible,
313
+ .file-uploader.drag-over {
314
+ border-color: var(--wa-primary);
315
+ background-color: rgba(0, 168, 132, 0.04);
316
  }
317
 
318
+ .file-uploader:focus-visible {
319
+ outline: 2px solid var(--border-focus);
320
+ }
321
+
322
+ .upload-icon-container {
323
+ width: 52px;
324
+ height: 52px;
325
+ margin: 0 auto 14px;
326
+ background-color: rgba(255, 255, 255, 0.04);
327
  border-radius: 50%;
 
328
  display: flex;
329
  align-items: center;
330
  justify-content: center;
331
+ color: var(--wa-primary);
 
 
332
  }
333
 
334
+ .upload-lead {
335
+ font-size: 1.05rem;
 
336
  font-weight: 600;
337
+ color: var(--text-main);
338
+ margin-bottom: 4px;
339
  }
340
 
341
+ .upload-sub {
342
+ font-size: 0.85rem;
343
+ color: var(--text-sub);
344
  margin-bottom: 14px;
345
  }
346
 
347
+ .format-badges {
 
 
 
 
 
 
 
348
  display: flex;
349
  justify-content: center;
350
  gap: 8px;
351
  flex-wrap: wrap;
352
  }
353
 
354
+ .badge-item {
355
  font-size: 0.72rem;
356
+ font-weight: 500;
357
+ color: var(--text-sub);
358
+ background-color: rgba(255, 255, 255, 0.05);
359
  padding: 3px 8px;
360
+ border-radius: 4px;
 
 
361
  }
362
 
363
+ .badge-item.highlight {
364
+ background-color: rgba(0, 168, 132, 0.12);
365
+ color: var(--wa-primary);
366
+ }
367
+
368
+ /* ==========================================================================
369
+ Dual Preview Component
370
+ ========================================================================== */
371
+
372
+ .upload-preview {
373
+ text-align: left;
374
+ }
375
+
376
+ .dual-preview-grid {
377
+ display: grid;
378
+ grid-template-columns: 1fr 1fr;
379
+ gap: 16px;
380
+ margin-bottom: 16px;
381
+ }
382
+
383
+ .preview-box {
384
+ background-color: var(--bg-card);
385
+ border: 1px solid var(--border-subtle);
386
+ border-radius: var(--radius-md);
387
+ padding: 16px;
388
+ display: flex;
389
+ flex-direction: column;
390
+ align-items: center;
391
+ text-align: center;
392
+ }
393
+
394
+ .preview-label {
395
+ font-size: 0.75rem;
396
  font-weight: 600;
397
+ color: var(--text-sub);
398
+ margin-bottom: 12px;
399
+ }
400
+
401
+ .preview-frame-rect {
402
+ width: 140px;
403
+ height: 190px;
404
  border-radius: var(--radius-sm);
405
+ overflow: hidden;
406
+ background-color: #000;
407
+ border: 1px solid var(--border-active);
408
+ display: flex;
409
+ align-items: center;
410
+ justify-content: center;
411
  }
412
 
413
+ .preview-frame-rect img {
414
+ width: 100%;
415
+ height: 100%;
416
+ object-fit: cover;
417
+ display: block;
418
+ }
419
+
420
+ .preview-avatar-wrap {
421
  position: relative;
422
+ margin: 18px 0 10px;
423
+ }
424
+
425
+ .preview-avatar-circle {
426
+ width: 130px;
427
+ height: 130px;
428
+ border-radius: 50%;
429
  overflow: hidden;
430
+ border: 3px solid var(--wa-primary);
431
+ background-color: #000;
432
  }
433
 
434
+ .preview-avatar-circle img {
435
+ width: 100%;
436
+ height: 100%;
437
+ object-fit: cover;
438
  display: block;
 
 
 
439
  }
440
 
441
+ .avatar-online-dot {
442
  position: absolute;
443
+ bottom: 8px;
444
  right: 8px;
445
+ width: 18px;
446
+ height: 18px;
447
+ border-radius: 50%;
448
+ background-color: var(--wa-accent);
449
+ border: 3px solid var(--bg-card);
450
  }
451
 
452
+ .preview-hint {
453
+ font-size: 0.72rem;
454
+ color: var(--text-muted);
 
 
 
 
 
 
455
  }
456
 
457
+ .preview-actions-bar {
 
458
  display: flex;
459
  align-items: center;
460
  justify-content: space-between;
461
+ padding: 10px 14px;
462
+ background-color: var(--bg-card);
463
+ border: 1px solid var(--border-subtle);
464
+ border-radius: var(--radius-sm);
465
  }
466
 
467
+ .file-summary {
468
+ display: flex;
469
+ flex-direction: column;
470
+ overflow: hidden;
471
  }
472
 
473
+ .file-title {
474
+ font-size: 0.82rem;
475
  font-weight: 600;
476
+ color: var(--text-main);
 
477
  white-space: nowrap;
478
  overflow: hidden;
479
  text-overflow: ellipsis;
480
+ max-width: 320px;
481
  }
482
 
483
+ .file-res {
484
+ font-size: 0.72rem;
485
+ color: var(--text-muted);
486
+ }
487
+
488
+ .btn-subtle {
489
+ background: var(--bg-surface);
490
+ border: 1px solid var(--border-subtle);
491
+ color: var(--text-main);
492
+ padding: 6px 12px;
493
+ border-radius: var(--radius-sm);
494
+ font-size: 0.75rem;
495
+ font-weight: 600;
496
+ cursor: pointer;
497
+ transition: var(--transition-quick);
498
+ }
499
+
500
+ .btn-subtle:hover {
501
+ background-color: var(--bg-surface-hover);
502
+ border-color: var(--border-active);
503
  }
504
 
505
  /* ==========================================================================
506
+ Method Switcher & Form Inputs
507
  ========================================================================== */
508
+
509
+ .method-box {
510
+ margin-bottom: 24px;
 
511
  }
512
 
513
+ .form-label {
514
+ display: block;
515
+ font-size: 0.82rem;
516
  font-weight: 600;
517
+ color: var(--text-sub);
518
+ margin-bottom: 10px;
519
  }
520
 
521
+ .segmented-control {
522
  display: grid;
523
  grid-template-columns: 1fr 1fr;
524
+ background-color: var(--bg-surface);
525
+ padding: 4px;
526
+ border-radius: var(--radius-md);
527
+ border: 1px solid var(--border-subtle);
528
+ gap: 4px;
529
  }
530
 
531
+ .segment-btn {
532
+ background: transparent;
533
+ border: none;
534
+ color: var(--text-sub);
535
+ padding: 9px 14px;
536
+ border-radius: var(--radius-sm);
537
+ font-size: 0.82rem;
538
+ font-weight: 600;
539
  display: flex;
540
  align-items: center;
541
  justify-content: center;
542
+ gap: 7px;
 
 
 
 
 
 
 
 
543
  cursor: pointer;
544
+ transition: var(--transition-quick);
545
  }
546
 
547
+ .segment-btn:hover {
548
+ color: var(--text-main);
 
549
  }
550
 
551
+ .segment-btn.active {
552
+ background-color: var(--bg-card);
553
+ color: var(--wa-primary);
554
+ box-shadow: var(--shadow-subtle);
 
 
555
  }
556
 
557
+ .phone-box {
558
+ margin-top: 14px;
559
+ background-color: var(--bg-surface);
560
+ border: 1px solid var(--border-subtle);
561
+ border-radius: var(--radius-md);
562
+ padding: 16px;
563
  }
564
 
565
+ .sub-label {
566
  display: block;
567
+ font-size: 0.78rem;
568
+ font-weight: 600;
569
+ color: var(--text-sub);
570
+ margin-bottom: 8px;
571
  }
572
 
573
+ .input-phone-wrapper {
574
  display: flex;
575
  align-items: center;
576
+ background-color: var(--bg-input);
577
+ border: 1px solid var(--border-subtle);
578
  border-radius: var(--radius-sm);
579
  padding: 0 12px;
580
+ transition: border-color var(--transition-quick);
581
  }
582
 
583
+ .input-phone-wrapper:focus-within {
584
+ border-color: var(--wa-primary);
 
585
  }
586
 
587
+ .phone-sign {
588
+ color: var(--text-muted);
589
+ font-weight: 600;
590
  margin-right: 6px;
591
  }
592
 
593
+ .input-phone-wrapper input {
594
  flex: 1;
595
  background: transparent;
596
  border: none;
597
  outline: none;
598
+ color: var(--text-main);
599
  padding: 10px 0;
600
  font-size: 0.95rem;
601
+ font-family: var(--font-family);
602
  }
603
 
604
+ .field-guide {
605
+ font-size: 0.73rem;
606
  color: var(--text-muted);
607
+ margin-top: 6px;
608
  }
609
 
610
  /* ==========================================================================
611
+ Turnstile Container
612
  ========================================================================== */
613
+
614
+ .turnstile-container {
615
  display: flex;
616
  flex-direction: column;
617
  align-items: center;
618
+ margin-bottom: 20px;
 
 
 
 
 
 
 
 
619
  }
620
 
621
+ .turnstile-slot {
 
 
 
 
 
622
  min-height: 65px;
 
 
 
623
  }
624
 
625
+ .turnstile-note {
626
+ font-size: 0.75rem;
627
+ margin-top: 6px;
 
 
 
628
  }
629
 
630
+ .turnstile-note.success {
631
+ color: var(--wa-accent);
632
  }
633
 
634
+ .turnstile-note.error {
635
+ color: var(--wa-danger);
636
  }
637
 
638
  /* ==========================================================================
639
+ Action Buttons
640
  ========================================================================== */
641
+
642
+ .submit-container {
643
+ margin-top: 24px;
644
  }
645
 
646
+ .btn-action {
 
 
 
 
647
  width: 100%;
648
+ background-color: var(--wa-primary);
649
+ color: var(--text-inverse);
650
  border: none;
651
+ padding: 12px 20px;
652
+ border-radius: var(--radius-sm);
653
+ font-size: 0.92rem;
 
654
  font-weight: 700;
655
+ display: flex;
656
+ align-items: center;
657
+ justify-content: center;
658
+ gap: 8px;
659
  cursor: pointer;
660
+ transition: background-color var(--transition-quick), opacity var(--transition-quick);
 
661
  }
662
 
663
+ .btn-action:hover:not(:disabled) {
664
+ background-color: var(--wa-primary-hover);
 
665
  }
666
 
667
+ .btn-action:disabled {
668
+ opacity: 0.45;
669
  cursor: not-allowed;
 
 
 
 
 
 
 
 
 
 
 
 
 
670
  }
671
 
672
+ .btn-compact {
673
+ width: auto;
674
+ padding: 9px 18px;
 
 
 
 
 
 
 
 
675
  font-size: 0.85rem;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
676
  }
677
 
678
  /* ==========================================================================
679
+ Verification & QR View
680
  ========================================================================== */
681
+
682
+ .verify-layout {
 
 
 
683
  text-align: center;
684
  }
685
 
686
+ .qr-panel, .pairing-panel {
687
+ margin-bottom: 20px;
688
+ }
689
+
690
+ .qr-canvas-holder {
691
+ width: 250px;
692
+ height: 250px;
693
+ margin: 0 auto 20px;
694
+ background-color: #fff;
695
  border-radius: var(--radius-md);
696
+ padding: 14px;
 
697
  display: flex;
698
  align-items: center;
699
  justify-content: center;
 
 
700
  }
701
 
702
+ .qr-visual {
703
  width: 100%;
704
  height: 100%;
705
+ display: block;
706
+ image-rendering: pixelated;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
707
  }
708
 
709
+ .loader-box {
710
  display: flex;
711
  flex-direction: column;
712
  align-items: center;
713
+ gap: 12px;
 
714
  }
715
 
716
+ .circular-spin {
717
+ width: 38px;
718
+ height: 38px;
719
+ border: 3px solid rgba(0, 168, 132, 0.2);
720
+ border-top-color: var(--wa-primary);
721
  border-radius: 50%;
722
+ animation: spin 0.8s linear infinite;
723
  }
724
 
725
+ .loader-text {
726
+ font-size: 0.8rem;
727
+ color: #333;
728
+ font-weight: 500;
729
  }
730
 
731
+ .pairing-header {
732
+ font-size: 0.95rem;
733
  font-weight: 600;
734
+ color: var(--text-main);
735
+ margin-bottom: 14px;
736
  }
737
 
738
+ .pairing-code-card {
739
+ display: inline-flex;
740
+ align-items: center;
741
+ gap: 14px;
742
+ background-color: var(--bg-surface);
743
+ border: 1px solid var(--border-active);
744
+ padding: 12px 20px;
745
+ border-radius: var(--radius-md);
746
+ margin-bottom: 20px;
747
  }
748
 
749
+ .pairing-code-val {
750
+ font-family: 'SF Mono', Consolas, Menlo, monospace;
751
+ font-size: 1.8rem;
752
+ font-weight: 700;
753
+ letter-spacing: 0.15em;
754
+ color: var(--wa-accent);
755
  }
756
 
757
+ .btn-copy {
758
+ background: var(--bg-card);
759
+ border: 1px solid var(--border-subtle);
760
+ color: var(--text-main);
761
+ padding: 6px 10px;
762
+ border-radius: var(--radius-sm);
763
+ font-size: 0.78rem;
764
+ font-weight: 600;
765
+ display: inline-flex;
766
+ align-items: center;
767
+ gap: 5px;
768
+ cursor: pointer;
769
+ transition: var(--transition-quick);
770
+ }
771
+
772
+ .btn-copy:hover {
773
+ border-color: var(--wa-primary);
774
+ color: var(--wa-primary);
775
+ }
776
+
777
+ .instruction-box {
778
+ background-color: var(--bg-surface);
779
+ border: 1px solid var(--border-subtle);
780
  border-radius: var(--radius-md);
781
+ padding: 16px 20px;
782
+ text-align: left;
783
+ max-width: 480px;
784
+ margin: 0 auto 20px;
785
  }
786
 
787
+ .guide-lead {
788
+ font-size: 0.85rem;
789
+ font-weight: 600;
790
+ color: var(--text-main);
791
+ margin-bottom: 8px;
792
  }
793
 
794
+ .guide-steps {
795
+ font-size: 0.8rem;
796
+ color: var(--text-sub);
797
+ padding-left: 20px;
798
+ line-height: 1.6;
 
 
 
 
 
 
799
  }
800
 
801
+ .guide-steps strong {
802
+ color: var(--text-main);
803
+ }
804
+
805
+ .live-status-block {
806
+ background-color: var(--bg-surface);
807
+ border: 1px solid var(--border-subtle);
808
+ border-radius: var(--radius-sm);
809
+ padding: 12px 16px;
810
+ margin-bottom: 20px;
811
  display: flex;
812
+ align-items: center;
813
+ justify-content: space-between;
 
814
  }
815
 
816
+ .pulse-indicator {
817
  display: flex;
818
  align-items: center;
819
  gap: 8px;
820
  }
821
 
822
+ .live-dot {
823
  width: 8px;
824
  height: 8px;
825
  border-radius: 50%;
826
+ background-color: var(--wa-primary);
827
+ animation: pulse-ring 1.8s infinite;
828
  }
829
 
830
+ .live-heading {
831
+ font-size: 0.78rem;
832
+ font-weight: 600;
833
+ color: var(--text-sub);
 
 
 
 
 
 
834
  }
835
 
836
+ .live-info {
837
+ font-size: 0.82rem;
838
+ color: var(--text-main);
839
+ font-weight: 500;
840
+ }
841
+
842
+ .cancel-wrap {
843
+ margin-top: 10px;
844
+ }
845
+
846
+ .btn-cancel {
847
+ background: transparent;
848
+ border: 1px solid var(--wa-danger);
849
+ color: var(--wa-danger);
850
+ padding: 8px 16px;
851
+ border-radius: var(--radius-sm);
852
+ font-size: 0.8rem;
853
  font-weight: 600;
854
+ cursor: pointer;
855
+ transition: var(--transition-quick);
 
856
  }
857
 
858
+ .btn-cancel:hover {
859
+ background-color: var(--wa-danger-bg);
 
 
860
  }
861
 
862
  /* ==========================================================================
863
+ Success View
864
  ========================================================================== */
865
+
866
+ .done-panel {
 
 
867
  text-align: center;
868
+ padding: 10px 0;
 
869
  }
870
 
871
+ .done-icon-circle {
872
+ width: 80px;
873
+ height: 80px;
874
  border-radius: 50%;
875
+ background-color: rgba(37, 211, 102, 0.1);
 
876
  display: flex;
877
  align-items: center;
878
  justify-content: center;
879
+ margin: 0 auto 20px;
880
  }
881
 
882
+ .done-title {
883
+ font-size: 1.35rem;
 
884
  font-weight: 700;
885
+ color: var(--text-main);
886
+ margin-bottom: 8px;
887
  }
888
 
889
+ .done-subtitle {
890
+ font-size: 0.9rem;
891
+ color: var(--text-sub);
892
  max-width: 480px;
893
+ margin: 0 auto 24px;
894
  }
895
 
896
+ .security-card {
897
+ background-color: var(--bg-surface);
898
+ border: 1px solid var(--border-subtle);
899
+ border-radius: var(--radius-md);
900
+ padding: 16px 20px;
901
  display: flex;
902
  align-items: flex-start;
903
  gap: 14px;
 
 
 
 
904
  text-align: left;
905
+ max-width: 520px;
906
+ margin: 0 auto 28px;
907
  }
908
 
909
+ .shield-badge {
910
+ padding-top: 2px;
911
  }
912
 
913
+ .shield-heading {
914
+ font-size: 0.88rem;
915
  font-weight: 600;
916
+ color: var(--text-main);
917
  margin-bottom: 4px;
918
  }
919
 
920
+ .shield-desc {
921
+ font-size: 0.78rem;
922
+ color: var(--text-sub);
923
+ line-height: 1.45;
924
+ }
925
+
926
+ .done-actions {
927
+ max-width: 240px;
928
+ margin: 0 auto;
929
  }
930
 
931
  /* ==========================================================================
932
+ Modal Dialog
933
  ========================================================================== */
934
+
935
+ .modal-backdrop {
936
  position: fixed;
937
+ inset: 0;
938
+ background-color: rgba(0, 0, 0, 0.75);
 
 
 
 
 
939
  display: flex;
940
  align-items: center;
941
  justify-content: center;
 
942
  padding: 16px;
943
+ z-index: 100;
944
  }
945
 
946
+ .modal-window {
947
+ background-color: var(--bg-card);
948
+ border: 1px solid var(--border-subtle);
949
+ border-radius: var(--radius-md);
950
  width: 100%;
951
  max-width: 480px;
952
+ box-shadow: var(--shadow-card);
 
 
 
953
  }
954
 
955
+ .modal-top {
956
  display: flex;
 
957
  align-items: center;
958
+ justify-content: space-between;
959
+ padding: 16px 20px;
960
+ border-bottom: 1px solid var(--border-subtle);
961
  }
962
 
963
+ .modal-header-title {
964
+ font-size: 0.95rem;
965
+ font-weight: 600;
966
+ color: var(--text-main);
967
  }
968
 
969
+ .btn-modal-close {
970
  background: transparent;
971
  border: none;
 
972
  color: var(--text-muted);
973
+ font-size: 1.5rem;
974
  cursor: pointer;
975
  line-height: 1;
976
  }
977
 
978
+ .btn-modal-close:hover {
979
+ color: var(--text-main);
980
  }
981
 
982
+ .modal-content {
983
+ padding: 20px;
984
+ }
985
+
986
+ .modal-explanation {
987
+ font-size: 0.8rem;
988
+ color: var(--text-sub);
989
+ margin-bottom: 16px;
990
+ line-height: 1.45;
991
  }
992
 
993
+ .form-field {
994
  display: flex;
995
  flex-direction: column;
996
  gap: 6px;
997
  }
998
 
999
+ .field-label {
1000
+ font-size: 0.78rem;
1001
  font-weight: 600;
1002
+ color: var(--text-main);
1003
  }
1004
 
1005
+ .field-input {
1006
+ background-color: var(--bg-surface);
1007
+ border: 1px solid var(--border-subtle);
1008
  border-radius: var(--radius-sm);
1009
+ color: var(--text-main);
1010
+ padding: 10px 12px;
1011
+ font-size: 0.85rem;
1012
+ font-family: var(--font-family);
1013
  outline: none;
1014
+ transition: border-color var(--transition-quick);
1015
  }
1016
 
1017
+ .field-input:focus {
1018
+ border-color: var(--wa-primary);
 
1019
  }
1020
 
1021
+ .field-note {
1022
+ font-size: 0.72rem;
1023
  color: var(--text-muted);
1024
  }
1025
 
1026
+ .modal-bottom {
1027
+ padding: 14px 20px;
1028
+ border-top: 1px solid var(--border-subtle);
1029
  display: flex;
1030
  justify-content: flex-end;
1031
  }
 
1033
  /* ==========================================================================
1034
  Footer
1035
  ========================================================================== */
1036
+
1037
+ .app-footer {
1038
+ border-top: 1px solid var(--border-subtle);
1039
+ background-color: var(--bg-card);
1040
+ padding: 24px 16px;
1041
+ margin-top: auto;
1042
+ }
1043
+
1044
+ .footer-inner {
1045
+ max-width: 720px;
1046
+ margin: 0 auto;
1047
  text-align: center;
 
 
 
 
 
 
1048
  }
1049
 
1050
+ .footer-tech {
1051
+ font-size: 0.8rem;
1052
+ color: var(--text-sub);
1053
+ margin-bottom: 6px;
1054
+ }
1055
+
1056
+ .footer-tech a {
1057
+ color: var(--wa-primary);
1058
  text-decoration: none;
1059
+ font-weight: 600;
1060
  }
1061
 
1062
+ .footer-tech a:hover {
1063
  text-decoration: underline;
1064
  }
1065
 
1066
+ .footer-legal {
1067
+ font-size: 0.73rem;
1068
+ color: var(--text-muted);
1069
+ line-height: 1.4;
1070
  }
1071
 
1072
  /* ==========================================================================
1073
+ Utility Classes & Animations
1074
  ========================================================================== */
1075
+
1076
  .hidden {
1077
  display: none !important;
1078
  }
1079
 
1080
+ @keyframes spin {
1081
+ to {
1082
+ transform: rotate(360deg);
1083
+ }
1084
+ }
1085
+
1086
+ @keyframes pulse-ring {
1087
+ 0% {
1088
+ opacity: 0.4;
1089
+ }
1090
+ 50% {
1091
+ opacity: 1;
1092
+ }
1093
+ 100% {
1094
+ opacity: 0.4;
1095
+ }
1096
+ }
1097
+
1098
  /* ==========================================================================
1099
+ Responsive Breakpoints
1100
  ========================================================================== */
1101
+
1102
  @media (max-width: 640px) {
1103
+ .card-panel {
1104
  padding: 24px 16px;
1105
  }
1106
+
1107
+ .dual-preview-grid {
1108
+ grid-template-columns: 1fr;
1109
+ gap: 12px;
1110
+ }
1111
+
1112
+ .preview-frame-rect {
1113
+ width: 120px;
1114
+ height: 160px;
1115
+ }
1116
+
1117
+ .preview-avatar-circle {
1118
+ width: 100px;
1119
+ height: 100px;
1120
  }
1121
 
1122
+ .page-title {
1123
+ font-size: 1.25rem;
 
1124
  }
1125
 
1126
+ .pairing-code-val {
1127
+ font-size: 1.4rem;
 
1128
  }
1129
  }
go.mod CHANGED
@@ -1,6 +1,6 @@
1
  module ppfull
2
 
3
- go 1.25.0
4
 
5
  require (
6
  github.com/coder/websocket v1.8.15
@@ -14,16 +14,15 @@ require (
14
 
15
  require (
16
  github.com/beeper/argo-go v1.1.2 // indirect
17
- github.com/coder/websocket v1.8.15 // indirect
18
  github.com/dustin/go-humanize v1.0.1 // indirect
19
  github.com/elliotchance/orderedmap/v3 v3.1.0 // indirect
20
- github.com/petermattis/goid v0.0.0-20260713124913-97594f28f5ca // indirect
21
  github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
22
  github.com/vektah/gqlparser/v2 v2.5.36 // indirect
23
- golang.org/x/exp v0.0.0-20260709172345-9ea1abe57597 // indirect
24
  golang.org/x/image v0.43.0 // indirect
25
- golang.org/x/sync v0.22.0 // indirect
26
- golang.org/x/text v0.40.0 // indirect
27
  modernc.org/libc v1.37.6 // indirect
28
  modernc.org/mathutil v1.6.0 // indirect
29
  modernc.org/memory v1.7.2 // indirect
@@ -32,16 +31,14 @@ require (
32
 
33
  require (
34
  filippo.io/edwards25519 v1.2.0 // indirect
35
- github.com/google/uuid v1.6.0 // indirect
36
  github.com/mattn/go-colorable v0.1.15 // indirect
37
  github.com/mattn/go-isatty v0.0.22 // indirect
38
  github.com/rs/zerolog v1.35.1 // indirect
39
  go.mau.fi/libsignal v0.2.2 // indirect
40
- go.mau.fi/util v0.9.12-0.20260717235539-f9ffa7eca58d // indirect
41
- go.mau.fi/whatsmeow v0.0.0-20260805124304-6723e556f35a
42
- golang.org/x/crypto v0.54.0 // indirect
43
- golang.org/x/net v0.57.0 // indirect
44
- golang.org/x/sys v0.47.0 // indirect
45
- google.golang.org/protobuf v1.36.11
46
- rsc.io/qr v0.2.0 // indirect
47
  )
 
1
  module ppfull
2
 
3
+ go 1.26.0
4
 
5
  require (
6
  github.com/coder/websocket v1.8.15
 
14
 
15
  require (
16
  github.com/beeper/argo-go v1.1.2 // indirect
 
17
  github.com/dustin/go-humanize v1.0.1 // indirect
18
  github.com/elliotchance/orderedmap/v3 v3.1.0 // indirect
19
+ github.com/petermattis/goid v0.0.0-20260820044319-269ab09b5261 // indirect
20
  github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
21
  github.com/vektah/gqlparser/v2 v2.5.36 // indirect
22
+ golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba // indirect
23
  golang.org/x/image v0.43.0 // indirect
24
+ golang.org/x/sync v0.23.0 // indirect
25
+ golang.org/x/text v0.42.0 // indirect
26
  modernc.org/libc v1.37.6 // indirect
27
  modernc.org/mathutil v1.6.0 // indirect
28
  modernc.org/memory v1.7.2 // indirect
 
31
 
32
  require (
33
  filippo.io/edwards25519 v1.2.0 // indirect
 
34
  github.com/mattn/go-colorable v0.1.15 // indirect
35
  github.com/mattn/go-isatty v0.0.22 // indirect
36
  github.com/rs/zerolog v1.35.1 // indirect
37
  go.mau.fi/libsignal v0.2.2 // indirect
38
+ go.mau.fi/util v0.10.1 // indirect
39
+ go.mau.fi/whatsmeow v0.0.0-20261007111105-c386243a72ba
40
+ golang.org/x/crypto v0.57.0 // indirect
41
+ golang.org/x/net v0.59.0 // indirect
42
+ golang.org/x/sys v0.48.0 // indirect
43
+ google.golang.org/protobuf v1.36.12
 
44
  )
go.sum CHANGED
@@ -30,10 +30,13 @@ github.com/mattn/go-isatty v0.0.22 h1:j8l17JJ9i6VGPUFUYoTUKPSgKe/83EYU2zBC7YNKMw
30
  github.com/mattn/go-isatty v0.0.22/go.mod h1:ZXfXG4SQHsB/w3ZeOYbR0PrPwLy+n6xiMrJlRFqopa4=
31
  github.com/mattn/go-sqlite3 v1.14.48 h1:7XHIgl0a8HwOaiK4E47ozLkST78rR9+OtNGx27D/TFs=
32
  github.com/mattn/go-sqlite3 v1.14.48/go.mod h1:6JTjA44L93a0QCyJef5YvlPoKXntQPjzWv5gtm9sB6w=
 
33
  github.com/mdp/qrterminal v1.0.1 h1:07+fzVDlPuBlXS8tB0ktTAyf+Lp1j2+2zK3fBOL5b7c=
34
  github.com/mdp/qrterminal v1.0.1/go.mod h1:Z33WhxQe9B6CdW37HaVqcRKzP+kByF3q/qLxOGe12xQ=
35
  github.com/petermattis/goid v0.0.0-20260713124913-97594f28f5ca h1:GHSUVE4yOgX4E7kTRzpxCPbCOYkd3Kj8Dgdod30OI1E=
36
  github.com/petermattis/goid v0.0.0-20260713124913-97594f28f5ca/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4=
 
 
37
  github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
38
  github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
39
  github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
@@ -42,6 +45,7 @@ github.com/rs/zerolog v1.35.1 h1:m7xQeoiLIiV0BCEY4Hs+j2NG4Gp2o2KPKmhnnLiazKI=
42
  github.com/rs/zerolog v1.35.1/go.mod h1:EjML9kdfa/RMA7h/6z6pYmq1ykOuA8/mjWaEvGI+jcw=
43
  github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
44
  github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
 
45
  github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
46
  github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
47
  github.com/vektah/gqlparser/v2 v2.5.36 h1:CN9mKVHgMkc+XftdOWIhb4HEL8wKSYkFAqhf8booa7s=
@@ -50,26 +54,44 @@ go.mau.fi/libsignal v0.2.2 h1:QV+XdzQkm3x3aSG7FcqfGSZuFXz83pRZPBFaPygHbOU=
50
  go.mau.fi/libsignal v0.2.2/go.mod h1:CRlIQg2J8uYTfDFvNoO8/KcZjs5cey0vbc6oj/bssY0=
51
  go.mau.fi/util v0.9.12-0.20260717235539-f9ffa7eca58d h1:bUGRidYrauEwLoBvGLLPPQ0lgQUecT0z/ND+vHz07jM=
52
  go.mau.fi/util v0.9.12-0.20260717235539-f9ffa7eca58d/go.mod h1:xunp/oIQfFD68HHcNHfG0pOiHkvEtDhTweeIwKJ//+Q=
 
 
53
  go.mau.fi/whatsmeow v0.0.0-20260805124304-6723e556f35a h1:TTRND9Dvq7YfT9vwJVQK4Zrit/sm3FHE74B5FWe8CgA=
54
  go.mau.fi/whatsmeow v0.0.0-20260805124304-6723e556f35a/go.mod h1:Iy/xVSuVU2payR26MB1hv0UZUWRraEn4qKZ7+VRHulg=
 
 
55
  golang.org/x/crypto v0.54.0 h1:YLIA59K4fiNzHzjnZt2tUJQjQtUWfWbeHBqKtk3eScw=
56
  golang.org/x/crypto v0.54.0/go.mod h1:KWL8ny2AZdGR2cWmzeHrp2azQPGogOv+HeQaVEXC2dk=
 
 
57
  golang.org/x/exp v0.0.0-20260709172345-9ea1abe57597 h1:qLvzZeaANDgyVOA8pyHCOStGlXn0rseXma+GQjeuv2g=
58
  golang.org/x/exp v0.0.0-20260709172345-9ea1abe57597/go.mod h1:EdfpwwqSu+0Li0mzskwHU6FWDV3t9Q+RZDo3QMUtL3Q=
 
 
59
  golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
60
  golang.org/x/image v0.43.0 h1:FLxcP4ec2350nTfOC8ysKtqYSIFbk/QGjw1ZHNP4tsY=
61
  golang.org/x/image v0.43.0/go.mod h1:rrpelvGFt+kLPAjPM4HeWPgrl0FtafueU//e5N0qk/Q=
62
  golang.org/x/net v0.57.0 h1:K5+3DljvIuDG9/Jv9rvyMywYNFCQ9RSUY6OOTTkT+tE=
63
  golang.org/x/net v0.57.0/go.mod h1:KpXc8iv+r3XplLAG/f7Jsf9RPszJzdR0f58q9vGOuEU=
 
 
64
  golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek=
65
  golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
 
 
66
  golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
67
  golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
 
 
68
  golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
69
  golang.org/x/text v0.40.0 h1:Ub2Z6/xjgF1WrYQz2nuITOEegKFtiIy+rieRJ5lHZKs=
70
  golang.org/x/text v0.40.0/go.mod h1:hpnzDAfGV753zIKo+wk3u1bVKCGPbrnF7+7LBF/UHVY=
 
 
71
  google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
72
  google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
 
 
73
  gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
74
  gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
75
  modernc.org/libc v1.37.6 h1:orZH3c5wmhIQFTXF+Nt+eeauyd+ZIt2BX6ARe+kD+aw=
 
30
  github.com/mattn/go-isatty v0.0.22/go.mod h1:ZXfXG4SQHsB/w3ZeOYbR0PrPwLy+n6xiMrJlRFqopa4=
31
  github.com/mattn/go-sqlite3 v1.14.48 h1:7XHIgl0a8HwOaiK4E47ozLkST78rR9+OtNGx27D/TFs=
32
  github.com/mattn/go-sqlite3 v1.14.48/go.mod h1:6JTjA44L93a0QCyJef5YvlPoKXntQPjzWv5gtm9sB6w=
33
+ github.com/mattn/go-sqlite3 v1.14.52 h1:wVbm2Qnf4OXkqhBTSPuCRZDRnxfbVrrmiCEroVdog8U=
34
  github.com/mdp/qrterminal v1.0.1 h1:07+fzVDlPuBlXS8tB0ktTAyf+Lp1j2+2zK3fBOL5b7c=
35
  github.com/mdp/qrterminal v1.0.1/go.mod h1:Z33WhxQe9B6CdW37HaVqcRKzP+kByF3q/qLxOGe12xQ=
36
  github.com/petermattis/goid v0.0.0-20260713124913-97594f28f5ca h1:GHSUVE4yOgX4E7kTRzpxCPbCOYkd3Kj8Dgdod30OI1E=
37
  github.com/petermattis/goid v0.0.0-20260713124913-97594f28f5ca/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4=
38
+ github.com/petermattis/goid v0.0.0-20260820044319-269ab09b5261 h1:lcWAnrqr2nNfDiArwFNHCE4787Mw2tCdVSOXCru0/0E=
39
+ github.com/petermattis/goid v0.0.0-20260820044319-269ab09b5261/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4=
40
  github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
41
  github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
42
  github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
 
45
  github.com/rs/zerolog v1.35.1/go.mod h1:EjML9kdfa/RMA7h/6z6pYmq1ykOuA8/mjWaEvGI+jcw=
46
  github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
47
  github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
48
+ github.com/stretchr/testify v1.12.0 h1:K6Mr6jO9JICuend/5xzTM03ydSV3vdNRYAdPSukj8uI=
49
  github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
50
  github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
51
  github.com/vektah/gqlparser/v2 v2.5.36 h1:CN9mKVHgMkc+XftdOWIhb4HEL8wKSYkFAqhf8booa7s=
 
54
  go.mau.fi/libsignal v0.2.2/go.mod h1:CRlIQg2J8uYTfDFvNoO8/KcZjs5cey0vbc6oj/bssY0=
55
  go.mau.fi/util v0.9.12-0.20260717235539-f9ffa7eca58d h1:bUGRidYrauEwLoBvGLLPPQ0lgQUecT0z/ND+vHz07jM=
56
  go.mau.fi/util v0.9.12-0.20260717235539-f9ffa7eca58d/go.mod h1:xunp/oIQfFD68HHcNHfG0pOiHkvEtDhTweeIwKJ//+Q=
57
+ go.mau.fi/util v0.10.1 h1:1oSqb4TwzLA0cUDY0aomyBPFKkZ3J5fqCmrXV3VH3GQ=
58
+ go.mau.fi/util v0.10.1/go.mod h1:40TDo7/ekSeOjgr8KAmX31Yf4zrOF94j83WQB+u5ZPc=
59
  go.mau.fi/whatsmeow v0.0.0-20260805124304-6723e556f35a h1:TTRND9Dvq7YfT9vwJVQK4Zrit/sm3FHE74B5FWe8CgA=
60
  go.mau.fi/whatsmeow v0.0.0-20260805124304-6723e556f35a/go.mod h1:Iy/xVSuVU2payR26MB1hv0UZUWRraEn4qKZ7+VRHulg=
61
+ go.mau.fi/whatsmeow v0.0.0-20261007111105-c386243a72ba h1:MH7TxK8g2bwVS2yLCuHTSlERawfeAmKm5ktHTjq/dpU=
62
+ go.mau.fi/whatsmeow v0.0.0-20261007111105-c386243a72ba/go.mod h1:7G7AeRACrC8Se+01+SQbdOp2J/Ce0DUMGxTKFKfRHW4=
63
  golang.org/x/crypto v0.54.0 h1:YLIA59K4fiNzHzjnZt2tUJQjQtUWfWbeHBqKtk3eScw=
64
  golang.org/x/crypto v0.54.0/go.mod h1:KWL8ny2AZdGR2cWmzeHrp2azQPGogOv+HeQaVEXC2dk=
65
+ golang.org/x/crypto v0.57.0 h1:3ZVCjf8Ggz7zneR/EHRVx68Ctf+2pmIMP2UFhh9cC6M=
66
+ golang.org/x/crypto v0.57.0/go.mod h1:Fdz0i5U6CoizGwLda9DttjSk6qlZo25zYNtR+ycvuZA=
67
  golang.org/x/exp v0.0.0-20260709172345-9ea1abe57597 h1:qLvzZeaANDgyVOA8pyHCOStGlXn0rseXma+GQjeuv2g=
68
  golang.org/x/exp v0.0.0-20260709172345-9ea1abe57597/go.mod h1:EdfpwwqSu+0Li0mzskwHU6FWDV3t9Q+RZDo3QMUtL3Q=
69
+ golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba h1:Ck8QetSgk912qxWLMCKxd0in+aiyBQyDSMae6e/xmpU=
70
+ golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba/go.mod h1:50RgIsmK7OwqzTTeqcSXQW8SswW0o8fRcDxmqGluJ8E=
71
  golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
72
  golang.org/x/image v0.43.0 h1:FLxcP4ec2350nTfOC8ysKtqYSIFbk/QGjw1ZHNP4tsY=
73
  golang.org/x/image v0.43.0/go.mod h1:rrpelvGFt+kLPAjPM4HeWPgrl0FtafueU//e5N0qk/Q=
74
  golang.org/x/net v0.57.0 h1:K5+3DljvIuDG9/Jv9rvyMywYNFCQ9RSUY6OOTTkT+tE=
75
  golang.org/x/net v0.57.0/go.mod h1:KpXc8iv+r3XplLAG/f7Jsf9RPszJzdR0f58q9vGOuEU=
76
+ golang.org/x/net v0.59.0 h1:5zfYln+w5XCxwrnMMJPufRgNoXEaGxl0wo5GqPXyues=
77
+ golang.org/x/net v0.59.0/go.mod h1:2DA/G1UfVbCpQPeWTmMPGY7Cs2PkBkwu743bVX5PIVg=
78
  golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek=
79
  golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
80
+ golang.org/x/sync v0.23.0 h1:KameEIfc1IkluZyXWLn39Wd4tURc6GbCiISGiZm2bQk=
81
+ golang.org/x/sync v0.23.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0=
82
  golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
83
  golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
84
+ golang.org/x/sys v0.48.0 h1:bbX/i/6MgT9BVLM9RT1thmxL04yeTAhbEz4SyadbXoo=
85
+ golang.org/x/sys v0.48.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
86
  golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
87
  golang.org/x/text v0.40.0 h1:Ub2Z6/xjgF1WrYQz2nuITOEegKFtiIy+rieRJ5lHZKs=
88
  golang.org/x/text v0.40.0/go.mod h1:hpnzDAfGV753zIKo+wk3u1bVKCGPbrnF7+7LBF/UHVY=
89
+ golang.org/x/text v0.42.0 h1:JbOZXgfeCPU9gacVtYliJqOhD+zhrEqK4LfdpmlUZqI=
90
+ golang.org/x/text v0.42.0/go.mod h1:ojzP1Z+2QtioaF8DTtO8K5q7JWVVYwZKenzujK0Zd0E=
91
  google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
92
  google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
93
+ google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc=
94
+ google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
95
  gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
96
  gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
97
  modernc.org/libc v1.37.6 h1:orZH3c5wmhIQFTXF+Nt+eeauyd+ZIt2BX6ARe+kD+aw=
main.go CHANGED
@@ -6,6 +6,7 @@ import (
6
  "embed"
7
  "encoding/base64"
8
  "encoding/json"
 
9
  "fmt"
10
  "io/fs"
11
  "log"
@@ -289,15 +290,16 @@ func handleWebSocket(w http.ResponseWriter, r *http.Request) {
289
  log.Printf("[Session %s] Sesi selesai dan dibersihkan.", sessionID)
290
  }()
291
 
292
- // Device properties (mimic Google Chrome on Windows dengan versi terbaru)
293
  store.DeviceProps.PlatformType = waCompanionReg.DeviceProps_CHROME.Enum()
294
- store.DeviceProps.Os = proto.String("Google Chrome (Windows)")
295
-
296
- // PENTING: Set versi WhatsApp Web terbaru menggunakan proto.Uint32() agar menjadi pointer
 
297
  store.DeviceProps.Version = &waCompanionReg.DeviceProps_AppVersion{
298
- Primary: proto.Uint32(2),
299
- Secondary: proto.Uint32(3000),
300
- Tertiary: proto.Uint32(1026), // Versi WhatsApp Web terkini (2.3000.1026)
301
  }
302
 
303
  deviceStore, err := container.GetFirstDevice(ctx)
@@ -315,7 +317,7 @@ func handleWebSocket(w http.ResponseWriter, r *http.Request) {
315
  // Mode 1: Pairing code (via phone number)
316
  if inMsg.PairNumber != "" {
317
  pairNumber := regexp.MustCompile(`\D+`).ReplaceAllString(inMsg.PairNumber, "")
318
-
319
  // Validasi panjang nomor untuk memastikan ada kode negara
320
  if len(pairNumber) < 10 {
321
  _ = wsjson.Write(ctx, c, WSOutgoingMessage{
@@ -330,6 +332,19 @@ func handleWebSocket(w http.ResponseWriter, r *http.Request) {
330
  Message: fmt.Sprintf("Menghubungkan kode pairing untuk nomor: %s...", pairNumber),
331
  })
332
 
 
 
 
 
 
 
 
 
 
 
 
 
 
333
  if err := client.Connect(); err != nil {
334
  _ = wsjson.Write(ctx, c, WSOutgoingMessage{
335
  Type: "error",
@@ -338,16 +353,44 @@ func handleWebSocket(w http.ResponseWriter, r *http.Request) {
338
  return
339
  }
340
 
341
- // PERBAIKAN: Panggil PairPhone LANGSUNG setelah Connect() tanpa menunggu channel QR.
342
- // Gunakan context.Background() dengan timeout khusus agar tidak terputus jika websocket client glitch.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
343
  pairCtx, pairCancel := context.WithTimeout(context.Background(), 30*time.Second)
344
- code, err := client.PairPhone(pairCtx, pairNumber, true, whatsmeow.PairClientChrome, *store.DeviceProps.Os)
345
  pairCancel()
346
-
347
  if err != nil {
348
  errMsg := err.Error()
349
- if strings.Contains(errMsg, "400") || strings.Contains(errMsg, "bad-request") {
350
- errMsg = "Permintaan ditolak oleh server WhatsApp (400). Ini biasanya terjadi jika: 1) Anda menjalankan ini di IP Cloud/Datacenter (seperti HuggingFace/Vercel) yang diblokir WhatsApp, 2) Nomor tidak terdaftar di WhatsApp, atau 3) IP Anda terdeteksi sebagai bot."
 
 
 
 
351
  }
352
  _ = wsjson.Write(ctx, c, WSOutgoingMessage{
353
  Type: "error",
@@ -362,9 +405,13 @@ func handleWebSocket(w http.ResponseWriter, r *http.Request) {
362
  Message: "Masukkan kode ini pada WhatsApp di HP Anda (Perangkat Tertaut -> Tautkan dengan nomor telepon)",
363
  })
364
 
365
- // Wait for login or timeout (2 minutes)
366
  loginSuccess := false
367
- for i := 0; i < 120; i++ {
 
 
 
 
368
  if client.Store.ID != nil {
369
  loginSuccess = true
370
  break
@@ -372,7 +419,35 @@ func handleWebSocket(w http.ResponseWriter, r *http.Request) {
372
  select {
373
  case <-ctx.Done():
374
  return
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
375
  case <-time.After(1 * time.Second):
 
 
 
 
376
  }
377
  }
378
 
 
6
  "embed"
7
  "encoding/base64"
8
  "encoding/json"
9
+ "errors"
10
  "fmt"
11
  "io/fs"
12
  "log"
 
290
  log.Printf("[Session %s] Sesi selesai dan dibersihkan.", sessionID)
291
  }()
292
 
293
+ // Device properties (mimic Chrome on Windows sesuai spesifikasi dan docs whatsmeow)
294
  store.DeviceProps.PlatformType = waCompanionReg.DeviceProps_CHROME.Enum()
295
+ store.DeviceProps.Os = proto.String("Windows")
296
+
297
+ // PENTING: Gunakan versi WhatsApp Web terkini langsung dari store whatsmeow
298
+ waVer := store.GetWAVersion()
299
  store.DeviceProps.Version = &waCompanionReg.DeviceProps_AppVersion{
300
+ Primary: proto.Uint32(waVer[0]),
301
+ Secondary: proto.Uint32(waVer[1]),
302
+ Tertiary: proto.Uint32(waVer[2]),
303
  }
304
 
305
  deviceStore, err := container.GetFirstDevice(ctx)
 
317
  // Mode 1: Pairing code (via phone number)
318
  if inMsg.PairNumber != "" {
319
  pairNumber := regexp.MustCompile(`\D+`).ReplaceAllString(inMsg.PairNumber, "")
320
+
321
  // Validasi panjang nomor untuk memastikan ada kode negara
322
  if len(pairNumber) < 10 {
323
  _ = wsjson.Write(ctx, c, WSOutgoingMessage{
 
332
  Message: fmt.Sprintf("Menghubungkan kode pairing untuk nomor: %s...", pairNumber),
333
  })
334
 
335
+ // Sesuai dokumentasi resmi whatsmeow (tulir):
336
+ // GetQRChannel() harus dipanggil SEBELUM Connect().
337
+ // Kita perlu menunggu item pertama dari channel untuk memastikan koneksi ke server WhatsApp
338
+ // sudah siap penuh sebelum memanggil PairPhone.
339
+ qrChan, err := client.GetQRChannel(ctx)
340
+ if err != nil {
341
+ _ = wsjson.Write(ctx, c, WSOutgoingMessage{
342
+ Type: "error",
343
+ Message: fmt.Sprintf("Gagal inisialisasi pairing channel: %v", err),
344
+ })
345
+ return
346
+ }
347
+
348
  if err := client.Connect(); err != nil {
349
  _ = wsjson.Write(ctx, c, WSOutgoingMessage{
350
  Type: "error",
 
353
  return
354
  }
355
 
356
+ // Tunggu item pertama dari qrChan agar koneksi siap penuh
357
+ select {
358
+ case item, ok := <-qrChan:
359
+ if !ok {
360
+ _ = wsjson.Write(ctx, c, WSOutgoingMessage{
361
+ Type: "error",
362
+ Message: "Koneksi pairing terputus sebelum siap.",
363
+ })
364
+ return
365
+ }
366
+ if item.Event == "error" || item.Event == "err-client-outdated" {
367
+ _ = wsjson.Write(ctx, c, WSOutgoingMessage{
368
+ Type: "error",
369
+ Message: fmt.Sprintf("Server WhatsApp menolak koneksi (%s): %v", item.Event, item.Error),
370
+ })
371
+ return
372
+ }
373
+ case <-time.After(3 * time.Second):
374
+ // Fallback timeout jika event QR tertunda
375
+ case <-ctx.Done():
376
+ return
377
+ }
378
+
379
+ // Menurut docs resmi whatsmeow:
380
+ // Format clientDisplayName HARUS `Browser (OS)`, contoh: "Chrome (Windows)".
381
+ // WhatsApp server memvalidasi string ini dan akan me-reject dengan error 400 jika tidak sesuai format.
382
  pairCtx, pairCancel := context.WithTimeout(context.Background(), 30*time.Second)
383
+ code, err := client.PairPhone(pairCtx, pairNumber, true, whatsmeow.PairClientChrome, "Chrome (Windows)")
384
  pairCancel()
385
+
386
  if err != nil {
387
  errMsg := err.Error()
388
+ if errors.Is(err, whatsmeow.ErrPhoneNumberIsNotInternational) {
389
+ errMsg = "Nomor telepon harus menyertakan kode negara internasional (contoh: 62812..., bukan 0812...)."
390
+ } else if errors.Is(err, whatsmeow.ErrPhoneNumberTooShort) {
391
+ errMsg = "Nomor telepon terlalu pendek."
392
+ } else if strings.Contains(errMsg, "400") || strings.Contains(errMsg, "bad-request") {
393
+ errMsg = fmt.Sprintf("Permintaan ditolak oleh server WhatsApp (400 Bad Request). Kemungkinan: 1) Nomor tidak terdaftar di WhatsApp, 2) IP server diblokir WhatsApp (Cloud/Datacenter), atau 3) Terlalu banyak percobaan pairing. Detail: %v", err)
394
  }
395
  _ = wsjson.Write(ctx, c, WSOutgoingMessage{
396
  Type: "error",
 
405
  Message: "Masukkan kode ini pada WhatsApp di HP Anda (Perangkat Tertaut -> Tautkan dengan nomor telepon)",
406
  })
407
 
408
+ // Wait for login or timeout (160 seconds sesuai masa aktif websocket pairing WhatsApp)
409
  loginSuccess := false
410
+ loginTimer := time.NewTimer(160 * time.Second)
411
+ defer loginTimer.Stop()
412
+
413
+ loginLoop:
414
+ for !loginSuccess {
415
  if client.Store.ID != nil {
416
  loginSuccess = true
417
  break
 
419
  select {
420
  case <-ctx.Done():
421
  return
422
+ case <-loginTimer.C:
423
+ _ = wsjson.Write(ctx, c, WSOutgoingMessage{
424
+ Type: "error",
425
+ Message: "Waktu pairing habis (timeout). Silakan coba lagi.",
426
+ })
427
+ return
428
+ case item, ok := <-qrChan:
429
+ if !ok {
430
+ if client.Store.ID != nil {
431
+ loginSuccess = true
432
+ }
433
+ break loginLoop
434
+ }
435
+ if item.Event == "success" || client.Store.ID != nil {
436
+ loginSuccess = true
437
+ break loginLoop
438
+ } else if item.Event == "error" {
439
+ _ = wsjson.Write(ctx, c, WSOutgoingMessage{
440
+ Type: "error",
441
+ Message: fmt.Sprintf("Pairing gagal: %v", item.Error),
442
+ })
443
+ return
444
+ }
445
+ // Event "code" dapat diabaikan saat pairing dengan nomor HP
446
  case <-time.After(1 * time.Second):
447
+ if client.Store.ID != nil {
448
+ loginSuccess = true
449
+ break loginLoop
450
+ }
451
  }
452
  }
453