/* app/extras.js: agendar mensagem, favoritas e mural de avisos */
.conversations.tzx-fav-only .card:not([data-fav]) { display: none; }
.tzx-star { margin-right: 4px; font-size: 12px; }
.tzx-sched-list { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; margin: 10px 0; }
.tzx-sched { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--tz-outline-container); border-radius: var(--tz-r-md); font-size: 12.5px; }
.tzx-sched p { margin: 4px 0; white-space: pre-wrap; }
.tzx-sched small { display: block; color: var(--muted); }
.tzx-sched.cancelada, .tzx-sched.enviada { opacity: .65; }
.tzx-sched .tzx-err, .tzx-sched.falhou b { color: #b91c1c; }
.tzx-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px; background: #ec6d65; color: #fff; font-size: 10px; font-weight: 800; }
.tzx-banner { position: fixed; top: 78px; left: 50%; transform: translateX(-50%); z-index: 1500; display: flex; align-items: flex-start; gap: 12px; width: min(620px, calc(100vw - 32px)); padding: 12px 14px; border: 1px solid #93c5fd; border-left: 5px solid var(--blue); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 16px 40px #0f172a33; }
.tzx-banner.important { border-color: #fca5a5; border-left-color: #dc2626; }
.tzx-banner > span { font-size: 20px; }
.tzx-banner > div { flex: 1; min-width: 0; }
.tzx-banner b { cursor: pointer; }
.tzx-banner p { margin: 4px 0; font-size: 13px; white-space: pre-wrap; }
.tzx-banner small { color: var(--muted); font-size: 11.5px; }
.tzx-banner button { padding: 7px 14px; border-radius: 8px; background: var(--blue); color: #fff; font-weight: 700; }
.tzx-notices { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.tzx-notice { padding: 14px 16px; border: 1px solid var(--tz-outline-container); border-left: 4px solid var(--line); border-radius: 12px; background: var(--surface); }
.tzx-notice.unread { border-left-color: var(--blue); }
.tzx-notice.important { border-left-color: #dc2626; }
.tzx-notice header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; }
.tzx-notice header small { color: var(--muted); }
.tzx-notice p { margin: 8px 0; line-height: 1.5; }
.tzx-notice footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 12.5px; }
.tzx-notice footer button { padding: 6px 12px; border-radius: 8px; background: var(--blue); color: #fff; font-weight: 700; }
.tzx-notice footer button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--tz-outline-control); margin-left: auto; }
.tzx-notice details summary { cursor: pointer; color: var(--muted); }
@media (max-width: 760px) { .tzx-banner { top: 70px; } }

/* app/cnpj.js: dica abaixo do campo Empresa/CNPJ */
.tzcnpj-hint { display: block; margin-top: 3px; font-size: 11.5px; color: var(--muted); grid-column: 1 / -1; }
.tzcnpj-hint.ok { color: #15803d; }
.tzcnpj-hint.warn { color: #b45309; }
/* app/agenda.js: Google Agenda */
.tzag-button { margin-left: auto; padding: 9px 14px; border: 1px solid var(--tz-outline-control); border-radius: var(--tz-r-sm); background: var(--surface); color: var(--ink); font-weight: 700; cursor: pointer; }
.tzag h4 { margin: 16px 0 6px; font-size: 13.5px; }
.tzag-link { display: flex; flex-direction: column; gap: 3px; margin: 8px 0; }
.tzag-link small { color: var(--muted); }
.tzag-link div { display: flex; gap: 6px; }
.tzag-link input { flex: 1; min-width: 0; padding: 7px 9px; border: 1px solid var(--tz-outline-control); border-radius: var(--tz-r-sm); background: var(--panel, var(--surface)); color: var(--ink); font-size: 12px; }
.tzag-link button { padding: 7px 12px; border-radius: 8px; background: var(--blue); color: #fff; font-weight: 700; }
.tzag-steps { margin: 8px 0; padding-left: 20px; font-size: 13px; line-height: 1.6; }
/* compromissos do Google em Agendamentos */
.agenda-event.tzag-google { background: repeating-linear-gradient(135deg, rgba(66,133,244,.10) 0 6px, rgba(66,133,244,.04) 6px 12px) !important; border: 1px dashed #4285f4 !important; color: var(--ink) !important; }
.agenda-event.tzag-google strong::before { content: 'G '; color: #4285f4; font-weight: 900; }
.tzag-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; font-size: 13px; }
.tzag-share select { padding: 6px 8px; border: 1px solid var(--tz-outline-control); border-radius: var(--tz-r-sm); background: var(--surface); color: var(--ink); }
/* app/pesquisa-hora.js: hora ao lado da data na pesquisa */
.tzph-wrap { display: flex; gap: 6px; }
.tzph-wrap input[type=date] { flex: 1; min-width: 0; }
.tzph-wrap .tzph-time { width: 108px; flex: 0 0 auto; }

/* app/escrever.js: caixa de mensagem que cresce */
.composer { align-items: flex-end; }
.composer #message { flex: 1; min-height: 39px; max-height: 40vh; padding: 9px 14px; border: 1px solid var(--tz-outline-container); border-radius: var(--tz-r-md); outline: 0; background: var(--surface); color: var(--ink); font: inherit; line-height: 1.4; resize: none; overflow-y: hidden; }
.composer #message:focus { border-color: #a9bfea; }
.composer .composer-mode, .composer .quick-reply, .composer .round, .composer .audio-button, .composer .send { flex: 0 0 auto; }
/* Celular: a caixa de mensagem ocupa a linha inteira e os botões ficam embaixo (senão sobrava ~130 px para escrever) */
@media (max-width: 760px) {
  .composer { flex-wrap: wrap; row-gap: 8px; }
  .drawer .composer #message { order: -1; flex: 1 1 100% !important; width: 100% !important; }
  .composer .send { margin-left: auto; }
}
/* Computador com a conversa estreita (app/escrever.js liga a classe abaixo de 640 px): caixa na linha de cima; embaixo, à
   esquerda +, Para, respostas e áudio; à direita ✨, assinatura e enviar (o ::after é o espaço entre os dois grupos). */
.drawer .composer.tz-composer-narrow { flex-wrap: wrap; row-gap: 8px; }
.drawer .composer.tz-composer-narrow #message { order: -1; flex: 1 1 100% !important; width: 100% !important; }
.drawer .composer.tz-composer-narrow::after { content: ''; order: 1; flex: 1 1 0; }
.drawer .composer.tz-composer-narrow .tzia-btn, .drawer .composer.tz-composer-narrow .tzas-btn, .drawer .composer.tz-composer-narrow .send { order: 2; }

/* Celular: campos de data e hora dos períodos não estouram a tela (Relatórios e Painel) */
@media (max-width: 760px) {
  .tzd-period-bar span { width: 100%; flex-wrap: wrap; }
  .tzr-range input, .tzd-period-bar span input { flex: 1 1 150px; min-width: 0; max-width: 100%; }
}
/* Faixa do mural dentro da página, logo abaixo do cabeçalho: não cobre mais o título da tela */
.main > .tzx-banner { position: relative; top: auto; left: auto; transform: none; width: auto; margin: 14px 28px 0; box-shadow: 0 6px 18px #0f172a14; }
@media (max-width: 760px) { .main > .tzx-banner { margin: 10px 12px 0; } }

/* Avisos automáticos na conversa: linha fina e centralizada, como os avisos do WhatsApp (o nome do aviso fica no title). */
#historyFeed .bubble.note.tzm-auto { align-self: center; max-width: 88%; margin: 4px auto; padding: 4px 12px; border: 0 !important; border-radius: 999px; background: color-mix(in srgb, var(--muted, #64748b) 10%, transparent) !important; box-shadow: none !important; color: var(--muted, #64748b); font-size: 12px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 6px; text-align: center; }
#historyFeed .bubble.note.tzm-auto > .sender-name { display: none; }
#historyFeed .bubble.note.tzm-auto > div:not(.tzm-actions) { white-space: normal; }
#historyFeed .bubble.note.tzm-auto > time { position: static; font-size: 11px; opacity: .8; }
#historyFeed .bubble.note.tzm-auto .tzm-actions { display: none; }

/* Janela "Google Agenda": caixa da conexão direta */
.tzag-direct { margin: 10px 0 6px; padding: 12px 14px; border: 1px solid var(--line, #dbe3f0); border-radius: 12px; background: var(--blue2, #e8f1ff); display: grid; gap: 6px; justify-items: start; }
.tzag-direct p { margin: 0; }
.tzt-list { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; margin: 6px 0 10px; }
.tzt-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--tz-outline-container); border-radius: var(--tz-r-md); font-size: 13px; }
.tzt-item small { display: block; color: var(--muted); font-size: 11.5px; }
.tzt-item.done { opacity: .6; }
.tzt-item.done b { text-decoration: line-through; }
.tzt-late { color: #b91c1c; font-weight: 700; }
