/* V156 — Módulo Campanhas */
.ch{display:flex;flex-direction:column;gap:16px;min-width:0}
.ch .card{margin:0}
.ch-muted{color:#6b7788;font-size:12.5px}
.ch-loading{padding:28px;text-align:center;color:#6b7788}
.ch-hero{display:flex;justify-content:space-between;gap:16px;align-items:center;flex-wrap:wrap;background:linear-gradient(135deg,#162545,#1c3260);color:#fff;border-radius:18px;padding:22px 26px}
.ch-hero small{color:#afc1e8;font-size:10.5px;font-weight:800;letter-spacing:.08em}
.ch-hero h2{margin:4px 0;font-size:22px;color:#fff}.ch-hero p{margin:0;color:#e2e8f4;font-size:13.5px;max-width:760px;line-height:1.5}
.ch-hero-actions{display:flex;gap:8px;flex-wrap:wrap}
.ch-hero-actions .secondary{background:#ffffff1f;color:#fff;border-color:#ffffff55}
.ch-tabs{display:flex;gap:6px;background:#fff;border:1px solid #d5dde7;border-radius:14px;padding:6px;width:max-content;max-width:100%}
.ch-tabs button{background:transparent;color:#334155;border:0;border-radius:10px;padding:10px 16px;font-weight:700;font-size:13px;cursor:pointer}
.ch-tabs button.on{background:#1a346b;color:#fff}
.ch-h{margin:0 0 6px;font-size:16px;color:#17324c}
.ch-empty{text-align:center;padding:30px}.ch-empty h2{margin:0 0 6px;color:#17324c}
.ch-types{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px 0}
.ch-types button{display:flex;flex-direction:column;align-items:center;gap:6px;background:#fff;border:1px solid #d5dde7;border-radius:14px;padding:16px;cursor:pointer;color:#17324c}
.ch-types button span{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;color:#fff;font-size:20px}
.ch-types button small{color:#6b7788}
.ch-types.sel button.on{border:2px solid #1a346b;background:#f1f5fc}
.ch-types button:disabled{cursor:default;opacity:.55}.ch-types.sel button.on:disabled{opacity:1}
.ch-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:14px}
.ch-camp{display:flex;flex-direction:column;gap:8px}
.ch-camp.off{opacity:.65}
.ch-camp-top{display:flex;justify-content:space-between;align-items:center}
.ch-badge{color:#fff;font-size:11.5px;font-weight:800;border-radius:20px;padding:4px 10px}
.ch-off{font-size:11px;font-weight:800;color:#b91c1c;background:#fee2e2;border-radius:10px;padding:2px 8px}
.ch-camp h3{margin:2px 0 0;font-size:17px;color:#17324c}.ch-camp p{margin:0;color:#6b7788;font-size:12.5px;min-height:16px}
.ch-camp-nums{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.ch-camp-nums div{background:#f7f9fb;border-radius:10px;padding:8px 10px}
.ch-camp-nums small{display:block;font-size:10.5px;font-weight:800;color:#6b7788;text-transform:uppercase}.ch-camp-nums b{font-size:14px;color:#17324c}
.ch-camp-layout{display:flex;flex-wrap:wrap;gap:5px;align-items:center}
.ch-camp-layout span{font-size:11px;font-family:ui-monospace,monospace;background:#eef2f6;border-radius:6px;padding:2px 6px;color:#334155}
.ch-camp-layout em{font-style:normal;font-size:10.5px;font-weight:800;color:#1a346b;margin-left:auto}
.ch-camp-act{display:flex;gap:6px;flex-wrap:wrap;margin-top:auto}
.ch-edit-head{display:flex;gap:12px;align-items:center}.ch-edit-head h2{margin:0;font-size:22px;color:#17324c}
.ch-form2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.ch-form4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:10px 0}
.ch-form2 label,.ch-form4 label,.ch-full{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:700;color:#516070}
.ch-full{margin-top:6px}
.ch-chk{flex-direction:row!important;align-items:center;gap:8px!important;font-size:13px!important;color:#17324c!important;align-self:end;padding-bottom:10px}
.ch-chk input{width:auto}
.ch-cols{display:flex;flex-direction:column;gap:6px;margin:10px 0}
.ch-col{display:grid;grid-template-columns:30px minmax(180px,1.2fr) minmax(150px,1fr) minmax(120px,.8fr) auto;gap:8px;align-items:center;background:#f7f9fb;border-radius:10px;padding:6px 8px}
.ch-col-n{width:26px;height:26px;border-radius:7px;background:#1a346b;color:#fff;display:grid;place-items:center;font-weight:800;font-size:12px}
.ch-col-act{display:flex;gap:4px}.ch-col-act button{padding:6px 10px}
.ch-col-act .danger{color:#b91c1c}
.ch-prev{margin-top:12px;background:#0f172a;color:#e2e8f0;border-radius:10px;padding:10px 14px}
.ch-prev small{display:block;color:#94a3b8;font-size:10.5px;font-weight:800;text-transform:uppercase;margin-bottom:4px}
.ch-prev code{font-size:12.5px;white-space:pre-wrap;word-break:break-word}
.ch-vars{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}.ch-vars button{font-family:ui-monospace,monospace;font-size:12px;padding:5px 9px}
#chMsg{width:100%}
.ch-save{display:flex;gap:12px;align-items:center;margin-top:6px}
.ch-filters{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}
.ch-filters label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:700;color:#516070}
.ch-live{margin-left:auto;font-size:12px;color:#6b7788;display:flex;align-items:center;gap:6px}
.ch-live i{width:8px;height:8px;border-radius:50%;background:#16a34a;box-shadow:0 0 0 0 #16a34a88;animation:chpulse 2s infinite}
@keyframes chpulse{0%{box-shadow:0 0 0 0 #16a34a88}70%{box-shadow:0 0 0 8px #16a34a00}100%{box-shadow:0 0 0 0 #16a34a00}}
.ch-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
.ch-kpis>div{background:#fff;border:1px solid #d5dde7;border-radius:14px;padding:14px 16px;min-width:0}
.ch-kpis small{display:block;font-size:11px;font-weight:800;color:#6b7788;text-transform:uppercase;letter-spacing:.04em}
.ch-kpis b{display:block;font-size:22px;color:#17324c;margin:3px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ch-kpis span{font-size:12px;color:#6b7788}
.ch-kpis .b b{color:#0369a1}.ch-kpis .g b{color:#15803d}
.ch-chgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.ch-chgrid article{display:flex;flex-direction:column;gap:5px}
.ch-chgrid small{font-size:12px;font-weight:800;color:#334155}.ch-chgrid b{font-size:18px;color:#17324c}.ch-chgrid span{font-size:12px;color:#6b7788}
.ch-bar{height:7px;background:#eef2f6;border-radius:5px;overflow:hidden}.ch-bar i{display:block;height:100%}
.ch-two{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:16px;align-items:start}
.ch-two>div{display:flex;flex-direction:column;gap:16px;min-width:0}
.ch-table td small{display:block;color:#6b7788;font-size:11px}
.ch-table th.r,.ch-table td.r{text-align:right;white-space:nowrap}
.ch-table{min-width:900px}
.ch-dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:6px}
.ch-livebadge{margin-left:6px;font-size:10px;font-weight:800;color:#15803d;background:#dcfce7;border-radius:8px;padding:1px 6px;text-transform:uppercase}
.ch-res{display:flex;flex-wrap:wrap;gap:4px;max-width:280px}
.ch-res span{font-size:11px;background:#f1f5f9;border-radius:8px;padding:2px 7px;color:#334155;white-space:nowrap}
.ch-resbars{display:flex;flex-direction:column;gap:6px}
.ch-resbars div{display:grid;grid-template-columns:200px 1fr 60px;gap:10px;align-items:center;font-size:13px}
.ch-resbars i{height:10px;background:#eef2f6;border-radius:6px;overflow:hidden}.ch-resbars em{display:block;height:100%;background:#1a346b}
.ch-resbars b{text-align:right}
.ch-feed{max-height:900px;overflow:auto}
.ch-fi{display:grid;grid-template-columns:auto 1fr auto;gap:8px;padding:9px 0;border-top:1px solid #eef2f5;align-items:start}
.ch-fi .ch-dot{margin-top:6px}
.ch-fi b{font-size:13px;color:#17324c}.ch-fi small{color:#94a3b8;font-size:11px}
.ch-fi p{margin:2px 0;font-size:12px;color:#475569}.ch-fi strong{color:#1a346b}
.ch-fi em{font-style:normal;font-size:11.5px;color:#6b7788;display:block}
.ch-fi time{font-size:11px;color:#6b7788;white-space:nowrap}
.cw-camp-btn{background:linear-gradient(135deg,#f59e0b,#ea580c)!important;color:#fff!important;border:0!important;font-weight:800}
.ch-modal{position:fixed;inset:0;background:#0f172a88;z-index:1000;display:grid;place-items:center;padding:20px}
.ch-mbox{background:#fff;border-radius:18px;width:min(920px,100%);max-height:92vh;overflow:auto;box-shadow:0 30px 80px #0006}
.ch-mhead{display:flex;justify-content:space-between;align-items:center;padding:16px 22px;border-bottom:1px solid #eef2f5;position:sticky;top:0;background:#fff;z-index:2}
.ch-mhead h2{margin:0;font-size:19px;color:#17324c}
.ch-mbody{padding:18px 22px}
.ch-sel{font-size:14px;color:#334155;background:#f1f5fc;border-radius:10px;padding:10px 14px;margin:0 0 14px}
.ch-pick{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px;margin:8px 0 16px}
.ch-pick button{display:flex;gap:10px;align-items:center;text-align:left;background:#fff;border:1px solid #d5dde7;border-radius:12px;padding:10px 12px;cursor:pointer;color:#17324c}
.ch-pick button.on{border:2px solid #1a346b;background:#f1f5fc}
.ch-pick span{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;color:#fff;flex:0 0 auto}
.ch-pick small{display:block;color:#6b7788;font-size:11.5px}
.ch-funnel{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.ch-funnel>div{flex:1;min-width:150px;background:#f7f9fb;border-radius:12px;padding:10px 14px}
.ch-funnel>span{color:#94a3b8;font-size:20px}
.ch-funnel small{display:block;font-size:11px;font-weight:800;color:#6b7788;text-transform:uppercase}
.ch-funnel b{font-size:22px;color:#17324c}.ch-funnel .r b{color:#b91c1c}.ch-funnel .g b{color:#15803d}
.ch-funnel em{display:block;font-style:normal;font-size:11.5px;color:#6b7788}
.ch-ex{list-style:none;padding:0;margin:0 0 12px;display:flex;flex-direction:column;gap:4px}
.ch-ex li{display:flex;justify-content:space-between;font-size:13px;background:#fff8f8;border-radius:8px;padding:6px 12px;color:#7f1d1d}
.ch-sample table{min-width:0}.ch-sample td{font-size:12px;max-width:340px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ch-done b{font-size:18px;color:#15803d}.ch-done p{color:#334155}
.ch-banner{display:flex;gap:12px;align-items:center;background:linear-gradient(135deg,#fff7ed,#ffedd5);border:1px solid #fdba74;border-radius:14px;padding:10px 16px;margin-bottom:12px}
.ch-banner span{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;color:#fff;flex:0 0 auto}
.ch-banner b{display:block;color:#7c2d12}.ch-banner small{color:#9a3412}
@media(max-width:1200px){.ch-two{grid-template-columns:1fr}.ch-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.ch-form4{grid-template-columns:repeat(2,minmax(0,1fr))}.ch-types{grid-template-columns:repeat(2,minmax(0,1fr))}}
.ch-feed{max-height:640px}
.ch-table td{vertical-align:top}
.ch-table td:nth-child(2){min-width:220px}
/* V157 — Importação: histórico recolhido no fim da tela */
.import-history-wrap{margin-top:18px}
.import-history-wrap>summary{cursor:pointer;font-weight:800;color:#1a346b;background:#fff;border:1px solid #d5dde7;border-radius:12px;padding:12px 16px;list-style:none}
.import-history-wrap>summary::before{content:'▸ ';}
.import-history-wrap[open]>summary::before{content:'▾ ';}
.import-history-wrap[open]>summary{margin-bottom:12px}
.import-history-wrap .import-history{max-height:560px;overflow:auto}
/* V159 — formato do telefone */
.ch-phonefmt{display:flex;flex-wrap:wrap;gap:6px 22px;align-items:center;background:#f1f5fc;border:1px solid #a3baec;border-radius:12px;padding:10px 14px;margin:4px 0 10px}
.ch-phonefmt>b{font-size:13px;color:#162545;width:100%}
.ch-phonefmt .ch-chk{padding-bottom:0;align-self:center}
.ch-ex-phone{font-size:12px;color:#475569;width:100%}
.ch-ex-phone code{background:#fff;border-radius:5px;padding:1px 5px}
/* V160 — cancelar geração */
.ch-actcell{white-space:nowrap}.ch-actcell button{margin-left:4px}
.ch-cancel{color:#b91c1c!important}
.ch-msmall{width:min(560px,100%)}
.ch-cancel-list{margin:6px 0 10px;padding-left:20px;color:#334155;font-size:13.5px;line-height:1.6}
.ch-warn{background:#fffaf0;border:1px solid #f5c27a;color:#7c4a03;border-radius:10px;padding:8px 12px;font-size:13px}
.ch-danger{background:#b91c1c!important;border-color:#b91c1c!important;color:#fff!important}
.ch-canceled{opacity:.9}
.ch-ex li span small{display:block;color:#9f4a4a;font-size:11.5px;margin-top:2px;line-height:1.35}
.ch-ex li{align-items:flex-start;gap:12px}
