/* ===== Assyst CRM — Design System ===== */
:root {
  --orange: #F26729;
  --orange-dark: #d4551e;
  --orange-light: #fef3ed;
  --graphite: #1D242B;
  --graphite-light: #2a3440;
  --graphite-lighter: #3a4855;
  --bg: #f4f6f8;
  --white: #ffffff;
  --border: #e2e6ea;
  --text: #1D242B;
  --text-muted: #6b7a8d;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.12);
  --sidebar-w: 250px;
  --header-h: 60px;
  --transition: .2s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

/* ===== Login ===== */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--graphite) 0%, var(--graphite-light) 100%);
}
.login-box {
  background: var(--white);
  padding: 48px 40px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
}
.login-box h1 {
  text-align: center;
  margin-bottom: 8px;
  color: var(--orange);
  font-size: 28px;
}
.login-box .subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.login-box .error-msg {
  background: #fef2f2;
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 13px;
  display: none;
}

/* ===== Layout ===== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--graphite);
  color: var(--white);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
}
.sidebar-brand {
  padding: 20px 24px;
  font-size: 22px;
  font-weight: 700;
  color: var(--orange);
  border-bottom: 1px solid var(--graphite-lighter);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-brand span { color: var(--white); font-weight: 400; font-size: 13px; }
.sidebar-nav {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: #a0aec0;
  text-decoration: none;
  font-size: 14px;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: var(--graphite-light);
  color: var(--white);
  border-left-color: var(--orange);
}
.sidebar-nav a svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Header */
.main-area {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
}
.header {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-left h2 {
  font-size: 18px;
  font-weight: 600;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-user {
  font-size: 13px;
  color: var(--text-muted);
}
.header-user strong { color: var(--text); }
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 24px;
}

/* Content */
.content {
  flex: 1;
  padding: 24px 28px;
}

/* ===== Forms ===== */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}
.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(242,103,41,.12);
}
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  accent-color: var(--orange);
  width: 16px;
  height: 16px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}
.btn-primary {
  background: var(--orange);
  color: var(--white);
}
.btn-primary:hover { background: var(--orange-dark); }
.btn-secondary {
  background: var(--graphite);
  color: var(--white);
}
.btn-secondary:hover { background: var(--graphite-light); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--orange); color: var(--orange); }
.btn-danger {
  background: var(--danger);
  color: var(--white);
}
.btn-danger:hover { background: #dc2626; }
.btn-success {
  background: var(--success);
  color: var(--white);
}
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-icon {
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: var(--radius);
}
.btn-icon:hover { background: var(--bg); color: var(--orange); }
.btn-group {
  display: flex;
  gap: 8px;
}

/* ===== Cards & Panels ===== */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.card-header h3 { font-size: 16px; font-weight: 600; }

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.stat-card .stat-label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: .5px;
  margin-bottom: 4px;
}
.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}
.stat-card .stat-value.orange { color: var(--orange); }
.stat-card .stat-value.green { color: var(--success); }

/* Charts area */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
.chart-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.chart-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}
.chart-bar-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chart-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.chart-bar-label {
  width: 140px;
  font-size: 12px;
  text-align: right;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chart-bar-track {
  flex: 1;
  height: 24px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.chart-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .5s ease;
  min-width: 2px;
}
.chart-bar-value {
  width: 40px;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

/* Funnel */
.funnel-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.funnel-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--radius);
  color: var(--white);
  font-weight: 500;
  font-size: 14px;
}
.funnel-step .funnel-count {
  margin-left: auto;
  font-size: 20px;
  font-weight: 700;
}

