/* ENGAGE-KANBAN-01 — visualização compacta, seleção múltipla, visão focada e movimentação em massa */

.ekk-controls { display:flex; align-items:center; justify-content:flex-end; gap:10px; flex-wrap:wrap; margin:-0.5rem 0 0.9rem; }
.ekk-view-toggle { display:inline-flex; align-items:center; gap:2px; padding:3px; border-radius:999px; background:#e2e8f0; }
.ekk-view-label { padding:0 8px 0 10px; color:#475569; font-size:.78rem; font-weight:700; }
.ekk-view-btn { border:0; border-radius:999px; padding:.35rem .9rem; background:transparent; color:#475569; font-size:.8rem; font-weight:700; cursor:pointer; }
.ekk-view-btn.is-active { background:#fff; color:#2563eb; box-shadow:0 1px 3px rgba(15,23,42,.12); }
.ekk-select-toggle.is-active { border-color:#93c5fd; background:#eff6ff; color:#1d4ed8; }

/* Cabeçalho de coluna clicável */
.epl-column-head[data-ekk-column-head] { cursor:pointer; }
.epl-column-head[data-ekk-column-head]:hover h3 { color:#1d4ed8; }
.ekk-column-tools { display:flex; justify-content:flex-end; gap:6px; padding:.35rem .65rem; background:#fff; border-bottom:1px solid #eef2f7; }
.ekk-open-stage,.ekk-select-column { border:1px solid #e2e8f0; border-radius:8px; padding:.2rem .55rem; background:#f8fafc; color:#334155; font-size:.72rem; font-weight:700; white-space:nowrap; cursor:pointer; }
.ekk-open-stage:hover,.ekk-select-column:hover { border-color:#93c5fd; color:#1d4ed8; background:#eff6ff; }

/* Seleção nos cards */
.ekk-check { display:inline-flex; align-items:center; justify-content:center; min-width:24px; min-height:24px; cursor:pointer; flex-shrink:0; }
.ekk-check input { width:17px; height:17px; accent-color:#2563eb; cursor:pointer; }
.epl-card.is-selected { border-color:#60a5fa; box-shadow:0 0 0 2px rgba(37,99,235,.25); background:#f8fbff; }

/* Menu ⋮ do card */
.ekk-card-menu { position:relative; }
.ekk-card-menu-btn { width:28px; height:28px; border:0; border-radius:8px; background:#f8fafc; color:#64748b; font-size:1.05rem; font-weight:800; line-height:1; cursor:pointer; }
.ekk-card-menu-pop { position:absolute; z-index:30; top:32px; right:0; min-width:150px; padding:4px; border:1px solid #e2e8f0; border-radius:10px; background:#fff; box-shadow:0 10px 24px rgba(15,23,42,.14); }
.ekk-card-menu-pop button { display:block; width:100%; padding:.45rem .6rem; border:0; border-radius:7px; background:transparent; color:#0f172a; font-size:.82rem; text-align:left; cursor:pointer; }
.ekk-card-menu-pop button:hover { background:#eff6ff; color:#1d4ed8; }

/* Card compacto */
.epl-card.epl-card--compact { display:block; flex-shrink:0; padding:.45rem .55rem; border-radius:10px; }
.epl-card--compact .ekk-compact-main { flex:1; min-width:0; }
.epl-card--compact .epl-card-name { font-size:.82rem; line-height:1.2; }
.epl-card-compact-secondary { display:flex; align-items:center; gap:.35rem; min-width:0; margin-top:.25rem; }
.epl-card--compact .epl-card-head-actions { gap:.1rem; }
.epl-card--compact .epl-card-wa,.epl-card--compact .epl-card-move-menu,.epl-card--compact .ekk-card-menu-btn { width:24px; height:24px; }
.epl-card--compact .epl-card-wa svg { width:15px; height:15px; }
.epl-card--compact .epl-move-popover { position:absolute; }
.epl-card--compact { position:relative; }
.ekk-compact-meta { display:flex; align-items:center; flex-wrap:wrap; gap:.25rem .3rem; flex:1; min-width:0; color:#64748b; font-size:.68rem; }
.ekk-compact-meta .epl-temp-chip { display:inline-flex; align-items:center; padding:0; background:transparent; font-size:.72rem; line-height:1; }
.ekk-compact-chip { padding:0 .3rem; border-radius:999px; background:#f1f5f9; color:#334155; font-weight:700; }
.ekk-compact-time { margin-left:auto; color:#94a3b8; }
.ekk-compact-assignee { display:inline-grid; place-items:center; min-width:20px; height:20px; padding:0 3px; border-radius:999px; background:#dbeafe; color:#1e40af; font-size:.62rem; font-weight:800; }
.ekk-compact-assignee.is-empty { background:#f1f5f9; color:#94a3b8; }
.ekk-compact-priority { width:4px; align-self:stretch; border-radius:4px; background:#cbd5e1; flex-shrink:0; }
.ekk-compact-priority[data-tone="high"],.ekk-compact-priority[data-priority="HIGH"],.ekk-compact-priority[data-priority="URGENT"] { background:#ef4444; }
.ekk-compact-priority[data-tone="medium"],.ekk-compact-priority[data-priority="MEDIUM"] { background:#f59e0b; }
.ekk-compact-priority[data-tone="low"],.ekk-compact-priority[data-priority="LOW"] { background:#22c55e; }
.epl-body[data-ekk-view="compact"] .epl-column-drop { gap:.35rem; padding:.45rem; }

/* Barra de seleção */
.ekk-selection-bar { position:fixed; z-index:1100; left:50%; bottom:18px; transform:translateX(-50%); display:flex; align-items:center; gap:14px; flex-wrap:wrap; max-width:min(960px,94vw); padding:10px 14px 10px 18px; border:1px solid #bfdbfe; border-radius:14px; background:#fff; box-shadow:0 14px 40px rgba(15,23,42,.22); }
.ekk-bar-count { color:#0f172a; font-size:.9rem; }
.ekk-bar-scope { color:#1d4ed8; font-size:.78rem; }
.ekk-bar-actions { display:flex; gap:8px; margin-left:auto; }
.ekk-bar-actions .epl-btn { min-height:38px; }

/* Diálogos */
.ekk-backdrop { position:fixed; inset:0; z-index:1190; background:rgba(15,23,42,.38); }
.ekk-dialog { position:fixed; z-index:1200; top:50%; left:50%; transform:translate(-50%,-50%); width:min(520px,94vw); max-height:88vh; display:flex; flex-direction:column; border-radius:16px; background:#fff; box-shadow:0 24px 60px rgba(15,23,42,.3); }
.ekk-dialog > header { display:flex; align-items:center; justify-content:space-between; padding:18px 20px 12px; border-bottom:1px solid #e2e8f0; }
.ekk-dialog h2 { margin:0; color:#0f172a; font-size:1.1rem; }
.ekk-dialog-close { width:32px; height:32px; border:0; border-radius:8px; background:#f1f5f9; color:#475569; font-size:22px; cursor:pointer; }
.ekk-dialog > footer { display:flex; justify-content:flex-end; gap:10px; padding:14px 20px; border-top:1px solid #e2e8f0; }
.ekk-targets { display:grid; gap:6px; padding:14px 20px; overflow:auto; }
.ekk-target { display:flex; align-items:center; gap:10px; padding:8px 10px; border:1px solid #e2e8f0; border-radius:10px; cursor:pointer; }
.ekk-target.is-selected { border-color:#60a5fa; background:#eff6ff; }
.ekk-target.is-disabled { opacity:.5; cursor:not-allowed; }
.ekk-target small { margin-left:auto; color:#64748b; font-size:.72rem; }
.ekk-target-dot { width:10px; height:10px; border-radius:999px; background:var(--ekk-dot,#64748b); }
.ekk-target-name { color:#0f172a; font-size:.88rem; font-weight:600; }
.ekk-dialog-note { margin:0 20px 8px; color:#64748b; font-size:.8rem; }
.ekk-close-reason { display:grid; gap:6px; margin:4px 20px 14px; color:#334155; font-size:.84rem; font-weight:700; }
.ekk-close-reason select { width:100%; padding:10px 12px; border:1px solid #cbd5e1; border-radius:10px; background:#fff; color:#0f172a; font:inherit; }
.ekk-close-reason select:focus { outline:3px solid rgba(37,99,235,.15); border-color:#2563eb; }
.ekk-close-reason small { color:#64748b; font-size:.75rem; font-weight:400; }
.ekk-confirm-text { margin:4px 20px 10px; color:#0f172a; font-size:.9rem; font-weight:700; }
.ekk-dialog-error { margin:0 20px 10px; padding:8px 12px; border-radius:10px; background:#fef2f2; color:#991b1b; font-size:.82rem; }
.ekk-progress { position:relative; margin:0 20px 12px; height:22px; border-radius:999px; background:#e2e8f0; overflow:hidden; }
.ekk-progress span { position:absolute; inset:0 auto 0 0; background:#93c5fd; transition:width .2s ease; }
.ekk-progress em { position:relative; display:block; text-align:center; color:#0f172a; font-size:.74rem; font-style:normal; line-height:22px; }
.ekk-failures { display:grid; gap:6px; margin:0; padding:4px 20px 14px; list-style:none; overflow:auto; }
.ekk-failures li { display:grid; gap:2px; padding:8px 10px; border-radius:10px; background:#f8fafc; }
.ekk-failures span { color:#64748b; font-size:.8rem; }

/* ENGAGE-KANBAN-02 — arraste de múltiplos cards */
.ekk-drag-badge { position:fixed; top:-200px; left:-400px; display:inline-flex; align-items:center; gap:6px; padding:.45rem .8rem; border-radius:999px; background:#2563eb; color:#fff; font:700 .82rem/1.2 system-ui,-apple-system,"Segoe UI",sans-serif; white-space:nowrap; box-shadow:0 8px 20px rgba(37,99,235,.35); pointer-events:none; }
.epl-card.ekk-drag-source { opacity:.45; }
.ekk-multi-dragging .epl-card:not(.is-dragging) { pointer-events:none; }
.epl-column.ekk-drop-target { position:relative; border-color:#2563eb; box-shadow:0 0 0 2px rgba(37,99,235,.35); }
.epl-column.ekk-drop-target .epl-column-drop { background:#eff6ff; outline:2px dashed #2563eb; outline-offset:-4px; }
.epl-column.ekk-drop-target[data-ekk-drop-label]::after { content:attr(data-ekk-drop-label); position:absolute; left:50%; bottom:12px; z-index:5; transform:translateX(-50%); max-width:calc(100% - 20px); overflow:hidden; text-overflow:ellipsis; padding:.35rem .75rem; border-radius:999px; background:#2563eb; color:#fff; font-size:.74rem; font-weight:700; white-space:nowrap; box-shadow:0 6px 16px rgba(37,99,235,.3); pointer-events:none; }
.ekk-confirm-lead { margin:16px 20px 10px; color:#0f172a; font-size:.92rem; line-height:1.45; }

/* Aviso de resultado */
.ekk-notice { display:flex; align-items:flex-start; gap:12px; margin-bottom:1rem; padding:.75rem 1rem; border:1px solid #bbf7d0; border-radius:12px; background:#f0fdf4; color:#14532d; font-size:.88rem; }
.ekk-notice[data-tone="warning"] { border-color:#fde68a; background:#fffbeb; color:#78350f; }
.ekk-notice[data-tone="error"] { border-color:#fecaca; background:#fef2f2; color:#7f1d1d; }
.ekk-notice-text { display:grid; gap:3px; flex:1; }
.ekk-notice-close { border:0; background:transparent; color:inherit; font-size:20px; cursor:pointer; }

/* Visão focada da etapa */
.ekk-focus { border:1px solid #e2e8f0; border-top:4px solid var(--ekk-stage,#64748b); border-radius:16px; background:#fff; padding:1rem 1.1rem 1.1rem; }
.ekk-focus-head { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:.8rem; }
.ekk-focus-head h2 { display:flex; align-items:center; gap:8px; margin:0; color:#0f172a; font-size:1.15rem; }
.ekk-focus-dot { width:10px; height:10px; border-radius:999px; background:var(--ekk-stage,#64748b); }
.ekk-focus-tools { display:flex; align-items:flex-end; gap:10px; flex-wrap:wrap; margin-bottom:.75rem; }
.ekk-focus-search { flex:1 1 260px; min-width:220px; }
.ekk-focus-filter { display:grid; gap:3px; color:#64748b; font-size:.72rem; font-weight:700; }
.ekk-focus-filter select { min-height:38px; padding:.35rem .5rem; border:1px solid #e2e8f0; border-radius:10px; background:#fff; color:#0f172a; font:inherit; font-size:.84rem; font-weight:500; }
.ekk-focus-note { margin:0 0 .6rem; color:#1e3a8a; font-size:.8rem; }
.ekk-scope-banner { margin-bottom:.6rem; padding:.55rem .8rem; border-radius:10px; background:#eff6ff; color:#1e3a8a; font-size:.84rem; }
.ekk-table-wrap { overflow:auto; border:1px solid #e2e8f0; border-radius:12px; }
.ekk-table-wrap.is-loading { opacity:.55; }
.ekk-table { width:100%; border-collapse:collapse; font-size:.84rem; }
.ekk-table th { position:sticky; top:0; padding:.55rem .6rem; background:#f8fafc; color:#475569; font-size:.72rem; font-weight:800; text-align:left; text-transform:uppercase; letter-spacing:.03em; border-bottom:1px solid #e2e8f0; }
.ekk-table td { padding:.5rem .6rem; border-bottom:1px solid #f1f5f9; color:#0f172a; vertical-align:middle; }
.ekk-row { cursor:pointer; }
.ekk-row:hover td { background:#f8fbff; }
.ekk-row.is-selected td { background:#eff6ff; }
.ekk-cell-check { width:36px; }
.ekk-cell-open { width:60px; text-align:right; }
.ekk-cell-sub { display:block; color:#64748b; font-size:.74rem; white-space:nowrap; }
.ekk-table td strong { white-space:nowrap; }
.ekk-pager { display:flex; align-items:center; justify-content:flex-end; gap:8px; margin-top:.75rem; color:#475569; font-size:.82rem; }
.ekk-pager span { margin-right:auto; }

@media (max-width:767px) {
  .ekk-controls { justify-content:flex-start; margin-top:0; }
  .ekk-selection-bar { left:8px; right:8px; bottom:8px; transform:none; max-width:none; }
  .ekk-bar-actions { width:100%; margin-left:0; }
  .ekk-bar-actions .epl-btn { flex:1; justify-content:center; }
}
