:root {
  --accent:        #16a34a;
  --accent-dark:   #15803d;
  --accent-soft:   #dcfce7;
  --blue:          #2563eb;
  --orange:        #f97316;
  --red:           #ef4444;
  --yellow:        #eab308;

  --bg-page:       #f6f7f9;
  --bg-card:       #ffffff;
  --border:        #e7e9ee;
  --text-primary:  #14161a;
  --text-secondary:#5b616e;
  --text-muted:    #9aa0ac;

  --sidebar-bg:    #14161f;
  --sidebar-text:  #b7bcc9;
  --sidebar-text-active: #ffffff;
  --sidebar-hover: #1e2130;

  --shadow-card: 0 1px 2px rgba(16,18,27,0.04), 0 4px 16px rgba(16,18,27,0.06);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;

  --chart-grid: #eef0f3;
  --chart-tick: #9aa0ac;
  --chart-tick-strong: #5b616e;
  --chart-tooltip-bg: #14161f;
}

:root[data-theme="dark"] {
  --bg-page:       #101218;
  --bg-card:       #1a1d26;
  --border:        #2c303c;
  --text-primary:  #e9eaed;
  --text-secondary:#a3a8b5;
  --text-muted:    #6b7080;

  --accent-soft:   #14351f;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.25), 0 4px 16px rgba(0,0,0,0.35);

  --chart-grid: #2c303c;
  --chart-tick: #7d8290;
  --chart-tick-strong: #a3a8b5;
  --chart-tooltip-bg: #05060a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

.app-shell { display: flex; height: 100vh; overflow: hidden; }

/* Module rail (esquerda, troca AFV / WMS / Board Migração) ------------------ */

.module-rail {
  width: 84px;
  flex: 0 0 84px;
  height: 100vh;
  overflow-y: auto;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 10px;
}

.module-rail-brand { margin-bottom: 18px; }
.module-rail-brand img { width: 32px; height: 32px; object-fit: contain; }

.module-nav { display: flex; flex-direction: column; gap: 8px; width: 100%; flex: 1; }

.module-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--sidebar-text);
  font-family: inherit;
  padding: 10px 4px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: center;
}
.module-btn:hover { background: var(--sidebar-hover); color: #fff; }
.module-btn.active { background: var(--accent); color: #fff; }
.module-btn-icon { font-size: 1.3rem; line-height: 1; }
.module-btn-label { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.01em; }

.module-rail-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
}

.btn-logout {
  border: none;
  background: transparent;
  color: var(--sidebar-text);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 5px;
}
.btn-logout:hover { background: var(--sidebar-hover); color: #fff; }
.btn-tema { font-size: 1.1rem; padding: 6px; }

.zoom-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.zoom-controls button {
  border: none;
  background: transparent;
  color: var(--sidebar-text);
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 5px;
}
.zoom-controls button:hover { background: var(--sidebar-hover); color: #fff; }
#zoomNivel { font-size: 0.6rem; color: var(--sidebar-text); min-width: 30px; text-align: center; }

/* Main ----------------------------------------------------------------------*/

.main { flex: 1; min-width: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }

.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.workspace[hidden] { display: none; }

.workspace-foot {
  padding: 8px 32px 14px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Listbox de cliente + barra de abas ---------------------------------------- */

.listbox-cliente {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  max-width: 220px;
}

.tab-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 32px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
}
.tab-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.tab-item:hover { color: var(--text-primary); }
.tab-item.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-item .tab-fechar {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  cursor: pointer;
}
.tab-item .tab-fechar:hover { background: var(--bg-page); color: var(--red); }

@media (max-width: 760px) {
  .tab-bar { padding: 0 18px; }
}

.dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; display: inline-block; }
.dot-ok       { background: var(--accent); }
.dot-erro     { background: var(--red); }
.dot-pendente { background: #b9bec7; }

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 32px;
  flex-wrap: wrap;
}
.main-header-title h1 { margin: 0; font-size: 1.4rem; font-weight: 700; letter-spacing: -0.01em; }
.main-header-subtitle { font-size: 0.85rem; color: var(--text-secondary); }

.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.filtro-data {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 5px 8px;
  box-shadow: var(--shadow-card);
}
.filtro-data input[type="date"] {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-family: inherit;
  padding: 3px 2px;
}
.filtro-data-sep { color: var(--text-muted); font-size: 0.78rem; }

.filtro-presets { display: flex; gap: 4px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 4px; box-shadow: var(--shadow-card); }
.preset-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
}
.preset-btn:hover { background: var(--bg-page); }
.preset-btn.active { background: var(--accent); color: #fff; }

.btn {
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-size: 0.86rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-card); }
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); }
.btn-secondary { background: var(--bg-card); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--bg-page); }