/* ===== Tables ===== */
.table-container {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
table thead th {
  text-align: left;
  padding: 12px 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  white-space: nowrap;
}
table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
table tbody tr:hover {
  background: var(--orange-light);
}

/* ===== Pipeline Kanban ===== */
.pipeline-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.pipeline-filters select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  background: var(--white);
}
.kanban {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  min-height: 60vh;
}
.kanban-column {
  min-width: 280px;
  max-width: 300px;
  flex-shrink: 0;
  background: var(--bg);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
}
.kanban-column-header {
  padding: 14px 16px;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--white);
}
.kanban-column-header .count {
  background: rgba(255,255,255,.25);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
}
.kanban-cards {
  flex: 1;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 60px;
}
.kanban-cards.drag-over {
  background: rgba(242,103,41,.08);
  border-radius: 0 0 var(--radius) var(--radius);
}
.kanban-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: grab;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}
.kanban-card:active { cursor: grabbing; }
.kanban-card:hover { box-shadow: var(--shadow-lg); }
.kanban-card.dragging {
  opacity: .5;
  transform: rotate(2deg);
}
.kanban-card-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text);
}
.kanban-card-service {
  font-size: 12px;
  color: var(--orange);
  font-weight: 500;
  margin-bottom: 8px;
}
.kanban-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}
.kanban-card-value {
  font-weight: 600;
  color: var(--success);
}
.kanban-card-days {
  font-size: 11px;
  margin-top: 6px;
  color: var(--text-muted);
}
.kanban-card-flags {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.flag-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--warning);
  color: var(--white);
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.modal {
  background: var(--white);
  border-radius: 12px;
  width: 95%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform var(--transition);
}
.modal-overlay.open .modal {
  transform: translateY(0);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 18px; }
.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.modal-lg { max-width: 800px; }
/* Modal XL — usado pelo form VZ (mais campos, cards numerados) */
.modal-lg.modal-vz, .modal-xl { max-width: 1180px; width: 96%; }

/* ===== Tags & Badges ===== */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}
.badge-orange { background: var(--orange-light); color: var(--orange); }
.badge-green { background: #dcfce7; color: #166534; }
.badge-red { background: #fef2f2; color: #b91c1c; }
.badge-blue { background: #eff6ff; color: #1e40af; }
.badge-gray { background: var(--bg); color: var(--text-muted); }

/* ===== Toolbar ===== */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.search-box {
  position: relative;
}
.search-box input {
  padding: 10px 14px 10px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  width: 300px;
  background: var(--white);
}
.search-box input:focus {
  border-color: var(--orange);
  outline: none;
}
.search-box svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

/* ===== Settings tabs ===== */
.settings-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
}
.settings-tab {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  transition: all var(--transition);
}
.settings-tab:hover { color: var(--text); }
.settings-tab.active {
  color: var(--orange);
  border-bottom-color: var(--orange);
}
.settings-panel { display: none; }
.settings-panel.active { display: block; }

/* ===== Editable list ===== */
.editable-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.editable-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--radius);
}
.editable-list-item input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
}
.editable-list-item .btn-icon { flex-shrink: 0; }

/* ===== Alerts List ===== */
.alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fef3ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  margin-bottom: 8px;
}
.alert-item .alert-icon { color: var(--orange); font-size: 20px; }
.alert-item .alert-text { flex: 1; font-size: 13px; }

/* ===== Activity Timeline ===== */
.timeline {
  position: relative;
  padding-left: 24px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  padding-bottom: 20px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid var(--white);
}
.timeline-item.completed::before { background: var(--success); }
.timeline-item .timeline-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.timeline-item .timeline-content {
  font-size: 14px;
}
.timeline-item .timeline-type {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--orange);
  letter-spacing: .5px;
}

