:root {
  /* Identidade visual Bakri Advocacia (paleta da Dra. Luana) */
  --off-white: #F4F1EC;
  --navy: #0C384A;
  --gold: #C96F4A;
  --dark-gray: #3C3C3C;
  --text-muted: #6B7280;
  --border: #E2DCD1;
  --danger: #C16458;
  --warning: #C39A3E;
  --success: #3F8A63;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);

  /* Prioridade de leads (CRM) — cor carrega o sentimento certo:
     prioritário é urgência (vermelho forte), elegível é boa notícia
     (verde), verificar é atenção (âmbar), desqualificado é neutro
     (cinza, sem carga emocional). */
  --prio-prioritario: #C16458;
  --prio-elegivel: #3F8A63;
  --prio-verificar: #C39A3E;
  --prio-desqualificado: #9099A3;

  /* Campanha do lead (CRM) — cor própria, não deve se confundir com prioridade */
  --campanha-bpc: #4A7A96;
  --campanha-salario-maternidade: #A55D8C;

  /* Etapas do funil (CRM/Dashboard) — progressão de neutro a concluído */
  --etapa-1: #8B95A1;
  --etapa-2: #6E93A8;
  --etapa-3: #C39A3E;
  --etapa-4: #4A7A96;
  --etapa-5: #C96F4A;
  --etapa-6: #3F8A63;
  --etapa-7: #0C384A;
  --etapa-8: #8A6BA8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--off-white);
  color: var(--navy);
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 48px 40px;
  width: 100%;
  max-width: 380px;
}

.login-card .brand {
  text-align: center;
  margin-bottom: 32px;
}

.login-card .brand h1 {
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 4px;
}

.login-card .brand span {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--navy);
}

.field input,
.field select,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--navy);
  appearance: none;
  -webkit-appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.field input:focus,
.field select:focus,
select:focus {
  outline: none;
  border-color: var(--gold);
}

.btn-primary {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 8px;
  background: var(--gold);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary:hover {
  background: #B15E3B;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-icon:focus-visible,
.btn-logout:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.error-msg {
  background: #FDEDEB;
  color: var(--danger);
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: none;
}

.error-msg.visible {
  display: block;
}

/* ---------- Layout do app (sidebar + conteúdo) ---------- */

.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--off-white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 0 8px 24px;
}

.sidebar-brand h1 {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 2px;
}

.sidebar-brand span {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--navy);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.sidebar-link svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  stroke: currentColor;
}

.sidebar-link {
  border-left: 3px solid transparent;
}

.sidebar-link:hover {
  background: #FBF0EB;
  border-left-color: var(--gold);
}

.sidebar-link.active {
  background: var(--navy);
  color: #fff;
  border-left-color: var(--gold);
}

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 14px;
}

.sidebar-user {
  padding: 0 10px;
  margin-bottom: 10px;
}

.sidebar-user .nome {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

.sidebar-user .role {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: capitalize;
}

.btn-logout {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

.btn-logout:hover {
  background: #F0ECE1;
}

.content-area {
  flex: 1;
  padding: 32px 40px;
  overflow-y: auto;
}

.page-header {
  margin-bottom: 20px;
}

.page-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--gold);
  display: inline-block;
}

.placeholder-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 32px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ---------- CRM / Kanban ---------- */

.crm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 12px;
}

.crm-header h2 {
  flex-shrink: 0;
}

.crm-search {
  width: 220px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
}

.crm-search:focus {
  outline: none;
  border-color: var(--gold);
}

.kanban-board {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  align-items: flex-start;
}

.kanban-col {
  background: #F0ECE1;
  border-radius: 10px;
  width: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 160px);
}

.kanban-col-over {
  outline: 2px dashed var(--gold);
  outline-offset: -2px;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.kanban-col-count {
  background: #fff;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  color: var(--text-muted);
}

.etapa-label-tag {
  color: #fff;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
}

.kanban-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 8px 12px;
  overflow-y: auto;
}

.kanban-empty {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 16px 0;
}

.kanban-mostrar-mais {
  width: 100%;
  padding: 8px;
  font-size: 11px;
  flex-shrink: 0;
}

.lead-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  padding: 12px;
  cursor: grab;
  min-height: 80px;
}

.lead-card:active {
  cursor: grabbing;
}

.lead-card-nome {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}

.lead-card-tel {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.lead-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lead-card-data {
  font-size: 11px;
  color: var(--text-muted);
}

.lead-card-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 6px;
  background: #F0ECE1;
  color: var(--navy);
}

.lead-card-badge-pendente {
  background: #FCF3DC;
  color: var(--warning);
}

.lead-card-badge-assinado {
  background: #E4F1EA;
  color: var(--success);
}

/* Drag-and-drop nativo do HTML não existe em touch — em telas pequenas
   (mesmo breakpoint do menu mobile) troca por um seletor direto no card. */
