/* CRM do super admin (crm.js): mesma paleta e superfícies do admin-portal, claro e escuro. */
.crm-actions{display:flex;flex-wrap:wrap;gap:8px}
.crm-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-4px 0 18px}
.crm-switch{display:inline-flex;gap:3px;padding:3px;border:1px solid var(--hub-border);border-radius:9px;background:var(--hub-surface)}
.crm-switch button{min-height:34px;padding:0 14px;border:0;border-radius:6px;background:transparent;color:var(--hub-muted);font:inherit;font-size:13px;font-weight:650;cursor:pointer;transition:background-color 160ms ease,color 160ms ease}
.crm-switch button[aria-selected="true"]{background:var(--hub-selected);color:var(--hub-text)}
.crm-switch button:hover{color:var(--hub-text)}
.crm-switch button:focus-visible,.crm-card-name:focus-visible,.crm-move select:focus-visible{outline:2px solid var(--hub-accent);outline-offset:2px}
.crm-updated{font-size:12px;color:var(--hub-muted)}
.crm-board{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(220px,1fr);gap:12px;overflow-x:auto;padding-bottom:12px;scroll-snap-type:x proximity;align-items:start}
.crm-board>.loading-card,.crm-board>.empty-state{grid-column:1/-1}
.crm-column{display:flex;flex-direction:column;min-height:180px;max-height:calc(100vh - 230px);border:1px solid var(--hub-border);border-radius:12px;background:var(--hub-surface-alt);scroll-snap-align:start;transition:border-color 160ms ease,background-color 160ms ease}
.crm-column.is-over{border-color:var(--stage);background:color-mix(in srgb,var(--stage) 8%,var(--hub-surface-alt))}
.crm-column header{display:flex;align-items:center;gap:8px;padding:12px 14px;border-bottom:1px solid var(--hub-border)}
.crm-column h2{margin:0;font-size:13px;font-weight:700;letter-spacing:-.01em;color:var(--hub-text)}
.crm-dot{width:8px;height:8px;border-radius:50%;background:var(--stage);flex-shrink:0}
.crm-count{margin-left:auto;min-width:22px;padding:1px 7px;border-radius:999px;background:var(--hub-surface);color:var(--hub-muted);font-size:11px;font-weight:700;text-align:center;font-variant-numeric:tabular-nums}
.crm-cards{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin:0;padding:10px;list-style:none;overflow-y:auto}
.crm-empty{padding:18px 8px;color:var(--hub-muted);font-size:12px;text-align:center}
.crm-card{display:grid;grid-template-columns:minmax(0,1fr);min-width:0;gap:6px;padding:12px;cursor:pointer;border:1px solid var(--hub-border);border-left:3px solid var(--stage);border-radius:9px;background:var(--hub-surface);cursor:grab;transition:box-shadow 160ms ease,opacity 160ms ease,transform 160ms ease}
.crm-card:hover{box-shadow:0 6px 18px var(--hub-shadow-color)}
.crm-card.is-dragging{opacity:.45;cursor:grabbing}
.crm-card.is-saving{opacity:.7}
.crm-card-head{display:flex;align-items:center;gap:8px}
.crm-card-name{min-width:0;overflow:hidden;color:var(--hub-text);font-size:13px;font-weight:700;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}
.crm-card-name:hover{text-decoration:underline}
.crm-unread{margin-left:auto;min-width:20px;padding:1px 6px;border-radius:999px;background:var(--hub-accent);color:var(--hub-on-accent);font-size:11px;font-weight:800;text-align:center}
.crm-card-preview{margin:0;color:var(--hub-text);font-size:12px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.crm-card-you{color:var(--hub-muted)}
.crm-card-meta{margin:0;color:var(--hub-muted);font-size:11px;line-height:1.4;overflow-wrap:anywhere}
.crm-card-tags{display:flex;flex-wrap:wrap;gap:4px;margin:0}
.crm-card-tags span{padding:1px 7px;border-radius:999px;background:var(--hub-surface-alt);color:var(--hub-muted);font-size:10px;font-weight:650}
.crm-move{display:flex;align-items:center;gap:6px;color:var(--hub-muted);font-size:11px}
.crm-move select{flex:1;min-width:0;height:28px;padding:0 6px;border:1px solid var(--hub-border);border-radius:6px;background:var(--hub-input,var(--hub-surface));color:var(--hub-text);font:inherit;font-size:12px}
.crm-stages-dialog{width:min(520px,calc(100vw - 32px));padding:0;border:1px solid var(--hub-border);border-radius:14px;background:var(--hub-surface);color:var(--hub-text);box-shadow:0 24px 60px var(--hub-shadow-color)}
.crm-stages-dialog::backdrop{background:var(--hub-overlay,rgba(15,18,35,.6))}
.crm-stages-form{display:grid;gap:14px;padding:24px}
.crm-stages-form header h2{margin:0 0 6px;font-size:18px;letter-spacing:-.02em}
.crm-stages-form header p{margin:0;color:var(--hub-muted);font-size:13px;line-height:1.5}
.crm-stage-list{display:grid;gap:8px;margin:0;padding:0;list-style:none;max-height:50vh;overflow-y:auto}
.crm-stage-list li{display:flex;align-items:center;gap:8px}
.crm-stage-color{width:36px;height:36px;padding:2px;border:1px solid var(--hub-border);border-radius:8px;background:var(--hub-surface);cursor:pointer}
.crm-stage-title{flex:1;min-width:0;height:36px;padding:0 10px;border:1px solid var(--hub-border);border-radius:8px;background:var(--hub-input,var(--hub-surface));color:var(--hub-text);font:inherit;font-size:13px}
.crm-stage-tools{display:flex;gap:4px}
.crm-stage-tools button{width:32px;height:32px;border:1px solid var(--hub-border);border-radius:7px;background:var(--hub-surface);color:var(--hub-muted);font:inherit;cursor:pointer}
.crm-stage-tools button:hover:not(:disabled){color:var(--hub-text);background:var(--hub-surface-alt)}
.crm-stage-tools button:disabled{opacity:.35;cursor:default}
.crm-stage-tools [data-remove]:hover:not(:disabled){color:var(--hub-danger)}
.crm-stage-add{justify-self:start}
.crm-stage-error{margin:0;min-height:1em;color:var(--hub-danger);font-size:12px}
.crm-stages-form footer{display:flex;justify-content:flex-end;gap:8px}
@media (max-width:760px){.crm-toolbar{flex-direction:column;align-items:flex-start}.crm-board{grid-auto-columns:minmax(78vw,1fr)}.crm-column{max-height:none}}
@media (prefers-reduced-motion:reduce){.crm-card,.crm-column,.crm-switch button{transition:none}}
.crm-channel{display:inline-flex;align-items:center;gap:5px;justify-self:start;max-width:100%;padding:2px 8px;border-radius:999px;background:var(--hub-surface-alt);color:var(--hub-muted);font-size:11px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crm-channel svg{flex-shrink:0}
.crm-channel.is-whatsapp{background:color-mix(in srgb,#22c55e 14%,var(--hub-surface-alt));color:#16a34a}
.crm-channel.is-email{background:color-mix(in srgb,#3b82f6 14%,var(--hub-surface-alt));color:#3b82f6}
.crm-thread{position:fixed;inset:0 0 0 auto;width:min(1180px,96vw);max-width:none;height:100dvh;max-height:none;margin:0;padding:0;border:0;border-left:1px solid var(--hub-border);background:var(--hub-surface);color:var(--hub-text);box-shadow:-24px 0 60px var(--hub-shadow-color);display:grid;grid-template-rows:auto 1fr}
.crm-thread:not([open]){display:none}
.crm-thread::backdrop{background:var(--hub-overlay,rgba(15,18,35,.5))}
.crm-thread-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;border-bottom:1px solid var(--hub-border)}
.crm-thread-head h2{margin:0 0 4px;font-size:16px;letter-spacing:-.01em}
.crm-thread-head p{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0}
.crm-thread-contact{color:var(--hub-muted);font-size:12px;overflow-wrap:anywhere}
.crm-thread-actions{display:flex;gap:8px;flex-shrink:0}
.crm-thread-frame{position:relative;min-height:0}
.crm-thread-frame iframe{display:block;width:100%;height:100%;border:0;background:var(--hub-surface)}
.crm-thread-loading{position:absolute;inset:0;display:grid;place-items:center;margin:0;color:var(--hub-muted);font-size:13px}
@media (max-width:760px){.crm-thread{width:100vw}.crm-thread-head{flex-direction:column;align-items:flex-start}}