/* ===== Toast ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 14px 20px;
  border-radius: var(--radius);
  color: var(--white);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  animation: slideIn .3s ease;
  max-width: 360px;
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--info); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== Loading ===== */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Empty state ===== */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  color: var(--border);
}
.empty-state p { font-size: 15px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-area {
    margin-left: 0;
  }
  .menu-toggle {
    display: block;
  }
  .content {
    padding: 16px;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .charts-grid {
    grid-template-columns: 1fr;
  }
  .form-row, .form-row-3 {
    grid-template-columns: 1fr;
  }
  .kanban {
    flex-direction: column;
  }
  .kanban-column {
    min-width: auto;
    max-width: none;
  }
  .pipeline-filters {
    flex-direction: column;
    align-items: stretch;
  }
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .search-box input { width: 100%; }
  .modal { width: 98%; }
}

/* ════════════════════════════════════════════════════
   FORM VZ — Layout em cards numerados (referência: nova-proposta-vistoria.html)
   Aplicado ao modal de proposta quando serviceType === 'VZ'.
   Ondas 1-6 (31/05): estrutura, badges, grid 12-col, design system polido.
   ════════════════════════════════════════════════════ */
.form-vz {
  --vz-bg: #f3f4f6;
  --vz-card: #ffffff;
  --vz-ink: #27313f;
  --vz-muted: #8a94a6;
  --vz-line: #e6eaf0;
  --vz-soft: #f8fafc;
  --vz-blue-soft: #eef6ff;
  --vz-blue: #3c78d8;
  --vz-orange: #ff6428;
  --vz-orange-dark: #db4a14;
  --vz-orange-soft: #fff1ea;
  --vz-green: #1fa866;
  --vz-radius: 18px;
  --vz-field-radius: 10px;
  --vz-shadow: 0 12px 34px rgba(28,38,56,.08);
}

.vz-card {
  background: var(--vz-card);
  border: 1px solid var(--vz-line);
  border-radius: var(--vz-radius);
  box-shadow: var(--vz-shadow);
  padding: 24px;
  margin-bottom: 22px;
  overflow: hidden;
}
.vz-section-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}
.vz-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--vz-orange);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
  flex: 0 0 auto;
  margin-top: 1px;
}
.vz-section-title h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
  color: var(--vz-ink);
  font-weight: 700;
}
.vz-section-title p {
  margin: 4px 0 0;
  color: var(--vz-muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
}
.vz-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}
.vz-grid .vz-span2  { grid-column: span 2; }
.vz-grid .vz-span3  { grid-column: span 3; }
.vz-grid .vz-span4  { grid-column: span 4; }
.vz-grid .vz-span5  { grid-column: span 5; }
.vz-grid .vz-span6  { grid-column: span 6; }
.vz-grid .vz-span7  { grid-column: span 7; }
.vz-grid .vz-span8  { grid-column: span 8; }
.vz-grid .vz-span12 { grid-column: span 12; }
.vz-grid label {
  display: block;
  margin: 0 0 7px;
  font-size: 12px;
  font-weight: 700;
  color: #384457;
}
.vz-grid .vz-required { color: var(--vz-orange); }
.vz-grid input,
.vz-grid select,
.vz-grid textarea {
  width: 100%;
  min-height: 45px;
  border: 1px solid var(--vz-line);
  border-radius: var(--vz-field-radius);
  background: #fff;
  color: var(--vz-ink);
  padding: 11px 14px;
  outline: none;
  font-size: 13px;
  font-weight: 500;
  transition: border .16s, box-shadow .16s;
  font-family: inherit;
}
.vz-grid input:focus,
.vz-grid select:focus,
.vz-grid textarea:focus {
  border-color: var(--vz-orange);
  box-shadow: 0 0 0 4px rgba(255,100,40,.12);
}
.vz-radio-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--vz-line);
  border-radius: var(--vz-field-radius);
  overflow: hidden;
  min-height: 45px;
  background: #fff;
}
.vz-radio-group label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-right: 1px solid var(--vz-line);
  font-size: 12px;
  color: #303a4a;
  cursor: pointer;
}
.vz-radio-group label:last-child { border-right: 0; }
.vz-radio-group input {
  width: 14px;
  height: 14px;
  min-height: auto;
  padding: 0;
  accent-color: var(--vz-orange);
}
.vz-help {
  margin-top: 16px;
  padding: 13px 16px;
  background: var(--vz-blue-soft);
  color: var(--vz-blue);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}