.lead-card-mover {
  display: none;
}

/* ---------- Modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 37, 48, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-box {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-box-wide {
  max-width: 760px;
}

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

.modal-header h3 {
  margin: 0;
  font-size: 16px;
  color: var(--navy);
}

.modal-close {
  border: none;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-body {
  padding: 20px 24px;
}

.modal-body-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.detail-list {
  margin: 0;
  font-size: 13px;
}

.detail-list dt {
  color: var(--text-muted);
  margin-top: 10px;
}

.detail-list dt:first-child {
  margin-top: 0;
}

.detail-list dd {
  margin: 2px 0 0;
  color: var(--navy);
  font-weight: 500;
}

.chat-log {
  background: var(--off-white);
  border-radius: 10px;
  padding: 14px;
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  max-width: 85%;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.chat-msg p {
  margin: 2px 0 0;
}

.chat-msg-autor {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.chat-msg-lead {
  background: #fff;
  align-self: flex-end;
}

.chat-msg-ana {
  background: #EAF1F6;
  align-self: flex-start;
}

.text-muted {
  color: var(--text-muted);
}

/* ---------- Toolbar / botões secundários ---------- */

.crm-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  justify-content: flex-start;
}

.menu-mais-wrap {
  position: relative;
}

.menu-mais {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  min-width: 220px;
  overflow: hidden;
}

.menu-mais button {
  text-align: left;
  padding: 10px 14px;
  border: none;
  background: #fff;
  color: var(--navy);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.menu-mais button:hover {
  background: var(--off-white);
}

.crm-header-actions .btn-secondary,
.crm-header-actions .btn-primary {
  width: auto;
  padding: 8px 14px;
  font-size: 13px;
  white-space: nowrap;
}

.btn-secondary {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}

.btn-secondary:hover {
  background: #FBF0EB;
  border-color: var(--gold);
  color: var(--gold);
}

/* ---------- KPIs / Dashboard ---------- */

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.kpi-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 3px solid var(--gold);
}

.kpi-row .kpi-card:nth-child(2) { border-top-color: var(--etapa-4); }
.kpi-row .kpi-card:nth-child(3) { border-top-color: var(--success); }
.kpi-row .kpi-card:nth-child(4) { border-top-color: var(--navy); }

.kpi-label {
  font-size: 12px;
  color: var(--text-muted);
}

.kpi-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.dash-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 20px;
}

.dash-card h3 {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--navy);
}

.dash-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
}

.dash-list li {
  margin-bottom: 6px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 110px 1fr 24px;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
}

.funnel-label {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.funnel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.funnel-bar-track {
  background: var(--off-white);
  border-radius: 6px;
  height: 8px;
  overflow: hidden;
}

.funnel-bar-fill {
  background: var(--gold);
  height: 100%;
  border-radius: 6px;
}

.funnel-count {
  text-align: right;
  color: var(--navy);
  font-weight: 600;
}

/* ---------- Tabelas ---------- */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.data-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.th-ordenavel {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.th-ordenavel:hover {
  color: var(--navy);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--navy);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: var(--off-white);
}

.status-tag {
  background: #F0ECE1;
  color: var(--navy);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: capitalize;
}

.prazo-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
}

.prazo-tag.prazo-critico {
  color: var(--danger);
}

.prazo-tag.prazo-atencao {
  color: var(--warning);
}

/* ---------- Movimentações / listas de detalhe ---------- */

.mov-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
}

.mov-item {
  background: var(--off-white);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
}

.mov-data {
  color: var(--text-muted);
  font-size: 11px;
}

.mov-tipo {
  font-weight: 600;
  color: var(--navy);
  margin-top: 2px;
}

.mov-desc {
  margin-top: 2px;
  color: var(--navy);
}

/* ---------- Checklist (subtarefas) ---------- */

.checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}

.checklist-done {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* ---------- Tarefas (kanban) ---------- */

.task-card-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.prio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.prio-dot.prio-alta { background: var(--danger); }
.prio-dot.prio-media { background: var(--warning); }
.prio-dot.prio-baixa { background: var(--success); }

.task-subcount {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.task-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Financeiro ---------- */

.alert-box {
  background: #FCF3DC;
  color: var(--warning);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 20px;
}

.parcela-chip {
  display: inline-block;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #F0ECE1;
  color: var(--navy);
  margin: 2px 4px 2px 0;
}

.parcela-chip.parcela-pago {
  background: #E4F1EA;
  color: var(--success);
}

.parcela-chip.parcela-pendente {
  background: #FCF3DC;
  color: var(--warning);
}

.parcela-chip.parcela-atrasado {
  background: #FDEDEB;
  color: var(--danger);
}

/* ---------- Toasts ---------- */

#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--navy);
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  max-width: 320px;
}

.toast-erro {
  background: var(--danger);
}

.toast-sucesso {
  background: var(--success);
}

/* ---------- Legenda de prioridade (CRM) ---------- */

.crm-legenda {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.crm-legenda-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.crm-legenda-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.crm-legenda-separador {
  width: 1px;
  align-self: stretch;
  background: var(--border);
}

.crm-legenda-anel {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid;
  flex-shrink: 0;
}

/* ---------- Agenda ---------- */

.ag-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.ag-cel-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  text-align: center;
  padding-bottom: 6px;
}

.ag-cel {
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  min-height: 90px;
  padding: 6px;
}

.ag-cel-vazia {
  background: transparent;
  box-shadow: none;
}

.ag-cel-hoje {
  border: 2px solid var(--gold);
}

.ag-cel-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
}