.btn-icon {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 3px 5px;
  border-radius: 4px;
}
.btn-icon:hover { background: var(--bg-page); color: var(--text-secondary); }

.main-content { padding: 4px 32px 48px; display: flex; flex-direction: column; gap: 20px; }

/* Cards ---------------------------------------------------------------------*/

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px 22px;
}
.card h2 { margin: 0 0 16px; font-size: 0.95rem; font-weight: 700; }
.card h3 { margin: 0 0 14px; font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }

details.chart-colapsavel > summary {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
details.chart-colapsavel > summary::-webkit-details-marker { display: none; }
details.chart-colapsavel > summary::before { content: '▸'; color: var(--text-muted); font-weight: 400; }
details.chart-colapsavel[open] > summary::before { content: '▾'; }
details.chart-colapsavel[open] > summary { margin-bottom: 14px; }

/* KPI tiles -------------------------------------------------------------- */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 14px;
}
.kpi-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.kpi-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--kpi-accent, var(--accent));
}
.kpi-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); font-weight: 600; }
.kpi-value { font-size: 1.3rem; font-weight: 700; color: var(--text-primary); margin-top: 6px; }
.kpi-sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }

/* Charts ----------------------------------------------------------------- */

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.chart-card.chart-wide { grid-column: 1 / -1; }

@media (max-width: 820px) {
  .charts-grid { grid-template-columns: 1fr; }
}

.chart-canvas-wrap { position: relative; width: 100%; }

/* Cards por App ------------------------------------------------------------*/

.app-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.app-card {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.app-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.app-card-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; }
.app-card-nome { font-weight: 700; font-size: 0.92rem; color: var(--text-primary); }
.app-card-pct { margin-left: auto; font-size: 0.78rem; font-weight: 700; color: var(--text-secondary); }

.app-card-metrics { display: flex; flex-direction: column; gap: 9px; }
.app-card-metric { display: flex; align-items: baseline; justify-content: space-between; }
.app-card-metric .k { font-size: 0.76rem; color: var(--text-secondary); }
.app-card-metric .v { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }

/* Pedidos — Origem -> Pedidos (accordion) --------------------------------- */

.grupos-origem-wrap { display: flex; flex-direction: column; gap: 10px; }

details.grupo-origem {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
details.grupo-origem > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-page);
  cursor: pointer;
  list-style: none;
  font-size: 0.86rem;
  font-weight: 600;
}
details.grupo-origem > summary::-webkit-details-marker { display: none; }
details.grupo-origem > summary::before { content: '▸'; color: var(--text-muted); font-weight: 400; }
details.grupo-origem[open] > summary::before { content: '▾'; }

