html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background: #f4f6f9;
  color: #1f2937;
}

.navbar {
  min-height: 64px;
}

.page-shell {
  max-width: 1500px;
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.25rem 0;
}

.page-heading h1 {
  font-size: clamp(1.55rem, 2.4vw, 2.2rem);
  margin: 0;
  color: #111827;
}

.page-heading p {
  margin: .25rem 0 0;
  color: #6b7280;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.metric-card,
.filter-panel,
.form-panel,
.details-panel,
.crm-table-wrap {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .06);
}

.metric-card {
  padding: 1rem;
}

.metric-card span {
  display: block;
  color: #6b7280;
  font-size: .9rem;
  margin-bottom: .35rem;
}

.metric-card strong {
  color: #0d6efd;
  font-size: 2rem;
  line-height: 1;
}

.filter-panel,
.form-panel,
.details-panel {
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.crm-table-wrap {
  overflow: hidden;
}

.crm-table {
  margin-bottom: 0;
}

.crm-table thead th {
  background: #0d6efd;
  color: #fff;
  border-bottom: 0;
  white-space: nowrap;
}

.text-truncate-cell {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.priority-emergencial {
  --bs-table-bg: #fecdd3;
  --bs-table-hover-bg: #fda4af;
}

.priority-alta {
  --bs-table-bg: #fef3c7;
  --bs-table-hover-bg: #fde68a;
}

.priority-normal {
  --bs-table-bg: #dbeafe;
  --bs-table-hover-bg: #bfdbfe;
}

.priority-baixa {
  --bs-table-bg: #dcfce7;
  --bs-table-hover-bg: #bbf7d0;
}

.crm-table tbody tr.status-row-concluido {
  --bs-table-bg: #bbf7d0;
  --bs-table-hover-bg: #86efac;
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding: .25rem .55rem;
  border-radius: .375rem;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.priority-badge-emergencial {
  background: #fecdd3;
  color: #881337;
}

.priority-badge-alta {
  background: #fde68a;
  color: #78350f;
}

.priority-badge-normal {
  background: #dbeafe;
  color: #1e3a8a;
}

.priority-badge-baixa {
  background: #bbf7d0;
  color: #14532d;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding: .25rem .55rem;
  border-radius: .375rem;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.status-badge-pendente {
  background: #fee2e2;
  color: #7f1d1d;
}

.status-badge-emandamento {
  background: #dbeafe;
  color: #1e3a8a;
}

.status-badge-aguardandocliente {
  background: #fef3c7;
  color: #78350f;
}

.status-badge-concluido {
  background: #bbf7d0;
  color: #14532d;
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px;
  background: #fff;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .18);
}
