/* ================================================================
   MWA Dashboard — Action Center CSS (clean rewrite)
   ================================================================ */

/* ── Grid dos 3 cards de ação ── */
.block-mwa-dashboard-app .action-cards-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:18px 0 20px}

/* ── Cards de ação ── */
.block-mwa-dashboard-app .ac-card{background:linear-gradient(180deg,#fff,#fbfcff);border:1px solid var(--line);border-radius:24px;padding:20px 22px;box-shadow:var(--shadow);min-height:210px;display:flex;flex-direction:column;gap:12px;transition:transform .15s,box-shadow .15s,border-color .15s}
.block-mwa-dashboard-app .ac-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-hover)}
.block-mwa-dashboard-app .ac-card.urgent{border-top:3px solid var(--red)}
.block-mwa-dashboard-app .ac-card.attention{border-top:3px solid var(--amber)}
.block-mwa-dashboard-app .ac-card.opportunity{border-top:3px solid var(--blue)}
.block-mwa-dashboard-app .ac-badge-row{display:flex;align-items:center;gap:10px}
.block-mwa-dashboard-app .ac-badge{font-size:.68rem;font-weight:900;text-transform:uppercase;letter-spacing:.09em;padding:5px 10px;border-radius:999px}
.block-mwa-dashboard-app .ac-badge.urgent{background:var(--red-dim);color:var(--red)}
.block-mwa-dashboard-app .ac-badge.attention{background:var(--amber-dim);color:var(--amber)}
.block-mwa-dashboard-app .ac-badge.opportunity{background:var(--blue-dim);color:var(--blue)}
.block-mwa-dashboard-app .ac-time{font-size:.75rem;color:#8a94a8;font-weight:800}
.block-mwa-dashboard-app .ac-number{font-family:'DM Mono',ui-monospace,Menlo,Consolas,monospace;font-size:2.55rem;font-weight:900;line-height:1;letter-spacing:-.06em}
.block-mwa-dashboard-app .ac-number.urgent{color:var(--red)}
.block-mwa-dashboard-app .ac-number.attention{color:var(--amber)}
.block-mwa-dashboard-app .ac-number.opportunity{color:var(--blue);font-size:1.5rem;letter-spacing:-.03em}
.block-mwa-dashboard-app .ac-desc{font-size:.94rem;line-height:1.55;color:#33415c;min-height:46px}
.block-mwa-dashboard-app .ac-avatars{display:flex;gap:4px;align-items:center;margin:2px 0}
.block-mwa-dashboard-app .ac-av{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;color:#fff;background:var(--blue);font-size:.7rem;font-weight:900;box-shadow:0 4px 12px rgba(0,0,0,.12)}
.block-mwa-dashboard-app .ac-av.danger{background:var(--red)}
.block-mwa-dashboard-app .ac-av.warn{background:var(--amber)}
.block-mwa-dashboard-app .ac-av.good{background:var(--green)}
.block-mwa-dashboard-app .ac-av-more{background:#e8ecf5;color:#66708a}
.block-mwa-dashboard-app .ac-items{display:flex;flex-direction:column;gap:7px;margin:3px 0}
.block-mwa-dashboard-app .ac-item-row{display:flex;justify-content:space-between;gap:12px;font-size:.82rem}
.block-mwa-dashboard-app .ac-item-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#536078}
.block-mwa-dashboard-app .ac-item-val{font-weight:900;color:#121829}
.block-mwa-dashboard-app .ac-btn-row{margin-top:auto;display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center}
.block-mwa-dashboard-app .ac-btn-p,.block-mwa-dashboard-app .ac-btn-s{border:0;border-radius:14px;padding:12px 15px;font-weight:900;cursor:pointer;transition:transform .15s,box-shadow .15s}
.block-mwa-dashboard-app .ac-btn-p{background:linear-gradient(135deg,var(--blue2),var(--purple));color:#fff;box-shadow:0 8px 20px rgba(58,127,193,.18)}
.block-mwa-dashboard-app .ac-btn-s{background:#fff;border:1px solid var(--line2);color:#1e293b}
.block-mwa-dashboard-app .ac-btn-p:hover,.block-mwa-dashboard-app .ac-btn-s:hover{transform:translateY(-1px);box-shadow:var(--shadow-hover)}
.block-mwa-dashboard-app .ac-insight{background:#f5f7fc;border:1px solid var(--line);border-radius:14px;padding:10px 12px;color:#58627a;font-size:.82rem;line-height:1.45}

/* ── Avatares urgentes (expansíveis) ── */
.block-mwa-dashboard-app .ac-avatars-urgent{display:flex;flex-wrap:wrap;align-items:center;gap:4px;margin:2px 0}
.block-mwa-dashboard-app .ac-av-expand{cursor:pointer;background:#e8ecf5;color:var(--muted);transition:background .15s,color .15s}
.block-mwa-dashboard-app .ac-av-expand:hover{background:var(--red-dim);color:var(--red)}
.block-mwa-dashboard-app .ac-av-extra{display:none;flex-wrap:wrap;gap:4px;align-items:center;margin-top:2px}

/* ── Mini chart ── */
.block-mwa-dashboard-app .ac-chart-mini{height:54px;display:flex;align-items:flex-end;gap:3px;padding:5px 0}
.block-mwa-dashboard-app .ac-bar-mini{flex:1;background:#dbeafe;border-radius:4px 4px 0 0;min-height:4px}
.block-mwa-dashboard-app .ac-bar-mini.hi{background:var(--blue)}

/* ── Gauge / Engajamento ── */
.block-mwa-dashboard-app .gauge{width:240px;height:165px;position:relative;background:transparent!important;display:block;filter:none!important;border-radius:0!important}
.block-mwa-dashboard-app .gauge-inner{display:none!important}
.block-mwa-dashboard-app .gauge svg{width:240px;height:165px;overflow:visible;display:block}
.block-mwa-dashboard-app .gauge-track{fill:none;stroke:#edf1f8;stroke-width:18;stroke-linecap:round}
.block-mwa-dashboard-app .gauge-progress{fill:none;stroke:var(--gauge-color,var(--green));stroke-width:18;stroke-linecap:round;filter:drop-shadow(0 8px 18px rgba(58,171,122,.16));transition:stroke-dasharray .6s ease}
.block-mwa-dashboard-app .gauge-center-text{font-family:'DM Mono',ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-weight:900;font-size:24px;fill:#e4e8f0;letter-spacing:-1px}
.block-mwa-dashboard-app .engage{align-items:center;justify-content:center;gap:40px;min-height:275px}
.block-mwa-dashboard-app .gauge-num{font-size:4rem;line-height:.9}
.block-mwa-dashboard-app .gauge-label{font-size:1.05rem;margin-top:10px}

/* ── Grid prioridade: lista + card IA — SEMPRE lado a lado ── */
.block-mwa-dashboard-app .ac-priority-grid{display:grid;grid-template-columns:1fr 1fr;gap:28px;align-items:start}
.block-mwa-dashboard-app .ac-priority-grid .card{margin-bottom:0}
.block-mwa-dashboard-app .ac-priority-card,.block-mwa-dashboard-app .ac-ai-card{min-height:380px}

/* ── Lista de atenção (att-rows) ── */
.block-mwa-dashboard-app .att-row{display:flex;flex-wrap:nowrap;align-items:center;gap:10px;border:1px solid var(--line);background:#f7f9fd;border-radius:18px;padding:12px 14px;margin-bottom:10px;cursor:pointer;transition:background .12s}
.block-mwa-dashboard-app .att-row:hover{background:#f0f4ff}
.block-mwa-dashboard-app .att-row.selected{background:var(--blue-dim)!important;border-color:var(--blue)!important}
.block-mwa-dashboard-app .att-check{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:22px}
.block-mwa-dashboard-app .att-chk{width:16px;height:16px;cursor:pointer;accent-color:var(--blue)}
.block-mwa-dashboard-app .att-avatar{width:42px;height:42px;flex-shrink:0;border-radius:12px;display:grid;place-items:center;color:#fff;background:var(--blue);font-weight:900;font-size:13px}
.block-mwa-dashboard-app .att-avatar.danger{background:var(--red)}
.block-mwa-dashboard-app .att-avatar.warn{background:var(--amber)}
.block-mwa-dashboard-app .att-info{min-width:0;flex:1}
.block-mwa-dashboard-app .att-name{font-size:.94rem;font-weight:900;color:#111827;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.block-mwa-dashboard-app .att-sub{font-size:.8rem;color:#5f6a80;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.block-mwa-dashboard-app .att-risk-wrap{flex-shrink:0;display:flex;align-items:center;gap:8px;min-width:130px}
.block-mwa-dashboard-app .att-risk-label{font-size:.72rem;color:#6b7489;font-weight:800}
.block-mwa-dashboard-app .att-risk-bar{width:76px;height:6px;border-radius:999px;background:#e4e8f1;overflow:hidden}
.block-mwa-dashboard-app .att-risk-fill{height:100%;border-radius:999px;background:var(--blue)}
.block-mwa-dashboard-app .att-risk-fill.danger{background:var(--red)}
.block-mwa-dashboard-app .att-risk-fill.warn{background:var(--amber)}
.block-mwa-dashboard-app .att-badge{flex-shrink:0;font-size:.72rem;font-weight:900;border-radius:999px;padding:5px 9px;white-space:nowrap}
.block-mwa-dashboard-app .att-badge.high{background:#fdecec;color:#b42318}
.block-mwa-dashboard-app .att-badge.medium{background:#fff4df;color:#986014}
.block-mwa-dashboard-app .att-badge.low{background:#e8f7ef;color:#13794c}
.block-mwa-dashboard-app .att-open-btn{flex-shrink:0;background:#fff;border:1px solid var(--line2);border-radius:12px;padding:8px 12px;font-weight:900;cursor:pointer;white-space:nowrap}
.block-mwa-dashboard-app .att-open-btn:hover{border-color:var(--blue);color:var(--blue);background:var(--blue-dim)}

/* ── Painel de IA placeholder ── */
.block-mwa-dashboard-app .ai-placeholder{min-height:280px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#4b5871}
.block-mwa-dashboard-app .ai-placeholder .target{font-size:3rem;margin-bottom:18px}
.block-mwa-dashboard-app .ai-placeholder .line{width:64px;height:3px;background:#d9deea;margin:0 auto 34px;border-radius:99px}

/* ── Card de predição IA (rex-*) ── */
.block-mwa-dashboard-app .rex-wrap{display:block}
.block-mwa-dashboard-app .rex-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:.2rem}
.block-mwa-dashboard-app .rex-sub{font-size:.68rem;color:var(--muted)}
.block-mwa-dashboard-app .rex-sub strong{color:var(--text)}
.block-mwa-dashboard-app .rex-pct{font-family:'DM Mono',ui-monospace,monospace;font-size:.78rem;font-weight:700;padding:3px 9px;border-radius:99px}
.block-mwa-dashboard-app .rex-name{font-size:1.05rem;font-weight:700;letter-spacing:-.02em;margin:.3rem 0 1rem;color:var(--text)}
.block-mwa-dashboard-app .rex-factor{margin-bottom:.65rem}
.block-mwa-dashboard-app .rex-factor-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:.3rem}
.block-mwa-dashboard-app .rex-factor-label{font-size:.82rem;font-weight:600;color:var(--text)}
.block-mwa-dashboard-app .rex-factor-weight{font-size:.72rem;color:var(--muted)}
.block-mwa-dashboard-app .rex-bar{height:7px;background:#e8ecf5;border-radius:4px;overflow:hidden}
.block-mwa-dashboard-app .rex-bar-fill{height:100%;border-radius:4px;transition:width .6s cubic-bezier(.4,0,.2,1)}
.block-mwa-dashboard-app .rex-feedback-label{font-size:.72rem;color:var(--muted);margin-top:.85rem;margin-bottom:.4rem}
.block-mwa-dashboard-app .rex-feedback{display:flex;gap:.5rem}
.block-mwa-dashboard-app .rex-fb-btn{flex:1;background:#f5f7fc;border:1px solid var(--line2);border-radius:14px;padding:.55rem .5rem;font-family:inherit;font-size:.77rem;font-weight:600;color:var(--muted);cursor:pointer;transition:all .15s;text-align:center}
.block-mwa-dashboard-app .rex-fb-btn:hover{border-color:var(--blue);color:var(--text);background:var(--blue-dim)}
.block-mwa-dashboard-app .rex-fb-btn.voted{border-color:var(--green);color:var(--green);background:var(--green-dim)}
.block-mwa-dashboard-app .rex-feedback-hint{font-size:.65rem;color:var(--muted);margin-top:.4rem;text-align:center}
.block-mwa-dashboard-app .rex-spacer{display:none}
.block-mwa-dashboard-app .rex-email-btn{width:100%;margin-top:1rem;background:linear-gradient(135deg,var(--blue2),var(--purple));color:#fff;border:none;border-radius:14px;padding:.7rem;font-family:inherit;font-size:.82rem;font-weight:700;cursor:pointer;transition:all .2s;display:flex;align-items:center;justify-content:center;gap:.5rem}
.block-mwa-dashboard-app .rex-email-btn:hover{transform:translateY(-1px);box-shadow:0 4px 16px rgba(79,142,247,.3)}

/* ── Drill-down retenção ── */
.block-mwa-dashboard-app .mwa-ret-drill{position:fixed;inset:0;z-index:9100;background:rgba(0,0,0,.25);display:none;align-items:center;justify-content:center}
.block-mwa-dashboard-app .mwa-ret-drill-inner{background:#fff;border:1px solid var(--line);border-radius:20px;padding:1.1rem 1.3rem;min-width:300px;max-width:420px;box-shadow:0 12px 40px rgba(0,0,0,.18);animation:mwaFadeIn .15s ease}
.block-mwa-dashboard-app .mwa-ret-drill-head{display:flex;align-items:center;justify-content:space-between;font-size:.75rem;font-weight:700;color:var(--muted);letter-spacing:.05em;text-transform:uppercase;margin-bottom:.75rem}
.block-mwa-dashboard-app .mwa-ret-drill-head button{background:none;border:none;font-size:1rem;cursor:pointer;color:var(--muted);line-height:1;padding:0 4px}
.block-mwa-dashboard-app .mwa-ret-left{font-size:.75rem;color:var(--red);margin-bottom:.4rem;line-height:1.5}
.block-mwa-dashboard-app .mwa-ret-came{font-size:.75rem;color:var(--green);margin-bottom:.4rem;line-height:1.5}
.block-mwa-dashboard-app .mwa-ret-stayed{font-size:.75rem;color:var(--muted);line-height:1.5}

/* ── Toolbar de atenção ── */
.block-mwa-dashboard-app .ac-hero{margin-bottom:18px}
.block-mwa-dashboard-app .hero-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.block-mwa-dashboard-app .btn.small{padding:9px 13px;border-radius:12px;font-size:.84rem}
.block-mwa-dashboard-app .ac-list-head{align-items:center}
.block-mwa-dashboard-app .attention-panel-tools{display:flex;gap:8px}
.block-mwa-dashboard-app .ac-retention-card .card-body{padding:24px 28px 20px}

/* ── Ajustes visuais da página overview ── */
.block-mwa-dashboard-app #page-overview .grid2{gap:18px}
.block-mwa-dashboard-app #page-overview .grid2:not(.ac-priority-grid){margin-bottom:22px}
.block-mwa-dashboard-app #page-overview .card{border-radius:20px;margin-bottom:18px;box-shadow:0 1px 5px rgba(0,0,0,.05),0 5px 18px rgba(30,42,70,.06)}
.block-mwa-dashboard-app #page-overview .card-head{min-height:46px;padding:12px 18px;font-size:.74rem;background:#f6f8fc}
.block-mwa-dashboard-app #page-overview .card-body{padding:18px 20px}
.block-mwa-dashboard-app #page-overview .action-cards-row{gap:14px;margin:14px 0 18px}
.block-mwa-dashboard-app #page-overview .ac-card{min-height:178px;padding:16px 18px;border-radius:20px;gap:9px}
.block-mwa-dashboard-app #page-overview .ac-number{font-size:2.2rem}
.block-mwa-dashboard-app #page-overview .ac-desc{font-size:.86rem;min-height:38px}
.block-mwa-dashboard-app #page-overview .ac-btn-p,.block-mwa-dashboard-app #page-overview .ac-btn-s{padding:9px 12px;border-radius:12px;font-size:.82rem}
.block-mwa-dashboard-app #page-overview .engage{min-height:220px;gap:28px;justify-content:center}
.block-mwa-dashboard-app #page-overview .gauge{width:210px;height:138px}
.block-mwa-dashboard-app #page-overview .gauge svg{width:210px;height:138px}
.block-mwa-dashboard-app #page-overview .gauge-track,.block-mwa-dashboard-app #page-overview .gauge-progress{stroke-width:16}
.block-mwa-dashboard-app #page-overview .gauge-center-text{font-size:22px}
.block-mwa-dashboard-app #page-overview #engPct.gauge-num{font-size:3.25rem}
.block-mwa-dashboard-app #page-overview .gauge-label{font-size:.98rem;margin-top:6px}
.block-mwa-dashboard-app #page-overview .ac-priority-card,.block-mwa-dashboard-app #page-overview .ac-ai-card{min-height:320px}
.block-mwa-dashboard-app #page-overview .ac-retention-card{margin-bottom:18px}
.block-mwa-dashboard-app #page-overview #retentionChart{height:154px!important;max-height:154px!important}
.block-mwa-dashboard-app #page-overview #eventChart{height:210px!important;max-height:210px!important;width:100%!important}

/* ── Animação ── */
@keyframes mwaFadeIn{from{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}

/* ── Responsivo: colapsa SOMENTE o que não é ac-priority-grid ── */
@media(max-width:1100px){
  .block-mwa-dashboard-app .action-cards-row{grid-template-columns:1fr}
  .block-mwa-dashboard-app .grid2:not(.ac-priority-grid){grid-template-columns:1fr}
  .block-mwa-dashboard-app .attention-panel-tools{display:none}
}
@media(max-width:800px){
  .block-mwa-dashboard-app .ac-priority-grid{grid-template-columns:1fr}
}
.block-mwa-dashboard-app .att-see-all-btn{width:100%;margin-top:8px;background:#f5f7fc;border:1px solid var(--line2);border-radius:14px;padding:10px;font-family:inherit;font-size:.8rem;font-weight:800;color:var(--blue);cursor:pointer;transition:all .15s;text-align:center;}
.block-mwa-dashboard-app .att-see-all-btn:hover{background:var(--blue);color:#fff;}
