:root {
  --bg: #f4f6f5; --panel: #fff; --ink: #1d2a24; --muted: #6b7a73; --line: #e3e8e5;
  --brand: #2563eb; --brand-dark: #1d4ed8; --brand-soft: #e8effe; --side: #0f1e3d; --side-ink: #ffffff;
  --warn: #c77700; --warn-soft: #fff4e0; --danger: #c62828; --danger-soft: #fdecea;
  --info: #1565c0; --info-soft: #e7f0fb; --radius: 10px;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; }
h1, h2, h3 { margin: 0 0 12px; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
a { color: var(--brand-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea { resize: vertical; min-height: 80px; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--brand); }
label { display: block; font-weight: 550; margin: 12px 0 5px; font-size: 13px; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 450; margin: 6px 0; cursor: pointer; }
.hint { color: var(--muted); font-size: 12px; margin-top: 4px; }

.btn { border: 1px solid var(--line); background: #fff; padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 550; white-space: nowrap; }
.btn:hover { background: #f1f4f2; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* layout */
.layout { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.sidebar { background: var(--side); color: var(--side-ink); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 18px; padding: 4px 10px 18px; }
.logo span { background: var(--brand); width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 16px; flex: none; }
.logo img { max-height: 34px; max-width: 150px; border-radius: 6px; }
.logo small { display: block; font-size: 11px; font-weight: 450; opacity: .65; }
.nav { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; cursor: pointer; color: var(--side-ink); text-decoration: none; font-weight: 500; text-shadow: 0 1px 1px rgba(0,0,0,.25); }
.nav:hover { background: rgba(255,255,255,.1); }
.nav-sep { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; opacity: .72; font-weight: 600; padding: 14px 12px 4px; }
.nav.active { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 3px 0 0 var(--brand); }
.nav .badge { margin-left: auto; }
.sidebar .me { margin-top: auto; padding: 12px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12.5px; }
.sidebar .me b { display: block; color: #fff; font-size: 13.5px; }
.sidebar .me a { color: #fff; opacity: .92; cursor: pointer; margin-right: 10px; }
.main { padding: 26px 30px; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; }
.kpi .v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; }
.kpi .l { color: var(--muted); font-size: 12.5px; }
.kpi .s { color: var(--muted); font-size: 12px; margin-top: 2px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: 0; }
td.actions { text-align: right; white-space: nowrap; }
.table-wrap { overflow-x: auto; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: #eef1ef; color: var(--muted); }
.badge.green { background: var(--brand-soft); color: var(--brand-dark); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.blue { background: var(--info-soft); color: var(--info); }
.badge.count { background: var(--brand); color: #fff; min-width: 20px; text-align: center; }
.empty { color: var(--muted); text-align: center; padding: 30px 10px; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, var(--side), var(--brand-dark)); }
.login .card { width: 360px; padding: 28px; }
.login .logo { color: var(--ink); padding: 0 0 14px; }
.err { color: var(--danger); margin-top: 10px; min-height: 18px; font-size: 13px; }

/* modal */
.overlay { position: fixed; inset: 0; background: rgba(10,15,30,.45); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { background: #fff; border-radius: 12px; width: min(720px, 100%); max-height: 92vh; overflow: auto; padding: 22px 24px; }
.modal.wide { width: min(980px, 100%); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; position: sticky; bottom: -22px; background: #fff; padding: 12px 0 4px; }

#toast { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); align-items: center; z-index: 99; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--side); color: #fff; padding: 11px 16px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.18); max-width: 380px; }
.toast.error { background: var(--danger); }

/* WhatsApp connection */
.qr-box { display: grid; place-items: center; min-height: 320px; background: #fafbfa; border: 1px dashed var(--line); border-radius: var(--radius); }
.qr-box img { width: 280px; height: 280px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: #aaa; }
.dot.connected { background: var(--brand); } .dot.qr, .dot.connecting { background: var(--warn); } .dot.disconnected { background: var(--danger); }

/* targets picker */
.picker { border: 1px solid var(--line); border-radius: 8px; max-height: 230px; overflow: auto; padding: 6px 10px; }
.picker label.check { margin: 3px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { background: var(--brand-soft); color: var(--brand-dark); border-radius: 99px; padding: 3px 10px; font-size: 12px; }
.weekdays { display: flex; gap: 6px; flex-wrap: wrap; }
.weekdays label { margin: 0; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-weight: 500; display: flex; gap: 6px; }
.preview { background: #e8f3ea; border-radius: 10px; padding: 12px; }
.bubble { background: #d9fdd3; border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; box-shadow: 0 1px 1px rgba(0,0,0,.08); display: inline-block; max-width: 100%; }

/* atendimento */
.inbox { display: grid; grid-template-columns: 340px 1fr 250px; height: calc(100vh - 120px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.inbox-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tab { flex: 1; padding: 11px 2px; white-space: nowrap; text-align: center; cursor: pointer; font-weight: 550; font-size: 12.5px; color: var(--muted); border-bottom: 2px solid transparent; }
.tab.active { color: var(--brand-dark); border-color: var(--brand); }
.tlist { overflow: auto; flex: 1; }
.titem { padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; display: grid; gap: 3px; }
.titem:hover { background: #f7f9f8; }
.titem.active { background: var(--brand-soft); }
.titem .top { display: flex; justify-content: space-between; gap: 8px; }
.titem .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.titem .last { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.titem .meta { display: flex; gap: 6px; align-items: center; font-size: 11.5px; color: var(--muted); }
.chat { display: flex; flex-direction: column; min-height: 0; background: var(--chat-bg, #efeae2); background-size: var(--chat-bg-size, auto); background-position: center; }
.chat-head { background: #fff; padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chat-head .grow { flex: 1; min-width: 150px; }
.msgs { flex: 1; overflow: auto; padding: 18px 6%; display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 70%; padding: 7px 10px 18px; border-radius: 8px; word-wrap: break-word; position: relative; box-shadow: 0 1px 1px rgba(0,0,0,.08); background: #fff; align-self: flex-start; min-width: 90px; }
.msg.out { background: #d9fdd3; align-self: flex-end; }
.msg.bot { background: #eef3ff; }
.msg .body { white-space: pre-wrap; }
.msg .time { position: absolute; right: 8px; bottom: 3px; font-size: 10.5px; color: var(--muted); }
.msg .who { font-size: 11px; font-weight: 650; color: var(--brand-dark); margin-bottom: 2px; }
.msg.bot .who { color: var(--info); }
.msg.err { outline: 1px solid var(--danger); }
.composer { background: #f0f2f5; padding: 10px 12px; display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 42px; max-height: 140px; border-radius: 20px; padding: 10px 14px; }
.composer .btn { border-radius: 20px; }
.chat-empty { flex: 1; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 20px; }
.info { border-left: 1px solid var(--line); padding: 16px; overflow: auto; }
.info dl { margin: 0; display: grid; gap: 10px; }
.info dt { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.info dd { margin: 2px 0 0; font-weight: 550; word-break: break-all; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; background: #f0f2f5; }
.quick .btn { font-size: 12px; padding: 4px 10px; border-radius: 99px; }

/* URA */
.node { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; background: #fff; }
.node-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.node-head .id { font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted); }
.opt { display: grid; grid-template-columns: 60px 1.3fr 150px 1.6fr auto; gap: 8px; align-items: start; margin-top: 8px; }
.opt input, .opt select { padding: 7px 9px; }
.wa-sim { background: #efeae2; border-radius: var(--radius); padding: 14px; height: 520px; display: flex; flex-direction: column; }
.wa-sim .msgs { padding: 6px; }

/* relatórios */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 170px; padding-top: 10px; }
.bars .b { flex: 1; max-width: 46px; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 1px; min-width: 6px; position: relative; }
.bars .b div { border-radius: 2px 2px 0 0; }
.bars .b:hover::after { content: attr(data-t); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--side); color: #fff; padding: 5px 8px; border-radius: 6px; font-size: 11.5px; white-space: pre; z-index: 3; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.stars { color: #f2a600; letter-spacing: 1px; }
.hbar { height: 8px; background: #eef1ef; border-radius: 99px; overflow: hidden; }
.hbar div { height: 100%; background: var(--brand); }

@media (max-width: 1100px) {
  .inbox { grid-template-columns: 280px 1fr; } .info { display: none; }
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; }
  .sidebar .me { display: none; } .main { padding: 16px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .inbox { grid-template-columns: 1fr; height: auto; } .opt { grid-template-columns: 1fr 1fr; }
}

/* ---------- v2: campanhas, fluxo, temas ---------- */
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 12px; cursor: pointer; font-weight: 550; font-size: 13px; }
.seg button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.seg.sm button { padding: 4px 10px; font-size: 12.5px; }
.toggle-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; max-width: 360px; }
.toggle-grid button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 6px 0; cursor: pointer; font-size: 12.5px; }
.toggle-grid button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.rule-box { background: #f8faf9; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.rule-sum { margin-top: 10px; font-size: 13px; color: var(--brand-dark); font-weight: 600; }
.step { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-top: 12px; background: #fff; position: relative; }
.step.sel { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.step-head { display: flex; gap: 10px; align-items: center; }
.step-num { background: var(--brand); color: #fff; border-radius: 8px; padding: 4px 10px; font-weight: 700; font-size: 13px; }
.step-head input[type=time] { width: 120px; }
.camp { padding: 0; overflow: hidden; margin-bottom: 14px; }
.camp-head { padding: 16px 18px; display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.camp-head .grow { flex: 1; min-width: 220px; }
.camp table td, .camp table th { padding: 9px 18px; }
.next-list { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.next-list li { padding: 6px 0; border-bottom: 1px dashed var(--line); display: flex; gap: 8px; }
.next-list li b { color: var(--brand-dark); min-width: 70px; }

/* temas */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.swatch { border: 2px solid var(--line); border-radius: 12px; padding: 10px; cursor: pointer; text-align: center; font-weight: 600; background: #fff; }
.swatch.on { border-color: var(--ink); }
.swatch .c { height: 44px; border-radius: 8px; margin-bottom: 8px; display: flex; overflow: hidden; }
.swatch .c i { flex: 1; }
.brand-prev { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); display: grid; grid-template-columns: 150px 1fr; min-height: 200px; }
.brand-prev .s { padding: 14px; color: #fff; font-weight: 700; }
.brand-prev .m { padding: 18px; background: var(--bg); }

/* horário */
.hours-row { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hours-row .ranges { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hours-row input[type=time] { width: 128px; }

/* construtor de fluxo */
.flow-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.flow-canvas { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; overflow: auto; min-height: 60vh;
  background-image: radial-gradient(#e2e7e4 1px, transparent 1px); background-size: 18px 18px; }
.fnode { display: flex; flex-direction: column; align-items: flex-start; }
.fcard { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--c, #999); border-radius: 10px; padding: 10px 12px; min-width: 260px; max-width: 420px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06); cursor: pointer; transition: box-shadow .15s, transform .15s; }
.fcard:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.fcard.sel { box-shadow: 0 0 0 3px var(--brand-soft), 0 4px 14px rgba(0,0,0,.1); border-color: var(--brand); border-left-color: var(--c); }
.fcard .ft { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.fcard .ft .tp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--c); font-weight: 700; margin-left: auto; }
.fcard .fx { color: var(--muted); font-size: 12.5px; margin-top: 4px; white-space: pre-wrap; max-height: 54px; overflow: hidden; }
.fcard .start-flag { background: var(--brand); color: #fff; font-size: 10.5px; border-radius: 99px; padding: 1px 7px; }
.fkids { margin-left: 22px; padding-left: 22px; border-left: 2px solid #d5dcd8; display: flex; flex-direction: column; gap: 4px; padding-top: 10px; }
.fkid { position: relative; padding-top: 6px; }
.fkid::before { content: ''; position: absolute; left: -22px; top: 19px; width: 18px; border-top: 2px solid #d5dcd8; }
.fkids > .fkid:last-child { padding-bottom: 6px; }
.flabel { display: inline-block; font-size: 12px; font-weight: 650; background: #eef1ef; border-radius: 99px; padding: 3px 10px; margin-bottom: 6px; }
.flabel.yes { background: #e3f6e9; color: #137a3c; } .flabel.no { background: #eef0fb; color: #3e4bb0; }
.flink { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; border: 1px dashed #b9c4be; border-radius: 8px; padding: 6px 10px; cursor: pointer; background: #fff; color: var(--muted); }
.flink:hover { border-color: var(--brand); color: var(--brand-dark); }
.fadd { border: 1px dashed var(--brand); color: var(--brand-dark); background: var(--brand-soft); border-radius: 8px; padding: 6px 12px; cursor: pointer; font-weight: 600; font-size: 12.5px; }
.fend { font-size: 12px; color: var(--muted); margin-top: 6px; }
.palette { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.palette .pi { border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 10px; padding: 12px; cursor: pointer; background: #fff; }
.palette .pi:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.palette .pi b { display: block; margin-bottom: 3px; }
.palette .pi span { color: var(--muted); font-size: 12.5px; }
.inspector { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.chips-in { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.chips-in button { border: 1px solid var(--line); background: #fff; border-radius: 99px; font-size: 11.5px; padding: 2px 8px; cursor: pointer; color: var(--brand-dark); }
.opt2 { display: grid; grid-template-columns: 52px 1fr; gap: 6px; margin-top: 10px; padding: 10px; background: #f8faf9; border-radius: 8px; }
.opt2 .full { grid-column: 1 / -1; display: flex; gap: 6px; }
.tpl { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tpl .card { cursor: pointer; } .tpl .card:hover { border-color: var(--brand); }
.tpl .ic { font-size: 28px; }

/* atendimento extra */
.msg.note { background: #fff8db; align-self: center; max-width: 80%; border: 1px dashed #e8c95a; }
.msg.note .who { color: #9a7400; }
.composer .mode { display: flex; flex-direction: column; gap: 4px; }
.composer .mode button { border: 1px solid var(--line); background: #fff; border-radius: 99px; font-size: 11.5px; padding: 3px 9px; cursor: pointer; }
.composer .mode button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.composer.note-mode { background: #fff8db; }
.tagchip { display: inline-flex; gap: 4px; align-items: center; background: var(--brand-soft); color: var(--brand-dark); border-radius: 99px; padding: 2px 9px; font-size: 11.5px; font-weight: 600; margin: 2px 3px 2px 0; }
.tagchip a { cursor: pointer; opacity: .6; }
@media (max-width: 1100px) { .flow-wrap { grid-template-columns: 1fr; } .inspector { position: static; max-height: none; } }

/* ---------- v3: módulos, provedores, calendário, agenda ---------- */
.prov-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.cal-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal-h { padding: 8px; font-size: 12px; font-weight: 650; color: var(--muted); text-align: center; border-bottom: 1px solid var(--line); background: #fafbfa; }
.cal-d { min-height: 108px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; overflow: hidden; }
.cal-d:nth-child(7n+7) { border-right: 0; }
.cal-d:hover { background: #fafbfa; }
.cal-d.out { background: #f8f9f8; color: #a3aca7; }
.cal-d.sel { box-shadow: inset 0 0 0 2px var(--brand); }
.cal-d.today .cal-n { color: #fff; background: var(--brand); border-radius: 99px; padding: 0 7px; display: inline-flex; }
.cal-n { font-weight: 650; font-size: 13px; display: flex; gap: 6px; align-items: center; margin-bottom: 4px; }
.cal-c { font-size: 10.5px; background: var(--brand-soft); color: var(--brand-dark); border-radius: 99px; padding: 0 6px; }
.cal-e { font-size: 11px; border-left: 3px solid var(--pc); background: #f4f6f5; border-radius: 4px; padding: 2px 5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-e.done { opacity: .6; }
.cal-more { font-size: 11px; color: var(--muted); margin-top: 2px; }
.cal-day { position: sticky; top: 16px; max-height: calc(100vh - 40px); overflow: auto; }
.cal-item { border-left: 4px solid var(--pc); background: #fafbfa; border-radius: 8px; padding: 10px 12px; margin-top: 10px; display: grid; gap: 3px; }
.ag-item { padding: 10px 12px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.ag-item:hover { background: #f5f7f6; }
.ag-item.sel { background: var(--brand-soft); border-color: var(--brand); }
code { background: #f1f3f2; border-radius: 4px; padding: 1px 4px; font-size: 12px; }
@media (max-width: 1100px) { .cal-wrap { grid-template-columns: 1fr; } .cal-d { min-height: 80px; } }

/* ---------- v4: números, mídia, confirmações, fila, agenda ---------- */
.tick { color: #8696a0; font-size: 11px; letter-spacing: -2px; margin-left: 2px; }
.tick.read { color: #34b7f1; }
.msg .time { display: flex; gap: 3px; align-items: center; }
.avail { margin: 8px 0 6px; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.1); cursor: pointer; color: #fff; font-weight: 600; }
.avail:hover { background: rgba(255,255,255,.18); }
.doc-chip { display: inline-flex; gap: 6px; align-items: center; background: #f1f3f2; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; text-decoration: none; color: var(--ink); font-weight: 550; }
.color-pick { display: inline-block; width: 26px; height: 26px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
input:checked + .color-pick { box-shadow: 0 0 0 2px var(--ink); }
.cal-hol { font-size: 10.5px; color: #9a5b00; background: #fff4e0; border-radius: 4px; padding: 1px 5px; margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-item { border-bottom: 1px dashed var(--line); padding: 8px 0; display: grid; gap: 3px; }
.hist-item:last-child { border-bottom: 0; }
.hist-text { font-size: 12.5px; white-space: pre-wrap; background: #f8faf9; border-radius: 6px; padding: 6px 8px; max-height: 90px; overflow: hidden; }
#ag-hist { max-height: 420px; overflow: auto; }

/* ---------- v5: menu recolhível, alertas, regras ---------- */
.layout { transition: grid-template-columns .2s; }
.logo { position: relative; }
.side-toggle { margin-left: auto; background: rgba(255,255,255,.1); border: 0; color: #fff; width: 26px; height: 26px; border-radius: 7px; cursor: pointer; font-size: 15px; flex: none; }
.side-toggle:hover { background: rgba(255,255,255,.22); }
.nav .ico { width: 20px; text-align: center; flex: none; }
.layout.collapsed { grid-template-columns: 68px 1fr; }
.layout.collapsed .sidebar { padding: 14px 8px; }
.layout.collapsed .lbl, .layout.collapsed .nav-sep, .layout.collapsed .logo > div, .layout.collapsed .logo img { display: none; }
.layout.collapsed .logo { flex-direction: column; padding: 4px 0 12px; gap: 8px; }
.layout.collapsed .side-toggle { margin: 0; }
.layout.collapsed .nav { justify-content: center; padding: 10px 0; position: relative; }
.layout.collapsed .nav .badge.count { position: absolute; top: 2px; right: 2px; font-size: 10px; min-width: 16px; padding: 1px 4px; }
.layout.collapsed .nav > span[style*="margin-left:auto"] { display: none !important; }
.layout.collapsed .nav-sep { display: block; height: 1px; padding: 0; margin: 8px 6px; background: rgba(255,255,255,.12); font-size: 0; }
.layout.collapsed .me { padding: 8px 0; text-align: center; }
.layout.collapsed .me a { display: block; margin: 6px 0; font-size: 16px; }
.layout.collapsed .avail { padding: 6px 0; text-align: center; }
.avail.paused { background: rgba(255,170,0,.25); }

#alerts { position: fixed; bottom: 96px; right: 18px; flex-direction: column-reverse; z-index: 80; display: flex; flex-direction: column; gap: 10px; width: 380px; max-width: calc(100vw - 32px); }
.alert-card { background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.18); border-left: 6px solid var(--warn); animation: alertIn .25s ease-out; }
.alert-card.idle { border-left-color: var(--danger); }
.alert-card .x { cursor: pointer; color: var(--muted); padding: 0 4px; }
.alert-more { background: var(--side); color: #fff; border-radius: 8px; padding: 6px 10px; font-size: 12.5px; text-align: center; }
.alert-more a { color: #fff; text-decoration: underline; cursor: pointer; }
@keyframes alertIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

.titem .meta .late, .att-ind .late { color: var(--danger); font-weight: 700; }
.titem .meta .waitc { color: var(--warn); font-weight: 600; }
.att-ind { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 4px; }
.att-ind b { color: var(--ink); }
.qr-wrap { position: relative; flex: 1; display: flex; }
.qr-wrap textarea { flex: 1; }
.qr-pop { position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 260px; overflow: auto; z-index: 5; }
.qr-item { padding: 8px 12px; cursor: pointer; display: grid; gap: 2px; border-bottom: 1px solid var(--line); }
.qr-item:last-child { border-bottom: 0; }
.qr-item span { font-size: 12.5px; color: var(--muted); }
.qr-item.on, .qr-item:hover { background: var(--brand-soft); }
.pause-grid, .reason-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
.pause-grid .btn { padding: 12px; }
.reason { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; margin: 0; cursor: pointer; font-weight: 500; }
.reason:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.prev-item { padding: 8px 0; border-bottom: 1px dashed var(--line); cursor: pointer; font-size: 12.5px; }
.prev-item:hover { color: var(--brand-dark); }
.rule-line { margin: 6px 0; gap: 6px; }
.card hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* ===== v6: menu lateral mais legível, tema escuro, fundos, chat da equipe, login personalizável ===== */
.sidebar { color: #fff; }
.sidebar .me { font-size: 12.5px; color: rgba(255,255,255,.88); }
.nav .ico { filter: saturate(1.15); }
.side-tools { display: flex; gap: 6px; margin: 8px 0 2px; }
.side-tools button { flex: 1; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); color: #fff; border-radius: 8px; padding: 5px 6px; cursor: pointer; font-size: 12px; white-space: nowrap; }
.side-tools button:hover { background: rgba(255,255,255,.2); }
.layout.collapsed .side-tools { flex-direction: column; }
.dark-fab { position: fixed; top: 14px; right: 14px; z-index: 30; background: rgba(0,0,0,.35); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 99px; padding: 7px 12px; cursor: pointer; backdrop-filter: blur(6px); }

/* tela de login personalizável */
.login { position: relative; background-size: cover !important; background-position: center !important; }
.login::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,var(--login-ov, .0)); pointer-events: none; }
.login.pos-left { place-items: center start; padding-left: 8vw; } .login.pos-right { place-items: center end; padding-right: 8vw; }
.login .card { position: relative; z-index: 1; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.login .welcome { margin: 0 0 4px; font-size: 20px; }
.login .msg-l { color: var(--muted); font-size: 13px; margin: 0 0 8px; white-space: pre-wrap; }
.login .links { display: flex; justify-content: space-between; margin-top: 12px; font-size: 13px; }
.login .links a { cursor: pointer; }
.login .ok { color: #15803d; margin-top: 10px; font-size: 13px; }
.code-in { letter-spacing: 8px; font-size: 22px; text-align: center; font-weight: 700; }
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.bg-opt { border: 2px solid var(--line); border-radius: 10px; height: 64px; cursor: pointer; background-size: cover !important; background-position: center !important; position: relative; overflow: hidden; }
.bg-opt span { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.5); color: #fff; font-size: 11px; padding: 2px 5px; font-weight: 600; }
.bg-opt.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.login-prev { height: 260px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; position: relative; background-size: cover !important; background-position: center !important; }
.login-prev .mini { width: 150px; background: var(--panel); border-radius: 8px; padding: 12px; position: relative; z-index: 1; font-size: 10px; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.login-prev .mini i { display: block; height: 12px; border-radius: 3px; background: var(--line); margin-top: 6px; }
.login-prev .mini i.b { background: var(--brand); }
.login-prev.pos-left { place-items: center start; padding-left: 24px; } .login-prev.pos-right { place-items: center end; padding-right: 24px; }

/* chat da equipe */
.team { display: grid; grid-template-columns: 300px 1fr; height: calc(100vh - 120px); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.team .rooms { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.team .rooms .top { padding: 12px; display: grid; gap: 8px; border-bottom: 1px solid var(--line); }
.room { padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; display: flex; gap: 10px; align-items: center; }
.room:hover { background: var(--hover, #f7f9f8); } .room.active { background: var(--brand-soft); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; position: relative; font-size: 14px; }
.avatar .on { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #22c55e; border: 2px solid var(--panel); }
.room .t { flex: 1; min-width: 0; } .room .t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room .t small { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room .r { text-align: right; font-size: 11px; color: var(--muted); display: grid; gap: 4px; justify-items: end; }
.tmsg .who { font-size: 12px; font-weight: 700; color: var(--brand-dark); margin-bottom: 2px; }
.msg.sys { align-self: center; background: rgba(0,0,0,.06); box-shadow: none; font-size: 12px; color: var(--muted); padding: 4px 10px; min-width: 0; max-width: 90%; }
.day-sep { align-self: center; background: var(--panel); color: var(--muted); font-size: 11.5px; padding: 3px 10px; border-radius: 99px; box-shadow: 0 1px 1px rgba(0,0,0,.08); margin: 6px 0; }
.member-list { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; }
.member-list label.check { justify-content: space-between; }
@media (max-width: 860px) { .team { grid-template-columns: 1fr; height: auto; } }

/* ---------- tema escuro ---------- */
[data-theme=dark], [data-theme=dark] body { --bg: #0f1418; --panel: #171e24; --ink: #e6ebef; --muted: #93a0aa; --line: #2a343c; --brand-soft: rgba(120,150,255,.16); --hover: #1e272e;
  --warn-soft: #3a2d12; --danger-soft: #3b1b1b; --info-soft: #14263b; color-scheme: dark; }
[data-theme=dark] body { background: var(--bg); color: var(--ink); }
[data-theme=dark] a { color: #9ab8ff; }
[data-theme=dark] input, [data-theme=dark] select, [data-theme=dark] textarea, [data-theme=dark] .btn, [data-theme=dark] .modal, [data-theme=dark] .modal-foot,
[data-theme=dark] .inbox, [data-theme=dark] .chat-head, [data-theme=dark] .node, [data-theme=dark] .seg button, [data-theme=dark] .toggle-grid button, [data-theme=dark] .step,
[data-theme=dark] .swatch, [data-theme=dark] .flow-canvas, [data-theme=dark] .fcard, [data-theme=dark] .flink, [data-theme=dark] .palette .pi, [data-theme=dark] .chips-in button,
[data-theme=dark] .composer .mode button, [data-theme=dark] .cal, [data-theme=dark] .alert-card, [data-theme=dark] .qr-pop, [data-theme=dark] .card, [data-theme=dark] .day-sep { background: var(--panel); color: var(--ink); border-color: var(--line); }
[data-theme=dark] .btn:hover, [data-theme=dark] .titem:hover, [data-theme=dark] .cal-d:hover, [data-theme=dark] .ag-item:hover { background: var(--hover); }
[data-theme=dark] .btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
[data-theme=dark] .btn.primary:hover { background: var(--brand-dark); }
[data-theme=dark] .titem.active, [data-theme=dark] .room.active { background: var(--brand-soft); }
[data-theme=dark] .badge, [data-theme=dark] .hbar, [data-theme=dark] .flabel, [data-theme=dark] code, [data-theme=dark] .doc-chip { background: #253039; color: var(--ink); }
[data-theme=dark] .rule-box, [data-theme=dark] .opt2, [data-theme=dark] .hist-text, [data-theme=dark] .cal-h, [data-theme=dark] .cal-item, [data-theme=dark] .cal-e, [data-theme=dark] .qr-box, [data-theme=dark] .cal-d.out { background: #1b232a; color: var(--ink); }
[data-theme=dark] .composer, [data-theme=dark] .quick { background: #1b232a; }
[data-theme=dark] .msg { background: #202c33; color: #e9edef; }
[data-theme=dark] .msg.out { background: #005c4b; } [data-theme=dark] .msg.bot { background: #22304a; }
[data-theme=dark] .msg.note, [data-theme=dark] .composer.note-mode { background: #3b3416; border-color: #6b5c1c; }
[data-theme=dark] .msg.sys { background: rgba(255,255,255,.07); }
[data-theme=dark] .bubble { background: #005c4b; color: #e9edef; } [data-theme=dark] .preview { background: #14261e; }
[data-theme=dark] .wa-sim { background: #0b141a; }
[data-theme=dark] .chat { background: var(--chat-bg-dark, var(--chat-bg, #0b141a)); }
[data-theme=dark] table th { color: var(--muted); } [data-theme=dark] td, [data-theme=dark] th { border-color: var(--line); }
[data-theme=dark] .login .logo { color: var(--ink); }
[data-theme=dark] .cal-hol { background: #3a2d12; color: #f5c46b; }
[data-theme=dark] [style*="background:#fff"], [data-theme=dark] [style*="background: #fff"] { background: var(--panel) !important; }
[data-theme=dark] [style*="background:#f"], [data-theme=dark] [style*="background: #f"] { background-color: #1b232a !important; }
[data-theme=dark] .tmsg .who { color: #9ab8ff; }
[data-theme=dark] .toast { box-shadow: 0 8px 24px rgba(0,0,0,.5); }
[data-theme=dark] .sidebar a, [data-theme=dark] .sidebar .nav { color: var(--side-ink); }
[data-theme=dark] .sidebar { background: color-mix(in srgb, var(--side) 70%, #000); }
[data-theme=dark] .room.active, [data-theme=dark] .titem.active { background: rgba(255,255,255,.07); box-shadow: inset 3px 0 0 var(--brand); }
[data-theme=dark] .badge.green { background: rgba(34,197,94,.15); color: #86efac; }
[data-theme=dark] .badge.blue { background: rgba(59,130,246,.18); color: #93c5fd; }
[data-theme=dark] .badge.red { background: rgba(239,68,68,.18); color: #fca5a5; }
[data-theme=dark] .badge.count { background: var(--brand); color: #fff; }

/* ===== v7/v8: fotos, chat flutuante, grupos de permissão, pausas, participantes, etiquetas ===== */
.avatar { overflow: visible; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar .on.pz { background: #f59e0b; }
.me-row { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.me-row b { display: block; color: #fff; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-row span { display: block; font-size: 12px; opacity: .85; }
.me-av { cursor: pointer; margin: 0 !important; opacity: 1 !important; }
.layout.collapsed .me-row { justify-content: center; }

#tc-launch { position: fixed; right: 20px; bottom: 20px; width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); display: grid; place-items: center; z-index: 90; transition: transform .15s; }
#tc-launch:hover { transform: scale(1.06); } #tc-launch.on { background: var(--brand-dark); }
#tc-launch .tc-count { position: absolute; top: -3px; right: -3px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; border: 2px solid var(--panel); }
.tc-panel { position: fixed; right: 20px; bottom: 88px; width: 340px; max-width: calc(100vw - 24px); height: min(560px, calc(100vh - 110px)); background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 16px 48px rgba(0,0,0,.25); z-index: 91; display: flex; flex-direction: column; overflow: hidden; }
.tc-ph { display: flex; justify-content: space-between; align-items: center; padding: 14px 14px 10px; font-size: 16px; }
.tc-x { border: 0; background: none; cursor: pointer; font-size: 16px; color: var(--muted); }
.tc-tabs { padding: 0 12px 8px; display: flex; gap: 6px; } .tc-tabs button { flex: 1; }
.tc-list { overflow: auto; flex: 1; }
.tc-sec { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 10px 14px 4px; }
.tc-row { display: flex; gap: 10px; align-items: center; padding: 8px 14px; cursor: pointer; }
.tc-row:hover { background: var(--hover, #f3f5f4); }
.tc-row .t { flex: 1; min-width: 0; } .tc-row .t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-row .t small { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-row .r { font-size: 11px; color: var(--muted); display: grid; gap: 3px; justify-items: end; }
#tc-wins { position: fixed; right: 92px; bottom: 0; display: flex; flex-direction: row-reverse; align-items: flex-end; gap: 10px; z-index: 89; pointer-events: none; }
.tcw { width: 328px; height: 440px; background: var(--panel); border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; box-shadow: 0 8px 32px rgba(0,0,0,.22);
  display: flex; flex-direction: column; pointer-events: auto; overflow: hidden; }
.tcw.min { height: auto; width: 240px; }
.tcw-head { display: flex; gap: 8px; align-items: center; padding: 8px 8px 8px 10px; border-bottom: 1px solid var(--line); cursor: pointer; background: var(--panel); }
.tcw-head .t { flex: 1; min-width: 0; } .tcw-head .t b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcw-head .t small { color: var(--muted); font-size: 11px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcw-head button { border: 0; background: none; cursor: pointer; font-size: 14px; color: var(--muted); padding: 4px 6px; border-radius: 6px; }
.tcw-head button:hover { background: var(--hover, #eef1ef); color: var(--ink); }
.tcw.flash .tcw-head { animation: tcflash 1.2s ease-in-out infinite; }
@keyframes tcflash { 50% { background: var(--brand-soft); } }
.tcw-body { flex: 1; overflow: auto; padding: 10px 10px; gap: 4px; background: var(--chat-bg, #efeae2); background-size: var(--chat-bg-size, auto); }
[data-theme=dark] .tcw-body { background: var(--chat-bg-dark, #0b141a); background-size: var(--chat-bg-size, auto); }
.tcw-body .msg { max-width: 82%; font-size: 13.5px; padding: 6px 9px 16px; }
.tc-line { display: flex; gap: 6px; align-items: flex-end; max-width: 88%; }
.tc-line .msg { max-width: 100%; }
.tcw-att { padding: 6px 10px; border-top: 1px solid var(--line); }
.tcw-comp { display: flex; gap: 6px; align-items: flex-end; padding: 8px; border-top: 1px solid var(--line); background: var(--panel); }
.tcw-comp textarea { min-height: 36px; height: 36px; max-height: 96px; resize: none; border-radius: 18px; padding: 8px 12px; font-size: 13.5px; }
.tcw-ic { border: 0; background: none; cursor: pointer; font-size: 18px; color: var(--brand); padding: 4px; height: 36px; }
.tcw-ic.send { font-size: 20px; }
@media (max-width: 700px) {
  #tc-wins { right: 0; left: 0; } .tcw { width: 100vw; height: 70vh; } .tcw.min { width: 100vw; }
  .tc-panel { right: 8px; left: 8px; width: auto; }
}

.pf-users { display: flex; align-items: center; margin-top: 10px; }
.pf-users > span .avatar { margin-right: -8px; border: 2px solid var(--panel); }

/* pausa */
#pause-lock { position: fixed; inset: 0; z-index: 300; background: rgba(10,15,25,.72); backdrop-filter: blur(6px); display: grid; place-items: center; }
.pl-card { background: var(--panel); color: var(--ink); width: 360px; max-width: 92vw; border-radius: 18px; padding: 28px; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.4); display: grid; justify-items: center; gap: 4px; }
.pl-t { font-size: 20px; font-weight: 700; margin-top: 8px; } .pl-r { color: var(--muted); }
.pl-time { font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin: 6px 0; }
.pl-time .of { font-size: 18px; color: var(--muted); font-weight: 600; }
.pl-card .hbar { width: 100%; } .pl-card.over .pl-time { color: var(--danger); }
.pl-over { color: var(--danger); font-weight: 700; }
#pause-chip { position: fixed; top: 10px; right: 16px; z-index: 120; background: #f59e0b; color: #1f1300; font-weight: 700; padding: 7px 8px 7px 14px; border-radius: 99px; box-shadow: 0 6px 20px rgba(0,0,0,.2); font-variant-numeric: tabular-nums; display: flex; gap: 8px; align-items: center; }
#pause-chip.over { background: var(--danger); color: #fff; }
#pause-chip .of { opacity: .75; } #pause-chip button { border: 0; border-radius: 99px; padding: 4px 10px; cursor: pointer; font-weight: 700; background: rgba(255,255,255,.85); }
.pause-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.pause-opt { border: 2px solid var(--line); border-radius: 10px; padding: 10px; cursor: pointer; display: grid; gap: 2px; margin: 0; font-weight: 500; }
.pause-opt input { display: none; } .pause-opt span { color: var(--muted); font-size: 12px; }
.pause-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

/* participantes, transferência, etiquetas */
.part-bar { padding: 6px 14px; font-size: 12.5px; background: var(--panel); border-bottom: 1px solid var(--line); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.part-chip { background: var(--brand-soft); color: var(--brand-dark); border-radius: 99px; padding: 2px 9px; font-weight: 600; font-size: 12px; }
.part-chip a { cursor: pointer; margin-left: 2px; }
.part-add { cursor: pointer; font-weight: 600; font-size: 12.5px; margin-left: auto; }
.tr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.tr-list { max-height: 300px; overflow: auto; display: grid; gap: 6px; margin-top: 8px; }
.tr-opt { border: 2px solid var(--line); border-radius: 10px; padding: 10px; cursor: pointer; display: grid; gap: 2px; }
.tr-opt.row { display: flex; gap: 10px; }
.tr-opt:hover { border-color: var(--brand); } .tr-opt.on { border-color: var(--brand); background: var(--brand-soft); }
.tagchip { border-radius: 99px; padding: 2px 9px; font-size: 11.5px; font-weight: 600; display: inline-block; margin: 1px 2px 1px 0; }
.tag-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; max-height: 300px; overflow: auto; }
.tp-item { display: flex; align-items: center; gap: 4px; margin: 0; font-weight: 500; cursor: pointer; border: 1px solid var(--line); border-radius: 99px; padding: 3px 8px 3px 6px; }
.alert-card.new { border-left-color: var(--brand); } .alert-card.assigned { border-left-color: #16a34a; } .alert-card.participant { border-left-color: #8b5cf6; }
.inbox-list select { font-size: 12.5px; padding: 7px 6px; }

.pp-field { position: relative; margin-top: 8px; }
.pp-sel { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.pp-drop { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); max-height: 260px; overflow: auto; z-index: 20; }
#pp-go:not([style*="none"]) ~ .pp-drop, .pp-field .pp-drop { top: auto; bottom: calc(100% + 4px); }
.pp-opt { display: flex; gap: 8px; align-items: center; padding: 7px 10px; cursor: pointer; }
.pp-opt:hover, .pp-opt.on { background: var(--brand-soft); }
.pp-opt b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pp-opt small { color: var(--muted); font-size: 11px; }
.pp-opt input { margin: 0; }

/* perfil do colaborador no topo do menu */
.sidebar .me.me-top { margin-top: 0; border-top: 0; border-bottom: 1px solid rgba(255,255,255,.12); padding: 4px 10px 12px; margin-bottom: 8px; }
.sidebar .me.me-top .side-tools { margin-top: 8px; }
.layout.collapsed .sidebar .me.me-top { padding: 4px 0 10px; text-align: center; }

.sidebar .me-bottom { margin-top: auto; padding: 12px 10px 4px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12.5px; }
.sidebar .me-bottom > a { color: #fff; opacity: .92; cursor: pointer; margin-right: 10px; }
.layout.collapsed .sidebar .me-bottom { padding: 10px 0 4px; text-align: center; }
.layout.collapsed .sidebar .me-bottom > a { display: block; margin: 6px 0; font-size: 16px; }

/* ===== v9 ===== */
.emoji-pop { position: fixed; z-index: 400; width: 320px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 36px rgba(0,0,0,.25); padding: 6px; }
.emoji-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.emoji-tabs button, .emoji-grid button { border: 0; background: none; cursor: pointer; font-size: 20px; border-radius: 6px; padding: 3px; }
.emoji-tabs button.on, .emoji-tabs button:hover, .emoji-grid button:hover { background: var(--brand-soft); }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); max-height: 210px; overflow: auto; margin-top: 4px; }
.cx-tools { display: flex; gap: 4px; }
.cx-tools .btn, .cx-head .btn { padding: 7px 9px; }
.cx-head { display: inline-flex; gap: 6px; }
#rec-bar { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--composer-bg, #f0f2f5); }
[data-theme=dark] #rec-bar, [data-theme=dark] #reply-bar { background: #1b232a; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #ef4444; animation: recp 1s infinite; } @keyframes recp { 50% { opacity: .25; } }
#reply-bar { display: flex; gap: 8px; align-items: center; padding: 8px 12px 0; background: #f0f2f5; } #reply-bar .x { cursor: pointer; font-size: 16px; }
.quote { border-left: 4px solid var(--brand); background: rgba(0,0,0,.05); border-radius: 6px; padding: 4px 8px; margin: 0 0 4px; cursor: pointer; display: grid; font-size: 12.5px; }
.quote b { color: var(--brand-dark); font-size: 12px; } .quote span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }
[data-theme=dark] .quote { background: rgba(255,255,255,.07); }
.msg { position: relative; } .msg-reply { position: absolute; top: 4px; right: -26px; opacity: 0; cursor: pointer; font-size: 15px; color: var(--muted); transition: opacity .15s; }
.msg.out .msg-reply { right: auto; left: -26px; } .msg:hover .msg-reply { opacity: 1; }
.flash-msg { animation: flashm 1.6s; } @keyframes flashm { 30% { box-shadow: 0 0 0 4px var(--brand); } }
.cx-side { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.cx-h { font-size: 13px; margin: 10px 0 6px; } .cx-l { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 8px 0 3px; }
.cx-side input, .cx-side textarea { padding: 6px 8px; font-size: 13px; } .cx-side textarea { min-height: 54px; }
.cx-stats { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--muted); } .cx-stats b { color: var(--ink); }
.cx-sched { border-left: 3px solid var(--brand); background: var(--brand-soft); border-radius: 6px; padding: 6px 8px; margin-bottom: 6px; font-size: 12.5px; }
.cx-sched.error { border-color: var(--danger); background: var(--danger-soft); } .cx-sched a { cursor: pointer; font-size: 12px; }
.sr-item { padding: 8px 10px; border-bottom: 1px solid var(--line); cursor: pointer; } .sr-item:hover { background: var(--brand-soft); }
mark { background: #fde68a; color: inherit; border-radius: 3px; padding: 0 1px; }
.mention { color: var(--brand-dark); font-weight: 700; } .mention.me { background: #fde68a; color: #7c2d12; border-radius: 4px; padding: 0 3px; }
[data-theme=dark] .mention { color: #9ab8ff; }
.msg.mention-me { box-shadow: inset 3px 0 0 #f59e0b; }
.tc-seen { align-self: flex-end; font-size: 11px; color: var(--muted); margin-top: -2px; } .tc-seen.on { color: #0ea5e9; }
.at-pop { position: absolute; left: 8px; right: 8px; bottom: 56px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.2); z-index: 5; overflow: hidden; }
.tcw { position: relative; } .at-pop > div { display: flex; gap: 8px; align-items: center; padding: 6px 10px; cursor: pointer; font-size: 13px; } .at-pop > div:hover { background: var(--brand-soft); }
.tk-card { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 8px; margin-bottom: 4px; font-size: 12.5px; min-width: 220px; }
.tk-h { font-weight: 700; margin-bottom: 2px; } .tk-msgs { margin: 6px 0; max-height: 120px; overflow: auto; font-size: 12px; color: var(--muted); display: grid; gap: 2px; }
.tk-card a { cursor: pointer; font-weight: 600; }

/* ===== integração ERP ===== */
.tok-box { display: flex; gap: 8px; align-items: center; background: var(--brand-soft); border: 1px dashed var(--brand); border-radius: 8px; padding: 8px 10px; }
.tok-box code { flex: 1; word-break: break-all; font-size: 12.5px; background: none; }
.erp-side { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.erp-inv { border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 8px; padding: 7px 9px; margin-top: 6px; font-size: 13px; }
.erp-inv.vencido { border-left-color: var(--danger); } .erp-inv.pago { border-left-color: #16a34a; }
.seg.sm button { padding: 4px 8px; font-size: 12px; }
