/* JAM Intelligence Suite — estilos do painel iRepair.
 * Carregado depois de staff.css; usa a paleta e o raio do tema (--panel, --radius).
 */

.nav-section-jam {
  --section-color: #e11d74;
}

.jam-lead {
  color: #475569;
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
  max-width: 900px;
}

.jam-muted {
  color: #64748b;
  font-size: 13px;
}

/* ---- métricas ---- */

.jam-stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.jam-stat {
  background: linear-gradient(160deg, #ffffff, #f5f7fb);
  border: 1px solid rgba(16, 16, 16, 0.08);
  border-radius: var(--radius, 14px);
  border-left: 4px solid #64748b;
  display: grid;
  gap: 4px;
  padding: 16px 18px;
}

.jam-stat-label {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.jam-stat-value {
  color: #0f172a;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.1;
}

.jam-stat-hint {
  color: #94a3b8;
  font-size: 12px;
}

.jam-stat-good { border-left-color: #16a34a; }
.jam-stat-good .jam-stat-value { color: #15803d; }
.jam-stat-warn { border-left-color: #f59e0b; }
.jam-stat-warn .jam-stat-value { color: #b45309; }
.jam-stat-bad { border-left-color: #dc2626; }
.jam-stat-bad .jam-stat-value { color: #b91c1c; }
.jam-stat-info { border-left-color: #2563eb; }
.jam-stat-info .jam-stat-value { color: #1d4ed8; }

/* ---- cards ---- */

.jam-card {
  display: grid;
  gap: 14px;
}

.jam-card-title {
  font-size: 18px;
  margin: 0;
}

.jam-wide {
  overflow: hidden;
}

/* ---- acesso rápido ---- */

.jam-quick-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.jam-quick {
  background: linear-gradient(135deg, #1d4ed8, #7c3aed);
  border: none;
  border-radius: var(--radius, 14px);
  color: #fff;
  cursor: pointer;
  display: grid;
  gap: 4px;
  padding: 18px;
  text-align: left;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.jam-quick:hover {
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
  transform: translateY(-2px);
}

.jam-quick strong { font-size: 16px; }
.jam-quick span { font-size: 12px; opacity: 0.85; }

/* ---- formulários ---- */

.jam-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.jam-form label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  color: #475569;
}

.jam-form input,
.jam-form select,
.jam-form textarea {
  border: 1px solid rgba(16, 16, 16, 0.14);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  min-height: 44px;
  padding: 8px 10px;
}

.jam-form textarea { min-height: 64px; resize: vertical; }

.jam-span-2 { grid-column: 1 / -1; }

.jam-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
}

/* ---- ações em tabelas ---- */

.jam-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.jam-actions .button { text-decoration: none; }

/* ---- caixas de IA ---- */

.jam-ai-box {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: 12px;
  display: grid;
  gap: 6px;
  padding: 14px 16px;
}

.jam-ai-head {
  align-items: center;
  color: #5b21b6;
  display: flex;
  font-size: 12px;
  font-weight: 900;
  gap: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.jam-ai-reply {
  background: #fff;
  border-radius: 10px;
  color: #1e293b;
  font-size: 15px;
  margin: 0;
  padding: 12px;
  white-space: pre-wrap;
}

.jam-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.jam-list.tight { font-size: 13px; gap: 2px; }

/* ---- badges ---- */

.jam-badge {
  border-radius: 999px;
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  text-transform: uppercase;
}

.jam-badge-neutral { background: #e2e8f0; color: #475569; }
.jam-badge-good { background: #dcfce7; color: #15803d; }
.jam-badge-warn { background: #fef3c7; color: #b45309; }
.jam-badge-bad { background: #fee2e2; color: #b91c1c; }
.jam-badge-ai { background: #ede9fe; color: #6d28d9; }
.jam-badge-rules { background: #e0f2fe; color: #0369a1; }

/* ---- recomendações ---- */

.jam-recs {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.jam-rec {
  background: #f8fafc;
  border: 1px solid rgba(16, 16, 16, 0.08);
  border-radius: 12px;
  border-top: 4px solid #f59e0b;
  display: grid;
  gap: 8px;
  padding: 14px 16px;
}

.jam-rec-head { display: flex; flex-wrap: wrap; gap: 6px; }

.jam-rec strong { color: #0f172a; font-size: 15px; }
.jam-rec p { color: #475569; font-size: 13px; margin: 0; }

.jam-rec-bad { border-top-color: #dc2626; }
.jam-rec-warn { border-top-color: #f59e0b; }

/* ---- condição do aparelho ---- */

.jam-condition-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  width: 100%;
}

/* ---- abas da rede ---- */

.jam-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.jam-tabs button {
  background: #fff;
  border: 1px solid rgba(16, 16, 16, 0.14);
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  min-height: 38px;
  padding: 0 16px;
}

.jam-tabs button.active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

/* ---- laudo ---- */

.jam-report {
  background: #fff;
  border: 1px solid rgba(16, 16, 16, 0.12);
  border-radius: 12px;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.6;
  padding: 18px 22px;
}

.jam-report h2 {
  border-bottom: 2px solid #0f172a;
  font-size: 20px;
  margin: 0 0 12px;
  padding-bottom: 8px;
}

@media (max-width: 640px) {
  .jam-stat-value { font-size: 20px; }
  .jam-condition-grid { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
}