.grupo-qtd { color: var(--text-secondary); font-size: 0.82rem; font-weight: 400; }
.grupo-valor { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
thead th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
tbody td { padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody tr.linha-pedido { cursor: pointer; }
tbody tr.linha-pedido:hover { background: var(--bg-page); }

/* Tabela com cabeçalho agrupado (Cliente / App.Next / Portal Next / Total) */

.tabela-detalhamento thead tr:first-child th { text-align: center; padding-bottom: 6px; }
.tabela-detalhamento thead tr:last-child th { padding-top: 4px; text-align: right; }
.tabela-detalhamento thead tr:first-child th:nth-child(-n+2) { text-align: left; border-bottom: none; }
.tabela-detalhamento tbody td:nth-child(n+3) { text-align: right; font-variant-numeric: tabular-nums; }
.tabela-detalhamento tbody td:nth-child(-n+2) { text-align: left; }
/* Borda separando cada grupo de colunas (App.Next/Portal/Total/SOF.IA
   pedidos/SOF.IA itens) — índice fixo, não "últimas 2" (isso quebrava toda
   vez que um grupo novo era adicionado no fim, ver Pedidos/Itens SOF.IA). */
.tabela-detalhamento tbody td:nth-child(7),
.tabela-detalhamento tbody td:nth-child(9),
.tabela-detalhamento tbody td:nth-child(11) { border-left: 1px solid var(--border); }
.tabela-detalhamento thead tr:last-child th:nth-child(7),
.tabela-detalhamento thead tr:last-child th:nth-child(9),
.tabela-detalhamento thead tr:last-child th:nth-child(11) { border-left: 1px solid var(--border); }

.origem-tag { padding: 2px 9px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; color: #fff; }
.origem-N { background: var(--blue); }
.origem-X { background: var(--orange); }

.expand-toggle { color: var(--text-muted); font-size: 0.7rem; width: 18px; text-align: center; }

.detalhe-row td { background: var(--bg-page); padding: 12px 16px; white-space: normal; }
.detalhe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px 18px;
  font-size: 0.78rem;
}
.detalhe-grid div span.k { color: var(--text-muted); display: block; font-size: 0.65rem; text-transform: uppercase; }

.sem-dados { text-align: center; color: var(--text-muted); padding: 40px 0; font-size: 0.88rem; }

/* Detalhamento de migração — grupo por dev + tarefas aninhadas ------------- */

details.grupo-origem > summary .board-card-avatar { margin-right: 2px; }

.tarefa-detalhe-wrap { display: flex; flex-direction: column; gap: 6px; padding: 10px 16px 14px; }

details.tarefa-detalhe {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
}
details.tarefa-detalhe > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
  font-size: 0.84rem;
}
details.tarefa-detalhe > summary::-webkit-details-marker { display: none; }
details.tarefa-detalhe > summary::before { content: '▸'; color: var(--text-muted); font-weight: 400; flex: 0 0 auto; }
details.tarefa-detalhe[open] > summary::before { content: '▾'; }
details.tarefa-detalhe > summary:hover { background: var(--bg-page); }

.tarefa-detalhe-titulo { flex: 1; font-weight: 600; color: var(--text-primary); }
.badge-etapa { padding: 2px 10px; border-radius: 20px; font-size: 0.68rem; font-weight: 700; color: #fff; white-space: nowrap; }

.tarefa-detalhe-corpo {
  padding: 4px 14px 14px 36px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tarefa-detalhe-corpo strong { color: var(--text-muted); font-weight: 600; }
.tarefa-detalhe-obs {
  font-style: italic;
  color: var(--text-secondary);
  border-left: 2px solid var(--border);
  padding: 6px 8px;
  word-break: break-word;
}

.tarefa-fases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 4px;
}
.tarefa-fase {
  position: relative;
  padding: 14px 10px 0;
  border-top: 3px solid var(--border);
  opacity: 0.55;
}
.tarefa-fase.feita { border-top-color: var(--fase-cor); opacity: 1; }
.tarefa-fase::before {
  content: '';
  position: absolute;
  top: -4px; left: 50%;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  transform: translateX(-50%);
}
.tarefa-fase.feita::before { background: var(--fase-cor); }
.tarefa-fase-titulo {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.tarefa-fase-data { display: block; font-size: 0.78rem; font-weight: 700; color: var(--text-primary); }
.tarefa-fase.feita .tarefa-fase-data { color: var(--fase-cor); }
.tarefa-fase-data-fim { display: block; font-size: 0.68rem; color: var(--text-muted); margin-top: 1px; }
@media (max-width: 560px) {
  .tarefa-fases { grid-template-columns: 1fr; gap: 10px; }
  .tarefa-fase { border-top: none; border-left: 3px solid var(--border); padding: 0 0 0 12px; }
  .tarefa-fase.feita { border-left-color: var(--fase-cor); }
  .tarefa-fase::before { top: 50%; left: -4px; transform: translateY(-50%); }
}

@media (max-width: 760px) {
  .main-header { padding: 18px 18px; }
  .main-content { padding: 4px 18px 40px; }
}

/* Login ---------------------------------------------------------------------*/

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-page);
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 32px 30px;
}

.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.logo-mark {
  width: 44px; height: 44px; flex: 0 0 44px;
  background: var(--sidebar-bg);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
}
.logo-mark img { width: 28px; height: 28px; object-fit: contain; }
.logo-text .name { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.logo-text .sub  { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); letter-spacing: 0.12em; text-transform: uppercase; }

.login-error {
  display: none;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.82rem;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.login-error.show { display: block; }

.field { margin-bottom: 16px; }
.field select:disabled { opacity: 0.5; cursor: not-allowed; }
.field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-card);
  resize: vertical;
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235b616e' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}
.field optgroup { font-style: normal; font-weight: 700; color: var(--text-secondary); }
.field option { color: var(--text-primary); font-weight: 400; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }

.btn-full { width: 100%; margin-top: 6px; }

/* Modal ---------------------------------------------------------------------*/

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 18, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal-card {
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  padding: 26px 26px 20px;
}
.modal-card h2 { margin: 0 0 18px; font-size: 1.05rem; }
.detalhe-rotina-info { margin: -12px 0 18px; font-size: 0.8rem; color: var(--text-secondary); }

.modal-card-detalhe { max-width: 520px; }
.modal-card-config-clientes { max-width: 460px; }
.modal-card-duplicados { max-width: 640px; max-height: 85vh; }
.modal-card-duplicados code { background: var(--bg-page); padding: 1px 5px; border-radius: 4px; font-size: 0.85em; }
tr.linha-novo-cliente td { border-top: 2px solid var(--border); }
.modal-card-config-clientes td:nth-child(2), .modal-card-config-clientes td:nth-child(3),
.modal-card-config-clientes th:nth-child(2), .modal-card-config-clientes th:nth-child(3) { text-align: center; }
.modal-card-config-clientes input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.detalhe-secao {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px 4px;
  margin-bottom: 14px;
  background: var(--bg-page);
}
.detalhe-secao-titulo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.detalhe-secao .field select,
.detalhe-secao .field input,
.detalhe-secao .field textarea { background: var(--bg-card); }
.detalhe-grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .detalhe-grid-2col { grid-template-columns: 1fr; } }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