.vz-map-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 16px;
}
.vz-map-option {
  border: 1px solid var(--vz-line);
  border-radius: 15px;
  background: #fff;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}
.vz-map-option.active {
  border-color: rgba(255,100,40,.55);
  background: var(--vz-orange-soft);
}
.vz-map-option strong {
  display: block;
  font-size: 14px;
  margin-bottom: 5px;
  color: var(--vz-ink);
}
.vz-map-option span {
  display: block;
  color: var(--vz-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.vz-button-outline {
  min-height: 42px;
  background: #fff;
  color: var(--vz-orange);
  border: 1px solid rgba(255,100,40,.42);
  border-radius: 11px;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.vz-button-outline:hover { background: var(--vz-orange-soft); }
.vz-button-ghost {
  min-height: 42px;
  border: 1px solid var(--vz-line);
  background: #fff;
  color: #384457;
  border-radius: 11px;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.vz-button-ghost:hover { background: var(--vz-soft); }
.vz-button-sm { min-height: 32px; padding: 0 12px; font-size: 11px; }
.vz-button-block {
  width: 100%;
  display: block;
  min-height: 50px;
  padding: 14px 18px;
  background: var(--vz-orange);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s;
}
.vz-button-block:hover { background: var(--vz-orange-dark); }

/* Modal de proposta usa o topbar (Cancelar + Criar/Salvar) — esconde o footer
   default do modal pra evitar duplicidade de botões. O #saveProposal continua
   sendo clicado por JS via #saveProposalTop. */
.modal-vz .modal-footer { display: none; }

/* ─── Análise interna da taxa condominial ─── */
.analise-condominial {
  margin-top: 18px;
  padding: 18px 20px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 14px;
}
.analise-condominial-head {
  margin-bottom: 14px;
}
.analise-condominial-head strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 2px;
}
.analise-condominial-head small {
  display: block;
  font-size: 11.5px;
  color: #2563EB;
  font-weight: 600;
}
.analise-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 4px;
}
.analise-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px 14px;
}
.analise-card-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.analise-card-value {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
  .analise-cards { grid-template-columns: 1fr; }
}

/* ─── Editor de listas Premissas/Fatores (Card 8 estilo VCV) ─── */
.vz-list-subhead {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6b7280;
  margin: 0 0 14px;
}
.vz-list-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: start;
  margin-bottom: 12px;
}
.vz-list-letter {
  width: 36px;
  height: 36px;
  background: var(--vz-orange-soft);
  color: var(--vz-orange-dark);
  font-weight: 800;
  font-size: 13px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  margin-top: 4px;
}
.vz-list-text {
  width: 100%;
  border: 1px solid var(--vz-line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  font-family: inherit;
  background: #fff;
  resize: vertical;
  min-height: 56px;
  color: var(--text);
}
.vz-list-text:focus {
  outline: none;
  border-color: var(--vz-orange);
  box-shadow: 0 0 0 3px rgba(242,103,41,.12);
}
.vz-list-remove {
  min-height: 42px;
  background: var(--vz-orange-soft);
  color: var(--vz-orange-dark);
  border: none;
  border-radius: 10px;
  padding: 0 22px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  margin-top: 4px;
  transition: background .15s;
}
.vz-list-remove:hover {
  background: #FCE0CB;
}
.vz-list-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

/* ─── Chips de motivação (Card Entendimento) ─── */
.motivacoes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.motivacao-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--vz-line);
  border-radius: 10px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  background: #fff;
  transition: background .12s, border-color .12s;
  user-select: none;
}
.motivacao-chip:hover { border-color: rgba(255,100,40,.4); background: var(--vz-orange-soft); }
.motivacao-chip.active {
  background: var(--vz-orange-soft);
  border-color: var(--vz-orange);
  color: var(--vz-orange-dark);
}
.motivacao-chip input[type="checkbox"] {
  margin: 0;
  accent-color: var(--vz-orange);
}

