/* Envio de arquivos (js/upload.js): bandeja flutuante no canto inferior direito e dropzone. Usa as variáveis de tema do painel (claro/escuro). */
.hz-bandeja { position: fixed; inset: auto 16px 16px auto; margin: 0; padding: 0; width: min(380px, calc(100vw - 32px)); max-height: min(70dvh, 520px); display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 36px rgb(0 0 0 / .22); font: 13px/1.4 var(--font-body); z-index: 2147483000; }
.hz-bandeja[hidden], .hz-bandeja[popover]:not(:popover-open) { display: none; }
@media (max-width: 860px) { .hz-bandeja { inset: auto 12px calc(84px + env(safe-area-inset-bottom, 0px)) auto; width: calc(100vw - 24px); } }
.hz-cab { display: flex; align-items: center; gap: 4px; padding: 10px 8px 10px 14px; background: var(--soft); border-bottom: 1px solid var(--line); }
.hz-tit { flex: 1; margin: 0; font: 600 14px/1.3 var(--font-body); min-width: 0; }
.hz-lista { list-style: none; margin: 0; padding: 4px 0; overflow: auto; }
.hz-bandeja.recolhida .hz-lista { display: none; }
.hz-bandeja.recolhida .hz-cab { border-bottom: 0; }
.hz-recolhe svg { transition: transform .15s; }
.hz-bandeja.recolhida .hz-recolhe svg { transform: rotate(180deg); }
.hz-ib { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 30px; height: 30px; padding: 0 6px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font: 600 12px var(--font-body); }
.hz-ib svg { width: 17px; height: 17px; flex: none; }
.hz-ib:hover { background: var(--soft); color: var(--fg); }
.hz-ib:focus-visible, .hz-dz:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.hz-ib[hidden], .hz-ok[hidden] { display: none; }
.hz-retry { color: var(--brand); border: 1px solid var(--line); padding: 0 8px; }
.hz-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.hz-item:last-child { border-bottom: 0; }
.hz-selo { flex: none; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; font: 700 10px var(--font-mono); letter-spacing: .02em; background: var(--soft); color: var(--muted); }
.hz-selo.hz-pdf { background: var(--bad-bg); color: var(--bad); }
.hz-selo.hz-img { background: var(--info-bg); color: var(--info); }
.hz-selo.hz-doc { background: var(--brand-soft); color: var(--brand); }
.hz-selo.hz-xls { background: var(--ok-bg); color: var(--ok); }
.hz-corpo { flex: 1; min-width: 0; }
.hz-nome { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hz-rot { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hz-barra { height: 4px; margin: 6px 0 5px; border-radius: 999px; background: var(--soft); overflow: hidden; position: relative; }
.hz-prog { height: 100%; width: 0; background: var(--brand); border-radius: inherit; transition: width .25s ease-out; }
.hz-item[data-estado="concluido"] .hz-prog { background: var(--ok); }
.hz-item[data-estado="erro"] .hz-prog { background: var(--bad); }
.hz-item[data-estado="aguardando"] .hz-prog { background: var(--warn); }
.hz-indet .hz-prog { width: 40% !important; position: absolute; animation: hzIndet 1.2s ease-in-out infinite; }
@keyframes hzIndet { from { left: -40%; } to { left: 100%; } }
.hz-meta { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.hz-item.hz-erro .hz-meta { color: var(--bad); }
.hz-acoes { flex: none; display: flex; align-items: center; gap: 2px; }
.hz-ok { width: 22px; height: 22px; color: var(--ok); }
.hz-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* dropzone */
.hz-dz { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 14px; text-align: center; border: 2px dashed var(--line); border-radius: 12px; background: var(--surface); color: var(--fg); cursor: pointer; transition: border-color .15s, background .15s; }
.hz-dz:hover, .hz-dz.hz-sobre { border-color: var(--brand); background: var(--brand-soft); }
.hz-dz-ic { width: 30px; height: 30px; color: var(--brand); }
.hz-dz-t { font-weight: 600; }
.hz-dz-s { color: var(--muted); font-size: 12.5px; }
.hz-dz-erro { margin-top: 6px; color: var(--bad); font-size: 12.5px; }
.hz-dz-erro[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) { .hz-prog, .hz-dz, .hz-recolhe svg { transition: none; } .hz-indet .hz-prog { animation: none; left: 0; width: 100% !important; opacity: .5; } }