.modal-card-confirmar { max-width: 380px; text-align: center; }
.modal-confirmar-icone { font-size: 2rem; margin-bottom: 6px; }
.modal-confirmar-mensagem { color: var(--text-primary); font-size: 0.92rem; line-height: 1.5; margin: 0; }
.modal-card-confirmar .modal-actions { justify-content: center; }
.btn-danger { background: #dc2626; color: #fff; box-shadow: var(--shadow-card); }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }

.checklist-clientes {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  max-height: 180px;
  overflow-y: auto;
  padding: 8px 4px;
}
.checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 0.86rem;
}
.checklist-item:hover { background: var(--bg-page); }
.checklist-item input { margin: 0; }

.filtro-migracao-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  border-bottom: 1px solid var(--border);
}
.filtro-migracao-bar select,
.filtro-migracao-bar input[type="text"] {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.82rem;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.filtro-migracao-bar input[type="text"] { min-width: 160px; }
@media (max-width: 900px) {
  .filtro-migracao-bar { padding: 12px 18px; }
}

/* Board Migração --------------------------------------------------------------*/

.board-colunas {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  transition: grid-template-columns 0.15s ease;
}
@media (max-width: 1100px) {
  .board-colunas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .board-colunas { grid-template-columns: 1fr; }
}

.board-coluna { display: flex; flex-direction: column; gap: 10px; }
.board-coluna-cards {
  display: flex; flex-direction: column; gap: 10px;
  min-height: 60px;
  border-radius: var(--radius-md);
  transition: background 0.12s ease, box-shadow 0.12s ease;
}
.board-coluna-cards.drop-ok { background: rgba(22,163,74,0.08); box-shadow: inset 0 0 0 2px rgba(22,163,74,0.45); }
.board-coluna-cards.drop-no { background: rgba(220,38,38,0.06); box-shadow: inset 0 0 0 2px rgba(220,38,38,0.35); }
.board-coluna-titulo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.board-coluna-titulo:hover { background: var(--bg-page); }

.board-foco-titulo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.board-foco-titulo strong { text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.9rem; }
#btnVoltarBoard { font-size: 1rem; }

tr.linha-migracao { cursor: pointer; }
tr.linha-cliente-wms { cursor: pointer; }
tr.linha-cliente-wms:hover { background: var(--bg-page); }
tr.linha-migracao:hover { background: var(--bg-page); }
tr.linha-migracao td { vertical-align: middle; }
tr.linha-migracao .board-card-avatar { display: inline-flex; margin-right: 6px; vertical-align: middle; }
.board-coluna-min {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  flex: 0 0 auto;
}
.board-coluna-min:hover { background: var(--bg-page); color: var(--text-primary); }

.board-coluna.minimizada { min-width: 0; }
.board-coluna.minimizada .board-coluna-cards { display: none; }
.board-coluna.minimizada .board-coluna-titulo {
  flex-direction: column;
  gap: 6px;
  padding: 12px 4px;
}
.board-coluna.minimizada .board-coluna-titulo-texto {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-overflow: ellipsis;
  overflow: hidden;
  max-height: 140px;
}
.board-coluna.minimizada .board-coluna-qtd { margin-left: 0; }
.board-coluna.minimizada .board-coluna-min { transform: none; }

.board-coluna-qtd {
  margin-left: auto;
  background: var(--bg-page);
  border-radius: 20px;
  padding: 1px 9px;
  font-size: 0.72rem;
}

.board-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 14px 16px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.board-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16,18,27,0.10); }

