/* CRM GoCode: funil em colunas, linha do tempo, agenda, busca de empresas e cartões do "Meu dia" */

/* ------------------------------------------------------------ funil */
.funil { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; scroll-snap-type: x proximity; }
.funil-col { flex: 0 0 280px; background: var(--bs-tertiary-bg, #f4f6f9); border-radius: 14px; padding: 10px; scroll-snap-align: start; border: 2px dashed transparent; transition: border-color .15s, background .15s; }
.funil-col.sobre { border-color: var(--bs-primary, #2563eb); background: rgba(37, 99, 235, .06); }
.funil-col-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 4px 10px; }
.funil-col-cab h3 { font-size: .95rem; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 6px; }
.funil-col-cab .bola { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.funil-col-tot { font-size: .75rem; color: var(--bs-secondary-color, #6b7280); }
.funil-cartoes { display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.funil-cartao { background: var(--bs-body-bg, #fff); border-radius: 10px; padding: 10px 12px; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); cursor: grab; border-left: 4px solid transparent; }
.funil-cartao:active { cursor: grabbing; }
.funil-cartao.arrastando { opacity: .45; }
.funil-cartao.parado { border-left-color: #f59e0b; }
.funil-cartao.pendente { border-left-color: #8b5cf6; }
.funil-cartao a.titulo { font-weight: 600; color: inherit; text-decoration: none; display: block; line-height: 1.3; }
.funil-cartao a.titulo:hover { text-decoration: underline; }
.funil-cartao .meta { font-size: .75rem; color: var(--bs-secondary-color, #6b7280); display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; }
.funil-cartao .valor { font-weight: 700; font-size: .85rem; }
.funil-cartao select { font-size: .75rem; padding: 2px 6px; margin-top: 6px; }
.funil-resumo { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .85rem; }
@media (min-width: 992px) { .funil-cartao select[data-mover-para] { display: none; } }

/* ------------------------------------------------------------ linha do tempo */
.tempo { list-style: none; padding: 0; margin: 0; position: relative; }
.tempo::before { content: ""; position: absolute; left: 15px; top: 4px; bottom: 4px; width: 2px; background: var(--bs-border-color, #e5e7eb); }
.tempo li { position: relative; padding: 0 0 16px 44px; }
.tempo .ic { position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--bs-tertiary-bg, #f1f5f9); color: var(--bs-body-color); font-size: .9rem; }
.tempo li.fixada .ic { background: #fef3c7; color: #92400e; }
.tempo .quando { font-size: .75rem; color: var(--bs-secondary-color, #6b7280); }
.tempo .texto { white-space: pre-line; }

/* ------------------------------------------------------------ agenda */
.agenda-grade { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.agenda-dia { background: var(--bs-tertiary-bg, #f4f6f9); border-radius: 10px; padding: 6px; min-height: 110px; font-size: .78rem; }
.agenda-dia.hoje { outline: 2px solid var(--bs-primary, #2563eb); }
.agenda-dia.fora { opacity: .45; }
.agenda-dia .num { font-weight: 700; font-size: .8rem; margin-bottom: 4px; }
.agenda-item { display: block; background: var(--bs-body-bg, #fff); border-radius: 6px; padding: 3px 6px; margin-bottom: 3px; color: inherit; text-decoration: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.agenda-item.feita { text-decoration: line-through; opacity: .6; }
.agenda-item.atrasada { background: #fee2e2; color: #991b1b; }
@media (max-width: 767px) { .agenda-grade { grid-template-columns: 1fr; } .agenda-dia { min-height: 0; } .agenda-dia.fora { display: none; } }
.tarefa-linha.atrasada { background: rgba(220, 38, 38, .06); }
.tarefa-linha.atrasada .quando { color: #b91c1c; font-weight: 600; }

/* ------------------------------------------------------------ Meu dia e números */
.kpi { border-radius: 14px; padding: 16px; background: var(--bs-body-bg, #fff); height: 100%; }
.kpi .rot { font-size: .8rem; color: var(--bs-secondary-color, #6b7280); }
.kpi .num { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.meta-barra { height: 8px; border-radius: 4px; background: var(--bs-tertiary-bg, #e5e7eb); overflow: hidden; }
.meta-barra span { display: block; height: 100%; background: #16a34a; border-radius: 4px; }
.meta-barra span.baixa { background: #f59e0b; }
.mural-item { border-left: 3px solid var(--bs-border-color, #e5e7eb); padding: 4px 0 4px 12px; margin-bottom: 10px; }
.mural-item.venda { border-left-color: #16a34a; }

/* ------------------------------------------------------------ busca de empresas */
.busca-filtros .form-label { font-size: .8rem; margin-bottom: 2px; }
.busca-contagem { font-size: 1.1rem; }
.empresa-linha .nome { font-weight: 600; }
.empresa-linha .sub { font-size: .78rem; color: var(--bs-secondary-color, #6b7280); }
.ficha-dados dt { font-size: .75rem; color: var(--bs-secondary-color, #6b7280); font-weight: 500; }
.ficha-dados dd { margin-bottom: 10px; }
.mapa-mini { width: 100%; height: 240px; border: 0; border-radius: 12px; }
.etiqueta { display: inline-block; padding: 2px 8px; border-radius: 20px; background: #e0e7ff; color: #3730a3; font-size: .75rem; margin: 0 4px 4px 0; }

/* ------------------------------------------------------------ painel para TV */
body.tv { background: #0b1220; color: #e5e7eb; }
.tv .kpi { background: #111a2e; color: #e5e7eb; }
.tv .kpi .rot { color: #94a3b8; }
.tv .kpi .num { font-size: 3rem; }

@media print { .no-print, .a-dock, .app-header { display: none !important; } }
