/* AdZap — cores da logo Adconserv: azul #002E63, cinza #A3A19E */
:root {
  --navy: #002E63;
  --navy-2: #0B3F80;
  --navy-soft: #E9EFF7;
  --navy-softer: #F3F6FB;
  --silver: #A3A19E;
  --silver-soft: #F2F1EF;
  --bg: #F5F6F8;
  --panel: #FFFFFF;
  --text: #16202F;
  --text-2: #3B4556;
  --muted: #7A8292;
  --line: #E6E8EC;
  --line-2: #EFF1F4;
  --green: #1F9D63;
  --green-soft: #E6F6EE;
  --amber: #C98A12;
  --amber-soft: #FDF5E3;
  --red: #D14343;
  --red-soft: #FCEBEB;
  --note: #FFF7DB;
  --note-line: #F1DC8C;
  --bubble-out: #E7EEF8;
  --radius: 14px;
  --radius-s: 10px;
  --shadow-1: 0 1px 2px rgba(10, 25, 50, .05);
  --shadow-2: 0 2px 6px rgba(10, 25, 50, .06), 0 1px 2px rgba(10, 25, 50, .04);
  --shadow-3: 0 18px 50px rgba(10, 25, 50, .18);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }

html { height: 100%; }
body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 "Inter", "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--navy-2); }
h1 { font-size: 20px; font-weight: 650; letter-spacing: -.02em; margin: 0; }
h3 { font-size: 14px; font-weight: 600; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
h3 i { color: var(--silver); }
h3.mt { margin-top: 22px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
code { font: 12.5px ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--silver-soft); padding: 2px 6px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
::selection { background: rgba(0, 46, 99, .15); }
:focus-visible { outline: 2px solid rgba(0, 46, 99, .45); outline-offset: 2px; }

/* ---------- Barra lateral (ícones) ---------- */
body.app { display: flex; }
.rail { width: 68px; flex: none; height: 100vh; position: sticky; top: 0; background: var(--navy); display: flex; flex-direction: column; align-items: center; padding: 14px 0; z-index: 40; }
.rail-logo { width: 42px; height: 42px; border-radius: 12px; background: #fff; display: grid; place-items: center; margin-bottom: 18px; box-shadow: 0 6px 16px rgba(0, 0, 0, .18); transition: transform .3s var(--spring); }
.rail-logo:hover { transform: rotate(-6deg) scale(1.05); }
.rail-logo img { width: 30px; }
.rail nav, .rail-foot { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.rail nav { flex: 1; }
.rail a { position: relative; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: rgba(255, 255, 255, .62); font-size: 17px; transition: background .2s, color .2s, transform .2s var(--ease); }
.rail a:hover { color: #fff; background: rgba(255, 255, 255, .09); }
.rail a.on { color: var(--navy); background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); }
.rail a.out:hover { color: #FFB4B4; }
.rail a[data-tip]::after { content: attr(data-tip); position: absolute; left: 54px; top: 50%; transform: translate(-4px, -50%); background: #0E1726; color: #fff; font-size: 12px; font-weight: 500; white-space: nowrap; padding: 6px 10px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s var(--ease); }
.rail a[data-tip]:hover::after { opacity: 1; transform: translate(0, -50%); }
.me { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: #fff; background: hsl(var(--h) 45% 45%); border: 2px solid rgba(255, 255, 255, .6); }
.rail a.on .me { border-color: var(--navy); }

.main { flex: 1; min-width: 0; min-height: 100vh; }
.sim-banner { background: var(--amber-soft); color: #8A5D00; font-size: 12.5px; padding: 7px 24px; border-bottom: 1px solid #F3E2B5; }

/* ---------- Páginas ---------- */
.page { padding: 28px 32px 60px; max-width: 980px; margin: 0 auto; animation: rise .35s var(--ease); }
.page.wide { max-width: 1320px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }
.page-actions { display: flex; gap: 8px; align-items: center; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-1); }
.card + .card { margin-top: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.side-card { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; } /* mais alto que a tela: rola por dentro para chegar ao Salvar */
.side-empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.side-empty i { font-size: 30px; color: var(--silver); margin-bottom: 10px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; }
.grid-cards .card + .card { margin-top: 0; }
.grid-cards .span2 { grid-column: 1 / -1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.span2 { grid-column: span 2; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- Formulários ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
input, select, textarea { font: inherit; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; transition: border-color .15s, box-shadow .15s; width: 100%; }
input:hover, select:hover, textarea:hover { border-color: #D3D7DE; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(0, 46, 99, .09); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--navy); }
input[type=color] { width: 40px; height: 34px; padding: 2px; cursor: pointer; }
textarea { resize: vertical; }
.hint { font-size: 12px; color: var(--muted); margin: -4px 0 0; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.color-field { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.inline-form { display: flex; gap: 8px; margin-top: 12px; }
.inline-form input[name=name] { flex: 1; }
.pw { position: relative; display: block; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); cursor: pointer; padding: 6px 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 500 13.5px "Inter", sans-serif; padding: 10px 16px; border-radius: var(--radius-s); border: 1px solid var(--line); background: #fff; color: var(--text); cursor: pointer; transition: transform .12s var(--ease), background .15s, box-shadow .15s, border-color .15s, color .15s; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: #D3D7DE; box-shadow: var(--shadow-2); color: var(--text); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); box-shadow: 0 6px 16px rgba(0, 46, 99, .25); color: #fff; }
.btn.dark { background: var(--green); border-color: var(--green); color: #fff; }
.btn.dark:hover { filter: brightness(1.06); color: #fff; box-shadow: 0 6px 16px rgba(31, 157, 99, .25); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--silver-soft); box-shadow: none; }
.btn.danger { color: var(--red); }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.btn.red:hover { filter: brightness(1.06); color: #fff; box-shadow: 0 6px 16px rgba(209, 67, 67, .25); }
.danger-zone { margin-top: 10px; }
.btn.sm { padding: 7px 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.link-btn { border: 0; background: none; color: var(--navy); font: inherit; cursor: pointer; padding: 4px; }
.link-btn:hover { text-decoration: underline; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--text-2); display: grid; place-items: center; cursor: pointer; font-size: 15px; position: relative; transition: background .15s, color .15s, transform .12s; }
.icon-btn:hover { background: var(--silver-soft); color: var(--navy); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.on { background: var(--note); color: #8A6A00; }
[data-tip] { position: relative; }
.conv [data-tip]:hover::after, .composer [data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: #0E1726; color: #fff; font-size: 11.5px; font-weight: 500; white-space: nowrap; padding: 5px 9px; border-radius: 7px; pointer-events: none; z-index: 60; animation: fade .15s; }
.conv-head [data-tip]:hover::after { bottom: auto; top: calc(100% + 6px); }

/* Chaves liga/desliga */
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch span { width: 34px; height: 20px; border-radius: 20px; background: #D5D8DE; position: relative; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .25s var(--spring); }
.switch input:checked + span { background: var(--navy); }
.switch input:checked + span::after { transform: translateX(14px); }

/* Chips e etiquetas */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { cursor: pointer; }
.chip input { display: none; }
.chip span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 20px; border: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); background: #fff; transition: all .15s; }
.chip span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--silver)); }
.chip input:checked + span { border-color: var(--navy); background: var(--navy-soft); color: var(--navy); font-weight: 500; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 2px 8px; border-radius: 20px; background: color-mix(in srgb, var(--c) 14%, white); color: color-mix(in srgb, var(--c) 70%, black); margin: 1px 3px 1px 0; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; padding: 3px 9px; border-radius: 20px; background: var(--silver-soft); color: var(--text-2); }
.pill.navy { background: var(--navy-soft); color: var(--navy); }
.pill.green { background: var(--green-soft); color: #137046; }
.pill.warn { background: var(--amber-soft); color: #8A5D00; }
.pill.red { background: var(--red-soft); color: #A42828; }
.kbd { font: 600 12px ui-monospace, Consolas, monospace; background: var(--navy-soft); color: var(--navy); padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.qdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 3px; }
.copy { cursor: copy; }

/* Tabelas */
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; }
.toolbar select { width: 220px; }
.table-wrap { overflow-x: auto; margin: 0 -20px -20px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 20px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 20px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tr[data-href] { cursor: pointer; }
.table tr[data-href]:hover { background: var(--navy-softer); }
.table tr.sel { background: var(--navy-soft); }
.table tr.off { opacity: .55; }
.table .empty, .empty { text-align: center; color: var(--muted); padding: 30px; }
.av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; font-size: 13.5px; font-weight: 600; color: hsl(var(--h, 215) 45% 32%); background: hsl(var(--h, 215) 55% 92%); position: relative; vertical-align: middle; }
.av.sm { width: 28px; height: 28px; font-size: 11px; margin-right: 8px; }
.dot-online { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: var(--green); border: 2px solid #fff; }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); margin-bottom: 16px; }
.notice.ok { background: var(--green-soft); color: #145C3B; }
.notice.warn { background: var(--amber-soft); color: #7A5200; }
.notice i { margin-top: 3px; }
.status-list { list-style: none; margin: 0 0 14px; padding: 0; }
.status-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.status-list li:last-child { border-bottom: 0; }
.status-list li > span:first-child { color: var(--text-2); }
.status-list.big b { font-size: 18px; letter-spacing: -.01em; }

/* Painel */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; position: relative; overflow: hidden; box-shadow: var(--shadow-1); }
.kpi span { font-size: 12.5px; color: var(--muted); }
.kpi b { display: block; font-size: 30px; font-weight: 650; letter-spacing: -.03em; color: var(--navy); margin-top: 4px; }
.kpi i { position: absolute; right: 16px; top: 16px; font-size: 20px; color: var(--silver); opacity: .6; }
.kpi:first-child { background: var(--navy); border-color: var(--navy); }
.kpi:first-child span, .kpi:first-child i { color: rgba(255, 255, 255, .7); }
.kpi:first-child b { color: #fff; }
.period input { width: auto; padding: 7px 10px; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 170px 1fr 36px; align-items: center; gap: 10px; font-size: 12.5px; }
.bar-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.bar { height: 8px; background: var(--line-2); border-radius: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--w); background: var(--c); border-radius: 8px; animation: grow .9s var(--ease) both; transform-origin: left; }
.bar-row b { text-align: right; }

/* Filas */
.queue-list { display: flex; flex-direction: column; gap: 8px; }
.queue { border: 1px solid var(--line); border-radius: var(--radius-s); transition: box-shadow .2s, border-color .2s; }
.queue[open] { border-color: #D3D7DE; box-shadow: var(--shadow-2); }
.queue.off { opacity: .6; }
.queue.new { margin-top: 12px; border-style: dashed; }
.queue summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.queue summary::-webkit-details-marker { display: none; }
.queue summary b { font-weight: 500; flex: 1; }
.queue .chev { color: var(--muted); transition: transform .25s var(--ease); }
.queue[open] .chev { transform: rotate(180deg); }
.queue form { padding: 4px 14px 14px; animation: rise .25s var(--ease); }
.qnum { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 600; font-size: 12.5px; background: color-mix(in srgb, var(--c, var(--silver)) 16%, white); color: color-mix(in srgb, var(--c, var(--silver)) 75%, black); }
.wa-preview { background: #EFEAE2; border-radius: var(--radius-s); padding: 14px; }
.tpl-table { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; max-height: 260px; overflow: auto; }
.tpl-row { display: flex; align-items: center; gap: 8px; }
.tpl-row b { flex: 1; font-weight: 500; }

/* Respostas rápidas */
.qa-list { display: flex; flex-direction: column; }
.qa { display: flex; gap: 14px; padding: 12px 6px; border-bottom: 1px solid var(--line-2); align-items: flex-start; border-radius: 8px; transition: background .12s; }
.qa[data-href] { cursor: pointer; }
.qa[data-href]:hover { background: var(--navy-softer); }
.qa.sel { background: var(--navy-soft); }
.qa-text { font-size: 13.5px; color: var(--text-2); }

.sim-card { border: 1px dashed #E7C979; background: #FFFCF3; }
.steps { margin: 0; padding-left: 20px; line-height: 1.9; }

/* ---------- Entrada (login) ---------- */
body.guest { display: grid; place-items: center; min-height: 100vh; background: radial-gradient(1200px 600px at 10% -10%, #DCE6F3 0%, transparent 60%), radial-gradient(900px 500px at 110% 110%, #ECEBE8 0%, transparent 60%), var(--bg); }
.guest-main { width: 100%; max-width: 420px; padding: 20px; }
.guest-card { background: #fff; border-radius: 20px; padding: 36px 34px 30px; box-shadow: var(--shadow-3); animation: pop .5s var(--spring); }
.guest-logo { display: block; width: 190px; margin: 0 auto 26px; }
.guest-title { font-size: 18px; font-weight: 650; text-align: center; margin: 0 0 6px; letter-spacing: -.01em; }
.guest-sub { text-align: center; color: var(--muted); margin: 0 0 20px; font-size: 13.5px; }
.guest-note { text-align: center; color: var(--muted); font-size: 12px; margin: 18px 0 0; }
.guest-card .form { margin-top: 16px; }
.otp { display: flex; gap: 8px; justify-content: center; }
.otp input { width: 44px; height: 52px; text-align: center; font-size: 22px; font-weight: 600; padding: 0; border-radius: 12px; transition: transform .15s var(--spring), border-color .15s, box-shadow .15s; }
.otp input:focus { transform: translateY(-2px); }
.otp.shake { animation: shake .4s; }
.resend { text-align: center; margin-top: 12px; }
.dev-code { background: var(--amber-soft); color: #8A5D00; border-radius: 10px; padding: 10px 12px; font-size: 13px; text-align: center; margin-bottom: 6px; }

/* ---------- Avisos (toasts) ---------- */
.toasts { position: fixed; top: 84px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; pointer-events: none; }
.toast { pointer-events: auto; min-width: 260px; max-width: 420px; background: #fff; color: #1B2430; padding: 12px 16px 12px 40px; border-radius: 12px; border: 1px solid #E3E7ED; border-left: 4px solid #1E9E62; box-shadow: var(--shadow-3); font-size: 13.5px; line-height: 1.4; font-weight: 500; position: relative; animation: toastIn .45s var(--spring); }
.toast::before { content: "\f00c"; font: 900 13px "Font Awesome 6 Free"; position: absolute; left: 14px; top: 14px; color: #1E9E62; }
.toast.err { border-left-color: #D64545; }
.toast.err::before { content: "\f071"; color: #D64545; }
/* "info" também é a classe do painel lateral do contato (.info): aqui o aviso precisa ganhar dela (era o "quadradinho branco sem texto") */
.toasts .toast.info { width: auto; display: block; flex: none; background: #fff; color: #1B2430; border: 1px solid #E3E7ED; border-left: 4px solid #2F6FE0; animation: toastIn .45s var(--spring); }
.toasts .toast.info.hide { animation: toastOut .3s var(--ease) forwards; }
.toast.info::before { content: "\f05a"; color: #2F6FE0; }
.toast.hide { animation: toastOut .3s var(--ease) forwards; }

/* ---------- Atendimento ---------- */
body.is-chat .main { height: 100vh; overflow: hidden; }
.chat-app { display: flex; height: 100vh; }
.inbox { width: 360px; flex: none; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.inbox-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 18px 12px; }
.search { display: flex; align-items: center; gap: 10px; margin: 0 16px 12px; padding: 0 12px; background: var(--bg); border-radius: 11px; border: 1px solid transparent; transition: border-color .15s, background .15s, box-shadow .15s; }
.search:focus-within { background: #fff; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(0, 46, 99, .08); }
.search i { color: var(--muted); font-size: 13px; }
.search input { border: 0; background: transparent; padding: 10px 0; box-shadow: none !important; }
.search.flat { margin: 0; flex: 1; border: 1px solid var(--line); background: #fff; }
.search.qa-search { margin-bottom: 12px; }
.tabs { position: relative; display: flex; margin: 0 12px; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1 1 auto; border: 0; background: none; font: 500 12px "Inter", sans-serif; color: var(--muted); padding: 10px 4px 11px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 5px; transition: color .15s; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--navy); }
.tabs b:empty, .tabs b.zero { display: none; }
.tabs b { font-size: 10.5px; min-width: 18px; padding: 1px 5px; border-radius: 10px; background: var(--silver-soft); color: var(--text-2); transition: transform .3s var(--spring), background .2s; }
.tabs button.on b { background: var(--navy); color: #fff; }
.tabs b.bump { animation: bump .45s var(--spring); }
.tabs-ink { position: absolute; bottom: -1px; height: 2px; background: var(--navy); border-radius: 2px; transition: left .3s var(--ease), width .3s var(--ease); }
.inbox-filters { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; }
.inbox-filters select { padding: 6px 10px; font-size: 12.5px; width: auto; max-width: 220px; border-radius: 8px; }
.ticket-list { flex: 1; overflow-y: auto; padding: 4px 8px 16px; }
.ticket { display: flex; gap: 12px; padding: 11px 10px; border-radius: 12px; cursor: pointer; position: relative; transition: background .15s, transform .15s var(--ease); animation: rise .3s var(--ease) both; }
.ticket:hover { background: var(--navy-softer); }
.ticket.on { background: var(--navy-soft); }
.ticket .qbar { position: absolute; left: -4px; top: 8px; bottom: 8px; width: 14px; cursor: default; z-index: 2; }
.ticket .qbar::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 4px; border-radius: 4px; background: var(--c); transition: width .18s var(--ease), left .18s var(--ease); }
.ticket .qbar:hover::before { width: 6px; left: 3px; }
/* Nome do departamento, discreto, ao passar o mouse na cor */
.ticket .qbar::after { content: attr(data-q); position: absolute; left: 16px; top: 50%; transform: translate(-4px, -50%); background: rgba(14, 23, 38, .88); color: #fff; font-size: 11px; font-weight: 500; white-space: nowrap; padding: 4px 9px; border-radius: 7px; opacity: 0; pointer-events: none; transition: opacity .15s .12s, transform .2s .12s var(--ease); }
.ticket .qbar:hover::after { opacity: 1; transform: translate(0, -50%); }
.ticket .t-main { flex: 1; min-width: 0; }
.ticket .t-top { display: flex; justify-content: space-between; gap: 8px; }
.ticket .t-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket .t-time { font-size: 11.5px; color: var(--muted); flex: none; }
.ticket.unread .t-time { color: var(--green); font-weight: 600; }
.ticket .t-bottom { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-top: 2px; }
.ticket .t-prev { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket .t-draft { color: var(--green); font-weight: 600; }
.ticket.unread .t-prev { color: var(--text-2); }
.ticket .t-badge { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--green); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; animation: pop .35s var(--spring); }
/* Marcada como não lida: bolinha verde sem número */
.ticket .t-badge.dot { min-width: 12px; width: 12px; height: 12px; padding: 0; border-radius: 50%; }
/* Setinha de opções: aparece ao passar o mouse (no celular fica sempre à vista) */
.ticket .t-more { flex: none; width: 0; height: 22px; padding: 0; margin-left: -8px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; overflow: hidden; opacity: 0; transition: width .15s var(--ease), opacity .15s, margin .15s; }
.ticket:hover .t-more, .ticket .t-more:focus-visible { width: 22px; margin-left: 0; opacity: 1; }
.ticket .t-more:hover { background: var(--line); color: var(--text); }
@media (hover: none) { .ticket .t-more { width: 22px; margin-left: 0; opacity: .7; } }
.item-menu { position: fixed; z-index: 80; min-width: 200px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-3); padding: 6px; animation: pop .2s var(--spring); }
.item-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.item-menu button i { width: 16px; color: var(--muted); text-align: center; }
.item-menu button:hover, .item-menu button:focus-visible { background: var(--navy-softer); outline: none; }
.ticket .t-meta { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.ticket .t-meta span { font-size: 10.5px; padding: 1px 7px; border-radius: 10px; background: var(--silver-soft); color: var(--text-2); }
.ticket .t-meta .q { background: color-mix(in srgb, var(--c) 13%, white); color: color-mix(in srgb, var(--c) 70%, black); }
.ticket.skeleton { pointer-events: none; }
.ticket.skeleton .av, .ticket.skeleton .l1, .ticket.skeleton .l2 { background: linear-gradient(90deg, #EEF0F3 0%, #F7F8FA 50%, #EEF0F3 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.ticket.skeleton .l1, .ticket.skeleton .l2 { display: block; height: 10px; border-radius: 6px; }
.ticket.skeleton .l1 { width: 55%; margin-top: 8px; }
.ticket.skeleton .l2 { width: 80%; margin-top: 8px; position: absolute; left: 62px; top: 30px; }
.list-empty { text-align: center; color: var(--muted); padding: 50px 20px; animation: fade .3s; }
.list-empty i { display: block; font-size: 28px; color: var(--silver); margin-bottom: 10px; }

.conv { flex: 1; min-width: 0; display: flex; position: relative; background: #F1F2F4; }
.conv-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); animation: fade .4s; }
.conv-empty img { width: 92px; opacity: .22; filter: grayscale(.2); }
.conv-body { flex: 1; display: flex; flex-direction: column; min-width: 0; animation: fade .25s; }
.conv-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); min-height: 64px; }
.conv-head .back { display: grid; margin-left: -6px; color: var(--navy); }
.who { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; cursor: pointer; }
.who b { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-actions { display: flex; align-items: center; gap: 4px; }
.window-chip { font-size: 11.5px; padding: 4px 10px; border-radius: 20px; margin-right: 6px; white-space: nowrap; }
.window-chip.ok { background: var(--green-soft); color: #137046; }
.window-chip.closed { background: var(--amber-soft); color: #8A5D00; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: 42px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-3); padding: 6px; min-width: 210px; z-index: 50; opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top right; pointer-events: none; transition: opacity .15s, transform .2s var(--ease); }
.menu.open { opacity: 1; transform: none; pointer-events: auto; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 9px 10px; border-radius: 8px; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; text-align: left; }
.menu button:hover { background: var(--silver-soft); }
.menu button i { width: 16px; color: var(--muted); }

.messages { flex: 1; overflow-y: auto; padding: 18px 7% 10px; display: flex; flex-direction: column; gap: 3px; scroll-behavior: smooth; background-color: #EEF0F3; background-image: radial-gradient(rgba(0, 46, 99, .045) 1px, transparent 1px); background-size: 18px 18px; }
.day { align-self: center; font-size: 11.5px; color: var(--text-2); background: #fff; padding: 4px 12px; border-radius: 8px; margin: 12px 0 8px; box-shadow: var(--shadow-1); position: sticky; top: 4px; z-index: 2; box-sizing: border-box; min-width: 96px; text-align: center; white-space: nowrap; } /* largura igual e fundo opaco: os marcadores grudados no topo se empilham e o de baixo não pode aparecer pelas bordas ("3 Hoje 6") */
.load-more { align-self: center; margin-bottom: 8px; }
.msg { display: flex; flex-direction: column; max-width: min(68%, 640px); animation: msgIn .28s var(--ease) both; }
.msg.in { align-self: flex-start; }
.msg.out { align-self: flex-end; }
.msg + .msg.same { margin-top: -1px; }
.msg:not(.same) { margin-top: 8px; }
.bubble { padding: 7px 10px 6px; border-radius: 12px; background: #fff; box-shadow: 0 1px 1px rgba(10, 25, 50, .06); font-size: 14px; line-height: 1.45; word-wrap: break-word; overflow-wrap: anywhere; position: relative; }
.msg.in .bubble { border-top-left-radius: 4px; }
.msg.out .bubble { background: var(--bubble-out); border-top-right-radius: 4px; }
.msg.same.in .bubble { border-top-left-radius: 12px; }
.msg.same.out .bubble { border-top-right-radius: 12px; }
.bubble .author { display: block; font-size: 11.5px; font-weight: 600; color: var(--navy); margin-bottom: 1px; }
.bubble .author.bot { color: var(--silver); }
.bubble .meta { float: right; margin: 6px 0 -3px 12px; font-size: 10.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.reacts { position: absolute; bottom: -13px; right: 8px; display: inline-flex; gap: 2px; background: #fff; border-radius: 12px; padding: 1px 5px; font-size: 13px; line-height: 18px; box-shadow: 0 1px 3px rgba(10, 25, 50, .18); animation: fade .2s; }
.msg.in .reacts { right: auto; left: 8px; }
.reacts .team { opacity: .85; }
.msg.has-react { margin-bottom: 14px; }
.bubble .tick { font-size: 11px; color: var(--silver); }
.bubble .tick.read { color: #3B82F6; }
.bubble .tick.fail { color: var(--red); }
.bubble code { background: rgba(0, 0, 0, .05); }
.bubble a { color: #1D5FBF; text-decoration: underline; }
.msg.failed .bubble { box-shadow: 0 0 0 1px var(--red-soft), 0 1px 1px rgba(10, 25, 50, .06); }
.msg .err { font-size: 11px; color: var(--red); margin-top: 3px; text-align: right; }
.msg-flag { font-size: 11.5px; font-style: italic; color: var(--text-2); margin-top: 3px; display: flex; align-items: center; gap: 5px; }
.msg-flag i { font-size: 10px; }
.msg-flag[title]:not([title=""]) { cursor: help; }
.msg-flag.del { color: var(--red); }
.msg.out .msg-flag { justify-content: flex-end; }
.msg.note { align-self: center; max-width: 76%; }
.msg.note .bubble { background: var(--note); border: 1px dashed var(--note-line); box-shadow: none; font-size: 13px; }
.msg.note .bubble .author { color: #8A6A00; }
.msg.sys { align-self: center; max-width: 80%; }
.msg.sys .bubble { background: rgba(255, 255, 255, .7); box-shadow: none; font-size: 12px; color: var(--muted); text-align: center; padding: 5px 12px; white-space: pre-line; }
.msg.sys .tcomment { margin-top: 5px; background: var(--note); border: 1px dashed var(--note-line); border-radius: 12px; padding: 7px 10px 6px; text-align: left; min-width: 220px; animation: fade .25s; }
.msg.sys .tcomment > b { display: block; font-size: 11.5px; font-weight: 600; color: #8A6A00; margin-bottom: 2px; }
.msg.sys .tcomment > b i { margin-right: 4px; font-size: 10.5px; }
.msg.sys .tcomment-text { font-size: 13px; color: var(--text); white-space: pre-line; line-height: 1.45; }
.msg.sys .tcomment .meta { display: block; text-align: right; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.msg.tpl .bubble { border-left: 3px solid var(--navy); }
.tpl-btns { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.tpl-btn { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 12px; border-radius: 8px; background: rgba(255, 255, 255, .75); border: 1px solid rgba(0, 46, 99, .12); color: #0A7CBA; font-weight: 600; font-size: 13.5px; cursor: default; user-select: none; }
.tpl-btn i { font-size: 12px; }
.media-img { display: block; max-width: 300px; max-height: 320px; border-radius: 8px; margin: -3px -6px 4px; cursor: zoom-in; transition: filter .15s; }
.media-img:hover { filter: brightness(.95); }
.media-doc { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: -2px -4px 4px; border-radius: 9px; background: rgba(0, 46, 99, .05); color: var(--text) !important; text-decoration: none !important; min-width: 220px; transition: background .15s; }
.media-doc:hover { background: rgba(0, 46, 99, .09); }
.media-doc i { font-size: 24px; color: var(--navy); }
.media-doc small { display: block; color: var(--muted); font-size: 11px; }
.media-doc b { font-weight: 500; font-size: 13px; display: block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
audio { height: 36px; max-width: 280px; }
/* Transcrever áudio: botão redondo junto de responder/encaminhar; depois de transcrito, "CC" ao lado do áudio abre a janelinha */
.msg-acts .transc-btn { grid-column: 1; }
.transc-btn.on { opacity: 1; cursor: progress; color: var(--navy); }
.transc-btn.on i, .cc-btn.wait { animation: transc-pulse 1.2s ease-in-out infinite; }
@keyframes transc-pulse { 50% { opacity: .3; } }
.aud-row { display: flex; align-items: center; gap: 6px; }
.cc-btn { flex: none; height: 20px; padding: 0 5px; border: 1.5px solid currentColor; border-radius: 5px; background: transparent; color: var(--text-2);
  font: 700 10px/17px "Inter", sans-serif; letter-spacing: .3px; cursor: pointer; opacity: .75; transition: opacity .15s, color .15s; }
.cc-btn:hover { opacity: 1; color: var(--navy); }
.cc-btn.wait { cursor: progress; }
.cc-pop { position: fixed; z-index: 60; width: min(340px, calc(100vw - 16px)); max-height: 260px; display: flex; flex-direction: column; background: #fff; border-radius: 12px;
  box-shadow: var(--shadow-2); border: 1px solid var(--line); animation: pop .18s var(--spring); }
.cc-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 6px 12px; font-size: 12px; color: var(--text-2); border-bottom: 1px solid var(--line); }
.cc-head i { color: var(--muted); margin-right: 3px; }
.cc-head button { width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; font-size: 18px; line-height: 1; color: var(--muted); cursor: pointer; }
.cc-head button:hover { background: rgba(0,0,0,.06); color: var(--text); }
.cc-txt { padding: 10px 12px 12px; overflow: auto; font-size: 13.5px; line-height: 1.5; color: var(--text); white-space: pre-wrap; user-select: text; }
.to-bottom { position: absolute; right: 22px; bottom: 90px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #fff; color: var(--navy); box-shadow: var(--shadow-2); cursor: pointer; opacity: 0; transform: translateY(10px) scale(.8); pointer-events: none; transition: all .25s var(--spring); }
.to-bottom.show { opacity: 1; transform: none; pointer-events: auto; }

.composer { background: var(--panel); border-top: 1px solid var(--line); padding: 10px 14px; position: relative; }
.compose-row { display: flex; align-items: flex-end; gap: 8px; }
.compose-row.note textarea { background: var(--note); border-color: var(--note-line); }
.compose-tools { display: flex; gap: 2px; padding-bottom: 3px; }
.composer textarea { flex: 1; resize: none; max-height: 180px; min-height: 42px; padding: 10px 14px; border-radius: 12px; background: var(--bg); border-color: transparent; line-height: 1.45; }
.composer textarea:focus { background: #fff; }
.sign-switch { height: 42px; flex: none; font-size: 12.5px; font-weight: 500; color: var(--text-2); padding: 0 4px; }
.rec-bar { display: flex; align-items: center; gap: 10px; padding: 4px 2px; animation: fade .2s; }
.rec-bar .rec-label { flex: 1; color: var(--text-2); font-size: 13.5px; }
.rec-bar .rec-time { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--text); min-width: 42px; text-align: right; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: recPulse 1.2s ease-in-out infinite; }
.rec-dot.paused { animation: none; background: var(--muted); }
@keyframes recPulse { 50% { opacity: .25; transform: scale(.8); } }
.bubble .author .unsigned { font-weight: 400; opacity: .7; }
.send { width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--navy); color: #fff; cursor: pointer; font-size: 15px; transition: transform .15s var(--spring), background .15s, box-shadow .15s; flex: none; }
.send:hover { background: var(--navy-2); box-shadow: 0 6px 16px rgba(0, 46, 99, .3); }
.send:active { transform: scale(.9); }
.send.note { background: #C9A227; }
.send.busy i { animation: fly .6s var(--ease); }
.closed-bar, .window-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; margin-bottom: 8px; font-size: 13px; animation: rise .25s var(--ease); }
.closed-bar { background: var(--silver-soft); color: var(--text-2); }
.window-bar { background: var(--amber-soft); color: #7A5200; }
#b-nota-janela { margin-left: auto; }
.quick { position: absolute; left: 14px; right: 14px; bottom: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-3); max-height: 280px; overflow-y: auto; padding: 6px; z-index: 20; animation: popUp .2s var(--ease); }
.quick button { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 13px; color: var(--text-2); }
.quick button.on, .quick button:hover { background: var(--navy-soft); }
.quick button span:last-child { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.attach-preview { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--navy-softer); border: 1px solid var(--navy-soft); border-radius: 10px; margin-bottom: 8px; animation: rise .2s var(--ease); }
.attach-preview img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.attach-preview .ap-info { flex: 1; min-width: 0; font-size: 13px; }
.attach-preview .ap-info b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Chat interno: vários anexos (um por linha) e destaque ao arrastar arquivo para a conversa */
#t-attach { flex-direction: column; align-items: stretch; gap: 6px; max-height: 210px; overflow-y: auto; }
#t-attach .t-att-item { display: flex; align-items: center; gap: 12px; }
#t-body.t-drop { position: relative; }
#t-body.t-drop::after { content: "Solte para anexar"; position: absolute; inset: 8px; z-index: 5; display: grid; place-items: center; border: 2px dashed var(--navy); border-radius: 12px; background: rgba(242, 245, 250, .88); color: var(--navy); font-weight: 600; font-size: 15px; pointer-events: none; }

.info { width: 320px; flex: none; background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; animation: slideIn .28s var(--ease); }
.info header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); min-height: 64px; }
.info-body { padding: 20px; overflow-y: auto; }
.info-card { text-align: center; padding-bottom: 16px; border-bottom: 1px solid var(--line-2); margin-bottom: 16px; }
.info-card .av { width: 72px; height: 72px; font-size: 24px; margin-bottom: 10px; }
.info-card b { display: block; font-size: 15px; }
.info-rows { display: flex; flex-direction: column; gap: 12px; font-size: 13px; }
.info-rows div span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }

/* Modais */
.modal { position: fixed; inset: 0; background: rgba(10, 20, 40, .35); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 100; padding: 20px; animation: fade .2s; }
.modal[hidden] { display: none; }
.modal-card { background: #fff; border-radius: 18px; padding: 24px; width: 100%; max-width: 480px; box-shadow: var(--shadow-3); display: flex; flex-direction: column; gap: 14px; animation: pop .3s var(--spring); max-height: calc(100vh - 40px); overflow-y: auto; }
.modal-card.sm { max-width: 380px; text-align: center; }
.modal-card h3 { font-size: 16px; margin: 0; justify-content: inherit; }
.modal-card p { margin: 0; }
.modal-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-size: 20px; margin: 0 auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.modal-card.sm .modal-actions { justify-content: center; }
.modal-card.sm h3 { justify-content: center; }
.modal.closing { animation: fadeOut .18s forwards; }
.modal.closing .modal-card { animation: popOut .18s forwards; }
.tpl-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.tpl-item { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 12px; cursor: pointer; font: inherit; transition: all .15s; }
.tpl-item:hover { border-color: #D3D7DE; }
.tpl-item.on { border-color: var(--navy); background: var(--navy-softer); box-shadow: 0 0 0 3px rgba(0, 46, 99, .08); }
.tpl-item b { font-size: 13px; display: flex; justify-content: space-between; }
.tpl-item small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; white-space: pre-line; max-height: 54px; overflow: hidden; }
.pick-list { display: flex; flex-direction: column; gap: 2px; margin-top: -6px; max-height: 190px; overflow-y: auto; }
.pick-list button { display: flex; justify-content: space-between; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 13px; text-align: left; }
.pick-list button:hover, .pick-list button.on { background: var(--navy-soft); }
.pick-list button small { color: var(--muted); }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.lightbox { position: fixed; inset: 0; background: rgba(5, 10, 20, .85); display: grid; place-items: center; z-index: 150; cursor: zoom-out; animation: fade .2s; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: calc(100vh - 110px); border-radius: 10px; animation: pop .3s var(--spring); cursor: zoom-in; touch-action: none; user-select: none; will-change: transform; }
.lightbox { cursor: default; overflow: hidden; }
.lightbox img.zoomed { cursor: grab; border-radius: 0; }
.lightbox img.grabbing { cursor: grabbing; }
.lb-bar { position: fixed; top: 0; left: 0; right: 0; height: 56px; display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 0 14px; background: linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, 0)); z-index: 2; }
.lb-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .5); color: #fff; font-size: 17px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .18); cursor: pointer; display: grid; place-items: center; transition: background .15s; }
.lb-btn:hover { background: rgba(0, 0, 0, .72); }
/* Foto girada de lado: os limites de largura e altura trocam, para ela continuar cabendo na tela */
.lightbox img.turned { max-width: calc(100vh - 110px); max-height: 92vw; }
.lb-count { margin-right: auto; color: #fff; font-size: 14px; font-weight: 600; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.lb-nav { position: fixed; top: 50%; margin-top: -24px; width: 48px; height: 48px; font-size: 19px; z-index: 2; }
.lb-nav[hidden] { display: none; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

/* ---------- Animações ---------- */
@keyframes fade { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }
@keyframes popOut { to { opacity: 0; transform: scale(.96); } }
@keyframes popUp { from { opacity: 0; transform: translateY(6px); } }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px) scale(.985); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(16px); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes bump { 40% { transform: scale(1.35); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes fly { 50% { transform: translate(8px, -8px); opacity: 0; } 51% { transform: translate(-8px, 8px); } }
@keyframes flash { from { background: var(--navy-soft); } }
.ticket.fresh { animation: flash 1.2s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Telas menores ---------- */
@media (max-width: 1100px) {
  .info { position: absolute; right: 0; top: 0; bottom: 0; z-index: 30; box-shadow: var(--shadow-3); }
  .split { grid-template-columns: 1fr; }
  .side-card { position: static; max-height: none; overflow: visible; }
  .kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .rail { width: 56px; }
  .inbox { width: 100%; }
  .conv { position: fixed; inset: 0 0 0 56px; z-index: 35; transform: translateX(100%); transition: transform .3s var(--ease); }
  .chat-app.viewing .conv { transform: none; }
  .window-chip { display: none; }
  .page { padding: 20px 16px 40px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .grid-cards { grid-template-columns: 1fr; }
  .messages { padding: 14px 10px; }
  .msg { max-width: 86%; }
}

/* ---------- Chat interno ---------- */
.rail-badge { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #E5484D; color: #fff; font: 700 10px/17px "Inter", sans-serif; text-align: center; box-shadow: 0 0 0 2px var(--navy); }
.rail-badge.bump { animation: bump .45s var(--spring); }
.inbox-sub { margin: -6px 18px 10px; font-size: 12px; color: var(--muted); }
/* Abas Conversas | Grupos: o número é de conversas com mensagem não lida (verde, igual ao selo da lista) */
.team-tabs { margin-bottom: 6px; }
.team-tabs b, .team-tabs button.on b { background: var(--green); color: #fff; }
.team-tabs b.dot { min-width: 8px; width: 8px; height: 8px; padding: 0; font-size: 0; border-radius: 50%; }
.team-av { background: var(--g-bg, var(--navy)) !important; color: var(--g-fg, #fff) !important; font-size: 15px; }
.empty-ico { font-size: 54px; color: var(--silver); opacity: .5; }
.team-msgs .msg.out .bubble { background: var(--navy); color: #fff; }
.team-msgs .msg.out .bubble .meta { color: rgba(255, 255, 255, .65); }
/* Texto selecionado no balão azul-marinho: a seleção padrão (azul-marinho clarinho) sumia no fundo */
.team-msgs .msg.out .bubble ::selection, .team-msgs .msg.out .bubble::selection { background: rgba(255, 255, 255, .9); color: var(--navy); }
.team-msgs .msg.out .bubble a { color: #CFE1FF; }
.team-msgs .msg.out .media-doc { background: rgba(255, 255, 255, .12); color: #fff !important; }
.team-msgs .msg.out .media-doc i, .team-msgs .msg.out .media-doc small { color: rgba(255, 255, 255, .8); }
/* Editar / apagar para todos */
.msg.gone .bubble { background: #F4F5F7 !important; color: var(--muted) !important; box-shadow: inset 0 0 0 1px #E3E7ED; }
.gone-text { font-style: italic; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.gone-text i { font-size: 12px; }
.msg.gone .bubble .meta { color: var(--muted) !important; }
.bubble .meta .edited { font-size: 10px; font-style: italic; opacity: .85; }
.modal-icon.danger { background: var(--red-soft); color: var(--red); }
/* Botões ao passar o mouse (responder, encaminhar, editar, apagar): ao lado do balão, quantos forem */
.team-msgs .msg.out .msg-acts { left: auto; right: calc(100% + 8px); }
.team-msgs .msg.in .msg-acts { right: auto; left: calc(100% + 8px); }
.team-msgs .msg.gone .msg-acts { display: none; }
/* Citação e "Encaminhada" dentro do balão azul-marinho */
.team-msgs .msg.out .quote { background: rgba(255, 255, 255, .12); border-left-color: #CFE1FF; }
.team-msgs .msg.out .quote b { color: #CFE1FF; }
.team-msgs .msg.out .quote span { color: rgba(255, 255, 255, .82); }
.team-msgs .msg.out .fwd-label { color: rgba(255, 255, 255, .75); }
.team-msgs .msg.replying .bubble { box-shadow: 0 0 0 2px var(--navy), 0 0 0 4px #CFE1FF; }
/* Encaminhar: marcar um ou vários destinos */
.fwd-pick .fwd-check { color: #D5DAE1; font-size: 16px; transition: color .15s; }
.fwd-pick button.on .fwd-check { color: var(--green); }
/* Tiques de leitura (só admin): ✓ ninguém, ✓✓ alguns, ✓✓ azul todos; o clique abre "Visualizado por" */
.bubble .rd { border: 0; background: none; padding: 0 0 0 2px; margin: 0; font-size: 11px; line-height: 1; color: rgba(255, 255, 255, .6); cursor: pointer; }
.bubble .rd.all { color: #7CC4FF; }
.bubble .rd:hover { color: #fff; }
.rd-pop { position: fixed; z-index: 60; width: 240px; max-height: 320px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-3); padding: 12px 14px; font-size: 13px; animation: pop .25s var(--spring); }
.rd-pop[hidden] { display: none !important; }
.rd-pop b { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.rd-pop b i { color: #3B82F6; }
.rd-pop b.not { margin-top: 10px; }
.rd-pop b.not i { color: var(--silver); }
.rd-pop ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rd-pop li { display: flex; align-items: center; gap: 8px; }
.rd-pop .av.sm { width: 24px; height: 24px; font-size: 10px; }
.rd-pop p { margin: 0; }

/* ---------- Agendamentos ---------- */
.pop-in { animation: pop .35s var(--spring); }
.seg { display: flex; background: var(--bg); border-radius: 11px; padding: 3px; gap: 3px; }
.seg label { flex: 1; cursor: pointer; }
.seg input { display: none; }
.seg span { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 10px; border-radius: 9px; font-size: 13px; color: var(--muted); transition: all .2s var(--ease); }
.seg input:checked + span { background: #fff; color: var(--navy); font-weight: 500; box-shadow: var(--shadow-2); }
.seg input:disabled + span { opacity: .45; cursor: not-allowed; }
.sched-list { display: flex; flex-direction: column; gap: 10px; }
.card + .sched-list { margin-top: 16px; }
.sched { display: flex; align-items: center; gap: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; transition: box-shadow .2s, transform .2s var(--ease), border-color .2s; animation: rise .3s var(--ease) both; }
.sched:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.sched.sel { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(0, 46, 99, .08); }
.sched.past { opacity: .7; }
.sched-when { width: 58px; flex: none; text-align: center; background: var(--navy-soft); border-radius: 10px; padding: 7px 0; color: var(--navy); }
.sched.past .sched-when { background: var(--silver-soft); color: var(--text-2); }
.sched-when b { display: block; font-size: 16px; letter-spacing: -.02em; }
.sched-when span { font-size: 11.5px; }
.sched-main { flex: 1; min-width: 0; }
.sched-title { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.sched-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.sched-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.sched-actions { display: flex; gap: 2px; }
.sched-actions form { margin: 0; }
.sched-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.sched-stats div { background: var(--bg); border-radius: 10px; padding: 12px; text-align: center; }
.sched-stats b { display: block; font-size: 22px; color: var(--navy); }
.sched-stats span { font-size: 12px; color: var(--muted); }

/* ---------- Relatórios ---------- */
.report-filters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.report-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.report { text-align: left; display: flex; flex-direction: column; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; cursor: pointer; font: inherit; color: var(--text); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; animation: rise .35s var(--ease) both; }
.report:nth-child(2) { animation-delay: .04s; } .report:nth-child(3) { animation-delay: .08s; } .report:nth-child(4) { animation-delay: .12s; } .report:nth-child(5) { animation-delay: .16s; } .report:nth-child(6) { animation-delay: .2s; }
.report:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: #D3D7DE; }
.report:active { transform: scale(.98); }
.report > i { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--navy-soft); color: var(--navy); font-size: 16px; margin-bottom: 4px; }
.report b { font-size: 14.5px; }
.report span { font-size: 12.5px; color: var(--muted); flex: 1; }
.report em { font-style: normal; font-size: 12.5px; font-weight: 500; color: var(--navy); margin-top: 6px; }
.report.featured { background: var(--navy); border-color: var(--navy); color: #fff; }
.report.featured > i { background: rgba(255, 255, 255, .14); color: #fff; }
.report.featured span { color: rgba(255, 255, 255, .72); }
.report.featured em { color: #fff; }
.wide-form input[name=contato] { flex: 2; }
.wide-form input[type=date] { width: 160px; }
@media (max-width: 900px) { .report-grid, .report-filters { grid-template-columns: 1fr 1fr; } }

/* ---------- Conversa para PDF ---------- */
body.print-page { background: #E9EBEF; }
.print-bar { position: sticky; top: 0; display: flex; justify-content: center; padding: 14px; background: rgba(233, 235, 239, .9); backdrop-filter: blur(6px); z-index: 5; }
.print-doc { max-width: 800px; margin: 0 auto 40px; background: #fff; padding: 40px 48px; border-radius: 6px; box-shadow: var(--shadow-3); }
.print-head { display: flex; gap: 24px; align-items: center; border-bottom: 2px solid var(--navy); padding-bottom: 18px; margin-bottom: 18px; }
.print-head img { width: 150px; }
.print-head h1 { font-size: 17px; color: var(--navy); margin-bottom: 4px; }
.print-head p { margin: 2px 0; font-size: 12.5px; color: var(--text-2); }
.print-day { text-align: center; font-size: 11.5px; font-weight: 600; color: var(--muted); margin: 16px 0 8px; }
.print-msg { padding: 7px 12px; border-left: 3px solid var(--silver); margin: 6px 0; break-inside: avoid; }
.print-msg.out { border-left-color: var(--navy); background: var(--navy-softer); }
.pm-who { font-size: 12px; font-weight: 600; color: var(--navy); }
.print-msg.in .pm-who { color: var(--text-2); }
.pm-who span { font-weight: 400; color: var(--muted); margin-left: 6px; }
.pm-text { font-size: 13px; margin-top: 2px; }
.pm-file { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
@media print {
  @page { margin: 14mm; }
  body.print-page { background: #fff; }
  .print-bar { display: none; }
  .print-doc { box-shadow: none; padding: 0; max-width: none; margin: 0; }
  .print-msg.out { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Contato não confirmado ---------- */
.unverified { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 10px; background: var(--amber-soft) !important; color: #8A5D00 !important; vertical-align: middle; }
.who b .unverified { font-size: 11px; margin-left: 4px; }
.verify-note { background: var(--amber-soft); color: #7A5200; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; margin-bottom: 16px; line-height: 1.5; }
.verify-note i { margin-right: 4px; }
input[readonly] { background: var(--bg); color: var(--muted); }

/* ---------- Backup por período ---------- */
.backup-form { display: flex; flex-direction: column; gap: 10px; }
.backup-form .seg { flex-wrap: wrap; }
.backup-form .seg label { flex: 1 1 30%; }
.backup-form .seg span { padding: 8px 6px; font-size: 12.5px; white-space: nowrap; }
.backup-form .btn { align-self: flex-start; }

/* ---------- Página de política de privacidade ---------- */
.legal h2 { font-size: 15px; color: var(--navy); margin: 22px 0 6px; }
.legal p, .legal li { font-size: 13.5px; color: var(--text-2); line-height: 1.6; }
.legal ul { padding-left: 20px; margin: 0; }
.tpl-new { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.tpl-new summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--navy); list-style: none; display: flex; align-items: center; gap: 8px; }
.tpl-new summary::-webkit-details-marker { display: none; }
.tpl-new[open] summary { margin-bottom: 12px; }
/* Selecionar vários arquivos para baixar */
.select-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 8px; border-radius: 10px; background: var(--navy-soft); color: var(--navy); font-size: 13px; animation: rise .2s var(--ease); }
.select-bar > span { flex: 1; }
.msg.selectable { flex-direction: row; align-items: center; gap: 8px; cursor: pointer; }
.msg.out.selectable { flex-direction: row-reverse; }
.sel-box { flex: none; display: grid; place-items: center; cursor: pointer; }
.sel-box input { position: absolute; opacity: 0; pointer-events: none; }
.sel-box span { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #B9C0CC; background: #fff; transition: all .15s; display: grid; place-items: center; }
.sel-box input:checked + span { background: var(--navy); border-color: var(--navy); }
.sel-box input:checked + span::after { content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.chat-app.selecting .msg:not(.selectable):not(.day) { opacity: .45; }

/* Tela Templates */
.tpl-tbl td.right, .tpl-tbl th.right { text-align: right; }
.tpl-tbl form.inline { display: inline; }
.tpl-tbl .icon-btn { display: inline-grid; }
.icon-btn.danger:hover { background: var(--red-soft); color: var(--red); }
.tpl-name { font-weight: 500; }
/* Editar (renomear e reordenar) na tela Templates */
.tpl-tbl .tpl-handle-col { width: 0; padding-left: 0; padding-right: 0; }
.tpl-tbl .tpl-handle, .tpl-tbl .tpl-edit { display: none; }
.tpl-meta-name { display: block; font-size: 11.5px; }
.tpl-editing .tpl-tbl .tpl-show { display: none; }
.tpl-editing .tpl-tbl .tpl-edit { display: block; }
.tpl-editing .tpl-tbl .tpl-move { display: inline-flex; gap: 2px; }
.tpl-editing .tpl-tbl .tpl-handle-col { width: 32px; padding: 0 4px 0 10px; }
.tpl-editing .tpl-tbl .tpl-handle { display: inline-grid; place-items: center; width: 22px; height: 30px; color: var(--muted); cursor: grab; border-radius: 6px; }
.tpl-editing .tpl-tbl .tpl-handle:hover { background: rgba(0, 0, 0, .05); color: var(--navy); }
.tpl-editing .tpl-tbl tr.dragging { opacity: .45; }
.tpl-label-in { width: 100%; max-width: 380px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; font: inherit; font-weight: 500; background: var(--card, #fff); color: inherit; }
.tpl-label-in:focus { outline: 2px solid var(--navy); outline-offset: -1px; }
.tpl-edit-bar { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; background: var(--navy-soft); color: var(--navy); }
.tpl-edit-bar > div:first-of-type { flex: 1; }
.tpl-edit-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 700px) { .tpl-edit-bar { flex-wrap: wrap; } }
.tpl-reason { display: block; margin-top: 3px; font-size: 11.5px; }
.modal-card.tpl-card { max-width: 980px; padding: 0; gap: 0; overflow: hidden; }
.tpl-card-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.tpl-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow-y: auto; min-height: 0; }
.tpl-left { padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; border-right: 1px solid var(--line); }
.tpl-right { padding: 20px 24px; display: flex; flex-direction: column; gap: 10px; position: sticky; top: 0; align-self: start; }
.tpl-card .modal-actions { padding: 14px 24px; border-top: 1px solid var(--line); margin: 0; }
.tpl-sec { margin: 8px 0 0; font-size: 13.5px; font-weight: 600; }
.tpl-under { display: flex; justify-content: space-between; margin-top: -6px; }
.tpl-addvar { align-self: flex-start; }
.tpl-ex-title { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.tpl-examples { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--navy-softer); border: 1px solid var(--navy-soft); border-radius: 10px; }
.tpl-examples label { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.tpl-examples label + label { margin-top: 6px; }
.tpl-btn-add { display: grid; grid-template-columns: 150px 1fr auto; gap: 8px; }
.tpl-btn-add #tpl-btn-value { grid-column: 1 / 3; }
.tpl-btn-list { display: flex; flex-direction: column; gap: 6px; }
.tpl-btn-list .tb { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.tpl-btn-list .tb b { font-weight: 500; }
.tpl-btn-list .tb small { color: var(--muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-btn-list .tb .icon-btn { width: 28px; height: 28px; font-size: 13px; margin-left: auto; }
.wa-screen { background-color: #EFE7DD; background-image: radial-gradient(rgba(120, 100, 70, .07) 1px, transparent 1px); background-size: 16px 16px; border-radius: 14px; padding: 18px 16px; min-height: 120px; }
.wa-bubble { background: #fff; border-radius: 10px; border-top-left-radius: 3px; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); max-width: 330px; overflow: hidden; font-size: 14px; line-height: 1.45; color: #111B21; }
.wa-bubble .wa-head { padding: 8px 10px 0; font-weight: 700; }
.wa-bubble .wa-media { margin: 4px 4px 0; border-radius: 7px; overflow: hidden; background: #D9DEE3; color: #667781; display: grid; place-items: center; min-height: 130px; font-size: 34px; }
.wa-bubble .wa-media img { width: 100%; display: block; max-height: 260px; object-fit: cover; }
.wa-bubble .wa-doc { margin: 4px 4px 0; border-radius: 7px; background: #F5F6F6; display: flex; align-items: center; gap: 10px; padding: 12px; font-size: 13px; color: #111B21; }
.wa-bubble .wa-doc i { color: #E5483A; font-size: 24px; }
.wa-bubble .wa-body { padding: 7px 10px 2px; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.wa-bubble .wa-body.empty { color: #667781; font-style: italic; }
.wa-bubble .wa-var { background: #E1F3FB; color: #0B6B94; border-radius: 4px; padding: 0 3px; }
.wa-bubble .wa-foot { padding: 2px 10px 0; font-size: 12.5px; color: #667781; }
.wa-bubble .wa-time { text-align: right; padding: 0 8px 5px; font-size: 11px; color: #667781; }
.wa-bubble .wa-btns { border-top: 1px solid #E9EDEF; }
.wa-bubble .wa-btns div { text-align: center; color: #027EB5; font-weight: 500; font-size: 14px; padding: 9px 8px; display: flex; gap: 6px; align-items: center; justify-content: center; }
.wa-bubble .wa-btns div + div { border-top: 1px solid #E9EDEF; }
.modal-card.tpl-view-card { max-width: 440px; }
@media (max-width: 860px) {
  .tpl-cols { grid-template-columns: 1fr; }
  .tpl-left { border-right: 0; border-bottom: 1px solid var(--line); }
  .tpl-right { position: static; }
  .tpl-btn-add { grid-template-columns: 1fr; }
  .tpl-btn-add #tpl-btn-value { grid-column: auto; }
}

/* Mensagem enviada pelo Claude (API) */
.msg .meta .via-claude { font-size: 10px; opacity: .75; margin-right: 2px; }
/* Conversa conduzida pelo Claude (API): fundo lilás no Atendendo do responsável */
.ticket.ai { background: #F3EEFF; box-shadow: inset 0 0 0 1px #D9CCFF; }
.ticket.ai:hover { background: #EBE3FF; }
.ticket.ai.on { background: #E2D6FF; }
.ticket .ai-tag { color: #6B4FD8; font-weight: 600; }

/* Pedido de conversa: aviso no "+ Nova" e cartões para quem está com a conversa */
.busy-box { background: var(--amber-soft); color: #7A5200; border-radius: 12px; padding: 12px 14px; font-size: 13px; display: flex; flex-direction: column; gap: 10px; animation: rise .25s var(--ease) both; }
.busy-box p { margin: 0; }
.busy-box p i { margin-right: 6px; }
.busy-box .ask { border-top: 1px solid #F3E2B5; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.busy-box .ask div, .req-card .acts { display: flex; gap: 8px; }
.req-stack { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 190; max-width: 360px; }
.req-card { background: #fff; border-radius: 14px; box-shadow: var(--shadow-3); border-left: 4px solid var(--amber); padding: 14px 16px; font-size: 13.5px; display: flex; flex-direction: column; gap: 10px; animation: toastIn .45s var(--spring); }
.req-card b.t { display: block; font-size: 14px; }
.req-card small { color: var(--muted); }
.req-card .acts { justify-content: flex-end; }
.attach-preview .ap-list { margin: 4px 0; padding-left: 20px; max-height: 140px; overflow-y: auto; }
.attach-preview .ap-list li { padding: 1px 0; }
.attach-preview .ap-list li > * { vertical-align: middle; }
.attach-preview .ap-list span { display: inline-block; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-preview .ap-list button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 4px; font-size: 11px; }
.attach-preview .ap-list button:hover { color: var(--red, #C0392B); }

/* ==================== EASTER EGGS (início) — remover junto com o bloco do app.js ==================== */
/* 1) Grãos de café saindo da logo */
.egg-bean { position: fixed; z-index: 300; pointer-events: none; border-radius: 50% / 45%; background: radial-gradient(circle at 35% 30%, #8B5E3C, #5A3A22 60%, #3E2716); box-shadow: inset -1px -2px 3px rgba(0, 0, 0, .35); animation: eggBean 4s cubic-bezier(.2, .7, .4, 1) forwards; }
.egg-bean::after { content: ""; position: absolute; left: 46%; top: 12%; width: 2px; height: 76%; border-radius: 50%; border-left: 2px solid #2B1A0E; transform: rotate(8deg); opacity: .8; }
@keyframes eggBean {
  0% { opacity: 0; transform: translate(0, 0) scale(.3) rotate(0); }
  6% { opacity: 1; }
  22% { transform: translate(var(--px), var(--py)) scale(1) rotate(calc(var(--rot) * .25)); animation-timing-function: ease-in-out; }
  45% { transform: translate(calc(var(--px) + var(--dx) * .3 - 14px), calc(var(--py) * .55)) rotate(calc(var(--rot) * .45)); }
  65% { transform: translate(calc(var(--px) + var(--dx) * .6 + 14px), calc(var(--py) * .1)) rotate(calc(var(--rot) * .65)); }
  85% { opacity: .9; }
  100% { opacity: 0; transform: translate(calc(var(--px) + var(--dx)), var(--rise)) scale(.85) rotate(var(--rot)); }
}
@media (prefers-reduced-motion: reduce) { .egg-bean { display: none; } }
/* 2) Xícaras de café (busca "café") */
.egg-cups { position: fixed; left: 82px; bottom: 22px; z-index: 300; background: #fff; border-radius: 14px; box-shadow: var(--shadow-3); padding: 12px 16px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; opacity: 0; transform: translateY(12px) scale(.96); transition: opacity .25s, transform .3s var(--ease); }
.egg-cups.in { opacity: 1; transform: none; }
.egg-cups.out { opacity: 0; transform: translateY(12px) scale(.96); }
.egg-cups-row { display: flex; gap: 14px; }
.egg-cup { position: relative; width: 26px; height: 24px; border: 2.5px solid #5A3A22; border-top-width: 0; border-radius: 0 0 9px 9px; overflow: visible; }
.egg-cup-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(#8B5E3C, #5A3A22); border-radius: 0 0 6px 6px; transition: height .9s cubic-bezier(.3, .8, .4, 1); }
.egg-cup.full .egg-cup-fill { height: 82%; }
.egg-cup.pour .egg-cup-fill { transition-delay: .15s; }
.egg-cup-handle { position: absolute; right: -9px; top: 4px; width: 8px; height: 11px; border: 2.5px solid #5A3A22; border-left: 0; border-radius: 0 6px 6px 0; }
.egg-cup.full::before, .egg-cup.full::after { content: ""; position: absolute; bottom: 100%; width: 3px; height: 12px; border-radius: 3px; background: rgba(90, 58, 34, .25); animation: eggSteam 1.6s ease-in-out infinite; }
.egg-cup.full::before { left: 7px; }
.egg-cup.full::after { left: 14px; animation-delay: .5s; }
.egg-cups-msg { font-size: 12px; color: var(--text-2); }
.egg-cups.done .egg-cups-msg { color: #5A3A22; font-size: 13px; }
.egg-cups.done .egg-cups-row { animation: eggCheers .6s var(--spring) .9s; }
@keyframes eggSteam { 0% { opacity: 0; transform: translateY(4px) scaleY(.6); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px) scaleY(1.1); } }
@keyframes eggCheers { 0%, 100% { transform: none; } 40% { transform: scale(1.12) rotate(-3deg); } 70% { transform: scale(.98) rotate(2deg); } }
/* 3) Aviãozinho de papel (arrastar mensagem do chat interno até a logo) */
.team-msgs .bubble .meta[draggable="true"] { cursor: grab; }
body.egg-dragging .rail-logo { outline: 2px dashed rgba(255, 255, 255, .55); outline-offset: 3px; border-radius: 12px; }
.rail-logo.egg-drop { transform: scale(1.12); transition: transform .15s; }
.msg.egg-flown .bubble { animation: eggWiggle .8s ease; }
@keyframes eggWiggle { 0%, 100% { transform: none; } 25% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } 75% { transform: rotate(-1deg); } }
.egg-plane { position: fixed; z-index: 300; pointer-events: none; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .18)); animation: eggPlane 2.6s cubic-bezier(.45, .05, .55, .95) forwards; }
@keyframes eggPlane {
  0% { opacity: 0; transform: translate(0, 0) scale(.4) rotate(-10deg); }
  10% { opacity: 1; transform: translate(30px, 10px) scale(1) rotate(-5deg); }
  35% { transform: translate(calc(var(--fx) * .3), calc(var(--fy) * .9)) rotate(12deg); }
  55% { transform: translate(calc(var(--fx) * .45), calc(var(--fy) * .35)) rotate(-160deg); }
  70% { transform: translate(calc(var(--fx) * .55), calc(var(--fy) * .7)) rotate(-340deg); }
  100% { opacity: 1; transform: translate(var(--fx), calc(var(--fy) * -.4)) rotate(-375deg); }
}
@media (prefers-reduced-motion: reduce) { .egg-plane { display: none; } .egg-cups .egg-cup::before, .egg-cups .egg-cup::after { display: none; } }
/* 4) Leão espiando por baixo da tela (clique em "IRPF" / "imposto de renda" numa mensagem) */
.egg-peek { position: fixed; bottom: -14px; z-index: 300; pointer-events: none; transform: translate(-50%, 100%); animation: eggPeek 1.8s cubic-bezier(.3, .7, .3, 1) forwards; }
.egg-peek svg { display: block; filter: drop-shadow(0 -4px 10px rgba(0, 0, 0, .12)); }
.egg-peek-pupil { animation: eggPeekLook 1s ease-in-out .4s; }
.egg-peek-mane { transform-box: fill-box; transform-origin: 50% 50%; animation: eggPeekMane 1s ease-in-out .4s; }
@keyframes eggPeek {
  0% { transform: translate(-50%, 100%); }
  22% { transform: translate(-50%, 0); }
  78% { transform: translate(-50%, 0); }
  100% { transform: translate(-50%, 100%); }
}
@keyframes eggPeekLook { 0%, 100% { transform: none; } 20%, 40% { transform: translateX(-2.5px); } 60%, 80% { transform: translateX(2.5px); } }
@keyframes eggPeekMane { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .egg-peek { display: none; } }
/* ==================== EASTER EGGS (fim) ==================== */

/* Enviar template: variáveis à esquerda, prévia ao vivo à direita */
.modal-card.wide { max-width: 880px; }
.tpl-cols { display: grid; grid-template-columns: 1fr; gap: 16px; }
.modal-card.wide .tpl-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.tpl-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.modal-card.wide .tpl-list { max-height: 240px; overflow-y: auto; }
.tpl-right { position: sticky; top: 0; display: flex; flex-direction: column; gap: 6px; }
.tpl-prev-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.wa-var { background: #E1F3FB; color: #0B6B94; border-radius: 4px; padding: 0 3px; font-weight: 600; transition: box-shadow .15s, background .15s; }
.wa-bubble .wa-var.filled { background: #FFF3C4; color: #6B4E00; }
.wa-bubble .wa-var.focus { box-shadow: 0 0 0 2px #0B6B94; }
.field > span .wa-var { font-size: 11.5px; }
@media (max-width: 760px) { .modal-card.wide .tpl-cols { grid-template-columns: 1fr; } .tpl-right { position: static; } }

/* Tela Templates: abas Templates / Ocultos */
.tpl-tabs { display: flex; gap: 4px; margin: 0 0 12px; border-bottom: 1px solid var(--line); }
.tpl-tabs a { padding: 9px 14px; color: var(--muted); font-weight: 600; font-size: 13.5px; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 6px; align-items: center; }
.tpl-tabs a:hover { color: var(--ink, #1B2430); }
.tpl-tabs a.on { color: var(--navy); border-bottom-color: var(--navy); }

/* Responder uma mensagem específica */
.msg { position: relative; }
.reply-btn { position: absolute; top: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: #fff; color: var(--text-2); box-shadow: var(--shadow-1); cursor: pointer; opacity: 0; transition: opacity .15s, transform .15s; z-index: 1; display: grid; place-items: center; font-size: 12px; }
.msg.in .reply-btn { right: -36px; }
.msg.out .reply-btn { left: -36px; }
.msg:hover .reply-btn, .reply-btn:focus-visible { opacity: 1; }
.reply-btn:hover { color: var(--navy); transform: scale(1.08); }
.msg.replying .bubble { box-shadow: 0 0 0 2px var(--navy); }
.msg.flash .bubble { animation: msgFlash 1.4s ease; }
@keyframes msgFlash { 0%, 40% { box-shadow: 0 0 0 3px rgba(0, 46, 99, .35); } 100% { box-shadow: 0 1px 1px rgba(10, 25, 50, .06); } }
.quote { display: block; border-left: 4px solid #06CF9C; background: rgba(0, 0, 0, .045); border-radius: 6px; padding: 5px 8px; margin: 2px 0 5px; cursor: pointer; font-size: 12.5px; line-height: 1.35; max-height: 62px; overflow: hidden; }
.quote.q-out { border-left-color: var(--navy); }
.quote b { display: block; font-size: 12px; color: #06A07A; }
.quote.q-out b { color: var(--navy); }
.quote span { color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.reply-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 6px 6px 6px 10px; background: var(--navy-softer, #F2F5FA); border-radius: 10px; border-left: 4px solid var(--navy); animation: msgIn .2s var(--ease) both; }
.reply-bar .rb-quote { flex: 1; min-width: 0; font-size: 12.5px; }
.reply-bar .rb-quote b { display: block; color: var(--navy); font-size: 12px; }
.reply-bar .rb-quote span { display: block; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { .reply-btn { opacity: 1; position: static; align-self: flex-end; margin-bottom: 2px; } }

/* Painel: conversas de cada atendente */
.u-row { cursor: pointer; }
.u-row:hover td { background: var(--navy-softer, #F2F5FA); }
.u-caret { font-size: 11px; color: var(--text-2); transition: transform .15s; margin-right: 4px; }
.u-row.open .u-caret { transform: rotate(90deg); }
.u-tickets td { background: #FAFBFC; padding: 8px 12px 12px !important; }
.u-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.u-tk { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: 10px; background: #fff; border: 1px solid #E3E7ED; border-left: 4px solid var(--c); text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.u-tk:hover { box-shadow: var(--shadow-2, 0 4px 12px rgba(10, 25, 50, .08)); transform: translateY(-1px); }
.u-tk b { font-size: 13.5px; }
.u-tk .u-prev { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-tk small { font-size: 11.5px; color: var(--muted); }

/* Encaminhar */
.msg-acts { position: absolute; top: 4px; display: grid; grid-template-columns: repeat(2, 28px); grid-auto-rows: 28px; gap: 4px; opacity: 0; transition: opacity .15s; z-index: 1; }
.msg.in .msg-acts { right: -68px; }
.msg.out .msg-acts { left: -68px; }
.msg:hover .msg-acts, .msg-acts:focus-within { opacity: 1; }
.msg-acts .reply-btn { position: static; opacity: 1; }
.fwd-label { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-style: italic; color: var(--text-2); margin-bottom: 2px; }
.fwd-label i { font-size: 10px; }
.fwd-mode .msg.fwd-able { cursor: pointer; padding-left: 30px; }
.fwd-mode .msg.out.fwd-able { padding-left: 0; padding-right: 30px; }
.fwd-box { position: absolute; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 6px; border: 2px solid #B8C0CC; background: #fff; display: grid; place-items: center; color: transparent; font-size: 11px; }
.msg.in .fwd-box { left: 0; }
.msg.out .fwd-box { right: 0; }
.msg.fwd-on .fwd-box { background: var(--navy); border-color: var(--navy); color: #fff; }
.msg.fwd-on .bubble { box-shadow: 0 0 0 2px var(--navy); }
.fwd-mode .msg-acts { display: none; }
.fwd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-sel { display: inline-flex; align-items: center; gap: 6px; background: var(--navy-softer, #F2F5FA); color: var(--navy); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 12.5px; font-weight: 600; }
.chip-sel button { border: 0; background: transparent; color: var(--navy); cursor: pointer; width: 20px; height: 20px; border-radius: 50%; }
.chip-sel button:hover { background: rgba(0, 46, 99, .1); }
@media (max-width: 760px) { .msg-acts { opacity: 1; position: static; align-self: flex-end; } }

/* Bonequinhos (Minha conta → Meu bonequinho) */
.av > img, .me > img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.me.has-img { background: transparent; }
.author-av { width: 18px; height: 18px; border-radius: 50%; vertical-align: -4px; margin-right: 5px; }
.author-av.ini { display: inline-flex; align-items: center; justify-content: center; background: var(--navy); color: #fff; font-size: 8.5px; font-weight: 700; letter-spacing: -.2px; }
.avatar-grid { display: grid; grid-template-columns: repeat(5, max-content); gap: 6px; align-items: center; margin-bottom: 12px; }
.avatar-group { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.avatar-grid label { position: relative; cursor: pointer; border-radius: 50%; padding: 3px; border: 2px solid transparent; transition: border-color .15s, transform .15s; line-height: 0; }
.avatar-grid label:hover { transform: scale(1.06); }
.avatar-grid label:has(input:checked) { border-color: var(--navy); }
.avatar-grid input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-grid img, .avatar-grid .av { width: 50px; height: 50px; }
.avatar-grid .av { font-size: 18px; }
.team-pick { max-height: 320px; margin-top: -4px; }
.team-pick button { align-items: center; }
.who-pick { display: inline-flex; align-items: center; }

/* PDF: "Visualizar" / "Nova aba" / "Download" ao passar o mouse, e o visualizador dentro do AdZap */
.media-doc.is-pdf { position: relative; cursor: pointer; min-width: 310px; }
.doc-acts { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 9px; background: rgba(0, 46, 99, .82); opacity: 0; pointer-events: none; transition: opacity .15s; }
.media-doc.is-pdf:hover .doc-acts, .media-doc.is-pdf:focus-within .doc-acts { opacity: 1; pointer-events: auto; }
.doc-acts button, .doc-acts a { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 7px; padding: 6px 10px; font: 500 12px "Inter", sans-serif; background: #fff; color: var(--navy) !important; text-decoration: none !important; cursor: pointer; }
.doc-acts i { font-size: 12px !important; color: inherit !important; }
.doc-acts button:hover, .doc-acts a:hover { background: #E8EEF7; }
.pdfbox { position: fixed; inset: 0; z-index: 150; background: rgba(5, 10, 20, .85); display: flex; flex-direction: column; animation: fade .2s; }
.pdfbox[hidden] { display: none; }
.pdf-bar { height: 56px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 14px; color: #fff; }
.pdf-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.pdf-name i { font-size: 20px; color: #FF8A80; }
.pdf-name b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-stage { flex: 1; min-height: 0; padding: 0 14px 14px; position: relative; display: flex; justify-content: center; }
.pdf-stage iframe { width: min(1100px, 100%); height: 100%; border: 0; border-radius: 10px; background: #fff; animation: pop .3s var(--spring); }
.pdfbox.loading iframe { visibility: hidden; }
.pdf-loading { position: absolute; top: 40%; left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; display: none; }
.pdfbox.loading .pdf-loading { display: block; }
.print-frame { position: fixed; right: 0; bottom: 0; width: 0; height: 0; border: 0; visibility: hidden; }

/* ---------- Post-its (post-its) ---------- */
.papeis-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.papeis-tabs a { padding: 9px 14px 10px; font-size: 13px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 6px; align-items: center; }
.papeis-tabs a:hover { color: var(--text); }
.papeis-tabs a.on { color: var(--navy); border-bottom-color: var(--navy); }
.papeis-tabs b { font-size: 10.5px; min-width: 18px; padding: 1px 5px; border-radius: 10px; background: var(--silver-soft); color: var(--text-2); text-align: center; }
.papeis-tabs b:empty { display: none; }
.papeis-filtro { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.papeis-filtro select { width: auto; min-width: 220px; }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.pp-grupo { font-size: 14px; margin: 22px 0 10px; }
.pp-grupo:first-child { margin-top: 0; }
.pp-grupo.pr3 { color: #C42B30; }
.papel { position: relative; background: var(--c); border-radius: 3px 3px 14px 3px; padding: 16px 16px 10px; min-height: 170px; display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 8px 18px -8px rgba(0,0,0,.25); transform: rotate(-.6deg); transition: transform .2s var(--ease), box-shadow .2s, opacity .25s; animation: pop .3s var(--spring); }
.papel:nth-child(2n) { transform: rotate(.7deg); }
.papel:nth-child(3n) { transform: rotate(-.2deg); }
.papel:hover { transform: rotate(0) translateY(-2px); box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 14px 26px -10px rgba(0,0,0,.3); }
.papel::before { content: ""; position: absolute; top: -7px; left: 50%; width: 64px; height: 16px; margin-left: -32px; background: rgba(255,255,255,.55); box-shadow: 0 1px 2px rgba(0,0,0,.08); transform: rotate(-2deg); }
.papel.urgente { box-shadow: 0 0 0 2px #E5484D, 0 8px 18px -8px rgba(229,72,77,.45); }
.papel.novo { outline: 2px dashed rgba(0,46,99,.45); outline-offset: 3px; }
.papel.feito .pp-txt { text-decoration: line-through; opacity: .6; }
.papel.saindo { opacity: 0; transform: scale(.9) rotate(4deg); }
.pp-top { display: flex; flex-wrap: wrap; gap: 5px; }
.pp-tag { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 8px; background: rgba(0,0,0,.07); color: rgba(0,0,0,.65); display: inline-flex; gap: 4px; align-items: center; }
.pp-tag.urg { background: #E5484D; color: #fff; }
.pp-tag.novo { background: var(--navy); color: #fff; }
.pp-txt { flex: 1; white-space: pre-wrap; word-break: break-word; font-size: 14.5px; line-height: 1.45; color: #2B2B2B; }
.pp-conv { font-size: 12.5px; font-weight: 600; color: var(--navy); display: inline-flex; gap: 6px; align-items: center; align-self: flex-start; padding: 3px 8px; border-radius: 8px; background: rgba(255,255,255,.5); }
.pp-conv:hover { background: rgba(255,255,255,.8); }
.pp-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; border-top: 1px dashed rgba(0,0,0,.15); padding-top: 7px; }
.pp-foot small { font-size: 11.5px; color: rgba(0,0,0,.55); }
.pp-acts { display: flex; gap: 2px; opacity: .55; transition: opacity .15s; }
.papel:hover .pp-acts { opacity: 1; }
.pp-acts button { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: rgba(0,0,0,.7); cursor: pointer; display: grid; place-items: center; }
.pp-acts button:hover { background: rgba(0,0,0,.08); }
.pp-acts [data-pp="concluir"]:hover { background: #137046; color: #fff; }
.papel[draggable="true"] { cursor: grab; }
.papel.pegando { opacity: .35; }
.papeis-board.arrastando .papel { animation: none; }
.pp-faixa.vazia { display: none; }
.papeis-board.arrastando .pp-faixa.vazia { display: block; }
.papeis-board.arrastando .pp-grid { min-height: 120px; border-radius: 14px; outline: 2px dashed rgba(0,46,99,.18); outline-offset: 6px; }
.papeis-board:has(.pp-faixa) { display: flex; flex-direction: column; gap: 22px; }
.pp-faixa .pp-grupo { margin-top: 0; }
.papeis-board .empty { padding: 60px 20px; font-size: 14px; }
.papeis-board .empty i { font-size: 34px; color: var(--silver); margin-bottom: 10px; }
.papel-mini { display: inline-block; background: var(--c); padding: 3px 8px; border-radius: 3px 3px 8px 3px; color: #2B2B2B; font-size: 12.5px; }
.papel-texto { background: #FFFBEA; border: 1px solid var(--note-line); border-radius: 12px; padding: 12px; font: 14.5px/1.45 "Inter", sans-serif; resize: vertical; }
.papel-cores { display: flex; gap: 8px; }
.papel-cores input { display: none; }
.papel-cores span { display: block; width: 30px; height: 30px; border-radius: 8px; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); transition: transform .15s var(--spring); }
.papel-cores input:checked + span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--navy); transform: scale(1.08); }
.papel-prio label span { display: block; text-align: center; padding: 7px 6px; border-radius: 8px; font-size: 13px; }
.papel-prio input { display: none; }
.papel-prio input:checked + span { background: #fff; box-shadow: var(--shadow-1); color: var(--navy); font-weight: 600; }
.papel-prio label:last-child input:checked + span { color: #C42B30; }
.papel-conv { font-size: 13px; font-weight: 600; color: var(--navy); background: var(--navy-soft); padding: 7px 10px; border-radius: 10px; }
.papel-ja { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; }
.papel-ja a { background: var(--c); padding: 5px 9px; border-radius: 3px 3px 9px 3px; color: #2B2B2B; }
.papel-ja a.feito { text-decoration: line-through; opacity: .6; }
.papel-ja small { color: rgba(0,0,0,.55); }
#b-papel .papel-count { position: absolute; top: 1px; right: 0; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: #F5B400; color: #3A2C00; font: 700 9.5px/15px "Inter", sans-serif; text-align: center; }
/* Post-it: barra de negrito / itálico / checklist (abaixo do texto) */
.papel-fmt { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: -4px; }
.papel-fmt button { min-width: 30px; height: 28px; border: 1px solid var(--note-line); background: #FFFBEA; border-radius: 7px; cursor: pointer; font: 14px "Inter", sans-serif; color: #2B2B2B; }
.papel-fmt button.lista { padding: 0 9px; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.papel-fmt button:hover { background: #FFF1B8; }
.pp-txt b { font-weight: 700; }
/* Post-it: checklist (linhas "[ ] item" / "[x] item" no texto) */
.pp-txt .pp-item { display: flex; align-items: flex-start; gap: 7px; cursor: pointer; padding: 1px 0; }
.pp-txt .pp-item input { margin: 3px 0 0; width: 15px; height: 15px; flex: none; accent-color: #2B2B2B; cursor: pointer; }
.pp-txt .pp-item input:disabled { cursor: default; }
.pp-txt .pp-item.ok span { text-decoration: line-through; opacity: .55; }
.page-head.mt-rel { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
/* Configurações: registro de acessos no fim da página */
.acessos-card { margin-top: 16px; }
.acessos-filtros { display: grid; grid-template-columns: 150px 150px 1fr 1.3fr 140px auto; gap: 10px; align-items: end; margin: 6px 0 10px; }
.acessos-botoes { display: flex; gap: 6px; }
@media (max-width: 1100px) { .acessos-filtros { grid-template-columns: 1fr 1fr; } }

/* Post-its: canto "Atestados lançados" (só aparece quando há algum) */
.papeis-com-canto.tem-canto { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 22px; align-items: start; }
.atestados-canto { background: #EEF5FF; border: 1px solid #CFE2FA; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; position: sticky; top: 12px; }
.atestados-canto h3 { font-size: 13px; margin: 0; color: var(--navy); display: flex; gap: 7px; align-items: center; }
.atestados-canto h3 b { font-size: 10.5px; min-width: 18px; padding: 1px 6px; border-radius: 10px; background: var(--navy); color: #fff; text-align: center; }
.atestado-mini { background: #B9DCFF; border-radius: 3px 3px 10px 3px; padding: 9px 10px 7px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.am-txt { white-space: pre-wrap; font-size: 12.5px; line-height: 1.4; color: #2B2B2B; }
.am-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 6px; border-top: 1px dashed rgba(0,0,0,.15); padding-top: 6px; }
.am-foot small { font-size: 10.5px; color: rgba(0,0,0,.55); }
.am-foot span { display: flex; gap: 4px; align-items: center; }
.am-del { width: 26px; height: 26px; border: 0; border-radius: 7px; background: transparent; color: rgba(0,0,0,.6); cursor: pointer; }
.am-del:hover { background: rgba(0,0,0,.08); }
.atestado-mini .btn.sm { padding: 4px 9px; font-size: 11.5px; }
@media (max-width: 900px) { .papeis-com-canto.tem-canto { grid-template-columns: 1fr; } }
/* Chat interno: encaminhar para a equipe ou para o cliente (abas no modal) */
.fwd-dest-tabs { margin: 0 0 12px; }
.fwd-dest-tabs button { font-size: 13px; }
.push-cell { white-space: nowrap; }
.push-cell .push-aparelhos { display: block; font-size: 11px; margin-top: 2px; }

/* Avisos da Adélia no chat interno: só leitura (sem caixa de mensagem nem menu ⋮), balão lilás como o "Claude atendendo" */
.team.adelia-mode .composer, .team.adelia-mode #t-menu { display: none; }
.msg.ad-msg .bubble { background: #F6F2FF; box-shadow: inset 0 0 0 1px #E2D6FF; }
.msg.ad-msg .ad-para { display: block; font-size: 11.5px; font-weight: 600; color: #6B4FD8; margin-bottom: 2px; }
.msg.ad-msg .ad-para i { font-size: 10px; margin-right: 3px; }
.msg.ad-msg .ad-conv { display: flex; width: fit-content; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 10px; border-radius: 8px; border: 1px solid #D9CCFF; background: #fff; color: #5B3FC4; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.msg.ad-msg .ad-conv:hover { background: #EBE3FF; }
.msg.ad-msg .ad-conv i { color: var(--green); }
.msg.ad-msg .ad-visto { display: block; clear: both; padding-top: 4px; font-size: 11px; color: var(--muted); }
.msg.ad-msg .ad-visto.on { color: #3B82F6; }
.msg.ad-msg .ad-visto i { font-size: 10px; margin-right: 2px; }
/* Ticar o aviso como feito */
.msg.ad-msg .ad-tick { position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; border: 2px solid #C9B8FF; background: #fff; color: transparent; font-size: 14px; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.msg.ad-msg .ad-tick:hover { border-color: #7C5CE6; color: #C9B8FF; }
.msg.ad-msg .ad-tick.on { border-color: var(--green); background: var(--green); color: #fff; }
.msg.ad-msg .ad-tick.on:hover { filter: brightness(1.06); color: #fff; }
.msg.ad-msg .ad-tick:disabled { opacity: .6; cursor: wait; }
.msg.ad-msg .ad-feito { display: block; clear: both; padding-top: 4px; font-size: 11px; font-weight: 600; color: #1F7A4D; }
.msg.ad-msg .ad-feito i { font-size: 10.5px; margin-right: 2px; }
.msg.ad-done .bubble { background: #F4FAF6; box-shadow: inset 0 0 0 1px #D3EBDD; }
/* Boas-vindas da Adélia: aparece uma vez, logo depois do login */
.boas-vindas { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: rgba(10, 25, 50, .45); backdrop-filter: blur(3px); animation: bvFundo .3s var(--ease); }
.boas-vindas.sai { animation: bvSai .25s var(--ease) forwards; }
.bv-card { width: min(340px, calc(100vw - 32px)); background: #fff; border-radius: 20px; padding: 28px 26px 22px; text-align: center; box-shadow: var(--shadow-3); animation: bvEntra .5s var(--spring); }
.bv-card img { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; border: 4px solid var(--navy-soft); }
.bv-card h2 { margin: 14px 0 6px; font-size: 20px; color: var(--navy); }
.bv-card p { margin: 0; color: var(--text-2); font-size: 14.5px; }
.bv-card small { display: block; margin-top: 10px; color: var(--muted); font-size: 12px; }
.bv-card .btn { margin-top: 18px; width: 100%; }
@keyframes bvFundo { from { opacity: 0; } }
@keyframes bvEntra { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes bvSai { to { opacity: 0; } }

/* Panorama dos Post-its nas boas-vindas da Adélia */
.bv-postits { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 0; text-decoration: none; }
.bv-pi { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; text-align: left; color: var(--navy); background: #FFF6C2; transition: transform .15s var(--ease); }
.bv-pi i { width: 16px; text-align: center; }
.bv-pi.atrasado { background: #FFE1E1; color: #B42318; }
.bv-pi.hoje { background: #FFF1D6; color: #9A5B00; }
.bv-pi.urgente { background: #FFE4D2; color: #C2410C; }
.bv-pi.novo { background: #E3F0FF; color: #1D4F91; }
.bv-postits:hover .bv-pi { transform: translateX(2px); }

/* Calendário do prazo do Post-it (substitui o do Chrome, que não aceita bordas arredondadas) */
#papel-form input[name=prazo]::-webkit-calendar-picker-indicator { display: none; }
#papel-form input[name=prazo] { cursor: pointer; }
.pz-cal { position: fixed; z-index: 120; width: 268px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-3); padding: 12px; animation: pop .2s var(--spring); font-size: 13px; }
.pz-cab { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pz-cab b { font-size: 13.5px; color: var(--navy); }
.pz-cab button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.pz-cab button:hover { background: var(--navy-soft); color: var(--navy); }
.pz-sem, .pz-dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.pz-sem span { font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.pz-dias button { height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--text); font: inherit; cursor: pointer; transition: background .12s; }
.pz-dias button:hover { background: var(--navy-soft); }
.pz-dias button.hoje { color: var(--navy); font-weight: 700; box-shadow: inset 0 0 0 1px var(--navy-soft); }
.pz-dias button.sel { background: var(--navy); color: #fff; font-weight: 600; }
.pz-rod { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.pz-rod label { flex: 1; display: flex; align-items: center; gap: 6px; color: var(--muted); }
.pz-rod input { border: 1px solid var(--line); border-radius: 10px; padding: 5px 8px; font: inherit; color: var(--text); background: var(--panel); }
.pz-rod button { border: 0; border-radius: 999px; padding: 6px 12px; background: var(--navy-softer); color: var(--navy); font: inherit; font-weight: 600; cursor: pointer; }
.pz-rod button:hover { background: var(--navy-soft); }

/* Visualizador de .zip: lista dos arquivos à esquerda, prévia à direita */
.zipbox { position: fixed; inset: 0; z-index: 150; background: rgba(10, 20, 40, .45); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 24px; animation: fade .2s; }
.zipbox[hidden] { display: none; }
.zipbox.closing { animation: fadeOut .18s forwards; }
.zipbox.closing .zip-card { animation: popOut .18s forwards; }
.zip-card { width: min(1080px, 100%); height: min(720px, 100%); background: var(--panel); border-radius: 18px; box-shadow: var(--shadow-3); display: flex; flex-direction: column; overflow: hidden; animation: pop .3s var(--spring); }
.zip-cab { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 20px; border-bottom: 1px solid var(--line); }
.zip-cab > i { font-size: 24px; color: var(--navy); }
.zip-cab > span { flex: 1; min-width: 0; }
.zip-cab b { display: block; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zip-cab small { color: var(--muted); font-size: 12px; }
.zip-x { width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; }
.zip-x:hover { background: var(--silver-soft); color: var(--text); }
.zip-corpo { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px 1fr; }
.zip-lista { overflow-y: auto; border-right: 1px solid var(--line); padding: 8px; background: var(--navy-softer); }
.zip-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.zip-item:hover { background: var(--navy-soft); }
.zip-item.on { background: var(--navy); color: #fff; }
.zip-item > i { font-size: 18px; color: var(--navy); width: 20px; text-align: center; flex: none; }
.zip-item.on > i, .zip-item.on small { color: rgba(255, 255, 255, .8); }
.zip-item span { min-width: 0; }
.zip-item b { display: block; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zip-item small { display: block; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zip-prev { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.zip-prev-cab { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 18px; border-bottom: 1px solid var(--line); }
.zip-prev-cab b { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zip-prev-cab small { color: var(--muted); font-size: 12px; }
.zip-prev iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.zip-img { flex: 1; min-height: 0; display: grid; place-items: center; padding: 16px; background: var(--silver-soft); }
.zip-img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: var(--shadow-3); }
.zip-txt { flex: 1; margin: 0; overflow: auto; padding: 14px 18px; font: 12.5px/1.5 Consolas, "Courier New", monospace; white-space: pre-wrap; word-break: break-word; color: var(--text); background: #FBFCFD; }
.zip-vazio { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 30px; color: var(--muted); font-size: 13.5px; text-align: center; }
.zip-vazio i { font-size: 34px; color: var(--silver); }
@media (max-width: 720px) {
  .zipbox { padding: 10px; }
  .zip-corpo { grid-template-columns: 1fr; grid-template-rows: 38% 1fr; }
  .zip-lista { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* Cabeçalho da conversa estreito (janela reduzida): ícones vão para o menu ⋮ */
.conv-body { container-type: inline-size; container-name: conv; }
.who > div { min-width: 0; flex: 1; }
.conv-actions { flex-shrink: 0; }
.menu .m-compact { display: none; }
.menu .m-janela { font-size: 12px; padding: 7px 12px; margin: 2px 4px 4px; border-radius: 8px; }
.menu .m-janela.ok { background: var(--green-soft); color: #137046; }
.menu .m-janela.closed { background: var(--amber-soft); color: #8A5D00; }
.menu a.m-compact { align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 13px; color: var(--text); text-decoration: none; }
.menu a.m-compact:hover { background: var(--silver-soft); }
.menu a.m-compact i { width: 16px; color: var(--muted); }
.menu hr.m-compact { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }
@container conv (max-width: 760px) {
  .conv-actions > .icon-btn, .conv-actions > .window-chip { display: none; }
  .menu .m-compact:not([hidden]) { display: flex; }
  .menu hr.m-compact { display: block; }
}
@container conv (max-width: 440px) {
  #b-finalizar { font-size: 0; gap: 0; padding-left: 10px; padding-right: 10px; }
  #b-finalizar i { font-size: 14px; }
  .conv-head { gap: 8px; padding-left: 10px; padding-right: 10px; }
}

/* XML de nota fiscal: ver/baixar em PDF (13/11/2026) */
.media-doc.is-xml { min-width: 370px; }
.media-doc.is-xml .doc-acts { gap: 4px; }
.media-doc.is-xml .doc-acts button, .media-doc.is-xml .doc-acts a { padding: 6px 8px; }
.zip-prev { min-width: 0; }
.zip-prev-cab { gap: 6px; }
.zip-prev-cab .btn { flex: none; white-space: nowrap; }


/* Minha conta: atalho discreto para o Conversor de XML (13/11/2026) */
.conv-link { margin: -6px 0 16px; }
.conv-link .btn i.fa-arrow-up-right-from-square { font-size: 10px; opacity: .7; }

/* AdAgenda aberta dentro do AdZap */
.agenda-sobre { position: fixed; inset: 0; z-index: 400; background: rgba(10, 20, 40, .38); backdrop-filter: blur(2px); display: grid; place-items: center; padding: 18px; animation: fade .15s; }
.agenda-janela { width: min(1500px, 100%); height: min(940px, 100%); background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 18px 60px rgba(0, 0, 0, .35); }
.agenda-janela iframe { width: 100%; height: 100%; border: 0; display: block; }