/* ─── Upload de foto da fachada (capa) ─── */
.fachada-uploader {
  margin-bottom: 18px;
}
.fachada-empty {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1.5px dashed rgba(255, 100, 40, .45);
  border-radius: 14px;
  background: var(--vz-orange-soft);
}
.fachada-empty-icon {
  font-size: 32px;
  line-height: 1;
  flex: none;
}
.fachada-empty-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.fachada-empty-text strong {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--vz-orange-dark);
}
.fachada-empty-text small {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
}
.fachada-preview {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 10px;
  border-radius: 14px;
  background: var(--vz-orange-soft);
  border: 1px solid rgba(255, 100, 40, .25);
  max-width: 100%;
}
.fachada-preview img {
  display: block;
  width: 96px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  flex: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}
.fachada-preview::after {
  content: 'Foto da fachada — aparece na capa da proposta';
  font-size: 12px;
  font-weight: 700;
  color: var(--vz-orange-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fachada-remove {
  flex: none;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .85);
  color: #1f2937;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.fachada-remove:hover { background: #fff; color: #ef4444; }

/* ─── Galeria de Fotos da Visita Técnica (com legenda) ─── */
.fotos-visita-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.fotos-visita-editor-grid:empty {
  display: none;
}
.fv-item {
  position: relative;
  border: 1px solid var(--vz-line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.fv-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #f3f4f6;
}
.fv-caption {
  border: none;
  border-top: 1px solid var(--vz-line);
  padding: 8px 10px;
  font-size: 12px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  background: #fafafa;
  color: var(--text);
  min-height: 44px;
}
.fv-caption:focus {
  background: #fff;
  border-top-color: var(--vz-orange);
}
.fv-caption::placeholder {
  color: #9ca3af;
  font-style: italic;
}
.fv-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.fv-remove:hover {
  background: #ef4444;
}
@media (max-width: 540px) {
  .fachada-preview::after { display: none; }
}
@media (max-width: 640px) {
  .vz-list-row {
    grid-template-columns: 36px 1fr;
    gap: 10px;
  }
  .vz-list-remove {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

@media (max-width: 820px) {
  .vz-grid,
  .vz-map-options {
    grid-template-columns: 1fr;
  }
  .vz-grid .vz-span2,
  .vz-grid .vz-span3,
  .vz-grid .vz-span4,
  .vz-grid .vz-span5,
  .vz-grid .vz-span6,
  .vz-grid .vz-span7,
  .vz-grid .vz-span8,
  .vz-grid .vz-span12 {
    grid-column: span 1;
  }
  .vz-card { padding: 18px; }
}

/* ─── Onda 2 VZ — Toggle Global/Unitário + Tabela de Tipologias ─── */
.vz-pricing-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.vz-pricing-card {
  border: 1px solid var(--vz-line);
  border-radius: 15px;
  padding: 16px;
  cursor: pointer;
  background: #fff;
  min-height: 94px;
  transition: all .15s;
}
.vz-pricing-card:hover { border-color: rgba(255,100,40,.35); }
.vz-pricing-card.active {
  border-color: var(--vz-orange);
  background: var(--vz-orange-soft);
}
.vz-pricing-card strong {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--vz-ink);
  font-weight: 800;
}
.vz-pricing-card span {
  display: block;
  color: var(--vz-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.vz-pricing-panel {
  display: none;
  border: 1px solid rgba(255,100,40,.28);
  border-radius: 15px;
  background: #fffaf7;
  padding: 18px;
  margin-bottom: 16px;
}
.vz-pricing-panel.active { display: block; }

.vz-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 8px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--vz-line);
}
.vz-tipos-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: 12px;
}
.vz-tipos-table th {
  text-align: left;
  padding: 11px 12px;
  color: #8490a3;
  background: var(--vz-soft);
  border-bottom: 1px solid var(--vz-line);
  font-size: 10.5px;
  letter-spacing: .04em;
  font-weight: 900;
  text-transform: uppercase;
}
.vz-tipos-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--vz-line);
  vertical-align: middle;
  font-weight: 600;
}
.vz-tipos-table tr:last-child td { border-bottom: 0; }
.vz-tipos-table input,
.vz-tipos-table select {
  min-height: 38px;
  padding: 7px 10px;
  font-size: 12px;
  border: 1px solid var(--vz-line);
  border-radius: 8px;
  width: 100%;
  background: #fff;
  font-family: inherit;
  font-weight: 500;
}
.vz-tipos-table input:focus,
.vz-tipos-table select:focus {
  border-color: var(--vz-orange);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,100,40,.12);
}
.vz-row-subtotal {
  font-weight: 800;
  color: var(--vz-ink);
  white-space: nowrap;
}
.vz-tipo-delete {
  border: 0;
  background: #fff2ef;
  color: var(--vz-orange);
  border-radius: 7px;
  min-height: 32px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.vz-tipo-delete:hover { background: #ffe2d6; }

.vz-table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.vz-tipos-total {
  text-align: right;
  font-size: 12px;
  font-weight: 800;
  color: var(--vz-muted);
}
.vz-tipos-total strong {
  display: block;
  font-size: 18px;
  color: var(--vz-ink);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 820px) {
  .vz-pricing-cards { grid-template-columns: 1fr; }
  .vz-tipos-table { min-width: 100%; font-size: 11px; }
}

/* ─── Onda 3 VZ — Tabela de Serviços Contratados ─── */
.vz-services-list { padding: 0 !important; }
.vz-services-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: #fff;
  border: 1px solid var(--vz-line);
  border-radius: 12px;
  overflow: hidden;
}
.vz-services-table thead { background: var(--vz-soft); }
.vz-services-table th {
  text-align: left;
  padding: 12px 12px;
  color: #8490a3;
  border-bottom: 1px solid var(--vz-line);
  font-size: 10.5px;
  letter-spacing: .04em;
  font-weight: 900;
  text-transform: uppercase;
}
.vz-services-table th:first-child,
.vz-services-table th:nth-child(5),
.vz-services-table th:nth-child(6),
.vz-services-table th:last-child {
  text-align: center;
}
.vz-services-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--vz-line);
  vertical-align: middle;
  font-weight: 600;
}
.vz-services-table tr:last-child td { border-bottom: 0; }
.vz-services-table tr:hover { background: #fafbfd; }
.vz-services-table input.form-control {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 12px;
  border: 1px solid var(--vz-line);
  border-radius: 8px;
  width: 100%;
  background: #fff;
  font-family: inherit;
  font-weight: 600;
}
.vz-services-table input.form-control:focus {
  border-color: var(--vz-orange);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,100,40,.12);
}
.vz-services-table input.form-control:disabled {
  background: #fff7f1;
  color: var(--vz-orange-dark);
  cursor: not-allowed;
}
.vz-origem-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
}
.vz-origem-main {
  background: var(--vz-orange-soft);
  color: var(--vz-orange-dark);
}
.vz-origem-comp {
  background: #eef2f7;
  color: #5a6678;
}
.vz-origem-custom {
  background: #ebf5ff;
  color: #3c78d8;
}
.vz-cortesia-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #15803D;
  background: #dcfce7;
  border: 1px solid #86efac;
  width: 100%;
}

