/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== FOCO DO DIA ===== */
.foco-card {
  background: linear-gradient(135deg, #1e293b, #334155); color: #fff;
  margin: 10px 16px 0; border-radius: 12px; padding: 12px 16px;
}
.foco-head { display: flex; align-items: center; gap: 10px; }
.foco-title { font-weight: 700; font-size: 1rem; }
.foco-counts { font-size: 0.8rem; opacity: .9; flex: 1; }
.foco-toggle { background: none; border: none; color: #fff; cursor: pointer; font-size: 0.9rem; }
.foco-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.foco-list.hidden { display: none; }
.foco-item {
  display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.08);
  border-radius: 8px; padding: 8px 12px;
}
.foco-rank { font-weight: 700; opacity: .6; min-width: 18px; font-size: 0.85rem; }
.foco-info { flex: 1; min-width: 0; }
.foco-name { font-weight: 600; font-size: 0.88rem; }
.foco-reason { font-size: 0.74rem; opacity: .85; }
.foco-badge { font-size: 0.7rem; padding: 1px 7px; border-radius: 10px; white-space: nowrap; }
.foco-badge.atrasado { background: #dc2626; }
.foco-badge.hoje { background: #ca8a04; }
.foco-cobrar {
  background: #25D366; color: #fff; border: none; border-radius: 6px;
  padding: 6px 12px; font-size: 0.78rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.foco-cobrar:hover { opacity: .9; }
.foco-feito {
  background: rgba(255,255,255,.15); color: #fff; border: none; border-radius: 6px;
  padding: 6px 9px; font-size: 0.78rem; cursor: pointer;
}
.foco-empty { font-size: 0.85rem; opacity: .8; padding: 6px 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  background: #f1f5f9;
  color: #0f172a;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ===== TOPBAR ===== */
.topbar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
.topbar-title { font-weight: 700; font-size: 14px; letter-spacing: .3px; }
.topbar-date  { color: #94a3b8; font-size: 11px; }
.wa-nav-indicator {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  text-decoration: none;
  transition: opacity .2s;
  white-space: nowrap;
}
.bot-global-toggle {
  border: none;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .3px;
  transition: background .15s, color .15s;
}
.bot-global-toggle.bot-active  { background: #dcfce7; color: #166534; }
.bot-global-toggle.bot-active:hover  { background: #bbf7d0; }
.bot-global-toggle.bot-paused  { background: #f1f5f9; color: #94a3b8; }
.bot-global-toggle.bot-paused:hover  { background: #e2e8f0; }
.btn-read-all {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  background: #f8fafc;
  color: #64748b;
  letter-spacing: .2px;
}
.btn-read-all:hover { background: #e2e8f0; color: #334155; }

.btn-bot-log {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  background: #f8fafc;
  color: #475569;
  letter-spacing: .2px;
}
.btn-bot-log:hover { background: #e2e8f0; }

.btn-rota-semanal {
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  background: #eff6ff;
  color: #1d4ed8;
  letter-spacing: .2px;
}
.btn-rota-semanal:hover { background: #dbeafe; }

.btn-agente {
  border: 1px solid #a7f3d0;
  border-radius: 6px;
  padding: 5px 12px;
  background: #ecfdf5;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: #065f46;
  letter-spacing: .2px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-agente:hover { background: #d1fae5; }

.btn-campanhas {
  border-color: #a5b4fc !important;
  background: #eef2ff !important;
  color: #3730a3 !important;
}
.btn-campanhas:hover { background: #e0e7ff !important; }

/* ===== BUSCA DE CONTATOS ===== */
.contact-search-wrap {
  position: relative;
  flex: 0 1 260px;
}
.contact-search-input {
  width: 100%;
  padding: 5px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  font-size: 12px;
  background: #f8fafc;
  color: #0f172a;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.contact-search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px #3b82f620;
  background: #fff;
}
.contact-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 1000;
  max-height: 340px;
  overflow-y: auto;
}
.contact-search-dropdown.hidden { display: none; }
.cs-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition: background .1s;
}
.cs-item:last-child { border-bottom: none; }
.cs-item:hover,
.cs-item-active { background: #f0f9ff; }
.cs-item-main {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.cs-name {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.cs-chip {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  border: 1px solid;
  white-space: nowrap;
  flex-shrink: 0;
}
.cs-phone {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  flex-shrink: 0;
}
.cs-empty {
  padding: 14px 12px;
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
}

/* ===== BANNER ===== */
.banner-alert {
  background: #991b1b;
  color: #fff;
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  animation: pulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}
.banner-alert.hidden { display: none; }
.banner-close { font-size: 16px; cursor: pointer; padding: 0 4px; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .75; }
}
@keyframes reminder-flash {
  0%, 100% { background: #fff; }
  40%       { background: #fef9c3; border-color: #fde047; }
}
.reminder-flash { animation: reminder-flash 0.6s ease 2; }

/* ===== STATS ===== */
.stats-bar {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  flex-shrink: 0;
}
.stat-card {
  flex: 1;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.stat-value { font-size: 22px; font-weight: 700; }
.stat-label { color: #94a3b8; font-size: 9px; letter-spacing: .5px; margin-top: 2px; }
.orange { color: #ea580c; }
.yellow { color: #ca8a04; }
.green  { color: #16a34a; }
.blue   { color: #2563eb; }

/* ===== MAIN LAYOUT ===== */
.main-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  padding: 0 16px 16px;
  gap: 12px;
}

/* ===== REMINDERS PANEL ===== */
.reminders-panel {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel-title {
  color: #ea580c;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
}
.btn-new-reminder {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 10px;
  cursor: pointer;
  color: #2563eb;
  font-weight: 600;
}
.btn-new-reminder:hover { background: #eff6ff; }
.reminders-search-wrap { padding: 2px 0 4px; }
.reminders-search {
  width: 100%;
  padding: 5px 8px;
  font-size: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #334155;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.reminders-search:focus {
  border-color: #ea580c;
  box-shadow: 0 0 0 2px rgba(234,88,12,.12);
  background: #fff;
}
.reminders-search::placeholder { color: #94a3b8; }

/* corpo scrollável único que contém as duas seções */
.reminders-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* cabeçalhos de seção */
.reminder-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  position: sticky;
  top: 0;
  z-index: 2;
}
.reminder-section-cotacao {
  background: #eff6ff;
  color: #1d4ed8;
  border-left: 3px solid #3b82f6;
}
.btn-audit-cotacao {
  background: transparent;
  border: none;
  color: #1d4ed8;
  font-size: 12px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  border-radius: 3px;
  transition: background .15s;
}
.btn-audit-cotacao:hover { background: rgba(29,78,216,.15); }
.btn-audit-cotacao.spinning { animation: spin .8s linear infinite; display:inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.reminder-section-pos-venda {
  background: #faf5ff;
  color: #7c3aed;
  border-left: 3px solid #a855f7;
  margin-top: 6px;
}
.reminder-section-gerais {
  background: #f0fdf4;
  color: #15803d;
  border-left: 3px solid #22c55e;
  margin-top: 6px;
}
.reminder-section-badge {
  background: rgba(0,0,0,.08);
  color: inherit;
}

.reminders-list { display: flex; flex-direction: column; gap: 6px; }

/* ===== REMINDER GROUPS ===== */
.reminder-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  margin-top: 6px;
}
.reminder-group-header:first-child { margin-top: 0; }
.group-overdue { background: #fff1f2; color: #be123c; }
.group-today   { background: #fefce8; color: #854d0e; }
.reminder-count-badge {
  font-size: 9px;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 6px;
}
.group-overdue .reminder-count-badge { background: #fecdd3; color: #be123c; }
.group-today   .reminder-count-badge { background: #fef9c3; color: #854d0e; }

/* ===== REMINDER CARD ===== */
.reminder-card {
  background: #fff;
  border: 1px solid #fecaca;
  border-left: 3px solid #ef4444;
  border-radius: 6px;
  padding: 8px 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.reminder-card.overdue-1 { border-left-color: #f97316; border-color: #fed7aa; }
.reminder-card.overdue-0 { border-left-color: #eab308; border-color: #fef08a; }
.reminder-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
}
.reminder-card-name {
  font-size: 11px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.reminder-card-time {
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.reminder-card.overdue-1 .reminder-card-time { color: #ea580c; }
.reminder-card.overdue-0 .reminder-card-time { color: #ca8a04; }
.reminder-type-chip {
  display: inline-block;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
  margin-top: 3px;
  background: #f1f5f9;
  color: #64748b;
}
/* Cores específicas por tipo */
.reminder-type-reengajamento { background: #ede9fe; color: #5b21b6; }
.reminder-type-reativacao    { background: #fef3c7; color: #92400e; }
.reminder-type-pos_venda     { background: #faf5ff; color: #7c3aed; }
.reminder-type-cotacao_fria  { background: #fee2e2; color: #991b1b; }
.reminder-type-cotacao_final { background: #ffedd5; color: #c2410c; }
.reminder-type-negociacao    { background: #fff7ed; color: #c2410c; }
.reminder-card-msg   { color: #64748b; font-size: 9px; margin-top: 4px; line-height: 1.3; }
.reminder-card-btns  { display: flex; gap: 4px; margin-top: 6px; position: relative; }
.btn-done {
  background: #dcfce7; color: #166534;
  border: none; border-radius: 4px;
  padding: 3px 7px; font-size: 8px; font-weight: 500;
  cursor: pointer;
}
.btn-done:hover { background: #bbf7d0; }
.btn-snooze {
  background: #f1f5f9; color: #64748b;
  border: 1px solid #e2e8f0; border-radius: 4px;
  padding: 3px 7px; font-size: 8px;
  cursor: pointer;
  position: relative;
}
.btn-snooze:hover { background: #e2e8f0; }
.btn-delete-reminder {
  background: #fef2f2; color: #b91c1c;
  border: 1px solid #fecaca; border-radius: 4px;
  padding: 3px 7px; font-size: 8px;
  cursor: pointer;
}
.btn-delete-reminder:hover { background: #fee2e2; }
.btn-open-reminder {
  background: #25D366; color: #fff;
  border: none; border-radius: 4px;
  padding: 3px 7px; font-size: 10px;
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
  transition: background 0.15s;
}
.btn-open-reminder:hover { background: #128C7E; }
.snooze-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  z-index: 100;
  min-width: 100px;
  padding: 4px 0;
}
.snooze-dropdown.hidden { display: none; }
.snooze-option {
  padding: 6px 12px;
  font-size: 11px;
  cursor: pointer;
  color: #374151;
}
.snooze-option:hover { background: #f8fafc; }

/* ===== KANBAN BOARD ===== */
.kanban-board {
  flex: 1;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  align-items: flex-start;
  padding-bottom: 8px;
}

/* ===== KANBAN COLUMN ===== */
.kanban-col {
  flex-shrink: 0;
  width: 200px;
  display: flex;
  flex-direction: column;
}
.kanban-col-header {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kanban-col-title {
  font-size: 9px;
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.kanban-col-badge {
  font-size: 8px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}
.badge-yellow  { background: #fef08a; color: #854d0e; }
.badge-orange  { background: #fed7aa; color: #9a3412; }
.badge-green   { background: #bbf7d0; color: #166534; }
.badge-blue    { background: #bfdbfe; color: #1e40af; }
.badge-red     { background: #fecaca; color: #991b1b; }
.badge-gray    { background: #e5e7eb; color: #374151; }
.badge-purple  { background: #e9d5ff; color: #6b21a8; }

.kanban-col-body {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 6px 6px;
  padding: 6px;
  min-height: 80px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.kanban-col-body.drag-over {
  border: 2px dashed #60a5fa;
  background: #eff6ff;
}

/* ===== KANBAN CARD ===== */
.kanban-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 7px 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
  cursor: grab;
  user-select: none;
  position: relative;
}
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: .5; }
.kanban-card-name {
  font-size: 10px;
  font-weight: 500;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}
.kanban-card-meta {
  color: #94a3b8;
  font-size: 8px;
  margin-top: 2px;
}
/* ── Barra de ações unificada no fundo de cada card ── */
.card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
}

/* 💬 Abrir WhatsApp — ícone compacto, lado direito da barra */
.btn-open-chat {
  flex-shrink: 0;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 10px;
  cursor: pointer;
  line-height: 1.4;
  transition: background 0.15s;
}
.btn-open-chat:hover { background: #128C7E; }

/* 📦 Rota semanal — ícone compacto ao lado do WhatsApp */
.btn-route-toggle {
  flex-shrink: 0;
  background: transparent;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 2px 4px;
  font-size: 10px;
  cursor: pointer;
  line-height: 1.4;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-route-toggle:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.btn-route-toggle.active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}
.btn-route-toggle.active:hover { background: #dbeafe; }

/* Indicador de rota no card */
.kanban-card.is-route {
  border-left: 3px solid #3b82f6;
}

.kanban-card.has-unread {
  border-left: 3px solid #22c55e;
  background: #f0fdf4;
}
/* has-unread tem prioridade sobre is-route */
.kanban-card.has-unread.is-route { border-left: 3px solid #22c55e; }
.unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #22c55e;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: #fff;
  border-radius: 10px;
  width: 380px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.modal-header {
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}
.modal-close { border: none; background: none; font-size: 18px; cursor: pointer; color: #94a3b8; }
.modal-body  { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.modal-body label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: #64748b; font-weight: 500; position: relative; }
.modal-body input,
.modal-body textarea {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  color: #0f172a;
  outline: none;
}
.modal-body input:focus,
.modal-body textarea:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(147,197,253,.2); }
.modal-row { display: flex; gap: 10px; }
.modal-row label { flex: 1; }
.modal-footer {
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.btn-cancel  { background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 6px; padding: 7px 14px; cursor: pointer; font-size: 12px; }
.btn-primary { background: #2563eb; color: #fff; border: none; border-radius: 6px; padding: 7px 14px; cursor: pointer; font-size: 12px; font-weight: 600; }
.btn-primary:hover { background: #1d4ed8; }

/* ===== AUTOCOMPLETE ===== */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  z-index: 200;
  max-height: 150px;
  overflow-y: auto;
}
.autocomplete-dropdown.hidden { display: none; }
.autocomplete-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12px;
  color: #0f172a;
}
.autocomplete-item:hover { background: #f8fafc; }

/* ===== BOT LOG MODAL ===== */
.botlog-modal {
  width: 520px;
  max-width: 95vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.botlog-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.botlog-loading {
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
  padding: 24px 0;
}
.botlog-entry {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.botlog-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.botlog-contact {
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
}
.botlog-time {
  font-size: 9px;
  color: #94a3b8;
}
.botlog-bubble {
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 11px;
  line-height: 1.5;
  max-width: 90%;
  white-space: pre-wrap;
  word-break: break-word;
}
.botlog-client {
  background: #e2e8f0;
  color: #374151;
  align-self: flex-start;
}
.botlog-bot {
  background: #dcfce7;
  color: #166534;
  align-self: flex-end;
}

/* ===== ROTA SEMANAL MODAL ===== */
.rota-modal {
  width: 620px;
  max-width: 95vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}
.rota-summary {
  display: flex;
  gap: 16px;
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
}
.rota-stat {
  font-size: 12px;
  color: #475569;
}
.rota-stat-ok { color: #16a34a; }
.rota-stat-cd { color: #b45309; }
.rota-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}
.rota-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.rota-table thead th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 6px 8px;
  border-bottom: 1px solid #e2e8f0;
}
.rota-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
}
.rota-table tbody tr:hover { background: #f8fafc; }
.rota-table td { padding: 8px 8px; vertical-align: middle; }
.rota-td-date { color: #94a3b8; font-size: 11px; white-space: nowrap; }
.rota-row-ok td:first-child { font-weight: 600; color: #0f172a; }
.rota-row-cd td:first-child { color: #64748b; }
.rota-badge-ok {
  background: #dcfce7;
  color: #16a34a;
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.rota-badge-cd {
  background: #fef3c7;
  color: #b45309;
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

/* ===== BOT PER-CARD BUTTON ===== */
.card-bot-btn {
  flex: 1;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 5px;
  cursor: pointer;
  text-align: left;
  letter-spacing: .2px;
  transition: background .12s;
}
.card-bot-btn:hover { background: #e2e8f0; color: #475569; }
.card-bot-btn.bot-on  { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.card-bot-btn.bot-off { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.card-bot-btn.bot-auto { opacity: .55; }

/* ===== TEMPERATURE ICONS (via CSS pseudo-elements) ===== */
.temp-quente  .kanban-card-meta::after { content: " \1F525"; }
.temp-morno   .kanban-card-meta::after { content: " \1F321\FE0F"; }
.temp-frio    .kanban-card-meta::after { content: " \2744\FE0F"; }
.temp-inativo .kanban-card-meta::after { content: " \1F6AB"; }
