/* Plataforma de e-mail (frente 3: campanhas, sequências e relatórios) — 01/12/2026 */
.em > .card + .card, .em > .card + .em-two, .em > .em-two + .card, .em > .kpis + .card, .em > .tiny + .card, .em > .hint + .card,
.em-body > .card + .card, .em-body > .kpis + .card, .em-body > .em-tools + .card { margin-top: 14px; }
.em > .warnbox, .em > .hint { margin-bottom: 12px; }
.em .nowrap { white-space: nowrap; }
.em .b { font-weight: 700; }

/* resumo do topo */
.em-sums { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 14px; }
.em-sum { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r2); padding: 12px 14px; color: var(--text); text-decoration: none; box-shadow: var(--shadow-sm); min-width: 0; }
a.em-sum:hover { border-color: var(--line2); }
.em-sum .l { font-size: 12px; color: var(--muted); font-weight: 600; }
.em-sum .v { font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.em-sum .v span { font-size: 13px; font-weight: 600; color: var(--muted); font-family: var(--font); letter-spacing: 0; }
.em-sum .v.sm { font-size: 15px; }
.em-sum .s { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.em-sum.ok .v { color: var(--green); }
.em-sum.warn { border-color: color-mix(in srgb, var(--amber) 45%, var(--line)); background: color-mix(in srgb, var(--amber) 6%, var(--panel)); }
.em-sum.warn .v { color: var(--amber); }
.em .meter, .em-quota .meter { height: 6px; border-radius: 6px; background: var(--hover); overflow: hidden; margin-top: 8px; }
.em .meter i { display: block; height: 100%; background: var(--brand); border-radius: 6px; }
.em-paused { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 10px; }
.em-tabs { margin-bottom: 14px; }
.em-tabs button svg.i { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }
.em-tools { gap: 10px; margin-bottom: 12px; align-items: center; }
.em-empty .empty { padding: 34px 12px; }
.em-tbl td { vertical-align: middle; }
.em-tbl td .ell { max-width: 420px; }

/* campanha em passos */
.em-wiz-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.em-name { font-family: var(--display); font-size: 20px; font-weight: 800; letter-spacing: -.02em; border: 1px solid transparent; background: transparent; padding: 4px 8px; border-radius: 8px; min-width: 200px; flex: 1 1 260px; max-width: 560px; color: var(--text); }
.em-name:hover, .em-name:focus { border-color: var(--line2); background: var(--panel); outline: none; }
.em-title { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.em-steps { list-style: none; margin: 0 0 16px; padding: 0; display: flex; gap: 6px; overflow-x: auto; }
.em-steps li { flex: 1 1 0; min-width: 150px; }
.em-steps a { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-weight: 600; font-size: 13px; text-decoration: none; height: 100%; }
.em-steps .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--hover); color: var(--muted); font-size: 12px; font-weight: 700; flex: none; }
.em-steps .n svg.i { width: 13px; height: 13px; }
.em-steps li.on a { border-color: var(--brand); color: var(--text); box-shadow: 0 0 0 3px var(--brand-ring); }
.em-steps li.on .n { background: var(--brand); color: #fff; }
.em-steps li.done .n { background: var(--green-bg); color: var(--green); }
.em-wbody { min-height: 300px; }
.em-wiz-foot { position: sticky; bottom: 0; display: flex; align-items: center; gap: 8px; margin-top: 18px; padding: 12px 0; background: linear-gradient(to top, var(--bg) 70%, transparent); z-index: 3; }
.em-two { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.em-two-r { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.em-two-m { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.em-side { gap: 14px; position: sticky; top: 12px; }
.em-filters { gap: 14px; }
.em-filters details { border-top: 1px solid var(--line); padding: 8px 0; }
.em-filters details summary { cursor: pointer; font-weight: 600; color: var(--text2); }
.em-ck { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; max-height: 180px; overflow: auto; }
.em-pipe { margin-top: 8px; }
.em-frow { gap: 6px; margin: 6px 0; align-items: center; flex-wrap: wrap; }
.em-frow select, .em-frow input { flex: 1 1 140px; min-width: 0; }
.em-count .big { font-family: var(--display); font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 6px 0 4px; color: var(--brand2); }
.em-count .big span { font-size: 15px; color: var(--muted); font-weight: 600; letter-spacing: 0; font-family: var(--font); }
.em-person, .em-mail { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); min-width: 0; }
.em-person .av, .em-mail .av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-bg); color: var(--brand2); font-weight: 700; font-size: 13px; flex: none; }
.em-mail { padding: 10px 0; }
.em-mail:first-child { border-top: 0; }
.em-mail > div { flex: 1; min-width: 0; }
.em-inbox { border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--panel2); }

/* conteúdo */
.em-h { margin: 4px 0 14px; font-size: 16px; }
.em-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.em-card { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--r2); border: 1px solid var(--line); background: var(--panel); cursor: pointer; color: var(--text); font: inherit; box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s; }
.em-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.em-card svg.i { width: 26px; height: 26px; color: var(--brand2); }
.em-card b { font-size: 15px; }
.em-card span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.em-pbox { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #f3f4f7; transition: max-width .2s; margin: 0 auto; width: 100%; }
.em-pbox.mob { max-width: 390px; }
.em-frame { display: block; width: 100%; height: 620px; border: 0; background: #fff; }
.em-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); cursor: pointer; color: var(--text); font: inherit; }
.em-pick:hover { border-color: var(--brand); }
.em-inrow { display: flex; gap: 6px; align-items: center; }
.em-inrow input { flex: 1; min-width: 0; }
.em-sug { border: 1px dashed var(--brand-line); background: var(--brand-bg); color: var(--text); border-radius: 8px; padding: 5px 10px; font: inherit; font-size: 12.5px; cursor: pointer; text-align: left; }
.em-sug:hover { border-style: solid; }

