/* Irene — componentes do painel (carregado DEPOIS do app.css do padrão SIGE; só tokens var(--…)). */

.vds-marca { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 15px; opacity: .9; }
.vds-usuario { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1; font-size: 13px; }
.vds-usuario small { color: rgba(255,255,255,.6); font-size: 11px; }
.vds-sair { color: rgba(255,255,255,.75); border: none; }
.vds-sair:hover { color: #fff; background: hsl(224,70%,52%); }
.vds-contador { margin-left: auto; background: var(--danger); color: #fff; border-radius: 10px; font-size: 10px; font-weight: 700; padding: 1px 7px; }
.vds-header-titulo { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 15px; flex: 1; padding-left: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vds-header-status { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.vds-som { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; cursor: pointer; }

/* ---------- Atendimento: lista | conversa | ficha */
.sige-main.vds-cheio { padding: 0; }
.vds-atend { display: grid; grid-template-columns: 330px minmax(0, 1fr) 330px; height: calc(100vh - var(--sige-topbar-h)); background: var(--surface); }
.vds-atend { grid-template-rows: minmax(0, 1fr); }
.vds-atend.sem-ficha { grid-template-columns: 330px minmax(0, 1fr); }
.vds-atend.sem-ficha .vds-ficha { display: none !important; }
.vds-lista { border-right: 1px solid var(--border-light); display: flex; flex-direction: column; min-height: 0; }
.vds-lista-topo { padding: 12px; border-bottom: 1px solid var(--border-light); display: flex; flex-direction: column; gap: 8px; }
.vds-filtros { display: flex; gap: 4px; flex-wrap: wrap; }
.vds-filtros button { font-size: 11px; padding: 3px 10px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font-weight: 600; }
.vds-filtros button.ativo { background: var(--sige-azul); border-color: var(--sige-azul); color: #fff; }
.vds-itens { overflow-y: auto; flex: 1; }
.vds-item { display: flex; gap: 10px; padding: 11px 12px; border: 0; border-bottom: 1px solid var(--border-light); border-left: 3px solid transparent; cursor: pointer; width: 100%; text-align: left; background: none; color: inherit; }
.vds-item:focus-visible { outline: 2px solid var(--sige-azul); outline-offset: -2px; }
.vds-item:hover { background: var(--bg-2); }
.vds-item.sel { background: var(--sige-azul-light); border-left-color: var(--sige-azul); }
.vds-av { width: 38px; height: 38px; border-radius: 50%; background: var(--sige-azul-glass); color: var(--sige-azul); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.vds-item-corpo { min-width: 0; flex: 1; }
.vds-item-l1 { display: flex; justify-content: space-between; gap: 6px; }
.vds-item-nome { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vds-item-hora { font-size: 11px; color: var(--text-soft); flex-shrink: 0; }
.vds-item-prev { font-size: 12px; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vds-item-selos { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; align-items: center; }
.vds-naolidas { background: var(--success); color: #fff; border-radius: 10px; font-size: 10px; font-weight: 700; padding: 1px 7px; margin-left: auto; }
.vds-etq { font-size: 10px; font-weight: 600; padding: 1px 8px; border-radius: 10px; color: #fff; background: var(--text-soft); }
.vds-etq button { background: none; border: none; color: #fff; padding: 0 0 0 4px; font-size: 11px; line-height: 1; }

.vds-chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--bg); }
.vds-chat-topo { background: var(--surface); padding: 10px 16px; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vds-chat-quem { flex: 1; min-width: 0; }
.vds-chat-quem strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vds-chat-quem small { color: var(--text-muted); font-size: 12px; }
.vds-chat-acoes { display: flex; gap: 6px; flex-wrap: wrap; }
.vds-chat-acoes .btn { padding: 5px 12px; white-space: nowrap; }
.vds-etqbar { padding: 6px 16px; background: var(--surface); border-bottom: 1px solid var(--border-light); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.vds-etqbar select { width: auto; min-width: 130px; font-size: 12px; padding: 2px 28px 2px 8px; }
.vds-msgs { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 6px; }
.vds-dia { align-self: center; background: var(--surface); border: 1px solid var(--border-light); color: var(--text-muted); font-size: 11px; font-weight: 600; padding: 2px 12px; border-radius: 12px; margin: 8px 0; }
.vds-msg { max-width: min(72%, 620px); padding: 8px 12px; border-radius: 12px; font-size: 13.5px; white-space: pre-wrap; word-wrap: break-word; box-shadow: var(--shadow); }
.vds-msg .vds-meta { display: flex; gap: 6px; justify-content: flex-end; font-size: 10.5px; color: var(--text-soft); margin-top: 3px; }
.vds-msg.user { align-self: flex-start; background: var(--surface); border-top-left-radius: 4px; }
.vds-msg.assistant { align-self: flex-end; background: var(--sige-azul-light); border-top-right-radius: 4px; }
.vds-msg.atendente { align-self: flex-end; background: var(--success-light); border-top-right-radius: 4px; }
.vds-msg.aviso { align-self: flex-end; background: var(--warning-light); border-top-right-radius: 4px; }
.vds-msg.falha { align-self: flex-end; background: var(--danger-light); border: 1px solid var(--danger); }
.vds-msg .vds-autor { font-size: 11px; font-weight: 700; color: var(--text-muted); margin-bottom: 2px; }
.vds-entrega.read { color: var(--sige-azul); }
.vds-entrega.failed { color: var(--danger); font-weight: 700; }
.vds-novas { align-self: center; position: sticky; bottom: 6px; }
.vds-composer { background: var(--surface); border-top: 1px solid var(--border-light); padding: 10px 16px; display: flex; gap: 8px; align-items: flex-end; }
.vds-composer textarea { resize: none; min-height: 40px; max-height: 140px; }
.vds-composer-aviso { font-size: 12px; color: var(--text-muted); padding: 10px 16px; background: var(--surface); border-top: 1px solid var(--border-light); }
.vds-vazio { margin: auto; text-align: center; color: var(--text-soft); padding: 32px; }
.vds-vazio .bi { font-size: 34px; display: block; margin-bottom: 8px; color: var(--border); }

.vds-ficha { border-left: 1px solid var(--border-light); overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; background: var(--bg-2); }
.vds-ficha h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin: 0 0 6px; }
.vds-titulo-linha { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border-light); font-size: 12.5px; }
.vds-titulo-linha:last-child { border-bottom: none; }
.vds-titulo-linha .valor { font-weight: 700; white-space: nowrap; }

/* ---------- Quadro (kanban) */
.vds-kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
.vds-coluna { width: 290px; min-width: 290px; max-width: 290px; background: var(--bg-2); border: 1px solid var(--border-light); border-radius: var(--radius-lg); display: flex; flex-direction: column; max-height: calc(100vh - 190px); }
.vds-coluna-topo { padding: 10px 14px; font-weight: 700; font-size: 13px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--border-light); }
.vds-coluna-corpo { overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.vds-cartao { background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; text-align: left; width: 100%; min-height: 56px; }
.vds-cartao:hover { box-shadow: var(--shadow-md); }

/* ---------- Tabelas e páginas */
.vds-tabela-acoes { white-space: nowrap; }
.vds-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.vds-barra { height: 8px; border-radius: 4px; background: var(--border-light); overflow: hidden; }
.vds-barra > span { display: block; height: 100%; background: var(--sige-azul); }
.vds-grafico { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 6px; }
.vds-grafico .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.vds-grafico .col span.b { width: 100%; background: var(--sige-azul); border-radius: 4px 4px 0 0; min-height: 2px; }
.vds-grafico .col small { font-size: 10px; color: var(--text-soft); }
.vds-cor { width: 14px; height: 14px; border-radius: 50%; display: inline-block; vertical-align: middle; }
.vds-switch { display: flex; align-items: center; gap: 8px; font-weight: 600; }

/* ---------- Toast e modal */
.vds-toast { position: fixed; right: 20px; bottom: 20px; z-index: 2000; background: var(--text); color: #fff; padding: 12px 16px; border-radius: var(--radius); box-shadow: var(--shadow-md); font-size: 13px; max-width: 420px; }
.vds-toast.erro { background: var(--danger); }
.vds-modal { position: fixed; inset: 0; background: rgba(15, 24, 41, .45); z-index: 1900; display: flex; align-items: center; justify-content: center; padding: 16px; }
.vds-modal-caixa { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; }

@media (max-width: 1279.98px) {
  .vds-atend { grid-template-columns: 300px minmax(0, 1fr); }
  .vds-atend .vds-ficha { display: none; }
  .vds-atend.ficha-aberta { grid-template-columns: 300px minmax(0, 1fr) 300px; }
  .vds-atend.ficha-aberta .vds-ficha { display: flex; }
}
@media (max-width: 767.98px) {
  .vds-atend, .vds-atend.ficha-aberta { grid-template-columns: 1fr; }
  .vds-atend.tem-conversa .vds-lista { display: none; }
  .vds-atend:not(.tem-conversa) .vds-chat { display: none; }
  .vds-atend.ficha-aberta .vds-chat { display: none; }
  .vds-msg { max-width: 88%; }
  .vds-chat-quem { flex: 1 1 calc(100% - 52px); }
  .vds-chat-quem .vds-motivo { display: none; }
  .vds-chat-acoes { width: 100%; }
  .vds-chat-acoes .btn { flex: 1; }
  .vds-header-status .vds-som { display: none; }
}

#periodo, #filtroAviso { min-width: 180px; }
.vds-cartao { color: inherit; }