.board-card-modulo-resumo { border-left-color: #16a34a; cursor: pointer; }
.board-card-modulo-titulo { font-weight: 700; font-size: 0.88rem; margin-bottom: 10px; }
.board-card-modulo-avatares { display: flex; align-items: center; gap: -6px; margin-bottom: 10px; }
.board-card-modulo-avatares .board-card-avatar { margin-right: -6px; border: 2px solid var(--bg-card); }
.board-card-modulo-mais {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg-page); border: 2px solid var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 700; color: var(--text-secondary);
  margin-right: -6px;
}
.board-card-modulo-qtd { font-size: 0.76rem; color: var(--text-secondary); }
.board-card[draggable="true"] { cursor: grab; }
.board-card[draggable="true"]:active { cursor: grabbing; }
.board-card.dragging { opacity: 0.4; }

.board-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.board-card-avatar {
  width: 24px; height: 24px; flex: 0 0 24px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.board-card-dev { font-weight: 700; font-size: 0.82rem; }
.board-card-data { margin-left: auto; font-size: 0.68rem; color: var(--text-muted); }
.board-card-tarefa { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.board-card-clientes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.board-card-cliente-tag {
  background: var(--bg-page);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.board-card-meta:empty { display: none; }
.board-card-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 12px;
  padding: 8px 10px;
  background: var(--bg-page);
  border-radius: var(--radius-sm);
}
.board-card-meta-linha { font-size: 0.7rem; color: var(--text-secondary); line-height: 1.3; }

.board-card-obs {
  font-size: 0.74rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 10px;
  padding: 6px 8px;
  border-left: 2px solid var(--border);
  word-break: break-word;
}

.board-stepper { display: flex; gap: 3px; margin-bottom: 12px; }
.board-step {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: var(--border);
}
.board-step.done { background: var(--step-cor, var(--accent)); }

.board-card-acoes { display: flex; align-items: center; gap: 8px; }
.btn-etapa {
  flex: 1;
  border: none;
  color: #fff;
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.btn-etapa:hover { filter: brightness(0.92); }
.board-card-concluido { flex: 1; font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); }
.board-card-excluir {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 4px 6px;
  border-radius: 4px;
}
.board-card-excluir:hover { background: var(--bg-page); color: var(--red); }
