
/* M1b: página Campanhas. Uma só tabela (table-layout fixed), cabeçalho, colunas Nome/seleção e total fixos (sticky). Números alinhados à direita com algarismos tabulares. */
#cmRoot { max-width: none; }
.cm-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.cm-f { display: flex; flex-direction: column; gap: 4px; min-width: 130px; } .cm-f label { font-size: 12px; color: #919eab; }
.cm-grow { flex: 1 1 200px; } .cm-act { flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; }
.cm-dates { display: flex; gap: 6px; } .cm-ftog { display: none; }
.cm-empty-td { padding: 28px 16px; text-align: center; color: #9ca3af; font-size: 14px; }
.cm-tabs { display: flex; gap: 4px; margin-top: 14px; border-bottom: 1px solid #262626; }
.cm-tab { min-height: 44px; padding: 0 18px; background: none; border: 0; border-bottom: 2px solid transparent; color: #919eab; font: inherit; font-size: 14px; cursor: pointer; }
.cm-tab.on { color: #B8F6FD; border-bottom-color: #B8F6FD; font-weight: 600; }
.cm-bc { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 12px; font-size: 14px; } .cm-bc:empty { display: none; }
.cm-crumb { background: none; border: 0; color: #B8F6FD; font: inherit; cursor: pointer; padding: 6px 4px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cm-crumb.cur { color: #fff; cursor: default; } .cm-sep { color: #6b7280; }
.cm-banner { background: rgba(184,246,253,.08); color: #B8F6FD; border-radius: 6px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px; } .cm-note:empty { display: none; }
.cm-q .mx-link { background: none; border: 0; padding: 0; min-height: 44px; font: inherit; font-weight: 600; color: #B8F6FD; text-decoration: underline; cursor: pointer; }   .cm-q a { color: #B8F6FD; }
.cm-empty { text-align: center; padding: 40px 20px; }
.cm-bulk { align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: #1a1a1a; border-radius: 6px; padding: 10px 16px; margin-bottom: 12px; color: #fff; font-size: 14px; } .cm-bulk-a { display: flex; gap: 8px; flex-wrap: wrap; }
.cm-wrap { background: #1a1a1a; border-radius: 6px; overflow: hidden; }
.cm-scroll { overflow: auto; max-height: calc(100vh - 330px); min-height: 260px; position: relative; overscroll-behavior: contain; transition: opacity .15s; } .cm-scroll.cm-dim { opacity: .6; } .cm-scroll:focus-visible { outline: 2px solid #B8F6FD; outline-offset: -2px; }
.cm-tbl { border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 13px; color: #fff; font-variant-numeric: tabular-nums; }
.cm-tbl th, .cm-tbl td { height: 46px; padding: 0 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-sizing: border-box; border-bottom: 1px solid #262626; background: #1a1a1a; }
.cm-tbl th.cm-th { position: sticky; top: 0; z-index: 3; background: #1f1f1f; height: 44px; text-align: left; font-size: 12.5px; font-weight: 600; color: #fff; text-transform: uppercase; letter-spacing: .03em; cursor: pointer; user-select: none; padding-right: 18px; }
.cm-tbl th.cm-th:focus-visible { outline: 2px solid #B8F6FD; outline-offset: -2px; } .cm-tbl th.cm-r { text-align: right; } .cm-tbl td.cm-r { text-align: right; }
.cm-lbl { overflow: hidden; text-overflow: ellipsis; } .cm-arr { font-size: 9px; margin-left: 4px; color: #B8F6FD; }
.cm-rs { position: absolute; top: 0; right: 0; width: 8px; height: 100%; cursor: col-resize; } .cm-rs::after { content: ''; position: absolute; right: 3px; top: 25%; height: 50%; width: 1px; background: #3a3a3a; } .cm-rs:hover::after { background: #B8F6FD; }
.cm-s0, .cm-s1, .cm-s2 { position: sticky; z-index: 2; } .cm-tbl th.cm-s0, .cm-tbl th.cm-s1, .cm-tbl th.cm-s2 { z-index: 5; background: #1f1f1f; } .cm-tbl .cm-s2 { box-shadow: 1px 0 0 #2a2a2a, 8px 0 10px -8px rgba(0,0,0,.7); } .cm-neg { color: #f87171; } .cm-pos { color: #10b981; }
.cm-tbl th, .cm-tbl td { border-right: 1px solid rgba(255,255,255,.09); } .cm-rs::after { background: transparent; } .cm-rs:hover::after { background: #B8F6FD; }
.cm-tbl td.cm-mini-td { padding-top: 0; padding-bottom: 0; white-space: normal; } .cm-mini { white-space: normal; font-size: 11px; line-height: 15px; text-align: left; color: #d1d5db; } .cm-mini-l b { font-weight: 700; color: #fff; } .cm-mini-t { display: flex; align-items: center; gap: 5px; color: #919eab; } .cm-clk { flex: 0 0 auto; }
.cm-tbl tfoot td { padding-top: 2px; padding-bottom: 2px; } .cm-bt { line-height: 1.25; } .cm-bt-m { font-size: 13px; font-weight: 700; } .cm-bt-s { font-size: 11px; font-weight: 400; color: #919eab; } .cm-bt .cm-bk { margin-left: 0; }
.cm-tbl tfoot td { position: sticky; bottom: 0; z-index: 3; background: #1f1f1f; font-weight: 700; border-top: 1px solid #333; border-bottom: 0; } .cm-tbl tfoot td.cm-s0, .cm-tbl tfoot td.cm-s1, .cm-tbl tfoot td.cm-s2 { z-index: 5; }
.cm-tr:hover td { background: #202020; } .cm-tr.sel td { background: #1d2a30; } .cm-un td { color: #919eab; font-style: italic; } .cm-sp td { padding: 0; border: 0; }
.cm-cb { width: 18px; height: 18px; accent-color: #B8F6FD; cursor: pointer; vertical-align: middle; }
.cm-name { display: flex; align-items: center; gap: 6px; min-width: 0; } .cm-name > span, .cm-link { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-link { background: none; border: 0; padding: 0; font: inherit; color: #fff; text-align: left; cursor: pointer; } .cm-link:hover { color: #B8F6FD; text-decoration: underline; }
.cm-mn { flex: 0 0 auto; width: 32px; height: 32px; border: 0; border-radius: 6px; background: transparent; color: #919eab; font-size: 18px; cursor: pointer; } .cm-mn:hover, .cm-mn:focus-visible { background: #2a2a2a; color: #fff; }
.cm-st { display: flex; align-items: center; gap: 10px; min-width: 0; } .cm-trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } .cm-trunc.ok { color: #10b981; } .cm-trunc.bad { color: #f87171; }
.cm-sw { flex: 0 0 auto; position: relative; width: 36px; height: 20px; border: 0; border-radius: 10px; background: #3a3a3a; cursor: pointer; padding: 0; } .cm-sw::before { content: ''; position: absolute; inset: -12px -4px; } .cm-sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .12s; } .cm-sw.on { background: #10b981; } .cm-sw.on::after { left: 18px; } .cm-sw:focus-visible { outline: 2px solid #B8F6FD; outline-offset: 2px; } .cm-sw-x { width: 36px; height: 20px; flex: 0 0 auto; position: relative; border-radius: 10px; background: #262626; } .cm-sw-x::after { content: ''; position: absolute; top: 4px; left: 12px; width: 12px; height: 12px; border-radius: 50%; background: #f5b84a; } .cm-sw-x.bad::after { background: #f87171; } .cm-sw-x.muted::after { background: #6b7280; } .cm-tbl th.cm-lit { text-transform: none; }
.cm-pen { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; width: 28px; height: 28px; margin-left: 0; margin-right: 4px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #919eab; cursor: pointer; } .cm-pen:hover { background: rgba(255,255,255,.08); color: #fff; } .cm-pen:focus-visible { outline: 2px solid #B8F6FD; outline-offset: 1px; } .cm-pen svg { width: 15px; height: 15px; pointer-events: none; } .cm-bk { color: #6b7280; margin-left: 6px; font-size: 11px; }
.cm-bm-ov { position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,.66); display: flex; align-items: center; justify-content: center; padding: 16px; }
.cm-bm { width: 100%; max-width: 400px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--card, #111); border: 1px solid var(--border, rgba(255,255,255,.12)); border-radius: 14px; box-shadow: 0 18px 60px rgba(0,0,0,.6); padding: 20px; box-sizing: border-box; }
.cm-bm h2 { margin: 0 0 4px; font-size: 18px; }  .cm-bm label { display: block; font-size: 12px; color: var(--text-2, #919eab); margin-bottom: 6px; }
.cm-bm .cm-in { height: 44px; font-size: 16px; padding: 0 12px 0 40px !important; border-radius: 8px; } .cm-bm .ncm-pre { left: 14px; font-size: 14px; }
.cm-bm .cm-bm-eq { min-height: 16px; margin: 6px 0 0; font-size: 12px; color: var(--text-2, #919eab); } .cm-bm .cm-bm-err { min-height: 18px; margin: 8px 0 0; font-size: 13px; color: #f87171; overflow-wrap: anywhere; }
.cm-bm .cm-bm-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; } .cm-bm .cm-bm-btns button { min-height: 44px; min-width: 120px; padding: 0 18px; font-size: 15px; }
.cm-bm .cm-bm-btns button[disabled] { opacity: .55; cursor: not-allowed; }
@media (max-width: 640px) { .cm-pen { width: 44px; height: 40px; margin-left: 0; margin-right: 0; } .cm-bm { padding: 18px; } .cm-bm .cm-bm-btns button { flex: 1; } }
.cm-foot { font-size: 12px; color: #919eab; padding: 10px 4px; } .cm-foot a { color: #B8F6FD; } .cm-warn { color: #f59e0b; }
.cm-menu { position: fixed; z-index: 1300; min-width: 210px; background: #1a1a1a; border-radius: 6px; box-shadow: 0 8px 32px rgba(0,0,0,.6); padding: 6px; }
.cm-menu button, .cm-menu a { display: flex; align-items: center; width: 100%; box-sizing: border-box; min-height: 44px; background: none; border: 0; border-radius: 4px; color: #fff; font: inherit; font-size: 14px; padding: 0 12px; text-align: left; cursor: pointer; text-decoration: none; } .cm-menu button:hover, .cm-menu a:hover { background: #262626; } .cm-menu .dan { color: #f87171; } .cm-msep { height: 1px; background: #262626; margin: 4px 0; }
.cm-undo { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1400; display: none; align-items: center; gap: 16px; background: #1a1a1a; color: #fff; border-radius: 6px; box-shadow: 0 8px 32px rgba(0,0,0,.6); padding: 12px 16px; font-size: 14px; max-width: calc(100vw - 32px); }
.cm-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: #0a0a0a; border-radius: 6px; padding: 14px; } .cm-sum span { display: block; font-size: 12px; color: #919eab; } .cm-sum b { font-size: 14px; color: #fff; overflow-wrap: anywhere; }
.cm-res { max-height: 300px; overflow-y: auto; } .cm-res-i { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #262626; font-size: 13px; } .cm-res-i span { color: #10b981; text-align: right; } .cm-res-i.bad span { color: #f87171; }
@media (max-width: 700px) {
   .cm-ftog { display: inline-flex; width: 100%; margin-bottom: 8px; }  .cm-f { min-width: 0; flex: 1 1 140px; }
  .cm-scroll { max-height: calc(100vh - 280px); } .cm-mn { width: 44px; height: 40px; } .cm-sum { grid-template-columns: 1fr; } .cm-tab { padding: 0 12px; flex: 1; }
}
/* pop-up de orçamento enxuto: "Diário [valor]" e os dois botões (sem título, campanha, equivalência) */
.cm-bm { max-width: 340px; padding: 20px; }
.cm-bm .cm-bm-row { display: flex; align-items: center; gap: 14px; } .cm-bm .cm-bm-row label { margin: 0; font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--text, #fff); } .cm-bm .cm-bm-row .cm-in { flex: 1; min-width: 0; }
.cm-bm .cm-bm-eq[hidden] { display: none; } .cm-bm .cm-bm-err { min-height: 0; margin: 8px 0 0; } .cm-bm .cm-bm-err:empty { display: none; }
.cm-bm .cm-bm-btns { display: flex; gap: 12px; justify-content: stretch; margin-top: 18px; } .cm-bm .cm-bm-btns button { flex: 1; min-width: 0; }
/* aviso de valor muito acima do normal (laranja, com o ícone no campo) */
.cm-bm .cm-bm-row { position: relative; } .cm-bm .cm-bm-wi { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #f59e0b; pointer-events: none; }
.cm-bm .cm-in.cm-warn-in { border-color: #f59e0b !important; padding-right: 44px !important; }
.cm-bm .cm-bm-warn { margin: 12px 0 0; padding: 12px 14px; border: 1px solid rgba(245,158,11,.35); border-radius: 8px; background: rgba(245,158,11,.12); color: #fbbf24; font-size: 14px; line-height: 1.45; } .cm-bm .cm-bm-warn[hidden] { display: none; }
/* o campo do valor não passa da largura do pop-up; o pop-up alarga quando aparece o aviso de valor alto */
.cm-bm .cm-bm-row .ncm { flex: 1; min-width: 0; } .cm-bm .cm-bm-row .cm-in { width: 100%; box-sizing: border-box; }
.cm-bm { transition: max-width .15s; } .cm-bm.cm-bm-wide { max-width: 480px; }
