/* O app Arquivos (explorador no jeito do Finder) e o Visor (abre qualquer arquivo por dentro). Materiais do sistema (cosmos.css). */

.janela.j-arquivos:not(.cheia) { max-width: 1180px; }
.janela.j-visor:not(.cheia) { max-width: 1100px; }
.j-visor .luz.minimizar { background: rgba(var(--f), .22); pointer-events: none; }

/* ------------------------------------------------------------ Arquivos */
.aq { --divisa-base: 10px; position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: var(--aq-lado, 208px) minmax(0, 1fr); }
.aq > * { min-width: 0; min-height: 0; }
.aq.soltando .aq-centro { box-shadow: inset 0 0 0 1.5px var(--laranja); }
.aq-lado { padding: 2px 10px 12px; overflow-y: auto; overscroll-behavior: contain; }
.aq-lado-rolo { display: flex; flex-direction: column; gap: 4px; }
.aq-grupo { margin-top: 12px; padding: 0 8px 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--tinta-3); }
.aq-grupo:first-child { margin-top: 2px; }
.aq-lugar { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 32px; padding: 4px 8px; border-radius: 7px; text-align: left; font-size: 14px; color: var(--tinta-2); transition: background-color .14s ease, color .14s ease; }
.aq-lugar .ico { color: var(--laranja-claro); }
.aq-lugar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aq-lugar small { font-size: 11.5px; color: var(--tinta-3); }
.aq-lugar.on { color: var(--tinta); background: rgba(var(--f), .13); }
.aq-drive { flex: none; width: 16px; height: 14.300px; }
.aq-lugar small.aq-atencao { color: #ffb340; }
:root[data-tema="claro"] .aq-lugar small.aq-atencao { color: var(--ambar); }
.aq-info header .aq-drive { width: 34px; height: 30.400px; }
.aq-info-acoes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.aq-centro { display: flex; flex-direction: column; margin: 0 10px 10px 0; border-radius: 8px; background: var(--poco); overflow: hidden; transition: box-shadow .16s ease; }
.aq-barra { flex: none; display: flex; align-items: center; gap: 6px; height: 48px; padding: 0 8px; }
.aq-barra .redondo { flex: none; width: 32px; height: 32px; border-radius: 7px; }
.aq-barra .redondo:disabled { opacity: .35; cursor: default; }
.aq-trilha { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; margin-left: 4px; overflow: hidden; font-size: 14.5px; white-space: nowrap; }
.aq-trilha button { flex: none; color: var(--tinta-2); border-radius: 5px; padding: 2px 4px; }
.aq-trilha b { min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
/* o último pedaço da trilha encolhe com reticências (na raiz é o botão "VPS Vertech", que no celular era cortado seco pela busca) */
.aq-trilha > :last-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.aq-trilha i { flex: none; font-style: normal; color: var(--tinta-3); }
.aq-busca { flex: none; display: flex; align-items: center; gap: 6px; width: 180px; height: 32px; padding: 0 9px; border-radius: 7px; color: var(--tinta-3); background: rgba(var(--f), .08); }
.aq-busca input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; font-size: 13.5px; background: none; box-shadow: none; }
.aq-busca input::-webkit-search-cancel-button { display: none; }
.aq-modos button { height: 26px; padding: 0 8px; display: grid; place-items: center; }
.aq-palco { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; outline: none; padding: 6px 12px 14px; }
.aq-vazio { padding: 60px 0; text-align: center; font-size: 14px; color: var(--tinta-3); }
.aq-pe { flex: none; display: flex; align-items: center; gap: 12px; height: 30px; padding: 0 14px; font-size: 12px; color: var(--tinta-3); }
.aq-envio { display: flex; align-items: center; gap: 8px; }
.aq-progresso { display: block; width: 90px; height: 4px; border-radius: 99px; overflow: hidden; background: rgba(var(--f), .14); }
.aq-progresso i { display: block; width: var(--p); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffb066, var(--laranja)); transition: width .2s linear; }

