/* Help Desk — estilos da aplicação (cores em theme.css) */
body { font-size: .95rem; min-height: 100vh; overflow-x: hidden; }
.btn { border-radius: var(--hd-raio-campo); }
.btn:not(.btn-sm):not(.btn-lg):not(.btn-close):not(.accordion-button):not(.dropdown-item) { min-height: 42px; padding-left: 18px; padding-right: 18px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn-light { --bs-btn-bg: #f1f5f9; --bs-btn-border-color: #f1f5f9; --bs-btn-color: #475569; --bs-btn-hover-bg: #e2e8f0; --bs-btn-hover-border-color: #e2e8f0; --bs-btn-active-bg: #e2e8f0; }
.form-control, .form-select { border-color: var(--hd-borda-campo); border-radius: var(--hd-raio-campo); background-color: #fff; }
.form-control:disabled, .form-control[readonly] { background-color: #f8fafc; }
.form-control:not(.form-control-sm):not(textarea):not([type=file]):not(.form-control-color), .form-select:not(.form-select-sm) { min-height: 42px; }
.input-group-text { border-color: var(--hd-borda-campo); border-radius: var(--hd-raio-campo); color: #94a3b8; }
.modal-content { border: none; border-radius: 16px; box-shadow: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04); }
.modal-backdrop.show { opacity: .6; background: #0f172a; }
.modal-header h5 { font-size: 18px; color: var(--hd-texto); }
.dropdown-menu { border-radius: 12px; border-color: var(--hd-borda); }
.alert { border-radius: 12px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--hd-texto-suave); margin-bottom: 4px; }
a { text-decoration: none; }
.btn-primary { --bs-btn-bg: var(--hd-marca); --bs-btn-border-color: var(--hd-marca); --bs-btn-hover-bg: var(--hd-marca-escura); --bs-btn-hover-border-color: var(--hd-marca-escura); --bs-btn-active-bg: var(--hd-marca-escura); --bs-btn-disabled-bg: var(--hd-marca); --bs-btn-disabled-border-color: var(--hd-marca); }
.btn-outline-primary { --bs-btn-color: var(--hd-marca); --bs-btn-border-color: var(--hd-marca); --bs-btn-hover-bg: var(--hd-marca); --bs-btn-hover-border-color: var(--hd-marca); --bs-btn-active-bg: var(--hd-marca); }
.form-control:focus, .form-select:focus { border-color: var(--hd-marca); box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }
.text-suave { color: var(--hd-texto-suave) !important; }

/* ---------- Estrutura: menu lateral + topo (padrão WMS) ---------- */
.hd-menu { position: fixed; inset: 0 auto 0 0; width: var(--hd-menu-largura); height: 100vh; background: var(--hd-menu-fundo); border-right: 1px solid var(--hd-borda); display: flex; flex-direction: column; padding: 16px; z-index: 1040; transition: width .3s cubic-bezier(.4,0,.2,1), transform .25s ease; }
.hd-logo-area { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; color: inherit; }
.hd-logo-box { width: 48px; height: 48px; border-radius: 14px; background: var(--hd-marca-clara); color: var(--hd-marca); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.hd-logo-texto { min-width: 0; }
.hd-logo-texto strong { display: block; font-size: 18px; color: #111; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd-logo-texto span { display: block; font-size: 12px; color: var(--hd-texto-suave); margin-top: 1px; white-space: nowrap; }
.hd-menu-alternar { width: 100%; background: #f1f5f9; border: none; border-radius: 8px; padding: 6px; margin-bottom: 15px; display: flex; justify-content: center; align-items: center; color: var(--hd-menu-texto); transition: background .2s; }
.hd-menu-alternar:hover { background: #e2e8f0; }
.hd-menu-nav { flex-grow: 1; overflow-y: auto; overflow-x: hidden; margin-bottom: 12px; padding-right: 4px; display: flex; flex-direction: column; gap: 4px; }
.hd-menu-nav::-webkit-scrollbar { width: 4px; } .hd-menu-nav::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.hd-menu-nav .grupo { flex-shrink: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #94a3b8; padding: 12px 14px 2px; white-space: nowrap; }
.hd-menu-nav a, .hd-sair { flex-shrink: 0; padding: 9px 14px; border-radius: var(--hd-raio-menu); color: var(--hd-menu-texto); display: flex; align-items: center; gap: 10px; white-space: nowrap; transition: background .2s; font-size: 15px; border: none; background: transparent; width: 100%; text-align: left; }
.hd-menu-nav a i, .hd-sair i { font-size: 17px; width: 20px; text-align: center; flex-shrink: 0; }
.hd-menu-nav a:hover, .hd-sair:hover { background: var(--hd-menu-hover); color: var(--hd-menu-texto); }
.hd-menu-nav a.ativo { background: var(--hd-menu-ativo-fundo); color: var(--hd-menu-ativo-texto); }
.hd-menu-rodape { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid #f1f5f9; padding-top: 12px; flex-shrink: 0; background: #fff; }
.hd-usuario { background: #f8fafc; border-radius: 14px; padding: 10px; display: flex; gap: 12px; align-items: center; overflow: hidden; color: inherit; }
.hd-usuario:hover { background: #f1f5f9; color: inherit; }
.hd-usuario strong { display: block; font-size: 14px; color: var(--hd-texto); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd-usuario span.perfil { font-size: 11px; color: var(--hd-texto-suave); }
.hd-sair { color: var(--hd-perigo); } .hd-sair:hover { background: #fef2f2; color: var(--hd-perigo); }
.hd-avatar { width: 36px; height: 36px; border-radius: 50%; background: #bfdbfe; color: #1e40af; display: inline-flex; align-items: center; justify-content: center; font-weight: bold; font-size: .8rem; flex: none; }
.hd-avatar.sm { width: 28px; height: 28px; font-size: .7rem; }
.hd-principal { margin-left: var(--hd-menu-largura); min-height: 100vh; display: flex; flex-direction: column; transition: margin-left .3s cubic-bezier(.4,0,.2,1); }
.hd-topo { position: sticky; top: 0; z-index: 1030; background: var(--hd-topo-fundo); border-bottom: 1px solid var(--hd-borda); padding: 0 24px; height: var(--hd-topo-altura); display: flex; align-items: center; gap: 10px; }
.hd-topo h1 { font-size: 20px; font-weight: 700; color: var(--hd-texto); margin: 0; flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.hd-topo h1 > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hd-titulo-icone { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 7px; }
.hd-relogio { font-weight: bold; color: #334155; background: var(--hd-marca-clara); padding: 6px 10px; border-radius: 10px; font-variant-numeric: tabular-nums; font-size: 12px; white-space: nowrap; }
.hd-topo-btn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; font-size: 14px; color: var(--hd-menu-texto); background: transparent; border: none; transition: all .2s ease-in-out; position: relative; }
.hd-topo-btn:hover { background: #f1f5f9; color: var(--hd-texto); }
.hd-conteudo { padding: 24px; flex: 1; }
.hd-fundo-menu { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.6); backdrop-filter: blur(4px); z-index: 1035; }
/* Menu minimizado (somente ícones), como no WMS */
@media (min-width: 992px) {
  body.menu-mini .hd-menu { width: var(--hd-menu-mini); padding: 16px 10px; }
  body.menu-mini .hd-principal { margin-left: var(--hd-menu-mini); }
  body.menu-mini .hd-logo-texto, body.menu-mini .hd-menu .texto, body.menu-mini .hd-menu-nav .grupo, body.menu-mini .hd-usuario .info { display: none; }
  body.menu-mini .hd-menu-nav a, body.menu-mini .hd-sair { justify-content: center; padding: 12px 0; }
  body.menu-mini .hd-logo-area, body.menu-mini .hd-usuario { justify-content: center; }
  body.menu-mini .hd-usuario { padding: 8px 0; background: transparent; }
}
@media (max-width: 991.98px) {
  .hd-menu { transform: translateX(-100%); width: min(280px, 86vw); }
  .hd-menu-alternar { display: none; }
  body.menu-aberto .hd-menu { transform: none; box-shadow: 0 20px 40px rgba(0,0,0,.2); }
  body.menu-aberto .hd-fundo-menu { display: block; }
  .hd-principal { margin-left: 0; }
  .hd-topo { padding: 0 12px; }
  .hd-topo h1 { font-size: 17px; }
  .hd-conteudo { padding: 12px; }
  .hd-relogio { display: none; }
}

/* ---------- Cartões e indicadores ---------- */
.card { border: 1px solid var(--hd-borda); padding: 2px 2px; border-radius: var(--hd-raio); background: var(--hd-cartao); overflow: hidden; }
.card > .dropdown, .card:has(.dropdown-menu.show), .card:has(.list-group.position-absolute) { overflow: visible; }
.card-header { background: transparent; border-bottom: 1px solid var(--hd-borda); font-weight: 700; font-size: 16px; color: var(--hd-texto); padding: 14px 20px; }
.card-body { padding: 20px; }
.kpi { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 10px; padding: 20px; color: inherit; border-radius: 18px; position: relative; }
.kpi .kpi-icone { position: absolute; top: 20px; right: 20px; }
.kpi:hover { color: inherit; }
a.card { transition: .2s; }
a.card:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,.05); }
.kpi-icone { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; flex: none; }
.kpi-valor { font-size: 38px; font-weight: bold; line-height: 1.1; color: #111; }
.kpi-rotulo { color: var(--hd-texto-suave); font-size: 12px; font-weight: 600; display: block; padding-right: 56px; }
.kpi-azul { background: #dbeafe; color: #2563eb; } .kpi-laranja { background: #ffedd5; color: #ea580c; }
.kpi-ciano { background: #cffafe; color: #0891b2; } .kpi-verde { background: #dcfce7; color: #16a34a; }
.kpi-vermelho { background: #fee2e2; color: #ef4444; } .kpi-cinza { background: #f1f5f9; color: #475569; }
.grafico { position: relative; height: 260px; }

/* ---------- Tabelas ---------- */
.table { --bs-table-bg: transparent; margin: 0; }
.table > thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--hd-texto-suave); font-weight: 600; background: #f8fafc; border-bottom: 1px solid var(--hd-borda); white-space: nowrap; }
.table > tbody td { vertical-align: middle; border-color: #eef1f5; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: #f6f8fc; }
tr.clicavel { cursor: pointer; }
.badge-hd { font-weight: bold; font-size: 12px; padding: 4px 10px; border-radius: 12px; white-space: nowrap; }
.protocolo { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; font-weight: 600; white-space: nowrap; }
.sla-chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .76rem; font-weight: 600; white-space: nowrap; }
.sla-success { color: #157347; } .sla-warning { color: #b45309; } .sla-danger { color: #c81e1e; } .sla-secondary { color: #6b7280; }
tr.linha-vencida > td:first-child { box-shadow: inset 3px 0 0 #dc3545; }
tr.linha-alerta > td:first-child { box-shadow: inset 3px 0 0 #f59e0b; }
.abas-rapidas .nav-link { color: var(--hd-menu-texto); padding: .5rem .9rem; border-radius: 12px; font-size: .88rem; white-space: nowrap; }
.abas-rapidas .nav-link.active { background: var(--hd-menu-ativo-fundo); color: var(--hd-marca); font-weight: 600; }
.abas-rapidas { flex-wrap: nowrap; overflow-x: auto; }
.carregando { opacity: .5; pointer-events: none; transition: opacity .15s; }

/* ---------- Detalhe do chamado / linha do tempo ---------- */
.tl { position: relative; padding-left: 0; }
.tl-msg { border: 1px solid var(--hd-borda); border-radius: var(--hd-raio); background: #fff; margin-bottom: .9rem; overflow: hidden; }
.tl-msg-topo { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .6rem; padding: .55rem .9rem; background: #f8fafc; border-bottom: 1px solid var(--hd-borda); font-size: .85rem; }
.tl-msg-corpo { padding: .85rem .9rem; overflow-wrap: anywhere; }
.tl-msg.nota { border-color: #f1d98a; } .tl-msg.nota .tl-msg-topo { background: #fff7d6; border-color: #f1d98a; }
.tl-msg.solucao { border-color: #9fd8b5; } .tl-msg.solucao .tl-msg-topo { background: #e2f5ea; border-color: #9fd8b5; }
.tl-msg.solicitante .tl-msg-topo { background: #eef4ff; }
.tl-evento { display: flex; gap: .55rem; align-items: baseline; color: var(--hd-texto-suave); font-size: .82rem; padding: .1rem .9rem .8rem; }
.tl-evento i { color: #94a3b8; }
.tl-evento strong { color: var(--hd-texto); font-weight: 600; }
.anexo { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--hd-borda); border-radius: 7px; padding: .3rem .6rem; font-size: .82rem; background: #fff; margin: .25rem .35rem 0 0; color: var(--hd-texto); max-width: 100%; }
.anexo:hover { border-color: var(--hd-marca); color: var(--hd-marca); }
.anexo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.dl-painel dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--hd-texto-suave); font-weight: 600; }
.dl-painel dd { margin-bottom: .75rem; }
.sla-barra { height: 6px; border-radius: 4px; background: #e9edf3; overflow: hidden; }
.sla-barra > div { height: 100%; }

/* ---------- Base de conhecimento ---------- */
.kb-busca { background: linear-gradient(135deg, var(--hd-marca-forte), var(--hd-marca)); color: #fff; border-radius: var(--hd-raio); padding: 2rem 1.5rem; }
.kb-cat { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem; color: inherit; height: 100%; }
.kb-cat i { font-size: 1.5rem; color: var(--hd-marca); }
.artigo h3, .artigo h4, .artigo h5 { font-weight: 600; } .artigo { line-height: 1.7; font-size: 1rem; overflow-wrap: anywhere; }
.sugestoes { border: 1px solid #f1d98a; background: #fffbea; border-radius: var(--hd-raio); padding: .85rem 1rem; }

/* ---------- Login (padrão WMS: cartão translúcido sobre gradiente) ---------- */
.login-fundo { min-height: 100dvh; display: flex; justify-content: center; align-items: center; background: #eef2ff; padding: 20px; position: relative; }
.login-fundo::before { content: ""; position: fixed; inset: 0; background: radial-gradient(circle at top left, #2563eb33, transparent), radial-gradient(circle at bottom right, #06b6d433, transparent); }
.login-cartao { position: relative; z-index: 2; width: 100%; max-width: 400px; padding: 40px; border-radius: 30px; background: rgba(255,255,255,.7); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 15px 40px rgba(0,0,0,.1); }
.login-cartao .logo { width: 90px; height: 90px; background: #dbeafe; color: var(--hd-marca); margin: 0 auto 14px; border-radius: 24px; display: flex; align-items: center; justify-content: center; font-size: 36px; }
.login-cartao .form-control { height: 56px; border-radius: 16px; font-size: 16px; }
.login-cartao .form-control:hover { border-color: var(--hd-marca); box-shadow: 0 0 8px rgba(37,99,235,.3); }
.login-cartao .btn-primary { height: 56px; border-radius: 16px; font-size: 18px; --bs-btn-bg: var(--hd-marca-forte); --bs-btn-border-color: var(--hd-marca-forte); transition: background .3s ease, transform .2s ease; }
.login-cartao .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0,0,0,.2); }
.login-cartao .alert-danger { background: #fee2e2; color: #dc2626; border: none; border-radius: 14px; }
@media (max-width: 480px) { .login-cartao { padding: 24px; border-radius: 20px; } .login-cartao .logo { width: 75px; height: 75px; font-size: 28px; } .login-cartao .form-control, .login-cartao .btn-primary { height: 50px; } }

.toast-container { z-index: 1100; }
.sino-lista { width: 340px; max-width: 92vw; max-height: 420px; overflow-y: auto; padding: 0; }
.sino-lista a { display: block; padding: .6rem .9rem; border-bottom: 1px solid #eef1f5; color: var(--hd-texto); font-size: .84rem; white-space: normal; }
.sino-lista a.nao-lida { background: #f0f5ff; font-weight: 600; }
.sino-lista a small { display: block; font-weight: 400; color: var(--hd-texto-suave); }
@media print { .hd-menu, .hd-topo, .nao-imprimir { display: none !important; } .hd-principal { margin: 0 !important; } }
@media (max-width: 575.98px) { .kpi-valor { font-size: 30px; } .card-body { padding: 14px; } .card-header { padding: 12px 14px; } .table > :not(caption) > * > * { padding: .5rem .5rem; } }

#sino-contador { top: 6px !important; left: auto !important; right: -4px; transform: none !important; font-size: 10px; }

/* ---------- Celular: listas de chamados viram cartões (sem rolagem lateral) ---------- */
@media (max-width: 575.98px) {
  .tabela-cartoes thead { display: none; }
  .tabela-cartoes, .tabela-cartoes tbody { display: block; width: 100%; }
  .tabela-cartoes tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 12px 14px; border-bottom: 1px solid #eef1f5; }
  .tabela-cartoes td { display: block; border: 0 !important; padding: 0 !important; box-shadow: none !important; }
  .tabela-cartoes td:nth-child(2), .tabela-cartoes td[colspan] { flex: 1 0 100%; order: -1; }
  .tabela-cartoes td:first-child { order: -2; flex: 1 0 100%; }
  .tabela-cartoes .text-truncate { max-width: 100% !important; white-space: normal; }
  .tabela-cartoes tr.linha-vencida { box-shadow: inset 3px 0 0 #dc3545; } .tabela-cartoes tr.linha-alerta { box-shadow: inset 3px 0 0 #f59e0b; }
  .hd-topo .btn-primary { display: none !important; }
}
.login-cartao.largo { max-width: 520px; }
.login-cartao .form-control, .login-cartao .form-select { background-color: #fff; }
.login-cartao.largo .form-control, .login-cartao.largo .form-select { height: 46px; border-radius: 12px; }
.login-cartao.largo .logo { width: 64px; height: 64px; font-size: 26px; border-radius: 18px; }

/* ---------- Prints (imagens) visíveis na descrição e nas respostas ---------- */
.prints { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.prints a, .prints .previa { position: relative; display: block; max-width: 100%; min-width: 0; border: 1px solid var(--hd-borda); border-radius: 12px; overflow: hidden; background: #f8fafc; }
.prints img { display: block; max-width: 100%; height: auto; max-height: 420px; object-fit: contain; }
.prints a:hover { border-color: var(--hd-marca); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.prints.previas img { height: auto; max-height: 260px; width: auto; max-width: 100%; }
.prints .previa { max-width: 100%; }
.print-inline { display: block; margin: 10px 0; max-width: 100%; width: fit-content; border: 1px solid var(--hd-borda); border-radius: 10px; overflow: hidden; background: #f8fafc; cursor: zoom-in; }
.print-inline img { display: block; max-width: 100%; height: auto; max-height: 720px; object-fit: contain; }
.print-inline:hover { border-color: var(--hd-marca); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.prints .previa button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: none; background: rgba(15,23,42,.75); color: #fff; line-height: 1; font-size: 14px; }
.prints .previa small { display: block; padding: 2px 8px; font-size: 11px; color: var(--hd-texto-suave); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.area-colar.arrastando { border-color: var(--hd-marca) !important; box-shadow: 0 0 0 4px rgba(37,99,235,.15); }
.visualizador { position: fixed; inset: 0; z-index: 2000; background: rgba(15,23,42,.85); display: flex; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out; }
.visualizador img { max-width: 100%; max-height: 100%; border-radius: 8px; background: #fff; }
.form-control:focus, .form-select:focus { background-color: #fff; }

.atalho { display: flex; flex-direction: row; gap: 14px; align-items: center; padding: 14px 16px; color: inherit; }
.atalho .kpi-icone { width: 42px; height: 42px; font-size: 1.15rem; }
.atalho:hover { color: inherit; }
.atalho strong { color: var(--hd-texto); line-height: 1.25; }
@media (max-width: 575.98px) { .atalho { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; } }

/* ---------- Assistente (respostas pré-configuradas) ---------- */
.chat { height: min(52vh, 460px); min-height: 260px; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; background: #f8fafc; }
.chat .msg { display: flex; } .chat .msg.eu { justify-content: flex-end; }
.chat .balao { max-width: min(680px, 88%); padding: 12px 16px; border-radius: 16px; background: #fff; border: 1px solid var(--hd-borda); overflow-wrap: anywhere; }
.chat .msg.eu .balao { background: var(--hd-marca); color: #fff; border-color: var(--hd-marca); border-bottom-right-radius: 6px; }
.chat .msg.bot .balao { border-bottom-left-radius: 6px; }
.chat .balao .artigo { font-size: .95rem; line-height: 1.55; } .chat .balao .artigo h3, .chat .balao .artigo h4, .chat .balao .artigo h5 { font-size: 1rem; margin-top: .6rem !important; }
.chat .balao .artigo p:last-child, .chat .balao .artigo ul:last-child, .chat .balao .artigo ol:last-child { margin-bottom: 0; }
.chat .acoes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid #f1f5f9; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--hd-borda-campo); background: #fff; color: var(--hd-marca); border-radius: 999px; padding: 6px 14px; font-size: 13px; text-align: left; }
.chip:hover { background: var(--hd-menu-ativo-fundo); border-color: var(--hd-marca); }
.chat-entrada { display: flex; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--hd-borda); background: #fff; }
.digitando { display: inline-flex; gap: 4px; } .digitando i { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; animation: digitando 1s infinite ease-in-out; }
.digitando i:nth-child(2) { animation-delay: .15s; } .digitando i:nth-child(3) { animation-delay: .3s; }
@keyframes digitando { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (max-width: 575.98px) { .chat { padding: 12px; } .chat-entrada { padding: 10px 12px; } }

.campo-assunto { text-transform: uppercase; }
/* Ferramentas PDF e imagem */
.ferr-ico { width: 40px; height: 40px; border-radius: 10px; background: #eef2ff; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex: 0 0 40px; }
.ferr-opcoes > * { flex: 1 1 180px; width: auto; min-width: 0; max-width: 100%; }
.ferr-fonte { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border: 1px solid var(--hd-borda); border-radius: 8px; margin-bottom: 4px; background: #f8fafc; }
.ferr-fonte b { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ferr-fonte button { border: none; background: transparent; padding: 0 4px; color: var(--hd-texto-suave); }
.ferr-fonte button:hover { color: var(--hd-texto); }

/* =====================================================================
   1.7 — Layout idêntico ao WMS Nova (assets/css/sidebar.css do WMS):
   menu branco com emojis, topo com botões emoji, "pílulas" de informação
   e relógio, botão Sair vermelho.
   ===================================================================== */
body { background: #f3f4f6; }
.hd-menu { padding: 16px; }
.hd-menu-topo { flex-shrink: 0; }
.hd-logo-box img { width: 60%; height: auto; border-radius: 6px; }
.hd-logo-texto strong { font-size: 18px; }
.hd-logo-texto span { font-size: 12px; letter-spacing: .02em; }
.hd-menu-alternar .seta { display: inline-block; transition: transform .3s; font-size: 12px; color: #475569; }
body.menu-mini .hd-menu-alternar .seta { transform: rotate(180deg); }
.hd-menu-nav { gap: 4px; }
.hd-menu-nav a, .hd-sair { padding: 12px 14px; border-radius: 12px; gap: 8px; font-size: 15px; color: #475569; }
.hd-menu-nav a .icone, .hd-sair .icone { width: 22px; text-align: center; font-size: 17px; line-height: 1; flex-shrink: 0; }
.hd-menu-nav a.ativo { background: #EEF2FF; color: #2563eb; }
.hd-menu-rodape { gap: 12px; }
.hd-usuario { background: #f8fafc; border-radius: 14px; padding: 10px; display: flex; align-items: center; gap: 12px; }
.hd-usuario .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hd-usuario .info strong { font-size: 14px; color: #1e293b; }
.hd-usuario .info .perfil { font-size: 11px; color: #64748b; }
.hd-usuario-config { font-size: 20px; padding: 6px; border-radius: 50%; line-height: 1; transition: background .2s; }
.hd-usuario-config:hover { background: #f1f5f9; }
.hd-avatar { background: #bfdbfe; color: #1e40af; font-weight: bold; font-size: 15px; }
.hd-sair { color: #ef4444; margin-top: 0; }
.hd-sair:hover { background: #fef2f2; color: #ef4444; }
@media (min-width: 992px) {
  body.menu-mini .hd-usuario-config { display: none; }
  body.menu-mini .hd-menu-nav a .icone, body.menu-mini .hd-sair .icone { font-size: 18px; }
}

.hd-topo { gap: 12px; }
.hd-topo-direita { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.hd-topo-btn { padding: 6px 8px; border-radius: 10px; font-size: 14px; color: #111; background: #fff; border: none; cursor: pointer; white-space: nowrap; line-height: 1.4; }
.hd-topo-btn.btn-modal:hover { background: #E0EBFF; color: #111; }
.hd-topo-btn.btn-sair { color: #ef4444; }
.hd-topo-btn.btn-sair:hover { background: #fef2f2; color: #b91c1c; }
#sino > .hd-topo-btn { font-size: 17px; }
.hd-badge-notif { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; display: flex; align-items: center; justify-content: center; background: #ef4444; color: #fff; border-radius: 50px; font-size: 11px; font-weight: 700; border: 1px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.hd-relogio { font-weight: bold; color: #334155; background: #e0ebff; padding: 6px 8px; border-radius: 10px; font-size: 12px; font-variant-numeric: tabular-nums; display: flex; gap: 6px; white-space: nowrap; }
@media (max-width: 991.98px) {
  .hd-topo-btn span { display: none; }
  .hd-relogio { display: none !important; }
}

/* Cartões no padrão WMS (bordas, sem sombra, raio 16–18px) */
.card { border-radius: 16px; border: 1px solid #e5e7eb; box-shadow: none; }
.kpi { border-radius: 18px; }
.kpi-icone { font-size: 20px; }
.kpi-valor { font-size: 42px; }

/* Boas-vindas do Início (igual ao .welcome do WMS) */
.hd-boas-vindas { background: #fff; padding: 20px; border-radius: 16px; border: 1px solid #e5e7eb; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.hd-boas-vindas h3 { font-size: 22px; margin: 0; color: #111; font-weight: 700; }
.hd-boas-vindas p { color: #64748b; font-size: 14px; margin: 4px 0 0; }
.hd-online { background: #dcfce7; color: #16a34a; padding: 8px 16px; border-radius: 10px; font-size: 14px; font-weight: bold; display: inline-flex; align-items: center; gap: 8px; }
.hd-online .ping { width: 9px; height: 9px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 0 rgba(22,163,74,.6); animation: hdPing 1.6s infinite; }
@keyframes hdPing { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.6); } 70% { box-shadow: 0 0 0 8px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }

/* Atalhos das configurações no formato .menu-card do WMS */
.atalho { padding: 20px; border-radius: 16px; position: relative; padding-right: 36px; }
.atalho strong { font-size: 16px; color: #1e293b; }
.atalho::after { content: '›'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 22px; }
.atalho .kpi-icone { width: 48px; height: 48px; font-size: 22px; }

/* =====================================================================
   1.7 — Conversa do chamado em formato de chat
   ===================================================================== */
.chat-abertura { background: #fff; border: 1px solid #e5e7eb; border-left: 5px solid #2563eb; border-radius: 16px; padding: 16px 18px; margin-bottom: 14px; }
.chat-abertura-topo { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.chat-abertura .chat-texto { font-size: 15px; }
.chat-papel { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: #475569; background: #f1f5f9; border-radius: 20px; padding: 1px 8px; margin-left: 4px; white-space: nowrap; vertical-align: middle; }
.chat-aviso { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-radius: 14px; padding: 12px 16px; margin-bottom: 14px; border: 1px solid; }
.chat-aviso-ico { font-size: 22px; line-height: 1; }
.chat-aviso.amarelo { background: #fefce8; border-color: #fde68a; }
.chat-aviso.azul { background: #eff6ff; border-color: #bfdbfe; }

.chat-card { overflow: hidden; }
.chat-corpo { background: #f8fafc; padding: 18px 16px 8px; max-height: 68vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
  background-image: radial-gradient(#e2e8f0 1px, transparent 1px); background-size: 18px 18px; }
.chat-corpo::-webkit-scrollbar { width: 6px; } .chat-corpo::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }
.chat-vazio { text-align: center; color: #94a3b8; padding: 30px 0; }
.chat-dia { text-align: center; margin: 6px 0 2px; }
.chat-dia span { background: #e0ebff; color: #334155; font-size: 12px; font-weight: 700; border-radius: 10px; padding: 3px 12px; }

.chat-linha { display: flex; align-items: flex-end; gap: 8px; max-width: 100%; }
.chat-linha.direita { justify-content: flex-end; }
.chat-avatar { width: 32px; height: 32px; font-size: 12px; margin-bottom: 2px; }
.av-sol { background: #bfdbfe; color: #1e40af; }
.av-eq { background: #dcfce7; color: #166534; }
.chat-balao { position: relative; max-width: min(78%, 680px); min-width: 140px; padding: 9px 13px 6px; border-radius: 16px; background: #fff; border: 1px solid #e5e7eb; box-shadow: 0 1px 2px rgba(15,23,42,.05); overflow-wrap: anywhere; }
.chat-linha.esquerda .chat-balao { border-bottom-left-radius: 4px; }
.chat-linha.direita .chat-balao { border-bottom-right-radius: 4px; }
.chat-balao.minha { background: #e0ebff; border-color: #c7d7fe; }
.chat-balao.solicitante { background: #fff; }
.chat-balao.equipe { background: #fff; border-color: #d1fae5; }
.chat-balao.nota { background: #fef9c3; border-color: #fde68a; }
.chat-autor { font-size: 12.5px; color: #1e293b; margin-bottom: 3px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.chat-balao.minha .chat-papel { background: rgba(255,255,255,.7); }
.chat-balao.nota .chat-papel { background: #fde68a; color: #854d0e; }
.chat-texto { font-size: 14.5px; line-height: 1.5; color: #1f2937; }
.chat-hora { text-align: right; font-size: 11px; color: #94a3b8; margin-top: 2px; }
.chat-balao .prints { margin-top: 8px; }
.chat-balao .prints img { max-height: 300px; }
.chat-balao .print-inline img { max-height: 420px; }
.chat-balao .anexo { background: rgba(255,255,255,.75); }

.chat-solucao { align-self: center; width: min(92%, 720px); background: #dcfce7; border: 1px solid #86efac; border-radius: 16px; padding: 10px 14px; }
.chat-solucao-topo { font-size: 13px; color: #166534; margin-bottom: 4px; }
.chat-solucao-topo span { color: #4d7c0f; font-size: 12px; }

.chat-evento { text-align: center; }
.chat-evento > span { display: inline-block; max-width: 92%; background: #f1f5f9; border: 1px solid #e2e8f0; color: #64748b; font-size: 12px; border-radius: 14px; padding: 4px 12px; line-height: 1.45; }
.chat-evento strong { color: #475569; font-weight: 700; }
.chat-evento em { font-style: normal; color: #94a3b8; margin-left: 4px; }

.chat-composer { border-top: 1px solid #e5e7eb; padding: 12px 16px 14px; background: #fff; }
.chat-abas { display: inline-flex; background: #f1f5f9; border-radius: 12px; padding: 3px; gap: 2px; }
.chat-abas .nav-link { padding: 6px 12px; border-radius: 10px; font-size: 13.5px; color: #475569; font-weight: 600; }
.chat-abas .nav-link.active { background: #fff; color: #2563eb; box-shadow: 0 1px 3px rgba(15,23,42,.1); }
.chat-aviso-nota { background: #fef9c3; border: 1px solid #fde68a; color: #854d0e; border-radius: 10px; padding: 6px 10px; margin-bottom: 8px; }
.chat-caixa { border: 1px solid #cbd5e1; border-radius: 14px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.chat-caixa:focus-within { border-color: #2563eb; box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
.chat-caixa textarea { border: none !important; box-shadow: none !important; resize: vertical; min-height: 80px; border-radius: 14px 14px 0 0; }
.chat-caixa .previas { padding: 0 10px; margin-top: 0; }
.chat-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid #f1f5f9; background: #f8fafc; border-radius: 0 0 14px 14px; }
.chat-barra .form-select-sm { min-width: 210px; }
.modo-nota .chat-caixa { background: #fffdf0; border-color: #fde68a; }

@media (max-width: 575.98px) { .chat-balao { max-width: 88%; } .chat-corpo { max-height: none; } }
@media print { .chat-corpo { max-height: none !important; overflow: visible !important; background: #fff !important; } }
/* Cores alternadas nas caixas de ícone, como os cartões do WMS (azul, ciano, verde, laranja) */
.row > div:nth-child(4n+2) > .atalho .kpi-icone { background: #cffafe; }
.row > div:nth-child(4n+3) > .atalho .kpi-icone { background: #dcfce7; }
.row > div:nth-child(4n+4) > .atalho .kpi-icone { background: #ffedd5; }
.tabela-menus .form-check-input { width: 1.3em; height: 1.3em; cursor: pointer; }

/* =====================================================================
   1.8 — Relatórios
   ===================================================================== */
.rel-kpi { padding: 16px 18px; position: relative; height: 100%; }
.rel-kpi .kpi-icone { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; font-size: 18px; }
.rel-kpi-valor { white-space: nowrap; font-size: clamp(18px, 1.6vw, 26px); font-weight: 700; color: #111; line-height: 1.15; padding-right: 44px; font-variant-numeric: tabular-nums; }
.rel-kpi-rotulo { font-size: 12px; font-weight: 600; color: #64748b; margin-top: 6px; }
.rel-abas { display: flex; gap: 4px; overflow-x: auto; }
.rel-abas button { border: none; background: transparent; border-radius: 12px; padding: 9px 14px; font-size: 14px; font-weight: 600; color: #475569; white-space: nowrap; }
.rel-abas button:hover { background: #f1f5f9; }
.rel-abas button.ativa { background: #EEF2FF; color: #2563eb; }
.rel-qtd { background: #e2e8f0; color: #475569; border-radius: 10px; font-size: 11px; padding: 1px 7px; margin-left: 4px; }
.rel-abas button.ativa .rel-qtd { background: #2563eb; color: #fff; }
.rel-pane { display: none; }
.rel-pane.ativa { display: block; }
.rel-pane-topo { padding: 14px 20px 6px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rel-pane-topo h3 { font-size: 18px; margin: 0; color: #1e293b; font-weight: 700; }
.rel-pane-topo span { font-size: 13px; color: #64748b; }
.rel-grafico-col { padding: 10px 16px 16px; border-right: 1px solid #f1f5f9; }
.rel-grafico { position: relative; max-height: 420px; }
.rel-tabela { margin: 0; }
.rel-tabela > thead th { background: #f8fafc; font-size: 11px; }
.rel-tabela > tbody td { padding-top: 10px; padding-bottom: 10px; }
.rel-volume { height: 4px; background: #f1f5f9; border-radius: 4px; margin-top: 6px; max-width: 220px; overflow: hidden; }
.rel-volume span { display: block; height: 100%; background: #93c5fd; border-radius: 4px; }
.rel-total { font-size: 18px; font-weight: 700; color: #111; font-variant-numeric: tabular-nums; }
.rel-pill { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 10px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.rel-pill.verde { background: #dcfce7; color: #166534; }
.rel-pill.laranja { background: #ffedd5; color: #9a3412; }
.rel-barra { flex: 1; height: 8px; background: #f1f5f9; border-radius: 8px; overflow: hidden; min-width: 70px; }
.rel-barra span { display: block; height: 100%; border-radius: 8px; }
.rel-barra.verde span { background: #16a34a; } .rel-barra.amarelo span { background: #f59e0b; } .rel-barra.vermelho span { background: #ef4444; }
.rel-pct { font-size: 13px; min-width: 48px; text-align: right; }
.rel-pct.verde { color: #15803d; } .rel-pct.amarelo { color: #b45309; } .rel-pct.vermelho { color: #dc2626; }
@media (max-width: 1199.98px) { .rel-grafico-col { border-right: none; border-bottom: 1px solid #f1f5f9; } }
@media print { .rel-pane { display: block !important; page-break-inside: avoid; } .rel-abas { display: none; } }