.ag-cel-prazos {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ag-prazo-item {
  font-size: 10px;
  padding: 2px 4px;
  border-radius: 4px;
  background: var(--off-white);
  color: var(--navy);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ag-prazo-item.ag-prazo-critico {
  background: #FDEDEB;
  color: var(--danger);
}

.ag-prazo-item.ag-prazo-atencao {
  background: #FCF3DC;
  color: var(--warning);
}

.ag-prazo-mais {
  font-size: 10px;
  color: var(--text-muted);
}

/* ---------- Botão de ícone (ações rápidas em tabela) ---------- */

.btn-icon {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--gold);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: var(--off-white);
}

input[type="checkbox"] {
  accent-color: var(--gold);
}

.sidebar-brand h1 {
  position: relative;
  padding-bottom: 8px;
}

.sidebar-brand h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.data-table th {
  border-bottom-color: var(--gold);
  border-bottom-width: 2px;
}

.kanban-col-count {
  background: var(--gold);
  color: #fff;
}

/* ---------- Responsivo (celular / telas estreitas) ---------- */

.mobile-topbar {
  display: none;
}

.sidebar-backdrop {
  display: none;
}

@media (max-width: 860px) {
  .login-page {
    padding: 16px;
  }

  .mobile-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 150;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    font-weight: 700;
    color: var(--navy);
  }

  .mobile-menu-btn {
    background: none;
    border: none;
    padding: 4px;
    margin: 0;
    cursor: pointer;
    color: var(--navy);
    display: flex;
    width: auto;
  }

  .mobile-menu-btn svg {
    width: 24px;
    height: 24px;
  }

  .app-layout {
    flex-direction: column;
    min-height: calc(100vh - 49px);
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -240px;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    z-index: 200;
    transition: left 0.25s ease;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.15);
  }

  .sidebar.sidebar-open {
    left: 0;
  }

  .sidebar-backdrop.visible {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 190;
  }

  .content-area {
    padding: 20px 16px;
    width: 100%;
  }

  .dash-grid {
    grid-template-columns: 1fr;
  }

  .crm-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .crm-header-actions {
    flex-wrap: wrap;
    width: 100%;
  }

  .crm-header-actions .btn-primary,
  .crm-header-actions .btn-secondary {
    flex: 1;
    min-width: 130px;
  }

  .crm-search,
  select#crm-filtro-prioridade,
  select#tar-filtro-resp {
    width: 100%;
  }

  table.data-table,
  .data-table-card {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-overlay {
    padding: 12px;
    align-items: flex-end;
  }

  .modal-box {
    max-width: 100%;
    max-height: 92vh;
    width: 100%;
  }

  .modal-body-grid {
    grid-template-columns: 1fr;
  }

  .kanban-col {
    width: 80vw;
  }

  .lead-card {
    cursor: default;
  }

  .lead-card-mover {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
    color: var(--navy);
    background: var(--off-white);
  }

  .ag-cel {
    min-height: 56px;
    padding: 4px;
  }

  .ag-cel-num {
    font-size: 11px;
  }

  .ag-prazo-item {
    font-size: 9px;
    padding: 1px 3px;
  }

  .page-header h2 {
    font-size: 18px;
  }
}

/* ---------- Sino de notificação (badge no link "Movimentações") ---------- */

.notif-badge {
  margin-left: auto;
  background: var(--gold);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* ---------- Página Movimentações ---------- */

.notif-lista {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notif-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.notif-card-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}

.notif-item-desc {
  margin: 8px 0 10px;
  font-size: 13px;
  color: var(--navy);
}

.notif-item-acoes {
  display: flex;
  gap: 16px;
}

.notif-link {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.notif-link:hover {
  text-decoration: underline;
}

/* ---------- Paginação de tabelas ---------- */

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px 4px;
  font-size: 13px;
}

.pager-botoes {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pager-botoes .btn-secondary {
  width: auto;
  padding: 6px 12px;
  font-size: 13px;
}

.pager-botoes .btn-secondary:disabled {
  opacity: 0.4;
  cursor: default;
}

.pager-num {
  color: var(--navy);
  font-weight: 600;
  font-size: 13px;
}
