/* Setup / Onboarding Page */

body.setup-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 48px;
}

/* Progress Header */
#setup-header {
  width: 100%; max-width: 480px;
  margin-bottom: 28px;
}
.setup-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
}
.setup-logo-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--teal), #06b6d4);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
}
.setup-logo-mark svg { width: 20px; height: 20px; color: #fff; }
.setup-logo-text { font-size: 16px; font-weight: 700; }

.progress-label {
  font-size: 12px; color: var(--text-3);
  margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), #06b6d4);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* Step Container */
.step {
  width: 100%; max-width: 480px;
  display: none;
}
.step.active { display: block; }

.step-heading {
  font-size: 26px; font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.2;
}
.step-sub {
  font-size: 15px; color: var(--text-2);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* Account Form */
#form-signup {
  display: flex; flex-direction: column; gap: 18px;
}
.photo-upload {
  display: flex; align-items: center; gap: 16px;
}
.photo-preview {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 2px dashed var(--border);
  background: var(--card-bg-alt);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.photo-preview:hover { border-color: var(--teal); }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview svg { width: 24px; height: 24px; color: var(--text-3); }
.photo-actions { display: flex; flex-direction: column; gap: 4px; }
.photo-btn {
  background: none; border: none;
  color: var(--teal); font-size: 13px;
  cursor: pointer; text-align: left; padding: 0;
  font-family: var(--font-sans);
}
.photo-btn:hover { text-decoration: underline; }
.photo-sub { font-size: 11px; color: var(--text-3); }
#file-input { display: none; }

.pace-row { display: flex; gap: 10px; align-items: flex-start; }
.pace-row .field { flex: 1; }
.pace-hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* Step 2 — Download */
.app-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--card-bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s;
}
.app-card:hover { border-color: var(--teal); }
.app-icon {
  width: 64px; height: 64px;
  border-radius: 14px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.app-icon svg { width: 32px; height: 32px; color: #fff; }
.app-info { flex: 1; }
.app-name { font-size: 17px; font-weight: 600; margin-bottom: 2px; }
.app-desc { font-size: 13px; color: var(--text-2); line-height: 1.4; }
.app-arrow { color: var(--text-3); }
.app-arrow svg { width: 20px; height: 20px; }

.step-desc-box {
  background: var(--card-bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 14px; color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Step 3 — Configure */
.url-display {
  background: var(--card-bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 20px;
}
.url-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.url-value {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--teal);
  word-break: break-all;
  cursor: pointer;
  display: flex; align-items: flex-start; gap: 8px;
}
.url-value .copy-btn {
  background: none; border: none; cursor: pointer; color: var(--text-3);
  padding: 0; flex-shrink: 0; margin-top: 2px;
  transition: color 0.15s;
  font-family: var(--font-sans);
}
.url-value .copy-btn:hover { color: var(--teal); }
.url-value .copy-btn svg { width: 14px; height: 14px; }
.url-text { flex: 1; }
.copied-flash { font-size: 12px; color: var(--green); display: none; }
.copied-flash.visible { display: inline; }

.interval-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card-bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 24px;
}
.interval-label { font-size: 13px; color: var(--text-2); }
.interval-value { font-family: var(--font-mono); font-size: 15px; font-weight: 600; color: var(--teal); }

/* Instructions */
.instruction-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 14px;
  margin-bottom: 24px;
}
.instruction-step {
  display: flex; gap: 12px;
  font-size: 14px; color: var(--text-2);
  line-height: 1.5;
}
.step-num {
  width: 24px; height: 24px;
  background: var(--card-bg-alt);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--teal);
  flex-shrink: 0; margin-top: 2px;
}
.step-text strong { color: var(--text); }

/* Test connection */
.test-result {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.test-result.success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: var(--green); display: flex; }
.test-result.failure { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.3);  color: var(--red);   display: flex; }
.test-result svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

/* Step 4 — Battery */
.checklist {
  display: flex; flex-direction: column; gap: 2px;
  margin-bottom: 28px;
}
.check-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.12s;
  user-select: none;
}
.check-item:hover { background: var(--card-bg-alt); }
.check-item.checked { opacity: 0.6; }
.check-box {
  width: 22px; height: 22px;
  border: 2px solid var(--border);
  border-radius: 5px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
  transition: border-color 0.15s, background 0.15s;
}
.check-item.checked .check-box {
  background: var(--green);
  border-color: var(--green);
}
.check-box svg { width: 13px; height: 13px; color: #fff; display: none; }
.check-item.checked .check-box svg { display: block; }
.check-text { font-size: 14px; line-height: 1.5; color: var(--text); }
.check-text small { display: block; font-size: 12px; color: var(--text-2); margin-top: 3px; }

/* Step 5 — Summary */
.summary-card {
  background: linear-gradient(135deg, rgba(20,184,166,0.1), rgba(6,182,212,0.05));
  border: 1px solid rgba(20,184,166,0.25);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  display: flex; gap: 16px; align-items: flex-start;
}
.summary-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.summary-info { flex: 1; }
.summary-name { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.summary-detail { font-size: 13px; color: var(--text-2); margin-bottom: 2px; }
.summary-start { font-size: 13px; color: var(--teal); font-weight: 500; }

.mini-checklist {
  background: var(--card-bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}
.mini-check-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-2);
  padding: 5px 0;
}
.mini-check-icon { color: var(--green); flex-shrink: 0; }
.mini-check-icon svg { width: 14px; height: 14px; }

.share-box {
  background: var(--card-bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}
.share-label { font-size: 12px; color: var(--text-3); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.06em; }
.share-text {
  font-size: 13px; color: var(--text-2);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 10px;
  line-height: 1.5;
}

.btn-area { display: flex; flex-direction: column; gap: 10px; }

/* Navigation */
.step-nav { margin-top: 28px; }