/* Botão "Adicionar serviço" no rodapé do bloco ganha melhor visual em VZ */
.form-vz #btnAddServicoContratado {
  min-height: 38px;
}

/* Total bar destacado no rodapé */
.vz-total-bar {
  border-left: 4px solid var(--vz-orange);
}

@media (max-width: 820px) {
  .vz-services-table { font-size: 11px; }
  .vz-services-table th,
  .vz-services-table td { padding: 8px 6px; }
}

/* ─── Onda 3.5 VZ — Top action bar + modal maior ─── */
.modal-vz .modal-header {
  display: none; /* O título e botões agora ficam no vz-topbar */
}
.modal-vz .modal-body {
  padding-top: 8px;
}
.modal-vz {
  background: var(--vz-bg, #f3f4f6);
}
.vz-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 24px 28px 18px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--vz-bg, #f3f4f6);
  border-bottom: 1px solid var(--vz-line);
  margin: -20px -24px 20px;
}
.vz-topbar-title h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  color: #222c3a;
  font-weight: 800;
}
.vz-topbar-title p {
  margin: 6px 0 0;
  color: var(--vz-muted);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  max-width: 580px;
}
.vz-topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}
.vz-button-primary {
  border: 0;
  border-radius: 11px;
  min-height: 44px;
  padding: 0 22px;
  font-size: 12.5px;
  font-weight: 900;
  cursor: pointer;
  background: var(--vz-orange);
  color: #fff;
  box-shadow: 0 10px 22px rgba(255, 100, 40, .22);
  transition: transform .12s, box-shadow .15s;
}
.vz-button-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(255, 100, 40, .28);
}
.vz-button-primary:active {
  transform: translateY(0);
}