/* revisar */
.em-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; font-size: 13.5px; }
.em-kv > span { color: var(--muted); }
.em-kv > b { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.em-check { list-style: none; margin: 0; padding: 0; }
.em-check li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.em-check li:first-child { border-top: 0; }
.em-check li > div { flex: 1; min-width: 0; }
.em-check li > svg.i { flex: none; margin-top: 2px; }
.em-check li.ok > svg.i { color: var(--green); }
.em-check li.no > svg.i { color: var(--amber); }
.btn.big { height: 46px; font-size: 15px; font-weight: 700; border-radius: 11px; }
.em-go input[type=datetime-local] { max-width: 230px; }

/* relatórios */
.em-kpis { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.em-chart { width: 100%; height: auto; display: block; }
.em-chart rect.o { fill: color-mix(in srgb, var(--brand) 35%, var(--panel)); }
.em-chart rect.c { fill: var(--brand); }
.em-chart .ax { stroke: var(--line2); stroke-width: 1; }
.em-chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.em-legend { display: flex; gap: 16px; font-size: 12px; color: var(--text2); margin-top: 8px; flex-wrap: wrap; }
.em-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.em-legend i.o { background: color-mix(in srgb, var(--brand) 35%, var(--panel)); }
.em-legend i.c { background: var(--brand); }
.em-ab { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.em-abcol { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.em-abcol.win { border-color: color-mix(in srgb, var(--green) 55%, var(--line)); background: color-mix(in srgb, var(--green) 5%, var(--panel)); }
.em-rhead { gap: 10px; padding: 14px 16px; align-items: center; }
.em-pg { gap: 10px; justify-content: center; padding: 10px; }
.em-days { display: flex; align-items: flex-end; gap: 3px; height: 170px; padding-top: 8px; overflow-x: auto; }
.em-day { flex: 1 0 14px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.em-day i { display: block; width: 70%; background: color-mix(in srgb, var(--brand) 35%, var(--panel)); border-radius: 3px 3px 0 0; }
.em-day b { position: absolute; bottom: 18px; width: 70%; background: var(--brand); border-radius: 3px 3px 0 0; }
.em-day i { margin-bottom: 18px; }
.em-day span { position: absolute; bottom: 0; font-size: 10px; color: var(--muted); white-space: nowrap; }

/* sequências */
.em-flows { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.em-flow { cursor: pointer; }
.em-flow:hover { border-color: var(--line2); }
.em-kv3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 8px; }
.em-kv3 > div { display: flex; flex-direction: column; }
.em-kv3 b { font-family: var(--display); font-size: 20px; font-weight: 800; }
.em-kv3 span { font-size: 11.5px; color: var(--muted); }
.em-flgrid { grid-template-columns: minmax(0, 1fr) 330px; }
.em-canvas { display: flex; flex-direction: column; align-items: stretch; max-width: 720px; }
.em-trigger { border-color: var(--brand-line); background: color-mix(in srgb, var(--brand) 4%, var(--panel)); }
.em-trigger .ic, .em-step .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-bg); color: var(--brand2); flex: none; }
.em-step { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow-sm); cursor: pointer; min-width: 0; }
.em-step:hover { border-color: var(--line2); }
.em-step.t-wait { background: var(--panel2); }
.em-step.t-wait .ic { background: var(--hover); color: var(--muted); }
.em-step.t-condition .ic { background: var(--purple-bg); color: var(--purple); }
.em-step.t-move .ic, .em-step.t-tag .ic, .em-step.t-task .ic, .em-step.t-notify .ic { background: var(--green-bg); color: var(--green); }
.em-sm { font-size: 12px; color: var(--muted); margin-top: 2px; }
.em-now { border: 0; background: var(--amber-bg); color: var(--amber); font-weight: 700; font-size: 11.5px; border-radius: 20px; padding: 3px 9px; cursor: pointer; white-space: nowrap; }
.em-stepbtns { display: flex; gap: 2px; }
.em-stepbtns [data-up] svg.i { transform: rotate(90deg); }
.em-add, .em-line { align-self: center; position: relative; }
.em-add { width: 26px; height: 26px; border-radius: 50%; border: 1px dashed var(--line2); background: var(--panel); color: var(--muted); display: grid; place-items: center; cursor: pointer; margin: 8px 0; }
.em-add:hover { border-style: solid; border-color: var(--brand); color: var(--brand2); }
.em-add::before, .em-add::after, .em-line { content: ''; }
.em-add::before { position: absolute; left: 50%; top: -9px; height: 8px; border-left: 2px solid var(--line); }
.em-add::after { position: absolute; left: 50%; bottom: -9px; height: 8px; border-left: 2px solid var(--line); }
.em-line { height: 18px; border-left: 2px solid var(--line); }
.em-branches { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.em-br { border: 1px dashed var(--line2); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; min-width: 0; }
.em-br.yes { border-color: color-mix(in srgb, var(--green) 45%, var(--line)); }
.em-br.no { border-color: color-mix(in srgb, var(--red) 35%, var(--line)); }
.em-brl { font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.em-br.yes .em-brl { color: var(--green); } .em-br.no .em-brl { color: var(--red2); }
.em-brend { font-size: 11px; color: var(--faint); text-align: center; margin-top: 2px; }
.em-br .em-step { padding: 10px; gap: 8px; }
.em-end { align-self: center; display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--hover); border-radius: 20px; padding: 6px 14px; margin-top: 2px; }

@media (max-width: 1100px) {
  .em-two, .em-two-r, .em-flgrid { grid-template-columns: minmax(0, 1fr); }
  .em-side { position: static; }
}
@media (max-width: 820px) {
  .em-two-m, .em-branches, .em-ab { grid-template-columns: minmax(0, 1fr); }
  .em-steps li { min-width: 120px; }
  .em-steps a span:last-child { white-space: nowrap; }
  .em-frame { height: 520px; }
  .em-name { font-size: 17px; min-width: 0; }
  .em-wiz-foot .btn { padding: 0 10px; }
}
.em-when { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.em-when input[type=datetime-local] { width: auto; min-width: 210px; }
