/* ============================================================
   CheckSell — Design System
   ============================================================ */

:root {
  --blue:       #2563EB;
  --blue-dark:  #1d4ed8;
  --blue-light: #eff6ff;
  --green:      #16a34a;
  --green-dark: #15803d;
  --red:        #dc2626;
  --gray-50:    #f9fafb;
  --gray-100:   #f3f4f6;
  --gray-200:   #e5e7eb;
  --gray-400:   #9ca3af;
  --gray-500:   #6b7280;
  --gray-700:   #374151;
  --gray-900:   #111827;
  --white:      #ffffff;
  --radius:     12px;
  --radius-sm:  8px;
  --shadow:     0 1px 4px rgba(0,0,0,.08), 0 2px 12px rgba(0,0,0,.06);
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06);
  --font:       -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-w:      480px;
}

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

html { font-size: 16px; -webkit-tap-highlight-color: transparent; }

body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ============================================================
   AUTH
   ============================================================ */
.auth-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
  background: var(--gray-50);
}

.auth-wrapper { width: 100%; max-width: 380px; }

.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.75rem;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.logo-icon { font-size: 1.75rem; color: var(--blue); }
.logo-name { font-size: 1.75rem; font-weight: 800; color: var(--blue); letter-spacing: -0.03em; }

.auth-slogan {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin-bottom: 1.75rem;
  font-style: italic;
}

.auth-footer { text-align: center; font-size: 0.75rem; color: var(--gray-400); margin-top: 1.25rem; }

/* ============================================================
   HEADER
   ============================================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  height: 56px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.logo-text { font-size: 1.2rem; font-weight: 800; color: var(--blue); letter-spacing: -0.02em; }

.header-right { display: flex; align-items: center; gap: 0.75rem; }

.header-company {
  font-size: 0.78rem;
  color: var(--gray-500);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-menu { position: relative; }

.avatar-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  border: 1px solid var(--gray-200);
  min-width: 180px;
  padding: 0.5rem 0;
  display: none;
  z-index: 200;
}

.dropdown-menu.open { display: block; }

.dropdown-name { display: block; padding: 0.5rem 1rem; font-weight: 600; font-size: 0.875rem; }
.dropdown-role { display: block; padding: 0 1rem 0.5rem; font-size: 0.75rem; color: var(--gray-500); border-bottom: 1px solid var(--gray-200); margin-bottom: 0.25rem; }
.dropdown-divider { border-top: 1px solid var(--gray-200); margin: 0.25rem 0; }

.dropdown-item {
  display: block;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  color: var(--gray-700);
  transition: background 0.1s;
}

.dropdown-item:hover { background: var(--gray-50); }
.dropdown-item-danger { color: var(--red); }

/* ============================================================
   MAIN / LAYOUT
   ============================================================ */
.app-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1rem;
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard { display: flex; flex-direction: column; gap: 1.25rem; }

.dash-greeting h2 { font-size: 1.3rem; font-weight: 700; }
.dash-company { font-size: 0.875rem; color: var(--gray-500); margin-top: 2px; }

.btn-new {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.1rem;
}

.btn-plus { font-size: 1.4rem; font-weight: 300; }

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid var(--gray-200);
  transition: transform 0.1s, box-shadow 0.1s;
}

.stat-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }

.stat-value { font-size: 2rem; font-weight: 800; color: var(--blue); line-height: 1; }
.stat-label { font-size: 0.78rem; color: var(--gray-500); }

.dash-recentes h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; }

.link-ver-todos { display: block; text-align: center; font-size: 0.875rem; color: var(--blue); margin-top: 0.75rem; }

/* ============================================================
   LIST CARDS
   ============================================================ */
.list-cards { display: flex; flex-direction: column; gap: 0.5rem; }

.list-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  padding: 0.875rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: box-shadow 0.1s;
}

.list-card:hover { box-shadow: var(--shadow); }

