/* ==========================================================================
   Drive (nuvem de documentos): barra lateral, caminho, pastas em grade,
   cartões de arquivo com miniatura e arrastar e soltar.
   ========================================================================== */

.ig-drive { position: relative; display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 22px; align-items: start; min-height: 60vh; }

/* ---------- Barra lateral ---------- */
.ig-drive-lateral { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 14px; }
.ig-drive-secoes { display: flex; flex-direction: column; gap: 2px; }
.ig-drive-secao { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 999px; color: var(--ig-text); font-size: 14px; font-weight: 600; text-decoration: none; transition: background .15s; }
.ig-drive-secao:hover { background: rgba(0, 102, 153, .07); }
.ig-drive-secao.ativa { background: rgba(0, 102, 153, .13); color: var(--ig-brand); font-weight: 800; }
.ig-drive-secao-ic { width: 20px; height: 20px; flex: none; }
.ig-drive-contador { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: rgba(100, 116, 139, .15); color: var(--ig-text-2); font-size: 12px; font-weight: 700; text-align: center; }

.ig-drive-uso { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--ig-line); border-radius: 14px; background: var(--ig-surface); }
.ig-drive-uso-titulo { display: flex; align-items: center; gap: 8px; color: var(--ig-text); font-size: 13px; font-weight: 800; }
.ig-drive-uso .ig-meta-track { background: rgba(2, 26, 51, .08); }
.ig-drive-uso-texto { color: var(--ig-text-2); font-size: 12px; line-height: 1.5; }
.ig-drive-uso-texto strong { color: var(--ig-text); }

/* ---------- Caminho e ferramentas ---------- */
.ig-drive-conteudo { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ig-drive-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ig-drive-caminho { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; min-width: 0; }
.ig-drive-passo { padding: 5px 10px; border: 0; border-radius: 8px; background: none; color: var(--ig-text-2); font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.ig-drive-passo:hover, button.ig-drive-passo:hover { background: rgba(0, 102, 153, .08); color: var(--ig-brand); }
.ig-drive-passo.atual { color: var(--ig-text); font-size: 17px; font-weight: 800; cursor: default; }
.ig-drive-sep { color: var(--ig-text-2); opacity: .6; }
.ig-drive-espaco { flex: 1; }
.ig-drive-botao { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--ig-line); border-radius: 10px; background: var(--ig-surface); color: var(--ig-text); font: inherit; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; }
.ig-drive-botao:hover { border-color: rgba(0, 102, 153, .35); color: var(--ig-brand); }
.ig-drive-botao-ic { width: 16px; height: 16px; flex: none; }
.ig-drive-alternar { display: inline-flex; border: 1px solid var(--ig-line); border-radius: 10px; overflow: hidden; background: var(--ig-surface); }
.ig-drive-alternar button { display: inline-flex; padding: 7px 10px; border: 0; background: none; color: var(--ig-text-2); cursor: pointer; }
.ig-drive-alternar button.ativa { background: rgba(0, 102, 153, .12); color: var(--ig-brand); }

.ig-drive-busca { display: flex; align-items: center; gap: 8px; max-width: 420px; padding: 8px 12px; border: 1px solid var(--ig-line); border-radius: 12px; background: var(--ig-surface); color: var(--ig-text-2); }
.ig-drive-busca input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ig-text); font: inherit; font-size: 14px; }
.ig-drive-busca input:focus { box-shadow: none; }

.ig-drive-titulo-secao { margin: 4px 0 -4px; color: var(--ig-text-2); font-size: 13px; font-weight: 800; letter-spacing: .02em; }