/* em ícones */
.aq-palco[data-modo="grade"] { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); grid-auto-rows: max-content; gap: 4px; align-content: start; }
.aq-palco[data-modo="grade"] .aq-vazio { grid-column: 1 / -1; }
.aq-palco[data-modo="grade"] .aq-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 6px 8px; border-radius: 8px; text-align: center; cursor: default; }
.aq-palco[data-modo="grade"] .aq-figura { display: grid; place-items: center; width: 76px; height: 64px; margin-bottom: 3px; }
.aq-palco[data-modo="grade"] .aq-col { display: none; }
.aq-palco[data-modo="grade"] .aq-acoes { position: absolute; top: 4px; right: 4px; opacity: 0; }
.aq-palco[data-modo="grade"] .aq-item:focus-within .aq-acoes { opacity: 1; }
.aq-palco[data-modo="grade"] .aq-nome { max-width: 100%; padding: 1px 6px; border-radius: 4px; font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.aq-palco[data-modo="grade"] .aq-item.on .aq-figura { border-radius: 8px; background: rgba(var(--f), .12); }
.aq-palco[data-modo="grade"] .aq-item.on .aq-nome { color: #fff; background: var(--laranja); }
.aq-pasta { width: 64px; height: 54px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .22)); }
.aq-folha { width: 44px; height: 54px; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .32)); }
.aq-miniatura { max-width: 72px; max-height: 60px; border-radius: 4px; object-fit: contain; box-shadow: 0 0 0 2px #fff, 0 3px 8px rgba(0, 0, 0, .4); }
.aq-sub { font-size: 11.5px; color: var(--tinta-3); }
.aq-acoes { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; color: var(--tinta-2); background: rgba(var(--f), .1); transition: opacity .14s ease; }
.aq-renomear { width: 100%; max-width: 100%; height: 22px; padding: 0 5px; border: 0; border-radius: 4px; font-size: 13px; text-align: inherit; color: var(--tinta); background: rgba(0, 0, 0, .34); box-shadow: 0 0 0 1.5px var(--laranja); }

/* em lista */
/* cada linha tem fundo próprio (a zebra, o ponteiro e a escolhida): o respiro entre elas vem do gap */
.aq-palco[data-modo="lista"] { display: flex; flex-direction: column; gap: 4px; padding: 0 8px 12px; }
.aq-palco[data-modo="lista"] > * { flex: none; }
.aq-cab, .aq-palco[data-modo="lista"] .aq-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) 132px 86px 110px 30px; align-items: center; gap: 0 10px; }
.aq-cab { position: sticky; top: 0; z-index: 1; height: 28px; padding: 0 8px; font-size: 11.5px; font-weight: 600; color: var(--tinta-3); background: rgb(20, 24, 31); border-bottom: 1px solid rgba(var(--f), .07); }
.aq-cab span:first-child { grid-column: 1 / 3; }
.aq-palco[data-modo="lista"] .aq-item { min-height: 34px; padding: 2px 8px; border-radius: 7px; font-size: 14px; cursor: default; }
.aq-palco[data-modo="lista"] .aq-item:nth-child(even) { background: rgba(var(--f), .03); }
.aq-palco[data-modo="lista"] .aq-item.on { color: #fff; background: rgba(var(--laranja-rgb), .82); }
.aq-palco[data-modo="lista"] .aq-item.on small { color: rgba(255, 255, 255, .86); }
.aq-palco[data-modo="lista"] .aq-figura { display: grid; place-items: center; width: 30px; height: 26px; }
.aq-palco[data-modo="lista"] .aq-pasta { width: 24px; height: 20px; }
.aq-palco[data-modo="lista"] .aq-folha { width: 18px; height: 22px; }
.aq-palco[data-modo="lista"] .aq-miniatura { max-width: 26px; max-height: 22px; border-radius: 2px; box-shadow: 0 0 0 1px #fff; }
.aq-palco[data-modo="lista"] .aq-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aq-palco[data-modo="lista"] .aq-sub { display: none; }
.aq-palco[data-modo="lista"] .aq-col { font-size: 12.5px; color: var(--tinta-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aq-palco[data-modo="lista"] .aq-acoes { opacity: 0; background: none; }
.aq-palco[data-modo="lista"] .aq-item.on .aq-acoes, .aq-palco[data-modo="lista"] .aq-item:focus-within .aq-acoes { opacity: 1; color: inherit; }
@media (hover: hover) and (pointer: fine) {
  .aq-lugar:not(.on):hover, .aq-trilha button:hover { background: rgba(var(--f), .07); color: var(--tinta); }
  .aq-palco[data-modo="grade"] .aq-item:hover .aq-acoes, .aq-palco[data-modo="lista"] .aq-item:hover .aq-acoes { opacity: 1; }
  .aq-palco[data-modo="lista"] .aq-item:not(.on):hover { background: rgba(var(--f), .07); }
}
.aq-menu button.perigo span { color: var(--erro); }

/* a ficha de informações (Obter informações) */
.aq-info { position: absolute; z-index: 5; top: 56px; right: 22px; width: 300px; max-width: calc(100% - 24px); padding: 12px; border-radius: 10px; background: var(--sup-folha); box-shadow: var(--brilho), 0 24px 60px -18px rgba(0, 0, 0, .75); animation: ai-menu .22s var(--ease-out) both; }
.aq-info header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.aq-info header .aq-figura { flex: none; display: grid; place-items: center; width: 48px; height: 44px; }
.aq-info header .aq-pasta { width: 46px; height: 39px; }
.aq-info header .aq-folha { width: 32px; height: 40px; }
.aq-info header .aq-miniatura { max-width: 44px; max-height: 44px; border-radius: 9px; box-shadow: none; }
.aq-info header div { flex: 1; min-width: 0; }
.aq-info header b { display: block; font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.aq-info header small { font-size: 12.5px; color: var(--tinta-3); }
.aq-info header .redondo { width: 28px; height: 28px; border-radius: 7px; }
.aq-info dl { margin: 0; }
.aq-info dl div { display: flex; gap: 10px; padding: 6px 2px; font-size: 13.5px; border-top: 1px solid rgba(var(--f), .07); }
.aq-info dt { flex: none; width: 88px; color: var(--tinta-3); }
.aq-info dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.aq-info-disco { margin-top: 10px; padding: 10px; border-radius: 8px; background: var(--poco); }
.aq-info-disco > div:first-child { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; font-size: 13.5px; }
.aq-info-disco b { font-weight: 600; }
.aq-info-disco span { font-size: 12.5px; color: var(--tinta-2); }
.aq-info-disco .botao { margin-top: 10px; }

/* ------------------------------------------------------------ Visor */
.vs { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.vs-barra { flex: none; display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 10px; }
.vs-barra .redondo { flex: none; width: 32px; height: 32px; border-radius: 7px; }
.vs-barra .redondo:disabled { opacity: .35; cursor: default; }
.vs-nome { flex: 1; min-width: 0; margin-left: 6px; display: flex; align-items: baseline; gap: 10px; }
.vs-nome b { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-nome small { flex: none; font-size: 12.5px; color: var(--tinta-3); }
.vs-palco { flex: 1; min-height: 0; display: grid; place-items: center; margin: 0 10px 10px; border-radius: 8px; overflow: hidden; background: rgba(0, 0, 0, .34); }
.janela.cheia .vs-palco { margin: 0; border-radius: 0; }
.vs-palco:fullscreen { margin: 0; border-radius: 0; background: #000; }
.vs-palco > img, .vs-palco > video { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.vs-palco > iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.vs-palco[data-especie="pdf"] > iframe { background: #525659; }
.vs-texto { align-self: stretch; justify-self: stretch; overflow: auto; padding: 22px 28px; user-select: text; -webkit-user-select: text; }
.vs-texto.ai-texto { max-width: 820px; justify-self: center; width: 100%; }
.vs-texto pre { margin: 0; font: 13px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; color: #e7e3da; }
.vs-som { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px; text-align: center; }
.vs-som .aq-folha { width: 76px; height: 94px; }
.vs-som b { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.vs-som small { color: var(--tinta-3); }
.vs-som audio { width: min(440px, 80vw); margin-top: 8px; }
.vs-nada { color: var(--tinta-3); }
:root[data-tema="claro"] .janela .aq-cab { background: rgb(226, 229, 234); }
:root[data-tema="claro"] .janela .vs-palco { background: rgba(0, 0, 0, .1); }
:root[data-tema="claro"] .janela .vs-texto pre { color: #1d1d1f; }
:root[data-tema="claro"] .janela .aq-renomear { background: #fff; }

@media (max-width: 860px) {
  .aq { grid-template-columns: minmax(0, 1fr); }
  .aq > * { grid-area: 1 / 1; }
  .aq[data-vista="conteudo"] .aq-lado, .aq[data-vista="lado"] .aq-centro { display: none; }
  .aq-centro { margin: 0; border-radius: 0; background: none; }
  .aq-so-computador { display: none; }
  .aq-barra .redondo, .vs-barra .redondo { width: 38px; height: 38px; }
  .aq-busca { width: 120px; height: 38px; }
  .aq-busca input { font-size: 16px; }
  .aq-lugar { min-height: 46px; font-size: 16px; }
  .aq-cab { display: none; }
  .aq-palco[data-modo="lista"] .aq-item { grid-template-columns: 40px minmax(0, 1fr) auto 38px; min-height: 52px; font-size: 15.500px; }
  .aq-palco[data-modo="lista"] .aq-figura { width: 40px; height: 34px; }
  .aq-palco[data-modo="lista"] .aq-pasta { width: 34px; height: 29px; }
  .aq-palco[data-modo="lista"] .aq-folha { width: 26px; height: 32px; }
  .aq-palco[data-modo="lista"] .aq-miniatura { max-width: 36px; max-height: 32px; }
  .aq-palco[data-modo="lista"] .aq-col { display: none; }
  .aq-palco[data-modo="lista"] .aq-sub { display: block; font-size: 12.5px; }
  .aq-palco[data-modo="lista"] .aq-acoes { opacity: 1; width: 38px; height: 38px; }
  .aq-info { top: 52px; right: 12px; }
  .vs-palco { margin: 0; border-radius: 0; }
  .vs-nome { flex-direction: column; align-items: flex-start; gap: 0; }
  .vs-texto { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { .aq-info { animation: none; } .aq-progresso i { transition: none; } }

/* recortar, copiar, colar e mover */
.aq-item.cortado { opacity: .45; }
.aq-palco[data-modo="grade"] .aq-item.alvo .aq-figura { border-radius: 8px; background: rgba(var(--laranja-rgb), .18); box-shadow: inset 0 0 0 1.5px var(--laranja); }
.aq-palco[data-modo="lista"] .aq-item.alvo, .aq-lugar.alvo, .aq-trilha button.alvo { box-shadow: inset 0 0 0 1.5px var(--laranja); background: rgba(var(--laranja-rgb), .14); }
.aq-prancheta { display: flex; align-items: center; gap: 6px; color: var(--tinta); white-space: nowrap; }
.aq-prancheta:empty { display: none; }
.aq-prancheta .botao { height: 22px; min-height: 0; padding: 0 9px; font-size: 12px; border-radius: 6px; cursor: pointer; }
.aq-mover { position: absolute; z-index: 6; top: 50%; left: 50%; translate: -50% -50%; display: flex; flex-direction: column; gap: 8px; width: 380px; max-width: calc(100% - 24px); max-height: min(460px, calc(100% - 32px)); padding: 12px; border-radius: 10px; background: var(--sup-folha); box-shadow: var(--brilho), 0 24px 60px -18px rgba(0, 0, 0, .75); animation: ai-menu .22s var(--ease-out) both; }
.aq-mover header { display: flex; align-items: center; gap: 10px; }
.aq-mover header b { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aq-mover-trilha { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; color: var(--tinta-2); }
.aq-mover-trilha button { color: var(--tinta-2); border-radius: 5px; padding: 2px 4px; cursor: pointer; }
.aq-mover-trilha b { font-weight: 600; color: var(--tinta); padding: 2px 4px; }
.aq-mover-trilha i { font-style: normal; color: var(--tinta-3); }
.aq-mover-lista { flex: 1; min-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 4px; border-radius: 8px; background: rgba(var(--f), .04); }
.aq-mover-lista button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 4px 8px; border-radius: 7px; text-align: left; font-size: 14px; cursor: pointer; }
.aq-mover-lista button span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aq-mover-lista .aq-figura { flex: none; display: grid; place-items: center; width: 26px; }
.aq-mover-lista .aq-pasta { width: 24px; height: 20px; }
.aq-mover-lista .ico { color: var(--tinta-3); }
.aq-mover-lista p { margin: auto; padding: 16px; font-size: 13px; }
.aq-mover footer { display: flex; justify-content: flex-end; gap: 6px; }
.aq-mover footer .botao { cursor: pointer; }
.aq-mover footer .botao[disabled] { opacity: .45; cursor: default; }
@media (hover: hover) { .aq-mover-lista button:hover, .aq-mover-trilha button:hover { background: rgba(var(--f), .08); color: var(--tinta); } }