.list-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-card-name { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-card-vehicle { font-size: 0.78rem; color: var(--gray-500); }
.list-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.list-card-date { font-size: 0.72rem; color: var(--gray-400); }

/* ============================================================
   WIZARD
   ============================================================ */
.wizard { display: flex; flex-direction: column; gap: 1.25rem; }

.wizard-progress { display: flex; flex-direction: column; gap: 6px; }

.progress-bar {
  height: 4px;
  background: var(--gray-200);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 99px;
  transition: width 0.3s ease;
}

.progress-label { font-size: 0.75rem; color: var(--gray-500); }

.wizard-title { font-size: 1.25rem; font-weight: 700; }
.wizard-subtitle { font-size: 0.875rem; color: var(--gray-500); margin-top: -0.75rem; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { display: flex; flex-direction: column; gap: 6px; }

.wizard-form { display: flex; flex-direction: column; gap: 1.1rem; }
.auth-form   { display: flex; flex-direction: column; gap: 1rem; }

label { font-size: 0.875rem; font-weight: 500; color: var(--gray-700); }

.form-hint { font-size: 0.78rem; color: var(--gray-500); }
.label-optional { font-weight: 400; color: var(--gray-400); font-size: 0.8rem; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
select,
textarea {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.875rem;
  font-size: 1rem;
  font-family: var(--font);
  color: var(--gray-900);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

textarea { resize: vertical; }

.form-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* ============================================================
   REASON CHIPS (motivos de visita)
   ============================================================ */
.reason-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.reason-chip input { position: absolute; opacity: 0; width: 0; height: 0; }

.reason-chip span {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 99px;
  font-size: 0.82rem;
  color: var(--gray-700);
  background: var(--white);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.reason-chip input:checked + span {
  border-color: var(--blue);
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 600;
}

/* ============================================================
   TOGGLE GROUP (sim/não, perfil)
   ============================================================ */
.toggle-group { display: flex; gap: 0.5rem; }

.toggle-option { flex: 1; }
.toggle-option input { position: absolute; opacity: 0; width: 0; height: 0; }

.toggle-option span {
  display: block;
  text-align: center;
  padding: 0.65rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
}

.toggle-option input:checked + span {
  border-color: var(--blue);
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 600;
}

/* ============================================================
   CATEGORY CHIPS (tipo do veículo)
   ============================================================ */
.category-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.category-chip { flex: none; }
.category-chip input { position: absolute; opacity: 0; width: 0; height: 0; }

.category-chip span {
  display: block;
  padding: 0.5rem 1.1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s;
}

.category-chip input:checked + span {
  border-color: var(--blue);
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 600;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  white-space: nowrap;
  -webkit-appearance: none;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--blue);
  color: var(--white);
}
.btn-primary:hover { background: var(--blue-dark); }

.btn-outline {
  background: var(--white);
  color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }

.btn-ghost {
  background: transparent;
  color: var(--gray-500);
  border: none;
}
.btn-ghost:hover { color: var(--gray-700); background: var(--gray-100); }

.btn-whatsapp {
  background: #25D366;
  color: var(--white);
  font-size: 1rem;
}
.btn-whatsapp:hover { background: #1ebe57; }

.btn-full { width: 100%; }
.btn-sm { padding: 0.45rem 0.875rem; font-size: 0.8rem; }
.btn-lg { padding: 1rem 1.5rem; font-size: 1rem; border-radius: var(--radius); }
.btn-xl { padding: 1.2rem 1.5rem; font-size: 1.1rem; border-radius: var(--radius); }

/* ============================================================
   CHECKBOX
   ============================================================ */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.alert-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
}

.badge-rascunho        { background: var(--gray-100); color: var(--gray-600, #4b5563); }
.badge-em_andamento    { background: #fef9c3; color: #854d0e; }
.badge-material_gerado { background: #ede9fe; color: #5b21b6; }
.badge-enviado         { background: #dbeafe; color: #1e40af; }
.badge-negociacao      { background: #fce7f3; color: #9d174d; }
.badge-fechado         { background: #dcfce7; color: #14532d; }
.badge-perdido         { background: #fee2e2; color: #7f1d1d; }

/* ============================================================
   PHOTO ITEMS (Etapa 3)
   ============================================================ */
.photo-section { display: flex; flex-direction: column; gap: 0.5rem; }
.photo-section-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-500); }
.photo-list { display: flex; flex-direction: column; gap: 0.5rem; }

.photo-item {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.photo-item.photo-done { border-color: #bbf7d0; background: #f0fdf4; }

.photo-item-icon {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.photo-item-icon img { width: 100%; height: 100%; object-fit: cover; }
.camera-icon { font-size: 1.4rem; }

.photo-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.photo-item-label { font-size: 0.875rem; font-weight: 500; }
.photo-item-status { font-size: 0.75rem; color: var(--gray-500); }

.photo-extra-actions { margin-top: 0.5rem; }

/* ============================================================
   OPPORTUNITIES (Etapa 4)
   ============================================================ */
.opp-list { display: flex; flex-direction: column; gap: 0.5rem; }

.opp-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
}

.opp-card:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-light);
}

.opp-card input { position: absolute; opacity: 0; width: 0; height: 0; }

.opp-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.opp-name { font-size: 0.9rem; font-weight: 600; }
.opp-reason { font-size: 0.78rem; color: var(--gray-500); }

.opp-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: transparent;
  transition: all 0.15s;
  flex-shrink: 0;
}

.opp-card:has(input:checked) .opp-check {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.opp-tag {
  display: inline-block;
  background: var(--blue-light);
  color: var(--blue);
  border-radius: 99px;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ============================================================
   SUMMARY (Etapa 5)
   ============================================================ */
.summary-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.summary-row { display: flex; gap: 0.75rem; align-items: baseline; }
.summary-key { font-size: 0.78rem; color: var(--gray-500); min-width: 60px; }
.summary-val { font-size: 0.9rem; font-weight: 600; }

.summary-section { display: flex; flex-direction: column; gap: 0.5rem; }
.summary-section h3 { font-size: 0.875rem; font-weight: 700; color: var(--gray-700); }

.summary-list { display: flex; flex-direction: column; gap: 0.25rem; }

.summary-list-item {
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.summary-defeito    { background: #fef2f2; color: #991b1b; }
.summary-defeito::before { content: '⚠ '; }
.summary-oportunidade { background: var(--blue-light); color: var(--blue); }
.summary-oportunidade::before { content: '✦ '; }
.summary-opp        { background: #f0fdf4; color: #166534; }
.summary-opp::before { content: '✓ '; }

.summary-actions { display: flex; flex-direction: column; gap: 0.5rem; }

/* ============================================================
   WHATSAPP SEND (Etapa 6)
   ============================================================ */
.send-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.send-client { font-weight: 700; }
.send-separator { color: var(--gray-400); }
.send-vehicle { color: var(--gray-500); }

.send-opps { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.message-preview {
  background: #f0f9f0;
  border-radius: var(--radius-sm);
  padding: 1rem;
  border: 1px solid #bbf7d0;
}

.message-preview-text { font-size: 0.875rem; color: var(--gray-700); line-height: 1.6; }

.pdf-badge {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.pdf-badge .pdf-icon { font-size: 1.2rem; }
.pdf-pending { color: var(--gray-400); }

.wa-icon { font-size: 1.1rem; }

/* ============================================================
   EDITOR DE MENSAGEM (Etapa 6)
   ============================================================ */
.msg-editor {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.msg-editor-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
}

.msg-textarea {
  width: 100%;
  border: 1.5px solid var(--blue);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--gray-900);
  resize: vertical;
  outline: none;
  line-height: 1.6;
}

/* ============================================================
   AUTO-SAVE TOAST
   ============================================================ */
.autosave-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-900);
  color: var(--white);
  padding: 0.5rem 1.25rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  white-space: nowrap;
}

.autosave-toast.show { opacity: 1; }

/* ============================================================
   MODALS
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; }
.modal.hidden { display: none; }

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(2px);
}

.modal-box {
  position: relative;
  background: var(--white);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 { font-size: 1rem; font-weight: 700; }

.modal-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--gray-500);
  cursor: pointer;
  padding: 4px;
}

.modal-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }

/* Camera */
#cameraVideo {
  width: 100%;
  border-radius: var(--radius-sm);
  background: #000;
  max-height: 50vh;
  object-fit: cover;
}

#previewImg {
  width: 100%;
  border-radius: var(--radius-sm);
  max-height: 50vh;
  object-fit: contain;
}

.camera-controls { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }

.preview-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.preview-actions .btn { flex: 1; }

.annotation-actions { display: flex; flex-direction: column; gap: 0.5rem; }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.page-header h2 { font-size: 1.2rem; font-weight: 700; }

/* ============================================================
   HISTORY TABLE
   ============================================================ */
.history-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.history-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 2px solid var(--gray-200);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
  white-space: nowrap;
}

.history-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}

.history-table tr:hover td { background: var(--gray-50); }

/* ============================================================
   TAG LIST (admin)
   ============================================================ */
.tag-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

.tag {
  display: inline-block;
  background: var(--gray-100);
  color: var(--gray-700);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.72rem;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--gray-500);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

/* ============================================================
   LINKS
   ============================================================ */
.link-muted { font-size: 0.82rem; color: var(--gray-500); }
.link-muted:hover { color: var(--blue); }

/* ============================================================
   UTILITIES
   ============================================================ */
.hidden { display: none !important; }

/* ============================================================
   RESPONSIVE — pequenas telas
   ============================================================ */
@media (max-width: 380px) {
  .btn-xl { padding: 1rem; font-size: 1rem; }
  .stat-value { font-size: 1.6rem; }
}

/* ============================================================
   SAFE AREA (notch/home bar)
   ============================================================ */
.app-main {
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}

/* ============================================================
   WIZARD STEP COUNTER
   ============================================================ */
.wizard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wizard-step-counter {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-400);
}

/* ============================================================
   PHOTO STATUS DOT
   ============================================================ */
.photo-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.photo-status-dot.done    { background: #16a34a; }
.photo-status-dot.pending { background: #f59e0b; }
.photo-status-dot.revisar { background: #8b5cf6; }

.photo-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-count-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-500);
  background: var(--gray-100);
  border-radius: 99px;
  padding: 0.1rem 0.55rem;
}

/* ============================================================
   ANNOTATION TYPE BUTTONS (Defeito / Oportunidade / Observação)
   ============================================================ */
.ann-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
}
.ann-type-btn {
  padding: 0.65rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  background: var(--white);
}
.ann-type-btn.defeito      { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.ann-type-btn.defeito.active { background: #dc2626; color: #fff; border-color: #dc2626; }
.ann-type-btn.oportunidade { background: #f0fdf4; color: #16a34a; border-color: #bbf7d0; }
.ann-type-btn.oportunidade.active { background: #16a34a; color: #fff; border-color: #16a34a; }
.ann-type-btn.observacao   { background: #eff6ff; color: var(--blue); border-color: #bfdbfe; }
.ann-type-btn.observacao.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ============================================================
   WHATSAPP MESSAGE BUBBLE
   ============================================================ */
.wa-bubble {
  background: #dcf8c6;
  border-radius: 12px 12px 4px 12px;
  padding: 0.875rem 1rem 0.625rem;
}
.wa-bubble-text {
  font-size: 0.875rem;
  color: #1a1a1a;
  line-height: 1.6;
}
.wa-bubble-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}
.wa-bubble-time { font-size: 0.7rem; color: #667781; }
.wa-check       { font-size: 0.75rem; color: #53bdeb; }

/* ============================================================
   SUMMARY INFO GRID (Etapa 5 — 2 colunas)
   ============================================================ */
.summary-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.summary-info-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.summary-info-icon { font-size: 1rem; color: var(--gray-400); margin-bottom: 2px; }
.summary-info-name { font-size: 0.9rem; font-weight: 700; }
.summary-info-detail { font-size: 0.78rem; color: var(--gray-500); }

/* ============================================================
   OPP CHIPS GRID (Etapa 5)
   ============================================================ */
.opp-chips-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.opp-chip-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 99px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-700);
}
.opp-chip-icon { font-size: 0.9rem; }

/* ============================================================
   PDF ATTACH CARD (Etapa 6)
   ============================================================ */
.pdf-attach-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.pdf-attach-icon { font-size: 1.5rem; color: #dc2626; flex-shrink: 0; }
.pdf-attach-info { flex: 1; min-width: 0; }
.pdf-attach-name { font-size: 0.875rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdf-attach-size { font-size: 0.72rem; color: var(--gray-400); }

/* ============================================================
   VER MAIS OPÇÕES (Etapa 1 — motivos de visita)
   ============================================================ */
.reasons-collapsed .reason-chip:nth-child(n+9) { display: none; }
.link-ver-mais {
  font-size: 0.82rem;
  color: var(--blue);
  cursor: pointer;
  margin-top: 0.25rem;
  display: inline-block;
  font-weight: 500;
}

/* ============================================================
   BTN WHATSAPP (verde com ícone)
   ============================================================ */
.btn-wa-send {
  background: #25D366;
  color: #fff;
  font-size: 1rem;
}
.btn-wa-send:hover { background: #1ebe57; }

/* ============================================================
   STEP NAVIGATION (jump between wizard steps)
   ============================================================ */
.step-nav {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  margin-bottom: 1.25rem;
  background: var(--gray-50);
}
.step-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.5rem 0.25rem;
  text-decoration: none;
  color: var(--gray-400);
  font-size: 0.65rem;
  font-weight: 500;
  border-right: 1px solid var(--gray-200);
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  line-height: 1.2;
  text-align: center;
}
.step-nav-item:last-child { border-right: none; }
.step-nav-item:not(.active):hover {
  background: #fff;
  color: var(--blue);
}
.step-nav-item.active {
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}
.step-nav-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(0,0,0,0.08);
}
.step-nav-item.active .step-nav-num {
  background: rgba(255,255,255,0.25);
}
.step-nav-label {
  font-size: 0.6rem;
  line-height: 1;
}
@media (min-width: 480px) {
  .step-nav-item { font-size: 0.72rem; padding: 0.55rem 0.4rem; }
  .step-nav-num  { width: 1.5rem; height: 1.5rem; font-size: 0.72rem; }
  .step-nav-label { font-size: 0.65rem; }
}