/* ---------- Pastas (clientes, processos e pastas) ---------- */
.ig-drive-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.ig-drive-pasta { position: relative; display: flex; align-items: center; min-width: 0; border: 1px solid var(--ig-line); border-radius: 14px; background: var(--ig-surface); color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.ig-drive-pasta { gap: 12px; padding: 12px 14px; }
.ig-drive-pasta:hover { border-color: rgba(0, 102, 153, .35); box-shadow: 0 6px 18px rgba(1, 50, 82, .08); transform: translateY(-1px); }
.ig-drive-pasta-abrir { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; padding: 12px 4px 12px 14px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ig-drive-pasta-ic { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(0, 102, 153, .1); color: var(--ig-brand); }
.ig-drive-pasta-ic.cliente { background: rgba(45, 212, 234, .16); color: #0e7490; }
.ig-drive-pasta-ic.processo { background: rgba(99, 102, 241, .12); color: #4f46e5; }
.ig-drive-pasta-ic.compartilhada { background: rgba(16, 185, 129, .12); color: #059669; }
.ig-drive-pasta-ic.privada { background: rgba(245, 158, 11, .14); color: #b45309; }
.ig-drive-pasta-svg { width: 22px; height: 22px; }
.ig-drive-pasta-texto { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ig-drive-pasta-texto strong { overflow: hidden; color: var(--ig-text); font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ig-drive-pasta-texto small { overflow: hidden; color: var(--ig-text-2); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ig-drive-pasta-menu { display: grid; place-items: center; width: 32px; height: 32px; margin-right: 6px; border: 0; border-radius: 8px; background: none; color: var(--ig-text-2); cursor: pointer; }
.ig-drive-pasta-menu:hover { background: rgba(0, 102, 153, .08); color: var(--ig-brand); }
.ig-drive-mais { display: flex; justify-content: center; }

.ig-drive-vazio { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 16px; border: 1px dashed rgba(2, 26, 51, .18); border-radius: 16px; color: var(--ig-text-2); text-align: center; }
.ig-drive-vazio strong { color: var(--ig-text); font-size: 15px; }
.ig-drive-vazio-ic { width: 40px; height: 40px; opacity: .6; }

/* ---------- Arquivos em grade (tabela do Filament em cartões) ---------- */
.ig-drive-em-grade .fi-ta-record.ig-drive-cartao { border-radius: 14px; overflow: hidden; transition: box-shadow .15s, transform .15s; }
.ig-drive-em-grade .fi-ta-record.ig-drive-cartao:hover { box-shadow: 0 8px 22px rgba(1, 50, 82, .12); transform: translateY(-1px); }
.ig-drive-em-grade .fi-ta-record .fi-ta-col-wrp { width: 100%; }
.ig-drive-miniatura { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; margin-bottom: 6px; border-radius: 10px; overflow: hidden; background: var(--ig-surface-3); color: var(--ig-text-2); }
.ig-drive-miniatura img { width: 100%; height: 100%; object-fit: cover; }
.ig-drive-miniatura-ic { width: 44px; height: 44px; }
.ig-drive-extensao { position: absolute; left: 8px; bottom: 8px; padding: 1px 7px; border-radius: 6px; background: rgba(255, 255, 255, .85); color: var(--ig-text); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.ig-drive-tipo-pdf { background: #fdecec; color: #dc2626; }
.ig-drive-tipo-texto { background: #e8f0fe; color: #1d4ed8; }
.ig-drive-tipo-planilha { background: #e6f6ec; color: #15803d; }
.ig-drive-tipo-midia { background: #f3e8ff; color: #7e22ce; }
.ig-drive-selo { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: rgba(245, 158, 11, .92); color: #fff; }
.ig-drive-selo-ic { width: 13px; height: 13px; }

/* ---------- Arrastar e soltar ---------- */
.ig-drive-soltar { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 24px; background: rgba(0, 102, 153, .14); backdrop-filter: blur(2px); }
.ig-drive-soltar-caixa { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 32px 44px; border: 2px dashed var(--ig-brand); border-radius: 22px; background: var(--ig-surface); color: var(--ig-text); text-align: center; pointer-events: none; box-shadow: 0 20px 50px rgba(1, 50, 82, .2); }
.ig-drive-soltar-caixa strong { font-size: 18px; }
.ig-drive-soltar-caixa span { color: var(--ig-text-2); font-size: 14px; }
.ig-drive-soltar-ic { width: 48px; height: 48px; color: var(--ig-brand); }
.ig-drive-enviando { position: fixed; right: 24px; bottom: 24px; z-index: 41; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 10px; width: 260px; padding: 12px 14px; border-radius: 14px; background: var(--ig-navy); color: #fff; font-size: 13px; box-shadow: 0 12px 30px rgba(1, 50, 82, .3); }
.ig-drive-enviando i { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.ig-drive-enviando b { display: block; height: 100%; background: linear-gradient(90deg, var(--ig-brand-2), var(--ig-accent)); transition: width .2s; }

/* ---------- Tema escuro ---------- */
html.dark .ig-drive-secao, html.dark .ig-drive-passo.atual, html.dark .ig-drive-pasta-texto strong, html.dark .ig-drive-uso-titulo, html.dark .ig-drive-uso-texto strong, html.dark .ig-drive-vazio strong { color: #eaf2f8; }
html.dark .ig-drive-secao.ativa { background: rgba(45, 212, 234, .14); color: var(--ig-accent); }
html.dark .ig-drive-uso, html.dark .ig-drive-botao, html.dark .ig-drive-alternar, html.dark .ig-drive-busca, html.dark .ig-drive-pasta, html.dark .ig-drive-soltar-caixa { border-color: rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .04); color: #eaf2f8; }
html.dark .ig-drive-busca input { color: #eaf2f8; }
html.dark .ig-drive-miniatura { background: rgba(255, 255, 255, .06); }
html.dark .ig-drive-soltar-caixa { background: #0b2233; }

/* ---------- Telas menores ---------- */
@media (max-width: 1024px) {
    .ig-drive { grid-template-columns: 1fr; }
    .ig-drive-lateral { position: static; }
    .ig-drive-secoes { flex-direction: row; flex-wrap: wrap; }
    .ig-drive-uso { display: none; }
}

@media (max-width: 640px) {
    .ig-drive-grade { grid-template-columns: 1fr; }
    .ig-drive-passo { max-width: 12rem; }
}
