/* =====================================================
   PORTAL REDE — Disco Virtual
   Navegador de pastas · Multi-upload · Ícones por tipo
   ===================================================== */

.drive-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 900px) {
  .drive-layout { grid-template-columns: 1fr; }
}

/* ---------- Navegação dos discos ---------- */

.drive-nav {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  position: sticky;
  top: 20px;
}
@media (max-width: 900px) {
  .drive-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .drive-nav-label { width: 100%; }
}

.drive-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background-color .15s var(--ease), color .15s var(--ease);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drive-nav-item:hover { background: var(--pine-soft); color: var(--pine); text-decoration: none; }
.drive-nav-item.on { background: var(--pine); color: #fff; }
.drive-nav-item.sub { font-weight: 500; font-size: 13.5px; padding-left: 18px; }
.drive-nav-item .dni { flex-shrink: 0; }

.drive-nav-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--ink-faint);
  padding: 14px 12px 6px;
}

/* ---------- Toolbar + breadcrumb ---------- */

.drive-main {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px 26px;
  min-height: 420px;
}

.drive-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.drive-crumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.dcrumb {
  color: var(--ink-soft);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background-color .15s var(--ease);
}
.dcrumb:hover { background: var(--pine-soft); text-decoration: none; }
.dcrumb.current { color: var(--pine); background: var(--pine-soft); }
.dsep { color: var(--ink-faint); }

/* ---------- Dropzone + progresso ---------- */

.drive-dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 22px;
  color: var(--ink-faint);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 16px;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.drive-dropzone:hover, .drive-dropzone.dragging {
  border-color: var(--pine);
  background: var(--pine-soft);
  color: var(--pine);
}
.drive-dropzone.dragging { border-style: solid; transform: scale(1.005); }

.up-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.up-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 13px;
  animation: flash-in .25s var(--ease);
}
.up-row.done { border-color: var(--success); }
.up-row.failed { border-color: var(--danger); background: var(--danger-soft); }
.up-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.up-size { color: var(--ink-faint); white-space: nowrap; font-size: 12px; }
.up-bar {
  width: 160px;
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--pine-soft);
  border: 1px solid var(--line);
  overflow: hidden;
  flex-shrink: 0;
}
.up-bar i {
  display: block;
  height: 100%;
  background: var(--pine);
  border-radius: var(--radius-pill);
  transition: width .25s var(--ease);
}
.up-row.done .up-bar i { background: var(--success); }
.up-status { width: 42px; text-align: right; font-weight: 700; font-size: 12px; color: var(--ink-soft); }
.up-row.done .up-status { color: var(--success); }
.up-row.failed .up-status { color: var(--danger); }

/* ---------- Linhas de pastas e arquivos ---------- */

.drive-section-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-faint);
  margin: 18px 0 8px;
}

.drive-rows { display: flex; flex-direction: column; }
.drive-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 10px;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--line);
  transition: background-color .15s var(--ease);
}
.drive-row:last-child { border-bottom: none; }
.drive-row:hover { background: var(--pine-soft); }

.dicon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .02em;
}
.dicon.folder { background: #FFF8E1; border-color: #F4C542; }

.dname {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 14px;
  color: var(--pine);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dname:hover { color: var(--pine-deep); text-decoration: none; }

.drive-row.clickable { user-select: none; }
.drive-row { padding: 12px 12px; }
.drive-row:hover { background: #F2F8FA; }
.dmeta { font-size: 12.5px; color: var(--ink-faint); white-space: nowrap; }

.drive-row.clickable { cursor: pointer; }

/* Histórico do arquivo (linha do tempo compacta) */
.dh-list { display: flex; flex-direction: column; max-height: 380px; overflow-y: auto; }
.dh-item {
  display: flex;
  gap: 11px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
}
.dh-item:last-child { border-bottom: none; }
.dh-dot {
  width: 9px; height: 9px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--pine);
  margin-top: 5px;
}
.dh-dot.soft { background: var(--line-strong); }
.dh-action { font-weight: 700; font-size: 13px; }
.dh-detail { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }
.dh-meta { font-size: 11.5px; color: var(--ink-faint); margin-top: 2px; }

@media (max-width: 700px) {
  .dmeta:nth-of-type(n+2) { display: none; }
  .up-bar { width: 90px; }
  .drive-main { padding: 14px; }
}
