/* CRM — Fase 2 do Passo 365. Tokens herdados de ../style.css */

.crm-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.crm-tabs { display: flex; gap: 4px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.crm-tab { border: none; background: transparent; padding: 7px 14px; border-radius: 7px; font-size: 12.6px; font-weight: 700; color: var(--slate-500); cursor: pointer; }
.crm-tab.on { background: #fff; color: var(--blue-700); box-shadow: 0 1px 2px rgba(15,23,42,.08); }

.crm-table__actions { display: flex; gap: 4px; }

/* ---------------- Kanban ---------------- */
.crm-board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.crm-col { flex: none; width: 240px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.crm-col__head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 2px; font-size: 12px; font-weight: 700; color: var(--slate-600); }
.crm-col__count { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px; font-size: 10.8px; color: var(--slate-500); }
.crm-col__body { display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.crm-col__empty { font-size: 11.5px; color: var(--slate-400); text-align: center; padding: 14px 0; }

.crm-card { background: #fff; border: 1px solid var(--border); border-radius: 11px; padding: 10px 12px; cursor: grab; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.crm-card:active { cursor: grabbing; }
.crm-card__name { font-size: 13px; font-weight: 700; color: var(--slate-900); }
.crm-card__meta { font-size: 11.5px; color: var(--slate-500); margin-top: 2px; }
.crm-card__foot { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.crm-card__tag { display: inline-block; font-size: 10.5px; font-weight: 700; color: var(--amber-900); background: var(--amber-100); padding: 2px 7px; border-radius: 6px; }
.crm-card__tag--done { color: var(--green-600); background: var(--green-50); }

/* ---------------- Modal ---------------- */
.crm-modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; z-index: 500; padding: 24px; }
.crm-modal { background: #fff; border-radius: 18px; width: 100%; max-width: 460px; max-height: 88vh; overflow: auto; padding: 22px; box-shadow: 0 30px 60px rgba(15,23,42,.25); }
.crm-modal h3 { margin: 0 0 4px; font-size: 17px; }
.crm-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.crm-modal__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--slate-100); }
.crm-danger { color: var(--danger); margin-right: auto; }

.crm-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-top: 14px; }
.crm-form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; color: var(--slate-600); }
.crm-form-grid label.full { grid-column: 1 / -1; }
.crm-form-grid input, .crm-form-grid select, .crm-form-grid textarea, .crm-select {
  font: inherit; font-size: 13px; font-weight: 500; color: var(--slate-900);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; background: var(--bg-input);
}
.crm-form-grid textarea { min-height: 60px; resize: vertical; }
.crm-select { width: 100%; margin-top: 6px; }

.crm-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.crm-tag { font-size: 10.8px; font-weight: 700; color: var(--blue-700); background: var(--blue-50); padding: 3px 8px; border-radius: 999px; }
.crm-obs { font-size: 12.8px; color: var(--slate-600); background: var(--bg-input); border-radius: 10px; padding: 10px 12px; margin-top: 10px; line-height: 1.5; }

.crm-checklist { display: flex; flex-direction: column; gap: 4px; }
.crm-checklist__empty { font-size: 12.4px; color: var(--slate-400); margin: 0; }
.crm-checklist__item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--slate-800); padding: 5px 2px; }
.crm-checklist__item input { flex: none; }
.crm-checklist__item span { flex: 1; }
.crm-checklist__item--done span { color: var(--slate-400); text-decoration: line-through; }
.crm-checklist__del { flex: none; border: none; background: none; color: var(--slate-300); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 4px; }
.crm-checklist__del:hover { color: var(--danger); }
.crm-checklist__presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.crm-checklist__presets .p365-btn { padding: 5px 10px; font-size: 11.5px; }

.crm-hist-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--slate-400); margin: 16px 0 8px; }
.crm-hist { display: flex; flex-direction: column; gap: 8px; max-height: 160px; overflow-y: auto; }
.crm-hist__item { font-size: 12.4px; color: var(--slate-700); padding-left: 10px; border-left: 2px solid var(--slate-200); }
.crm-hist__date { display: block; font-size: 10.5px; color: var(--slate-400); font-weight: 600; }
.crm-note-form { display: flex; gap: 8px; margin-top: 10px; }
.crm-note-form input { flex: 1; font: inherit; font-size: 12.6px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; background: var(--bg-input); }

/* ---------------- Conteúdos · publicação Instagram ---------------- */
.ct-ig-banner { background: var(--bg-input); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; font-size: 12.6px; color: var(--slate-600); display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin-bottom: 16px; }
.ct-ig-banner b { flex: 1 0 100%; color: var(--slate-900); font-size: 12.8px; }
.ct-ig-banner p { flex: 1 0 100%; margin: 6px 0 0; color: var(--slate-500); line-height: 1.5; }
.ct-ig-banner--ok { background: var(--green-50); color: var(--green-600); font-weight: 700; border-color: transparent; }
.ct-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); display: block; }
.ct-preview { max-width: 100%; max-height: 180px; border-radius: 10px; border: 1px solid var(--border); margin-top: 4px; display: block; }
.ct-auto-pill { font-size: 10.5px; font-weight: 700; color: var(--blue-700); background: var(--blue-50); padding: 2px 7px; border-radius: 999px; white-space: nowrap; }

/* ---------------- Cadastro · foto de identificação ---------------- */
.cad-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); display: block; flex: none; }
.cad-avatar--placeholder { display: flex; align-items: center; justify-content: center; background: var(--blue-50); color: var(--blue-700); font-weight: 800; font-size: 20px; }
.cad-avatar--sm { width: 30px; height: 30px; font-size: 11px; }

/* ---------------- Gestão · avatar/logo do aplicativo ---------------- */
.gest-logo { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; border: 1px solid var(--border); display: block; flex: none; background: #fff; }
.gest-logo--placeholder { display: flex; align-items: center; justify-content: center; background: var(--blue-50); color: var(--blue-700); font-weight: 800; font-size: 14px; }