/* ─── Onda 4 VZ — Card 4 reorganizado (toggle pill + subsections) ─── */
.vz-mode-toggle {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  padding: 14px 16px;
  background: #fafbfd;
  border: 1px solid var(--vz-line);
  border-radius: 12px;
}
.vz-mode-toggle-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--vz-muted);
}
.vz-mode-toggle-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.vz-mode-pill {
  border: 1.5px solid var(--vz-line);
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.vz-mode-pill:hover { border-color: rgba(255, 100, 40, .35); }
.vz-mode-pill.active {
  border-color: var(--vz-orange);
  background: var(--vz-orange-soft);
  box-shadow: 0 4px 12px rgba(255, 100, 40, .12);
}
.vz-mode-pill strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--vz-ink);
  margin-bottom: 3px;
}
.vz-mode-pill span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--vz-muted);
  line-height: 1.4;
}

.vz-subsection {
  margin-bottom: 18px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--vz-line);
  border-radius: 12px;
}
.vz-subsection:last-child { margin-bottom: 0; }
.vz-subsection-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--vz-line);
}
.vz-subsection-head strong {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--vz-ink);
}
.vz-subsection-head small {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--vz-muted);
  font-weight: 600;
  line-height: 1.4;
}

/* ─── BRAND ORANGE EVERYWHERE — checkboxes, radios, selects (form-vz) ─── */
.form-vz input[type="checkbox"],
.form-vz input[type="radio"] {
  accent-color: var(--vz-orange) !important;
}
.form-vz select:focus,
.form-vz input:focus,
.form-vz textarea:focus {
  border-color: var(--vz-orange) !important;
  box-shadow: 0 0 0 3px rgba(255, 100, 40, .14) !important;
  outline: none;
}
/* Select com ícone laranja (chevron) */
.form-vz select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ff6428'><path d='M4.5 6L8 9.5 11.5 6'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 16px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  padding-right: 36px !important;
  cursor: pointer;
}
/* Selected option destacado em laranja claro */
.form-vz option:checked {
  background: var(--vz-orange-soft) !important;
  color: var(--vz-orange-dark) !important;
  font-weight: 700;
}
/* Hover em pills, cards, opções */
.form-vz .vz-mode-pill:hover,
.form-vz .vz-pricing-card:hover {
  border-color: var(--vz-orange);
}
/* Radio buttons inline (PJ/PF + Parcelado) */
.form-vz [type="radio"] + span,
.form-vz [type="radio"]:checked + span {
  color: var(--vz-orange-dark);
}
/* Estilizar labels que contêm radio quando ativos */
.form-vz label:has([type="radio"]:checked) {
  color: var(--vz-orange-dark);
  font-weight: 700;
}
